import { reactive as it, computed as F, watch as Xe, onMounted as lt, onUnmounted as at, onDeactivated as ot, toRefs as rt, defineComponent as Ye, ref as st, resolveComponent as d, openBlock as k, createElementBlock as Je, normalizeClass as m, unref as n, createVNode as l, isRef as K, withCtx as r, createBlock as j, withModifiers as M, createElementVNode as I, toDisplayString as et, createTextVNode as b, withDirectives as We, Fragment as ct, renderList as dt, vShow as Ze, createCommentVNode as ae } from "vue";
import { u as pt, o as mt, a as ut, b as yt } from "./layer-select-Ba4IEiWY.js";
import { zondy as gt, SketchStyle as ht, LayerEventType as ft, Extent as bt, GraphicsLayer as vt } from "@mapgis/webclient-common";
import { e as St, u as Lt, _ as _t } from "./utils-B4smQbM-.js";
import "ant-design-vue";
const { SymbolType: oe } = gt.enum, tt = {
  // 标记，用于点图形
  marker: {
    type: oe.simpleMarker,
    // 颜色
    color: "rgba(24, 144, 255, 1)",
    // 大小
    size: 10,
    // 轮廓
    outline: {
      // 颜色
      color: "rgba(255, 255, 255, 1)",
      // 宽度
      width: 1
    }
  },
  // 线，用于线图形
  line: {
    type: oe.simpleLine,
    // 颜色
    color: "rgba(24, 144, 255, 1)",
    // 宽度
    width: 3
  },
  // 填充，用于圆、矩形和多边形图形
  fill: {
    type: oe.simpleFill,
    // 填充颜色
    color: "rgba(24, 144, 255, 0.3)",
    // 轮廓
    outline: {
      // 颜色
      color: "rgba(24, 144, 255, 1)",
      // 宽度
      width: 2
    }
  },
  // 文本，用于文本图形
  text: {
    type: oe.text,
    text: "标注",
    // 字体颜色
    color: "rgba(24, 144, 255, 1)",
    // 字体样式
    font: {
      // 字体名称，推荐设置黑体、宋体、楷体、微软雅黑、Arial、Calibri、Times New Roman等
      family: "微软雅黑",
      // 字体大小，单位像素
      size: 20,
      // 字体是否为斜体，可选"normal"|"italic"|"oblique"
      style: "normal",
      // 字体粗细, 可选"normal"|"bold"|"bolder"|"lighter"
      weight: "normal"
    }
  }
}, nt = {
  // 顶点样式
  vertexStyle: {
    type: "simpleMarker",
    // 颜色
    color: "rgba(24, 144, 255, 1)",
    // 大小
    size: 10,
    // 轮廓
    outline: {
      // 颜色
      color: "rgba(255, 255, 255, 1)",
      // 宽度
      width: 1
    }
  },
  // 捕捉选项
  snapOption: {
    //是否自动捕捉顶点重合
    isSnapVertexCoincident: !1,
    // 是否自动捕捉线上的点
    isSnapVertexInLine: !1,
    // 是否自动捕捉平行线
    isSnapParallel: !1,
    // 是否自动捕捉垂线垂点
    isSnapPerpendicular: !1,
    // 是否捕捉正在绘制的图形的边界
    snapSketchGeometry: !1
  }
}, wt = {
  /**
   * @description 标绘功能项列表
   */
  plottingItems: {
    type: Array
  },
  /**
   * @description 符号样式
   */
  symbolStyle: {
    type: Object,
    default: () => ({ ...tt })
  },
  /**
   * @description 绘制样式
   */
  drawStyle: {
    type: Object,
    default: () => ({ ...nt })
  }
}, Ct = {}, qe = "标绘图层", kt = (R, Ke, re) => {
  const { viewState: A, zondy: B } = pt(), { layerList: s, getLayerById: h, addLayer: se, removeLayerById: ce } = mt(A.view), {
    addPoint: G,
    addPolyline: H,
    addPolygon: U,
    addCircle: de,
    addRectangle: J,
    addText: Q,
    asyncDrawWrapper: pe,
    stopDraw: v,
    setSketchStyle: z,
    getSketchStyle: W,
    setSketchLayer: me,
    setSnapOption: E,
    selectFeatureById: T
  } = ut(
    A,
    { editable: !0 },
    {
      selectFeature: Fe,
      completeFeature: je
    }
  ), { LayerType: ue, SymbolType: y, GeometryType: _ } = B.enum, t = it({
    // 标绘功能项列表
    plottingItems: R.plottingItems,
    // 符号样式
    symbolStyle: R.symbolStyle,
    // 绘制样式
    drawStyle: R.drawStyle,
    // 标绘图形图层列表
    graphicsLayerList: [],
    // 默认选择的图层ID
    currentSelectedLayerId: "",
    // 当前选中图层的图形列表
    currentSelectedLayerGraphicList: [],
    // 当前模式：List、Edit、Add
    mode: "",
    // 添加图层的名称
    newLayerName: "",
    // 编辑图层的ID
    editLayerId: void 0,
    // 编辑图层名称
    editLayerName: "",
    // 激活的标绘项
    activeId: "",
    // 是否开启批量操作
    batchOperation: !1,
    // 当前图形图层内选择的图形列表
    currentSelectedGraphics: [],
    // 当前图形对象
    currentGraphicObject: null,
    // 批量操作是否全部勾选
    allSelect: !1,
    // 自动拾取的图形ID
    autoSelectGraphicId: ""
  }), g = {
    onChange: (e) => {
      g.current = e, P();
    },
    showTotal: (e) => `共${e}条`,
    onShowSizeChange: (e, i) => {
      g.current = e, g.pageSize = i, P();
    },
    buildOptionText: (e) => `${e.value}`,
    showSizeChanger: !0,
    size: "small",
    current: 1,
    pageSize: 10,
    hideOnSinglePage: !1,
    showLessItems: !0
  }, ye = '<svg t="1750054990441" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2306" width="200" height="200"><path d="M548.8 965.6l-96.7-238c-0.6-0.7-2.2-1.7-4.8-2.2-3.1-0.6-6.2-0.1-8.3 1.2L255.1 950.5l1-896 647.1 602.9-276.5-1c-2.8 0.3-4.5 1.3-5.4 2v0.1l0.5 1.4 95.3 243-168.3 62.7z m-104-304.4c4.7 0 9.5 0.4 14.2 1.3 22.5 4.2 40.9 17.6 50.5 36.8l0.6 1.1L584.8 884l49.1-18.3-71.1-181.3c-8.8-18.6-7.9-39.4 2.5-57.4 11.7-20.3 33.6-33.2 58.5-34.6l0.9-0.1h0.9l114.3 0.4-420-391.2-0.6 570 73.9-89.9 1.7-1.6c13.4-12.2 31.4-18.8 49.9-18.8z" p-id="2307"></path></svg>';
  (!t.symbolStyle || !Object.keys(t.symbolStyle).length) && (t.symbolStyle = { ...tt }), (!t.drawStyle || !Object.keys(t.drawStyle).length) && (t.drawStyle = { ...nt });
  const X = [
    {
      // 类型id
      id: "point",
      // 类型标签，显示在标绘面板中，鼠标放到图标上显示的提示信息
      label: "点",
      // 图标，显示在标绘面板中的图标
      icon: '<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="128" height="128"><defs><style/></defs><path d="M511.998 327.419c-101.94 0-184.576 82.642-184.576 184.577s82.642 184.582 184.576 184.582c101.946 0 184.581-82.647 184.581-184.582 0-101.942-82.635-184.577-184.581-184.577z"/></svg>',
      // 符号
      symbol: { ...t.symbolStyle.marker },
      // 符号类型
      symbolType: [y.simpleMarker, y.pictureMarker],
      // 几何类型
      geometryType: _.point,
      // 点击图标后触发的函数
      action: () => {
        C("vertexStyle"), L(G);
      }
    },
    {
      id: "polyline",
      label: "线",
      icon: '<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="128" height="128"><defs><style/></defs><path d="M883.2 238.933c-53.333 0-98.133 44.8-98.133 98.134 0 19.2 6.4 36.266 14.933 51.2L680.533 507.733c-14.933-10.666-32-14.933-51.2-14.933-27.733 0-53.333 12.8-70.4 29.867l-87.466-51.2v-8.534c0-53.333-44.8-98.133-98.134-98.133s-96 44.8-96 98.133c0 14.934 4.267 27.734 8.534 40.534L192 608c-14.933-8.533-29.867-12.8-46.933-12.8-53.334 0-98.134 44.8-98.134 98.133s44.8 96 98.134 96 98.133-44.8 98.133-98.133c0-21.333-6.4-40.533-19.2-57.6l87.467-96c17.066 14.933 38.4 23.467 61.866 23.467 36.267 0 66.134-19.2 83.2-49.067l78.934 46.933c-4.267 10.667-6.4 19.2-6.4 29.867 0 53.333 44.8 98.133 98.133 98.133s98.133-44.8 98.133-98.133c0-19.2-6.4-36.267-14.933-51.2l119.467-119.467c14.933 10.667 32 14.934 51.2 14.934 53.333 0 98.133-44.8 98.133-98.134s-42.667-96-96-96z"/></svg>',
      symbol: { ...t.symbolStyle.line },
      symbolType: [y.simpleLine],
      geometryType: _.lineString,
      action: () => {
        C("lineStyle"), L(H);
      }
    },
    {
      id: "circle",
      label: "圆",
      icon: '<svg class="icon" viewBox="0 0 1151 1024" xmlns="http://www.w3.org/2000/svg" width="143.875" height="128"><defs><style/></defs><path d="M511.977 1024a511.977 511.977 0 1 1 503.018-607.973h72.957v191.991h-72.957A512.17 512.17 0 0 1 511.977 1024zm511.978-543.976h-95.996v63.997h95.996v-63.997zM863.962 608.018v-63.997l-296.563.064a63.997 63.997 0 1 1 0-64.06h296.563v-63.998h85.692a447.98 447.98 0 1 0 0 191.991h-85.692z"/></svg>',
      symbol: { ...t.symbolStyle.fill },
      symbolType: [y.simpleFill, y.pictureFill],
      geometryType: _.circle,
      action: () => {
        C("fillStyle"), L(de);
      }
    },
    {
      id: "rectangle",
      label: "矩形",
      icon: '<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="128" height="128"><defs><style/></defs><path d="M256 864a96 96 0 1 1-96-96V256a96 96 0 1 1 96-96h512a96 96 0 1 1 96 96v512a96 96 0 1 1-96 96H256zm-24.448-64h560.896a96.64 96.64 0 0 1 7.552-7.552V231.552a96.64 96.64 0 0 1-7.552-7.552H231.552a96.64 96.64 0 0 1-7.552 7.552v560.896c2.624 2.368 5.12 4.928 7.552 7.552z"/></svg>',
      symbol: { ...t.symbolStyle.fill },
      symbolType: [y.simpleFill, y.pictureFill],
      geometryType: _.extent,
      action: () => {
        C("fillStyle"), L(J);
      }
    },
    {
      id: "polygon",
      label: "多边形",
      icon: '<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="128" height="128"><defs><style/></defs><path d="M429.15 14.897c-45.775 0-82.85 37.076-82.85 82.85v2.61L136.562 232.38a83.223 83.223 0 0 0-38.815-10.357c-45.775 0-82.85 37.076-82.85 82.85 0 30.573 16.652 56.795 41.425 71.21v478.918c-24.773 14.416-41.426 40.597-41.426 71.21 0 45.775 37.076 82.85 82.85 82.85 30.573 0 56.795-16.653 71.21-41.425H689.3c14.416 24.772 40.597 41.425 71.21 41.425 45.775 0 82.85-37.075 82.85-82.85 0-16.487-4.556-32.353-12.966-45.32l101.036-203.19a83.058 83.058 0 0 0 10.357-164.417l-78.957-236.87c13.09-14.747 21.997-33.222 21.997-54.39 0-45.775-37.076-82.851-82.85-82.851-21.21 0-39.644 8.906-54.392 21.997L510.757 80.93a83.348 83.348 0 0 0-81.607-66.033zm54.39 144.989l236.87 77.672c6.338 33.347 32.726 59.694 66.032 66.032L865.4 539.175a82.436 82.436 0 0 0-21.997 55.675c0 17.15 5.344 33.348 14.25 46.604l-102.28 201.948a82.353 82.353 0 0 0-66.032 41.425H169a82.063 82.063 0 0 0-29.826-29.785V376.125c24.772-14.416 41.425-40.596 41.425-71.21v-2.61l209.736-132.022c11.6 6.131 24.731 10.357 38.816 10.357 20.878 0 39.768-7.913 54.39-20.713z"/></svg>',
      symbol: { ...t.symbolStyle.fill },
      symbolType: [y.simpleFill, y.pictureFill],
      geometryType: _.polygon,
      action: () => {
        C("fillStyle"), L(U);
      }
    },
    {
      id: "text",
      label: "文本",
      icon: '<svg t="1749546458259" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1497" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M853.333333 138.666667H170.666667c-17.066667 0-32 14.933333-32 32v128c0 17.066667 14.933333 32 32 32s32-14.933333 32-32V202.666667h277.333333v618.666666H384c-17.066667 0-32 14.933333-32 32s14.933333 32 32 32h256c17.066667 0 32-14.933333 32-32s-14.933333-32-32-32h-96v-618.666666h277.333333V298.666667c0 17.066667 14.933333 32 32 32s32-14.933333 32-32V170.666667c0-17.066667-14.933333-32-32-32z" fill="currentColor" p-id="1498"/></svg>',
      symbol: { ...t.symbolStyle.text },
      symbolType: [y.text, y.mapgisText],
      geometryType: _.point,
      action: () => {
        C("textStyle"), L(Q);
      }
    }
  ];
  !t.plottingItems || t.plottingItems.length === 0 ? t.plottingItems = [...X] : t.plottingItems = t.plottingItems.map((e) => {
    const i = X.find((o) => o.id === e.id);
    return i ? { ...i, ...e } : e;
  });
  const ge = F(() => t.mode === "Edit"), he = F(() => t.currentSelectedGraphics.length > 0), fe = F(() => function(e) {
    return t.currentSelectedGraphics.find((i) => i.id === e.id) !== void 0;
  }), be = F(() => (e) => {
    const i = D(e), o = t.plottingItems.find((p) => p.geometryType === i.geometry.type && p.symbolType.includes(i.symbol.type));
    return o ? o.icon : "";
  }), Y = F(() => (e) => t.plottingItems.find((o) => o.geometryType === e.geometry.type && o.symbolType.includes(e.symbol.type)).label), ve = F(() => {
    const { plottingItems: e } = t, i = e.find((o) => o.id === t.activeId);
    return i ? i.symbol : null;
  });
  Xe(() => s.value, ne), Xe(() => t.currentSelectedLayerId, Re), lt(() => {
    x();
  }), at(() => {
    w();
  }), ot(() => {
    w();
  });
  function Se() {
    return t.currentSelectedLayerId;
  }
  function Le() {
    return t.plottingItems.map((e) => ({
      id: e.id,
      symbol: e.symbol instanceof B.symbol.Symbol ? e.symbol.toJSON() : e.symbol
    }));
  }
  function w() {
    t.activeId = "", v();
  }
  function _e() {
    w(), [...t.graphicsLayerList].forEach((i) => {
      ee(i.id);
    }), t.currentSelectedLayerId = "", t.currentSelectedLayerGraphicList = [], t.mode = "";
  }
  function we(e) {
    const i = t.graphicsLayerList.find((o) => o.id === e);
    if (i) {
      const o = h(e);
      o && (o.visible = !i.visible, o.visible || v());
    }
  }
  function Ce(e) {
    e.preventDefault();
    const i = {
      id: `${qe}${Lt()}`,
      title: t.newLayerName || `${qe}${t.graphicsLayerList.length + 1}`
    }, o = new vt(i);
    se(o), t.newLayerName = "", setTimeout(() => {
      var p;
      t.currentSelectedLayerId = i.id, (p = re.value) == null || p.focus();
    }, 0);
  }
  function ke(e) {
    t.editLayerId = e;
    const i = t.graphicsLayerList.find((o) => o.id === e);
    t.editLayerName = i.name;
  }
  function xe(e) {
    const i = h(e);
    i && i.removeAll();
  }
  function ee(e) {
    ce(e), t.currentSelectedLayerId === e && (t.currentSelectedLayerId = void 0);
  }
  function Ie(e) {
    e.stopPropagation();
    const { editLayerName: i, editLayerId: o } = t;
    if (i !== void 0 && i.trim().length > 0) {
      const p = t.graphicsLayerList.find((He) => He.id === o), u = h(o);
      p.title = i, u.title = i, t.editLayerId = void 0, t.editLayerName = void 0;
    }
  }
  function Ge(e) {
    e.stopPropagation(), t.editLayerId = void 0, t.editLayerName = void 0;
  }
  function ze(e) {
    t.activeId = e.id, e.action();
  }
  function Te() {
    w();
  }
  function Ne() {
    const e = h(t.currentSelectedLayerId);
    let i = e.extent;
    !i && e.graphics.items.length > 0 && e.graphics.items.map((o) => {
      const p = o.geometry;
      let u = p.extent;
      p.type === _.extent && (u = p), i || (i = new bt({ ...u })), u.xmin < i.xmin && (i.xmin = u.xmin), u.xmax > i.xmax && (i.xmax = u.xmax), u.ymin < i.ymin && (i.ymin = u.ymin), u.ymax > i.ymax && (i.ymax = u.ymax);
    }), i && A.view.goTo({
      target: i
    });
  }
  function Oe(e) {
    w(), T(e.id), t.mode = "List", t.autoSelectGraphicId = e.id;
  }
  function Pe(e) {
    O(e, !e.visible);
  }
  function te(e) {
    w(), t.mode = "Edit", t.currentGraphicObject = D(e), T(e.id), t.autoSelectGraphicId = e.id;
  }
  function Me(e) {
    le(e);
  }
  function Be(e, i) {
    const o = t.currentSelectedGraphics.findIndex((p) => p.id === e.id);
    i.target.checked ? o === -1 && t.currentSelectedGraphics.push(e) : o !== -1 && t.currentSelectedGraphics.splice(o, 1);
  }
  function Ee() {
    P();
  }
  function Ve(e) {
    t.currentSelectedLayerGraphicList.length !== 0 && (g.current - 1) * g.pageSize >= t.currentSelectedLayerGraphicList.length && (g.current -= 1), e.target.checked ? (t.currentSelectedGraphics = [], t.currentSelectedGraphics.push(
      ...t.currentSelectedLayerGraphicList.slice(
        (g.current - 1) * g.pageSize,
        g.current * g.pageSize
      )
    )) : t.currentSelectedGraphics = [];
  }
  function Qe() {
    t.currentSelectedGraphics.forEach((e) => {
      le(e);
    }), P();
  }
  function a({ key: e }) {
    e === "visible" ? t.currentSelectedGraphics.forEach((i) => {
      O(i, !0);
    }) : e === "invisible" && t.currentSelectedGraphics.forEach((i) => {
      O(i, !1);
    });
  }
  function $e() {
    t.mode = "List";
  }
  function V(e) {
    const i = t.currentSelectedLayerGraphicList.find(
      (o) => o.id === t.currentGraphicObject.id
    );
    i && (i.name = e.target.value);
  }
  function Z({ symbol: e }) {
    t.currentGraphicObject.symbol = e;
  }
  function N({ symbol: e }) {
    const { plottingItems: i } = t;
    i.find((o) => {
      o.id === t.activeId && (o.symbol = e, o.action());
    });
  }
  function x() {
    S();
  }
  function S() {
    $();
  }
  function $() {
    z(De()), E(t.drawStyle.snapOption);
  }
  function De() {
    const { drawStyle: e } = t;
    return new ht({
      vertexStyle: B.symbol.Symbol.fromJSON({
        ...e.vertexStyle
      })
    });
  }
  function C(e) {
    const { plottingItems: i } = t;
    i.find((o) => {
      if (o.id === t.activeId) {
        const p = W();
        p[e] = B.symbol.Symbol.fromJSON({
          ...o.symbol
        });
      }
    });
  }
  async function L(e) {
    v(), t.currentSelectedLayerId && (await pe(e), L(e));
  }
  function Fe(e) {
    t.mode = "Edit", t.currentGraphicObject = e, t.autoSelectGraphicId = e.id;
  }
  function je() {
    t.mode = "List", t.currentGraphicObject = null, t.autoSelectGraphicId = "";
  }
  function ne() {
    t.graphicsLayerList = s.value.filter(
      (e) => e.type === ue.graphics && e.id.startsWith(qe)
    ), t.graphicsLayerList.forEach((e) => {
      h(e.id).on(ft.layerUpdate, Ae);
    });
  }
  function Re() {
    const e = h(t.currentSelectedLayerId);
    e && (me(e), t.currentSelectedLayerGraphicList = ie());
  }
  function Ae(e) {
    const i = e.updateContent;
    if (i.length > 0) {
      e.layer.id === t.currentSelectedLayerId && (t.currentSelectedLayerGraphicList = ie());
      const o = t.graphicsLayerList.find((p) => p.id === e.layer.id);
      for (let p = 0; p < i.length; p++)
        i[p].name === "visible" && (o.visible = e.layer.visible);
    }
  }
  function ie() {
    const e = h(t.currentSelectedLayerId);
    return e ? e.graphics.items.map((i) => (i.attributes.featureName || (i.attributes.featureName = `${Y.value(i)}${t.currentSelectedLayerGraphicList.length + 1}`), {
      id: i.id,
      visible: i.visible,
      name: i.attributes.featureName
    })) : [];
  }
  function O(e, i) {
    const o = D(e);
    if (e.visible = i, o) {
      if (o.visible === i)
        return;
      o.visible = i;
    }
  }
  function P() {
    t.allSelect = !1, t.currentSelectedGraphics = [];
  }
  function le(e) {
    const i = h(t.currentSelectedLayerId), o = D(e);
    o && (i.remove(o), v());
  }
  function D(e) {
    return h(t.currentSelectedLayerId).graphics.items.find((o) => o.id == e.id);
  }
  return {
    ...rt(t),
    // 下面是计算属性
    parametersVisible: ge,
    isSelectedGraphicValid: he,
    isGraphicSelected: fe,
    graphicIcon: be,
    graphicTypeDesc: Y,
    activeSymbol: ve,
    // 下面是普通数据
    emptyImage: St,
    pagination: g,
    selectSvg: ye,
    // 下面是方法
    getCurrentSelectedLayerId: Se,
    getPlottingItemsSymbolStyle: Le,
    clearState: w,
    clear: _e,
    showOrHideLayer: we,
    addLayer: Ce,
    editLayer: ke,
    clearLayer: xe,
    deleteLayer: ee,
    handleEditLayerOk: Ie,
    handleEditLayerCancel: Ge,
    handlePlottingClick: ze,
    handleSelectGraphicClick: Te,
    handleLayerZoomToClick: Ne,
    handleGraphicAutoSelectClick: Oe,
    handleGraphicIconClick: Pe,
    handleGraphicSettingClick: te,
    handleGraphicDeleteClick: Me,
    handleGraphicSelectChange: Be,
    handleBatchOperationChange: Ee,
    handleAllSelectChange: Ve,
    handleBatchGraphicDeleteClick: Qe,
    handleMoreOperationClick: a,
    handleReturnGraphicList: $e,
    handleGraphicNameChange: V,
    handleSymbolChange: Z,
    handleDefaultSymbolChange: N
  };
}, xt = ["title"], It = { key: 1 }, Gt = /* @__PURE__ */ Ye({
  name: "MapgisBasicPlotting",
  __name: "basic-plotting",
  props: wt,
  emits: Ct,
  setup(R, { expose: Ke, emit: re }) {
    const A = R, B = re, s = yt("basic-plotting"), h = st(), se = Ye({
      props: {
        vnodes: {
          type: Object,
          required: !0
        }
      },
      render() {
        return this.vnodes;
      }
    }), {
      graphicsLayerList: ce,
      currentSelectedLayerId: G,
      currentSelectedLayerGraphicList: H,
      newLayerName: U,
      editLayerId: de,
      editLayerName: J,
      activeId: Q,
      plottingItems: pe,
      batchOperation: v,
      currentGraphicObject: z,
      allSelect: W,
      autoSelectGraphicId: me,
      // 下面是计算属性
      parametersVisible: E,
      isSelectedGraphicValid: T,
      isGraphicSelected: ue,
      graphicIcon: y,
      graphicTypeDesc: _,
      activeSymbol: t,
      // 下面是普通数据
      emptyImage: g,
      pagination: ye,
      selectSvg: X,
      // 下面是方法
      getCurrentSelectedLayerId: ge,
      getPlottingItemsSymbolStyle: he,
      clear: fe,
      clearState: be,
      addLayer: Y,
      showOrHideLayer: ve,
      editLayer: Se,
      clearLayer: Le,
      deleteLayer: w,
      handleEditLayerOk: _e,
      handleEditLayerCancel: we,
      handlePlottingClick: Ce,
      handleSelectGraphicClick: ke,
      handleLayerZoomToClick: xe,
      handleGraphicAutoSelectClick: ee,
      handleGraphicIconClick: Ie,
      handleGraphicSettingClick: Ge,
      handleGraphicDeleteClick: ze,
      handleGraphicSelectChange: Te,
      handleBatchOperationChange: Ne,
      handleAllSelectChange: Oe,
      handleBatchGraphicDeleteClick: Pe,
      handleMoreOperationClick: te,
      handleReturnGraphicList: Me,
      handleGraphicNameChange: Be,
      handleSymbolChange: Ee,
      handleDefaultSymbolChange: Ve
    } = kt(A, B, h);
    return Ke({
      getCurrentSelectedLayerId: ge,
      getPlottingItemsSymbolStyle: he,
      clear: fe,
      clearState: be
    }), (Qe, a) => {
      const $e = d("a-divider"), V = d("a-input"), Z = d("mapgis-ui-iconfont"), N = d("a-button"), x = d("a-flex"), S = d("mapgis-ui-icon-identity"), $ = d("a-popconfirm"), De = d("a-select"), C = d("mapgis-ui-toolbar-command"), L = d("mapgis-ui-toolbar-command-group"), Fe = d("mapgis-ui-toolbar-space"), je = d("mapgis-ui-toolbar"), ne = d("a-col"), Re = d("mapgis-symbol-style-renderer"), Ae = d("a-row"), ie = d("a-empty"), O = d("a-checkbox"), P = d("mapgis-ui-group-tab"), le = d("a-list-item"), D = d("a-list"), e = d("a-menu-item"), i = d("a-menu"), o = d("a-dropdown"), p = d("a-form-item"), u = d("mapgis-symbol-style"), He = d("mapgis-ui-setting-form");
      return k(), Je("div", {
        class: m([n(s).b()])
      }, [
        l(De, {
          value: n(G),
          "onUpdate:value": a[6] || (a[6] = (c) => K(G) ? G.value = c : null),
          style: { width: "100%" },
          placeholder: "请选择标绘图层",
          disabled: n(E),
          "field-names": { label: "title", value: "id" },
          options: n(ce)
        }, {
          dropdownRender: r(({ menuNode: c }) => [
            l(n(se), { vnodes: c }, null, 8, ["vnodes"]),
            l($e, { style: { margin: "4px 0" } }),
            l(x, null, {
              default: r(() => [
                l(V, {
                  ref_key: "newLayerNameInputRef",
                  ref: h,
                  value: n(U),
                  "onUpdate:value": a[0] || (a[0] = (f) => K(U) ? U.value = f : null),
                  placeholder: "请输入图层名称"
                }, null, 8, ["value"]),
                l(N, {
                  onClick: n(Y),
                  style: { "margin-left": "8px" }
                }, {
                  icon: r(() => [
                    l(Z, {
                      type: "mapgis-plus",
                      class: "anticon"
                    })
                  ]),
                  default: r(() => [
                    a[12] || (a[12] = b(" 添加图层 ", -1))
                  ]),
                  _: 1
                }, 8, ["onClick"])
              ]),
              _: 1
            })
          ]),
          option: r(({ id: c, title: f, visible: Ue }) => [
            n(de) !== c ? (k(), j(x, {
              key: 0,
              justify: "space-between",
              align: "center",
              class: m([n(s).e("layer"), !Ue && n(s).em("layer", "invisible")])
            }, {
              default: r(() => [
                l(x, null, {
                  default: r(() => [
                    l(S, {
                      title: "显影",
                      class: m([n(s).e("operation"), n(s).em("operation", "visible")]),
                      icon: Ue ? "mapgis-show" : "mapgis-hide",
                      width: 14,
                      height: 14,
                      onClick: M((q) => n(ve)(c), ["stop"])
                    }, null, 8, ["class", "icon", "onClick"])
                  ]),
                  _: 2
                }, 1024),
                I("span", {
                  title: f,
                  class: m([n(s).em("layer", "name")])
                }, et(f), 11, xt),
                l(x, null, {
                  default: r(() => [
                    l(S, {
                      title: "编辑",
                      class: m([n(s).e("operation"), n(s).em("operation", "edit")]),
                      icon: "mapgis-bianji",
                      width: 13,
                      height: 13,
                      onClick: M((q) => n(Se)(c), ["stop"])
                    }, null, 8, ["class", "onClick"]),
                    l($, {
                      placement: "top",
                      "ok-text": "确认",
                      "cancel-text": "取消",
                      onConfirm: (q) => n(Le)(c),
                      overlayStyle: { zIndex: 1070 }
                    }, {
                      title: r(() => [...a[13] || (a[13] = [
                        I("p", null, "您确认要清除当前图层的全部标绘吗？", -1)
                      ])]),
                      default: r(() => [
                        l(S, {
                          title: "清除",
                          class: m([n(s).e("operation"), n(s).em("operation", "edit")]),
                          icon: "mapgis-clear",
                          width: 15,
                          height: 15,
                          onClick: a[1] || (a[1] = M(() => {
                          }, ["stop"]))
                        }, null, 8, ["class"])
                      ]),
                      _: 1
                    }, 8, ["onConfirm"]),
                    l($, {
                      placement: "top",
                      "ok-text": "确认",
                      "cancel-text": "取消",
                      onConfirm: (q) => n(w)(c),
                      overlayStyle: { zIndex: 1070 }
                    }, {
                      title: r(() => [...a[14] || (a[14] = [
                        I("p", null, "您确认要删除当前图层吗？", -1)
                      ])]),
                      default: r(() => [
                        l(S, {
                          title: "删除",
                          class: m([n(s).e("operation"), n(s).em("operation", "delete")]),
                          icon: "mapgis-shanchu",
                          width: 13,
                          height: 13,
                          onClick: a[2] || (a[2] = M(() => {
                          }, ["stop"]))
                        }, null, 8, ["class"])
                      ]),
                      _: 1
                    }, 8, ["onConfirm"])
                  ]),
                  _: 2
                }, 1024)
              ]),
              _: 2
            }, 1032, ["class"])) : (k(), j(x, {
              key: 1,
              justify: "space-between",
              align: "center",
              vertical: !1,
              gap: "small"
            }, {
              default: r(() => [
                l(V, {
                  value: n(J),
                  "onUpdate:value": a[3] || (a[3] = (q) => K(J) ? J.value = q : null),
                  placeholder: "请输入图层名",
                  onMousedown: a[4] || (a[4] = M(() => {
                  }, ["stop"])),
                  onClick: a[5] || (a[5] = M(() => {
                  }, ["stop"]))
                }, null, 8, ["value"]),
                l(N, {
                  size: "small",
                  type: "primary",
                  onClick: n(_e)
                }, {
                  default: r(() => [...a[15] || (a[15] = [
                    b("确认", -1)
                  ])]),
                  _: 1
                }, 8, ["onClick"]),
                l(N, {
                  size: "small",
                  onClick: n(we)
                }, {
                  default: r(() => [...a[16] || (a[16] = [
                    b("取消", -1)
                  ])]),
                  _: 1
                }, 8, ["onClick"])
              ]),
              _: 1
            }))
          ]),
          _: 1
        }, 8, ["value", "disabled", "options"]),
        We(l(je, {
          class: m([n(s).e("toolbar")]),
          size: "small"
        }, {
          default: r(() => [
            l(L, {
              removeFirstCommandLeftMargin: !1,
              removeLastCommandRightMargin: !1
            }, {
              default: r(() => [
                (k(!0), Je(ct, null, dt(n(pe), (c, f) => (k(), j(C, {
                  key: f,
                  title: c.label,
                  icon: c.icon,
                  active: c.id === n(Q),
                  disabled: !n(G),
                  size: "small",
                  onClick: (Ue) => n(Ce)(c)
                }, null, 8, ["title", "icon", "active", "disabled", "onClick"]))), 128))
              ]),
              _: 1
            }),
            l(Fe),
            l(L, {
              removeFirstCommandLeftMargin: !1,
              removeLastCommandRightMargin: !1
            }, {
              default: r(() => [
                l(C, {
                  title: "选择标绘",
                  disabled: !n(G),
                  icon: n(X),
                  size: "small",
                  onClick: n(ke)
                }, null, 8, ["disabled", "icon", "onClick"])
              ]),
              _: 1
            })
          ]),
          _: 1
        }, 8, ["class"]), [
          [Ze, !n(E)]
        ]),
        n(Q) ? (k(), j(Ae, {
          key: 0,
          align: "middle",
          class: m([n(s).e("renderer")])
        }, {
          default: r(() => [
            l(ne, { span: "8" }, {
              default: r(() => [...a[17] || (a[17] = [
                b("符号样式", -1)
              ])]),
              _: 1
            }),
            l(ne, {
              span: "16",
              class: m([n(s).em("renderer", "content")])
            }, {
              default: r(() => [
                l(Re, {
                  symbol: n(t),
                  onChange: n(Ve)
                }, null, 8, ["symbol", "onChange"])
              ]),
              _: 1
            }, 8, ["class"])
          ]),
          _: 1
        }, 8, ["class"])) : ae("", !0),
        We(I("div", null, [
          l(D, {
            "item-layout": "horizontal",
            size: "small",
            pagination: n(ye),
            "data-source": n(H),
            class: m([n(H).length === 0 && n(s).e("empty")])
          }, {
            header: r(() => [
              l(P, { title: "标绘列表" }, {
                handle: r(() => [
                  l(x, { align: "center" }, {
                    default: r(() => [
                      l(S, {
                        class: m([n(s).e("zoom")]),
                        title: "缩放至该标绘图层",
                        icon: "mapgis-map",
                        width: 16,
                        height: 16,
                        onClick: n(xe)
                      }, null, 8, ["class", "onClick"]),
                      l(O, {
                        checked: n(v),
                        "onUpdate:checked": a[7] || (a[7] = (c) => K(v) ? v.value = c : null),
                        onChange: n(Ne)
                      }, {
                        default: r(() => [...a[19] || (a[19] = [
                          b(" 批量操作 ", -1)
                        ])]),
                        _: 1
                      }, 8, ["checked", "onChange"])
                    ]),
                    _: 1
                  })
                ]),
                _: 1
              })
            ]),
            renderItem: r(({ item: c }) => [
              l(le, {
                key: "item.id",
                class: m([n(s).e("item"), n(me) === c.id && n(s).em("item", "hover")]),
                onClick: (f) => n(ee)(c)
              }, {
                default: r(() => [
                  l(S, {
                    icon: n(y)(c),
                    width: 16,
                    height: 16,
                    class: m([c.visible && n(s).em("item", "visible")]),
                    onClick: (f) => n(Ie)(c)
                  }, null, 8, ["icon", "class", "onClick"]),
                  I("span", {
                    class: m(n(s).em("item", "name"))
                  }, et(c.name), 3),
                  l(S, {
                    title: "配置",
                    class: m([n(s).e("operation"), n(s).em("item", "icon")]),
                    icon: "mapgis-setting",
                    width: 16,
                    height: 16,
                    onClick: M((f) => n(Ge)(c), ["stop"])
                  }, null, 8, ["class", "onClick"]),
                  l($, {
                    title: "确定删除该标绘吗?",
                    "ok-text": "确定",
                    "cancel-text": "取消",
                    onConfirm: (f) => n(ze)(c)
                  }, {
                    default: r(() => [
                      l(S, {
                        title: "删除",
                        class: m([n(s).e("operation"), n(s).em("item", "icon")]),
                        icon: "mapgis-delete",
                        width: 16,
                        height: 16
                      }, null, 8, ["class"])
                    ]),
                    _: 1
                  }, 8, ["onConfirm"]),
                  l(O, {
                    class: m([n(s).e("select"), n(v) && n(s).em("select", "visible")]),
                    checked: n(ue)(c),
                    onChange: (f) => n(Te)(c, f)
                  }, null, 8, ["class", "checked", "onChange"])
                ]),
                _: 2
              }, 1032, ["class", "onClick"])
            ]),
            default: r(() => [
              n(H).length === 0 ? (k(), j(ie, {
                key: 0,
                image: n(g),
                class: m([n(s).em("empty", "image")])
              }, {
                description: r(() => [...a[18] || (a[18] = [
                  I("span", null, [
                    b(" 选择上方标绘图层 "),
                    I("br"),
                    b(" 点击绘制图标进行添加 ")
                  ], -1)
                ])]),
                _: 1
              }, 8, ["image", "class"])) : ae("", !0)
            ]),
            _: 1
          }, 8, ["pagination", "data-source", "class"]),
          We(I("div", {
            class: m(n(s).e("footer"))
          }, [
            l(O, {
              checked: n(W),
              "onUpdate:checked": a[8] || (a[8] = (c) => K(W) ? W.value = c : null),
              onChange: n(Oe)
            }, {
              default: r(() => [...a[20] || (a[20] = [
                b("全选", -1)
              ])]),
              _: 1
            }, 8, ["checked", "onChange"]),
            l($, {
              title: "确定删除所选择的标绘吗?",
              disabled: !n(T),
              "ok-text": "确定",
              "cancel-text": "取消",
              onConfirm: n(Pe)
            }, {
              default: r(() => [
                l(N, {
                  danger: "",
                  disabled: !n(T)
                }, {
                  default: r(() => [...a[21] || (a[21] = [
                    b("删除", -1)
                  ])]),
                  _: 1
                }, 8, ["disabled"])
              ]),
              _: 1
            }, 8, ["disabled", "onConfirm"]),
            l(o, null, {
              overlay: r(() => [
                l(i, null, {
                  default: r(() => [
                    l(e, {
                      key: "visible",
                      disabled: !n(T),
                      onClick: a[9] || (a[9] = (c) => n(te)({ key: "visible" }))
                    }, {
                      default: r(() => [...a[22] || (a[22] = [
                        b(" 显示 ", -1)
                      ])]),
                      _: 1
                    }, 8, ["disabled"]),
                    l(e, {
                      key: "invisible",
                      disabled: !n(T),
                      onClick: a[10] || (a[10] = (c) => n(te)({ key: "invisible" }))
                    }, {
                      default: r(() => [...a[23] || (a[23] = [
                        b(" 隐藏 ", -1)
                      ])]),
                      _: 1
                    }, 8, ["disabled"])
                  ]),
                  _: 1
                })
              ]),
              default: r(() => [
                l(N, null, {
                  default: r(() => [
                    a[24] || (a[24] = b(" 更多 ", -1)),
                    l(Z, { type: "mapgis-down" })
                  ]),
                  _: 1
                })
              ]),
              _: 1
            })
          ], 2), [
            [Ze, n(v)]
          ])
        ], 512), [
          [Ze, !n(E)]
        ]),
        n(E) ? (k(), Je("div", It, [
          l(P, {
            title: "标绘列表",
            hasLeftMargin: !1,
            class: m(n(s).m("home")),
            onClick: n(Me)
          }, {
            front: r(() => [
              l(Z, { type: "mapgis-left" })
            ]),
            _: 1
          }, 8, ["class", "onClick"]),
          l(He, {
            layout: "horizontal",
            itemLayout: "grid",
            size: "default",
            class: m(n(s).e("form"))
          }, {
            default: r(() => [
              l(p, { label: "标绘名称" }, {
                default: r(() => [
                  l(V, {
                    value: n(z).attributes.featureName,
                    "onUpdate:value": a[11] || (a[11] = (c) => n(z).attributes.featureName = c),
                    placeholder: "请输入标绘名称",
                    onChange: n(Be)
                  }, null, 8, ["value", "onChange"])
                ]),
                _: 1
              }),
              l(p, { label: "标绘类型" }, {
                default: r(() => [
                  l(V, {
                    value: n(_)(n(z)),
                    disabled: ""
                  }, null, 8, ["value"])
                ]),
                _: 1
              }),
              n(z) ? (k(), j(u, {
                key: 0,
                hasFormWrapper: !1,
                symbol: n(z).symbol,
                onChange: n(Ee)
              }, null, 8, ["symbol", "onChange"])) : ae("", !0)
            ]),
            _: 1
          }, 8, ["class"])
        ])) : ae("", !0)
      ], 2);
    };
  }
}), Mt = /* @__PURE__ */ _t(Gt, [["__scopeId", "data-v-c1b33ed2"]]);
export {
  Mt as B,
  wt as a,
  Ct as b,
  tt as c,
  nt as d,
  kt as u
};
