import "../styles/reset.css";
import "./form.less";
import { createPopper as __WEBPACK_EXTERNAL_MODULE__popperjs_core_a5c7319c_createPopper__ } from "@popperjs/core";
import "../loading";
import "../overflow-title";
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_popover_9b03f19d__ from "../popover";
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__ from "../shared";
import * as __WEBPACK_EXTERNAL_MODULE_vue__ from "vue";
import { useLocale as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3_useLocale__, usePrefix as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3_usePrefix__ } from "../config-provider";
import { default as __WEBPACK_EXTERNAL_MODULE_lodash_isBoolean_dcb66997_default__ } from "lodash/isBoolean";
import { default as __WEBPACK_EXTERNAL_MODULE_lodash_isString_e6fa8a5b_default__ } from "lodash/isString";
import { ExclamationCircleShape as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_ExclamationCircleShape__ } from "../icon";
import { default as __WEBPACK_EXTERNAL_MODULE_lodash_get_9427f899_default__ } from "lodash/get";
import { default as __WEBPACK_EXTERNAL_MODULE_lodash_isFunction_f90b20d6_default__ } from "lodash/isFunction";
import { default as __WEBPACK_EXTERNAL_MODULE_lodash_isDate_b457317b_default__ } from "lodash/isDate";
import { default as __WEBPACK_EXTERNAL_MODULE_lodash_isEmpty_e109fd6b_default__ } from "lodash/isEmpty";
/******/ var __webpack_modules__ = ({

/***/ 4193
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {


// EXPORTS
__webpack_require__.d(__webpack_exports__, {
  bkTooltips: () => (/* reexport */ src_tooltips)
});

// UNUSED EXPORTS: bkEllipsis, bkEllipsisInstance, bkLoading, clickoutside, mousewheel, overflowTitle

;// ../../packages/directives/src/clickoutside.ts
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
/*
 * Tencent is pleased to support the open source community by making
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
 *
 * Copyright (C) 2025 Tencent.  All rights reserved.
 *
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
 *
 * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
 *
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
 * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 * the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */
var isElement = function isElement(e) {
  if (typeof Element === 'undefined') return false;
  return e instanceof Element;
};
var nodeList = new Map();
var startClick;
document.addEventListener('mousedown', function (e) {
  return startClick = e;
});
document.addEventListener('mouseup', function (e) {
  var _iterator = _createForOfIteratorHelper(nodeList.values()),
    _step;
  try {
    for (_iterator.s(); !(_step = _iterator.n()).done;) {
      var handlers = _step.value;
      var _iterator2 = _createForOfIteratorHelper(handlers),
        _step2;
      try {
        for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
          var documentHandler = _step2.value.documentHandler;
          documentHandler(e, startClick);
        }
      } catch (err) {
        _iterator2.e(err);
      } finally {
        _iterator2.f();
      }
    }
  } catch (err) {
    _iterator.e(err);
  } finally {
    _iterator.f();
  }
});
function createDocumentHandler(el, binding) {
  var excludes = [];
  if (Array.isArray(binding.arg)) {
    excludes = binding.arg;
  } else if (isElement(binding.arg)) {
    excludes.push(binding.arg);
  }
  return function (mouseup, mousedown) {
    var popperRef = binding.instance.popperRef;
    var mouseUpTarget = mouseup.target;
    var mouseDownTarget = mousedown === null || mousedown === void 0 ? void 0 : mousedown.target;
    var isBound = !binding || !binding.instance;
    var isTargetExists = !mouseUpTarget || !mouseDownTarget;
    var isContainedByEl = el.contains(mouseUpTarget) || el.contains(mouseDownTarget);
    var isSelf = el === mouseUpTarget;
    var isTargetExcluded = excludes.length && excludes.some(function (item) {
      return item === null || item === void 0 ? void 0 : item.contains(mouseUpTarget);
    }) || excludes.length && excludes.includes(mouseDownTarget);
    var isContainedByPopper = popperRef && (popperRef.contains(mouseUpTarget) || popperRef.contains(mouseDownTarget));
    if (isBound || isTargetExists || isContainedByEl || isSelf || isTargetExcluded || isContainedByPopper) {
      return;
    }
    binding.value(mouseup, mousedown);
  };
}
var ClickOutside = {
  beforeMount: function beforeMount(el, binding) {
    if (!nodeList.has(el)) {
      nodeList.set(el, []);
    }
    nodeList.get(el).push({
      documentHandler: createDocumentHandler(el, binding),
      bindingFn: binding.value
    });
  },
  updated: function updated(el, binding) {
    if (!nodeList.has(el)) {
      nodeList.set(el, []);
    }
    var handlers = nodeList.get(el);
    var oldHandlerIndex = handlers.findIndex(function (item) {
      return item.bindingFn === binding.oldValue;
    });
    var newHandler = {
      documentHandler: createDocumentHandler(el, binding),
      bindingFn: binding.value
    };
    if (oldHandlerIndex >= 0) {
      // replace the old handler to the new handler
      handlers.splice(oldHandlerIndex, 1, newHandler);
    } else {
      handlers.push(newHandler);
    }
  },
  unmounted: function unmounted(el) {
    // remove all listeners when a component unmounted
    nodeList["delete"](el);
  }
};
ClickOutside.install = function (app) {
  app.directive('bkTooltips', ClickOutside);
};
/* harmony default export */ const clickoutside = ((/* unused pure expression or super */ null && (ClickOutside)));
// EXTERNAL MODULE: external "../popover"
var popover_ = __webpack_require__(592);
;// ../../packages/directives/src/ellipsis.ts
/* unused harmony import specifier */ var _typeof;
/* unused harmony import specifier */ var $bkPopover;

/*
 * Tencent is pleased to support the open source community by making
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
 *
 * Copyright (C) 2025 Tencent.  All rights reserved.
 *
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
 *
 * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
 *
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
 * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 * the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */

var resolveOptions = function resolveOptions(el, binding) {
  var options = {
    content: '',
    target: el
  };
  if (_typeof(binding) === 'object') {
    Object.assign(options, binding);
    if (Object.prototype.hasOwnProperty.call(binding, 'popoverOption')) {
      Object.assign(options, binding.popoverOption);
    }
  } else {
    options.content = binding;
  }
  return options;
};
var createInstance = function createInstance(el, binding) {
  var instance = null;
  var createTimer = null;
  var hidePopTimer = null;
  var options = resolveOptions(el, binding);
  var disabled = options.disabled;
  if (disabled || instance) {
    return;
  }
  var handleContentEnter = function handleContentEnter() {
    hidePopTimer && clearTimeout(hidePopTimer);
    hidePopTimer = null;
  };
  var handleContentLeave = function handleContentLeave() {
    var _instance, _instance2;
    if (createTimer) {
      clearTimeout(createTimer);
    }
    (_instance = instance) === null || _instance === void 0 || _instance.hide();
    (_instance2 = instance) === null || _instance2 === void 0 || _instance2.close();
    instance = null;
  };
  var handleMouseEnter = function handleMouseEnter() {
    handleContentLeave();
    createTimer && clearTimeout(createTimer);
    createTimer = setTimeout(function () {
      var targetOptions = resolveOptions(el, binding);
      targetOptions.isShow = true;
      targetOptions.content = typeof targetOptions.content === 'function' ? targetOptions.content() : targetOptions.content || el.innerText;
      targetOptions.allowHtml = true;
      Object.assign(targetOptions, {
        onContentMouseenter: handleContentEnter,
        onContentMouseleave: handleContentLeave
      });
      instance = $bkPopover(targetOptions);
    }, 300);
  };
  var handleMouseLeave = function handleMouseLeave() {
    hidePopTimer = setTimeout(function () {
      var _instance3, _instance4;
      if (createTimer) {
        clearTimeout(createTimer);
      }
      (_instance3 = instance) === null || _instance3 === void 0 || _instance3.hide();
      (_instance4 = instance) === null || _instance4 === void 0 || _instance4.close();
      instance = null;
    }, 120);
  };
  el.addEventListener('mouseenter', handleMouseEnter);
  el.addEventListener('mouseleave', handleMouseLeave);
  var destroyInstance = function destroyInstance(element) {
    var _ref, _ref2;
    handleMouseLeave();
    (_ref = element !== null && element !== void 0 ? element : el) === null || _ref === void 0 || _ref.removeEventListener('mouseenter', handleMouseEnter);
    (_ref2 = element !== null && element !== void 0 ? element : el) === null || _ref2 === void 0 || _ref2.removeEventListener('mouseleave', handleMouseLeave);
  };
  return {
    destroyInstance: destroyInstance,
    instance: instance
  };
};
var ellipsis = (/* unused pure expression or super */ null && ({
  mounted: function mounted(el, binding) {
    createInstance(el, binding);
  }
}));
/* harmony default export */ const src_ellipsis = ((/* unused pure expression or super */ null && (ellipsis)));
// EXTERNAL MODULE: ../../node_modules/normalize-wheel/index.js
var normalize_wheel = __webpack_require__(8283);
;// ../../packages/directives/src/mousewheel.ts
/* unused harmony import specifier */ var normalizeWheel;
/*
 * Tencent is pleased to support the open source community by making
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
 *
 * Copyright (C) 2025 Tencent.  All rights reserved.
 *
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
 *
 * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
 *
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
 * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 * the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */

var isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
var mousewheelHandler = function mousewheelHandler(element, callback) {
  if (element !== null && element !== void 0 && element.addEventListener) {
    element.addEventListener(isFirefox ? 'DOMMouseScroll' : 'mousewheel', function (e) {
      var normalized = normalizeWheel(e);
      callback === null || callback === void 0 || callback.apply(this, [e, normalized]);
    });
  }
};
var mousewheel = (/* unused pure expression or super */ null && ({
  beforeMount: function beforeMount(el, binding) {
    mousewheelHandler(el, binding.value);
  }
}));
/* harmony default export */ const src_mousewheel = ((/* unused pure expression or super */ null && (mousewheel)));
// EXTERNAL MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__(4586);
// EXTERNAL MODULE: ../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
var toConsumableArray = __webpack_require__(5153);
// EXTERNAL MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
var esm_typeof = __webpack_require__(7545);
// EXTERNAL MODULE: external "vue"
var external_vue_ = __webpack_require__(5286);
// EXTERNAL MODULE: external "../shared"
var shared_ = __webpack_require__(5166);
;// external "@popperjs/core"

;// ../../packages/directives/src/tooltips.ts



function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0,defineProperty["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
/*
 * Tencent is pleased to support the open source community by making
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
 *
 * Copyright (C) 2025 Tencent.  All rights reserved.
 *
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
 *
 * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
 *
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
 * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 * the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */



var tooltips_nodeList = new WeakMap();
var tooltips = {
  beforeMount: function beforeMount(el, binding) {
    var opts = getOpts(binding);
    var trigger = opts.trigger,
      showOnInit = opts.showOnInit;
    var popper = renderContent(opts);
    var delayTimeout = null;
    if (showOnInit) {
      (0,external_vue_.nextTick)(function () {
        show(el);
      });
    }
    if (trigger === 'hover') {
      var hideTimeout = null;
      el.addEventListener('mouseenter', function () {
        delayTimeout = setTimeout(function () {
          show(el);
          clearTimeout(hideTimeout);
          clearTimeout(delayTimeout);
        }, opts.delay);
      });
      popper.addEventListener('mouseenter', function () {
        clearTimeout(hideTimeout);
      });
      el.addEventListener('mouseleave', function () {
        clearTimeout(delayTimeout);
        hideTimeout = setTimeout(function () {
          hide(el);
        }, 100);
      });
      popper.addEventListener('mouseleave', function () {
        clearTimeout(delayTimeout);
        hideTimeout = setTimeout(function () {
          hide(el);
        }, 100);
      });
    } else if (trigger === 'click') {
      document.body.addEventListener('click', function (event) {
        if (el.contains(event.target) && !popper.hasAttribute('data-show')) {
          delayTimeout = setTimeout(function () {
            show(el);
            clearTimeout(delayTimeout);
          }, opts.delay);
        } else if (!el.contains(event.target) && popper.hasAttribute('data-show')) {
          hide(el);
        }
      });
    }
    tooltips_nodeList.set(el, {
      opts: opts,
      popper: popper,
      popperInstance: null
    });
  },
  updated: function updated(el, binding) {
    if (tooltips_nodeList.get(el)) {
      tooltips_nodeList.get(el).opts = getOpts(binding);
    }
  },
  unmounted: function unmounted(el) {
    hide(el);
    tooltips_nodeList["delete"](el);
  }
};
/**
 * 初始化配置
 * @returns tooltips配置
 */
function initOptions() {
  var defaultOpts = {
    arrow: true,
    disabled: false,
    trigger: 'hover',
    theme: 'dark',
    content: '',
    showOnInit: false,
    placement: 'top',
    distance: 8,
    extCls: '',
    sameWidth: false,
    delay: 0,
    onShow: function onShow() {},
    onHide: function onHide() {}
  };
  return defaultOpts;
}
/**
 * 获取配置
 * @returns tooltips配置
 */
function getOpts(binding) {
  var opts = initOptions();
  if ((0,esm_typeof["default"])(binding.value) === 'object') {
    Object.assign(opts, binding.value);
  } else {
    opts.content = binding.value;
  }
  return opts;
}
/**
 * 创建tooltips DOM
 * @param opts
 * @returns
 */
function renderContext(value, content) {
  if (typeof value === 'string') {
    content.innerText = value;
  } else {
    // 如果 content 是 Vue 组件的实例，则挂载它
    var container = document.createElement('div');
    var vnode = (0,external_vue_.h)(value);
    (0,external_vue_.render)(vnode, container);
    content.innerHTML = container.innerHTML;
  }
}
function renderContent(opts) {
  var value = opts.content,
    hasArrow = opts.arrow,
    theme = opts.theme,
    extCls = opts.extCls;
  var isLight = theme === 'light';
  var content = document.createElement('div');
  var prefix = document.documentElement.style.getPropertyValue('--bk-prefix') || 'bk';
  content.className = "".concat((0,shared_.resolveClassName)('popper', prefix), " ").concat(isLight ? 'light' : 'dark', " ").concat(extCls);
  content.innerText = value;
  renderContext(value, content);
  if (hasArrow) {
    var arrow = renderArrow();
    content.appendChild(arrow);
  }
  return content;
}
/**
 * 渲染箭头dom
 * @returns arrow DOM
 */
function renderArrow() {
  var arrow = document.createElement('div');
  var prefix = document.documentElement.style.getPropertyValue('--bk-prefix') || 'bk';
  arrow.className = (0,shared_.resolveClassName)('popper-arrow', prefix);
  arrow.setAttribute('data-popper-arrow', '');
  return arrow;
}
/**
 * 创建popper实例
 * @param el
 * @param popper
 * @returns popper实例
 */
function createPopperInstance(el, popper) {
  if (!tooltips_nodeList.get(el)) return;
  var _nodeList$get = tooltips_nodeList.get(el),
    opts = _nodeList$get.opts;
  var placement = opts.placement,
    distance = opts.distance,
    sameWidth = opts.sameWidth;
  var popperInstance = __WEBPACK_EXTERNAL_MODULE__popperjs_core_a5c7319c_createPopper__(el, popper, {
    placement: placement,
    modifiers: [{
      name: 'offset',
      options: {
        offset: [0, distance]
      }
    }, {
      name: 'arrow',
      options: {
        padding: 5
      }
    }].concat((0,toConsumableArray["default"])(sameWidth ? [{
      name: 'sameWidth',
      enabled: true,
      phase: 'beforeWrite',
      requires: ['computeStyles'],
      fn: function fn(_ref) {
        var state = _ref.state;
        state.styles.popper.width = "".concat(state.rects.reference.width, "px");
      },
      effect: function effect(_ref2) {
        var state = _ref2.state;
        state.elements.popper.style.overflowWrap = 'break-word';
        state.elements.popper.style.width = "".concat(state.elements.reference.offsetWidth, "px");
      }
    }] : []))
  });
  return popperInstance;
}
/**
 * 显示
 * @param el
 */
function show(el) {
  if (!tooltips_nodeList.get(el)) return;
  var _nodeList$get2 = tooltips_nodeList.get(el),
    popper = _nodeList$get2.popper,
    opts = _nodeList$get2.opts;
  var disabled = opts.disabled,
    content = opts.content,
    hasArrow = opts.arrow,
    onShow = opts.onShow,
    boundary = opts.boundary,
    _opts$modifiers = opts.modifiers,
    modifiers = _opts$modifiers === void 0 ? [] : _opts$modifiers;
  if (disabled) return;
  popper.style.zIndex = String(shared_.bkZIndexManager.getPopperIndex());
  renderContext(content, popper);
  if (hasArrow) {
    var arrow = renderArrow();
    popper.appendChild(arrow);
  }
  var container = document.body;
  if (boundary) {
    if (boundary === 'parent') {
      container = el.parentElement;
    } else if (boundary instanceof HTMLElement) {
      container = boundary;
    }
  }
  container.appendChild(popper);
  var popperInstance = createPopperInstance(el, popper);
  onShow();
  // Make the tooltip visible
  popper.setAttribute('data-show', '');
  // Enable the event listeners
  popperInstance.setOptions(function (options) {
    return _objectSpread(_objectSpread({}, options), {}, {
      modifiers: [].concat((0,toConsumableArray["default"])(options.modifiers), (0,toConsumableArray["default"])(modifiers), [{
        name: 'eventListeners',
        enabled: true
      }])
    });
  });
  // Update its position
  popperInstance.forceUpdate();
  tooltips_nodeList.get(el).popperInstance = popperInstance;
}
/**
 * 隐藏
 * @param el
 */
function hide(el) {
  if (!tooltips_nodeList.get(el)) return;
  var _nodeList$get3 = tooltips_nodeList.get(el),
    popper = _nodeList$get3.popper,
    popperInstance = _nodeList$get3.popperInstance,
    opts = _nodeList$get3.opts;
  var onHide = opts.onHide;
  if (popper && document.body.contains(popper)) {
    var _popper$parentNode;
    popper.removeAttribute('data-show');
    popperInstance === null || popperInstance === void 0 || popperInstance.destroy();
    popper === null || popper === void 0 || (_popper$parentNode = popper.parentNode) === null || _popper$parentNode === void 0 || _popper$parentNode.removeChild(popper);
    onHide();
  }
}
/* harmony default export */ const src_tooltips = (tooltips);
;// external "../loading"

;// external "../overflow-title"

;// ../../packages/directives/src/index.ts
/*
 * Tencent is pleased to support the open source community by making
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
 *
 * Copyright (C) 2025 Tencent.  All rights reserved.
 *
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
 *
 * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
 *
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
 * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 * the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */






// export { createInstance as bkEllipsisInstance } from './ellipsis';

/***/ },

/***/ 8283
(module, __unused_webpack_exports, __webpack_require__) {

/* unused reexport */ __webpack_require__(5022);


/***/ },

/***/ 1043
(module) {

/**
 * Copyright (c) 2015, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ExecutionEnvironment
 */

/*jslint evil: true */



var canUseDOM = !!(
  typeof window !== 'undefined' &&
  window.document &&
  window.document.createElement
);

/**
 * Simple, lightweight module assisting with the detection and context of
 * Worker. Helps avoid circular dependencies and allows code to reason about
 * whether or not they are in a Worker, even if they never include the main
 * `ReactWorker` dependency.
 */
var ExecutionEnvironment = {

  canUseDOM: canUseDOM,

  canUseWorkers: typeof Worker !== 'undefined',

  canUseEventListeners:
    canUseDOM && !!(window.addEventListener || window.attachEvent),

  canUseViewport: canUseDOM && !!window.screen,

  isInWorker: !canUseDOM // For now, this is true - might change in the future.

};

module.exports = ExecutionEnvironment;


/***/ },

/***/ 7416
(module) {

/**
 * Copyright 2004-present Facebook. All Rights Reserved.
 *
 * @providesModule UserAgent_DEPRECATED
 */

/**
 *  Provides entirely client-side User Agent and OS detection. You should prefer
 *  the non-deprecated UserAgent module when possible, which exposes our
 *  authoritative server-side PHP-based detection to the client.
 *
 *  Usage is straightforward:
 *
 *    if (UserAgent_DEPRECATED.ie()) {
 *      //  IE
 *    }
 *
 *  You can also do version checks:
 *
 *    if (UserAgent_DEPRECATED.ie() >= 7) {
 *      //  IE7 or better
 *    }
 *
 *  The browser functions will return NaN if the browser does not match, so
 *  you can also do version compares the other way:
 *
 *    if (UserAgent_DEPRECATED.ie() < 7) {
 *      //  IE6 or worse
 *    }
 *
 *  Note that the version is a float and may include a minor version number,
 *  so you should always use range operators to perform comparisons, not
 *  strict equality.
 *
 *  **Note:** You should **strongly** prefer capability detection to browser
 *  version detection where it's reasonable:
 *
 *    http://www.quirksmode.org/js/support.html
 *
 *  Further, we have a large number of mature wrapper functions and classes
 *  which abstract away many browser irregularities. Check the documentation,
 *  grep for things, or ask on javascript@lists.facebook.com before writing yet
 *  another copy of "event || window.event".
 *
 */

var _populated = false;

// Browsers
var _ie, _firefox, _opera, _webkit, _chrome;

// Actual IE browser for compatibility mode
var _ie_real_version;

// Platforms
var _osx, _windows, _linux, _android;

// Architectures
var _win64;

// Devices
var _iphone, _ipad, _native;

var _mobile;

function _populate() {
  if (_populated) {
    return;
  }

  _populated = true;

  // To work around buggy JS libraries that can't handle multi-digit
  // version numbers, Opera 10's user agent string claims it's Opera
  // 9, then later includes a Version/X.Y field:
  //
  // Opera/9.80 (foo) Presto/2.2.15 Version/10.10
  var uas = navigator.userAgent;
  var agent = /(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(uas);
  var os    = /(Mac OS X)|(Windows)|(Linux)/.exec(uas);

  _iphone = /\b(iPhone|iP[ao]d)/.exec(uas);
  _ipad = /\b(iP[ao]d)/.exec(uas);
  _android = /Android/i.exec(uas);
  _native = /FBAN\/\w+;/i.exec(uas);
  _mobile = /Mobile/i.exec(uas);

  // Note that the IE team blog would have you believe you should be checking
  // for 'Win64; x64'.  But MSDN then reveals that you can actually be coming
  // from either x64 or ia64;  so ultimately, you should just check for Win64
  // as in indicator of whether you're in 64-bit IE.  32-bit IE on 64-bit
  // Windows will send 'WOW64' instead.
  _win64 = !!(/Win64/.exec(uas));

  if (agent) {
    _ie = agent[1] ? parseFloat(agent[1]) : (
          agent[5] ? parseFloat(agent[5]) : NaN);
    // IE compatibility mode
    if (_ie && document && document.documentMode) {
      _ie = document.documentMode;
    }
    // grab the "true" ie version from the trident token if available
    var trident = /(?:Trident\/(\d+.\d+))/.exec(uas);
    _ie_real_version = trident ? parseFloat(trident[1]) + 4 : _ie;

    _firefox = agent[2] ? parseFloat(agent[2]) : NaN;
    _opera   = agent[3] ? parseFloat(agent[3]) : NaN;
    _webkit  = agent[4] ? parseFloat(agent[4]) : NaN;
    if (_webkit) {
      // We do not add the regexp to the above test, because it will always
      // match 'safari' only since 'AppleWebKit' appears before 'Chrome' in
      // the userAgent string.
      agent = /(?:Chrome\/(\d+\.\d+))/.exec(uas);
      _chrome = agent && agent[1] ? parseFloat(agent[1]) : NaN;
    } else {
      _chrome = NaN;
    }
  } else {
    _ie = _firefox = _opera = _chrome = _webkit = NaN;
  }

  if (os) {
    if (os[1]) {
      // Detect OS X version.  If no version number matches, set _osx to true.
      // Version examples:  10, 10_6_1, 10.7
      // Parses version number as a float, taking only first two sets of
      // digits.  If only one set of digits is found, returns just the major
      // version number.
      var ver = /(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(uas);

      _osx = ver ? parseFloat(ver[1].replace('_', '.')) : true;
    } else {
      _osx = false;
    }
    _windows = !!os[2];
    _linux   = !!os[3];
  } else {
    _osx = _windows = _linux = false;
  }
}

var UserAgent_DEPRECATED = {

  /**
   *  Check if the UA is Internet Explorer.
   *
   *
   *  @return float|NaN Version number (if match) or NaN.
   */
  ie: function() {
    return _populate() || _ie;
  },

  /**
   * Check if we're in Internet Explorer compatibility mode.
   *
   * @return bool true if in compatibility mode, false if
   * not compatibility mode or not ie
   */
  ieCompatibilityMode: function() {
    return _populate() || (_ie_real_version > _ie);
  },


  /**
   * Whether the browser is 64-bit IE.  Really, this is kind of weak sauce;  we
   * only need this because Skype can't handle 64-bit IE yet.  We need to remove
   * this when we don't need it -- tracked by #601957.
   */
  ie64: function() {
    return UserAgent_DEPRECATED.ie() && _win64;
  },

  /**
   *  Check if the UA is Firefox.
   *
   *
   *  @return float|NaN Version number (if match) or NaN.
   */
  firefox: function() {
    return _populate() || _firefox;
  },


  /**
   *  Check if the UA is Opera.
   *
   *
   *  @return float|NaN Version number (if match) or NaN.
   */
  opera: function() {
    return _populate() || _opera;
  },


  /**
   *  Check if the UA is WebKit.
   *
   *
   *  @return float|NaN Version number (if match) or NaN.
   */
  webkit: function() {
    return _populate() || _webkit;
  },

  /**
   *  For Push
   *  WILL BE REMOVED VERY SOON. Use UserAgent_DEPRECATED.webkit
   */
  safari: function() {
    return UserAgent_DEPRECATED.webkit();
  },

  /**
   *  Check if the UA is a Chrome browser.
   *
   *
   *  @return float|NaN Version number (if match) or NaN.
   */
  chrome : function() {
    return _populate() || _chrome;
  },


  /**
   *  Check if the user is running Windows.
   *
   *  @return bool `true' if the user's OS is Windows.
   */
  windows: function() {
    return _populate() || _windows;
  },


  /**
   *  Check if the user is running Mac OS X.
   *
   *  @return float|bool   Returns a float if a version number is detected,
   *                       otherwise true/false.
   */
  osx: function() {
    return _populate() || _osx;
  },

  /**
   * Check if the user is running Linux.
   *
   * @return bool `true' if the user's OS is some flavor of Linux.
   */
  linux: function() {
    return _populate() || _linux;
  },

  /**
   * Check if the user is running on an iPhone or iPod platform.
   *
   * @return bool `true' if the user is running some flavor of the
   *    iPhone OS.
   */
  iphone: function() {
    return _populate() || _iphone;
  },

  mobile: function() {
    return _populate() || (_iphone || _ipad || _android || _mobile);
  },

  nativeApp: function() {
    // webviews inside of the native apps
    return _populate() || _native;
  },

  android: function() {
    return _populate() || _android;
  },

  ipad: function() {
    return _populate() || _ipad;
  }
};

module.exports = UserAgent_DEPRECATED;


/***/ },

/***/ 2586
(module, __unused_webpack_exports, __webpack_require__) {

/**
 * Copyright 2013-2015, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule isEventSupported
 */



var ExecutionEnvironment = __webpack_require__(1043);

var useHasFeature;
if (ExecutionEnvironment.canUseDOM) {
  useHasFeature =
    document.implementation &&
    document.implementation.hasFeature &&
    // always returns true in newer browsers as per the standard.
    // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
    document.implementation.hasFeature('', '') !== true;
}

/**
 * Checks if an event is supported in the current execution environment.
 *
 * NOTE: This will not work correctly for non-generic events such as `change`,
 * `reset`, `load`, `error`, and `select`.
 *
 * Borrows from Modernizr.
 *
 * @param {string} eventNameSuffix Event name, e.g. "click".
 * @param {?boolean} capture Check if the capture phase is supported.
 * @return {boolean} True if the event is supported.
 * @internal
 * @license Modernizr 3.0.0pre (Custom Build) | MIT
 */
function isEventSupported(eventNameSuffix, capture) {
  if (!ExecutionEnvironment.canUseDOM ||
      capture && !('addEventListener' in document)) {
    return false;
  }

  var eventName = 'on' + eventNameSuffix;
  var isSupported = eventName in document;

  if (!isSupported) {
    var element = document.createElement('div');
    element.setAttribute(eventName, 'return;');
    isSupported = typeof element[eventName] === 'function';
  }

  if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {
    // This is the only way to test support for the `wheel` event in IE9+.
    isSupported = document.implementation.hasFeature('Events.wheel', '3.0');
  }

  return isSupported;
}

module.exports = isEventSupported;


/***/ },

/***/ 5022
(module, __unused_webpack_exports, __webpack_require__) {

/**
 * Copyright (c) 2015, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule normalizeWheel
 * @typechecks
 */



var UserAgent_DEPRECATED = __webpack_require__(7416);

var isEventSupported = __webpack_require__(2586);


// Reasonable defaults
var PIXEL_STEP  = 10;
var LINE_HEIGHT = 40;
var PAGE_HEIGHT = 800;

/**
 * Mouse wheel (and 2-finger trackpad) support on the web sucks.  It is
 * complicated, thus this doc is long and (hopefully) detailed enough to answer
 * your questions.
 *
 * If you need to react to the mouse wheel in a predictable way, this code is
 * like your bestest friend. * hugs *
 *
 * As of today, there are 4 DOM event types you can listen to:
 *
 *   'wheel'                -- Chrome(31+), FF(17+), IE(9+)
 *   'mousewheel'           -- Chrome, IE(6+), Opera, Safari
 *   'MozMousePixelScroll'  -- FF(3.5 only!) (2010-2013) -- don't bother!
 *   'DOMMouseScroll'       -- FF(0.9.7+) since 2003
 *
 * So what to do?  The is the best:
 *
 *   normalizeWheel.getEventType();
 *
 * In your event callback, use this code to get sane interpretation of the
 * deltas.  This code will return an object with properties:
 *
 *   spinX   -- normalized spin speed (use for zoom) - x plane
 *   spinY   -- " - y plane
 *   pixelX  -- normalized distance (to pixels) - x plane
 *   pixelY  -- " - y plane
 *
 * Wheel values are provided by the browser assuming you are using the wheel to
 * scroll a web page by a number of lines or pixels (or pages).  Values can vary
 * significantly on different platforms and browsers, forgetting that you can
 * scroll at different speeds.  Some devices (like trackpads) emit more events
 * at smaller increments with fine granularity, and some emit massive jumps with
 * linear speed or acceleration.
 *
 * This code does its best to normalize the deltas for you:
 *
 *   - spin is trying to normalize how far the wheel was spun (or trackpad
 *     dragged).  This is super useful for zoom support where you want to
 *     throw away the chunky scroll steps on the PC and make those equal to
 *     the slow and smooth tiny steps on the Mac. Key data: This code tries to
 *     resolve a single slow step on a wheel to 1.
 *
 *   - pixel is normalizing the desired scroll delta in pixel units.  You'll
 *     get the crazy differences between browsers, but at least it'll be in
 *     pixels!
 *
 *   - positive value indicates scrolling DOWN/RIGHT, negative UP/LEFT.  This
 *     should translate to positive value zooming IN, negative zooming OUT.
 *     This matches the newer 'wheel' event.
 *
 * Why are there spinX, spinY (or pixels)?
 *
 *   - spinX is a 2-finger side drag on the trackpad, and a shift + wheel turn
 *     with a mouse.  It results in side-scrolling in the browser by default.
 *
 *   - spinY is what you expect -- it's the classic axis of a mouse wheel.
 *
 *   - I dropped spinZ/pixelZ.  It is supported by the DOM 3 'wheel' event and
 *     probably is by browsers in conjunction with fancy 3D controllers .. but
 *     you know.
 *
 * Implementation info:
 *
 * Examples of 'wheel' event if you scroll slowly (down) by one step with an
 * average mouse:
 *
 *   OS X + Chrome  (mouse)     -    4   pixel delta  (wheelDelta -120)
 *   OS X + Safari  (mouse)     -  N/A   pixel delta  (wheelDelta  -12)
 *   OS X + Firefox (mouse)     -    0.1 line  delta  (wheelDelta  N/A)
 *   Win8 + Chrome  (mouse)     -  100   pixel delta  (wheelDelta -120)
 *   Win8 + Firefox (mouse)     -    3   line  delta  (wheelDelta -120)
 *
 * On the trackpad:
 *
 *   OS X + Chrome  (trackpad)  -    2   pixel delta  (wheelDelta   -6)
 *   OS X + Firefox (trackpad)  -    1   pixel delta  (wheelDelta  N/A)
 *
 * On other/older browsers.. it's more complicated as there can be multiple and
 * also missing delta values.
 *
 * The 'wheel' event is more standard:
 *
 * http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents
 *
 * The basics is that it includes a unit, deltaMode (pixels, lines, pages), and
 * deltaX, deltaY and deltaZ.  Some browsers provide other values to maintain
 * backward compatibility with older events.  Those other values help us
 * better normalize spin speed.  Example of what the browsers provide:
 *
 *                          | event.wheelDelta | event.detail
 *        ------------------+------------------+--------------
 *          Safari v5/OS X  |       -120       |       0
 *          Safari v5/Win7  |       -120       |       0
 *         Chrome v17/OS X  |       -120       |       0
 *         Chrome v17/Win7  |       -120       |       0
 *                IE9/Win7  |       -120       |   undefined
 *         Firefox v4/OS X  |     undefined    |       1
 *         Firefox v4/Win7  |     undefined    |       3
 *
 */
function normalizeWheel(/*object*/ event) /*object*/ {
  var sX = 0, sY = 0,       // spinX, spinY
      pX = 0, pY = 0;       // pixelX, pixelY

  // Legacy
  if ('detail'      in event) { sY = event.detail; }
  if ('wheelDelta'  in event) { sY = -event.wheelDelta / 120; }
  if ('wheelDeltaY' in event) { sY = -event.wheelDeltaY / 120; }
  if ('wheelDeltaX' in event) { sX = -event.wheelDeltaX / 120; }

  // side scrolling on FF with DOMMouseScroll
  if ( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {
    sX = sY;
    sY = 0;
  }

  pX = sX * PIXEL_STEP;
  pY = sY * PIXEL_STEP;

  if ('deltaY' in event) { pY = event.deltaY; }
  if ('deltaX' in event) { pX = event.deltaX; }

  if ((pX || pY) && event.deltaMode) {
    if (event.deltaMode == 1) {          // delta in LINE units
      pX *= LINE_HEIGHT;
      pY *= LINE_HEIGHT;
    } else {                             // delta in PAGE units
      pX *= PAGE_HEIGHT;
      pY *= PAGE_HEIGHT;
    }
  }

  // Fall-back if spin cannot be determined
  if (pX && !sX) { sX = (pX < 1) ? -1 : 1; }
  if (pY && !sY) { sY = (pY < 1) ? -1 : 1; }

  return { spinX  : sX,
           spinY  : sY,
           pixelX : pX,
           pixelY : pY };
}


/**
 * The best combination if you prefer spinX + spinY normalization.  It favors
 * the older DOMMouseScroll for Firefox, as FF does not include wheelDelta with
 * 'wheel' event, making spin speed determination impossible.
 */
normalizeWheel.getEventType = function() /*string*/ {
  return (UserAgent_DEPRECATED.firefox())
           ? 'DOMMouseScroll'
           : (isEventSupported('wheel'))
               ? 'wheel'
               : 'mousewheel';
};

module.exports = normalizeWheel;


/***/ },

/***/ 592
(module, __unused_webpack_exports, __webpack_require__) {

var x = (y) => {
	var x = {}; __webpack_require__.d(x, y); return x
} 
var y = (x) => (() => (x))
module.exports = x({  });

/***/ },

/***/ 5166
(module, __unused_webpack_exports, __webpack_require__) {

var x = (y) => {
	var x = {}; __webpack_require__.d(x, y); return x
} 
var y = (x) => (() => (x))
module.exports = x({ ["PropTypes"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.PropTypes), ["bkZIndexManager"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.bkZIndexManager), ["classes"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.classes), ["formItemKey"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.formItemKey), ["formKey"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.formKey), ["resolveClassName"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.resolveClassName), ["useForm"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.useForm), ["useFormItem"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.useFormItem), ["withInstallProps"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.withInstallProps) });

/***/ },

/***/ 5286
(module, __unused_webpack_exports, __webpack_require__) {

var x = (y) => {
	var x = {}; __webpack_require__.d(x, y); return x
} 
var y = (x) => (() => (x))
module.exports = x({ ["computed"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.computed), ["createVNode"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.createVNode), ["defineComponent"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.defineComponent), ["getCurrentInstance"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.getCurrentInstance), ["h"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.h), ["nextTick"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.nextTick), ["onBeforeUnmount"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount), ["onMounted"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.onMounted), ["provide"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.provide), ["reactive"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.reactive), ["render"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.render), ["resolveDirective"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.resolveDirective), ["toRefs"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.toRefs), ["withDirectives"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.withDirectives) });

/***/ },

/***/ 6284
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ _arrayLikeToArray)
/* harmony export */ });
function _arrayLikeToArray(r, a) {
  (null == a || a > r.length) && (a = r.length);
  for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
  return n;
}


/***/ },

/***/ 3492
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ _arrayWithoutHoles)
/* harmony export */ });
/* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6284);

function _arrayWithoutHoles(r) {
  if (Array.isArray(r)) return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__["default"])(r);
}


/***/ },

