(self.webpackChunkRemoteClient = self.webpackChunkRemoteClient || []).push([
  [2432],
  {
    62432: (t, e, n) => {
      'use strict';
      n.r(e), n.d(e, { loadGLTFMesh: () => v });
      var r = n(48027),
        o = n(82058),
        s = n(76506),
        a = n(26923),
        i = n(45087),
        l = n(82426),
        u = n(68681),
        c = n(81773),
        f = n(71337),
        m = n(68225),
        d = n(40167),
        p = n(72836),
        x = n(90779),
        b = n(84017),
        g = n(14049);
      async function v(t, e, n) {
        const a = new x.D(
            null != (y = n) && y.resolveFile
              ? {
                  busy: !1,
                  request: async (t, e, n) => {
                    const r = y.resolveFile(t),
                      a = 'image' === e ? 'image' : 'binary' === e ? 'array-buffer' : 'json';
                    return (
                      await (0, o.default)(r, {
                        responseType: a,
                        signal: (0, s.i)(n) ? n.signal : null,
                      })
                    ).data;
                  },
                }
              : null,
          ),
          i = (await (0, x.l)(a, e, n, !0)).model,
          p = i.lods.shift(),
          g = new Map(),
          v = new Map();
        var y;
        i.textures.forEach((t, e) => {
          return g.set(e, new m.Z({ data: (n = t).data, wrap: C(n.parameters.wrap) }));
          var n;
        }),
          i.materials.forEach((t, e) =>
            v.set(
              e,
              (function (t, e) {
                const n = new r.Z(
                    ((a = t.color), (i = t.opacity), (0, u.f)(A(a[0]), A(a[1]), A(a[2]), i)),
                  ),
                  o = t.emissiveFactor
                    ? new r.Z(
                        (function (t) {
                          return (0, l.p)(A(t[0]), A(t[1]), A(t[2]));
                        })(t.emissiveFactor),
                      )
                    : null;
                var a, i;
                return new f.Z({
                  color: n,
                  colorTexture: (0, s.u)((0, s.f)(t.textureColor, (t) => e.get(t))),
                  normalTexture: (0, s.u)((0, s.f)(t.textureNormal, (t) => e.get(t))),
                  emissiveColor: o,
                  emissiveTexture: (0, s.u)((0, s.f)(t.textureEmissive, (t) => e.get(t))),
                  occlusionTexture: (0, s.u)((0, s.f)(t.textureOcclusion, (t) => e.get(t))),
                  alphaMode: w(t.alphaMode),
                  alphaCutoff: t.alphaCutoff,
                  doubleSided: t.doubleSided,
                  metallic: t.metallicFactor,
                  roughness: t.roughnessFactor,
                  metallicRoughnessTexture: (0, s.u)(
                    (0, s.f)(t.textureMetallicRoughness, (t) => e.get(t)),
                  ),
                });
              })(t, g),
            ),
          );
        const B = (function (t) {
          let e = 0;
          const n = { color: !1, tangent: !1, normal: !1, texCoord0: !1 };
          for (const {
            attributes: { position: r, normal: o, color: s, tangent: a, texCoord0: i },
          } of t.parts)
            (e += r.count),
              o && (n.normal = !0),
              s && (n.color = !0),
              a && (n.tangent = !0),
              i && (n.texCoord0 = !0);
          return {
            writeIndex: 0,
            vertexAttributes: {
              position: (0, x.c)(d.B, e),
              normal: n.normal ? (0, x.c)(d.a, e) : null,
              tangent: n.tangent ? (0, x.c)(d.g, e) : null,
              color: n.color ? (0, x.c)(d.b, e) : null,
              texCoord0: n.texCoord0 ? (0, x.c)(d.e, e) : null,
            },
            components: [],
          };
        })(p);
        for (const t of p.parts) h(B, t, v);
        const { position: T, normal: M, tangent: F, color: I, texCoord0: R } = B.vertexAttributes,
          k = {
            position: T.typedBuffer,
            normal: (0, s.i)(M) ? M.typedBuffer : null,
            tangent: (0, s.i)(F) ? F.typedBuffer : null,
            uv: (0, s.i)(R) ? R.typedBuffer : null,
            color: (0, s.i)(I) ? I.typedBuffer : null,
          },
          E = (0, b.a)(k, t, n);
        return {
          transform: E.transform,
          components: B.components,
          spatialReference: t.spatialReference,
          vertexAttributes: new c.M({
            position: E.vertexAttributes.position,
            normal: E.vertexAttributes.normal,
            tangent: E.vertexAttributes.tangent,
            color: k.color,
            uv: k.uv,
          }),
        };
      }
      function h(t, e, n) {
        const { position: r, normal: o, tangent: l, color: u, texCoord0: f } = t.vertexAttributes,
          m = t.writeIndex,
          b = e.attributes.position.count;
        if (
          ((0, p.t)(r.slice(m, b), e.attributes.position, e.transform),
          (0, s.i)(e.attributes.normal) && (0, s.i)(o))
        ) {
          const t = (0, a.a)((0, i.c)(), e.transform);
          (0, p.a)(o.slice(m, b), e.attributes.normal, t);
        } else (0, s.i)(o) && (0, p.f)(o, 0, 0, 1, { dstIndex: m, count: b });
        if ((0, s.i)(e.attributes.tangent) && (0, s.i)(l)) {
          const t = (0, a.a)((0, i.c)(), e.transform);
          (0, x.t)(l.slice(m, b), e.attributes.tangent, t);
        } else (0, s.i)(l) && (0, x.f)(l, 0, 0, 1, 1, { dstIndex: m, count: b });
        if (
          ((0, s.i)(e.attributes.texCoord0) && (0, s.i)(f)
            ? (0, x.n)(f.slice(m, b), e.attributes.texCoord0)
            : (0, s.i)(f) && (0, x.g)(f, 0, 0, { dstIndex: m, count: b }),
          (0, s.i)(e.attributes.color) && (0, s.i)(u))
        ) {
          const t = e.attributes.color,
            n = u.slice(m, b);
          if (4 === t.elementCount)
            t instanceof d.g
              ? (0, x.s)(n, t, 255)
              : t instanceof d.b
              ? (0, x.a)(n, t)
              : t instanceof d.l && (0, x.h)(n, t, 8);
          else {
            (0, x.f)(n, 255, 255, 255, 255);
            const e = d.m.fromTypedArray(n.typedBuffer, n.typedBufferStride);
            t instanceof d.a
              ? (0, p.s)(e, t, 255)
              : t instanceof d.m
              ? (0, p.c)(e, t)
              : t instanceof d.n && (0, p.b)(e, t, 8);
          }
        } else (0, s.i)(u) && (0, x.f)(u.slice(m, b), 255, 255, 255, 255);
        const v = (function (t, e) {
          switch (e) {
            case 4:
              return (0, x.e)(t, g.d);
            case 5:
              return (0, x.d)(t);
            case 6:
              return (0, x.b)(t);
          }
        })(e.indices || b, e.primitiveType);
        if (m) for (let t = 0; t < v.length; t++) v[t] += m;
        t.components.push(
          new c.Z({ faces: v, material: n.get(e.material).clone(), trustSourceNormals: !0 }),
        ),
          (t.writeIndex += b);
      }
      function w(t) {
        switch (t) {
          case 'OPAQUE':
            return 'opaque';
          case 'MASK':
            return 'mask';
          case 'BLEND':
            return 'blend';
        }
      }
      function C(t) {
        return { horizontal: y(t.s), vertical: y(t.t) };
      }
      function y(t) {
        switch (t) {
          case 33071:
            return 'clamp';
          case 33648:
            return 'mirror';
          case 10497:
            return 'repeat';
        }
      }
      function A(t) {
        return t ** (1 / x.C) * 255;
      }
      n(54174),
        n(91306),
        n(92143),
        n(31450),
        n(71552),
        n(40642),
        n(88762),
        n(32101),
        n(60991),
        n(81172),
        n(50406),
        n(74673),
        n(21972),
        n(23639),
        n(34250),
        n(86656),
        n(22723),
        n(91055),
        n(17533),
        n(27794),
        n(6906),
        n(26341),
        n(86787),
        n(44265),
        n(97714),
        n(2906),
        n(38742),
        n(47029),
        n(7200),
        n(27726),
        n(41864),
        n(48190),
        n(10738),
        n(65775),
        n(35861),
        n(53785),
        n(57251),
        n(95587),
        n(60947),
        n(89623),
        n(72334),
        n(21801),
        n(73796),
        n(91597),
        n(35132),
        n(84069),
        n(12381),
        n(73173),
        n(44567),
        n(98380),
        n(92896),
        n(92482),
        n(92624),
        n(34987),
        n(84661),
        n(50766),
        n(2484),
        n(94446);
    },
  },
]);
