(function webpackUniversalModuleDefinition(root, factory) {
	if(typeof exports === 'object' && typeof module === 'object')
		module.exports = factory(require("vue"), require("@kq_npm/client_common_vue/_utils/util"), require("@kq_npm/client_common_vue/_utils/mitt"), require("@kq_npm/client_common_vue/_utils/gis-utils"), require("@kq_npm/client_common_vue/_types/global-event"), require("@kq_npm/client_common_vue/init.js"));
	else if(typeof define === 'function' && define.amd)
		define(["vue", "@kq_npm/client_common_vue/_utils/util", "@kq_npm/client_common_vue/_utils/mitt", "@kq_npm/client_common_vue/_utils/gis-utils", "@kq_npm/client_common_vue/_types/global-event", "@kq_npm/client_common_vue/init.js"], factory);
	else {
		var a = typeof exports === 'object' ? factory(require("vue"), require("@kq_npm/client_common_vue/_utils/util"), require("@kq_npm/client_common_vue/_utils/mitt"), require("@kq_npm/client_common_vue/_utils/gis-utils"), require("@kq_npm/client_common_vue/_types/global-event"), require("@kq_npm/client_common_vue/init.js")) : factory(root["Vue"], root["@kq_npm/client_common_vue/_utils/util"], root["@kq_npm/client_common_vue/_utils/mitt"], root["@kq_npm/client_common_vue/_utils/gis-utils"], root["@kq_npm/client_common_vue/_types/global-event"], root["@kq_npm/client_common_vue/init.js"]);
		for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
	}
})(this, function(__WEBPACK_EXTERNAL_MODULE__154__, __WEBPACK_EXTERNAL_MODULE__2975__, __WEBPACK_EXTERNAL_MODULE__6149__, __WEBPACK_EXTERNAL_MODULE__64__, __WEBPACK_EXTERNAL_MODULE__3353__, __WEBPACK_EXTERNAL_MODULE__455__) {
return /******/ (function() { // webpackBootstrap
/******/ 	"use strict";
/******/ 	var __webpack_modules__ = ({

/***/ 9371:
/***/ (function(module) {

module.exports = require("@element-plus/icons-vue");

/***/ }),

/***/ 5698:
/***/ (function(module) {

module.exports = require("@kq_npm/client_icons_vue");

/***/ }),

/***/ 3658:
/***/ (function(module) {

module.exports = require("core-js/modules/esnext.iterator.constructor.js");

/***/ }),

/***/ 4669:
/***/ (function(module) {

module.exports = require("core-js/modules/esnext.iterator.for-each.js");

/***/ }),

/***/ 3579:
/***/ (function(module) {

module.exports = require("vue-i18n/dist/vue-i18n.cjs.js");

/***/ }),

/***/ 3353:
/***/ (function(module) {

module.exports = __WEBPACK_EXTERNAL_MODULE__3353__;

/***/ }),

/***/ 64:
/***/ (function(module) {

module.exports = __WEBPACK_EXTERNAL_MODULE__64__;

/***/ }),

/***/ 6149:
/***/ (function(module) {

module.exports = __WEBPACK_EXTERNAL_MODULE__6149__;

/***/ }),

/***/ 2975:
/***/ (function(module) {

module.exports = __WEBPACK_EXTERNAL_MODULE__2975__;

/***/ }),

/***/ 455:
/***/ (function(module) {

module.exports = __WEBPACK_EXTERNAL_MODULE__455__;

/***/ }),

/***/ 154:
/***/ (function(module) {

module.exports = __WEBPACK_EXTERNAL_MODULE__154__;

/***/ })

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			// no module.id needed
/******/ 			// no module.loaded needed
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/************************************************************************/
/******/ 	/* webpack/runtime/compat get default export */
/******/ 	!function() {
/******/ 		// getDefaultExport function for compatibility with non-harmony modules
/******/ 		__webpack_require__.n = function(module) {
/******/ 			var getter = module && module.__esModule ?
/******/ 				function() { return module['default']; } :
/******/ 				function() { return module; };
/******/ 			__webpack_require__.d(getter, { a: getter });
/******/ 			return getter;
/******/ 		};
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/define property getters */
/******/ 	!function() {
/******/ 		// define getter functions for harmony exports
/******/ 		__webpack_require__.d = function(exports, definition) {
/******/ 			for(var key in definition) {
/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ 				}
/******/ 			}
/******/ 		};
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
/******/ 	!function() {
/******/ 		__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/make namespace object */
/******/ 	!function() {
/******/ 		// define __esModule on exports
/******/ 		__webpack_require__.r = function(exports) {
/******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 			}
/******/ 			Object.defineProperty(exports, '__esModule', { value: true });
/******/ 		};
/******/ 	}();
/******/ 	
/************************************************************************/
var __webpack_exports__ = {};
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// EXPORTS
__webpack_require__.d(__webpack_exports__, {
  MeasureViewModel: function() { return /* reexport */ MeasureViewModel; },
  "default": function() { return /* reexport */ Measure; }
});

// EXTERNAL MODULE: external "core-js/modules/esnext.iterator.constructor.js"
var esnext_iterator_constructor_js_ = __webpack_require__(3658);
// EXTERNAL MODULE: external "core-js/modules/esnext.iterator.for-each.js"
var esnext_iterator_for_each_js_ = __webpack_require__(4669);
// EXTERNAL MODULE: external {"root":"Vue","commonjs":"vue","commonjs2":"vue","amd":"vue"}
var external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_ = __webpack_require__(154);
// EXTERNAL MODULE: external "@element-plus/icons-vue"
var icons_vue_ = __webpack_require__(9371);
// EXTERNAL MODULE: external "@kq_npm/client_icons_vue"
var client_icons_vue_ = __webpack_require__(5698);
// EXTERNAL MODULE: external "@kq_npm/client_common_vue/_utils/util"
var util_ = __webpack_require__(2975);
// EXTERNAL MODULE: external "@kq_npm/client_common_vue/_utils/mitt"
var mitt_ = __webpack_require__(6149);
var mitt_default = /*#__PURE__*/__webpack_require__.n(mitt_);
// EXTERNAL MODULE: external "@kq_npm/client_common_vue/_utils/gis-utils"
var gis_utils_ = __webpack_require__(64);
;// CONCATENATED MODULE: ./src/leaflet/measure/MeasureViewModel.js
/*
 * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
 * All rights reserved.
 */
/**
 * Author: 朱鹏超
 * Date: 2022-11-23
 * Description: 2d测量逻辑层
 */



/**
 * @class MeasureViewModel
 * @classdesc 测量
 * @param {string} mapTarget - 绑定的当前mapview
 */
class MeasureViewModel extends (mitt_default()) {
  constructor(mapTarget) {
    super();
    this._props = {
      mapTarget
    };
    this._webMap = null;
    // 事件绑定this
    this._loaded = this._loaded.bind(this);
    this._registerEvents();
  }

  /**
   * @description 注册事件
   * @private
   */
  _registerEvents() {
    gis_utils_.utils.getWebMap(this._props.mapTarget, this._loaded);
  }

  /**
   * @description 记载事件
   * @private
   */
  _loaded(e) {
    this._webMap = e;
  }

  /**
   * @description 清除测量绘图
   */
  clearMeasure() {
    gis_utils_.utils.getWebMap(this._props.mapTarget, e => {
      this._webMap = e;
      if (this._webMap) {
        if (this._webMap.target) {
          document.getElementById(this._webMap.target).style.cursor = "grab";
        }
        if (this._webMap.mapDraw) {
          this._webMap.mapDraw.removeAllLayerFromMeasure();
        }
      }
    });
  }

  /**
   * @description 面积测量
   * @param {Function} callFun - 回调函数
   * @param {string} tyoe - 类型，默认为 polygon
   * @param {Object} options - drawStyle配置
   * @param {string} [options.dashArray = '3.4']
   * @param {string} [options.color = "#409eff"]
   * @param {string} [options.fillColor = "#409eff"]
   * @param {string} [options.fillOpacity = "0.2"]
   * @param {number} [options.weight = 2]
   */
  areaMeasure(callFun, type, options) {
    this.clearMeasure();
    // this._webMap.mapDraw.startMeasure(callFun, type, options);
    this.measureEvent(callFun, type, options);
  }

  /**
   * @description 距离测量
   * @param {Function} callFun - 回调函数
   * @param {string} tyoe - 类型，默认为 polyline
   * @param {Object} options - drawStyle配置
   * @param {string} [options.dashArray = '3.4']
   * @param {string} [options.color = "#409eff"]
   * @param {string} [options.fillColor = "#409eff"]
   * @param {string} [options.fillOpacity = "0.2"]
   * @param {number} [options.weight = 2]
   */
  distanceMeasure(callFun, type, options) {
    this.clearMeasure();
    this.measureEvent(callFun, type, options);
  }
  measureEvent(callFun, type, options) {
    gis_utils_.utils.getWebMap(this._props.mapTarget, e => {
      this._webMap = e;
      this._webMap.mapDraw.startMeasure(e => {
        callFun(e);
        this.measureEvent(callFun, type, options);
      }, type, options);
    });
  }
  getWebMap() {
    return this._webMap;
  }
}
// EXTERNAL MODULE: external "vue-i18n/dist/vue-i18n.cjs.js"
var vue_i18n_cjs_js_ = __webpack_require__(3579);
// EXTERNAL MODULE: external "@kq_npm/client_common_vue/_types/global-event"
var global_event_ = __webpack_require__(3353);
var global_event_default = /*#__PURE__*/__webpack_require__.n(global_event_);
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/leaflet/measure/Measure.vue?vue&type=script&setup=true&lang=js



const _hoisted_1 = {
  class: "box"
};
const _hoisted_2 = {
  class: "kq-measure2d-btns"
};
const _hoisted_3 = {
  key: 0,
  class: "kq-measure2d-tip"
};
const _hoisted_4 = {
  key: 1,
  class: "kq-measure2d-result"
};
const _hoisted_5 = {
  class: "kq-measure2d-result-panel"
};
const _hoisted_6 = {
  class: "panel"
};
const _hoisted_7 = {
  class: "title"
};
const _hoisted_8 = {
  class: "panel"
};
const _hoisted_9 = {
  class: "title"
};
const _hoisted_10 = {
  class: "result"
};
const _hoisted_11 = {
  class: "tit"
};
const _hoisted_12 = {
  class: "res"
};








const __default__ = {
  name: "Kq2dMeasure"
};
/* harmony default export */ var Measurevue_type_script_setup_true_lang_js = (/*@__PURE__*/Object.assign(__default__, {
  props: {
    mapTarget: {
      type: String,
      default: null
    },
    showShadow: {
      type: Boolean,
      default: false
    },
    drawStyle: {
      type: Object,
      default: function () {
        return {
          dashArray: "3,4",
          color: "#409eff",
          fillColor: "#409eff",
          fillOpacity: "0.2",
          weight: 2
        };
      }
    },
    /**
     * 例："center","topLeft","topRight","bottomLeft","bottomRight", "topCenter", "bottomCenter" {top:'16px',left:'16px'}, {top:16,left:16}
     */
    position: [String, Object],
    // 是否生成HeaderTemp
    showHeaderTemp: {
      type: Boolean,
      default: false
    },
    // 是否折叠HeaderTemp，showHeaderTemp为true时生效
    isCollapseHeaderTemp: {
      type: Boolean,
      default: false
    },
    // HeaderTemp标题
    headerTempTitle: {
      type: String
      // default: "测量"
    },
    // HeaderTempIcon
    headerTempIcon: {
      type: [Object, String],
      default: client_icons_vue_.IconMeasure2D
    },
    // HeaderTemp Title&Icon的位置
    isRight: {
      type: Boolean,
      default: true
    },
    // 布局参数,'vertical' | 'horizontal'
    mode: {
      type: String,
      default: "vertical"
    }
  },
  setup(__props, {
    expose: __expose
  }) {
    const {
      proxy
    } = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.getCurrentInstance)();
    const props = __props;

    // 逻辑类
    let viewModel = null;
    // 控制操作按钮的active选择状态
    let isActive = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null);
    // 测量完成后是否有结果变量，控制结果容器的显隐
    let isResult = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(false);
    // 判断面积测量或距离测量的变量
    let unitType = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null);

    // 组件容器Ref
    let boxRef = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null);

    // 国际化
    let {
      locale,
      messages,
      t
    } = (0,vue_i18n_cjs_js_.useI18n)();
    let language = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(proxy.$i18n.global.messages[proxy.$i18n.global.locale]["leaflet"]);
    let measureTitle = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null);
    (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.watch)(() => locale.value, (newVal, oldVal) => {
      language.value = messages.value[newVal]["leaflet"];
      measureTitle.value = t("leaflet.measureTitle");
      distanceUnits.value = setDistanceUnits();
      areaUnits.value = setAreaUnits();
    });

    // 距离测量单位
    let distanceUnits = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)([]);
    let setDistanceUnits = () => {
      return [{
        label: language.value.kilometre,
        value: "km"
      }, {
        label: language.value.metre,
        value: "m"
      }, {
        label: language.value.nauticalMile,
        value: "nmi"
      }];
    };
    distanceUnits.value = setDistanceUnits();

    // 面积测量单位
    let areaUnits = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)([]);
    let setAreaUnits = () => {
      return [{
        label: language.value.squareKilometers,
        value: "km²"
      }, {
        label: language.value.squareMeter,
        value: "m²"
      }, {
        label: language.value.mu,
        value: "mu"
      }, {
        label: language.value.hectare,
        value: "ha"
      }];
    };
    areaUnits.value = setAreaUnits();

    // 单位
    let unit = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)("m");

    // 结果
    let result = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)("0");
    let _layer = null;

    // 生成组件默认header
    let headerTemp = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)();
    let headerTempRef = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)();
    (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onMounted)(() => {
      (0,util_.updatePosition)(boxRef.value, props);
      (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.watch)(() => props.position, (newVal, oldVal) => {
        (0,util_.updatePosition)(boxRef.value, props);
      });
      watchCreateHeaderTemp();
      (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.watch)(() => props.showHeaderTemp, (newVal, oldVal) => {
        watchCreateHeaderTemp();
      });
      viewModel = new MeasureViewModel(props.mapTarget);
      global_event_default().on("stopMeasure", () => {
        onClearMeasure();
      });
    });

    /**
     * @description 销毁
     */
    (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onBeforeUnmount)(() => {
      onClearMeasure();
    });

    /**
     * @description 监听header生成
     */
    const watchCreateHeaderTemp = () => {
      if (props.showHeaderTemp) {
        // 生成headerTemp
        headerTemp.value = (0,util_.createHeaderTemp)(boxRef.value, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toRefs)(props), headerTempRef, measureTitle, isTrue => {
          if (!isTrue) {
            onClearMeasure();
          }
        });
      }
    };

    /**
     * @description 距离测量
     */
    function onDistanceMeasure() {
      isActive.value = "distance";
      isResult.value = false;
      unitType.value = "distance";
      viewModel.distanceMeasure(layer => {
        // if (isEnd) {
        //   isActive.value = null;
        //   return;
        // }
        isResult.value = true;
        format(layer._measurementLayer._layers);
        updateMeasurements(layer);
        _layer = layer;
      }, "polyline", props.drawStyle);
    }

    /**
     * @description 面积测量
     */
    function onAreaMeasure() {
      isActive.value = "area";
      isResult.value = false;
      unitType.value = "area";
      viewModel.areaMeasure(layer => {
        // if (isEnd) {
        //   isActive.value = null;
        //   return;
        // }
        isResult.value = true;
        format(layer._measurementLayer._layers);
        updateMeasurements(layer);
        _layer = layer;
      }, "polygon", props.drawStyle);
    }

    /**
     * @description 清除测量
     */
    function onClearMeasure() {
      isActive.value = null;
      isResult.value = false;
      viewModel && viewModel.clearMeasure && viewModel.clearMeasure();
    }

    /**
     * @description 监听单位变化操作
     * @param {string} value - 改变的值
     */
    function onChangeUnits(value) {
      // unit.value = value;
      _layer.updateMeasurements(value);
      if (unitType.value === "distance") {
        result.value = document.querySelector(".leaflet-measure-path-measurement [title='Total length']").textContent.split(" ")[0];
        distanceUnits.value.forEach(item => {
          if (item.value == value) {
            unit.value = item.value;
          }
        });
      } else if (unitType.value === "area") {
        result.value = document.querySelector(".leaflet-measure-path-measurement [title='Total area']").textContent.split(" ")[0];
        areaUnits.value.forEach(item => {
          if (item.value == value) {
            unit.value = item.value;
          }
        });
      }
    }

    /**
     * @description 过滤方法，过滤结果
     */
    function format(obj) {
      for (let i in obj) {
        let item = obj[i];
        if (item["_title"].indexOf("Total") !== -1) {
          result.value = item["_measurement"].split(" ")[0];
          unit.value = item["_measurement"].split(" ")[1];
        }
      }
      if (unitType.value === "distance") {
        distanceUnits.value.forEach(item => {
          if (item.value == unit.value) {
            unit.value = item.value;
          }
        });
      }
      if (unitType.value === "area") {
        areaUnits.value.forEach(item => {
          if (item.value == unit.value) {
            unit.value = item.value;
          }
        });
      }
    }

    /**
     * @description 更新变化
     */
    function updateMeasurements(layer) {
      layer.on("editable:vertex:drag editable:vertex:deleted", function () {
        const obj = layer.updateMeasurements(unit.value);
        format(obj._measurementLayer._layers);
      });
    }
    __expose({
      clearMeasure: onClearMeasure
    });
    return (_ctx, _cache) => {
      const _component_kq_icon = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-icon");
      const _component_kq_button = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-button");
      const _component_kq_divider = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-divider");
      const _component_kq_option = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-option");
      const _component_kq_select = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-select");
      return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)("section", {
        class: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.normalizeClass)(["kq-measure2d", [{
          'kq-box-shadow': __props.showShadow,
          'kq-measure2d-horizontal-wrap': __props.mode == 'horizontal'
        }]]),
        ref_key: "boxRef",
        ref: boxRef
      }, [__props.showHeaderTemp ? ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createBlock)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveDynamicComponent)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(headerTemp)), {
        key: 0,
        ref_key: "headerTempRef",
        ref: headerTempRef
      }, null, 512 /* NEED_PATCH */)) : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)("v-if", true), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", {
        class: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.normalizeClass)({
          'kq-measure2d-horizontal': __props.mode == 'horizontal'
        })
      }, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_1, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_2, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_button, {
        onClick: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withModifiers)(onDistanceMeasure, ["stop"]),
        class: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.normalizeClass)({
          'is-active': (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(isActive) == 'distance'
        })
      }, {
        default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_icon, {
          size: 22
        }, {
          default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(client_icons_vue_.IconMeasureDistance))]),
          _: 1 /* STABLE */
        })]),
        _: 1 /* STABLE */
      }, 8 /* PROPS */, ["class"]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_button, {
        onClick: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withModifiers)(onAreaMeasure, ["stop"]),
        class: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.normalizeClass)({
          'is-active': (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(isActive) == 'area'
        })
      }, {
        default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_icon, {
          size: 22
        }, {
          default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(client_icons_vue_.IconMeasureArea))]),
          _: 1 /* STABLE */
        })]),
        _: 1 /* STABLE */
      }, 8 /* PROPS */, ["class"]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_button, {
        type: "danger",
        plain: "",
        onClick: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withModifiers)(onClearMeasure, ["stop"]),
        class: "clear-btn"
      }, {
        default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_icon, {
          size: 20,
          class: "icon-delete"
        }, {
          default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(icons_vue_.Delete))]),
          _: 1 /* STABLE */
        })]),
        _: 1 /* STABLE */
      })]), !!(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(isActive) ? ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)("div", _hoisted_3, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_divider, {
        class: "measure2d-divider"
      }), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", null, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)(_ctx.$t("leaflet.measureTip")), 1 /* TEXT */)])) : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)("v-if", true)]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(isResult) ? ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createBlock)(_component_kq_divider, {
        key: 0,
        class: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.normalizeClass)(["measure2d-divider", [{
          'measure2d-divider-vertical': __props.mode == 'horizontal'
        }]]),
        direction: __props.mode == 'horizontal' ? 'vertical' : 'horizontal'
      }, null, 8 /* PROPS */, ["direction", "class"])) : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)("v-if", true), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(isResult) ? ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)("div", _hoisted_4, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_5, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_6, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", _hoisted_7, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)(_ctx.$t("leaflet.unit")), 1 /* TEXT */), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(unitType) === 'distance' ? ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createBlock)(_component_kq_select, {
        key: 0,
        modelValue: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(unit),
        "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.isRef)(unit) ? unit.value = $event : unit = $event),
        onChange: onChangeUnits
      }, {
        default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(true), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)(external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.Fragment, null, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.renderList)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(distanceUnits), item => {
          return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createBlock)(_component_kq_option, {
            key: item.value,
            label: item.label,
            value: item.value
          }, null, 8 /* PROPS */, ["label", "value"]);
        }), 128 /* KEYED_FRAGMENT */))]),
        _: 1 /* STABLE */
      }, 8 /* PROPS */, ["modelValue"])) : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)("v-if", true), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(unitType) === 'area' ? ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createBlock)(_component_kq_select, {
        key: 1,
        modelValue: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(unit),
        "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.isRef)(unit) ? unit.value = $event : unit = $event),
        onChange: onChangeUnits
      }, {
        default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(true), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)(external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.Fragment, null, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.renderList)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(areaUnits), item => {
          return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createBlock)(_component_kq_option, {
            key: item.value,
            label: item.label,
            value: item.value
          }, null, 8 /* PROPS */, ["label", "value"]);
        }), 128 /* KEYED_FRAGMENT */))]),
        _: 1 /* STABLE */
      }, 8 /* PROPS */, ["modelValue"])) : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)("v-if", true)]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_8, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", _hoisted_9, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)(_ctx.$t("leaflet.measureResult")), 1 /* TEXT */), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_10, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", _hoisted_11, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(unitType) === "distance" ? _ctx.$t("leaflet.distance") : _ctx.$t("leaflet.unit")), 1 /* TEXT */), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", _hoisted_12, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(result)) + " " + (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(unit)), 1 /* TEXT */)])])])])) : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)("v-if", true)], 2 /* CLASS */)], 2 /* CLASS */);
    };
  }
}));
;// CONCATENATED MODULE: ./src/leaflet/measure/Measure.vue?vue&type=script&setup=true&lang=js
 
;// CONCATENATED MODULE: ./src/leaflet/measure/Measure.vue



const __exports__ = Measurevue_type_script_setup_true_lang_js;

/* harmony default export */ var Measure = (__exports__);
// EXTERNAL MODULE: external "@kq_npm/client_common_vue/init.js"
var init_js_ = __webpack_require__(455);
var init_js_default = /*#__PURE__*/__webpack_require__.n(init_js_);
;// CONCATENATED MODULE: ./src/leaflet/measure/index.js
/*
 * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
 * All rights reserved.
 */



Measure.install = (Vue, opts) => {
  init_js_default()(Vue, opts);
  Vue.component(Measure.name, Measure);
};

/******/ 	return __webpack_exports__;
/******/ })()
;
});