var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// src/components/pisellFloorMapLayout/utils/snap.ts
var snap_exports = {};
__export(snap_exports, {
  snapRect: () => snapRect,
  snapValue: () => snapValue
});
module.exports = __toCommonJS(snap_exports);
function snapValue(value, snapStep) {
  if (!snapStep || snapStep <= 0) return value;
  return Math.round(value / snapStep) * snapStep;
}
function snapRect(x, y, width, height, snapStep) {
  if (!snapStep || snapStep <= 0) return { x, y, width, height };
  return {
    x: snapValue(x, snapStep),
    y: snapValue(y, snapStep),
    width: Math.max(snapStep, snapValue(width, snapStep)),
    height: Math.max(snapStep, snapValue(height, snapStep))
  };
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  snapRect,
  snapValue
});
