Rocky_Mountain_Vending/.pnpm-store/v10/files/94/bf500966bf62a8ad992a658e8775b7820dfec644da5d63a0d51bf0f3e1a1d000ef430fd04862bf1efdc67c68843a5809d9389951f21f443ad58226b3d8ffdc
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

73 lines
No EOL
1.8 KiB
Text
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = bisector;
var _ascending = _interopRequireDefault(require("./ascending.js"));
var _descending = _interopRequireDefault(require("./descending.js"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function bisector(f) {
let compare1, compare2, delta; // If an accessor is specified, promote it to a comparator. In this case we
// can test whether the search value is (self-) comparable. We cant do this
// for a comparator (except for specific, known comparators) because we cant
// tell if the comparator is symmetric, and an asymmetric comparator cant be
// used to test whether a single value is comparable.
if (f.length !== 2) {
compare1 = _ascending.default;
compare2 = (d, x) => (0, _ascending.default)(f(d), x);
delta = (d, x) => f(d) - x;
} else {
compare1 = f === _ascending.default || f === _descending.default ? f : zero;
compare2 = f;
delta = f;
}
function left(a, x, lo = 0, hi = a.length) {
if (lo < hi) {
if (compare1(x, x) !== 0) return hi;
do {
const mid = lo + hi >>> 1;
if (compare2(a[mid], x) < 0) lo = mid + 1;else hi = mid;
} while (lo < hi);
}
return lo;
}
function right(a, x, lo = 0, hi = a.length) {
if (lo < hi) {
if (compare1(x, x) !== 0) return hi;
do {
const mid = lo + hi >>> 1;
if (compare2(a[mid], x) <= 0) lo = mid + 1;else hi = mid;
} while (lo < hi);
}
return lo;
}
function center(a, x, lo = 0, hi = a.length) {
const i = left(a, x, lo, hi - 1);
return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i;
}
return {
left,
center,
right
};
}
function zero() {
return 0;
}