/***/ 4586
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ _defineProperty)
/* harmony export */ });
/* harmony import */ var _toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(205);

function _defineProperty(e, r, t) {
  return (r = (0,_toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__["default"])(r)) in e ? Object.defineProperty(e, r, {
    value: t,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : e[r] = t, e;
}


/***/ },

/***/ 4430
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ _iterableToArray)
/* harmony export */ });
function _iterableToArray(r) {
  if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
}


/***/ },

/***/ 2880
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ _nonIterableSpread)
/* harmony export */ });
function _nonIterableSpread() {
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}


/***/ },

/***/ 5153
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ _toConsumableArray)
/* harmony export */ });
/* harmony import */ var _arrayWithoutHoles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3492);
/* harmony import */ var _iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4430);
/* harmony import */ var _unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7985);
/* harmony import */ var _nonIterableSpread_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2880);




function _toConsumableArray(r) {
  return (0,_arrayWithoutHoles_js__WEBPACK_IMPORTED_MODULE_0__["default"])(r) || (0,_iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__["default"])(r) || (0,_unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__["default"])(r) || (0,_nonIterableSpread_js__WEBPACK_IMPORTED_MODULE_3__["default"])();
}


/***/ },

/***/ 9824
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ toPrimitive)
/* harmony export */ });
/* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7545);

function toPrimitive(t, r) {
  if ("object" != (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(t) || !t) return t;
  var e = t[Symbol.toPrimitive];
  if (void 0 !== e) {
    var i = e.call(t, r || "default");
    if ("object" != (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(i)) return i;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return ("string" === r ? String : Number)(t);
}


/***/ },

