(self.webpackChunkRemoteClient = self.webpackChunkRemoteClient || []).push([
  [6229],
  {
    91055: (t, e, r) => {
      'use strict';
      r.d(e, { A: () => o, O: () => n });
      class n {
        constructor(t, e, r, n = 1, s = 0) {
          if (
            ((this.ctor = t),
            (this.acquireFunction = e),
            (this.releaseFunction = r),
            (this.allocationSize = n),
            (this._pool = new Array(s)),
            (this._initialSize = s),
            this.ctor)
          )
            for (let t = 0; t < s; t++) this._pool[t] = new this.ctor();
          this.allocationSize = Math.max(n, 1);
        }
        destroy() {
          this.prune(0);
        }
        acquire(...t) {
          let e;
          if (n.test.disabled) e = new this.ctor();
          else {
            if (0 === this._pool.length) {
              const t = this.allocationSize;
              for (let e = 0; e < t; e++) this._pool[e] = new this.ctor();
            }
            e = this._pool.pop();
          }
          return (
            this.acquireFunction
              ? this.acquireFunction(e, ...t)
              : (function (t) {
                  return t && t.acquire && 'function' == typeof t.acquire;
                })(e) && e.acquire(...t),
            e
          );
        }
        release(t) {
          t &&
            !n.test.disabled &&
            (this.releaseFunction
              ? this.releaseFunction(t)
              : (function (t) {
                  return t && t.release && 'function' == typeof t.release;
                })(t) && t.release(),
            this._pool.push(t));
        }
        prune(t = this._initialSize) {
          if (!(t >= this._pool.length)) {
            for (let e = t; e < this._pool.length; ++e) {
              const t = this._pool[e];
              this._dispose(t);
            }
            this._pool.length = t;
          }
        }
        _dispose(t) {
          t.dispose && 'function' == typeof t.dispose && t.dispose();
        }
      }
      function s(t) {
        t.length = 0;
      }
      n.test = { disabled: !1 };
      class o {
        constructor(t = 50, e = 50) {
          this._pool = new n(Array, void 0, s, e, t);
        }
        acquire() {
          return this._pool.acquire();
        }
        release(t) {
          this._pool.release(t);
        }
        prune() {
          this._pool.prune(0);
        }
        static acquire() {
          return i.acquire();
        }
        static release(t) {
          return i.release(t);
        }
        static prune() {
          i.prune();
        }
      }
      const i = new o(100);
    },
    74673: (t, e, r) => {
      'use strict';
      r.d(e, { J: () => a, a: () => l });
      var n = r(29768),
        s = r(21972),
        o = r(26341),
        i = r(17533);
      const a = (t) => {
        let e = class extends t {
          constructor(...t) {
            super(...t);
          }
          read(t, e) {
            (0, o.r)(this, t, e);
          }
          write(t = {}, e) {
            return (0, o.w)(this, t, e);
          }
          toJSON(t) {
            return this.write({}, t);
          }
          static fromJSON(t, e) {
            return c.call(this, t, e);
          }
        };
        return (
          (e = (0, n._)([(0, i.j)('esri.core.JSONSupport')], e)),
          (e.prototype.toJSON.isDefaultToJSON = !0),
          e
        );
      };
      function c(t, e) {
        if (!t) return null;
        if (t.declaredClass) throw new Error('JSON object is already hydrated');
        const r = new this();
        return r.read(t, e), r;
      }
      let l = class extends a(s.Z) {};
      l = (0, n._)([(0, i.j)('esri.core.JSONSupport')], l);
    },
    27794: (t, e, r) => {
      'use strict';
      r.d(e, {
        P: () => l,
        R: () => s,
        a: () => p,
        b: () => g,
        c: () => a,
        e: () => o,
        i: () => h,
        j: () => c,
        r: () => f,
      });
      var n = r(76506);
      class s {
        constructor(t = 1) {
          this._seed = t;
        }
        set seed(t) {
          this._seed = null == t ? Math.random() * s._m : t;
        }
        getInt() {
          return (this._seed = (s._a * this._seed + s._c) % s._m), this._seed;
        }
        getFloat() {
          return this.getInt() / (s._m - 1);
        }
        getIntRange(t, e) {
          return Math.round(this.getFloatRange(t, e));
        }
        getFloatRange(t, e) {
          const r = e - t;
          return t + (this.getInt() / s._m) * r;
        }
      }
      function o(t, e, r) {
        if ((0, n.b)(t) && (0, n.b)(e)) return !0;
        if ((0, n.b)(t) || (0, n.b)(e) || t.length !== e.length) return !1;
        if (r) {
          for (let n = 0; n < t.length; n++) if (!r(t[n], e[n])) return !1;
        } else for (let r = 0; r < t.length; r++) if (t[r] !== e[r]) return !1;
        return !0;
      }
      (s._m = 2147483647), (s._a = 48271), (s._c = 0);
      const i = !!Array.prototype.fill;
      function a(t, e) {
        if (i) return new Array(t).fill(e);
        const r = new Array(t);
        for (let n = 0; n < t; n++) r[n] = e;
        return r;
      }
      function c(t, e) {
        void 0 === e && ((e = t), (t = 0));
        const r = new Array(e - t);
        for (let n = t; n < e; n++) r[n - t] = n;
        return r;
      }
      class l {
        constructor() {
          this.last = 0;
        }
      }
      const u = new l();
      function h(t, e, r, n) {
        n = n || u;
        const s = Math.max(0, n.last - 10);
        for (let o = s; o < r; ++o) if (t[o] === e) return (n.last = o), o;
        const o = Math.min(s, r);
        for (let r = 0; r < o; ++r) if (t[r] === e) return (n.last = r), r;
        return -1;
      }
      function f(t, e, r, n) {
        const s = null == r ? t.length : r,
          o = h(t, e, s, n);
        if (-1 !== o) return (t[o] = t[s - 1]), null == r && t.pop(), e;
      }
      const d = new Set();
      function p(t, e, r = t.length, n = e.length, s, o) {
        if (0 === n || 0 === r) return r;
        d.clear();
        for (let t = 0; t < n; ++t) d.add(e[t]);
        s = s || u;
        const i = Math.max(0, s.last - 10);
        for (let e = i; e < r; ++e)
          if (
            d.has(t[e]) &&
            (o && o.push(t[e]),
            d.delete(t[e]),
            (t[e] = t[r - 1]),
            --r,
            --e,
            0 === d.size || 0 === r)
          )
            return d.clear(), r;
        for (let e = 0; e < i; ++e)
          if (
            d.has(t[e]) &&
            (o && o.push(t[e]),
            d.delete(t[e]),
            (t[e] = t[r - 1]),
            --r,
            --e,
            0 === d.size || 0 === r)
          )
            return d.clear(), r;
        return d.clear(), r;
      }
      function g(t, e) {
        const r = t.indexOf(e);
        return -1 !== r ? (t.splice(r, 1), e) : null;
      }
      new s();
    },
    23639: (t, e, r) => {
      'use strict';
      r.d(e, { b: () => i, d: () => o });
      var n = r(76506);
      const s = new Set();
      function o(t, e, r = {}) {
        if ((0, n.h)('esri-deprecation-warnings')) {
          const { moduleName: n } = r;
          i(t, 'Function: ' + (n ? n + '::' : '') + e + '()', r);
        }
      }
      function i(t, e, r = {}) {
        if ((0, n.h)('esri-deprecation-warnings')) {
          const { replacement: n, version: o, see: i, warnOnce: a } = r;
          let c = e;
          n && (c += `\n\t🛠️ Replacement: ${n}`),
            o && (c += `\n\t⚙️ Version: ${o}`),
            i && (c += `\n\t🔗 See ${i} for more details.`),
            (function (t, e, r = !1) {
              (r && s.has(e)) || (r && s.add(e), t.warn(`🛑 DEPRECATED - ${e}`));
            })(t, c, a);
        }
      }
    },
    91306: (t, e, r) => {
      'use strict';
      r.d(e, {
        I: () => N,
        a: () => S,
        b: () => v,
        c: () => M,
        d: () => A,
        e: () => _,
        f: () => j,
        g: () => b,
        h: () => m,
        i: () => P,
        j: () => O,
        k: () => p,
        l: () => a,
        m: () => c,
        n: () => i,
        t: () => k,
      }),
        r(76506);
      const n = r(92143).L.getLogger('esri.core.Accessor');
      function s(t) {
        return null == t ? t : new Date(t);
      }
      function o(t) {
        return null == t ? t : !!t;
      }
      function i(t) {
        return null == t ? t : t.toString();
      }
      function a(t) {
        return null == t ? t : ((t = parseFloat(t)), isNaN(t) ? 0 : t);
      }
      function c(t) {
        return null == t ? t : Math.round(parseFloat(t));
      }
      function l(t) {
        return t && t.constructor && void 0 !== t.constructor.__accessorMetadata__;
      }
      function u(t, e) {
        return null != e && t && !(e instanceof t);
      }
      function h(t) {
        return t && 'isCollection' in t;
      }
      function f(t) {
        return t && t.Type ? ('function' == typeof t.Type ? t.Type : t.Type.base) : null;
      }
      function d(t, e) {
        return (
          !!l(e) &&
          (n.error(
            'Accessor#set',
            "Assigning an instance of '" +
              (e.declaredClass || 'unknown') +
              "' which is not a subclass of '" +
              g(t) +
              "'",
          ),
          !0)
        );
      }
      function p(t, e) {
        return null == e
          ? e
          : h(t)
          ? (function (t, e) {
              if (!e || !e.constructor || !h(e.constructor)) return d(t, e) ? e : new t(e);
              const r = f(t.prototype.itemType),
                n = f(e.constructor.prototype.itemType);
              return r
                ? n
                  ? r === n
                    ? e
                    : r.prototype.isPrototypeOf(n.prototype)
                    ? new t(e)
                    : (d(t, e), e)
                  : new t(e)
                : e;
            })(t, e)
          : u(t, e)
          ? d(t, e)
            ? e
            : new t(e)
          : e;
      }
      function g(t) {
        return (t && t.prototype && t.prototype.declaredClass) || 'unknown';
      }
      function y(t) {
        switch (t) {
          case Number:
            return a;
          case N:
            return c;
          case Boolean:
            return o;
          case String:
            return i;
          case Date:
            return s;
          default:
            return p.bind(null, t);
        }
      }
      function _(t, e) {
        const r = y(t);
        return 1 === arguments.length ? r : r(e);
      }
      function v(t, e, r) {
        return 1 === arguments.length
          ? v.bind(null, t)
          : e
          ? Array.isArray(e)
            ? e.map((e) => t(e, r))
            : [t(e, r)]
          : e;
      }
      function m(t, e) {
        return 1 === arguments.length ? v(_.bind(null, t)) : v(_.bind(null, t), e);
      }
      function w(t, e, r) {
        return 0 !== e && Array.isArray(r) ? r.map((r) => w(t, e - 1, r)) : t(r);
      }
      function b(t, e, r) {
        if (2 === arguments.length) return b.bind(null, t, e);
        if (!r) return r;
        let n = e,
          s = (r = w(t, e, r));
        for (; n > 0 && Array.isArray(s); ) n--, (s = s[0]);
        if (void 0 !== s) for (let t = 0; t < n; t++) r = [r];
        return r;
      }
      function O(t, e, r) {
        return 2 === arguments.length ? b(_.bind(null, t), e) : b(_.bind(null, t), e, r);
      }
      function A(t) {
        return (
          !!Array.isArray(t) &&
          !t.some((e) => {
            const r = typeof e;
            return !('string' === r || 'number' === r || ('function' === r && t.length > 1));
          })
        );
      }
      function j(t, e) {
        if (2 === arguments.length) return j(t).call(null, e);
        const r = new Set(),
          s = t.filter((t) => 'function' != typeof t),
          o = t.filter((t) => 'function' == typeof t);
        for (const e of t) ('string' != typeof e && 'number' != typeof e) || r.add(e);
        let i = null,
          a = null;
        return (t, e) => {
          if (null == t) return t;
          const c = typeof t,
            l = 'string' === c || 'number' === c;
          return (l &&
            (r.has(t) ||
              o.some(
                (t) => ('string' === c && t === String) || ('number' === c && t === Number),
              ))) ||
            ('object' === c && o.some((e) => !u(t, e)))
            ? t
            : (l && s.length
                ? (i || (i = s.map((t) => ('string' == typeof t ? `'${t}'` : `${t}`)).join(', ')),
                  n.error(
                    'Accessor#set',
                    `'${t}' is not a valid value for this property, only the following values are valid: ${i}`,
                  ))
                : 'object' == typeof t && o.length
                ? (a || (a = o.map((t) => g(t)).join(', ')),
                  n.error(
                    'Accessor#set',
                    `'${t}' is not a valid value for this property, value must be one of ${a}`,
                  ))
                : n.error('Accessor#set', `'${t}' is not a valid value for this property`),
              e && (e.valid = !1),
              null);
        };
      }
      function S(t, e) {
        if (2 === arguments.length) return S(t).call(null, e);
        const r = {},
          s = [],
          o = [];
        for (const e in t.typeMap) {
          const n = t.typeMap[e];
          (r[e] = _(n)), s.push(g(n)), o.push(e);
        }
        const i = () => `'${s.join("', '")}'`,
          a = () => `'${o.join("', '")}'`,
          c = 'string' == typeof t.key ? (e) => e[t.key] : t.key;
        return (e) => {
          if (t.base && !u(t.base, e)) return e;
          if (null == e) return e;
          const s = c(e) || t.defaultKeyValue,
            o = r[s];
          if (!o)
            return (
              n.error(
                'Accessor#set',
                `Invalid property value, value needs to be one of ${i()}, or a plain object that can autocast (having .type = ${a()})`,
              ),
              null
            );
          if (!u(t.typeMap[s], e)) return e;
          if ('string' == typeof t.key && !l(e)) {
            const r = {};
            for (const n in e) n !== t.key && (r[n] = e[n]);
            return o(r);
          }
          return o(e);
        };
      }
      class N {}
      const k = {
        native: (t) => ({ type: 'native', value: t }),
        array: (t) => ({ type: 'array', value: t }),
        oneOf: (t) => ({ type: 'one-of', values: t }),
      };
      function P(t) {
        if (!t || !('type' in t)) return !1;
        switch (t.type) {
          case 'native':
          case 'array':
          case 'one-of':
            return !0;
        }
        return !1;
      }
      function M(t) {
        switch (t.type) {
          case 'native':
            return _(t.value);
          case 'array':
            return v(M(t.value));
          case 'one-of':
            return (function (t) {
              let e = null;
              return (r, s) =>
                $(r, t)
                  ? r
                  : (null == e && (e = C(t)),
                    n.error(
                      'Accessor#set',
                      `Invalid property value, value needs to be of type ${e}`,
                    ),
                    s && (s.valid = !1),
                    null);
            })(t);
          default:
            return null;
        }
      }
      function C(t) {
        switch (t.type) {
          case 'native':
            switch (t.value) {
              case Number:
                return 'number';
              case String:
                return 'string';
              case Boolean:
                return 'boolean';
              case N:
                return 'integer';
              case Date:
                return 'date';
              default:
                return g(t.value);
            }
          case 'array':
            return `array of ${C(t.value)}`;
          case 'one-of': {
            const e = t.values.map((t) => C(t));
            return `one of ${e.slice(0, e.length - 1)} or ${e[e.length - 1]}`;
          }
        }
        return 'unknown';
      }
      function $(t, e) {
        if (null == t) return !0;
        switch (e.type) {
          case 'native':
            switch (e.value) {
              case Number:
              case N:
                return 'number' == typeof t;
              case Boolean:
                return 'boolean' == typeof t;
              case String:
                return 'string' == typeof t;
            }
            return t instanceof e.value;
          case 'array':
            return !!Array.isArray(t) && !t.some((t) => !$(t, e.value));
          case 'one-of':
            return e.values.some((e) => $(t, e));
        }
      }
    },
    22723: (t, e, r) => {
      'use strict';
      r.d(e, { h: () => s, m: () => o });
      var n = r(76506);
      function s(t) {
        return o(() => t.forEach((t) => (0, n.i)(t) && t.remove()));
      }
      function o(t) {
        return {
          remove: () => {
            t && (t(), (t = void 0));
          },
        };
      }
    },
    57251: (t, e, r) => {
      'use strict';
      r.d(e, { J: () => s, s: () => o });
      var n = r(71552);
      class s {
        constructor(t, e = { ignoreUnknown: !1 }) {
          (this.jsonToAPI = t),
            (this.options = e),
            (this.apiValues = []),
            (this.jsonValues = []),
            (this.apiToJSON = this.invertMap(t)),
            (this.apiValues = this.getKeysSorted(this.apiToJSON)),
            (this.jsonValues = this.getKeysSorted(this.jsonToAPI)),
            (this.read = (t) => this.fromJSON(t)),
            (this.write = (t, e, r) => {
              const s = this.toJSON(t);
              void 0 !== s && (0, n.s)(r, s, e);
            }),
            (this.write.isJSONMapWriter = !0);
        }
        toJSON(t) {
          return this.apiToJSON.hasOwnProperty(t)
            ? this.apiToJSON[t]
            : this.options.ignoreUnknown
            ? void 0
            : t;
        }
        fromJSON(t) {
          return this.jsonToAPI.hasOwnProperty(t)
            ? this.jsonToAPI[t]
            : this.options.ignoreUnknown
            ? void 0
            : t;
        }
        invertMap(t) {
          const e = {};
          for (const r in t) e[t[r]] = r;
          return e;
        }
        getKeysSorted(t) {
          const e = [];
          for (const r in t) e.push(r);
          return e.sort(), e;
        }
      }
      function o() {
        return function (t) {
          return new s(t, { ignoreUnknown: !0 });
        };
      }
    },
    86656: (t, e, r) => {
      'use strict';
      r.d(e, {
        a: () => y,
        b: () => g,
        c: () => l,
        d: () => f,
        e: () => a,
        g: () => o,
        i: () => i,
        m: () => _,
        o: () => d,
        p: () => u,
      });
      var n = r(76506),
        s = r(22723);
      function o(t) {
        return t ? (t.__accessor__ ? t.__accessor__ : t.propertyInvalidated ? t : null) : null;
      }
      function i(t, e) {
        return null != t && t.metadatas && null != t.metadatas[e];
      }
      function a(t, e, r) {
        return c(t, e, r ? { policy: r, path: '' } : null);
      }
      function c(t, e, r) {
        return e
          ? Object.keys(e).reduce(function (t, s) {
              let o = null,
                i = 'merge';
              if ((r && ((o = r.path ? `${r.path}.${s}` : s), (i = r.policy(o))), 'replace' === i))
                return (t[s] = e[s]), t;
              if (void 0 === t[s]) return (t[s] = (0, n.d9)(e[s])), t;
              let a = t[s],
                l = e[s];
              if (a === l) return t;
              if (Array.isArray(l) || Array.isArray(t))
                (a = a ? (Array.isArray(a) ? (t[s] = a.concat()) : (t[s] = [a])) : (t[s] = [])),
                  l &&
                    (Array.isArray(l) || (l = [l]),
                    l.forEach((t) => {
                      -1 === a.indexOf(t) && a.push(t);
                    }));
              else if (l && 'object' == typeof l)
                if (r) {
                  const e = r.path;
                  (r.path = (0, n.a)(o)), (t[s] = c(a, l, r)), (r.path = e);
                } else t[s] = c(a, l, null);
              else (t.hasOwnProperty(s) && !e.hasOwnProperty(s)) || (t[s] = l);
              return t;
            }, t || {})
          : t;
      }
      function l(t) {
        return t ? ('string' == typeof t && -1 === t.indexOf('.') ? t : u(t)) : t;
      }
      function u(t) {
        return Array.isArray(t) ? t : t.split('.');
      }
      function h(t) {
        return t.indexOf(',') > -1 ? t.split(',').map((t) => t.trim()) : [t.trim()];
      }
      function f(t, e, r, n) {
        const o = (function (t) {
          if (Array.isArray(t)) {
            const e = [];
            for (const r of t) e.push(...h(r));
            return e;
          }
          return h(t);
        })(e);
        if (1 !== o.length) {
          const e = o.map((e) => n(t, e, r));
          return (0, s.h)(e);
        }
        return n(t, o[0], r);
      }
      function d(t) {
        let e = !1;
        return () => {
          e || ((e = !0), t());
        };
      }
      class p {
        constructor(t) {
          (this.autoDestroy = !1), (this.properties = t);
        }
      }
      function g(t) {
        let e = t.constructor.__accessorMetadata__;
        const r = Object.prototype.hasOwnProperty.call(t.constructor, '__accessorMetadata__');
        if (e) {
          if (!r) {
            const r = Object.create(e.properties),
              s = e.autoDestroy;
            for (const t in r) r[t] = (0, n.d9)(r[t]);
            (e = new p(r)),
              (e.autoDestroy = s),
              Object.defineProperty(t.constructor, '__accessorMetadata__', {
                value: e,
                enumerable: !1,
                configurable: !0,
                writable: !0,
              });
          }
        } else
          (e = new p({})),
            Object.defineProperty(t.constructor, '__accessorMetadata__', {
              value: e,
              enumerable: !1,
              configurable: !0,
              writable: !0,
            });
        return (0, n.a)(t.constructor.__accessorMetadata__);
      }
      function y(t, e) {
        const r = (function (t) {
          return g(t).properties;
        })(t);
        let n = r[e];
        return n || (n = r[e] = {}), n;
      }
      function _(t, e) {
        return a(t, e, m);
      }
      const v = /^(?:[^.]+\.)?(?:value|type|(?:json\.type|json\.origins\.[^.]\.type))$/;
      function m(t) {
        return v.test(t) ? 'replace' : 'merge';
      }
    },
    29768: (t, e, r) => {
      'use strict';
      function n(t, e, r, n) {
        var s,
          o = arguments.length,
          i = o < 3 ? e : null === n ? (n = Object.getOwnPropertyDescriptor(e, r)) : n;
        if ('object' == typeof Reflect && 'function' == typeof Reflect.decorate)
          i = Reflect.decorate(t, e, r, n);
        else
          for (var a = t.length - 1; a >= 0; a--)
            (s = t[a]) && (i = (o < 3 ? s(i) : o > 3 ? s(e, r, i) : s(e, r)) || i);
        return o > 3 && i && Object.defineProperty(e, r, i), i;
      }
      r.d(e, { _: () => n });
    },
    26341: (t, e, r) => {
      'use strict';
      r.d(e, { a: () => g, b: () => m, r: () => p, w: () => w });
      var n = r(34250),
        s = r(86656),
        o = r(17533),
        i = r(27794),
        a = r(60991),
        c = r(92143),
        l = r(21972);
      function u(t, e, r) {
        if (!t || !t.read || !1 === t.read.enabled || !t.read.source) return !1;
        const s = t.read.source;
        if ('string' == typeof s) {
          if (s === e) return !0;
          if (s.indexOf('.') > -1 && 0 === s.indexOf(e) && (0, n.e)(s, r)) return !0;
        } else
          for (const t of s) {
            if (t === e) return !0;
            if (t.indexOf('.') > -1 && 0 === t.indexOf(e) && (0, n.e)(t, r)) return !0;
          }
        return !1;
      }
      function h(t, e, r, n, s) {
        let i = (0, o.o)(e[r], s);
        (function (t) {
          return t && (!t.read || (!1 !== t.read.enabled && !t.read.source));
        })(i) && (t[r] = !0);
        for (const a of Object.getOwnPropertyNames(e))
          (i = (0, o.o)(e[a], s)), u(i, r, n) && (t[a] = !0);
      }
      function f(t, e, r, n) {
        const s = r.metadatas,
          i = (0, o.b)(s[e], 'any', n),
          a = i && i.default;
        if (void 0 === a) return;
        const c = 'function' == typeof a ? a.call(t, e, n) : a;
        void 0 !== c && r.set(e, c);
      }
      const d = { origin: 'service' };
      function p(t, e, r = d) {
        if (!e || 'object' != typeof e) return;
        const i = (0, s.g)(t),
          a = i.metadatas,
          c = {};
        for (const t of Object.getOwnPropertyNames(e)) h(c, a, t, e, r);
        i.setDefaultOrigin(r.origin);
        for (const s of Object.getOwnPropertyNames(c)) {
          const c = (0, o.o)(a[s], r).read,
            l = c && c.source;
          let u;
          (u = l && 'string' == typeof l ? (0, n.v)(e, l) : e[s]),
            c && c.reader && (u = c.reader.call(t, u, e, r)),
            void 0 !== u && i.set(s, u);
        }
        if (!r || !r.ignoreDefaults)
          for (const e of Object.getOwnPropertyNames(a)) c[e] || f(t, e, i, r);
        i.setDefaultOrigin('user');
      }
      function g(t, e, r, n = d) {
        var s;
        const o = { ...n, messages: [] };
        r(o),
          null == (s = o.messages) ||
            s.forEach((e) => {
              'warning' !== e.type || t.loaded
                ? n && n.messages && n.messages.push(e)
                : t.loadWarnings.push(e);
            });
      }
      const y = c.L.getLogger('esri.core.accessorSupport.write');
      function _(t, e, r, n, s) {
        var o, i;
        const a = {};
        return null == (o = e.write) || null == (i = o.writer) || i.call(t, n, a, r, s), a;
      }
      function v(t, e, r, n, s, o) {
        if (!n || !n.write) return !1;
        const c = t.get(r);
        if (!s && n.write.overridePolicy) {
          const e = n.write.overridePolicy.call(t, c, r, o);
          void 0 !== e && (s = e);
        }
        if ((s || (s = n.write), !s || !1 === s.enabled)) return !1;
        if (((null === c && !s.allowNull) || void 0 === c) && s.isRequired) {
          const e = new a.Z(
            'web-document-write:property-required',
            `Missing value for required property '${r}' on '${t.declaredClass}'`,
            { propertyName: r, target: t },
          );
          return (
            e && o && o.messages ? o.messages.push(e) : e && !o && y.error(e.name, e.message), !1
          );
        }
        return !(
          void 0 === c ||
          (null === c && !s.allowNull) ||
          (function (t, e, r, n, s) {
            const o = n.default;
            if (void 0 === o) return !1;
            if (null != n.defaultEquals) return n.defaultEquals(s);
            if ('function' == typeof o) {
              if (Array.isArray(s)) {
                const n = o.call(t, e, r);
                return (0, i.e)(n, s);
              }
              return !1;
            }
            return o === s;
          })(t, r, o, n, c) ||
          (void 0 === n.default &&
            !s.ignoreOrigin &&
            o &&
            o.origin &&
            e.store.originOf(r) < (0, l.n)(o.origin))
        );
      }
      function m(t, e, r, n) {
        const i = (0, s.g)(t),
          a = i.metadatas,
          c = (0, o.c)(a[e], n);
        return !!c && v(t, i, e, c, r, n);
      }
      function w(t, e, r) {
        if (t && 'function' == typeof t.toJSON && (!t.toJSON.isDefaultToJSON || !t.write))
          return (0, s.e)(e, t.toJSON());
        const n = (0, s.g)(t),
          i = n.metadatas;
        for (const u in i) {
          const h = (0, o.c)(i[u], r);
          if (!v(t, n, u, h, void 0, r)) continue;
          const f = t.get(u),
            d = _(t, h, h.write && 'string' == typeof h.write.target ? h.write.target : u, f, r);
          var a, c;
          Object.keys(d).length > 0 &&
            ((e = (0, s.e)(e, d)),
            null != r &&
              null != (a = r.resources) &&
              null != (c = a.pendingOperations) &&
              c.length &&
              Promise.all(r.resources.pendingOperations).then(() => (0, s.e)(e, d)),
            r &&
              r.writtenProperties &&
              r.writtenProperties.push({
                target: t,
                propName: u,
                oldOrigin: (0, l.i)(n.store.originOf(u)),
                newOrigin: r.origin,
              }));
        }
        return e;
      }
    },
    21972: (t, e, r) => {
      'use strict';
      r.d(e, {
        Z: () => R,
        O: () => f,
        S: () => j,
        a: () => P,
        b: () => p,
        c: () => y,
        i: () => _,
        n: () => g,
        r: () => k,
      });
      var n = r(23639),
        s = r(92143),
        o = r(34250),
        i = r(86656),
        a = r(76506),
        c = r(91055),
        l = r(17533),
        u = r(27794),
        h = r(6906);
      r(31450), r(71552), r(40642), r(91306), r(22723), r(81172), r(50406), r(60991);
      class f {
        constructor(t, e) {
          (this._observers = t), (this._observer = e);
        }
        remove() {
          (0, u.b)(this._observers, this._observer);
        }
      }
      class d {
        constructor(t, e, r) {
          (this.properties = t),
            (this.propertyName = e),
            (this.metadata = r),
            (this._observers = null),
            (this._accessed = null),
            (this._handles = null),
            (this.flags =
              1 |
              (r.nonNullable ? 8 : 0) |
              (r.hasOwnProperty('value') ? 16 : 0) |
              (void 0 === r.get ? 32 : 0) |
              (void 0 === r.dependsOn ? 64 : 0));
        }
        destroy() {
          (this._accessed = null), (this._observers = null), this._clearObservationHandles();
        }
        getComputed() {
          (0, l.t)(this);
          const t = this.properties.store,
            e = this.propertyName,
            r = this.flags,
            n = t.get(e);
          if (4 & r) return n;
          if (1 & ~r && t.has(e)) return n;
          this.flags |= 4;
          const s = this.properties.host;
          let o;
          64 & r
            ? (o = (0, l.r)(this, this.metadata.get, s))
            : ((0, l.a)(s, this), (o = this.metadata.get.call(s))),
            t.set(e, o, 1);
          const i = t.get(e);
          return i === n ? (this.flags &= -2) : this.commit(), (this.flags &= -5), i;
        }
        onObservableAccessed(t) {
          t !== this &&
            (null === this._accessed && (this._accessed = []),
            this._accessed.includes(t) || this._accessed.push(t));
        }
        onTrackingEnd() {
          this._clearObservationHandles(), (this.flags |= 32);
          const t = this._accessed;
          if (null === t) return;
          let e = this._handles;
          null === e && (e = this._handles = []);
          for (let r = 0; r < t.length; ++r) e.push(t[r].observe(this));
          t.length = 0;
        }
        observe(t) {
          return (
            null === this._observers && (this._observers = []),
            this._observers.includes(t) || this._observers.push(t),
            new f(this._observers, t)
          );
        }
        notifyChange() {
          this.onInvalidated(), this.onCommitted();
        }
        invalidate() {
          this.onInvalidated();
        }
        onInvalidated() {
          2 & ~this.flags && (this.flags |= 1);
          const t = this._observers;
          if (null !== t) for (let e = 0; e < t.length; ++e) t[e].onInvalidated();
        }
        commit() {
          (this.flags &= -2), this.onCommitted();
        }
        onCommitted() {
          if (null === this._observers) return;
          const t = this._observers.slice();
          for (let e = 0; e < t.length; ++e) t[e].onCommitted();
        }
        _clearObservationHandles() {
          const t = this._handles;
          if (null !== t) {
            for (let e = 0; e < t.length; ++e) t[e].remove();
            t.length = 0;
          }
        }
      }
      const p = 7;
      function g(t) {
        switch (t) {
          case 'defaults':
            return 0;
          case 'service':
            return 2;
          case 'portal-item':
            return 3;
          case 'web-scene':
            return 4;
          case 'web-map':
            return 5;
          case 'user':
            return 6;
        }
      }
      function y(t) {
        switch (t) {
          case 0:
            return 'defaults';
          case 2:
            return 'service';
          case 3:
            return 'portal-item';
          case 4:
            return 'web-scene';
          case 5:
            return 'web-map';
          case 6:
            return 'user';
        }
        return (0, a.a)(void 0);
      }
      function _(t) {
        return y(t);
      }
      class v {
        constructor() {
          this._values = new Map();
        }
        clone(t) {
          const e = new v();
          return (
            this._values.forEach((r, n) => {
              (t && t.has(n)) || e.set(n, (0, a.d9)(r));
            }),
            e
          );
        }
        get(t) {
          return this._values.get(t);
        }
        originOf() {
          return 6;
        }
        keys() {
          return [...this._values.keys()];
        }
        set(t, e) {
          this._values.set(t, e);
        }
        delete(t) {
          this._values.delete(t);
        }
        has(t) {
          return this._values.has(t);
        }
        forEach(t) {
          this._values.forEach(t);
        }
      }
      function m(t, e, r) {
        return void 0 !== t;
      }
      function w(t, e, r, n) {
        return !(void 0 === t || (null == r && 8 & t.flags && (n.lifecycle, 1)));
      }
      s.L.getLogger('esri.core.accessorSupport.Properties');
      class b {
        constructor(t) {
          (this.host = t),
            (this.properties = new Map()),
            (this.ctorArgs = null),
            (this.destroyed = !1),
            (this.lifecycle = 0),
            (this.store = new v()),
            (this._origin = 6);
          const e = this.host.constructor.__accessorMetadata__,
            r = e.properties;
          for (const t in r) {
            const e = new d(this, t, r[t]);
            this.properties.set(t, e);
          }
          (this.metadatas = r), (this._autoDestroy = e.autoDestroy);
        }
        initialize() {
          this.lifecycle = 1;
        }
        constructed() {
          this.lifecycle = 2;
        }
        destroy() {
          if (((this.destroyed = !0), this._autoDestroy))
            for (const [e, r] of this.properties) {
              const n = this.internalGet(e);
              n &&
                (t = n) &&
                'function' == typeof t.destroy &&
                (n.destroy(), 8 & ~r.flags && this._internalSet(r, null)),
                r.destroy();
            }
          else for (const [t, e] of this.properties) e.destroy();
          var t;
        }
        get initialized() {
          return 0 !== this.lifecycle;
        }
        get(t) {
          const e = this.properties.get(t);
          if (e.metadata.get) return e.getComputed();
          (0, l.t)(e);
          const r = this.store;
          return r.has(t) ? r.get(t) : e.metadata.value;
        }
        originOf(t) {
          const e = this.store.originOf(t);
          if (void 0 === e) {
            const e = this.properties.get(t);
            if (void 0 !== e && 16 & e.flags) return 'defaults';
          }
          return y(e);
        }
        has(t) {
          return !!this.properties.has(t) && this.store.has(t);
        }
        keys() {
          return [...this.properties.keys()];
        }
        internalGet(t) {
          const e = this.properties.get(t);
          if (m(e)) return this.store.has(t) ? this.store.get(t) : e.metadata.value;
        }
        internalSet(t, e) {
          const r = this.properties.get(t);
          m(r) && this._internalSet(r, e);
        }
        getDependsInfo(t, e, r) {
          const n = this.properties.get(e);
          if (!m(n)) return '';
          const s = new Set(),
            o = (0, l.r)({ onObservableAccessed: (t) => s.add(t), onTrackingEnd: () => {} }, () => {
              var e;
              return null == (e = n.metadata.get) ? void 0 : e.call(t);
            });
          let a = `${r}${t.declaredClass.split('.').pop()}.${e}: ${o}\n`;
          if (0 === s.size) return a;
          r += '  ';
          for (const t of s) {
            if (!(t instanceof d)) continue;
            const e = t.properties.host,
              n = t.propertyName,
              s = (0, i.g)(e);
            a += s ? s.getDependsInfo(e, n, r) : `${r}${n}: undefined\n`;
          }
          return a;
        }
        setAtOrigin(t, e, r) {
          const n = this.properties.get(t);
          if (m(n)) return this._setAtOrigin(n, e, r);
        }
        isOverridden(t) {
          const e = this.properties.get(t);
          return void 0 !== e && !!(2 & e.flags);
        }
        clearOverride(t) {
          const e = this.properties.get(t);
          void 0 !== e && 2 & e.flags && ((e.flags &= -3), e.notifyChange());
        }
        override(t, e) {
          const r = this.properties.get(t);
          if (!w(r, 0, e, this)) return;
          const n = r.metadata.cast;
          if (n) {
            const t = this._cast(n, e),
              { valid: r, value: s } = t;
            if ((O.release(t), !r)) return;
            e = s;
          }
          (r.flags |= 2), this._internalSet(r, e);
        }
        set(t, e) {
          const r = this.properties.get(t);
          if (!w(r, 0, e, this)) return;
          const n = r.metadata.cast;
          if (n) {
            const t = this._cast(n, e),
              { valid: r, value: s } = t;
            if ((O.release(t), !r)) return;
            e = s;
          }
          const s = r.metadata.set;
          s ? s.call(this.host, e) : this._internalSet(r, e);
        }
        setDefaultOrigin(t) {
          this._origin = g(t);
        }
        getDefaultOrigin() {
          return y(this._origin);
        }
        notifyChange(t) {
          const e = this.properties.get(t);
          void 0 !== e && e.notifyChange();
        }
        invalidate(t) {
          const e = this.properties.get(t);
          void 0 !== e && e.invalidate();
        }
        commit(t) {
          const e = this.properties.get(t);
          void 0 !== e && e.commit();
        }
        _internalSet(t, e) {
          const r = 0 !== this.lifecycle ? this._origin : 0;
          this._setAtOrigin(t, e, r);
        }
        _setAtOrigin(t, e, r) {
          const n = this.store,
            s = t.propertyName;
          (n.has(s, r) && (0, a.fS)(e, n.get(s)) && 2 & ~t.flags && r === n.originOf(s)) ||
            (t.invalidate(), n.set(s, e, r), t.commit(), (0, l.i)(this.host, t));
        }
        _cast(t, e) {
          const r = O.acquire();
          return (r.valid = !0), (r.value = e), t && (r.value = t.call(this.host, e, r)), r;
        }
      }
      const O = new c.O(
        class {
          constructor() {
            (this.value = null), (this.valid = !0);
          }
          acquire() {
            this.valid = !0;
          }
          release() {
            this.value = null;
          }
        },
      );
      class A extends c.O {
        constructor() {
          super(...arguments), (this._set = new Set());
        }
        destroy() {
          super.destroy(), (this._set = (0, a.n)(this._set));
        }
        acquire(...t) {
          const e = super.acquire(...t);
          return this._set.delete(e), e;
        }
        release(t) {
          t && !this._set.has(t) && (super.release(t), this._set.add(t));
        }
        _dispose(t) {
          this._set.delete(t), super._dispose(t);
        }
      }
      class j {
        constructor(t) {
          (this._notify = t), (this._accessed = []), (this._handles = []), (this._invalidCount = 0);
        }
        destroy() {
          (this._accessed.length = 0), this.clear();
        }
        onInvalidated() {
          this._invalidCount++;
        }
        onCommitted() {
          const t = this._invalidCount;
          if (1 === t) return (this._invalidCount = 0), void this._notify();
          this._invalidCount = t > 0 ? t - 1 : 0;
        }
        onObservableAccessed(t) {
          this._accessed.includes(t) || this._accessed.push(t);
        }
        onTrackingEnd() {
          const t = this._handles,
            e = this._accessed;
          for (let r = 0; r < e.length; ++r) t.push(e[r].observe(this));
          e.length = 0;
        }
        clear() {
          const t = this._handles;
          for (let e = 0; e < t.length; ++e) t[e].remove();
          t.length = 0;
        }
      }
      let S = !1;
      const N = [];
      function k(t, e, r = { runImmediately: !1 }) {
        let n = new j(function r() {
            if (!n || o) return;
            if (S) return void M(r);
            const i = s;
            n.clear(), (S = !0), (o = !0), (s = (0, l.r)(n, t)), (o = !1), (S = !1), e(s, i), C();
          }),
          s = null,
          o = !1;
        return (
          (o = !0),
          (s = (0, l.r)(n, t)),
          (o = !1),
          r.runImmediately && e(s, s),
          {
            remove: function () {
              n && (n.destroy(), (n = null), (s = null));
            },
          }
        );
      }
      function P(t) {
        let e = new j(function n() {
            e &&
              !r &&
              (S ? M(n) : (e.clear(), (S = !0), (r = !0), (0, l.r)(e, t), (r = !1), (S = !1), C()));
          }),
          r = !1;
        return (
          (r = !0),
          (0, l.r)(e, t),
          (r = !1),
          {
            remove: function () {
              e && (e.destroy(), (e = null));
            },
          }
        );
      }
      function M(t) {
        N.includes(t) || N.unshift(t);
      }
      function C() {
        for (; N.length; ) N.pop()();
      }
      class $ {
        constructor() {
          (this.uid = 0),
            (this.target = null),
            (this.path = null),
            (this.oldValue = null),
            (this.callback = null),
            (this.getValue = null),
            (this.removed = !1),
            (this.propertyPath = null);
        }
        acquire(t, e, r, n, s) {
          (this.target = t),
            (this.path = e),
            (this.oldValue = r),
            (this.callback = n),
            (this.getValue = s),
            (this.propertyPath = (0, i.c)(e)),
            (this.uid = ++$.uid),
            (this.removed = !1);
        }
        release() {
          (this.target = this.path = this.propertyPath = this.callback = this.oldValue = null),
            (this.uid = ++$.uid),
            (this.removed = !0);
        }
      }
      ($.pool = new A($)), ($.uid = 0);
      const T = new c.A(),
        x = new Set();
      let I;
      function E(t) {
        x.delete(t), x.add(t), I || (I = (0, h.Os)(D));
      }
      function z(t) {
        if (t.removed) return;
        const { callback: e, path: r, oldValue: n, target: s } = t,
          o = t.getValue();
        J(n, o) && ((t.oldValue = o), e.call(s, o, n, r, s));
      }
      function J(t, e) {
        return !(0, a.fS)(t, e);
      }
      function D() {
        let t = 10;
        for (; I && t--; ) {
          I = null;
          const t = q(),
            e = T.acquire();
          for (const r of t) {
            const t = r.uid;
            z(r), t === r.uid && r.removed && e.push(r);
          }
          for (const t of x) t.removed && (e.push(t), x.delete(t));
          for (let t = 0; t < e.length; t++) $.pool.release(e[t]);
          T.release(e), T.release(t), F.forEach((t) => t());
        }
      }
      function q() {
        const t = T.acquire();
        t.length = x.size;
        let e = 0;
        for (const r of x) (t[e] = r), ++e;
        return x.clear(), t;
      }
      const F = new Set();
      function L(t) {
        if (null == t) return { value: t };
        if (Array.isArray(t)) return { type: [t[0]], value: null };
        switch (typeof t) {
          case 'object':
            return (t.constructor && t.constructor.__accessorMetadata__) || t instanceof Date
              ? { type: t.constructor, value: t }
              : t;
          case 'boolean':
            return { type: Boolean, value: t };
          case 'string':
            return { type: String, value: t };
          case 'number':
            return { type: Number, value: t };
          case 'function':
            return { type: t, value: null };
          default:
            return;
        }
      }
      class V {
        constructor(...t) {
          if (this.constructor === V)
            throw new Error(
              '[accessor] cannot instantiate Accessor. This can be fixed by creating a subclass of Accessor',
            );
          Object.defineProperty(this, '__accessor__', { enumerable: !1, value: new b(this) }),
            t.length > 0 &&
              this.normalizeCtorArgs &&
              (this.__accessor__.ctorArgs = this.normalizeCtorArgs.apply(this, t));
        }
        static createSubclass(t = {}) {
          if (Array.isArray(t)) throw new Error('Multi-inheritance unsupported since 4.16');
          const { properties: e, declaredClass: r, constructor: n } = t;
          delete t.declaredClass, delete t.properties, delete t.constructor;
          const s = this;
          class a extends s {
            constructor(...t) {
              super(...t), (this.inherited = null), n && n.apply(this, t);
            }
          }
          (0, i.b)(a.prototype);
          for (const e in t) {
            const r = t[e];
            a.prototype[e] =
              'function' == typeof r
                ? function (...t) {
                    const n = this.inherited;
                    let o;
                    this.inherited = function (...t) {
                      if (s.prototype[e]) return s.prototype[e].apply(this, t);
                    };
                    try {
                      o = r.apply(this, t);
                    } catch (t) {
                      throw ((this.inherited = n), t);
                    }
                    return (this.inherited = n), o;
                  }
                : t[e];
          }
          for (const t in e) {
            const r = L(e[t]);
            (0, o.Cb)(r)(a.prototype, t);
          }
          return (0, l.j)(r)(a);
        }
        postscript(t) {
          const e = this.__accessor__,
            r = e.ctorArgs || t;
          e.initialize(),
            r && (this.set(r), (e.ctorArgs = null)),
            e.constructed(),
            this.initialize();
        }
        initialize() {}
        destroy() {
          this.destroyed ||
            ((function (t) {
              for (const e of x.values()) e.target === t && (e.removed = !0);
            })(this),
            this.__accessor__.destroy());
        }
        get initialized() {
          return (this.__accessor__ && this.__accessor__.initialized) || !1;
        }
        get constructed() {
          return (this.__accessor__ && 2 === this.__accessor__.lifecycle) || !1;
        }
        get destroyed() {
          return (this.__accessor__ && this.__accessor__.destroyed) || !1;
        }
        commitProperty(t) {
          this.get(t);
        }
        get(t) {
          return (0, o.g)(this, t);
        }
        hasOwnProperty(t) {
          return this.__accessor__
            ? this.__accessor__.has(t)
            : Object.prototype.hasOwnProperty.call(this, t);
        }
        isInstanceOf(t) {
          return (
            (0, n.d)(s.L.getLogger(this.declaredClass), 'isInstanceOf', {
              replacement: 'Use instanceof directly',
              version: '4.16',
            }),
            this instanceof t
          );
        }
        keys() {
          return this.__accessor__ ? this.__accessor__.keys() : [];
        }
        set(t, e) {
          return (0, o.s)(this, t, e), this;
        }
        watch(t, e, r) {
          return (function (t, e, r, n = !1) {
            return !t.__accessor__ || t.__accessor__.destroyed
              ? { remove() {} }
              : n
              ? (function (t, e, r) {
                  const n = (0, i.d)(t, e, r, (t, e, r) => {
                    let s = !1;
                    return k(
                      () => (0, o.v)(t, e),
                      (o, i) => {
                        t.__accessor__.destroyed
                          ? n.remove()
                          : s || ((s = !0), J(i, o) && r.call(t, o, i, e, t), (s = !1));
                      },
                    );
                  });
                  return n;
                })(t, e, r)
              : (function (t, e, r) {
                  let n = (0, i.d)(t, e, r, (t, e, r) => {
                    let s,
                      a,
                      c = (function (t, e) {
                        let r = new j(function () {
                            e(n, s);
                          }),
                          n = null;
                        function s() {
                          return r ? (r.clear(), (n = (0, l.r)(r, t)), n) : null;
                        }
                        return (
                          s(),
                          {
                            remove: function () {
                              r && (r.destroy(), (r = null)), (n = null);
                            },
                          }
                        );
                      })(
                        () => (0, o.v)(t, e),
                        (o, i) => {
                          t.__accessor__.destroyed || (s && s.uid !== a)
                            ? n.remove()
                            : (s || ((s = $.pool.acquire(t, e, o, r, i)), (a = s.uid)), E(s));
                        },
                      );
                    return {
                      remove: (0, i.o)(function () {
                        c.remove(),
                          s && (s.uid !== a || s.removed || ((s.removed = !0), E(s)), (s = null)),
                          (n = c = null);
                      }),
                    };
                  });
                  return n;
                })(t, e, r);
          })(this, t, e, r);
        }
        _clearOverride(t) {
          return this.__accessor__.clearOverride(t);
        }
        _override(t, e) {
          return this.__accessor__.override(t, e);
        }
        _isOverridden(t) {
          return this.__accessor__.isOverridden(t);
        }
        notifyChange(t) {
          this.__accessor__.notifyChange(t);
        }
        _get(t) {
          return this.__accessor__.internalGet(t);
        }
        _set(t, e) {
          return this.__accessor__.internalSet(t, e), this;
        }
      }
      const R = V;
    },
    86787: (t, e, r) => {
      'use strict';
      r.d(e, { p: () => c });
      var n = r(91306),
        s = r(86656);
      r(76506), r(92143), r(31450), r(71552), r(40642), r(22723);
      const o = Object.prototype.toString;
      function i(t) {
        const e = '__accessorMetadata__' in t ? (0, n.e)(t) : t;
        return function (...t) {
          if ((t.push(e), 'number' == typeof t[2]))
            throw new Error('Using @cast has parameter decorator is not supported since 4.16');
          return a.apply(this, t);
        };
      }
      function a(t, e, r, n) {
        (0, s.a)(t, e).cast = n;
      }
      function c(...t) {
        var e;
        if (3 !== t.length || 'string' != typeof t[1])
          return 1 === t.length && '[object Function]' === o.call(t[0])
            ? i(t[0])
            : 1 === t.length && 'string' == typeof t[0]
            ? ((e = t[0]),
              function (t, r) {
                (0, s.a)(t, e).cast = t[r];
              })
            : void 0;
      }
    },
    34250: (t, e, r) => {
      'use strict';
      r.d(e, {
        e: () => u,
        Eg: () => g,
        g: () => l,
        Cb: () => d,
        CJ: () => p,
        s: () => h,
        v: () => c,
      });
      var n = r(92143),
        s = r(91306),
        o = r(86656);
      function i(t, e) {
        const r = '?' === t[t.length - 1] ? t.slice(0, -1) : t;
        if (null != e.getItemAt || Array.isArray(e)) {
          const t = parseInt(r, 10);
          if (!isNaN(t)) return Array.isArray(e) ? e[t] : e.getItemAt(t);
        }
        const n = (0, o.g)(e);
        return (0, o.i)(n, r) ? n.get(r) : e[r];
      }
      function a(t, e, r) {
        if (null == t) return t;
        const n = i(e[r], t);
        return !n && r < e.length - 1 ? void 0 : r === e.length - 1 ? n : a(n, e, r + 1);
      }
      function c(t, e, r = 0) {
        return 'string' == typeof e && -1 === e.indexOf('.') ? i(e, t) : a(t, (0, o.p)(e), r);
      }
      function l(t, e) {
        return c(t, e);
      }
      function u(t, e) {
        return void 0 !== c(e, t);
      }
      function h(t, e, r) {
        if (t && e)
          if ('object' == typeof e) for (const r of Object.getOwnPropertyNames(e)) h(t, r, e[r]);
          else {
            if (-1 !== e.indexOf('.')) {
              const n = e.split('.'),
                s = n.splice(n.length - 1, 1)[0];
              return void h(l(t, n), s, r);
            }
            t[e] = r;
          }
      }
      r(76506),
        r(31450),
        r(71552),
        r(40642),
        r(22723),
        n.L.getLogger('esri.core.accessorSupport.set');
      const f = n.L.getLogger('esri.core.accessorSupport.decorators.property');
      function d(t = {}) {
        return (e, r, n) => {
          if (e === Function.prototype)
            throw new Error(
              `Inappropriate use of @property() on a static field: ${e.name}.${r}. Accessor does not support static properties.`,
            );
          const i = (0, o.a)(e, r);
          n &&
            (n.get || n.set
              ? ((i.get = n.get || i.get), (i.set = n.set || i.set))
              : 'value' in n &&
                ('value' in t &&
                  f.warn(
                    `@property() will redefine the value of "${r}" on "${e.constructor.name}" already defined in the metadata`,
                    t,
                  ),
                (i.value = t.value = n.value))),
            null != t.readOnly && (i.readOnly = t.readOnly);
          const a = t.aliasOf;
          if (a) {
            const t = 'string' == typeof a ? a : a.source,
              e = 'string' == typeof a ? null : !0 === a.overridable;
            let n;
            (i.dependsOn = [t]),
              (i.get = function () {
                let e = l(this, t);
                if ('function' == typeof e) {
                  n || (n = t.split('.').slice(0, -1).join('.'));
                  const r = l(this, n);
                  r && (e = e.bind(r));
                }
                return e;
              }),
              i.readOnly ||
                (i.set = e
                  ? function (t) {
                      void 0 !== t ? this._override(r, t) : this._clearOverride(r);
                    }
                  : function (e) {
                      h(this, t, e);
                    });
          }
          const c = t.type,
            u = t.types;
          i.cast ||
            (c
              ? (i.cast = (function (t) {
                  let e = 0,
                    r = t;
                  if ((0, s.i)(t)) return (0, s.c)(t);
                  for (
                    ;
                    Array.isArray(r) &&
                    1 === r.length &&
                    'string' != typeof r[0] &&
                    'number' != typeof r[0];

                  )
                    (r = r[0]), e++;
                  const n = r;
                  if ((0, s.d)(n)) return 0 === e ? (0, s.f)(n) : (0, s.g)((0, s.f)(n), e);
                  if (1 === e) return (0, s.h)(n);
                  if (e > 1) return (0, s.j)(n, e);
                  const o = t;
                  return o.from ? o.from : (0, s.e)(o);
                })(c))
              : u &&
                (Array.isArray(u) ? (i.cast = (0, s.b)((0, s.a)(u[0]))) : (i.cast = (0, s.a)(u)))),
            t.range && (i.cast = g(i.cast, t.range)),
            (0, o.m)(i, t);
        };
      }
      function p(t, e, r) {
        const n = (0, o.a)(t, r);
        n.json || (n.json = {});
        let s = n.json;
        return (
          void 0 !== e &&
            (s.origins || (s.origins = {}),
            s.origins[e] || (s.origins[e] = {}),
            (s = s.origins[e])),
          s
        );
      }
      function g(t, e) {
        return (r) => {
          let n = +t(r);
          return (
            null != e.step && (n = Math.round(n / e.step) * e.step),
            null != e.min && (n = Math.max(e.min, n)),
            null != e.max && (n = Math.min(e.max, n)),
            n
          );
        };
      }
    },
    17533: (t, e, r) => {
      'use strict';
      r.d(e, {
        W: () => O,
        a: () => w,
        b: () => U,
        c: () => R,
        d: () => N,
        i: () => v,
        n: () => q,
        o: () => V,
        r: () => p,
        j: () => G,
        t: () => h,
      }),
        r(76506);
      var n = r(91306),
        s = r(92143),
        o = r(71552),
        i = r(81172),
        a = r(86656);
      r(31450), r(40642), r(22723);
      let c,
        l = [];
      const u = s.L.getLogger('esri.core.Accessor');
      function h(t) {
        void 0 !== c && c.onObservableAccessed(t);
      }
      let f = !1,
        d = !1;
      function p(t, e, r) {
        if (f) return g(t, e, r);
        y(t);
        const n = e.call(r);
        return _(), n;
      }
      function g(t, e, r) {
        const n = f;
        (f = !0), y(t);
        let s = null;
        try {
          s = e.call(r);
        } catch (t) {
          d && u.error(t);
        }
        return _(), (f = n), s;
      }
      function y(t) {
        (c = t), l.push(t);
      }
      function _() {
        const t = l.pop();
        (c = l.length > 0 ? l[l.length - 1] : void 0), void 0 !== t && t.onTrackingEnd();
      }
      function v(t, e) {
        if (32 & e.flags) return;
        const r = d;
        (d = !1), 64 & e.flags ? g(e, e.metadata.get, t) : w(t, e), (d = r);
      }
      const m = [];
      function w(t, e) {
        128 & e.flags ||
          ((e.flags |= 128),
          g(e, () => {
            const r = e.metadata.dependsOn || m;
            for (const e of r)
              if ('string' == typeof e && -1 === e.indexOf('.')) b(t, e, !1);
              else {
                const r = (0, a.p)(e);
                for (let e = 0, n = t; e < r.length && null != n && 'object' == typeof n; ++e)
                  n = b(n, r[e], e !== r.length - 1);
              }
          }),
          (e.flags &= -129));
      }
      function b(t, e, r) {
        const n = '?' === e[e.length - 1] ? e.slice(0, -1) : e;
        if (null != t.getItemAt || Array.isArray(t)) {
          const e = parseInt(n, 10);
          if (!isNaN(e)) return Array.isArray(t) ? t[e] : t.getItemAt(e);
        }
        const s = (0, a.g)(t),
          o = null == s ? void 0 : s.properties.get(n);
        return o && (h(o), v(t, o)), r ? t[n] : void 0;
      }
      class O extends i.M {
        constructor(t, e, r) {
          if ((super(t, e, r), !(this instanceof O))) return new O(t, e, r);
        }
      }
      function A(t) {
        return (
          !!t &&
          t.prototype &&
          t.prototype.declaredClass &&
          0 === t.prototype.declaredClass.indexOf('esri.core.Collection')
        );
      }
      O.prototype.type = 'warning';
      const j = s.L.getLogger('esri.core.accessorSupport.extensions.serializableProperty.reader');
      function S(t, e, r) {
        var n, s;
        t &&
          ((!r && !e.read) ||
            (null != (n = e.read) && n.reader) ||
            !1 === (null == (s = e.read) ? void 0 : s.enabled) ||
            ((function (t) {
              return 'types' in t ? T(t.types) : $(t.type);
            })(t) &&
              (0, o.s)('read.reader', N(t), e)));
      }
      function N(t) {
        var e;
        const r = null != (e = t.ndimArray) ? e : 0;
        if (r > 1)
          return (function (t) {
            var e;
            const r = k(t),
              n = P.bind(null, r),
              s = null != (e = t.ndimArray) ? e : 0;
            return (t, e, r) => {
              if (null == t) return t;
              t = n(t, r, s);
              let o = s,
                i = t;
              for (; o > 0 && Array.isArray(i); ) o--, (i = i[0]);
              if (void 0 !== i) for (let e = 0; e < o; e++) t = [t];
              return t;
            };
          })(t);
        if (1 === r) return M(t);
        if ('type' in t && C(t.type)) {
          var n, s;
          const e = null == (n = t.type.prototype) || null == (s = n.itemType) ? void 0 : s.Type,
            r = M('function' == typeof e ? { type: e } : { types: e });
          return (e, n, s) => {
            const o = r(e, n, s);
            return o ? new t.type(o) : o;
          };
        }
        return k(t);
      }
      function k(t) {
        return 'type' in t
          ? (function (t) {
              return t.prototype.read
                ? (e, r, n) => {
                    if (null == e) return e;
                    const s = typeof e;
                    if ('object' !== s)
                      return void j.error(
                        `Expected JSON value of type 'object' to deserialize type '${t.prototype.declaredClass}', but got '${s}'`,
                      );
                    const o = new t();
                    return o.read(e, n), o;
                  }
                : t.fromJSON;
            })(t.type)
          : (function (t) {
              var e;
              let r = null;
              const n = null != (e = t.errorContext) ? e : 'type';
              return (e, s, o) => {
                if (null == e) return e;
                const i = typeof e;
                if ('object' !== i)
                  return void j.error(
                    `Expected JSON value of type 'object' to deserialize, but got '${i}'`,
                  );
                r ||
                  (r = (function (t) {
                    const e = {};
                    for (const s in t.typeMap) {
                      var r, n;
                      const o = t.typeMap[s],
                        i = (0, a.b)(o.prototype);
                      if ('function' == typeof t.key) continue;
                      const c = i.properties[t.key];
                      if (!c) continue;
                      null != (r = c.json) &&
                        r.type &&
                        Array.isArray(c.json.type) &&
                        1 === c.json.type.length &&
                        'string' == typeof c.json.type[0] &&
                        (e[c.json.type[0]] = o);
                      const l = null == (n = c.json) ? void 0 : n.write;
                      if (!l || !l.writer) {
                        e[s] = o;
                        continue;
                      }
                      const u = l.target,
                        h = 'string' == typeof u ? u : t.key,
                        f = {};
                      l.writer(s, f, h), f[h] && (e[f[h]] = o);
                    }
                    return e;
                  })(t));
                const c = t.key;
                if ('string' != typeof c) return;
                const l = e[c],
                  u = l ? r[l] : t.defaultKeyValue ? t.typeMap[t.defaultKeyValue] : void 0;
                if (!u) {
                  const t = `Type '${l || 'unknown'}' is not supported`;
                  return (
                    o &&
                      o.messages &&
                      e &&
                      o.messages.push(new O(`${n}:unsupported`, t, { definition: e, context: o })),
                    void j.error(t)
                  );
                }
                const h = new u();
                return h.read(e, o), h;
              };
            })(t.types);
      }
      function P(t, e, r, n) {
        return 0 !== n && Array.isArray(e) ? e.map((e) => P(t, e, r, n - 1)) : t(e, void 0, r);
      }
      function M(t) {
        const e = k(t);
        return (t, r, n) => {
          if (null == t) return t;
          if (Array.isArray(t)) {
            const r = [];
            for (const s of t) {
              const t = e(s, void 0, n);
              void 0 !== t && r.push(t);
            }
            return r;
          }
          const s = e(t, void 0, n);
          return void 0 !== s ? [s] : void 0;
        };
      }
      function C(t) {
        if (!A(t)) return !1;
        const e = t.prototype.itemType;
        return !(!e || !e.Type) && ('function' == typeof e.Type ? $(e.Type) : T(e.Type));
      }
      function $(t) {
        return (
          !Array.isArray(t) &&
          !!t &&
          t.prototype &&
          ('read' in t.prototype || 'fromJSON' in t || C(t))
        );
      }
      function T(t) {
        for (const e in t.typeMap) if (!$(t.typeMap[e])) return !1;
        return !0;
      }
      function x(t) {
        t.name &&
          (t.read && 'object' == typeof t.read
            ? void 0 === t.read.source && (t.read.source = t.name)
            : (t.read = { source: t.name }),
          t.write && 'object' == typeof t.write
            ? void 0 === t.write.target && (t.write.target = t.name)
            : (t.write = { target: t.name }));
      }
      function I(t) {
        'boolean' == typeof t.read
          ? (t.read = { enabled: t.read })
          : 'function' == typeof t.read
          ? (t.read = { enabled: !0, reader: t.read })
          : t.read &&
            'object' == typeof t.read &&
            void 0 === t.read.enabled &&
            (t.read.enabled = !0);
      }
      function E(t) {
        'boolean' == typeof t.write
          ? (t.write = { enabled: t.write })
          : 'function' == typeof t.write
          ? (t.write = { enabled: !0, writer: t.write })
          : t.write &&
            'object' == typeof t.write &&
            void 0 === t.write.enabled &&
            (t.write.enabled = !0);
      }
      function z(t, e) {
        var r;
        if (!e.write || e.write.writer || (!1 === e.write.enabled && !e.write.overridePolicy))
          return;
        const n = null != (r = null == t ? void 0 : t.ndimArray) ? r : 0;
        var s;
        t && (1 === n || ('type' in t && A(t.type)))
          ? (e.write.writer = F)
          : (e.write.writer =
              n > 1
                ? ((s = n),
                  function (t, e, r, n) {
                    let i;
                    if (null === t) i = null;
                    else {
                      i = L(t, n, s);
                      let e = s,
                        r = i;
                      for (; e > 0 && Array.isArray(r); ) e--, (r = r[0]);
                      if (void 0 !== r) for (let t = 0; t < e; t++) i = [i];
                    }
                    (0, o.s)(r, i, e);
                  })
                : J);
      }
      function J(t, e, r, n) {
        (0, o.s)(r, D(t, n), e);
      }
      function D(t, e) {
        return t && 'function' == typeof t.write
          ? t.write({}, e)
          : t && 'function' == typeof t.toJSON
          ? t.toJSON()
          : 'number' == typeof t
          ? q(t)
          : t;
      }
      function q(t) {
        return t === -1 / 0
          ? -Number.MAX_VALUE
          : t === 1 / 0
          ? Number.MAX_VALUE
          : isNaN(t)
          ? null
          : t;
      }
      function F(t, e, r, n) {
        let s;
        null === t
          ? (s = null)
          : t && 'function' == typeof t.map
          ? ((s = t.map((t) => D(t, n))), 'function' == typeof s.toArray && (s = s.toArray()))
          : (s = [D(t, n)]),
          (0, o.s)(r, s, e);
      }
      function L(t, e, r) {
        return 0 !== r && Array.isArray(t) ? t.map((t) => L(t, e, r - 1)) : D(t, e);
      }
      function V(t, e) {
        return U(t, 'read', e);
      }
      function R(t, e) {
        return U(t, 'write', e);
      }
      function U(t, e, r) {
        let n = t && t.json;
        if (t && t.json && t.json.origins && r) {
          const s = t.json.origins[r.origin];
          s && ('any' === e || e in s) && (n = s);
        }
        return n;
      }
      const K = [
          {
            processPrototypePropertyMetadata(t, e) {
              (function (t) {
                if ((t.json || (t.json = {}), I(t.json), E(t.json), x(t.json), t.json.origins))
                  for (const e in t.json.origins)
                    I(t.json.origins[e]), E(t.json.origins[e]), x(t.json.origins[e]);
                return !0;
              })(e) &&
                ((function (t) {
                  if (t.json && t.json.origins) {
                    const e = t.json.origins,
                      r = { 'web-document': ['web-scene', 'web-map'] };
                    for (const t in r)
                      if (e[t]) {
                        const n = e[t];
                        r[t].forEach((t) => {
                          e[t] = n;
                        }),
                          delete e[t];
                      }
                  }
                })(e),
                (function (t) {
                  const e = (function (t) {
                    return t.type
                      ? (function (t) {
                          if (!t.type) return;
                          let e = 0,
                            r = t.type;
                          for (; Array.isArray(r) && !(0, n.d)(r); ) (r = r[0]), e++;
                          return { type: r, ndimArray: e };
                        })(t)
                      : (function (t) {
                          if (!t.types) return;
                          let e = 0,
                            r = t.types;
                          for (; Array.isArray(r); ) (r = r[0]), e++;
                          return { types: r, ndimArray: e };
                        })(t);
                  })(t);
                  if (t.json.origins)
                    for (const r in t.json.origins) {
                      const n = t.json.origins[r];
                      S(e, n, !1), z(e, n);
                    }
                  S(e, t.json, !0), z(e, t.json);
                })(e));
            },
          },
        ],
        B = new Set(),
        H = new Set();
      function G(t) {
        return (e) => {
          (e.prototype.declaredClass = t),
            (function (t, e) {
              for (const r of K)
                if (r.processPrototypePropertyMetadata)
                  for (const n in t) {
                    const s = t[n];
                    r.processPrototypePropertyMetadata(n, s, t, e);
                  }
            })((0, a.b)(e.prototype).properties, t),
            (function (t) {
              const e = t.prototype,
                r = e.declaredClass,
                n = (0, a.b)(e).properties;
              !(function (t, e) {
                for (const r of K)
                  if (r.processClassPropertyMetadata)
                    for (const n in t) {
                      const s = t[n];
                      r.processClassPropertyMetadata(n, s, t, e);
                    }
              })(n, r);
              const s = {};
              for (const t of Object.getOwnPropertyNames(n)) {
                const e = n[t];
                s[t] = {
                  enumerable: !0,
                  configurable: !0,
                  get: W(t, e),
                  set(r) {
                    const n = this.__accessor__;
                    if (void 0 !== n) {
                      if (!Object.isFrozen(this)) {
                        if (n.initialized && e.readOnly)
                          throw new TypeError(
                            `[accessor] cannot assign to read-only property '${t}' of ${this.declaredClass}`,
                          );
                        if (2 === n.lifecycle && e.constructOnly)
                          throw new TypeError(
                            `[accessor] cannot assign to construct-only property '${t}' of ${this.declaredClass}`,
                          );
                        n.set(t, r);
                      }
                    } else
                      Object.defineProperty(this, t, {
                        enumerable: !0,
                        configurable: !0,
                        writable: !0,
                        value: r,
                      });
                  },
                };
              }
              Object.defineProperties(t.prototype, s);
            })(e);
          const r = [],
            n = [];
          let s = e.prototype;
          for (; s; )
            s.hasOwnProperty('initialize') &&
              !B.has(s.initialize) &&
              (B.add(s.initialize), r.push(s.initialize)),
              s.hasOwnProperty('destroy') &&
                !H.has(s.destroy) &&
                (H.add(s.destroy), n.push(s.destroy)),
              (s = Object.getPrototypeOf(s));
          B.clear(), H.clear();
          class o extends e {
            constructor(...t) {
              if ((super(...t), this.constructor === o && 'function' == typeof this.postscript)) {
                if (
                  (r.length &&
                    Object.defineProperty(this, 'initialize', {
                      enumerable: !1,
                      configurable: !0,
                      value() {
                        for (let t = r.length - 1; t >= 0; t--) r[t].call(this);
                      },
                    }),
                  n.length)
                ) {
                  let t = !1;
                  Object.defineProperty(this, 'destroy', {
                    enumerable: !1,
                    configurable: !0,
                    value() {
                      if (!t) {
                        t = !0;
                        for (let t = 0; t < n.length; t++) n[t].call(this);
                      }
                    },
                  });
                }
                this.postscript(...t);
              }
            }
          }
          return (
            (o.__accessorMetadata__ = (0, a.b)(e.prototype)), (o.prototype.declaredClass = t), o
          );
        };
      }
      function W(t, e) {
        return null == e.get
          ? function () {
              const e = this.__accessor__.properties.get(t);
              if (void 0 === e) return;
              h(e);
              const r = this.__accessor__.store;
              return r.has(t) ? r.get(t) : e.metadata.value;
            }
          : function () {
              const e = this.__accessor__.properties.get(t);
              if (void 0 !== e) return e.getComputed();
            };
      }
    },
    6906: (t, e, r) => {
      'use strict';
      r.d(e, { P: () => p, n: () => h, Os: () => A, MU: () => k });
      var n = r(76506),
        s = r(27794),
        o = r(50406);
      r(60991), r(92143), r(31450), r(71552), r(40642), r(81172);
      const i = n.g.queueMicrotask
          ? n.g.queueMicrotask
          : (t) => {
              n.g.Promise.resolve().then(t);
            },
        a = [];
      let c = [];
      function l(t) {
        a.push(t),
          1 === a.length &&
            i(() => {
              for (const t of c) t();
              const t = a.slice();
              a.length = 0;
              for (const e of t) e();
            });
      }
      (l || (l = {})).before = function (t) {
        return (
          c.push(t),
          {
            remove() {
              c = c.filter((e) => e !== t);
            },
          }
        );
      };
      var u,
        h = l;
      class f {
        constructor(t, e = 29) {
          (this.name = t), (this._counter = 0), (this._items = new Array(e));
        }
        record(t) {
          this._items[++this._counter % this._items.length] = t;
        }
        get median() {
          return this._items.slice().sort()[Math.floor(this._items.length / 2)];
        }
        get average() {
          return this._items.reduce((t, e) => t + e, 0) / this._items.length;
        }
        get last() {
          return this._items[this._counter % this._items.length];
        }
      }
      !(function (t) {
        const e = (t, e, r, n) => {
            let s = e,
              o = e;
            const i = r >>> 1,
              a = t[s - 1];
            for (; o <= i; ) {
              (o = s << 1), o < r && n(t[o - 1], t[o]) < 0 && ++o;
              const e = t[o - 1];
              if (n(e, a) <= 0) break;
              (t[s - 1] = e), (s = o);
            }
            t[s - 1] = a;
          },
          r = (t, e) => (t < e ? -1 : t > e ? 1 : 0);
        (t.sort = function (t, n, s, o) {
          void 0 === n && (n = 0), void 0 === s && (s = t.length), void 0 === o && (o = r);
          for (let r = s >>> 1; r > n; r--) e(t, r, s, o);
          const i = n + 1;
          for (let r = s - 1; r > n; r--) {
            const s = t[n];
            (t[n] = t[r]), (t[r] = s), e(t, i, r, o);
          }
        }),
          (t.iterableSort = function* (t, n, s, o) {
            void 0 === n && (n = 0), void 0 === s && (s = t.length), void 0 === o && (o = r);
            for (let r = s >>> 1; r > n; r--) e(t, r, s, o), yield;
            const i = n + 1;
            for (let r = s - 1; r > n; r--) {
              const s = t[n];
              (t[n] = t[r]), (t[r] = s), e(t, i, r, o), yield;
            }
          });
      })(u || (u = {}));
      var d = u;
      class p {
        constructor(t) {
          (this.data = []),
            (this._length = 0),
            (this._allocator = void 0),
            (this._deallocator = () => null),
            (this._shrink = () => {}),
            (this._hint = new s.P()),
            t &&
              (t.initialSize && (this.data = new Array(t.initialSize)),
              t.allocator && (this._allocator = t.allocator),
              void 0 !== t.deallocator && (this._deallocator = t.deallocator),
              t.shrink && (this._shrink = () => g(this)));
        }
        toArray() {
          return this.data.slice(0, this.length);
        }
        getItemAt(t) {
          if (!(t < 0 || t >= this._length)) return this.data[t];
        }
        get length() {
          return this._length;
        }
        set length(t) {
          if (t > this._length) {
            if (this._allocator) {
              for (; this._length < t; )
                this.data[this._length++] = this._allocator(this.data[this._length]);
              return;
            }
            this._length = t;
          } else {
            if (this._deallocator)
              for (let e = t; e < this._length; ++e) this.data[e] = this._deallocator(this.data[e]);
            (this._length = t), this._shrink();
          }
        }
        clear() {
          this.length = 0;
        }
        prune() {
          this.clear(), (this.data = []);
        }
        push(t) {
          this.data[this._length++] = t;
        }
        pushArray(t, e = t.length) {
          for (let r = 0; r < e; r++) this.data[this._length++] = t[r];
        }
        fill(t, e) {
          for (let r = 0; r < e; r++) this.data[this._length++] = t;
        }
        pushNew() {
          this._allocator && (this.data[this.length] = this._allocator(this.data[this.length]));
          const t = this.data[this._length];
          return ++this._length, t;
        }
        unshift(t) {
          this.data.unshift(t), this._length++, g(this);
        }
        pop() {
          if (0 === this.length) return;
          const t = this.data[this.length - 1];
          return (this.length = this.length - 1), this._shrink(), t;
        }
        remove(t) {
          const e = (0, s.i)(this.data, t, this.length, this._hint);
          if (-1 !== e) return this.data.splice(e, 1), (this.length = this.length - 1), t;
        }
        removeUnordered(t) {
          const e = (0, s.r)(this.data, t, this.length, this._hint);
          return void 0 !== e && (this.length = this.length - 1), this._shrink(), e;
        }
        removeUnorderedIndex(t) {
          if (!(t >= this.length || t < 0))
            return this.swapElements(t, this.length - 1), this.pop();
        }
        removeUnorderedMany(t, e = t.length, r) {
          (this.length = (0, s.a)(this.data, t, this.length, e, this._hint, r)), this._shrink();
        }
        front() {
          if (0 !== this.length) return this.data[0];
        }
        back() {
          if (0 !== this.length) return this.data[this.length - 1];
        }
        swapElements(t, e) {
          t >= this.length ||
            e >= this.length ||
            t === e ||
            ([this.data[t], this.data[e]] = [this.data[e], this.data[t]]);
        }
        sort(t) {
          d.sort(this.data, 0, this.length, t);
        }
        iterableSort(t) {
          return d.iterableSort(this.data, 0, this.length, t);
        }
        some(t, e) {
          for (let r = 0; r < this.length; ++r)
            if (t.call(e, this.data[r], r, this.data)) return !0;
          return !1;
        }
        filterInPlace(t, e) {
          let r = 0;
          for (let n = 0; n < this._length; ++n) {
            const s = this.data[n];
            t.call(e, s, n, this.data) && ((this.data[n] = this.data[r]), (this.data[r] = s), r++);
          }
          if (this._deallocator)
            for (let t = r; t < this._length; t++) this.data[t] = this._deallocator(this.data[t]);
          return (this._length = r), this._shrink(), this;
        }
        forAll(t, e) {
          const r = this.length,
            n = this.data;
          for (let s = 0; s < r; ++s) t.call(e, n[s], s, n);
        }
        map(t, e) {
          const r = new Array(this.length);
          for (let n = 0; n < this.length; ++n) r[n] = t.call(e, this.data[n], n, this.data);
          return r;
        }
        reduce(t, e) {
          let r = e;
          for (let e = 0; e < this.length; ++e) r = t(r, this.data[e], e, this.data);
          return r;
        }
        has(t) {
          const e = this.length,
            r = this.data;
          for (let n = 0; n < e; ++n) if (r[n] === t) return !0;
          return !1;
        }
      }
      function g(t) {
        t.data.length > 1.5 * t.length && (t.data.length = Math.floor(1.1 * t.length));
      }
      class y {
        constructor(t) {
          (this.callback = t), (this.isActive = !0);
        }
        remove() {
          this.isActive = !1;
        }
      }
      let _ = 0;
      const v = { time: 0, deltaTime: 0, elapsedFrameTime: 0, frameDuration: 0 },
        m = ['prepare', 'preRender', 'render', 'postRender', 'update'],
        w = [],
        b = new p(),
        O = {
          frameTasks: b,
          willDispatch: !1,
          clearFrameTasks: function (t = !1) {
            b.forAll((t) => {
              t.removed = !0;
            }),
              t && S();
          },
          dispatch: N,
          executeFrameTasks: function (t) {
            const e = t - _;
            _ = t;
            const r = 1e3 / 60,
              n = Math.max(0, e - r);
            for (let s = 0; s < m.length; s++) {
              const o = performance.now(),
                i = m[s];
              b.forAll((o) => {
                var a;
                o.paused ||
                  o.removed ||
                  (0 === s && o.ticks++,
                  o.phases[i] &&
                    ((v.time = t),
                    (v.deltaTime = 0 === o.ticks ? 0 : e),
                    (v.elapsedFrameTime = performance.now() - t),
                    (v.frameDuration = r - n),
                    null == (a = o.phases[i]) || a.call(o, v)));
              }),
                P[s].record(performance.now() - o);
            }
            S(), M.record(performance.now() - t);
          },
        };
      function A(t) {
        const e = new y(t);
        return w.push(e), O.willDispatch || ((O.willDispatch = !0), h(N)), e;
      }
      const j = new p();
      function S() {
        b.forAll((t) => {
          t.removed && j.push(t);
        }),
          b.removeUnorderedMany(j.data, j.length),
          j.clear();
      }
      function N() {
        for (; w.length; ) {
          const t = (0, n.a)(w.shift());
          t.isActive && t.callback();
        }
        O.willDispatch = !1;
      }
      function k(t = 1, e) {
        const r = (0, o.hh)(),
          n = () => {
            (0, o.Hc)(e) ? r.reject((0, o.zE)()) : 0 === t ? r() : (--t, h(() => n()));
          };
        return n(), r.promise;
      }
      const P = m.map((t) => new f(t)),
        M = new f('total');
    },
  },
]);
