Liferay.Loader.define("commerce-frontend-js@3.0.43/utilities/email", ['module', 'exports', 'require'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.validateEmailAddress = validateEmailAddress;
    exports.EMAIL_VALIDATION_PATTERN = void 0;

    /**
     * SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
     * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
     */
    var EMAIL_VALIDATION_PATTERN = /^(\D)+(\w)*((\.(\w)+)?)+@(\D)+(\w)*((\.(\D)+(\w)*)+)?(\.)[a-z]{2,}$/;
    exports.EMAIL_VALIDATION_PATTERN = EMAIL_VALIDATION_PATTERN;

    function validateEmailAddress(address) {
      return new Promise(function (resolve, reject) {
        var pattern = new RegExp(EMAIL_VALIDATION_PATTERN),
            isValid = pattern.exec(address).length;

        if (isValid) {
          resolve(address);
        }

        reject();
      });
    }
    //# sourceMappingURL=email.js.map
  }
});
//# sourceMappingURL=email.js.map