Rocky_Mountain_Vending/.pnpm-store/v10/files/5d/102baeb667eb30d8543dbfebd1ffd0692165914323e9c1bd9e87dcbdf999f85c755a9a9370cd96d64c2fece27ebb4cefe8819b8f2e2ddcb69ae537fbd8fa30
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

40 lines
1.6 KiB
Text

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fromBase64 = void 0;
const constants_browser_1 = require("./constants.browser");
const fromBase64 = (input) => {
let totalByteLength = (input.length / 4) * 3;
if (input.slice(-2) === "==") {
totalByteLength -= 2;
}
else if (input.slice(-1) === "=") {
totalByteLength--;
}
const out = new ArrayBuffer(totalByteLength);
const dataView = new DataView(out);
for (let i = 0; i < input.length; i += 4) {
let bits = 0;
let bitLength = 0;
for (let j = i, limit = i + 3; j <= limit; j++) {
if (input[j] !== "=") {
if (!(input[j] in constants_browser_1.alphabetByEncoding)) {
throw new TypeError(`Invalid character ${input[j]} in base64 string.`);
}
bits |= constants_browser_1.alphabetByEncoding[input[j]] << ((limit - j) * constants_browser_1.bitsPerLetter);
bitLength += constants_browser_1.bitsPerLetter;
}
else {
bits >>= constants_browser_1.bitsPerLetter;
}
}
const chunkOffset = (i / 4) * 3;
bits >>= bitLength % constants_browser_1.bitsPerByte;
const byteLength = Math.floor(bitLength / constants_browser_1.bitsPerByte);
for (let k = 0; k < byteLength; k++) {
const offset = (byteLength - k - 1) * constants_browser_1.bitsPerByte;
dataView.setUint8(chunkOffset + k, (bits & (255 << offset)) >> offset);
}
}
return new Uint8Array(out);
};
exports.fromBase64 = fromBase64;