docs: function setParameters(params) {
    // Use default `inputValidator` for supported input types if not provided
    if (!params.inputValidator) {
      Object.keys(defaultInputValidators).forEach(function (key) {
        if (params.input === key) {
          params.inputValidator = params.expectRejections ? defaultInputValidators[key] : Swal.adaptInputValidator(defaultInputValidators[key]);
        }
      });
    } // params.extraParams is @deprecated
  
  
    if (params.validationMessage) {
      if (_typeof(params.extraParams) !== 'object') {
        params.extraParams = {};
      }
  
      params.extraParams.validationMessage = params.validationMessage;
    } // Determine if the custom target element is valid
  
  
    if (!params.target || typeof params.target === 'string' && !document.querySelector(params.target) || typeof params.target !== 'string' && !params.target.appendChild) {
      warn('Target parameter is not valid, defaulting to "body"');
      params.target = 'body';
    } // Animation
  
  
    if (typeof params.animation === 'function') {
      params.animation = params.animation.call();
    }
  
    var popup;
    var oldPopup = getPopup();
    var targetElement = typeof params.target === 'string' ? document.querySelector(params.target) : params.target; // If the model target has changed, refresh the popup
  
    if (oldPopup && targetElement && oldPopup.parentNode !== targetElement.parentNode) {
      popup = init(params);
    } else {
      popup = oldPopup || init(params);
    } // Set popup width
  
  
    if (params.width) {
      popup.style.width = typeof params.width === 'number' ? params.width + 'px' : params.width;
    } // Set popup padding
  
  
    if (params.padding) {
      popup.style.padding = typeof params.padding === 'number' ? params.padding + 'px' : params.padding;
    } // Set popup background
  
  
    if (params.background) {
      popup.style.background = params.background;
    }
  
    var popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color');
    var successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix');
  
    for (var i = 0; i < successIconParts.length; i++) {
      successIconParts[i].style.backgroundColor = popupBackgroundColor;
    }
  
    var container = getContainer();
    var closeButton = getCloseButton();
    var footer = getFooter(); // Title
  
    renderTitle(params); // Content
  
    renderContent(params); // Backdrop
  
    if (typeof params.backdrop === 'string') {
      getContainer().style.background = params.backdrop;
    } else if (!params.backdrop) {
      addClass([document.documentElement, document.body], swalClasses['no-backdrop']);
    }
  
    if (!params.backdrop && params.allowOutsideClick) {
      warn('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');
    } // Position
  
  
    if (params.position in swalClasses) {
      addClass(container, swalClasses[params.position]);
    } else {
      warn('The "position" parameter is not valid, defaulting to "center"');
      addClass(container, swalClasses.center);
    } // Grow
  
  
    if (params.grow && typeof params.grow === 'string') {
      var growClass = 'grow-' + params.grow;
  
      if (growClass in swalClasses) {
        addClass(container, swalClasses[growClass]);
      }
    } // Close button
  
  
    if (params.showCloseButton) {
      closeButton.setAttribute('aria-label', params.closeButtonAriaLabel);
      show(closeButton);
    } else {
      hide(closeButton);
    } // Default Class
  
  
    popup.className = swalClasses.popup;
  
    if (params.toast) {
      addClass([document.documentElement, document.body], swalClasses['toast-shown']);
      addClass(popup, swalClasses.toast);
    } else {
      addClass(popup, swalClasses.modal);
    } // Custom Class
  
  
    if (params.customClass) {
      addClass(popup, params.customClass);
    } // Progress steps
  
  
    renderProgressSteps(params); // Icon
  
    renderIcon(params); // Image
  
    renderImage(params); // Actions (buttons)
  
    renderActions(params); // Footer
  
    parseHtmlToContainer(params.footer, footer); // CSS animation
  
    if (params.animation === true) {
      removeClass(popup, swalClasses.noanimation);
    } else {
      addClass(popup, swalClasses.noanimation);
    } // showLoaderOnConfirm && preConfirm
  
  
    if (params.showLoaderOnConfirm && !params.preConfirm) {
      warn('showLoaderOnConfirm is set to true, but preConfirm is not defined.\n' + 'showLoaderOnConfirm should be used together with preConfirm, see usage example:\n' + 'https://sweetalert2.github.io/#ajax-request');
    }
  }