import { defineComponent as F, watch as h, createElementBlock as de, openBlock as ve, normalizeClass as ye, unref as J, shallowRef as A, ref as u, onMounted as fe, onUnmounted as ge, createElementVNode as be, pushScopeId as he, popScopeId as Me } from "vue";
import Le from "@amap/amap-jsapi-loader";
import "axios";
import { nanoid as ke } from "nanoid";
import { debounce as N } from "lodash";
import { heatMapData as ze, hideHeatMap as we } from "./heatMap.mjs";
import { navigatorDot as Ce, loadDotMap as V, showAndHideDotLabelMap as T, clearRipplesScatter as Ee, clearLoadLocaDotLayers as Se, clearLabelsLayer as xe, clearMarkerLayer as Oe, showRoadMap as De, hideRoadMap as Ie, loadLineMap as Ae, hideLineMap as Te, showSmallMap as Be, hideSmallMap as Pe } from "./dotMap.mjs";
import "../../text-text-basic/index.mjs";
import "../../text-table-basic/index.mjs";
import "../../chart-other-gauge/index.mjs";
import "../../chart-other-gauge-stage/index.mjs";
import "../../chart-other-gauge-grade/index.mjs";
import "../../chart-other-word-cloud/index.mjs";
import "../../chart-other-liquidfill/index.mjs";
import "../../chart-other-funnel/index.mjs";
import "../../chart-other-force/index.mjs";
import "../../chart-other-radar/index.mjs";
import "../../chart-other-funnel-split/index.mjs";
import "../../chart-other-funnel-contrast/index.mjs";
import "../../chart-other-candlestick-basic/index.mjs";
import "../../chart-other-candlestick-shanghai/index.mjs";
import "../../chart-other-candlestick-demo/index.mjs";
import "../../chart-other-heatmap/index.mjs";
import "../../chart-other-force2/index.mjs";
import "../../chart-other-graph-basic/index.mjs";
import "../../chart-other-graph-basic2/index.mjs";
import "../../chart-other-graph-calendar/index.mjs";
import "../../chart-other-tree-line/index.mjs";
import "../../chart-other-treemap-basic/index.mjs";
import "../../chart-other-sunburst-basic/index.mjs";
import "../../chart-other-sunburst-basic2/index.mjs";
import "../../chart-other-sunburst-basic3/index.mjs";
import "../../chart-other-sunburst-basic4/index.mjs";
import "../../chart-other-sunburst-book/index.mjs";
import "../../chart-other-sunburst-radius/index.mjs";
import "../../chart-other-sunburst-flavors/index.mjs";
import "../../chart-other-parallel-basic/index.mjs";
import "../../chart-other-parallel-mul/index.mjs";
import "../../chart-other-circular-graph/index.mjs";
import "../../map-earth-basic/index.mjs";
import "../../map-earth-cool-tech/index.mjs";
import "../../map-earth-particle/index.mjs";
import "../../map-earth-hacker/index.mjs";
import "../../map-earth-fly-line/index.mjs";
import "../../chart-other-grid-percentage/index.mjs";
import "../../chart-other-radar-stack/index.mjs";
import "../../chart-other-funnel2/index.mjs";
import "../../chart-other-label-gauge/index.mjs";
import "../../chart-other-theme-river/index.mjs";
import "../../chart-other-tree/index.mjs";
import "../../chart-other-treemap/index.mjs";
import "../../commons-product-model/index.mjs";
import "../../commons-vr-photo/index.mjs";
import "../../commons-vr-video/index.mjs";
import "../../commons-three-loader/index.mjs";
import "../../commons-three-loader3/index.mjs";
import "../../commons-loop-iterator/index.mjs";
import "../../commons-gaussian-splatting-view/index.mjs";
import "../../commons-babylon/index.mjs";
import "../../commons-svg/index.mjs";
import "../../commons-weather/index.mjs";
import "../../commons-weather-dynamic/index.mjs";
import "../../media-wavesurfer/index.mjs";
import "../../interaction-tabs/index.mjs";
import "../../interaction-tabs2/index.mjs";
import "../../interaction-button/index.mjs";
import "../../interaction-button-image/index.mjs";
import "../../interaction-select/index.mjs";
import "../../interaction-input/index.mjs";
import "../../interaction-radio/index.mjs";
import "../../interaction-slider/index.mjs";
import "../../interaction-switch/index.mjs";
import "../../interaction-data-picker/index.mjs";
import "../../interaction-button-refresh/index.mjs";
import "../../media-image/index.mjs";
import "../../text-title/index.mjs";
import "../../commons-qrcode/index.mjs";
import "../../media-video/index.mjs";
import "../../media-audio/index.mjs";
import "../../text-real-time/index.mjs";
import "../../media-carousel/index.mjs";
import "../../media-carousel-slides/index.mjs";
import "../../media-iframe-carousel/index.mjs";
import "../../media-iframe/index.mjs";
import "../../media-m3u8/index.mjs";
import "../../media-m3u8-dynamic/index.mjs";
import "../../media-audio-dynamic/index.mjs";
import "../../media-video-dynamic/index.mjs";
import "../../media-image-dynamic/index.mjs";
import "../../media-iframe-dynamic/index.mjs";
import "../../media-flv/index.mjs";
import "../../commons-echarts/index.mjs";
import "../../text-over-number/index.mjs";
import "../../text-table-scroll/index.mjs";
import "../../text-carousel/index.mjs";
import "../../text-row-scroll/index.mjs";
import "../../text-text-dynamic/index.mjs";
import "../../text-count-down/index.mjs";
import "../../graphical-circle/index.mjs";
import "../../graphical-diamond/index.mjs";
import "../../graphical-hexagon/index.mjs";
import "../../graphical-isosceles-triangle/index.mjs";
import "../../graphical-pentagon/index.mjs";
import "../../graphical-rect/index.mjs";
import "../../graphical-right-triangle/index.mjs";
import "../../scene-map3d/index.mjs";
import "../../scene-amap2d/index.mjs";
import "../../scene-amap3d/index.mjs";
import "../../scene-vr/index.mjs";
import "../../scene-unity-iframe/index.mjs";
import "../../scene-unity-webgl/index.mjs";
import "../../scene-ue-iframe/index.mjs";
import "../../scene-ue-shj/index.mjs";
import "../../scene-default/index.mjs";
import "../../interaction/tabs/index.mjs";
import "../../interaction/tabs-icon/index.mjs";
import "../../interaction/button/index.mjs";
import "../../interaction/date-picker/src/date-picker/index.mjs";
import "../../interaction/date-picker/src/date-picker-range/index.mjs";
import "../../text/list/index.mjs";
import "../../chart/src/bar/basic/index.mjs";
import "../../chart/src/bar/animation/index.mjs";
import "../../chart/src/bar/contrast/index.mjs";
import "../../chart/src/bar/contrast2/index.mjs";
import "../../chart/src/bar/contrast3/index.mjs";
import "../../chart/src/bar/gradient-column-chart/index.mjs";
import "../../chart/src/bar/horizontal/index.mjs";
import "../../chart/src/bar/horizontal-stack/index.mjs";
import "../../chart/src/bar/line-bar/index.mjs";
import "../../chart/src/bar/line-bar2/index.mjs";
import "../../chart/src/bar/loop/index.mjs";
import "../../chart/src/bar/mini/index.mjs";
import "../../chart/src/bar/polar/index.mjs";
import "../../chart/src/bar/polar-stack/index.mjs";
import "../../chart/src/bar/polar2/index.mjs";
import "../../chart/src/bar/radius-circle/index.mjs";
import "../../chart/src/bar/rank/index.mjs";
import "../../chart/src/bar/segmented-progress/index.mjs";
import "../../chart/src/bar/spire/index.mjs";
import "../../chart/src/bar/stack/index.mjs";
import "../../chart/src/bar/stack-line/index.mjs";
import "../../chart/src/bar/stack2/index.mjs";
import "../../chart/src/bar/stack3/index.mjs";
import "../../chart/src/bar/staggered/index.mjs";
import "../../chart/src/bar/three/index.mjs";
import "../../chart/src/bar/waterfall/index.mjs";
import "../../chart/src/bar/zebra/index.mjs";
import "../../chart/src/line/area-gradient/index.mjs";
import "../../chart/src/line/area-highlight/index.mjs";
import "../../chart/src/line/area-highlight2/index.mjs";
import "../../chart/src/line/basic/index.mjs";
import "../../chart/src/line/bump/index.mjs";
import "../../chart/src/line/dashed/index.mjs";
import "../../chart/src/line/ladder/index.mjs";
import "../../chart/src/line/logarithm/index.mjs";
import "../../chart/src/line/multix/index.mjs";
import "../../chart/src/line/polar-double/index.mjs";
import "../../chart/src/line/rain-flow/index.mjs";
import "../../chart/src/line/scale/index.mjs";
import "../../chart/src/line/smooth/index.mjs";
import "../../chart/src/line/smooth-area/index.mjs";
import "../../chart/src/line/stack/index.mjs";
import "../../chart/src/line/stack-area/index.mjs";
import "../../chart/src/line/temp/index.mjs";
import "../../chart/src/line/vertical/index.mjs";
import "../../chart/src/map/basic/index.mjs";
import "../../chart/src/map/bmap-basic/index.mjs";
import "../../chart/src/map/bmap-heatmap/index.mjs";
import "../../chart/src/map/bmap-rich/index.mjs";
import "../../chart/src/map/customize/index.mjs";
import "../../chart/src/map/lines/index.mjs";
import "../../chart/src/map/scatter/index.mjs";
import "../../chart/src/pie/3d/index.mjs";
import "../../chart/src/pie/basic/index.mjs";
import "../../chart/src/pie/basic2/index.mjs";
import "../../chart/src/pie/customized/index.mjs";
import "../../chart/src/pie/index/index.mjs";
import "../../chart/src/pie/interval/index.mjs";
import "../../chart/src/pie/legend-scroll/index.mjs";
import "../../chart/src/pie/radius/index.mjs";
import "../../chart/src/pie/rose/index.mjs";
import "../../chart/src/pie/round/index.mjs";
import "../../chart/src/pie/sunburst/index.mjs";
import "../../chart/src/scatter/basic/index.mjs";
import "../../chart/src/scatter/basic2/index.mjs";
import "../../chart/src/scatter/bubble/index.mjs";
import "../../chart/src/scatter/ripples/index.mjs";
import "../zv-hj-tree-list/index.mjs";
import "../zv-hj-model-resource/index.mjs";
import "../zv-hj-one-map-config/index.mjs";
import "../zv-hj-video-control/index.mjs";
import "../zv-hj-video-page/index.mjs";
import "../zv-hj-password-input/index.mjs";
import "../zv-hj-carousel/index.mjs";
import "../zv-hj-video-monitor/index.mjs";
import "../zv-hj-scene-amap2d/index.mjs";
import "./index.mjs";
import "../zv-hj-person-face/index.mjs";
import "../zv-hj-resource-type-phone/index.mjs";
import "../zv-hj-tree-list-phone/index.mjs";
import "../zv-hj-video-page-phone/index.mjs";
import "../zv-hj-model-resource-phone/index.mjs";
import "../zv-hj-bottom-suspend/index.mjs";
import "../zv-hj-pagination/index.mjs";
import "../zv-hj-password-input-phone/index.mjs";
/* empty css                           */
/* empty css                                  */
import { SHJDatasourceV2 as He } from "../../../plugins/datasource/index.mjs";
import { SHJParseEvent as v } from "../../../plugins/event/index.mjs";
import { HJLYDatasourceApi as Re } from "../../../plugins/datasource/hjly/index.mjs";
const _e = (w) => (he("data-v-a8a5c98c"), w = w(), Me(), w), We = /* @__PURE__ */ _e(() => /* @__PURE__ */ be("div", {
  id: "zerov-amap-3d",
  class: "zerov-amap-container"
}, null, -1)), Je = [
  We
], Ne = F({ name: "zv-hj-scene-amap3d" }), Rr = /* @__PURE__ */ F({
  ...Ne,
  props: {
    basicOption: {},
    sources: {},
    useEvents: {},
    uuid: {}
  },
  emits: [
    "amap3d-scene-success",
    "amap3d-scene-zoomstart",
    "amap3d-scene-zoomend",
    "amap3d-scene-mapclick",
    "amap3d-scene-dragstart",
    "amap3d-scene-dragging",
    "amap3d-scene-dragend",
    "amap3d-scene-pulseLinkLayer",
    "amap3d-label-click",
    "amap3d-scene-label-layer-click",
    "amap3d-scene-label-layer-mouseover",
    "amap3d-scene-label-layer-mouseout"
  ],
  setup(w, { expose: G, emit: Z }) {
    const o = w, y = Z;
    v.parseEvents(o.useEvents, "on-page-loaded", null);
    const U = () => {
      const e = A(), m = A(), P = u(!1), k = u(!0), f = A([]), E = u([]), S = u(), x = u(), O = u(), g = u(), H = u(), M = u(), C = u(), z = u(), c = u(), D = u(), R = (a) => {
        o.sources && o.sources.length > 0 && He.parse({
          tId: o.uuid,
          sources: o.sources,
          callback: (t) => {
            try {
              c.value = t.data[0].data[0].data[0], a(t);
            } catch {
            }
          }
        });
      }, X = (a) => {
        window._AMapSecurityConfig = {
          securityJsCode: a.basic.securityJsCode
        }, Le.load({
          key: a.basic.key,
          // 申请好的Web端开发者Key，首次调用 load 时必填
          version: "2.0",
          // 指定要加载的 JSAPI 的版本，缺省时默认为 1.4.15
          Loca: {
            version: "2.0.0"
          },
          plugins: [
            "AMap.ControlBar",
            "AMap.ToolBar",
            "AMap.Scale",
            "AMap.HeatMap",
            "AMap.GeoJSON",
            "AMap.ImageLayer",
            "AMap.TileLayer",
            "AMap.Polyline"
          ]
        }).then((t) => {
          g.value = t;
          const l = new g.value.createDefaultLayer({
            visible: !0,
            // 是否可见
            opacity: 1,
            // 透明度
            zIndex: 0
            // 叠加层级
          });
          e.value = new t.Map("zerov-amap-3d", {
            rotateEnable: a.config.rotateEnable,
            // 是否开启地图旋转交互 鼠标右键 + 鼠标画圈移动 或 键盘Ctrl + 鼠标画圈移动
            pitchEnable: a.config.pitchEnable,
            // 是否开启地图倾斜交互 鼠标右键 + 鼠标上下移动或键盘Ctrl + 鼠标上下移动
            resizeEnable: a.config.resizeEnable,
            zoomEnable: a.config.zoomEnable,
            dragEnable: a.config.dragEnable,
            zoom: a.config.zoom,
            // 初始化地图层级
            viewMode: "3D",
            // 开启3D视图,默认为关闭
            zooms: a.config.zooms,
            // 地图显示的缩放级别范围
            center: a.config.center,
            // 初始地图中心经纬度
            mapStyle: a.config.mapStyle,
            features: a.config.features,
            pitch: a.config.pitch,
            // 0-83
            rotation: a.config.rotation,
            // 0-360
            wallColor: a.config.floors.wallColor,
            roofColor: a.config.floors.roofColor,
            skyColor: a.config.skyColor,
            layers: [l]
          }), m.value = new window.Loca.Container({
            map: e.value
          }), O.value = new g.value.Scale({
            visible: a.config.plugin.scale.visible,
            position: {
              left: a.config.plugin.scale.position.left + "px",
              bottom: a.config.plugin.scale.position.bottom + "px"
            }
          }), e.value.addControl(O.value), S.value = new t.ControlBar({
            visible: a.config.plugin.controlBar.visible,
            showControlButton: a.config.plugin.controlBar.showControlButton,
            position: {
              right: a.config.plugin.controlBar.position.right + "px",
              top: a.config.plugin.controlBar.position.top + "px"
            }
          }), e.value.addControl(S.value), x.value = new t.ToolBar({
            visible: a.config.plugin.toolBar.visible,
            position: {
              left: a.config.plugin.toolBar.position.left + "px",
              top: a.config.plugin.toolBar.position.top + "px"
            }
          }), e.value.addControl(x.value);
          const i = e.value.getLayers();
          for (let r = 0; r < i.length; r++)
            (i[r].type === "sketchTileLayer" || i[r]._opts.type === "sketchImageLayer") && e.value.removeLayer(i[r]);
          if (a.sketchTile) {
            const r = te(a.sketchTile);
            r && e.value.addLayer(r);
          }
          if (a.sketchImage) {
            const r = oe(a.sketchImage);
            r && e.value.addLayer(r);
          }
          e.value.on("complete", () => {
            setTimeout(() => {
              P.value = !0, y("amap3d-scene-success"), v.parseEvents(
                o.useEvents,
                "amap3d-scene-success",
                null
              );
              const r = u({
                clickCallback: (s) => {
                  y("amap3d-scene-label-layer-click", s), v.parseEvents(o.useEvents, "amap3d-scene-label-layer-click", s);
                },
                mouseoverCallback: (s) => {
                  y("amap3d-scene-label-layer-mouseover", s), v.parseEvents(o.useEvents, "amap3d-scene-label-layer-mouseover", s);
                },
                mouseoutCallback: (s) => {
                  y("amap3d-scene-label-layer-mouseout", s), v.parseEvents(o.useEvents, "amap3d-scene-label-layer-mouseout", s);
                }
              });
              E.value || (z.value = V(t, e.value, E.value, r, null), f.value.push({
                type: "markerLayer",
                value: z
              }));
            }, 666);
          }), e.value.on("zoomstart", () => {
            y("amap3d-scene-zoomstart"), v.parseEvents(
              o.useEvents,
              "amap3d-scene-zoomstart",
              null
            );
          }), e.value.on("zoomend", () => {
            y("amap3d-scene-zoomend"), v.parseEvents(
              o.useEvents,
              "amap3d-scene-zoomend",
              null
            );
          }), e.value.on("click", (r) => {
            y("amap3d-scene-mapclick", r.lnglat), v.parseEvents(
              o.useEvents,
              "amap3d-scene-mapclick",
              r.lnglat
            );
          }), e.value.on("dragstart", (r) => {
            y("amap3d-scene-dragstart", r.lnglat), v.parseEvents(
              o.useEvents,
              "amap3d-scene-dragstart",
              r.lnglat
            );
          }), e.value.on("dragend", (r) => {
            y("amap3d-scene-dragend", r.lnglat), v.parseEvents(
              o.useEvents,
              "amap3d-scene-dragend",
              r.lnglat
            );
          });
        }).catch((t) => {
        });
      }, _ = (a) => {
        W(), a.config.apiTag && R(function(t) {
          const l = u({ ...a });
          if (l.value.basic.securityJsCode = c.value.mapSecurityJsCode, l.value.basic.key = c.value.mapKey, l.value.config.zoom = c.value.bestMapZoom, l.value.config.zooms = [
            c.value.minMapLevel,
            c.value.maxMapLevel
          ], l.value.config.center = [
            c.value.centerLng,
            c.value.centerLat
          ], c.value.layerName) {
            const i = u();
            i.value = "https://zgdev.fxo2opt.com", l.value.sketchTile.url = `${i.value}/hjly/map/${c.value.layerName}/{z}/{x}/{y}.png`, l.value.sketchTile.bounds = [
              [c.value.leftBottomLng, c.value.leftBottomLat],
              [c.value.rightTopLng, c.value.rightTopLat]
            ], l.value.sketchTile.zooms = l.value.config.zooms;
          } else c.value.mapUrl ? (l.value.sketchImage.url = c.value.mapUrl, l.value.sketchImage.bounds = [
            [c.value.leftBottomLng, c.value.leftBottomLat],
            [c.value.rightTopLng, c.value.rightTopLat]
          ], l.value.sketchImage.zooms = l.value.config.zooms, l.value.sketchTile = null) : (l.value.sketchImage = null, l.value.sketchTile = null);
          (!D.value || !D.value.basic) && (D.value = l.value, X(l.value));
        });
      }, I = (a, t) => {
        const l = {
          type: "FeatureCollection",
          features: []
        };
        return a.forEach((i, r) => {
          const s = {
            type: "Feature",
            id: ke(),
            properties: {
              type: t,
              ...i
            },
            geometry: {
              type: t,
              coordinates: i.value
            }
          };
          l.features.push(s);
        }), l;
      }, ee = (a, t) => {
        const l = g.value, i = u(), r = u({
          clickCallback: (n) => {
            y("amap3d-scene-label-layer-click", n), v.parseEvents(o.useEvents, "amap3d-scene-label-layer-click", n);
          },
          mouseoverCallback: (n) => {
            y("amap3d-scene-label-layer-mouseover", n), v.parseEvents(o.useEvents, "amap3d-scene-label-layer-mouseover", n);
          },
          mouseoutCallback: (n) => {
            y("amap3d-scene-label-layer-mouseout", n), v.parseEvents(o.useEvents, "amap3d-scene-label-layer-mouseout", n);
          }
        }), s = a && a.data || ze(), p = a.type;
        if (p === "navigatorDot" && Ce(e, a), p === "loadHeatMap" ? (i.value = t.heatmap, re(l, i.value, s)) : p === "hideHeatMap" && we(H.value), p === "loadDotMap" ? (i.value = t.labelslayer, Re.loadHomeResourceMap({
          pointType: c.value.pointType || "0",
          typeId: [c.value.typeId || 1],
          homeMapId: c.value.homeMapId || "1"
        }).then((n) => {
          const b = n.data;
          if (b && !z.value) {
            if (e.value)
              E.value = null;
            else {
              E.value = b;
              return;
            }
            z.value = V(l, e.value, b, i, r.value), f.value.push({
              type: "markerLayer",
              value: z
            });
          }
        })) : p === "dotlayers" ? (i.value = t.dotlayers, le(
          window.Loca,
          i.value,
          I(s, "Point")
        )) : p === "scatter" ? (i.value = t.scatter, ie(
          window.Loca,
          i.value,
          I(s, "Point")
        )) : p === "labelsLayer" ? (i.value = t.labelslayer, se(
          window.Loca,
          i.value,
          I(s, "Point")
        ), T(m, f, k)) : p === "clearDotMap" && (Ee(m, f), Se(m, f), xe(m, f), Oe(e, f), z.value = null), p === "showDotLabelMap" ? (k.value = !0, T(m, f, k)) : p === "hideDotLabelMap" && (k.value = !1, T(m, f, k)), p === "showRoadMap" ? M.value ? M.value.show() : (M.value = new l.TileLayer.Traffic({
          autoRefresh: !0,
          // 是否自动刷新，默认为false
          interval: 180,
          // 刷新间隔，默认180s
          zIndex: 210
        }), De(l, e, M.value)) : p === "hideRoadMap" && Ie(l, e, M.value), p === "loadLineMap") {
          const n = [];
          s.forEach((b) => {
            b.lng && b.lat && n.push([b.lng, b.lat]);
          }), !C.value && n.length > 0 ? (C.value = new l.Polyline({
            path: n,
            strokeWeight: 3,
            strokeOpacity: 1,
            strokeColor: "yellow"
          }), Ae(l, e, C.value)) : C.value.show();
        } else p === "hideLineMap" && Te(l, e, C.value);
        p === "showSmallMap" ? Be(l, e.value, M.value) : p === "hideSmallMap" && Pe(l, e.value, M.value);
      }, ae = (a) => {
        const l = a.slice(
          a.indexOf("(") + 1,
          a.lastIndexOf(")")
        ).split(",").map((r) => r.trim()), i = {};
        for (let r = 1; r < l.length; r++) {
          const s = l[r].split(" "), p = s[0], n = parseFloat(s[1]) / 100, b = Math.round(n * 100) / 100;
          i[b] = p;
        }
        return i;
      }, te = (a) => {
        try {
          return new g.value.TileLayer({
            bounds: new g.value.Bounds(
              a.bounds[0],
              a.bounds[1]
            ),
            getTileUrl: function(l, i, r) {
              try {
                return a.url.replace("{z}", r).replace("{x}", l).replace("{y}", i);
              } catch {
              }
            },
            type: "sketchTileLayer",
            tileSize: a.tileSize,
            opacity: a.opacity,
            zIndex: a.zIndex,
            zooms: a.zooms
          });
        } catch {
        }
        return null;
      }, oe = (a) => {
        try {
          return new g.value.ImageLayer({
            bounds: new g.value.Bounds(
              a.bounds[0],
              // 左下  手绘图左下相对于地图的经纬度
              a.bounds[1]
              // 右上  手绘图右上相对于地图的经纬度
            ),
            type: "sketchImageLayer",
            opacity: a.opacity,
            url: a.url,
            zIndex: a.zIndex,
            zooms: a.zooms
            // 设置可见级别，[最小级别，最大级别]
          });
        } catch {
        }
        return null;
      }, re = (a, t, l) => {
        try {
          const i = new a.HeatMapLayer({
            zIndex: 10,
            opacity: t.opacity,
            visible: !0,
            zooms: [2, 22]
          }), r = new a.GeoJSONSource({
            data: l
          });
          i.setSource(r, {
            radius: t.style.radius,
            unit: t.style.unit,
            height: t.style.height,
            opacity: t.style.opacity,
            gradient: ae(t.style.gradient),
            value: function(s, p) {
              return p.coordinates[2] || 0;
            },
            min: t.style.min,
            max: t.style.max,
            // 4.6
            heightBezier: [0, 0.53, 0.37, 0.98]
          }), m.value.add(i), H.value = i;
        } catch {
        }
      }, le = (a, t, l) => {
        try {
          const i = new a.GeoJSONSource({
            data: l
          }), r = new a.PointLayer({
            zIndex: t.zIndex,
            blend: t.blend,
            visible: t.visible,
            opacity: t.opacity
          }), s = {
            radius: t.style.radius,
            unit: t.style.unit,
            color: t.style.color,
            borderWidth: t.style.borderWidth,
            blurWidth: t.style.blurWidth,
            borderColor: t.style.borderColor
          };
          r.setSource(i), r.setStyle(s), m.value.add(r), f.value.push({
            type: "locaPointLayer",
            value: r
          }), r.addAnimate({
            key: t.animate.key,
            value: t.animate.value,
            duration: t.animate.duration,
            easing: t.animate.easing,
            transform: t.animate.transform,
            random: t.animate.random,
            delay: t.animate.delay,
            yoyo: t.animate.yoyo,
            repeat: t.animate.repeat
          });
        } catch {
        }
      }, ie = (a, t, l) => {
        try {
          const i = new a.GeoJSONSource({
            data: l
          }), r = new a.ScatterLayer({
            loca: m.value,
            zIndex: t.zIndex,
            opacity: t.opacity,
            visible: t.visible,
            zooms: t.zooms
          });
          r.setSource(i), r.setStyle({
            unit: t.style.unit,
            size: t.style.size,
            borderWidth: t.style.borderWidth,
            texture: t.style.texture,
            duration: t.style.duration,
            animate: t.style.animate
          }), m.value.animate.start(), f.value.push({
            type: "breathRed",
            value: r
          });
        } catch {
        }
      }, se = (a, t, l) => {
        try {
          const i = new a.GeoJSONSource({
            data: l
          }), r = new a.LabelsLayer({
            eventSupport: !0,
            visible: t.visible,
            zooms: t.zooms,
            opacity: t.opacity,
            collision: t.collision,
            allowCollision: t.allowCollision,
            zIndex: t.zIndex
          });
          r.setSource(i), r.setStyle({
            icon: {
              image: t.icon.image,
              size: t.icon.size,
              clipOrigin: t.icon.clipOrigin,
              offset: t.icon.offset,
              anchor: t.icon.anchor
            },
            text: {
              // 每项配置都可使用回调函数来动态配置
              content: (s, p) => p.properties[t.text.content],
              zooms: t.text.zooms,
              offset: t.text.offset,
              direction: t.text.direction,
              style: {
                fontSize: t.text.style.fontSize,
                fillColor: t.text.style.fillColor,
                strokeColor: t.text.style.strokeColor,
                strokeWidth: t.text.style.strokeWidth,
                padding: t.text.style.padding,
                backgroundColor: t.text.style.backgroundColor,
                borderColor: t.text.style.borderColor,
                borderWidth: t.text.style.borderWidth,
                fold: t.text.style.fold,
                fontWeight: t.text.style.fontWeight
              }
            }
          }), r.on("complete", () => {
            const s = r.getLabelsLayer().getAllOverlays();
            for (const p of s)
              p.on("click", (n) => {
                y("amap3d-scene-label-layer-click", n), v.parseEvents(
                  o.useEvents,
                  "amap3d-scene-label-layer-click",
                  n
                );
              }), p.on("mouseover", (n) => {
                y("amap3d-scene-label-layer-mouseover", n), v.parseEvents(
                  o.useEvents,
                  "amap3d-scene-label-layer-mouseover",
                  n
                );
              }), p.on("mouseout", (n) => {
                y("amap3d-scene-label-layer-mouseout", n), v.parseEvents(
                  o.useEvents,
                  "amap3d-scene-label-layer-mouseout",
                  n
                );
              });
          }), m.value.add(r), f.value.push({
            type: "labelsLayer",
            value: r
          });
        } catch {
        }
      }, pe = (a) => {
        e.value && (e.value.setFeatures(a.config.features), e.value.setPitch(a.config.pitch), e.value.setRotation(a.config.rotation), e.value.setStatus({
          dragEnable: a.config.dragEnable,
          zoomEnable: a.config.zoomEnable,
          rotateEnable: a.config.rotateEnable,
          pitchEnable: a.config.pitchEnable
        }), a.config.plugin.scale.visible ? O.value.show() : O.value.hide(), a.config.plugin.toolBar.visible ? x.value.show() : x.value.hide(), a.config.plugin.controlBar.visible ? S.value.show() : S.value.hide());
      }, ne = () => {
        e.value && (e.value.clearMap(), m.value.clear(), R(g.value));
      }, ce = (a) => {
        e.value && e.value.setMapStyle(a.config.mapStyle);
      }, me = (a) => {
        e.value && e.value.setZoom(a.config.zoom, !1, 200);
      }, ue = (a) => {
        e.value && e.value.setCenter(a.config.center, !1, 200);
      }, W = () => {
        e.value && (e.value.clearMap(), e.value.destroy(), e.value = null, m.value && (m.value.clear(), m.value.destroy(), m.value = null));
      };
      return fe(() => {
        setTimeout(() => {
          _(o.basicOption);
        }, 0);
      }), ge(() => W()), {
        initAMap3d: _,
        updateAMapStyle: ce,
        updateAMapConfig: pe,
        updateAMapComponents: ne,
        updateAMapZoom: me,
        updateAMapCenter: ue,
        amap3d: e,
        loading: P,
        AMapPrototype: g,
        showLable: k,
        renderComponentsV2: ee
      };
    }, {
      initAMap3d: L,
      updateAMapStyle: j,
      updateAMapConfig: B,
      updateAMapComponents: $,
      updateAMapZoom: K,
      updateAMapCenter: Y,
      loading: q,
      showLable: Q,
      renderComponentsV2: d
    } = U();
    return h(
      () => o.basicOption.config,
      () => {
        B(o.basicOption);
      },
      { deep: !0 }
    ), h(
      () => o.basicOption.config.zoom,
      () => {
        K(o.basicOption);
      },
      { deep: !0 }
    ), h(
      () => o.basicOption.config.center,
      () => {
        Y(o.basicOption);
      },
      { deep: !0 }
    ), h(
      () => o.basicOption.config.floors,
      N(() => {
        L(o.basicOption);
      }, 300),
      { deep: !0 }
    ), h(
      () => o.basicOption.config.skyColor,
      N(() => {
        L(o.basicOption);
      }, 300),
      { deep: !0 }
    ), h(
      () => o.basicOption.widgets,
      () => {
        $();
      },
      { deep: !0 }
    ), h(
      () => o.basicOption.config.mapStyle,
      () => {
        j(o.basicOption);
      },
      { deep: !0 }
    ), h(
      () => o.basicOption.basic,
      () => {
        L(o.basicOption);
      },
      { deep: !0 }
    ), h(
      () => o.sources,
      () => {
        L(o.basicOption);
      },
      { deep: !0 }
    ), G({
      refresh: () => L(o.basicOption),
      refreshView: () => B(o.basicOption),
      refreshData: () => L(o.basicOption),
      refreshMapLayer: (e, m) => d(e, o.basicOption),
      // 定位点位
      navigatorDot: (e) => {
        e.type = "navigatorDot", d(e, o.basicOption);
      },
      // 清除点位
      clearDotMap: (e) => {
        e.type = "clearDotMap", d(e, o.basicOption);
      },
      // 打点热力图
      loadHeatMap: (e) => {
        e.type = "loadHeatMap", d(e, o.basicOption);
      },
      // 隐藏热力图点位
      hideHeatMap: (e) => {
        e.type = "hideHeatMap", d(e, o.basicOption);
      },
      // 打点方法1
      loadDotlayers: (e) => {
        e.type = "dotlayers", d(e, o.basicOption);
      },
      // 打点方法2
      loadScatter: (e) => {
        e.type = "scatter", d(e, o.basicOption);
      },
      // 打点方法3
      loadLabelsLayer: (e) => {
        e.type = "labelsLayer", d(e, o.basicOption);
      },
      // 打点方法4
      loadDotMap: (e) => {
        e.type = "loadDotMap", d(e, o.basicOption);
      },
      // 行走路线
      loadLineMap: (e) => {
        e.type = "loadLineMap", d(e, o.basicOption);
      },
      hideLineMap: (e) => {
        e.type = "hideLineMap", d(e, o.basicOption);
      },
      // 显示资源名称
      showDotLabelMap: (e) => {
        e.type = "showDotLabelMap", d(e, o.basicOption);
      },
      // 隐藏资源名称
      hideDotLabelMap: (e) => {
        e.type = "hideDotLabelMap", d(e, o.basicOption);
      },
      // 开启实时路况
      showRoadMap: (e) => {
        e.type = "openRoadMap", d(e, o.basicOption);
      },
      // 隐藏实时路况
      hideRoadMap: (e) => {
        e.type = "hideRoadMap", d(e, o.basicOption);
      },
      // 打开小地图
      showSmallMap: (e) => {
        e.type = "showSmallMap", d(e, o.basicOption);
      },
      // 隐藏小地图
      hideSmallMap: (e) => {
        e.type = "hideSmallMap", d(e, o.basicOption);
      }
    }), (e, m) => (ve(), de("div", {
      class: ye(["amap-3d-wrap", { show: J(q), "amap-3d-show": J(Q) }])
    }, Je, 2));
  }
});
export {
  Rr as default
};
