: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
function checkVariantsDidChange(prev, next) {
if (typeof next === "string") {
else if (Array.isArray(next)) {
return !shallowCompare(next, prev);
function createTypeState(isActive = false) {
animate: createTypeState(true),
whileInView: createTypeState(),
whileHover: createTypeState(),
whileTap: createTypeState(),
whileDrag: createTypeState(),
whileFocus: createTypeState(),
;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/motion/features/animation/index.mjs
class AnimationFeature extends Feature {
* We dynamically generate the AnimationState manager as it contains a reference
* to the underlying animation library. We only want to load that if we load this,
* so people can optionally code split it out using the `m` component.
node.animationState || (node.animationState = createAnimationState(node));
updateAnimationControlsSubscription() {
const { animate } = this.node.getProps();
if (isAnimationControls(animate)) {
this.unmount = animate.subscribe(this.node);
* Subscribe any provided AnimationControls to the component's VisualElement
this.updateAnimationControlsSubscription();
const { animate } = this.node.getProps();
const { animate: prevAnimate } = this.node.prevProps || {};
if (animate !== prevAnimate) {
this.updateAnimationControlsSubscription();
;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs
class ExitAnimationFeature extends Feature {
if (!this.node.presenceContext)
const { isPresent, onExitComplete } = this.node.presenceContext;
const { isPresent: prevIsPresent } = this.node.prevPresenceContext || {};
if (!this.node.animationState || isPresent === prevIsPresent) {
const exitAnimation = this.node.animationState.setActive("exit", !isPresent);
if (onExitComplete && !isPresent) {
exitAnimation.then(() => onExitComplete(this.id));
const { register } = this.node.presenceContext || {};
this.unmount = register(this.id);
;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/motion/features/animations.mjs
Feature: AnimationFeature,
Feature: ExitAnimationFeature,
;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/distance.mjs
const distance = (a, b) => Math.abs(a - b);
function distance2D(a, b) {
const xDelta = distance(a.x, b.x);
const yDelta = distance(a.y, b.y);
return Math.sqrt(xDelta ** 2 + yDelta ** 2);
;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs
constructor(event, handlers, { transformPagePoint, contextWindow, dragSnapToOrigin = false } = {}) {
this.lastMoveEvent = null;
this.lastMoveEventInfo = null;
this.contextWindow = window;
this.updatePoint = () => {
if (!(this.lastMoveEvent && this.lastMoveEventInfo))
const info = getPanInfo(this.lastMoveEventInfo, this.history);
const isPanStarted = this.startEvent !== null;
// Only start panning if the offset is larger than 3 pixels. If we make it
// any larger than this we'll want to reset the pointer history
// on the first update to avoid visual snapping to the cursoe.
const isDistancePastThreshold = distance2D(info.offset, { x: 0, y: 0 }) >= 3;
if (!isPanStarted && !isDistancePastThreshold)
const { timestamp } = frameData;
this.history.push({ ...point, timestamp });
const { onStart, onMove } = this.handlers;
onStart && onStart(this.lastMoveEvent, info);
this.startEvent = this.lastMoveEvent;
onMove && onMove(this.lastMoveEvent, info);
this.handlePointerMove = (event, info) => {
this.lastMoveEvent = event;
this.lastMoveEventInfo = transformPoint(info, this.transformPagePoint);
// Throttle mouse move event to once per frame
frame_frame.update(this.updatePoint, true);
this.handlePointerUp = (event, info) => {
const { onEnd, onSessionEnd, resumeAnimation } = this.handlers;
if (this.dragSnapToOrigin)
resumeAnimation && resumeAnimation();
if (!(this.lastMoveEvent && this.lastMoveEventInfo))
const panInfo = getPanInfo(event.type === "pointercancel"
: transformPoint(info, this.transformPagePoint), this.history);
if (this.startEvent && onEnd) {
onSessionEnd && onSessionEnd(event, panInfo);
// If we have more than one touch, don't start detecting this gesture
if (!isPrimaryPointer(event))
this.dragSnapToOrigin = dragSnapToOrigin;
this.handlers = handlers;
this.transformPagePoint = transformPagePoint;
this.contextWindow = contextWindow || window;
const info = extractEventInfo(event);
const initialInfo = transformPoint(info, this.transformPagePoint);
const { point } = initialInfo;
const { timestamp } = frameData;
this.history = [{ ...point, timestamp }];
const { onSessionStart } = handlers;
onSessionStart(event, getPanInfo(initialInfo, this.history));
this.removeListeners = pipe(addPointerEvent(this.contextWindow, "pointermove", this.handlePointerMove), addPointerEvent(this.contextWindow, "pointerup", this.handlePointerUp), addPointerEvent(this.contextWindow, "pointercancel", this.handlePointerUp));
updateHandlers(handlers) {
this.handlers = handlers;
this.removeListeners && this.removeListeners();
cancelFrame(this.updatePoint);
function transformPoint(info, transformPagePoint) {
return transformPagePoint ? { point: transformPagePoint(info.point) } : info;
function subtractPoint(a, b) {
return { x: a.x - b.x, y: a.y - b.y };
function getPanInfo({ point }, history) {
delta: subtractPoint(point, lastDevicePoint(history)),
offset: subtractPoint(point, startDevicePoint(history)),
velocity: getVelocity(history, 0.1),
function startDevicePoint(history) {
function lastDevicePoint(history) {
return history[history.length - 1];
function getVelocity(history, timeDelta) {
if (history.length < 2) {
let i = history.length - 1;
let timestampedPoint = null;
const lastPoint = lastDevicePoint(history);
timestampedPoint = history[i];
if (lastPoint.timestamp - timestampedPoint.timestamp >
secondsToMilliseconds(timeDelta)) {
const time = millisecondsToSeconds(lastPoint.timestamp - timestampedPoint.timestamp);
const currentVelocity = {
x: (lastPoint.x - timestampedPoint.x) / time,
y: (lastPoint.y - timestampedPoint.y) / time,
if (currentVelocity.x === Infinity) {
if (currentVelocity.y === Infinity) {
;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/projection/geometry/delta-calc.mjs
function calcLength(axis) {
return axis.max - axis.min;
function isNear(value, target = 0, maxDistance = 0.01) {
return Math.abs(value - target) <= maxDistance;
function calcAxisDelta(delta, source, target, origin = 0.5) {
delta.originPoint = mixNumber(source.min, source.max, delta.origin);
delta.scale = calcLength(target) / calcLength(source);
if (isNear(delta.scale, 1, 0.0001) || isNaN(delta.scale))
mixNumber(target.min, target.max, delta.origin) - delta.originPoint;
if (isNear(delta.translate) || isNaN(delta.translate))
function calcBoxDelta(delta, source, target, origin) {
calcAxisDelta(delta.x, source.x, target.x, origin ? origin.originX : undefined);
calcAxisDelta(delta.y, source.y, target.y, origin ? origin.originY : undefined);
function calcRelativeAxis(target, relative, parent) {
target.min = parent.min + relative.min;
target.max = target.min + calcLength(relative);
function calcRelativeBox(target, relative, parent) {
calcRelativeAxis(target.x, relative.x, parent.x);
calcRelativeAxis(target.y, relative.y, parent.y);
function calcRelativeAxisPosition(target, layout, parent) {
target.min = layout.min - parent.min;
target.max = target.min + calcLength(layout);
function calcRelativePosition(target, layout, parent) {
calcRelativeAxisPosition(target.x, layout.x, parent.x);
calcRelativeAxisPosition(target.y, layout.y, parent.y);
;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs
* Apply constraints to a point. These constraints are both physical along an
* axis, and an elastic factor that determines how much to constrain the point
* by if it does lie outside the defined parameters.
function applyConstraints(point, { min, max }, elastic) {
if (min !== undefined && point < min) {
// If we have a min point defined, and this is outside of that, constrain
? mixNumber(min, point, elastic.min)
else if (max !== undefined && point > max) {
// If we have a max point defined, and this is outside of that, constrain
? mixNumber(max, point, elastic.max)
* Calculate constraints in terms of the viewport when defined relatively to the
* measured axis. This is measured from the nearest edge, so a max constraint of 200
* on an axis with a max value of 300 would return a constraint of 500 - axis length
function calcRelativeAxisConstraints(axis, min, max) {
min: min !== undefined ? axis.min + min : undefined,
? axis.max + max - (axis.max - axis.min)
* Calculate constraints in terms of the viewport when
* defined relatively to the measured bounding box.
function calcRelativeConstraints(layoutBox, { top, left, bottom, right }) {
x: calcRelativeAxisConstraints(layoutBox.x, left, right),
y: calcRelativeAxisConstraints(layoutBox.y, top, bottom),
* Calculate viewport constraints when defined as another viewport-relative axis
function calcViewportAxisConstraints(layoutAxis, constraintsAxis) {
let min = constraintsAxis.min - layoutAxis.min;
let max = constraintsAxis.max - layoutAxis.max;
// If the constraints axis is actually smaller than the layout axis then we can
if (constraintsAxis.max - constraintsAxis.min <
layoutAxis.max - layoutAxis.min) {
* Calculate viewport constraints when defined as another viewport-relative box
function calcViewportConstraints(layoutBox, constraintsBox) {
x: calcViewportAxisConstraints(layoutBox.x, constraintsBox.x),
y: calcViewportAxisConstraints(layoutBox.y, constraintsBox.y),
* Calculate a transform origin relative to the source axis, between 0-1, that results
* in an asthetically pleasing scale/transform needed to project from source to target.
function constraints_calcOrigin(source, target) {
const sourceLength = calcLength(source);
const targetLength = calcLength(target);
if (targetLength > sourceLength) {
origin = progress(target.min, target.max - sourceLength, source.min);
else if (sourceLength > targetLength) {
origin = progress(source.min, source.max - targetLength, target.min);
return clamp_clamp(0, 1, origin);
* Rebase the calculated viewport constraints relative to the layout.min point.
function rebaseAxisConstraints(layout, constraints) {
const relativeConstraints = {};
if (constraints.min !== undefined) {
relativeConstraints.min = constraints.min - layout.min;
if (constraints.max !== undefined) {
relativeConstraints.max = constraints.max - layout.min;
return relativeConstraints;
const defaultElastic = 0.35;
* Accepts a dragElastic prop and returns resolved elastic values for each axis.
function resolveDragElastic(dragElastic = defaultElastic) {
if (dragElastic === false) {
else if (dragElastic === true) {
dragElastic = defaultElastic;
x: resolveAxisElastic(dragElastic, "left", "right"),
y: resolveAxisElastic(dragElastic, "top", "bottom"),
function resolveAxisElastic(dragElastic, minLabel, maxLabel) {
min: resolvePointElastic(dragElastic, minLabel),
max: resolvePointElastic(dragElastic, maxLabel),
function resolvePointElastic(dragElastic, label) {
return typeof dragElastic === "number"
: dragElastic[label] || 0;
;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/projection/geometry/models.mjs
const createAxisDelta = () => ({
const createDelta = () => ({
const createAxis = () => ({ min: 0, max: 0 });
const createBox = () => ({
;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/projection/utils/each-axis.mjs
function eachAxis(callback) {
return [callback("x"), callback("y")];
;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/projection/geometry/conversion.mjs
* Bounding boxes tend to be defined as top, left, right, bottom. For various operations