import "../styles/reset.css";
import "./sideslider.less";
import { PropTypes as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__, withInstall as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_withInstall__ } from "../shared";
import { Fragment as __WEBPACK_EXTERNAL_MODULE_vue_Fragment__, createVNode as __WEBPACK_EXTERNAL_MODULE_vue_createVNode__, defineComponent as __WEBPACK_EXTERNAL_MODULE_vue_defineComponent__, getCurrentInstance as __WEBPACK_EXTERNAL_MODULE_vue_getCurrentInstance__, isVNode as __WEBPACK_EXTERNAL_MODULE_vue_isVNode__, mergeProps as __WEBPACK_EXTERNAL_MODULE_vue_mergeProps__, nextTick as __WEBPACK_EXTERNAL_MODULE_vue_nextTick__, ref as __WEBPACK_EXTERNAL_MODULE_vue_ref__, useAttrs as __WEBPACK_EXTERNAL_MODULE_vue_useAttrs__, useSlots as __WEBPACK_EXTERNAL_MODULE_vue_useSlots__, watch as __WEBPACK_EXTERNAL_MODULE_vue_watch__, withModifiers as __WEBPACK_EXTERNAL_MODULE_vue_withModifiers__ } from "vue";
import { usePrefix as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3_usePrefix__ } from "../config-provider";
import { AngleLeft as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_AngleLeft__, AngleRight as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_AngleRight__ } from "../icon";
import { default as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_modal_d1344388_default__, propsMixin as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_modal_d1344388_propsMixin__ } from "../modal";
import "../modal/modal.less";
import { default as __WEBPACK_EXTERNAL_MODULE_lodash_cloneDeep_13f2b125_default__ } from "lodash/cloneDeep";
/******/ var __webpack_modules__ = ({

/***/ 6699
(module) {

function _OverloadYield(e, d) {
  this.v = e, this.k = d;
}
module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports;

/***/ },

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

var regeneratorDefine = __webpack_require__(645);
function _regenerator() {
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
  var e,
    t,
    r = "function" == typeof Symbol ? Symbol : {},
    n = r.iterator || "@@iterator",
    o = r.toStringTag || "@@toStringTag";
  function i(r, n, o, i) {
    var c = n && n.prototype instanceof Generator ? n : Generator,
      u = Object.create(c.prototype);
    return regeneratorDefine(u, "_invoke", function (r, n, o) {
      var i,
        c,
        u,
        f = 0,
        p = o || [],
        y = !1,
        G = {
          p: 0,
          n: 0,
          v: e,
          a: d,
          f: d.bind(e, 4),
          d: function d(t, r) {
            return i = t, c = 0, u = e, G.n = r, a;
          }
        };
      function d(r, n) {
        for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) {
          var o,
            i = p[t],
            d = G.p,
            l = i[2];
          r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0));
        }
        if (o || r > 1) return a;
        throw y = !0, n;
      }
      return function (o, p, l) {
        if (f > 1) throw TypeError("Generator is already running");
        for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) {
          i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u);
          try {
            if (f = 2, i) {
              if (c || (o = "next"), t = i[o]) {
                if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object");
                if (!t.done) return t;
                u = t.value, c < 2 && (c = 0);
              } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1);
              i = e;
            } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break;
          } catch (t) {
            i = e, c = 1, u = t;
          } finally {
            f = 1;
          }
        }
        return {
          value: t,
          done: y
        };
      };
    }(r, o, i), !0), u;
  }
  var a = {};
  function Generator() {}
  function GeneratorFunction() {}
  function GeneratorFunctionPrototype() {}
  t = Object.getPrototypeOf;
  var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function () {
      return this;
    }), t),
    u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);
  function f(e) {
    return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e;
  }
  return GeneratorFunction.prototype = GeneratorFunctionPrototype, regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), regeneratorDefine(u), regeneratorDefine(u, o, "Generator"), regeneratorDefine(u, n, function () {
    return this;
  }), regeneratorDefine(u, "toString", function () {
    return "[object Generator]";
  }), (module.exports = _regenerator = function _regenerator() {
    return {
      w: i,
      m: f
    };
  }, module.exports.__esModule = true, module.exports["default"] = module.exports)();
}
module.exports = _regenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;