/***/ 205
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ toPropertyKey)
/* harmony export */ });
/* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7545);
/* harmony import */ var _toPrimitive_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9824);


function toPropertyKey(t) {
  var i = (0,_toPrimitive_js__WEBPACK_IMPORTED_MODULE_1__["default"])(t, "string");
  return "symbol" == (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(i) ? i : i + "";
}


/***/ },

/***/ 7545
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ _typeof)
/* harmony export */ });
function _typeof(o) {
  "@babel/helpers - typeof";

  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
    return typeof o;
  } : function (o) {
    return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
  }, _typeof(o);
}


/***/ },

/***/ 7985
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ _unsupportedIterableToArray)
/* harmony export */ });
/* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6284);

function _unsupportedIterableToArray(r, a) {
  if (r) {
    if ("string" == typeof r) return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__["default"])(r, a);
    var t = {}.toString.call(r).slice(8, -1);
    return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__["default"])(r, a) : void 0;
  }
}


/***/ }

/******/ });
/************************************************************************/
/******/ // 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/define property getters */
/******/ (() => {
/******/ 	// define getter functions for harmony exports
/******/ 	__webpack_require__.d = (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 */
/******/ (() => {
/******/ 	__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/ 
/************************************************************************/

// EXTERNAL MODULE: external "../shared"
var shared_ = __webpack_require__(5166);
// EXTERNAL MODULE: external "vue"
var external_vue_ = __webpack_require__(5286);
;// external "../config-provider"

;// ../../packages/form/src/compose-form-item.tsx
/*
 * Tencent is pleased to support the open source community by making
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
 *
 * Copyright (C) 2025 Tencent.  All rights reserved.
 *
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
 *
 * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
 *
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
 * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 * the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */


var isCustomComponent = function isCustomComponent(node) {
  return node.__v_isVNode;
};
/* harmony default export */ const compose_form_item = ((0,external_vue_.defineComponent)({
  name: 'ComposeFormItem',
  props: {
    headBackgroundColor: {
      type: String,
      "default": '#FAFBFD'
    },
    tailBackgroundColor: String
  },
  setup: function setup() {
    var _usePrefix = __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3_usePrefix__(),
      resolveClassName = _usePrefix.resolveClassName;
    return {
      resolveClassName: resolveClassName
    };
  },
  render: function render() {
    if (!this.$slots["default"]) {
      return null;
    }
    var childrenArr = this.$slots["default"]();
    if (childrenArr.length > 1) {
      var childrenLength = childrenArr.length;
      var startIndex = 0;
      var headChildren = null;
      while (startIndex < childrenLength) {
        if (isCustomComponent(childrenArr[startIndex])) {
          headChildren = childrenArr[startIndex];
          break;
        }
        startIndex = startIndex + 1;
      }
      var tailIndex = childrenLength - 1;
      var tailChildren = null;
      while (tailIndex >= 0 && tailIndex > startIndex) {
        if (isCustomComponent(childrenArr[tailIndex])) {
          tailChildren = childrenArr[tailIndex];
          break;
        }
        tailIndex = tailIndex - 1;
      }
      if (headChildren && tailChildren) {
        if (!headChildren.props) {
          headChildren.props = {};
        }
        var headChildClass = "".concat(this.resolveClassName('compose-form-item-head'));
        if (headChildren.props["class"]) {
          headChildClass += " ".concat(headChildren.props["class"]);
        }
        if (this.headBackgroundColor) {
          headChildren.props.style = Object.assign(headChildren.props.style || {}, {
            'background-color': this.headBackgroundColor
          });
        }
        headChildren.props["class"] = headChildClass;
        if (!tailChildren.props) {
          tailChildren.props = {};
        }
        var tailChildStaticClass = "".concat(this.resolveClassName('compose-form-item-tail'));
        if (tailChildren.props["class"]) {
          tailChildStaticClass += " ".concat(tailChildren.props["class"]);
        }
        if (this.tailBackgroundColor) {
          tailChildren.props.style = Object.assign(tailChildren.props.style || {}, {
            'background-color': this.tailBackgroundColor
          });
        }
        tailChildren.props["class"] = tailChildStaticClass;
      }
    }
    return (0,external_vue_.h)('div', {
      "class": "".concat(this.resolveClassName('compose-form-item'))
    }, childrenArr);
  }
}));
// EXTERNAL MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__(4586);
;// external "lodash/isBoolean"

;// external "lodash/isString"

;// ../../packages/form/src/form.tsx


function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0,defineProperty["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
/*
 * Tencent is pleased to support the open source community by making
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
 *
 * Copyright (C) 2025 Tencent.  All rights reserved.
 *
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
 *
 * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
 *
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
 * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 * the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */





var formProps = {
  formType: shared_.PropTypes.oneOf(['default', 'vertical']).def('default'),
  labelWidth: shared_.PropTypes.oneOfType([Number, String]).def(150),
  labelPosition: shared_.PropTypes.oneOf(['left', 'center', 'right']),
  model: shared_.PropTypes.object,
  rules: shared_.PropTypes.object
};
var formEvents = {
  submit: null,
  validate: function validate(property, result, message) {
    return __WEBPACK_EXTERNAL_MODULE_lodash_isString_e6fa8a5b_default__(property) && __WEBPACK_EXTERNAL_MODULE_lodash_isBoolean_dcb66997_default__(result) && __WEBPACK_EXTERNAL_MODULE_lodash_isString_e6fa8a5b_default__(message);
  }
};
/* harmony default export */ const src_form = ((0,external_vue_.defineComponent)({
  name: 'Form',
  props: formProps,
  emits: formEvents,
  setup: function setup(props, context) {
    // form-item 列表
    var formItemInstanceList = [];
    /**
     * @desc 注册 form-item
     * @param { IFormItemContext } formItemInstance
     */
    var register = function register(formItemInstance) {
      formItemInstanceList.push(formItemInstance);
    };
    /**
     * @desc 卸载 form-item
     * @param { IFormItemContext } formItemInstance
     */
    var unregister = function unregister(formItemInstance) {
      formItemInstanceList = formItemInstanceList.reduce(function (result, item) {
        if (item !== formItemInstance) {
          result.push(item);
        }
        return result;
      }, []);
    };
    (0,external_vue_.provide)(shared_.formKey, {
      props: props,
      emit: context.emit,
      register: register,
      unregister: unregister
    });
    var handleSubmit = function handleSubmit(event) {
      event.preventDefault();
      context.emit('submit');
    };
    /**
     * @desc 验证表单
     * @param { string | Array<string> } fields 指定表单字段
     * @returns { Promise<[]> }
     */
    var validate = function validate(fields) {
      var fieldMap = {};
      if (fields) {
        var fieldList = typeof fields === 'string' ? [fields] : fields;
        fieldMap = fieldList.reduce(function (result, item) {
          return _objectSpread(_objectSpread({}, result), {}, (0,defineProperty["default"])({}, item, true));
        }, {});
      } else {
        fieldMap = formItemInstanceList.reduce(function (result, item) {
          if (item.property) {
            return _objectSpread(_objectSpread({}, result), {}, (0,defineProperty["default"])({}, item.property, true));
          }
          return result;
        }, {});
      }
      return Promise.all(formItemInstanceList.reduce(function (result, formItem) {
        if (fieldMap[formItem.property]) {
          result.push(formItem.validate());
        }
        return result;
      }, [])).then(function () {
        return Promise.resolve(props.model);
      });
    };
    /**
     * @desc 获取表单的验证的结果（所有表单项验证成功返回 true）
     * @returns { Promise<Boolean> }
     */
    var getValidateResult = function getValidateResult() {
      return Promise.all(formItemInstanceList.map(function (formItem) {
        return formItem.validate(undefined, false);
      })).then(function () {
        return true;
      })["catch"](function () {
        return false;
      });
    };
    /**
     * @desc 清除表单验证错误信息
     * @param { string | Array<string> } fields 指定表单字段
     */
    var clearValidate = function clearValidate(fields) {
      var fieldMap = {};
      if (fields) {
        var fieldList = typeof fields === 'string' ? [fields] : fields;
        fieldMap = fieldList.reduce(function (result, item) {
          return _objectSpread(_objectSpread({}, result), {}, (0,defineProperty["default"])({}, item, true));
        }, {});
      } else {
        fieldMap = formItemInstanceList.reduce(function (result, item) {
          return _objectSpread(_objectSpread({}, result), {}, (0,defineProperty["default"])({}, item.property, true));
        }, {});
      }
      formItemInstanceList.forEach(function (formItem) {
        return fieldMap[formItem.property] && formItem.clearValidate();
      });
    };
    var _usePrefix = __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3_usePrefix__(),
      resolveClassName = _usePrefix.resolveClassName;
    return {
      handleSubmit: handleSubmit,
      validate: validate,
      getValidateResult: getValidateResult,
      clearValidate: clearValidate,
      resolveClassName: resolveClassName
    };
  },
  render: function render() {
    var _this$$slots$default, _this$$slots;
    var formClasses = (0,shared_.classes)((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(this.resolveClassName('form')), true), "".concat(this.resolveClassName("form--".concat(this.formType))), true));
    return (0,external_vue_.createVNode)("form", {
      "class": formClasses,
      "onSubmit": this.handleSubmit
    }, [(_this$$slots$default = (_this$$slots = this.$slots)["default"]) === null || _this$$slots$default === void 0 ? void 0 : _this$$slots$default.call(_this$$slots)]);
  }
}));
// EXTERNAL MODULE: ../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
var toConsumableArray = __webpack_require__(5153);
// EXTERNAL MODULE: ../../packages/directives/src/index.ts + 7 modules
var src = __webpack_require__(4193);
;// external "../icon"

;// external "lodash/get"

;// external "lodash/isFunction"

;// ../../packages/form/src/utils.ts
/*
 * Tencent is pleased to support the open source community by making
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
 *
 * Copyright (C) 2025 Tencent.  All rights reserved.
 *
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
 *
 * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
 *
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
 * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 * the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */
var getRuleMessage = function getRuleMessage(rule) {
  if (typeof rule.message === 'function') {
    return rule.message();
  }
  return rule.message;
};
;// external "lodash/isDate"

;// external "lodash/isEmpty"

;// ../../packages/form/src/validator.ts
/*
 * Tencent is pleased to support the open source community by making
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
 *
 * Copyright (C) 2025 Tencent.  All rights reserved.
 *
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
 *
 * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
 *
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
 * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 * the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */


/* harmony default export */ const src_validator = ({
  required: function required(value) {
    if (typeof value === 'number' || typeof value === 'boolean' || __WEBPACK_EXTERNAL_MODULE_lodash_isDate_b457317b_default__(value)) {
      return true;
    }
    return !__WEBPACK_EXTERNAL_MODULE_lodash_isEmpty_e109fd6b_default__(value);
  },
  min: function min(value, _min) {
    return value >= _min;
  },
  max: function max(value, _max) {
    return _max >= value;
  },
  email: function email(value) {
    return /^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/.test(value);
  },
  maxlength: function maxlength(value, _maxlength) {
    return value.length <= _maxlength;
  },
  pattern: function pattern(value, _pattern) {
    var result = _pattern.test(value);
    _pattern.lastIndex = 0;
    return result;
  }
});
;// ../../packages/form/src/form-item.tsx



function form_item_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function form_item_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? form_item_ownKeys(Object(t), !0).forEach(function (r) { (0,defineProperty["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : form_item_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
/*
 * Tencent is pleased to support the open source community by making
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
 *
 * Copyright (C) 2025 Tencent.  All rights reserved.
 *
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
 *
 * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
 *
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
 * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 * the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */









var formItemProps = {
  itemType: shared_.PropTypes.oneOf(['default', 'vertical']),
  label: shared_.PropTypes.string,
  labelWidth: shared_.PropTypes.oneOfType([Number, String]),
  labelPosition: shared_.PropTypes.oneOf(['left', 'center', 'right']),
  property: shared_.PropTypes.string.def(''),
  required: shared_.PropTypes.bool.def(false),
  email: shared_.PropTypes.bool.def(false),
  max: shared_.PropTypes.number,
  min: shared_.PropTypes.number,
  maxlength: shared_.PropTypes.number,
  rules: shared_.PropTypes.array,
  description: shared_.PropTypes.string,
  errorDisplayType: shared_.PropTypes.oneOf(['tooltips', 'normal']).def('normal'),
  errorTipAppendToParent: shared_.PropTypes.bool.def(false)
};
var hasOwn = function hasOwn(obj, key) {
  return Object.prototype.hasOwnProperty.call(obj, key);
};
var getRulesFromProps = function getRulesFromProps(props, t) {
  var rules = [];
  var label = props.label || '';
  if (props.required) {
    rules.push({
      required: true,
      validator: src_validator.required,
      message: "".concat(label).concat(t.value.notBeEmpty),
      trigger: 'change'
    });
  }
  if (props.email) {
    rules.push({
      email: true,
      validator: src_validator.email,
      message: "".concat(label).concat(t.value.incorrectFormat),
      trigger: 'change'
    });
  }
  if (Number(props.max) > -1) {
    rules.push({
      validator: function validator(value) {
        return src_validator.max(value, props.max);
      },
      message: "".concat(label).concat(t.value.max, " ").concat(props.max),
      trigger: 'change'
    });
  }
  if (Number(props.min) > -1) {
    rules.push({
      validator: function validator(value) {
        return src_validator.min(value, props.min);
      },
      message: "".concat(label).concat(t.value.min, " ").concat(props.min),
      trigger: 'change'
    });
  }
  if (Number(props.maxlength) > -1) {
    rules.push({
      validator: function validator(value) {
        return src_validator.maxlength(value, props.maxlength);
      },
      message: "".concat(label).concat(t.value.maxLen, " ").concat(props.maxlength),
      trigger: 'change'
    });
  }
  return rules;
};
var mergeRules = function mergeRules(configRules, propRules, t) {
  var customRequired = false;
  var customEmail = false;
  var formatConfigRules = configRules.reduce(function (result, rule) {
    var rulevalidator;
    if (rule.required) {
      rulevalidator = __WEBPACK_EXTERNAL_MODULE_lodash_isFunction_f90b20d6_default__(rule.validator) ? rule.validator : src_validator.required;
      customRequired = true;
    } else if (rule.email) {
      rulevalidator = __WEBPACK_EXTERNAL_MODULE_lodash_isFunction_f90b20d6_default__(rule.validator) ? rule.validator : src_validator.email;
      customEmail = true;
    } else if (Number(rule.max) > -1) {
      rulevalidator = function rulevalidator(value) {
        return src_validator.max(value, rule.max);
      };
    } else if (Number(rule.min) > -1) {
      rulevalidator = function rulevalidator(value) {
        return src_validator.min(value, rule.max);
      };
    } else if (Number(rule.maxlength) > -1) {
      rulevalidator = function rulevalidator(value) {
        return src_validator.min(value, rule.max);
      };
    } else if (Object.prototype.toString.call(rule.pattern) === '[object RegExp]') {
      rulevalidator = function rulevalidator(value) {
        return src_validator.pattern(value, rule.pattern);
      };
    } else if (__WEBPACK_EXTERNAL_MODULE_lodash_isFunction_f90b20d6_default__(rule.validator)) {
      rulevalidator = rule.validator;
    } else {
      // 不支持的配置规则
      return result;
    }
    result.push({
      validator: rulevalidator,
      message: rule.message || t.value.verifyError,
      trigger: rule.trigger || 'blur'
    });
    return result;
  }, []);
  // 自定义配置验证规则覆盖内置验证规则
  var filterPropRules = propRules.reduce(function (result, ruleItem) {
    if (ruleItem.required && customRequired) {
      return result;
    }
    if (ruleItem.email && customEmail) {
      return result;
    }
    result.push(ruleItem);
    return result;
  }, []);
  return [].concat((0,toConsumableArray["default"])(filterPropRules), (0,toConsumableArray["default"])(formatConfigRules));
};
var getTriggerRules = function getTriggerRules(trigger, rules) {
  return rules.reduce(function (result, rule) {
    if (!rule.trigger || !trigger) {
      result.push(rule);
      return result;
    }
    var ruleTriggerList = Array.isArray(rule.trigger) ? rule.trigger : [rule.trigger];
    if (ruleTriggerList.includes(trigger)) {
      result.push(rule);
    }
    return result;
  }, []);
};
var isValid = function isValid(value) {
  return value !== undefined;
};
/* harmony default export */ const form_item = ((0,external_vue_.defineComponent)({
  name: 'FormItem',
  directives: {
    bkTooltips: src.bkTooltips
  },
  props: formItemProps,
  setup: function setup(props, context) {
    var t = __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3_useLocale__('form');
    var form = (0,shared_.useForm)();
    var isForm = Boolean(form);
    var parentFormItem = (0,shared_.useFormItem)();
    var isNested = Boolean(parentFormItem);
    var currentInstance = (0,external_vue_.getCurrentInstance)();
    var state = (0,external_vue_.reactive)({
      isError: false,
      errorMessage: ''
    });
    var isFormTypeVertical = (0,external_vue_.computed)(function () {
      if (!isForm) {
        return false;
      }
      return form.props.formType === 'vertical' || props.itemType === 'vertical';
    });
    var isShowLabel = (0,external_vue_.computed)(function () {
      if (props.label || context.slots.label) {
        return true;
      }
      return false;
    });
    var labelStyles = (0,external_vue_.computed)(function () {
      var styles = {
        width: '',
        paddingRight: '',
        textAlign: ''
      };
      var labelPosition = props.labelPosition || isForm && form.props.labelPosition;
      if (labelPosition) {
        styles['text-align'] = labelPosition;
      }
      if (form.props.formType === 'vertical' || !props.label && isNested) {
        return styles;
      }
      var labelWidth = isValid(props.labelWidth) ? props.labelWidth : isForm && form.props.labelWidth;
      if (isValid(labelWidth)) {
        styles.width = "".concat(labelWidth, "px");
        styles.paddingRight = labelWidth ? '' : '0px';
      }
      return styles;
    });
    var contentStyles = (0,external_vue_.computed)(function () {
      return (0,defineProperty["default"])({}, 'margin-left', labelStyles.value.width);
    });
    /**
     * @desc 验证字段
     *
     * @param { undefined | string } trigger 验证触发方式
     * @param { boolean } showError 是否展示错误信息
     */
    var validate = function validate(trigger) {
      var showError = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
      // 没有设置 property 不进行验证
      if (!props.property || isForm && !form.props.model) {
        return Promise.resolve(true);
      }
      var rules = [];
      // 继承 form 的验证规则
      if (isForm && form.props.rules && hasOwn(form.props.rules, props.property)) {
        rules = form.props.rules[props.property];
      }
      // form-item 自己的 rules 规则优先级更高
      if (props.rules) {
        rules = props.rules;
      }
      // 合并规则属性配置
      rules = getTriggerRules(trigger, mergeRules(rules, getRulesFromProps(props, t), t));
      // 重新触发验证重置上次的验证状态
      if (rules.length > 0 && showError) {
        state.isError = false;
        state.errorMessage = '';
      }
      var value = __WEBPACK_EXTERNAL_MODULE_lodash_get_9427f899_default__(form.props.model, props.property);
      var doValidate = function () {
        var stepIndex = -1;
        return function () {
          stepIndex = stepIndex + 1;
          // form-item 验证通过
          if (stepIndex >= rules.length) {
            form.emit('validate', props.property, true, '');
            return Promise.resolve(true);
          }
          var rule = rules[stepIndex];
          return Promise.resolve().then(function () {
            var result = rule.validator(value);
            // 同步验证通过，进行下一步
            if (result === true) {
              return doValidate();
            }
            return Promise.resolve(result).then(function (data) {
              // 验证失败，结果为 false
              if (data === false) {
                return Promise.reject(getRuleMessage(rule));
              }
              // 验证失败，结果为错误提示信息
              if (typeof data === 'string') {
                return Promise.reject(data);
              }
              // 其他情况视为验证通过，进行下一步
              return Promise.resolve(true);
            }).then(function () {
              return doValidate();
            }, function (errorMessage) {
              state.isError = true;
              state.errorMessage = errorMessage;
              form.emit('validate', props.property, false, errorMessage);
              return Promise.reject(errorMessage);
            });
          });
        };
      }();
      return doValidate();
    };
    /**
     * @desc 清除验证状态
     */
    var clearValidate = function clearValidate() {
      state.isError = false;
      state.errorMessage = '';
    };
    (0,external_vue_.provide)(shared_.formItemKey, form_item_objectSpread(form_item_objectSpread({}, props), {}, {
      validate: validate,
      clearValidate: clearValidate
    }));
    (0,external_vue_.onMounted)(function () {
      if (isForm) {
        form.register(currentInstance.proxy);
      }
    });
    (0,external_vue_.onBeforeUnmount)(function () {
      if (isForm) {
        form.unregister(currentInstance.proxy);
      }
    });
    var _usePrefix = __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3_usePrefix__(),
      resolveClassName = _usePrefix.resolveClassName;
    return form_item_objectSpread(form_item_objectSpread({}, (0,external_vue_.toRefs)(state)), {}, {
      isShowLabel: isShowLabel,
      labelStyles: labelStyles,
      contentStyles: contentStyles,
      isFormTypeVertical: isFormTypeVertical,
      validate: validate,
      clearValidate: clearValidate,
      resolveClassName: resolveClassName
    });
  },
  render: function render() {
    var _this = this,
      _this$$slots$labelApp,
      _this$$slots,
      _this$$slots$default,
      _this$$slots2;
    var itemClassees = (0,shared_.classes)((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(this.resolveClassName('form-item')), true), "".concat(this.resolveClassName("form-item--".concat(this.itemType))), Boolean(this.itemType)), 'is-error', this.isError), 'is-required', this.required));
    var renderLabel = function renderLabel() {
      if (_this.$slots.label) {
        return (0,external_vue_.createVNode)("span", null, [_this.$slots.label()]);
      }
      if (_this.description) {
        return (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("span", {
          "class": (0,defineProperty["default"])({}, "".concat(_this.resolveClassName('form-label-description')), Boolean(_this.description))
        }, [_this.label]), [[(0,external_vue_.resolveDirective)("bk-tooltips"), {
          content: _this.description,
          extCls: _this.resolveClassName('form-label-description-popper')
        }]]);
      }
      return (0,external_vue_.createVNode)("span", null, [_this.label]);
    };
    var renderError = function renderError() {
      if (!_this.isError) {
        return null;
      }
      if (_this.errorDisplayType === 'tooltips') {
        return (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("div", {
          "class": "".concat(_this.resolveClassName('form-error-tips'))
        }, [(0,external_vue_.createVNode)(__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_ExclamationCircleShape__, null, null)]), [[(0,external_vue_.resolveDirective)("bk-tooltips"), {
          content: _this.errorMessage,
          boundary: _this.errorTipAppendToParent ? 'parent' : document.body
        }]]);
      }
      return (0,external_vue_.createVNode)("div", {
        "class": "".concat(_this.resolveClassName('form-error'))
      }, [_this.$slots.error ? _this.$slots.error(_this.errorMessage) : _this.errorMessage]);
    };
    return (0,external_vue_.createVNode)("div", {
      "class": itemClassees
    }, [this.isShowLabel && (0,external_vue_.createVNode)("div", {
      "style": this.labelStyles,
      "class": "".concat(this.resolveClassName('form-label'))
    }, [renderLabel(), this.isFormTypeVertical && ((_this$$slots$labelApp = (_this$$slots = this.$slots).labelAppend) === null || _this$$slots$labelApp === void 0 ? void 0 : _this$$slots$labelApp.call(_this$$slots))]), (0,external_vue_.createVNode)("div", {
      "style": this.contentStyles,
      "class": "".concat(this.resolveClassName('form-content'))
    }, [(_this$$slots$default = (_this$$slots2 = this.$slots)["default"]) === null || _this$$slots$default === void 0 ? void 0 : _this$$slots$default.call(_this$$slots2), renderError()])]);
  }
}));
;// ../../packages/form/src/index.ts
/*
 * Tencent is pleased to support the open source community by making
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
 *
 * Copyright (C) 2025 Tencent.  All rights reserved.
 *
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
 *
 * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
 *
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
 * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 * the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */





var BkForm = (0,shared_.withInstallProps)(src_form, {
  FormItem: form_item,
  ComposeFormItem: compose_form_item
});
/* harmony default export */ const form_src = (BkForm);

export { compose_form_item as BkComposeFormItem, BkForm, form_item as BkFormItem, form_src as default };
export const formItemKey = shared_.formItemKey;
export const formKey = shared_.formKey;
export const useFormItem = shared_.useFormItem;
