PHP 8.2.30
Preview: computeAutoPlacement.js Size: 1.64 KB
/proc/thread-self/root/home/byroehnu/.trash/node_modules11/@popperjs/core/dist/esm/utils/computeAutoPlacement.js

import getVariation from "./getVariation.js";
import { variationPlacements, basePlacements, placements as allPlacements } from "../enums.js";
import detectOverflow from "./detectOverflow.js";
import getBasePlacement from "./getBasePlacement.js";
export default function computeAutoPlacement(state, options) {
  if (options === void 0) {
    options = {};
  }

  var _options = options,
      placement = _options.placement,
      boundary = _options.boundary,
      rootBoundary = _options.rootBoundary,
      padding = _options.padding,
      flipVariations = _options.flipVariations,
      _options$allowedAutoP = _options.allowedAutoPlacements,
      allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;
  var variation = getVariation(placement);
  var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {
    return getVariation(placement) === variation;
  }) : basePlacements;
  var allowedPlacements = placements.filter(function (placement) {
    return allowedAutoPlacements.indexOf(placement) >= 0;
  });

  if (allowedPlacements.length === 0) {
    allowedPlacements = placements;
  } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...


  var overflows = allowedPlacements.reduce(function (acc, placement) {
    acc[placement] = detectOverflow(state, {
      placement: placement,
      boundary: boundary,
      rootBoundary: rootBoundary,
      padding: padding
    })[getBasePlacement(placement)];
    return acc;
  }, {});
  return Object.keys(overflows).sort(function (a, b) {
    return overflows[a] - overflows[b];
  });
}

Directory Contents

Dirs: 0 × Files: 21

Name Size Perms Modified Actions
1.64 KB lrw-r--r-- 2026-02-28 00:31:14
Edit Download
1.70 KB lrw-r--r-- 2026-02-28 00:31:14
Edit Download
302 B lrw-r--r-- 2026-02-28 00:31:14
Edit Download
3.45 KB lrw-r--r-- 2026-02-28 00:31:14
Edit Download
159 B lrw-r--r-- 2026-02-28 00:31:14
Edit Download
79 B lrw-r--r-- 2026-02-28 00:31:14
Edit Download
89 B lrw-r--r-- 2026-02-28 00:31:14
Edit Download
125 B lrw-r--r-- 2026-02-28 00:31:14
Edit Download
117 B lrw-r--r-- 2026-02-28 00:31:14
Edit Download
127 B lrw-r--r-- 2026-02-28 00:31:14
Edit Download
248 B lrw-r--r-- 2026-02-28 00:31:14
Edit Download
209 B lrw-r--r-- 2026-02-28 00:31:14
Edit Download
85 B lrw-r--r-- 2026-02-28 00:31:14
Edit Download
84 B lrw-r--r-- 2026-02-28 00:31:14
Edit Download
524 B lrw-r--r-- 2026-02-28 00:31:14
Edit Download
184 B lrw-r--r-- 2026-02-28 00:31:14
Edit Download
1.21 KB lrw-r--r-- 2026-02-28 00:31:14
Edit Download
191 B lrw-r--r-- 2026-02-28 00:31:16
Edit Download
252 B lrw-r--r-- 2026-02-28 00:31:16
Edit Download
301 B lrw-r--r-- 2026-02-28 00:31:16
Edit Download
262 B lrw-r--r-- 2026-02-28 00:31:18
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).