/***/ },

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

var regeneratorAsyncGen = __webpack_require__(5800);
function _regeneratorAsync(n, e, r, t, o) {
  var a = regeneratorAsyncGen(n, e, r, t, o);
  return a.next().then(function (n) {
    return n.done ? n.value : a.next();
  });
}
module.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports["default"] = module.exports;

/***/ },

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

var regenerator = __webpack_require__(5726);
var regeneratorAsyncIterator = __webpack_require__(4686);
function _regeneratorAsyncGen(r, e, t, o, n) {
  return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise);
}
module.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports["default"] = module.exports;

/***/ },

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

var OverloadYield = __webpack_require__(6699);
var regeneratorDefine = __webpack_require__(645);
function AsyncIterator(t, e) {
  function n(r, o, i, f) {
    try {
      var c = t[r](o),
        u = c.value;
      return u instanceof OverloadYield ? e.resolve(u.v).then(function (t) {
        n("next", t, i, f);
      }, function (t) {
        n("throw", t, i, f);
      }) : e.resolve(u).then(function (t) {
        c.value = t, i(c);
      }, function (t) {
        return n("throw", t, i, f);
      });
    } catch (t) {
      f(t);
    }
  }
  var r;
  this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () {
    return this;
  })), regeneratorDefine(this, "_invoke", function (t, o, i) {
    function f() {
      return new e(function (e, r) {
        n(t, i, e, r);
      });
    }
    return r = r ? r.then(f, f) : f();
  }, !0);
}
module.exports = AsyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports;

/***/ },

/***/ 645
(module) {

function _regeneratorDefine(e, r, n, t) {
  var i = Object.defineProperty;
  try {
    i({}, "", {});
  } catch (e) {
    i = 0;
  }
  module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) {
    function o(r, n) {
      _regeneratorDefine(e, r, function (e) {
        return this._invoke(r, n, e);
      });
    }
    r ? i ? i(e, r, {
      value: n,
      enumerable: !t,
      configurable: !t,
      writable: !t
    }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2));
  }, module.exports.__esModule = true, module.exports["default"] = module.exports, _regeneratorDefine(e, r, n, t);
}
module.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports["default"] = module.exports;

/***/ },

/***/ 1918
(module) {

function _regeneratorKeys(e) {
  var n = Object(e),
    r = [];
  for (var t in n) r.unshift(t);
  return function e() {
    for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e;
    return e.done = !0, e;
  };
}
module.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports["default"] = module.exports;

/***/ },

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

var OverloadYield = __webpack_require__(6699);
var regenerator = __webpack_require__(5726);
var regeneratorAsync = __webpack_require__(9540);
var regeneratorAsyncGen = __webpack_require__(5800);
var regeneratorAsyncIterator = __webpack_require__(4686);
var regeneratorKeys = __webpack_require__(1918);
var regeneratorValues = __webpack_require__(2696);
function _regeneratorRuntime() {
  "use strict";

  var r = regenerator(),
    e = r.m(_regeneratorRuntime),
    t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor;
  function n(r) {
    var e = "function" == typeof r && r.constructor;
    return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name));
  }
  var o = {
    "throw": 1,
    "return": 2,
    "break": 3,
    "continue": 3
  };
  function a(r) {
    var e, t;
    return function (n) {
      e || (e = {
        stop: function stop() {
          return t(n.a, 2);
        },
        "catch": function _catch() {
          return n.v;
        },
        abrupt: function abrupt(r, e) {
          return t(n.a, o[r], e);
        },
        delegateYield: function delegateYield(r, o, a) {
          return e.resultName = o, t(n.d, regeneratorValues(r), a);
        },
        finish: function finish(r) {
          return t(n.f, r);
        }
      }, t = function t(r, _t, o) {
        n.p = e.prev, n.n = e.next;
        try {
          return r(_t, o);
        } finally {
          e.next = n.n;
        }
      }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n;
      try {
        return r.call(this, e);
      } finally {
        n.p = e.prev, n.n = e.next;
      }
    };
  }
  return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
    return {
      wrap: function wrap(e, t, n, o) {
        return r.w(a(e), t, n, o && o.reverse());
      },
      isGeneratorFunction: n,
      mark: r.m,
      awrap: function awrap(r, e) {
        return new OverloadYield(r, e);
      },
      AsyncIterator: regeneratorAsyncIterator,
      async: function async(r, e, t, o, u) {
        return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u);
      },
      keys: regeneratorKeys,
      values: regeneratorValues
    };
  }, module.exports.__esModule = true, module.exports["default"] = module.exports)();
}
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;

