"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateEmail = void 0;
function validateEmail(email) {
    var regex = /^[-!#$%&'*+/0-9=?A-Z^_a-z`{|}~](\.?[-!#$%&'*+/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/;
    var emailParts = email.split("@");
    if (emailParts.length !== 2 ||
        emailParts[0].length > 64 ||
        emailParts[1].length > 255) {
        return false;
    }
    var domainParts = emailParts[1].split(".");
    if (domainParts.some(function (part) { return part.length > 63; })) {
        return false;
    }
    return regex.test(email);
}
exports.validateEmail = validateEmail;
//# sourceMappingURL=validateEmail.js.map