Commit iniziale
This commit is contained in:
15
node_modules/@azure/msal-browser/dist/encode/Base64Decode.d.ts
generated
vendored
Normal file
15
node_modules/@azure/msal-browser/dist/encode/Base64Decode.d.ts
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Class which exposes APIs to decode base64 strings to plaintext. See here for implementation details:
|
||||
* https://developer.mozilla.org/en-US/docs/Glossary/Base64#the_unicode_problem
|
||||
*/
|
||||
/**
|
||||
* Returns a URL-safe plaintext decoded string from b64 encoded input.
|
||||
* @param input
|
||||
*/
|
||||
export declare function base64Decode(input: string): string;
|
||||
/**
|
||||
* Decodes base64 into Uint8Array
|
||||
* @param base64String
|
||||
*/
|
||||
export declare function base64DecToArr(base64String: string): Uint8Array;
|
||||
//# sourceMappingURL=Base64Decode.d.ts.map
|
||||
1
node_modules/@azure/msal-browser/dist/encode/Base64Decode.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/msal-browser/dist/encode/Base64Decode.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Base64Decode.d.ts","sourceRoot":"","sources":["../../src/encode/Base64Decode.ts"],"names":[],"mappings":"AAUA;;;GAGG;AAEH;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAElD;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,YAAY,EAAE,MAAM,GAAG,UAAU,CAkB/D"}
|
||||
44
node_modules/@azure/msal-browser/dist/encode/Base64Decode.mjs
generated
vendored
Normal file
44
node_modules/@azure/msal-browser/dist/encode/Base64Decode.mjs
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
/*! @azure/msal-browser v4.2.1 2025-02-11 */
|
||||
'use strict';
|
||||
import { createBrowserAuthError } from '../error/BrowserAuthError.mjs';
|
||||
import { invalidBase64String } from '../error/BrowserAuthErrorCodes.mjs';
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
/**
|
||||
* Class which exposes APIs to decode base64 strings to plaintext. See here for implementation details:
|
||||
* https://developer.mozilla.org/en-US/docs/Glossary/Base64#the_unicode_problem
|
||||
*/
|
||||
/**
|
||||
* Returns a URL-safe plaintext decoded string from b64 encoded input.
|
||||
* @param input
|
||||
*/
|
||||
function base64Decode(input) {
|
||||
return new TextDecoder().decode(base64DecToArr(input));
|
||||
}
|
||||
/**
|
||||
* Decodes base64 into Uint8Array
|
||||
* @param base64String
|
||||
*/
|
||||
function base64DecToArr(base64String) {
|
||||
let encodedString = base64String.replace(/-/g, "+").replace(/_/g, "/");
|
||||
switch (encodedString.length % 4) {
|
||||
case 0:
|
||||
break;
|
||||
case 2:
|
||||
encodedString += "==";
|
||||
break;
|
||||
case 3:
|
||||
encodedString += "=";
|
||||
break;
|
||||
default:
|
||||
throw createBrowserAuthError(invalidBase64String);
|
||||
}
|
||||
const binString = atob(encodedString);
|
||||
return Uint8Array.from(binString, (m) => m.codePointAt(0) || 0);
|
||||
}
|
||||
|
||||
export { base64DecToArr, base64Decode };
|
||||
//# sourceMappingURL=Base64Decode.mjs.map
|
||||
1
node_modules/@azure/msal-browser/dist/encode/Base64Decode.mjs.map
generated
vendored
Normal file
1
node_modules/@azure/msal-browser/dist/encode/Base64Decode.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Base64Decode.mjs","sources":["../../src/encode/Base64Decode.ts"],"sourcesContent":[null],"names":["BrowserAuthErrorCodes.invalidBase64String"],"mappings":";;;;;AAAA;;;AAGG;AAOH;;;AAGG;AAEH;;;AAGG;AACG,SAAU,YAAY,CAAC,KAAa,EAAA;IACtC,OAAO,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;AAC3D,CAAC;AAED;;;AAGG;AACG,SAAU,cAAc,CAAC,YAAoB,EAAA;AAC/C,IAAA,IAAI,aAAa,GAAG,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AACvE,IAAA,QAAQ,aAAa,CAAC,MAAM,GAAG,CAAC;AAC5B,QAAA,KAAK,CAAC;YACF,MAAM;AACV,QAAA,KAAK,CAAC;YACF,aAAa,IAAI,IAAI,CAAC;YACtB,MAAM;AACV,QAAA,KAAK,CAAC;YACF,aAAa,IAAI,GAAG,CAAC;YACrB,MAAM;AACV,QAAA;AACI,YAAA,MAAM,sBAAsB,CACxBA,mBAAyC,CAC5C,CAAC;AACT,KAAA;AACD,IAAA,MAAM,SAAS,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC;IACtC,OAAO,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AACpE;;;;"}
|
||||
20
node_modules/@azure/msal-browser/dist/encode/Base64Encode.d.ts
generated
vendored
Normal file
20
node_modules/@azure/msal-browser/dist/encode/Base64Encode.d.ts
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Class which exposes APIs to encode plaintext to base64 encoded string. See here for implementation details:
|
||||
* https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding#Solution_2_%E2%80%93_JavaScript's_UTF-16_%3E_UTF-8_%3E_base64
|
||||
*/
|
||||
/**
|
||||
* Returns URL Safe b64 encoded string from a plaintext string.
|
||||
* @param input
|
||||
*/
|
||||
export declare function urlEncode(input: string): string;
|
||||
/**
|
||||
* Returns URL Safe b64 encoded string from an int8Array.
|
||||
* @param inputArr
|
||||
*/
|
||||
export declare function urlEncodeArr(inputArr: Uint8Array): string;
|
||||
/**
|
||||
* Returns b64 encoded string from plaintext string.
|
||||
* @param input
|
||||
*/
|
||||
export declare function base64Encode(input: string): string;
|
||||
//# sourceMappingURL=Base64Encode.d.ts.map
|
||||
1
node_modules/@azure/msal-browser/dist/encode/Base64Encode.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/msal-browser/dist/encode/Base64Encode.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Base64Encode.d.ts","sourceRoot":"","sources":["../../src/encode/Base64Encode.ts"],"names":[],"mappings":"AAKA;;;GAGG;AAEH;;;GAGG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAO/C;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,UAAU,GAAG,MAAM,CAKzD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAElD"}
|
||||
48
node_modules/@azure/msal-browser/dist/encode/Base64Encode.mjs
generated
vendored
Normal file
48
node_modules/@azure/msal-browser/dist/encode/Base64Encode.mjs
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
/*! @azure/msal-browser v4.2.1 2025-02-11 */
|
||||
'use strict';
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
/**
|
||||
* Class which exposes APIs to encode plaintext to base64 encoded string. See here for implementation details:
|
||||
* https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding#Solution_2_%E2%80%93_JavaScript's_UTF-16_%3E_UTF-8_%3E_base64
|
||||
*/
|
||||
/**
|
||||
* Returns URL Safe b64 encoded string from a plaintext string.
|
||||
* @param input
|
||||
*/
|
||||
function urlEncode(input) {
|
||||
return encodeURIComponent(base64Encode(input)
|
||||
.replace(/=/g, "")
|
||||
.replace(/\+/g, "-")
|
||||
.replace(/\//g, "_"));
|
||||
}
|
||||
/**
|
||||
* Returns URL Safe b64 encoded string from an int8Array.
|
||||
* @param inputArr
|
||||
*/
|
||||
function urlEncodeArr(inputArr) {
|
||||
return base64EncArr(inputArr)
|
||||
.replace(/=/g, "")
|
||||
.replace(/\+/g, "-")
|
||||
.replace(/\//g, "_");
|
||||
}
|
||||
/**
|
||||
* Returns b64 encoded string from plaintext string.
|
||||
* @param input
|
||||
*/
|
||||
function base64Encode(input) {
|
||||
return base64EncArr(new TextEncoder().encode(input));
|
||||
}
|
||||
/**
|
||||
* Base64 encode byte array
|
||||
* @param aBytes
|
||||
*/
|
||||
function base64EncArr(aBytes) {
|
||||
const binString = Array.from(aBytes, (x) => String.fromCodePoint(x)).join("");
|
||||
return btoa(binString);
|
||||
}
|
||||
|
||||
export { base64Encode, urlEncode, urlEncodeArr };
|
||||
//# sourceMappingURL=Base64Encode.mjs.map
|
||||
1
node_modules/@azure/msal-browser/dist/encode/Base64Encode.mjs.map
generated
vendored
Normal file
1
node_modules/@azure/msal-browser/dist/encode/Base64Encode.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Base64Encode.mjs","sources":["../../src/encode/Base64Encode.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AAEH;;;AAGG;AAEH;;;AAGG;AACG,SAAU,SAAS,CAAC,KAAa,EAAA;AACnC,IAAA,OAAO,kBAAkB,CACrB,YAAY,CAAC,KAAK,CAAC;AACd,SAAA,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;AACjB,SAAA,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;AACnB,SAAA,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAC3B,CAAC;AACN,CAAC;AAED;;;AAGG;AACG,SAAU,YAAY,CAAC,QAAoB,EAAA;IAC7C,OAAO,YAAY,CAAC,QAAQ,CAAC;AACxB,SAAA,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;AACjB,SAAA,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;AACnB,SAAA,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AAC7B,CAAC;AAED;;;AAGG;AACG,SAAU,YAAY,CAAC,KAAa,EAAA;IACtC,OAAO,YAAY,CAAC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AACzD,CAAC;AAED;;;AAGG;AACH,SAAS,YAAY,CAAC,MAAkB,EAAA;IACpC,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CACrE,EAAE,CACL,CAAC;AACF,IAAA,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC;AAC3B;;;;"}
|
||||
Reference in New Issue
Block a user