// define to binary helper
<%- TO_BINARY %> = <% if (_is_neutral_platform) { %>typeof Buffer !== 'undefined' ? <% } %>
<% if (_is_node_platform || _is_neutral_platform) { %>
<%- returningFunction("new Uint8Array(Buffer.from(base64, 'base64'))", "base64") %>
<% } %>
<% if (_is_neutral_platform) { %> : <% } %>
<% if (_is_web_platform || _is_neutral_platform) { %>
(<%- basicFunction("") %> {
var table = new Uint8Array(128);
for (var i = 0; i < 64; i++) table[i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i * 4 - 205] = i;
return <%- basicFunction("base64") %> {
var n = base64.length, bytes = new Uint8Array((n - (base64[n - 1] == '=') - (base64[n - 2] == '=')) * 3 / 4 | 0);
for (var i = 0, j = 0; i < n;) {
var c0 = table[base64.charCodeAt(i++)], c1 = table[base64.charCodeAt(i++)];
var c2 = table[base64.charCodeAt(i++)], c3 = table[base64.charCodeAt(i++)];
bytes[j++] = (c0 << 2) | (c1 >> 4);
bytes[j++] = (c1 << 4) | (c2 >> 2);
bytes[j++] = (c2 << 6) | c3;
}
return bytes;
};
})()
<% } %>