/***/ },

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

var _typeof = (__webpack_require__(4319)["default"]);
function _regeneratorValues(e) {
  if (null != e) {
    var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"],
      r = 0;
    if (t) return t.call(e);
    if ("function" == typeof e.next) return e;
    if (!isNaN(e.length)) return {
      next: function next() {
        return e && r >= e.length && (e = void 0), {
          value: e && e[r++],
          done: !e
        };
      }
    };
  }
  throw new TypeError(_typeof(e) + " is not iterable");
}
module.exports = _regeneratorValues, module.exports.__esModule = true, module.exports["default"] = module.exports;

/***/ },

/***/ 4319
(module) {

function _typeof(o) {
  "@babel/helpers - typeof";

  return module.exports = _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;
  }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
}
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;

/***/ },

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

// TODO(Babel 8): Remove this file.

var runtime = __webpack_require__(7048)();
module.exports = runtime;

// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
try {
  regeneratorRuntime = runtime;
} catch (accidentalStrictMode) {
  if (typeof globalThis === "object") {
    globalThis.regeneratorRuntime = runtime;
  } else {
    Function("r", "regeneratorRuntime = r")(runtime);
  }
}


/***/ }

/******/ });
/************************************************************************/
/******/ // 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 */
/******/ (() => {
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = (module) => {
/******/ 		var getter = module && module.__esModule ?
/******/ 			() => (module['default']) :
/******/ 			() => (module);
/******/ 		__webpack_require__.d(getter, { a: getter });
/******/ 		return getter;
/******/ 	};
/******/ })();
/******/ 
/******/ /* 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 "../shared"

;// external "vue"

;// ../../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
function asyncGeneratorStep(n, t, e, r, o, a, c) {
  try {
    var i = n[a](c),
      u = i.value;
  } catch (n) {
    return void e(n);
  }
  i.done ? t(u) : Promise.resolve(u).then(r, o);
}
function _asyncToGenerator(n) {
  return function () {
    var t = this,
      e = arguments;
    return new Promise(function (r, o) {
      var a = n.apply(t, e);
      function _next(n) {
        asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
      }
      function _throw(n) {
        asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
      }
      _next(void 0);
    });
  };
}

;// ../../node_modules/@babel/runtime/helpers/esm/typeof.js
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);
}

;// ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js

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

;// ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js


function toPropertyKey(t) {
  var i = toPrimitive(t, "string");
  return "symbol" == _typeof(i) ? i : i + "";
}

;// ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js

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

// EXTERNAL MODULE: ../../node_modules/@babel/runtime/regenerator/index.js
var regenerator = __webpack_require__(5799);
var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
;// external "../config-provider"

;// external "../icon"

;// external "../modal"

;// external "../modal/modal.less"

;// external "lodash/cloneDeep"

;// ../../packages/sideslider/src/sideslider.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) { _defineProperty(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.
 */








