Add supporting themes required for Lotusdocs
This commit is contained in:
47
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/computeAutoPlacement.js
vendored
Normal file
47
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/computeAutoPlacement.js
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
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;
|
||||
|
||||
if (false) {
|
||||
console.error(['Popper: The `allowedAutoPlacements` option did not allow any', 'placements. Ensure the `placement` option matches the variation', 'of the allowed placements.', 'For example, "auto" cannot be used to allow "bottom-start".', 'Use "auto-start" instead.'].join(' '));
|
||||
}
|
||||
} // $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];
|
||||
});
|
||||
}
|
||||
70
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/computeOffsets.js
vendored
Normal file
70
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/computeOffsets.js
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
import getBasePlacement from "./getBasePlacement.js";
|
||||
import getVariation from "./getVariation.js";
|
||||
import getMainAxisFromPlacement from "./getMainAxisFromPlacement.js";
|
||||
import { top, right, bottom, left, start, end } from "../enums.js";
|
||||
export default function computeOffsets(_ref) {
|
||||
var reference = _ref.reference,
|
||||
element = _ref.element,
|
||||
placement = _ref.placement;
|
||||
var basePlacement = placement ? getBasePlacement(placement) : null;
|
||||
var variation = placement ? getVariation(placement) : null;
|
||||
var commonX = reference.x + reference.width / 2 - element.width / 2;
|
||||
var commonY = reference.y + reference.height / 2 - element.height / 2;
|
||||
var offsets;
|
||||
|
||||
switch (basePlacement) {
|
||||
case top:
|
||||
offsets = {
|
||||
x: commonX,
|
||||
y: reference.y - element.height
|
||||
};
|
||||
break;
|
||||
|
||||
case bottom:
|
||||
offsets = {
|
||||
x: commonX,
|
||||
y: reference.y + reference.height
|
||||
};
|
||||
break;
|
||||
|
||||
case right:
|
||||
offsets = {
|
||||
x: reference.x + reference.width,
|
||||
y: commonY
|
||||
};
|
||||
break;
|
||||
|
||||
case left:
|
||||
offsets = {
|
||||
x: reference.x - element.width,
|
||||
y: commonY
|
||||
};
|
||||
break;
|
||||
|
||||
default:
|
||||
offsets = {
|
||||
x: reference.x,
|
||||
y: reference.y
|
||||
};
|
||||
}
|
||||
|
||||
var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;
|
||||
|
||||
if (mainAxis != null) {
|
||||
var len = mainAxis === 'y' ? 'height' : 'width';
|
||||
|
||||
switch (variation) {
|
||||
case start:
|
||||
offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);
|
||||
break;
|
||||
|
||||
case end:
|
||||
offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);
|
||||
break;
|
||||
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
return offsets;
|
||||
}
|
||||
15
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/debounce.js
vendored
Normal file
15
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/debounce.js
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
export default function debounce(fn) {
|
||||
var pending;
|
||||
return function () {
|
||||
if (!pending) {
|
||||
pending = new Promise(function (resolve) {
|
||||
Promise.resolve().then(function () {
|
||||
pending = undefined;
|
||||
resolve(fn());
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
return pending;
|
||||
};
|
||||
}
|
||||
63
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/detectOverflow.js
vendored
Normal file
63
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/detectOverflow.js
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
import getClippingRect from "../dom-utils/getClippingRect.js";
|
||||
import getDocumentElement from "../dom-utils/getDocumentElement.js";
|
||||
import getBoundingClientRect from "../dom-utils/getBoundingClientRect.js";
|
||||
import computeOffsets from "./computeOffsets.js";
|
||||
import rectToClientRect from "./rectToClientRect.js";
|
||||
import { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from "../enums.js";
|
||||
import { isElement } from "../dom-utils/instanceOf.js";
|
||||
import mergePaddingObject from "./mergePaddingObject.js";
|
||||
import expandToHashMap from "./expandToHashMap.js"; // eslint-disable-next-line import/no-unused-modules
|
||||
|
||||
export default function detectOverflow(state, options) {
|
||||
if (options === void 0) {
|
||||
options = {};
|
||||
}
|
||||
|
||||
var _options = options,
|
||||
_options$placement = _options.placement,
|
||||
placement = _options$placement === void 0 ? state.placement : _options$placement,
|
||||
_options$boundary = _options.boundary,
|
||||
boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,
|
||||
_options$rootBoundary = _options.rootBoundary,
|
||||
rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,
|
||||
_options$elementConte = _options.elementContext,
|
||||
elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,
|
||||
_options$altBoundary = _options.altBoundary,
|
||||
altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,
|
||||
_options$padding = _options.padding,
|
||||
padding = _options$padding === void 0 ? 0 : _options$padding;
|
||||
var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));
|
||||
var altContext = elementContext === popper ? reference : popper;
|
||||
var popperRect = state.rects.popper;
|
||||
var element = state.elements[altBoundary ? altContext : elementContext];
|
||||
var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);
|
||||
var referenceClientRect = getBoundingClientRect(state.elements.reference);
|
||||
var popperOffsets = computeOffsets({
|
||||
reference: referenceClientRect,
|
||||
element: popperRect,
|
||||
strategy: 'absolute',
|
||||
placement: placement
|
||||
});
|
||||
var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));
|
||||
var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect
|
||||
// 0 or negative = within the clipping rect
|
||||
|
||||
var overflowOffsets = {
|
||||
top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
|
||||
bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
|
||||
left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
|
||||
right: elementClientRect.right - clippingClientRect.right + paddingObject.right
|
||||
};
|
||||
var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element
|
||||
|
||||
if (elementContext === popper && offsetData) {
|
||||
var offset = offsetData[placement];
|
||||
Object.keys(overflowOffsets).forEach(function (key) {
|
||||
var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;
|
||||
var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';
|
||||
overflowOffsets[key] += offset[axis] * multiply;
|
||||
});
|
||||
}
|
||||
|
||||
return overflowOffsets;
|
||||
}
|
||||
6
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/expandToHashMap.js
vendored
Normal file
6
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/expandToHashMap.js
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
export default function expandToHashMap(value, keys) {
|
||||
return keys.reduce(function (hashMap, key) {
|
||||
hashMap[key] = value;
|
||||
return hashMap;
|
||||
}, {});
|
||||
}
|
||||
9
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/format.js
vendored
Normal file
9
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/format.js
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
export default function format(str) {
|
||||
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
||||
args[_key - 1] = arguments[_key];
|
||||
}
|
||||
|
||||
return [].concat(args).reduce(function (p, c) {
|
||||
return p.replace(/%s/, c);
|
||||
}, str);
|
||||
}
|
||||
3
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/getAltAxis.js
vendored
Normal file
3
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/getAltAxis.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export default function getAltAxis(axis) {
|
||||
return axis === 'x' ? 'y' : 'x';
|
||||
}
|
||||
3
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/getAltLen.js
vendored
Normal file
3
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/getAltLen.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export default function getAltLen(len) {
|
||||
return len === 'width' ? 'height' : 'width';
|
||||
}
|
||||
4
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/getBasePlacement.js
vendored
Normal file
4
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/getBasePlacement.js
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import { auto } from "../enums.js";
|
||||
export default function getBasePlacement(placement) {
|
||||
return placement.split('-')[0];
|
||||
}
|
||||
8
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/getFreshSideObject.js
vendored
Normal file
8
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/getFreshSideObject.js
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
export default function getFreshSideObject() {
|
||||
return {
|
||||
top: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
left: 0
|
||||
};
|
||||
}
|
||||
3
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/getMainAxisFromPlacement.js
vendored
Normal file
3
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/getMainAxisFromPlacement.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export default function getMainAxisFromPlacement(placement) {
|
||||
return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
|
||||
}
|
||||
11
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/getOppositePlacement.js
vendored
Normal file
11
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/getOppositePlacement.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
var hash = {
|
||||
left: 'right',
|
||||
right: 'left',
|
||||
bottom: 'top',
|
||||
top: 'bottom'
|
||||
};
|
||||
export default function getOppositePlacement(placement) {
|
||||
return placement.replace(/left|right|bottom|top/g, function (matched) {
|
||||
return hash[matched];
|
||||
});
|
||||
}
|
||||
9
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/getOppositeVariationPlacement.js
vendored
Normal file
9
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/getOppositeVariationPlacement.js
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
var hash = {
|
||||
start: 'end',
|
||||
end: 'start'
|
||||
};
|
||||
export default function getOppositeVariationPlacement(placement) {
|
||||
return placement.replace(/start|end/g, function (matched) {
|
||||
return hash[matched];
|
||||
});
|
||||
}
|
||||
3
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/getVariation.js
vendored
Normal file
3
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/getVariation.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export default function getVariation(placement) {
|
||||
return placement.split('-')[1];
|
||||
}
|
||||
3
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/math.js
vendored
Normal file
3
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/math.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export var max = Math.max;
|
||||
export var min = Math.min;
|
||||
export var round = Math.round;
|
||||
14
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/mergeByName.js
vendored
Normal file
14
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/mergeByName.js
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
export default function mergeByName(modifiers) {
|
||||
var merged = modifiers.reduce(function (merged, current) {
|
||||
var existing = merged[current.name];
|
||||
merged[current.name] = existing ? Object.assign({}, existing, current, {
|
||||
options: Object.assign({}, existing.options, current.options),
|
||||
data: Object.assign({}, existing.data, current.data)
|
||||
}) : current;
|
||||
return merged;
|
||||
}, {}); // IE11 does not support Object.values
|
||||
|
||||
return Object.keys(merged).map(function (key) {
|
||||
return merged[key];
|
||||
});
|
||||
}
|
||||
4
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/mergePaddingObject.js
vendored
Normal file
4
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/mergePaddingObject.js
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import getFreshSideObject from "./getFreshSideObject.js";
|
||||
export default function mergePaddingObject(paddingObject) {
|
||||
return Object.assign({}, getFreshSideObject(), paddingObject);
|
||||
}
|
||||
44
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/orderModifiers.js
vendored
Normal file
44
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/orderModifiers.js
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
import { modifierPhases } from "../enums.js"; // source: https://stackoverflow.com/questions/49875255
|
||||
|
||||
function order(modifiers) {
|
||||
var map = new Map();
|
||||
var visited = new Set();
|
||||
var result = [];
|
||||
modifiers.forEach(function (modifier) {
|
||||
map.set(modifier.name, modifier);
|
||||
}); // On visiting object, check for its dependencies and visit them recursively
|
||||
|
||||
function sort(modifier) {
|
||||
visited.add(modifier.name);
|
||||
var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);
|
||||
requires.forEach(function (dep) {
|
||||
if (!visited.has(dep)) {
|
||||
var depModifier = map.get(dep);
|
||||
|
||||
if (depModifier) {
|
||||
sort(depModifier);
|
||||
}
|
||||
}
|
||||
});
|
||||
result.push(modifier);
|
||||
}
|
||||
|
||||
modifiers.forEach(function (modifier) {
|
||||
if (!visited.has(modifier.name)) {
|
||||
// check for visited object
|
||||
sort(modifier);
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
export default function orderModifiers(modifiers) {
|
||||
// order based on dependencies
|
||||
var orderedModifiers = order(modifiers); // order based on phase
|
||||
|
||||
return modifierPhases.reduce(function (acc, phase) {
|
||||
return acc.concat(orderedModifiers.filter(function (modifier) {
|
||||
return modifier.phase === phase;
|
||||
}));
|
||||
}, []);
|
||||
}
|
||||
8
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/rectToClientRect.js
vendored
Normal file
8
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/rectToClientRect.js
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
export default function rectToClientRect(rect) {
|
||||
return Object.assign({}, rect, {
|
||||
left: rect.x,
|
||||
top: rect.y,
|
||||
right: rect.x + rect.width,
|
||||
bottom: rect.y + rect.height
|
||||
});
|
||||
}
|
||||
11
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/uniqueBy.js
vendored
Normal file
11
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/uniqueBy.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
export default function uniqueBy(arr, fn) {
|
||||
var identifiers = new Set();
|
||||
return arr.filter(function (item) {
|
||||
var identifier = fn(item);
|
||||
|
||||
if (!identifiers.has(identifier)) {
|
||||
identifiers.add(identifier);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
81
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/validateModifiers.js
vendored
Normal file
81
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/validateModifiers.js
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
import format from "./format.js";
|
||||
import { modifierPhases } from "../enums.js";
|
||||
var INVALID_MODIFIER_ERROR = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s';
|
||||
var MISSING_DEPENDENCY_ERROR = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available';
|
||||
var VALID_PROPERTIES = ['name', 'enabled', 'phase', 'fn', 'effect', 'requires', 'options'];
|
||||
export default function validateModifiers(modifiers) {
|
||||
modifiers.forEach(function (modifier) {
|
||||
[].concat(Object.keys(modifier), VALID_PROPERTIES) // IE11-compatible replacement for `new Set(iterable)`
|
||||
.filter(function (value, index, self) {
|
||||
return self.indexOf(value) === index;
|
||||
}).forEach(function (key) {
|
||||
switch (key) {
|
||||
case 'name':
|
||||
if (typeof modifier.name !== 'string') {
|
||||
console.error(format(INVALID_MODIFIER_ERROR, String(modifier.name), '"name"', '"string"', "\"" + String(modifier.name) + "\""));
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'enabled':
|
||||
if (typeof modifier.enabled !== 'boolean') {
|
||||
console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"enabled"', '"boolean"', "\"" + String(modifier.enabled) + "\""));
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'phase':
|
||||
if (modifierPhases.indexOf(modifier.phase) < 0) {
|
||||
console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"phase"', "either " + modifierPhases.join(', '), "\"" + String(modifier.phase) + "\""));
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'fn':
|
||||
if (typeof modifier.fn !== 'function') {
|
||||
console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"fn"', '"function"', "\"" + String(modifier.fn) + "\""));
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'effect':
|
||||
if (modifier.effect != null && typeof modifier.effect !== 'function') {
|
||||
console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"effect"', '"function"', "\"" + String(modifier.fn) + "\""));
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'requires':
|
||||
if (modifier.requires != null && !Array.isArray(modifier.requires)) {
|
||||
console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requires"', '"array"', "\"" + String(modifier.requires) + "\""));
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'requiresIfExists':
|
||||
if (!Array.isArray(modifier.requiresIfExists)) {
|
||||
console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requiresIfExists"', '"array"', "\"" + String(modifier.requiresIfExists) + "\""));
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'options':
|
||||
case 'data':
|
||||
break;
|
||||
|
||||
default:
|
||||
console.error("PopperJS: an invalid property has been provided to the \"" + modifier.name + "\" modifier, valid properties are " + VALID_PROPERTIES.map(function (s) {
|
||||
return "\"" + s + "\"";
|
||||
}).join(', ') + "; but \"" + key + "\" was provided.");
|
||||
}
|
||||
|
||||
modifier.requires && modifier.requires.forEach(function (requirement) {
|
||||
if (modifiers.find(function (mod) {
|
||||
return mod.name === requirement;
|
||||
}) == null) {
|
||||
console.error(format(MISSING_DEPENDENCY_ERROR, String(modifier.name), requirement, requirement));
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
8
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/within.js
vendored
Normal file
8
themes/hugo-mod-jslibs-dist/popperjs/package/dist/esm/utils/within.js
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import { max as mathMax, min as mathMin } from "./math.js";
|
||||
export function within(min, value, max) {
|
||||
return mathMax(min, mathMin(value, max));
|
||||
}
|
||||
export function withinMaxClamp(min, value, max) {
|
||||
var v = within(min, value, max);
|
||||
return v > max ? max : v;
|
||||
}
|
||||
Reference in New Issue
Block a user