/**
 * 滚动到第一个错误卡片
 * @param {string} selector - 错误卡片的 class 选择器
 */
export var scrollToFirstErrorCard = function scrollToFirstErrorCard() {
  var selector = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '.pisell-lowcode-product-select-resource-error';
  setTimeout(function () {
    var errorCard = document.querySelector(selector);
    if (errorCard) {
      errorCard.scrollIntoView({
        behavior: 'smooth',
        block: 'center'
      });
    }
  }, 0);
};