function _isSlot(s) {
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !__WEBPACK_EXTERNAL_MODULE_vue_isVNode__(s);
}
var sliderProps = __WEBPACK_EXTERNAL_MODULE_lodash_cloneDeep_13f2b125_default__(__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_modal_d1344388_propsMixin__);
sliderProps.width["default"] = '400';
/* harmony default export */ const sideslider = (__WEBPACK_EXTERNAL_MODULE_vue_defineComponent__({
  name: 'Sideslider',
  inheritAttrs: false,
  props: _objectSpread(_objectSpread({}, sliderProps), {}, {
    title: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.string.def(''),
    direction: {
      type: String,
      "default": 'right',
      validator: function validator(value) {
        var textAlign = ['left', 'right'];
        if (textAlign.indexOf(value) < 0) {
          console.error("direction property is not valid: '".concat(value, "',\u3010").concat(textAlign.join(' | '), "\u3011"));
          return false;
        }
        return true;
      }
    },
    showFooter: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.bool.def(true),
    resizable: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.bool.def(false),
    // 是否可以拖拽调整大小
    minWidth: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.number.def(400),
    // 最小宽度
    maxWidth: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.number.def(Infinity),
    // 最大宽度
    triggerWidth: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.number.def(5),
    // 拖拽触发区域宽度
    immediate: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.bool.def(false) // 是否实时拖拽（拖拽时立即改变宽度）
  }),
  emits: ['closed', 'update:isShow', 'shown', 'hidden', 'animation-end', 'before-resize', 'resizing', 'after-resize'],
  setup: function setup(props, _ref) {
    var emit = _ref.emit;
    var attrs = __WEBPACK_EXTERNAL_MODULE_vue_useAttrs__();
    var slots = __WEBPACK_EXTERNAL_MODULE_vue_useSlots__();
    var instance = __WEBPACK_EXTERNAL_MODULE_vue_getCurrentInstance__();
    var _usePrefix = __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3_usePrefix__(),
      resolveClassName = _usePrefix.resolveClassName;
    // 拖拽相关状态
    var currentWidth = __WEBPACK_EXTERNAL_MODULE_vue_ref__(props.width);
    // 代理线
    var resizeProxyRef = __WEBPACK_EXTERNAL_MODULE_vue_ref__(null);
    // 遮罩
    var resizeMaskRef = __WEBPACK_EXTERNAL_MODULE_vue_ref__(null);
    // modalWrapper
    var modalWrapperRef = __WEBPACK_EXTERNAL_MODULE_vue_ref__(null);
    // content
    var contentRef = __WEBPACK_EXTERNAL_MODULE_vue_ref__(null);
    // trigger
    var triggerRef = __WEBPACK_EXTERNAL_MODULE_vue_ref__(null);
    // state
    var state = __WEBPACK_EXTERNAL_MODULE_vue_ref__({});
    var handleClose = /*#__PURE__*/function () {
      var _ref2 = _asyncToGenerator(/*#__PURE__*/regenerator_default().mark(function _callee() {
        var shouldClose;
        return regenerator_default().wrap(function (_context) {
          while (1) switch (_context.prev = _context.next) {
            case 0:
              shouldClose = true;
              if (!(typeof props.beforeClose === 'function')) {
                _context.next = 2;
                break;
              }
              _context.next = 1;
              return props.beforeClose();
            case 1:
              shouldClose = _context.sent;
            case 2:
              if (shouldClose) {
                emit('update:isShow', false);
                emit('closed');
                emit('animation-end');
              }
            case 3:
            case "end":
              return _context.stop();
          }
        }, _callee);
      }));
      return function handleClose() {
        return _ref2.apply(this, arguments);
      };
    }();
    var handleShown = function handleShown() {
      emit('shown');
      // 当侧边栏显示后，获取 modalWrapper 的引用
      if (props.resizable && contentRef.value) {
        __WEBPACK_EXTERNAL_MODULE_vue_nextTick__(function () {
          var _contentRef$value;
          // 从当前实例的 content 元素向上查找 modal-wrapper，避免多个实例冲突
          var element = (_contentRef$value = contentRef.value) === null || _contentRef$value === void 0 ? void 0 : _contentRef$value.parentElement;
          while (element) {
            if (element.classList.contains(resolveClassName('modal-wrapper'))) {
              modalWrapperRef.value = element;
              break;
            }
            element = element.parentElement;
          }
        });
      }
    };
    var handleHidden = function handleHidden() {
      emit('hidden');
      // 清理引用
      if (props.resizable) {
        modalWrapperRef.value = null;
      }
    };
    // 获取实际宽度值（限制在 min 和 max 之间）
    var getRealValue = function getRealValue(current) {
      var screenWidth = window.innerWidth;
      var maxAllowed = Math.min(props.maxWidth, screenWidth - 100); // 至少留100px空间
      return Math.min(maxAllowed, Math.max(props.minWidth, current));
    };
    // 更新 resizeProxy 的样式
    var updateResizeProxyStyle = function updateResizeProxyStyle(width) {
      if (!resizeProxyRef.value) return;
      resizeProxyRef.value.style.visibility = 'visible';
      if (props.direction === 'left') {
        resizeProxyRef.value.style.inset = "0 auto 0 ".concat(width, "px");
      } else {
        resizeProxyRef.value.style.inset = "0 ".concat(width, "px 0 auto");
      }
    };
    // 更新遮罩的样式
    var updateResizeMaskStyle = function updateResizeMaskStyle(show) {
      if (!resizeMaskRef.value) return;
      resizeMaskRef.value.style.display = show ? 'block' : 'none';
      resizeMaskRef.value.style.cursor = 'col-resize';
    };
    // mousedown 事件处理
    var handleMousedown = function handleMousedown(event) {
      var _modalWrapperRef$valu;
      var mouseEvent = event;
      if (!props.resizable) return;
      emit('before-resize', mouseEvent);
      var rect = (_modalWrapperRef$valu = modalWrapperRef.value) === null || _modalWrapperRef$valu === void 0 ? void 0 : _modalWrapperRef$valu.getBoundingClientRect();
      if (!rect) return;
      // 拖拽开始时，将 currentWidth 设置为实际像素宽度作为基准
      currentWidth.value = rect.width;
      state.value = Object.freeze({
        mouse: {
          clientX: mouseEvent.clientX
        },
        sidebar: {
          width: rect.width
        }
      });
      updateResizeMaskStyle(true);
      // 非 immediate 模式下显示代理线
      if (!props.immediate) {
        updateResizeProxyStyle(rect.width);
      }
      var finalWidth = rect.width;
      var handleMouseMove = function handleMouseMove(event) {
        var delta;
        if (props.direction === 'left') {
          delta = event.clientX - state.value.mouse.clientX;
        } else {
          delta = state.value.mouse.clientX - event.clientX;
        }
        var newWidth = state.value.sidebar.width + delta;
        finalWidth = getRealValue(newWidth);
        // immediate 模式：直接更新宽度
        if (props.immediate) {
          currentWidth.value = finalWidth;
        } else {
          // 非 immediate 模式：更新代理线位置
          updateResizeProxyStyle(finalWidth);
        }
        emit('resizing', finalWidth);
      };
      var _handleMouseUp = function handleMouseUp() {
        if (resizeProxyRef.value) {
          resizeProxyRef.value.style.visibility = 'hidden';
        }
        updateResizeMaskStyle(false);
        document.removeEventListener('mousemove', handleMouseMove);
        document.removeEventListener('mouseup', _handleMouseUp);
        // 只在非 immediate 模式下才需要最后更新宽度
        if (!props.immediate) {
          currentWidth.value = finalWidth;
        }
        emit('after-resize', finalWidth);
      };
      document.addEventListener('mousemove', handleMouseMove);
      document.addEventListener('mouseup', _handleMouseUp);
    };
    // 监听 width prop 变化，保持用户设置的原值
    __WEBPACK_EXTERNAL_MODULE_vue_watch__(function () {
      return props.width;
    }, function (newWidth) {
      currentWidth.value = newWidth;
    });
    return function () {
      var modelSlot = {
        header: function header() {
          var _slots$header, _slots$header2;
          return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__(__WEBPACK_EXTERNAL_MODULE_vue_Fragment__, null, [__WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
            "class": "".concat(resolveClassName('sideslider-header'))
          }, [__WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
            "class": "".concat(resolveClassName('sideslider-close')),
            "onClick": function onClick() {
              return void handleClose();
            }
          }, [props.direction === 'left' ? __WEBPACK_EXTERNAL_MODULE_vue_createVNode__(__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_AngleLeft__, null, null) : __WEBPACK_EXTERNAL_MODULE_vue_createVNode__(__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_AngleRight__, null, null)]), __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
            "class": "".concat(resolveClassName('sideslider-title'))
          }, [(_slots$header = (_slots$header2 = slots.header) === null || _slots$header2 === void 0 ? void 0 : _slots$header2.call(slots)) !== null && _slots$header !== void 0 ? _slots$header : props.title])])]);
        },
        "default": function _default() {
          var _slots$default;
          return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
            "ref": contentRef,
            "class": "".concat(resolveClassName('sideslider-content'))
          }, [(_slots$default = slots["default"]) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots), props.resizable && __WEBPACK_EXTERNAL_MODULE_vue_createVNode__(__WEBPACK_EXTERNAL_MODULE_vue_Fragment__, null, [__WEBPACK_EXTERNAL_MODULE_vue_createVNode__("i", {
            "ref": triggerRef,
            "style": "width: ".concat(props.triggerWidth, "px;"),
            "class": "".concat(resolveClassName('sideslider-resize-trigger')),
            "onMousedown": __WEBPACK_EXTERNAL_MODULE_vue_withModifiers__(handleMousedown, ['left'])
          }, null), __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("i", {
            "ref": resizeProxyRef,
            "class": ["".concat(resolveClassName('sideslider-resize-proxy')), props.direction]
          }, null)])]);
        }
      };
      if (props.showFooter && slots.footer) {
        Object.assign(modelSlot, {
          footer: function footer() {
            return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
              "class": "".concat(resolveClassName('sideslider-footer'))
            }, [slots.footer()]);
          }
        });
      }
      var inheritAttrs = _objectSpread({}, attrs);
      if (instance.vnode.scopeId) {
        inheritAttrs[instance.vnode.scopeId] = '';
      }
      return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__(__WEBPACK_EXTERNAL_MODULE_vue_Fragment__, null, [__WEBPACK_EXTERNAL_MODULE_vue_createVNode__(__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_modal_d1344388_default__, __WEBPACK_EXTERNAL_MODULE_vue_mergeProps__(inheritAttrs, {
        "width": currentWidth.value,
        "class": _defineProperty(_defineProperty(_defineProperty({}, resolveClassName('sideslider'), true), "is-position-".concat(props.direction), props.direction), "".concat(resolveClassName('sideslider-resizable')), props.resizable),
        "extCls": props.extCls,
        "animateType": props.direction,
        "backgroundColor": props.backgroundColor,
        "closeIcon": false,
        "escClose": props.escClose,
        "isShow": props.isShow,
        "quickClose": props.quickClose,
        "renderDirective": props.renderDirective,
        "showMask": props.showMask,
        "transfer": props.transfer,
        "zIndex": props.zIndex,
        "onClose": handleClose,
        "onHidden": handleHidden,
        "onShown": handleShown
      }), _isSlot(modelSlot) ? modelSlot : {
        "default": function _default() {
          return [modelSlot];
        }
      }), props.resizable && __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
        "ref": resizeMaskRef,
        "class": "".concat(resolveClassName('sideslider-resize-mask'))
      }, null)]);
    };
  }
}));
;// ../../packages/sideslider/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 BkSideslider = __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_withInstall__(sideslider);
/* harmony default export */ const src = (BkSideslider);
export { src as default };
