"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const shared_esmBundler = require("../../../../../@vue/shared/dist/shared.esm-bundler.js");
const style = require("../../../utils/dom/style.js");
const Vue = require("vue");
const sumReducer = (sum2, num) => sum2 + num;
const sum = (listLike) => {
  return shared_esmBundler.isArray(listLike) ? listLike.reduce(sumReducer, 0) : listLike;
};
const tryCall = (fLike, params, defaultRet = {}) => {
  return shared_esmBundler.isFunction(fLike) ? fLike(params) : fLike ?? defaultRet;
};
const enforceUnit = (style$1) => {
  [
    "width",
    "maxWidth",
    "minWidth",
    "height"
  ].forEach((key) => {
    style$1[key] = style.addUnit(style$1[key]);
  });
  return style$1;
};
const componentToSlot = (ComponentLike) => Vue.isVNode(ComponentLike) ? (props) => Vue.h(ComponentLike, props) : ComponentLike;
exports.componentToSlot = componentToSlot;
exports.enforceUnit = enforceUnit;
exports.sum = sum;
exports.tryCall = tryCall;
