Liferay.Loader.define("multi-factor-authentication-fido2-web@1.0.0/js/base64url", ['module', 'exports', 'require', 'multi-factor-authentication-fido2-web$base64-js'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.fromByteArray = fromByteArray;
    exports.toByteArray = toByteArray;

    var _base64Js = _interopRequireDefault(require("multi-factor-authentication-fido2-web$base64-js"));

    function _interopRequireDefault(obj) {
      return obj && obj.__esModule ? obj : { default: obj };
    }

    /**
     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
     *
     * The contents of this file are subject to the terms of the Liferay Enterprise
     * Subscription License ("License"). You may not use this file except in
     * compliance with the License. You can obtain a copy of the License by
     * contacting Liferay, Inc. See the License for the specific language governing
     * permissions and limitations under the License, including but not limited to
     * distribution rights of the Software.
     */
    function base64UrlToMime(code) {
      return code.replace(/-/g, '+').replace(/_/g, '/') + '===='.substring(0, (4 - code.length % 4) % 4);
    }

    function mimeBase64ToUrl(code) {
      return code.replace(/\+/g, '-').replace(/\//g, '_').replace(/=/g, '');
    }

    function fromByteArray(bytes) {
      bytes = bytes instanceof ArrayBuffer ? new Uint8Array(bytes) : bytes;
      return mimeBase64ToUrl(_base64Js.default.fromByteArray(bytes));
    }

    function toByteArray(code) {
      return _base64Js.default.toByteArray(base64UrlToMime(code));
    }
    //# sourceMappingURL=base64url.js.map
  }
});
//# sourceMappingURL=base64url.js.map