UNPKG

aion-gql-webcomponents

Version:
16,338 lines 803 kB
/*! Built with http://stenciljs.com */
import { h } from '../aion-gql-webcomponents.core.js';

var lookup = [];
var revLookup = [];
var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;
var inited = false;
function init () {
  inited = true;
  var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
  for (var i = 0, len = code.length; i < len; ++i) {
    lookup[i] = code[i];
    revLookup[code.charCodeAt(i)] = i;
  }

  revLookup['-'.charCodeAt(0)] = 62;
  revLookup['_'.charCodeAt(0)] = 63;
}

function toByteArray (b64) {
  if (!inited) {
    init();
  }
  var i, j, l, tmp, placeHolders, arr;
  var len = b64.length;

  if (len % 4 > 0) {
    throw new Error('Invalid string. Length must be a multiple of 4')
  }

  // the number of equal signs (place holders)
  // if there are two placeholders, than the two characters before it
  // represent one byte
  // if there is only one, then the three characters before it represent 2 bytes
  // this is just a cheap hack to not do indexOf twice
  placeHolders = b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0;

  // base64 is 4/3 + up to two characters of the original data
  arr = new Arr(len * 3 / 4 - placeHolders);

  // if there are placeholders, only get up to the last complete 4 chars
  l = placeHolders > 0 ? len - 4 : len;

  var L = 0;

  for (i = 0, j = 0; i < l; i += 4, j += 3) {
    tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)];
    arr[L++] = (tmp >> 16) & 0xFF;
    arr[L++] = (tmp >> 8) & 0xFF;
    arr[L++] = tmp & 0xFF;
  }

  if (placeHolders === 2) {
    tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4);
    arr[L++] = tmp & 0xFF;
  } else if (placeHolders === 1) {
    tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2);
    arr[L++] = (tmp >> 8) & 0xFF;
    arr[L++] = tmp & 0xFF;
  }

  return arr
}

function tripletToBase64 (num) {
  return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]
}

function encodeChunk (uint8, start, end) {
  var tmp;
  var output = [];
  for (var i = start; i < end; i += 3) {
    tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]);
    output.push(tripletToBase64(tmp));
  }
  return output.join('')
}

function fromByteArray (uint8) {
  if (!inited) {
    init();
  }
  var tmp;
  var len = uint8.length;
  var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes
  var output = '';
  var parts = [];
  var maxChunkLength = 16383; // must be multiple of 3

  // go through the array every three bytes, we'll deal with trailing stuff later
  for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
    parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)));
  }

  // pad the end with zeros, but make sure to not forget the extra bytes
  if (extraBytes === 1) {
    tmp = uint8[len - 1];
    output += lookup[tmp >> 2];
    output += lookup[(tmp << 4) & 0x3F];
    output += '==';
  } else if (extraBytes === 2) {
    tmp = (uint8[len - 2] << 8) + (uint8[len - 1]);
    output += lookup[tmp >> 10];
    output += lookup[(tmp >> 4) & 0x3F];
    output += lookup[(tmp << 2) & 0x3F];
    output += '=';
  }

  parts.push(output);

  return parts.join('')
}

function read (buffer, offset, isLE, mLen, nBytes) {
  var e, m;
  var eLen = nBytes * 8 - mLen - 1;
  var eMax = (1 << eLen) - 1;
  var eBias = eMax >> 1;
  var nBits = -7;
  var i = isLE ? (nBytes - 1) : 0;
  var d = isLE ? -1 : 1;
  var s = buffer[offset + i];

  i += d;

  e = s & ((1 << (-nBits)) - 1);
  s >>= (-nBits);
  nBits += eLen;
  for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}

  m = e & ((1 << (-nBits)) - 1);
  e >>= (-nBits);
  nBits += mLen;
  for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}

  if (e === 0) {
    e = 1 - eBias;
  } else if (e === eMax) {
    return m ? NaN : ((s ? -1 : 1) * Infinity)
  } else {
    m = m + Math.pow(2, mLen);
    e = e - eBias;
  }
  return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
}

function write (buffer, value, offset, isLE, mLen, nBytes) {
  var e, m, c;
  var eLen = nBytes * 8 - mLen - 1;
  var eMax = (1 << eLen) - 1;
  var eBias = eMax >> 1;
  var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0);
  var i = isLE ? 0 : (nBytes - 1);
  var d = isLE ? 1 : -1;
  var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0;

  value = Math.abs(value);

  if (isNaN(value) || value === Infinity) {
    m = isNaN(value) ? 1 : 0;
    e = eMax;
  } else {
    e = Math.floor(Math.log(value) / Math.LN2);
    if (value * (c = Math.pow(2, -e)) < 1) {
      e--;
      c *= 2;
    }
    if (e + eBias >= 1) {
      value += rt / c;
    } else {
      value += rt * Math.pow(2, 1 - eBias);
    }
    if (value * c >= 2) {
      e++;
      c /= 2;
    }

    if (e + eBias >= eMax) {
      m = 0;
      e = eMax;
    } else if (e + eBias >= 1) {
      m = (value * c - 1) * Math.pow(2, mLen);
      e = e + eBias;
    } else {
      m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
      e = 0;
    }
  }

  for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}

  e = (e << mLen) | m;
  eLen += mLen;
  for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}

  buffer[offset + i - d] |= s * 128;
}

var toString = {}.toString;

var isArray = Array.isArray || function (arr) {
  return toString.call(arr) == '[object Array]';
};

/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
 * @license  MIT
 */

var INSPECT_MAX_BYTES = 50;

/**
 * If `Buffer.TYPED_ARRAY_SUPPORT`:
 *   === true    Use Uint8Array implementation (fastest)
 *   === false   Use Object implementation (most compatible, even IE6)
 *
 * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
 * Opera 11.6+, iOS 4.2+.
 *
 * Due to various browser bugs, sometimes the Object implementation will be used even
 * when the browser supports typed arrays.
 *
 * Note:
 *
 *   - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
 *     See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
 *
 *   - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
 *
 *   - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
 *     incorrect length in some situations.

 * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
 * get the Object implementation, which is slower but behaves correctly.
 */
Buffer$1.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined
  ? global.TYPED_ARRAY_SUPPORT
  : true;

/*
 * Export kMaxLength after typed array support is determined.
 */
var _kMaxLength = kMaxLength();

function kMaxLength () {
  return Buffer$1.TYPED_ARRAY_SUPPORT
    ? 0x7fffffff
    : 0x3fffffff
}

function createBuffer (that, length) {
  if (kMaxLength() < length) {
    throw new RangeError('Invalid typed array length')
  }
  if (Buffer$1.TYPED_ARRAY_SUPPORT) {
    // Return an augmented `Uint8Array` instance, for best performance
    that = new Uint8Array(length);
    that.__proto__ = Buffer$1.prototype;
  } else {
    // Fallback: Return an object instance of the Buffer class
    if (that === null) {
      that = new Buffer$1(length);
    }
    that.length = length;
  }

  return that
}

/**
 * The Buffer constructor returns instances of `Uint8Array` that have their
 * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
 * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
 * and the `Uint8Array` methods. Square bracket notation works as expected -- it
 * returns a single octet.
 *
 * The `Uint8Array` prototype remains unmodified.
 */

function Buffer$1 (arg, encodingOrOffset, length) {
  if (!Buffer$1.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer$1)) {
    return new Buffer$1(arg, encodingOrOffset, length)
  }

  // Common case.
  if (typeof arg === 'number') {
    if (typeof encodingOrOffset === 'string') {
      throw new Error(
        'If encoding is specified then the first argument must be a string'
      )
    }
    return allocUnsafe(this, arg)
  }
  return from(this, arg, encodingOrOffset, length)
}

Buffer$1.poolSize = 8192; // not used by this implementation

// TODO: Legacy, not needed anymore. Remove in next major version.
Buffer$1._augment = function (arr) {
  arr.__proto__ = Buffer$1.prototype;
  return arr
};

function from (that, value, encodingOrOffset, length) {
  if (typeof value === 'number') {
    throw new TypeError('"value" argument must not be a number')
  }

  if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
    return fromArrayBuffer(that, value, encodingOrOffset, length)
  }

  if (typeof value === 'string') {
    return fromString(that, value, encodingOrOffset)
  }

  return fromObject(that, value)
}

/**
 * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
 * if value is a number.
 * Buffer.from(str[, encoding])
 * Buffer.from(array)
 * Buffer.from(buffer)
 * Buffer.from(arrayBuffer[, byteOffset[, length]])
 **/
Buffer$1.from = function (value, encodingOrOffset, length) {
  return from(null, value, encodingOrOffset, length)
};

if (Buffer$1.TYPED_ARRAY_SUPPORT) {
  Buffer$1.prototype.__proto__ = Uint8Array.prototype;
  Buffer$1.__proto__ = Uint8Array;
}

function assertSize (size) {
  if (typeof size !== 'number') {
    throw new TypeError('"size" argument must be a number')
  } else if (size < 0) {
    throw new RangeError('"size" argument must not be negative')
  }
}

function alloc (that, size, fill, encoding) {
  assertSize(size);
  if (size <= 0) {
    return createBuffer(that, size)
  }
  if (fill !== undefined) {
    // Only pay attention to encoding if it's a string. This
    // prevents accidentally sending in a number that would
    // be interpretted as a start offset.
    return typeof encoding === 'string'
      ? createBuffer(that, size).fill(fill, encoding)
      : createBuffer(that, size).fill(fill)
  }
  return createBuffer(that, size)
}

/**
 * Creates a new filled Buffer instance.
 * alloc(size[, fill[, encoding]])
 **/
Buffer$1.alloc = function (size, fill, encoding) {
  return alloc(null, size, fill, encoding)
};

function allocUnsafe (that, size) {
  assertSize(size);
  that = createBuffer(that, size < 0 ? 0 : checked(size) | 0);
  if (!Buffer$1.TYPED_ARRAY_SUPPORT) {
    for (var i = 0; i < size; ++i) {
      that[i] = 0;
    }
  }
  return that
}

/**
 * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
 * */
Buffer$1.allocUnsafe = function (size) {
  return allocUnsafe(null, size)
};
/**
 * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
 */
Buffer$1.allocUnsafeSlow = function (size) {
  return allocUnsafe(null, size)
};

function fromString (that, string, encoding) {
  if (typeof encoding !== 'string' || encoding === '') {
    encoding = 'utf8';
  }

  if (!Buffer$1.isEncoding(encoding)) {
    throw new TypeError('"encoding" must be a valid string encoding')
  }

  var length = byteLength(string, encoding) | 0;
  that = createBuffer(that, length);

  var actual = that.write(string, encoding);

  if (actual !== length) {
    // Writing a hex string, for example, that contains invalid characters will
    // cause everything after the first invalid character to be ignored. (e.g.
    // 'abxxcd' will be treated as 'ab')
    that = that.slice(0, actual);
  }

  return that
}

function fromArrayLike (that, array) {
  var length = array.length < 0 ? 0 : checked(array.length) | 0;
  that = createBuffer(that, length);
  for (var i = 0; i < length; i += 1) {
    that[i] = array[i] & 255;
  }
  return that
}

function fromArrayBuffer (that, array, byteOffset, length) {
  array.byteLength; // this throws if `array` is not a valid ArrayBuffer

  if (byteOffset < 0 || array.byteLength < byteOffset) {
    throw new RangeError('\'offset\' is out of bounds')
  }

  if (array.byteLength < byteOffset + (length || 0)) {
    throw new RangeError('\'length\' is out of bounds')
  }

  if (byteOffset === undefined && length === undefined) {
    array = new Uint8Array(array);
  } else if (length === undefined) {
    array = new Uint8Array(array, byteOffset);
  } else {
    array = new Uint8Array(array, byteOffset, length);
  }

  if (Buffer$1.TYPED_ARRAY_SUPPORT) {
    // Return an augmented `Uint8Array` instance, for best performance
    that = array;
    that.__proto__ = Buffer$1.prototype;
  } else {
    // Fallback: Return an object instance of the Buffer class
    that = fromArrayLike(that, array);
  }
  return that
}

function fromObject (that, obj) {
  if (internalIsBuffer(obj)) {
    var len = checked(obj.length) | 0;
    that = createBuffer(that, len);

    if (that.length === 0) {
      return that
    }

    obj.copy(that, 0, 0, len);
    return that
  }

  if (obj) {
    if ((typeof ArrayBuffer !== 'undefined' &&
        obj.buffer instanceof ArrayBuffer) || 'length' in obj) {
      if (typeof obj.length !== 'number' || isnan(obj.length)) {
        return createBuffer(that, 0)
      }
      return fromArrayLike(that, obj)
    }

    if (obj.type === 'Buffer' && isArray(obj.data)) {
      return fromArrayLike(that, obj.data)
    }
  }

  throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')
}

function checked (length) {
  // Note: cannot use `length < kMaxLength()` here because that fails when
  // length is NaN (which is otherwise coerced to zero.)
  if (length >= kMaxLength()) {
    throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
                         'size: 0x' + kMaxLength().toString(16) + ' bytes')
  }
  return length | 0
}

function SlowBuffer (length) {
  if (+length != length) { // eslint-disable-line eqeqeq
    length = 0;
  }
  return Buffer$1.alloc(+length)
}
Buffer$1.isBuffer = isBuffer;
function internalIsBuffer (b) {
  return !!(b != null && b._isBuffer)
}

Buffer$1.compare = function compare (a, b) {
  if (!internalIsBuffer(a) || !internalIsBuffer(b)) {
    throw new TypeError('Arguments must be Buffers')
  }

  if (a === b) return 0

  var x = a.length;
  var y = b.length;

  for (var i = 0, len = Math.min(x, y); i < len; ++i) {
    if (a[i] !== b[i]) {
      x = a[i];
      y = b[i];
      break
    }
  }

  if (x < y) return -1
  if (y < x) return 1
  return 0
};

Buffer$1.isEncoding = function isEncoding (encoding) {
  switch (String(encoding).toLowerCase()) {
    case 'hex':
    case 'utf8':
    case 'utf-8':
    case 'ascii':
    case 'latin1':
    case 'binary':
    case 'base64':
    case 'ucs2':
    case 'ucs-2':
    case 'utf16le':
    case 'utf-16le':
      return true
    default:
      return false
  }
};

Buffer$1.concat = function concat (list, length) {
  if (!isArray(list)) {
    throw new TypeError('"list" argument must be an Array of Buffers')
  }

  if (list.length === 0) {
    return Buffer$1.alloc(0)
  }

  var i;
  if (length === undefined) {
    length = 0;
    for (i = 0; i < list.length; ++i) {
      length += list[i].length;
    }
  }

  var buffer = Buffer$1.allocUnsafe(length);
  var pos = 0;
  for (i = 0; i < list.length; ++i) {
    var buf = list[i];
    if (!internalIsBuffer(buf)) {
      throw new TypeError('"list" argument must be an Array of Buffers')
    }
    buf.copy(buffer, pos);
    pos += buf.length;
  }
  return buffer
};

function byteLength (string, encoding) {
  if (internalIsBuffer(string)) {
    return string.length
  }
  if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&
      (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
    return string.byteLength
  }
  if (typeof string !== 'string') {
    string = '' + string;
  }

  var len = string.length;
  if (len === 0) return 0

  // Use a for loop to avoid recursion
  var loweredCase = false;
  for (;;) {
    switch (encoding) {
      case 'ascii':
      case 'latin1':
      case 'binary':
        return len
      case 'utf8':
      case 'utf-8':
      case undefined:
        return utf8ToBytes(string).length
      case 'ucs2':
      case 'ucs-2':
      case 'utf16le':
      case 'utf-16le':
        return len * 2
      case 'hex':
        return len >>> 1
      case 'base64':
        return base64ToBytes(string).length
      default:
        if (loweredCase) return utf8ToBytes(string).length // assume utf8
        encoding = ('' + encoding).toLowerCase();
        loweredCase = true;
    }
  }
}
Buffer$1.byteLength = byteLength;

function slowToString (encoding, start, end) {
  var loweredCase = false;

  // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
  // property of a typed array.

  // This behaves neither like String nor Uint8Array in that we set start/end
  // to their upper/lower bounds if the value passed is out of range.
  // undefined is handled specially as per ECMA-262 6th Edition,
  // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
  if (start === undefined || start < 0) {
    start = 0;
  }
  // Return early if start > this.length. Done here to prevent potential uint32
  // coercion fail below.
  if (start > this.length) {
    return ''
  }

  if (end === undefined || end > this.length) {
    end = this.length;
  }

  if (end <= 0) {
    return ''
  }

  // Force coersion to uint32. This will also coerce falsey/NaN values to 0.
  end >>>= 0;
  start >>>= 0;

  if (end <= start) {
    return ''
  }

  if (!encoding) encoding = 'utf8';

  while (true) {
    switch (encoding) {
      case 'hex':
        return hexSlice(this, start, end)

      case 'utf8':
      case 'utf-8':
        return utf8Slice(this, start, end)

      case 'ascii':
        return asciiSlice(this, start, end)

      case 'latin1':
      case 'binary':
        return latin1Slice(this, start, end)

      case 'base64':
        return base64Slice(this, start, end)

      case 'ucs2':
      case 'ucs-2':
      case 'utf16le':
      case 'utf-16le':
        return utf16leSlice(this, start, end)

      default:
        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
        encoding = (encoding + '').toLowerCase();
        loweredCase = true;
    }
  }
}

// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
// Buffer instances.
Buffer$1.prototype._isBuffer = true;

function swap (b, n, m) {
  var i = b[n];
  b[n] = b[m];
  b[m] = i;
}

Buffer$1.prototype.swap16 = function swap16 () {
  var len = this.length;
  if (len % 2 !== 0) {
    throw new RangeError('Buffer size must be a multiple of 16-bits')
  }
  for (var i = 0; i < len; i += 2) {
    swap(this, i, i + 1);
  }
  return this
};

Buffer$1.prototype.swap32 = function swap32 () {
  var len = this.length;
  if (len % 4 !== 0) {
    throw new RangeError('Buffer size must be a multiple of 32-bits')
  }
  for (var i = 0; i < len; i += 4) {
    swap(this, i, i + 3);
    swap(this, i + 1, i + 2);
  }
  return this
};

Buffer$1.prototype.swap64 = function swap64 () {
  var len = this.length;
  if (len % 8 !== 0) {
    throw new RangeError('Buffer size must be a multiple of 64-bits')
  }
  for (var i = 0; i < len; i += 8) {
    swap(this, i, i + 7);
    swap(this, i + 1, i + 6);
    swap(this, i + 2, i + 5);
    swap(this, i + 3, i + 4);
  }
  return this
};

Buffer$1.prototype.toString = function toString () {
  var length = this.length | 0;
  if (length === 0) return ''
  if (arguments.length === 0) return utf8Slice(this, 0, length)
  return slowToString.apply(this, arguments)
};

Buffer$1.prototype.equals = function equals (b) {
  if (!internalIsBuffer(b)) throw new TypeError('Argument must be a Buffer')
  if (this === b) return true
  return Buffer$1.compare(this, b) === 0
};

Buffer$1.prototype.inspect = function inspect () {
  var str = '';
  var max = INSPECT_MAX_BYTES;
  if (this.length > 0) {
    str = this.toString('hex', 0, max).match(/.{2}/g).join(' ');
    if (this.length > max) str += ' ... ';
  }
  return '<Buffer ' + str + '>'
};

Buffer$1.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
  if (!internalIsBuffer(target)) {
    throw new TypeError('Argument must be a Buffer')
  }

  if (start === undefined) {
    start = 0;
  }
  if (end === undefined) {
    end = target ? target.length : 0;
  }
  if (thisStart === undefined) {
    thisStart = 0;
  }
  if (thisEnd === undefined) {
    thisEnd = this.length;
  }

  if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
    throw new RangeError('out of range index')
  }

  if (thisStart >= thisEnd && start >= end) {
    return 0
  }
  if (thisStart >= thisEnd) {
    return -1
  }
  if (start >= end) {
    return 1
  }

  start >>>= 0;
  end >>>= 0;
  thisStart >>>= 0;
  thisEnd >>>= 0;

  if (this === target) return 0

  var x = thisEnd - thisStart;
  var y = end - start;
  var len = Math.min(x, y);

  var thisCopy = this.slice(thisStart, thisEnd);
  var targetCopy = target.slice(start, end);

  for (var i = 0; i < len; ++i) {
    if (thisCopy[i] !== targetCopy[i]) {
      x = thisCopy[i];
      y = targetCopy[i];
      break
    }
  }

  if (x < y) return -1
  if (y < x) return 1
  return 0
};

// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
// OR the last index of `val` in `buffer` at offset <= `byteOffset`.
//
// Arguments:
// - buffer - a Buffer to search
// - val - a string, Buffer, or number
// - byteOffset - an index into `buffer`; will be clamped to an int32
// - encoding - an optional encoding, relevant is val is a string
// - dir - true for indexOf, false for lastIndexOf
function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
  // Empty buffer means no match
  if (buffer.length === 0) return -1

  // Normalize byteOffset
  if (typeof byteOffset === 'string') {
    encoding = byteOffset;
    byteOffset = 0;
  } else if (byteOffset > 0x7fffffff) {
    byteOffset = 0x7fffffff;
  } else if (byteOffset < -0x80000000) {
    byteOffset = -0x80000000;
  }
  byteOffset = +byteOffset;  // Coerce to Number.
  if (isNaN(byteOffset)) {
    // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
    byteOffset = dir ? 0 : (buffer.length - 1);
  }

  // Normalize byteOffset: negative offsets start from the end of the buffer
  if (byteOffset < 0) byteOffset = buffer.length + byteOffset;
  if (byteOffset >= buffer.length) {
    if (dir) return -1
    else byteOffset = buffer.length - 1;
  } else if (byteOffset < 0) {
    if (dir) byteOffset = 0;
    else return -1
  }

  // Normalize val
  if (typeof val === 'string') {
    val = Buffer$1.from(val, encoding);
  }

  // Finally, search either indexOf (if dir is true) or lastIndexOf
  if (internalIsBuffer(val)) {
    // Special case: looking for empty string/buffer always fails
    if (val.length === 0) {
      return -1
    }
    return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
  } else if (typeof val === 'number') {
    val = val & 0xFF; // Search for a byte value [0-255]
    if (Buffer$1.TYPED_ARRAY_SUPPORT &&
        typeof Uint8Array.prototype.indexOf === 'function') {
      if (dir) {
        return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
      } else {
        return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
      }
    }
    return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)
  }

  throw new TypeError('val must be string, number or Buffer')
}

function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
  var indexSize = 1;
  var arrLength = arr.length;
  var valLength = val.length;

  if (encoding !== undefined) {
    encoding = String(encoding).toLowerCase();
    if (encoding === 'ucs2' || encoding === 'ucs-2' ||
        encoding === 'utf16le' || encoding === 'utf-16le') {
      if (arr.length < 2 || val.length < 2) {
        return -1
      }
      indexSize = 2;
      arrLength /= 2;
      valLength /= 2;
      byteOffset /= 2;
    }
  }

  function read$$1 (buf, i) {
    if (indexSize === 1) {
      return buf[i]
    } else {
      return buf.readUInt16BE(i * indexSize)
    }
  }

  var i;
  if (dir) {
    var foundIndex = -1;
    for (i = byteOffset; i < arrLength; i++) {
      if (read$$1(arr, i) === read$$1(val, foundIndex === -1 ? 0 : i - foundIndex)) {
        if (foundIndex === -1) foundIndex = i;
        if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
      } else {
        if (foundIndex !== -1) i -= i - foundIndex;
        foundIndex = -1;
      }
    }
  } else {
    if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;
    for (i = byteOffset; i >= 0; i--) {
      var found = true;
      for (var j = 0; j < valLength; j++) {
        if (read$$1(arr, i + j) !== read$$1(val, j)) {
          found = false;
          break
        }
      }
      if (found) return i
    }
  }

  return -1
}

Buffer$1.prototype.includes = function includes (val, byteOffset, encoding) {
  return this.indexOf(val, byteOffset, encoding) !== -1
};

Buffer$1.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
  return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
};

Buffer$1.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
  return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
};

function hexWrite (buf, string, offset, length) {
  offset = Number(offset) || 0;
  var remaining = buf.length - offset;
  if (!length) {
    length = remaining;
  } else {
    length = Number(length);
    if (length > remaining) {
      length = remaining;
    }
  }

  // must be an even number of digits
  var strLen = string.length;
  if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')

  if (length > strLen / 2) {
    length = strLen / 2;
  }
  for (var i = 0; i < length; ++i) {
    var parsed = parseInt(string.substr(i * 2, 2), 16);
    if (isNaN(parsed)) return i
    buf[offset + i] = parsed;
  }
  return i
}

function utf8Write (buf, string, offset, length) {
  return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
}

function asciiWrite (buf, string, offset, length) {
  return blitBuffer(asciiToBytes(string), buf, offset, length)
}

function latin1Write (buf, string, offset, length) {
  return asciiWrite(buf, string, offset, length)
}

function base64Write (buf, string, offset, length) {
  return blitBuffer(base64ToBytes(string), buf, offset, length)
}

function ucs2Write (buf, string, offset, length) {
  return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
}

Buffer$1.prototype.write = function write$$1 (string, offset, length, encoding) {
  // Buffer#write(string)
  if (offset === undefined) {
    encoding = 'utf8';
    length = this.length;
    offset = 0;
  // Buffer#write(string, encoding)
  } else if (length === undefined && typeof offset === 'string') {
    encoding = offset;
    length = this.length;
    offset = 0;
  // Buffer#write(string, offset[, length][, encoding])
  } else if (isFinite(offset)) {
    offset = offset | 0;
    if (isFinite(length)) {
      length = length | 0;
      if (encoding === undefined) encoding = 'utf8';
    } else {
      encoding = length;
      length = undefined;
    }
  // legacy write(string, encoding, offset, length) - remove in v0.13
  } else {
    throw new Error(
      'Buffer.write(string, encoding, offset[, length]) is no longer supported'
    )
  }

  var remaining = this.length - offset;
  if (length === undefined || length > remaining) length = remaining;

  if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
    throw new RangeError('Attempt to write outside buffer bounds')
  }

  if (!encoding) encoding = 'utf8';

  var loweredCase = false;
  for (;;) {
    switch (encoding) {
      case 'hex':
        return hexWrite(this, string, offset, length)

      case 'utf8':
      case 'utf-8':
        return utf8Write(this, string, offset, length)

      case 'ascii':
        return asciiWrite(this, string, offset, length)

      case 'latin1':
      case 'binary':
        return latin1Write(this, string, offset, length)

      case 'base64':
        // Warning: maxLength not taken into account in base64Write
        return base64Write(this, string, offset, length)

      case 'ucs2':
      case 'ucs-2':
      case 'utf16le':
      case 'utf-16le':
        return ucs2Write(this, string, offset, length)

      default:
        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
        encoding = ('' + encoding).toLowerCase();
        loweredCase = true;
    }
  }
};

Buffer$1.prototype.toJSON = function toJSON () {
  return {
    type: 'Buffer',
    data: Array.prototype.slice.call(this._arr || this, 0)
  }
};

function base64Slice (buf, start, end) {
  if (start === 0 && end === buf.length) {
    return fromByteArray(buf)
  } else {
    return fromByteArray(buf.slice(start, end))
  }
}

function utf8Slice (buf, start, end) {
  end = Math.min(buf.length, end);
  var res = [];

  var i = start;
  while (i < end) {
    var firstByte = buf[i];
    var codePoint = null;
    var bytesPerSequence = (firstByte > 0xEF) ? 4
      : (firstByte > 0xDF) ? 3
      : (firstByte > 0xBF) ? 2
      : 1;

    if (i + bytesPerSequence <= end) {
      var secondByte, thirdByte, fourthByte, tempCodePoint;

      switch (bytesPerSequence) {
        case 1:
          if (firstByte < 0x80) {
            codePoint = firstByte;
          }
          break
        case 2:
          secondByte = buf[i + 1];
          if ((secondByte & 0xC0) === 0x80) {
            tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F);
            if (tempCodePoint > 0x7F) {
              codePoint = tempCodePoint;
            }
          }
          break
        case 3:
          secondByte = buf[i + 1];
          thirdByte = buf[i + 2];
          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
            tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F);
            if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
              codePoint = tempCodePoint;
            }
          }
          break
        case 4:
          secondByte = buf[i + 1];
          thirdByte = buf[i + 2];
          fourthByte = buf[i + 3];
          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
            tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F);
            if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
              codePoint = tempCodePoint;
            }
          }
      }
    }

    if (codePoint === null) {
      // we did not generate a valid codePoint so insert a
      // replacement char (U+FFFD) and advance only 1 byte
      codePoint = 0xFFFD;
      bytesPerSequence = 1;
    } else if (codePoint > 0xFFFF) {
      // encode to utf16 (surrogate pair dance)
      codePoint -= 0x10000;
      res.push(codePoint >>> 10 & 0x3FF | 0xD800);
      codePoint = 0xDC00 | codePoint & 0x3FF;
    }

    res.push(codePoint);
    i += bytesPerSequence;
  }

  return decodeCodePointsArray(res)
}

// Based on http://stackoverflow.com/a/22747272/680742, the browser with
// the lowest limit is Chrome, with 0x10000 args.
// We go 1 magnitude less, for safety
var MAX_ARGUMENTS_LENGTH = 0x1000;

function decodeCodePointsArray (codePoints) {
  var len = codePoints.length;
  if (len <= MAX_ARGUMENTS_LENGTH) {
    return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
  }

  // Decode in chunks to avoid "call stack size exceeded".
  var res = '';
  var i = 0;
  while (i < len) {
    res += String.fromCharCode.apply(
      String,
      codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
    );
  }
  return res
}

function asciiSlice (buf, start, end) {
  var ret = '';
  end = Math.min(buf.length, end);

  for (var i = start; i < end; ++i) {
    ret += String.fromCharCode(buf[i] & 0x7F);
  }
  return ret
}

function latin1Slice (buf, start, end) {
  var ret = '';
  end = Math.min(buf.length, end);

  for (var i = start; i < end; ++i) {
    ret += String.fromCharCode(buf[i]);
  }
  return ret
}

function hexSlice (buf, start, end) {
  var len = buf.length;

  if (!start || start < 0) start = 0;
  if (!end || end < 0 || end > len) end = len;

  var out = '';
  for (var i = start; i < end; ++i) {
    out += toHex(buf[i]);
  }
  return out
}

function utf16leSlice (buf, start, end) {
  var bytes = buf.slice(start, end);
  var res = '';
  for (var i = 0; i < bytes.length; i += 2) {
    res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);
  }
  return res
}

Buffer$1.prototype.slice = function slice (start, end) {
  var len = this.length;
  start = ~~start;
  end = end === undefined ? len : ~~end;

  if (start < 0) {
    start += len;
    if (start < 0) start = 0;
  } else if (start > len) {
    start = len;
  }

  if (end < 0) {
    end += len;
    if (end < 0) end = 0;
  } else if (end > len) {
    end = len;
  }

  if (end < start) end = start;

  var newBuf;
  if (Buffer$1.TYPED_ARRAY_SUPPORT) {
    newBuf = this.subarray(start, end);
    newBuf.__proto__ = Buffer$1.prototype;
  } else {
    var sliceLen = end - start;
    newBuf = new Buffer$1(sliceLen, undefined);
    for (var i = 0; i < sliceLen; ++i) {
      newBuf[i] = this[i + start];
    }
  }

  return newBuf
};

/*
 * Need to make sure that buffer isn't trying to write out of bounds.
 */
function checkOffset (offset, ext, length) {
  if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
  if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
}

Buffer$1.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
  offset = offset | 0;
  byteLength = byteLength | 0;
  if (!noAssert) checkOffset(offset, byteLength, this.length);

  var val = this[offset];
  var mul = 1;
  var i = 0;
  while (++i < byteLength && (mul *= 0x100)) {
    val += this[offset + i] * mul;
  }

  return val
};

Buffer$1.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
  offset = offset | 0;
  byteLength = byteLength | 0;
  if (!noAssert) {
    checkOffset(offset, byteLength, this.length);
  }

  var val = this[offset + --byteLength];
  var mul = 1;
  while (byteLength > 0 && (mul *= 0x100)) {
    val += this[offset + --byteLength] * mul;
  }

  return val
};

Buffer$1.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
  if (!noAssert) checkOffset(offset, 1, this.length);
  return this[offset]
};

Buffer$1.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
  if (!noAssert) checkOffset(offset, 2, this.length);
  return this[offset] | (this[offset + 1] << 8)
};

Buffer$1.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
  if (!noAssert) checkOffset(offset, 2, this.length);
  return (this[offset] << 8) | this[offset + 1]
};

Buffer$1.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
  if (!noAssert) checkOffset(offset, 4, this.length);

  return ((this[offset]) |
      (this[offset + 1] << 8) |
      (this[offset + 2] << 16)) +
      (this[offset + 3] * 0x1000000)
};

Buffer$1.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
  if (!noAssert) checkOffset(offset, 4, this.length);

  return (this[offset] * 0x1000000) +
    ((this[offset + 1] << 16) |
    (this[offset + 2] << 8) |
    this[offset + 3])
};

Buffer$1.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
  offset = offset | 0;
  byteLength = byteLength | 0;
  if (!noAssert) checkOffset(offset, byteLength, this.length);

  var val = this[offset];
  var mul = 1;
  var i = 0;
  while (++i < byteLength && (mul *= 0x100)) {
    val += this[offset + i] * mul;
  }
  mul *= 0x80;

  if (val >= mul) val -= Math.pow(2, 8 * byteLength);

  return val
};

Buffer$1.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
  offset = offset | 0;
  byteLength = byteLength | 0;
  if (!noAssert) checkOffset(offset, byteLength, this.length);

  var i = byteLength;
  var mul = 1;
  var val = this[offset + --i];
  while (i > 0 && (mul *= 0x100)) {
    val += this[offset + --i] * mul;
  }
  mul *= 0x80;

  if (val >= mul) val -= Math.pow(2, 8 * byteLength);

  return val
};

Buffer$1.prototype.readInt8 = function readInt8 (offset, noAssert) {
  if (!noAssert) checkOffset(offset, 1, this.length);
  if (!(this[offset] & 0x80)) return (this[offset])
  return ((0xff - this[offset] + 1) * -1)
};

Buffer$1.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
  if (!noAssert) checkOffset(offset, 2, this.length);
  var val = this[offset] | (this[offset + 1] << 8);
  return (val & 0x8000) ? val | 0xFFFF0000 : val
};

Buffer$1.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
  if (!noAssert) checkOffset(offset, 2, this.length);
  var val = this[offset + 1] | (this[offset] << 8);
  return (val & 0x8000) ? val | 0xFFFF0000 : val
};

Buffer$1.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
  if (!noAssert) checkOffset(offset, 4, this.length);

  return (this[offset]) |
    (this[offset + 1] << 8) |
    (this[offset + 2] << 16) |
    (this[offset + 3] << 24)
};

Buffer$1.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
  if (!noAssert) checkOffset(offset, 4, this.length);

  return (this[offset] << 24) |
    (this[offset + 1] << 16) |
    (this[offset + 2] << 8) |
    (this[offset + 3])
};

Buffer$1.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
  if (!noAssert) checkOffset(offset, 4, this.length);
  return read(this, offset, true, 23, 4)
};

Buffer$1.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
  if (!noAssert) checkOffset(offset, 4, this.length);
  return read(this, offset, false, 23, 4)
};

Buffer$1.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
  if (!noAssert) checkOffset(offset, 8, this.length);
  return read(this, offset, true, 52, 8)
};

Buffer$1.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
  if (!noAssert) checkOffset(offset, 8, this.length);
  return read(this, offset, false, 52, 8)
};

function checkInt (buf, value, offset, ext, max, min) {
  if (!internalIsBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
  if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
  if (offset + ext > buf.length) throw new RangeError('Index out of range')
}

Buffer$1.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
  value = +value;
  offset = offset | 0;
  byteLength = byteLength | 0;
  if (!noAssert) {
    var maxBytes = Math.pow(2, 8 * byteLength) - 1;
    checkInt(this, value, offset, byteLength, maxBytes, 0);
  }

  var mul = 1;
  var i = 0;
  this[offset] = value & 0xFF;
  while (++i < byteLength && (mul *= 0x100)) {
    this[offset + i] = (value / mul) & 0xFF;
  }

  return offset + byteLength
};

Buffer$1.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
  value = +value;
  offset = offset | 0;
  byteLength = byteLength | 0;
  if (!noAssert) {
    var maxBytes = Math.pow(2, 8 * byteLength) - 1;
    checkInt(this, value, offset, byteLength, maxBytes, 0);
  }

  var i = byteLength - 1;
  var mul = 1;
  this[offset + i] = value & 0xFF;
  while (--i >= 0 && (mul *= 0x100)) {
    this[offset + i] = (value / mul) & 0xFF;
  }

  return offset + byteLength
};

Buffer$1.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
  value = +value;
  offset = offset | 0;
  if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0);
  if (!Buffer$1.TYPED_ARRAY_SUPPORT) value = Math.floor(value);
  this[offset] = (value & 0xff);
  return offset + 1
};

function objectWriteUInt16 (buf, value, offset, littleEndian) {
  if (value < 0) value = 0xffff + value + 1;
  for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
    buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
      (littleEndian ? i : 1 - i) * 8;
  }
}

Buffer$1.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
  value = +value;
  offset = offset | 0;
  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);
  if (Buffer$1.TYPED_ARRAY_SUPPORT) {
    this[offset] = (value & 0xff);
    this[offset + 1] = (value >>> 8);
  } else {
    objectWriteUInt16(this, value, offset, true);
  }
  return offset + 2
};

Buffer$1.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
  value = +value;
  offset = offset | 0;
  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);
  if (Buffer$1.TYPED_ARRAY_SUPPORT) {
    this[offset] = (value >>> 8);
    this[offset + 1] = (value & 0xff);
  } else {
    objectWriteUInt16(this, value, offset, false);
  }
  return offset + 2
};

function objectWriteUInt32 (buf, value, offset, littleEndian) {
  if (value < 0) value = 0xffffffff + value + 1;
  for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
    buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff;
  }
}

Buffer$1.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
  value = +value;
  offset = offset | 0;
  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);
  if (Buffer$1.TYPED_ARRAY_SUPPORT) {
    this[offset + 3] = (value >>> 24);
    this[offset + 2] = (value >>> 16);
    this[offset + 1] = (value >>> 8);
    this[offset] = (value & 0xff);
  } else {
    objectWriteUInt32(this, value, offset, true);
  }
  return offset + 4
};

Buffer$1.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
  value = +value;
  offset = offset | 0;
  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);
  if (Buffer$1.TYPED_ARRAY_SUPPORT) {
    this[offset] = (value >>> 24);
    this[offset + 1] = (value >>> 16);
    this[offset + 2] = (value >>> 8);
    this[offset + 3] = (value & 0xff);
  } else {
    objectWriteUInt32(this, value, offset, false);
  }
  return offset + 4
};

Buffer$1.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
  value = +value;
  offset = offset | 0;
  if (!noAssert) {
    var limit = Math.pow(2, 8 * byteLength - 1);

    checkInt(this, value, offset, byteLength, limit - 1, -limit);
  }

  var i = 0;
  var mul = 1;
  var sub = 0;
  this[offset] = value & 0xFF;
  while (++i < byteLength && (mul *= 0x100)) {
    if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
      sub = 1;
    }
    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF;
  }

  return offset + byteLength
};

Buffer$1.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
  value = +value;
  offset = offset | 0;
  if (!noAssert) {
    var limit = Math.pow(2, 8 * byteLength - 1);

    checkInt(this, value, offset, byteLength, limit - 1, -limit);
  }

  var i = byteLength - 1;
  var mul = 1;
  var sub = 0;
  this[offset + i] = value & 0xFF;
  while (--i >= 0 && (mul *= 0x100)) {
    if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
      sub = 1;
    }
    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF;
  }

  return offset + byteLength
};

Buffer$1.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
  value = +value;
  offset = offset | 0;
  if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80);
  if (!Buffer$1.TYPED_ARRAY_SUPPORT) value = Math.floor(value);
  if (value < 0) value = 0xff + value + 1;
  this[offset] = (value & 0xff);
  return offset + 1
};

Buffer$1.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
  value = +value;
  offset = offset | 0;
  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);
  if (Buffer$1.TYPED_ARRAY_SUPPORT) {
    this[offset] = (value & 0xff);
    this[offset + 1] = (value >>> 8);
  } else {
    objectWriteUInt16(this, value, offset, true);
  }
  return offset + 2
};

Buffer$1.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
  value = +value;
  offset = offset | 0;
  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);
  if (Buffer$1.TYPED_ARRAY_SUPPORT) {
    this[offset] = (value >>> 8);
    this[offset + 1] = (value & 0xff);
  } else {
    objectWriteUInt16(this, value, offset, false);
  }
  return offset + 2
};

Buffer$1.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
  value = +value;
  offset = offset | 0;
  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);
  if (Buffer$1.TYPED_ARRAY_SUPPORT) {
    this[offset] = (value & 0xff);
    this[offset + 1] = (value >>> 8);
    this[offset + 2] = (value >>> 16);
    this[offset + 3] = (value >>> 24);
  } else {
    objectWriteUInt32(this, value, offset, true);
  }
  return offset + 4
};

Buffer$1.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
  value = +value;
  offset = offset | 0;
  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);
  if (value < 0) value = 0xffffffff + value + 1;
  if (Buffer$1.TYPED_ARRAY_SUPPORT) {
    this[offset] = (value >>> 24);
    this[offset + 1] = (value >>> 16);
    this[offset + 2] = (value >>> 8);
    this[offset + 3] = (value & 0xff);
  } else {
    objectWriteUInt32(this, value, offset, false);
  }
  return offset + 4
};

function checkIEEE754 (buf, value, offset, ext, max, min) {
  if (offset + ext > buf.length) throw new RangeError('Index out of range')
  if (offset < 0) throw new RangeError('Index out of range')
}

function writeFloat (buf, value, offset, littleEndian, noAssert) {
  if (!noAssert) {
    checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38);
  }
  write(buf, value, offset, littleEndian, 23, 4);
  return offset + 4
}

Buffer$1.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
  return writeFloat(this, value, offset, true, noAssert)
};

Buffer$1.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
  return writeFloat(this, value, offset, false, noAssert)
};

function writeDouble (buf, value, offset, littleEndian, noAssert) {
  if (!noAssert) {
    checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308);
  }
  write(buf, value, offset, littleEndian, 52, 8);
  return offset + 8
}

Buffer$1.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
  return writeDouble(this, value, offset, true, noAssert)
};

Buffer$1.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
  return writeDouble(this, value, offset, false, noAssert)
};

// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
Buffer$1.prototype.copy = function copy (target, targetStart, start, end) {
  if (!start) start = 0;
  if (!end && end !== 0) end = this.length;
  if (targetStart >= target.length) targetStart = target.length;
  if (!targetStart) targetStart = 0;
  if (end > 0 && end < start) end = start;

  // Copy 0 bytes; we're done
  if (end === start) return 0
  if (target.length === 0 || this.length === 0) return 0

  // Fatal error conditions
  if (targetStart < 0) {
    throw new RangeError('targetStart out of bounds')
  }
  if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')
  if (end < 0) throw new RangeError('sourceEnd out of bounds')

  // Are we oob?
  if (end > this.length) end = this.length;
  if (target.length - targetStart < end - start) {
    end = target.length - targetStart + start;
  }

  var len = end - start;
  var i;

  if (this === target && start < targetStart && targetStart < end) {
    // descending copy from end
    for (i = len - 1; i >= 0; --i) {
      target[i + targetStart] = this[i + start];
    }
  } else if (len < 1000 || !Buffer$1.TYPED_ARRAY_SUPPORT) {
    // ascending copy from start
    for (i = 0; i < len; ++i) {
      target[i + targetStart] = this[i + start];
    }
  } else {
    Uint8Array.prototype.set.call(
      target,
      this.subarray(start, start + len),
      targetStart
    );
  }

  return len
};

// Usage:
//    buffer.fill(number[, offset[, end]])
//    buffer.fill(buffer[, offset[, end]])
//    buffer.fill(string[, offset[, end]][, encoding])
Buffer$1.prototype.fill = function fill (val, start, end, encoding) {
  // Handle string cases:
  if (typeof val === 'string') {
    if (typeof start === 'string') {
      encoding = start;
      start = 0;
      end = this.length;
    } else if (typeof end === 'string') {
      encoding = end;
      end = this.length;
    }
    if (val.length === 1) {
      var code = val.charCodeAt(0);
      if (code < 256) {
        val = code;
      }
    }
    if (encoding !== undefined && typeof encoding !== 'string') {
      throw new TypeError('encoding must be a string')
    }
    if (typeof encoding === 'string' && !Buffer$1.isEncoding(encoding)) {
      throw new TypeError('Unknown encoding: ' + encoding)
    }
  } else if (typeof val === 'number') {
    val = val & 255;
  }

  // Invalid ranges are not set to a default, so can range check early.
  if (start < 0 || this.length < start || this.length < end) {
    throw new RangeError('Out of range index')
  }

  if (end <= start) {
    return this
  }

  start = start >>> 0;
  end = end === undefined ? this.length : end >>> 0;

  if (!val) val = 0;

  var i;
  if (typeof val === 'number') {
    for (i = start; i < end; ++i) {
      this[i] = val;
    }
  } else {
    var bytes = internalIsBuffer(val)
      ? val
      : utf8ToBytes(new Buffer$1(val, encoding).toString());
    var len = bytes.length;
    for (i = 0; i < end - start; ++i) {
      this[i + start] = bytes[i % len];
    }
  }

  return this
};

// HELPER FUNCTIONS
// ================

var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g;

function base64clean (str) {
  // Node strips out invalid characters like \n and \t from the string, base64-js does not
  str = stringtrim(str).replace(INVALID_BASE64_RE, '');
  // Node converts strings with length < 2 to ''
  if (str.length < 2) return ''
  // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
  while (str.length % 4 !== 0) {
    str = str + '=';
  }
  return str
}

function stringtrim (str) {
  if (str.trim) return str.trim()
  return str.replace(/^\s+|\s+$/g, '')
}

function toHex (n) {
  if (n < 16) return '0' + n.toString(16)
  return n.toString(16)
}

function utf8ToBytes (string, units) {
  units = units || Infinity;
  var codePoint;
  var length = string.length;
  var leadSurrogate = null;
  var bytes = [];

  for (var i = 0; i < length; ++i) {
    codePoint = string.charCodeAt(i);

    // is surrogate component
    if (codePoint > 0xD7FF && codePoint < 0xE000) {
      // last char was a lead
      if (!leadSurrogate) {
        // no lead yet
        if (codePoint > 0xDBFF) {
          // unexpected trail
          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
          continue
        } else if (i + 1 === length) {
          // unpaired lead
          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
          continue
        }

        // valid lead
        leadSurrogate = codePoint;

        continue
      }

      // 2 leads in a row
      if (codePoint < 0xDC00) {
        if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
        leadSurrogate = codePoint;
        continue
      }

      // valid surrogate pair
      codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;
    } else if (leadSurrogate) {
      // valid bmp char, but last char was a lead
      if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
    }

    leadSurrogate = null;

    // encode utf8
    if (codePoint < 0x80) {
      if ((units -= 1) < 0) break
      bytes.push(codePoint);
    } else if (codePoint < 0x800) {
      if ((units -= 2) < 0) break
      bytes.push(
        codePoint >> 0x6 | 0xC0,
        codePoint & 0x3F | 0x80
      );
    } else if (codePoint < 0x10000) {
      if ((units -= 3) < 0) break
      bytes.push(
        codePoint >> 0xC | 0xE0,
        codePoint >> 0x6 & 0x3F | 0x80,
        codePoint & 0x3F | 0x80
      );
    } else if (codePoint < 0x110000) {
      if ((units -= 4) < 0) break
      bytes.push(
        codePoint >> 0x12 | 0xF0,
        codePoint >> 0xC & 0x3F | 0x80,
        codePoint >> 0x6 & 0x3F | 0x80,
        codePoint & 0x3F | 0x80
      );
    } else {
      throw new Error('Invalid code point')
    }
  }

  return bytes
}

function asciiToBytes (str) {
  var byteArray = [];
  for (var i = 0; i < str.length; ++i) {
    // Node's code seems to be doing this and not & 0x7F..
    byteArray.push(str.charCodeAt(i) & 0xFF);
  }
  return byteArray
}

function utf16leToBytes (str, units) {
  var c, hi, lo;
  var byteArray = [];
  for (var i = 0; i < str.length; ++i) {
    if ((units -= 2) < 0) break

    c = str.charCodeAt(i);
    hi = c >> 8;
    lo = c % 256;
    byteArray.push(lo);
    byteArray.push(hi);
  }

  return byteArray
}


function base64ToBytes (str) {
  return toByteArray(base64clean(str))
}

function blitBuffer (src, dst, offset, length) {
  for (var i = 0; i < length; ++i) {
    if ((i + offset >= dst.length) || (i >= src.length)) break
    dst[i + offset] = src[i];
  }
  return i
}

function isnan (val) {
  return val !== val // eslint-disable-line no-self-compare
}


// the following is from is-buffer, also by Feross Aboukhadijeh and with same lisence
// The _isBuffer check is for Safari 5-7 support, because it's missing
// Object.prototype.constructor. Remove this eventually
function isBuffer(obj) {
  return obj != null && (!!obj._isBuffer || isFastBuffer(obj) || isSlowBuffer(obj))
}

function isFastBuffer (obj) {
  return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)
}

// For Node v0.10 support. Remove this eventually.
function isSlowBuffer (obj) {
  return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isFastBuffer(obj.slice(0, 0))
}

var buffer = /*#__PURE__*/Object.freeze({
  INSPECT_MAX_BYTES: INSPECT_MAX_BYTES,
  kMaxLength: _kMaxLength,
  Buffer: Buffer$1,
  SlowBuffer: SlowBuffer,
  isBuffer: isBuffer
});

/** Polyfill**/

if(!window.global)
  window.global = window;

window.global.Buffer = Buffer$1;
// if(!window.global.Bufferuffer)
//    window.global.Buffer = global.Buffer || require('buffer').Buffer;

class Constant {
}
Constant.aion_logo = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAVEAAAE/CAYAAAD/iPBoAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAACAASURBVHic7d15fFTl9T/wz7l3kmAIkIiAIpkExK1UrWSZgJCZENCqdauCgNpa9VvtYmv7/dbl234rdrFau2hrF21tFRUUXGqpWIWQSQiSFasVrUslmQQUEUjYk8x9zu+PpL8iZckyz33unTnv14v+QeGcY8ic3OV5zgMIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghUgiZLkCIQ7mio7KEmbvZot2knC7bdnY5Tmb3phHxnVEqi5uuTwhAmqjwsHntFV0A0g7xf+8j4EMF3kREH4LpfWL+gC36EA632gF6O3PY8PcepMJuN2sWqUeaqPCsee0VcQD2IELEAbwHwlvEeEsBb5NSbwa61CuPHnvO7gSVKVKcNFHhWfPaKxT0fI86YLxFQBPATczcFM/ZXr+U5nRpyCWSnDRR4Vkam+jB7AbQBOIKi6yKjcOoTp67ir6QJiq8iZnmdaxSBivYyYwqC7wShGWLsme+Z7AW4WHSRFMaWwCZbFSHNJuX2IGOkV66EnyPmP/CzEsX58xcAyI2XZDwBmmiKagsWFugYH0O4IsyOodMemnzGZ57yRLhysBxHcqjb9apFeAlxNZji3LK/ma6GmGWNNEUMW1CY9CKO/MIdC2AE//1+0y4tLql+BmDpR3UbF6SHugY2Wm6jj54kxhLHMKjT2aX/9N0McJ90kST2Fkn1wwL7Em/EoSrAEw56B8iXlzVEprvbmVHdi4vz8juyNhnuo5+YIAqCPxg1ogRf5L1qalDmmgSKs2rG2+xdT0DXwQ45/B/mnd1KWf02rape92prm9mt758VGDY3j2m6xigDxh4xGL8ZlFOeYvpYoReAdMFiMTpedZJXwfTPAb38d+WsoZQ2tkAntNaXD/ts7dSFjJNlzFQxxJwCxPiAL5juhihlzRRn5s0aX36yJ275hLoJgWcOZAYivgyeKyJZlvp5KVX8wPQbTnWb00XIfSzTBcgBoqtcLBu9jE7d79BoEcwwAba66JIfuWQRFWWCGn2UL9/bz71+MiyNtNFCP3kStR32AoH6y8FNfwATCclKOgwqMyZAP6SoHiD1mntICDDdBkDxkT3ma5BuEOaqG8whYMNnwEavgfQp5Dwpd50GTzURNOso6xOeHIfQB9w4xMjyutMVyHc4fdbppQQCTbMDAcbmgD8GcCndORg4KJJk9an64g9EF0U8O/KEaKfmS5BuEeuRD3srNx1YwPUfReDr3IhXfbIXXtmAljuQq4jClidVrfyYR9lfj8+YtvTpssQ7pEm6kEFBY1pQ7eoLxPi3wdomFt5SalL4ZEm2g2b4MPbebbo1zJSL7XI7bzHRPIbIllb1CsE3AvAtQYKACDrEq/c0geoy4/fm51k8+9MFyHcJVeiHlE+vnZM3LF/yYpnm6uCc0bv2FW2HnjRXA094mT78F4eixZnzdxsugjhLj/+tE86pXkN58Ud6xXAZAPtoYguM10DANiU7rvvTWLrF6ZrEO7z40/7pBGaWDt8SJd1D4Avmq5lP1sptvvYKMxOdZ+9bcWIgGXdAyC7Z+6pNQJgG8BwADkAjgNwlMkaD1C9OLs8bLoI4T5pooaUBevLFfBHALmmazkQgWZFY0UrTddxJNdsqRnWldE1Nh5Xoy0bx4Mxgck6CcynADgJPc3WFcR06aKcGZ4bKSj0k2eiLisY25iZFeC7FPir8OwPMXUZAM830T+MmrYTwFu9v/7D7J3Vo9Li3acqUAERFzMoRODxGkpp7s7+yFOzB4R7PPohTk6RcU0T2XKeAXCa6VqO4COK7T7O9C29DrN3Vo+yVbzYUlzChHIARRjkxQQD33oiu/wnialQ+I00UZeU5jWcR4zHjjzf0yNIzahqKak0XYZuV2xdPlxRRhiEWUz0mQFcqe4mpOcuyp6+XUuBwvOkiWrHVjjYcDuA/4N/vt4OA/9dHStOuSEa87atPB02LiamixiYfKQ/z8Bvnsgu/7IbtR1JwdjGzKZNhX4dZO1bfvlQ+1JoYu3wId32I2C+2HQtffQGgZfCUg9Hm6c0my7GtPnbK/JAmMvANeh5UXUgVraa9OSwWW+6XduBzjq5Zlhgb/rLBHo+Giv8X6+e4pqMpIlqMn1c7emWZT0LYILpWo5gEzEWO6wWrm4rec10MV41t2NVCKyuIdB8AFk9v8svLs6e+WmjhfXUQeFg/ZLeSVwAaOmuOF0tV6XukCaqQWle3QxiegbACNO1HBo1MdQvdo+yFzc1yaFqfXXNlpph+9K65jH4y4pw25Mjyl8wXVNpsOF2Ai/Y//eYuM4iujjaXPyBobJShjTRBCvLa7hUMT8GwFOT4ns5AF6wQHdVxorWmC7G95gJRAmf7Nof4WD9BQD+hIPvPtyoyLpwdUvhOpfLSinSRBOoNK/+v4lxDzz3deVdBOtXcJz7oxtL5MiKJFE2vuFk5XAdDn/HsxOkLkqFlRameOzD7ldM4WDjXQDfbLqSA3QBeJgs3C63dcml90VSLYBP9OGPd4J4XlVL6FnddaUiaaKDdO7EdzL2dG9/GIy5pmvZTxcxfteNwJ1rWidvMl2MSDSm0mDDUgIu7cdfijP4uupY6BFtZaUoaaKDMGnS+vRjdu5+GsBnTNfSiwlYaNmB21dtmNxiuhihRzhYfweA7w7gryoAN1TFimXmaQJJEx2ggoLGtKyPeImH1oD+zQJ9VV4YJbey3IaLFPEzGPgYSwbz/1S1huQcqATx3cxGL5iNJXbWR2qhRxpoOwM3jY41F0oDTW5l4xtOVsSPYHCfWwLRTyN59f+TqLpSnVyJ9lMElQEODn0cwBzDpTCY/6i6025d/cHkLYZrEZr180VSXzCDvlQdK3ogQfFSllyJ9sNsLLE5OPSPMN9AP7CIL6hqDV0rDTQVsBXYm74IiWugAEAE/nVpXt38BMZMSdJE+4zpw2D+7wFcabiQx8hKO7WyJfS84TqES8K5DQug5+WlRUwLw8E648fS+JnczvdROLf+eyD8n8ES2pnw1eqW4scN1iBcFsmtu5iJnoHez2onQBdUxYpWaMyRtKSJ9kE4t/4LIPzBWAGEvwYsdXXFhhI5STKF9HFHUqLsVEpNkyE0/SdN9Agi+Q0RVvwiABPnsTOBfiyjzVJPz4ukjDqAT3Ux7UZbxUOr2qZudDGn78kz0cOYHqz9BCt+FmYa6A4mXBaNFd0qDTT12HvTHnW5gQLA8Y4VeLZgbGOmy3l9TZroIUzPazzOAi0HkG0g/T+YnJLqlmI5PTJFEaxfAWg3kLooy1aP9hxTLfpCvlAHEcmvHGIxLwMoz+3cDDyd0ZlRWN0yxfi0dGFOVaxohYI6C8AG15MTPhsONv7I9bw+JU30YFTmvQAXuJ2Wme+vjhXNeWnzGbvdzi28Z3Ws5I2Aw0VMqHI/O99cmld/hft5/UdeLB0gktswl4kXu5yWCfy9aCy0wOW8wgcMTgrb6ThcWLMx9LbLeX1Fmuh+ph1fd5JtUyOAYS6mjTPxDdUtoYdczCl8hykcbLwP4BtdTvz6rrgVkvOaDk1u53udPebVobZNz8LVBsq7mNX50kDFkRFXxQq/DvA9Lif+ZJatZHTeYUgT7dWZ0fVrJHZv8pHsAfGF1a0lL7mYU/gacVUsdDODb3U3LeaX5tVd62pOH5HbeQCRvLrrmMnNn7Z7LeCCylhxhYs5RRLpPc/rJy6m3MvkFMiqkf+U8leiM8avy2MmNwfUdlnEs6WBisGobin+KYMWuJjyKGL7sYKCxjQXc/pCijdRprgTfwDuPQftAnCZTGASiVAdK7qDQHe7mHLysI/ULS7m84WUvp0vDTZcT+DfupTOIebLoq2hP7mUT6QEpnBew6/A+JJLCePEPCXaGmp0KZ/npWwTnTF+XZ7jxP8O965Cv14VK/6FS7lESmErEmxYxMDlrqQjei0zLbv4hXdP7HQln8cFTBdgBlPcaXiA3GqgxD+vaglJA+2Ds8e8OnRPRtcYm3mkBT5aEYYDABOGE1s2gfcwuBOEuOXQNgfWNoesrWmtHR9GURY3Xb8ZpGBVXg01NBfAVO3pmE/f07X9dgD/qz2XD6TklajLt/F/GR1rvngp5jgu5fO8cye+k7Gru2MSQZ1KjElgnAJCPoA8AEcPMGwc4I0AtQB4m0DrAbzudNmvpsoRKpGxjcdwwFkL0EQX0sWVUgUyfzQFm+j0Y9eNstLjb8Od6UyNGZ0ZkVTfC19+fN1Ix7bKAJ7GjBAIZwLIcLGEfwJYS8xrwIGV0baCd13M7apIfuMprPhlgHNcSLe6KlYUBohdyOVZKddEI8G63zLoehdSvU8WJkebiz9wIZfHMJWNayp2LHUxgWYBfCa8tRJkA4NeJOAZiu2qTLbHAOFgwyyAXwBg687FhCtT/cialGqiZePrzlAONUH/N5djAeek2lrQ0rz6qVA8j4guAXC86Xr6aCsx/QlED0djhTWmi0mUcG7D/4L4hy6k2pwWsE5e+V5hhwu5PCmlmmg4t74ShIjuPATcFo0V36U7jxeUjq3PpTRcDcZVAE40Xc+gEN4G80Ndyvn92rap20yXMzhMpcH6Zwl0kfZMwL3VseJv6M7jVSnTRCPBhssYvFR/Jl5eFSu+INmP9IjkN0TY4RtBuAgu3Da6bDcIC9lRP69uK3nHdDEDVX583ci4jSYXhovHienMaGvR65rzeFJKNNFIfuUQVkPfADBec6pWiluTo5sKP9Kcx4jZWGJvyR0/m8G3gnCG6Xpc4ABY7Dj8fb/O1Jw+rqHYsng19J8TtqwqVnyh5hyelBJN1KXnQw4TSqtbil/WnMd1Pc0z/yq2cBsYJ5muxwAHhIVxFfjOmtbJm0wX01+RYP2tDGg/7sNSiFS2FRuYwm9W0jfRmRMaR3THeYPuJR/M+El1a/G3dOYwoSy34SJF+JGBkyc9iHcR0d2dTvyna9um7jVdTd+xFQ42RAFM15ynpioW0pzDe7y07ESL7rj6ugtr5t7q5vh3NedwVSS3rrA0WF+jiP8kDfRfKIsZ30+37NdK8+pmmK6m70g5oKsB3qU5z7SyvLrz9ebwnqS+Eg1NrB0+pMvagIHvgukLRbDCybI8pudlBN0J4DqkwA/ZQWAQHk6zrW/4ZXlPOFh3I0C6tx//vSpW9Klkf7G6v6T+kBzVbX0NehsomPGzZGmgpcG6z8dtehvAF5Hk3xsJQGB8oTuu/hYJNk4zXUxfVMWK7wcjqjnNaZHcxjmac3hK0n5QQhNrhzND89o1fjcZbuMjx9eOCwfrnifQw9D8QycJ5TNUNBKsWwCwxz9PxIrUVwB068zCFm4DOKnvcvfn8X/0gcvopBuhvSHQN/31guE/lebVX8G29TpA55muxcdsBt0eDtYvmxZc7cae9QFbHSt5A+B7tSZhPr0st/5srTk8JCmbaGTU+iwi0nwVSi9VxYqX6c2hT2TU+qxIsP5hYjwGYITpepIDnWcjo2F6sNbNAw/7bVfcXgBwi84ciuhmnfG9JCmbqMrc83kAIzWmiBPjvzXG1yqS2/BJztzdxMDnTdeShE6wYNeUjasPmy7kUHrPkNe9HG9GJL+2RHMOT0jKJkrMN2hO8Wu/bnErzav/LJNam6KL5l3COcrCi6W59e5Mmh+Aqlhoqe6XTKzItxca/ZF0TTScV1sG4JMaU2wLOPw9jfE1YQoH6+8gxlMAZZmuJgVkEOHxSG791aYLORSy1W0ANM4CpUumBRsm6IvvDUnXRMH0Zb3hcWfFxtBWnTkSbdKk9enhYP0jAL6LJF8b7DE2Ex4KBxu+aLqQg4k2l9SCofPgRNsGX6cxvickVRM9K3fdWOgd/fWRtWfoAxrjJ1xoYu3wY3bufh6gq0zXkqIsgH9bGqz7nOlCDsYK0G0AdA6lvibZz6pPqoPqAojfAEDbPxgR7o5umaR561ziTAuuzrG7rBcBFJmu5QjaGFhPoM0gtZUVthJZWxiqk2BlAAAT0izmYQCOZUYQhFwAQQCjjVbeN0Sgh8pyGzoqW4ueM13M/io3FL0Vzq1bCKJrNKUYM/wjvhDA05riG5c0t3YFBY1pWVtUM4CxmlJ8RHuHjvdLE+05tEy9BOBM07V8DGELFFYAqAH4dYe6Xq+JTd8+0HDl42vHdMftkGWhWDGXEDjk4We++wjWLK/tcCvNqxtPTG9D30XViqpYcdKuG02aJtozbYg1Pt/hW6pioR/ri584U8a9fHS6nVYJ5tNN1wIATFwHhWUW8GK0tXidzn3V5058J2Nf97aZrKxL2OILwRilK9eAELYwOFTdEtpgupT9hXPrHwdhvqbwTMo+KVkPCEya23ll8VyN7xk/or1Zv9YWPYEio9ZnKXvXcuMNlLAFoEcVOw+tbil5w620L7x7YieA5wE8PxtL7I+C+RHF+LJnJvAzRhFoWWhi7dS6d0t2mC7nX6wA/1g5NA96LqyILecaJOk59UlxJXr2mFeHdmZ0bgYwVEd8ZvygurX4/3TETqRzJ76Tsadr+3IAJse0rSPQj7YMy/zz+vWTugzW8TEzxq/Lcxzny+h5W2x8PgADT1fHii8zXcf+wnn1L4DxaU3hN1TFik5IxuOVk+Lt/L4h+y6CpgYKwAkEAr/XFDuBmPZ0bfsdzDXQ1wGeUxUrKozGip7yUgMFgFUbJrdUxYpuyejMCDL4VgBGrwIJuLRnNJ2XKJ2Pq8ZPH9fo9RecA5IUTZSY5moLznhu1YbJWvcZJ0Ikr+HbhpYxvUeg2VWxotOrYqGlXr/SeGnzGburY6G7FVmnAHgQepf3HAHdUxasLTCX/+OqWkoqQfSarvg2cVKOyPN9E43kv5INQNubP7b4V7piJ0ppXv1nmeH2Lqo4wPfsilunRWNFT3m9eR5odUvh+1Wx4uuVUgVgvGqojAwFa2Ekv3KIofz/gYDf6YrNhDnJOCLP901UcdelADL0RKc3q1uKK/XEToxpx9edRIw/wN3n238DY2pVLHRz7zAL31rdVvLartFWEYHvQM/pnm77hHKGft9A3oMK2PQogN2awueW5jVM0RTbGN83UWJL4y0C/9bLV1hnj3l1qG3TM3BvlB0T0Q9Hx5oLq1qLG1zKqV1TU2F3NBZaAOLpAFxfekSEb4Tz6jzRXFa+V9gBwhJd8S1G0t3S+7qJFoxtzARY18ix7oDDj2uKnRBd6V33AZjkUrodTLgs2lL0naWYY+KKTbuqltDagMNFTHD72F8bTA9EUOmRJYes75YeSLqz6X3dRLPSOAxNt/IMesnLg0bKchsuYuJrXUnGeNVma3J1S/EzruQzqGJjaOvWrKFnE/CIy6lP42Dml1zOeVBVLaG1AP6hKfz4acfXJdUYRl83UWbW9kLJAj+hK/ZgTT1hzWhl6bta+DiqpH1Dp61qLfynO/nMW79+Ulc0Vnw1EVxeG0zfn37sOk/ssCLwk7pi2zbO0RXbBF83UQLp+sfYtzdd/VlT7EFLiwfudWc7Iy/vUt3n+2VeQKJFW4p/wIT/cTHlCCs9/h0X8x2aZWu7iGBY0kS9IHJ87TiAT9UTnZZ5aUve/spy684B0zwXUi3ZNcq+2O8H8Q1WdUvxTwFXl4/dMCO38QQX8x1UtLnwHwC0nN5A4LJzJ76jaUWN+3zbRFVA21UomLx5Kx/JrxyiiH6jPRHj2dGx5vlNTYVaj9b1i6pY8e0AuTV8Jt0h9sYx3Pre0mfu7Wqfrim263zbRIlJ1/PQfbu7rb9qij0orIZ+A8B4zWkaM7oyrkrWN/ADVRUrvBXQt/Tn4/gKL1yNMpynNIafqTG2q/zbRIFlIF4MYGOCQ9d4cQH51BPWjAZwq+Y0zQFbfealzWfoWmztY8S0d+i10HSLewDbsdQ3XchzWNUtU96EpnWzDJ6qI64Jvm2i0VjxY1UtoflVseJxcQ4cD/Ac9OyFfgODOXyL6KVE1ZhIafG02wEM15iigyzr3IoNJZs15vC16JZJuxyHLwXQoT0Z45ry8bVjtOc5shWa4hYmy7Ehvm2i+1vTOnlTVSy0tCpWfH1VrHgSWRgL4EIC3Q1QE4A+DwFWjvOivkoHZtqExiAYWteEMuErvS8TxGHUbAy9TcxXu5BqSHecjB/yxgRdn4ejhm+Je2Jo+GAl3TCAgznr5JphaXszQgBmKvA06jlzKP0gf/SDqljRWK9t9QwH6x8AoPPEyMeqYsVykF0/aJ4E/y+to2PN400+nw5NrB0+pMv6CBrOLiOiG6MtRfcnOq7bkuJK9EjWvDVtZzRWtDIaK7q1OlY8LaMz42iCNb13ruRKAPt6/iS95LUGOmPcy8cDuFpjig370tVXNMZPSqo7cBMA3Tvacj8M5p+nOcdh9S71q9USnLlES1yXeWSvrrt6X5zU9P66O5JfOYSdzCLFSv+zrn6KW4Gv0sGvmhOBmXG1V9fEetnqDyZvKQ3WfZNAmreH8ucALNOb4wgVAGsISPiSJAaSoommxO28X/UeexKDpuMsCHgyGivWN9A66TGVBhtWEFCuMcm+tIB17Mr3Co39gNd4CCSnBawck/9tiZASt/N+1ZnROR/6zgPaa9mBWzTFThHExLhNc5Ih3d3qs5pzHFZnetdaTaHJ6cIpmmK7Rpqoh+mc0kTgH/vh2BOvq2otbmDQ81qTEIw20Zf/edaHAN7TEVuR+oSOuG6SJupRZcH6ScQU0hR+a3rnkHs0xU45NpzbMZi1yUc2Y8q4l4/SGP/IWNPLJdI1/8I90kQ9inUeOsf4texKSpzKWEkT9L78yRxi2yaPwQZbWKcptFtDxbWRJupRDNZ1Jvm+7vRu36/N8xomvk9nfKVvVkSfEOgNTZHldl4kXu8xuloGUDDo4d5nXCKBeg801Dm42ujUI9uyNTVR5PUc8+Nf0kQ9SMHSdg6NDZarUC2IQVqPFDl95oRGtw4k/A+rNpwZA7BTQ2gansG5GuK6RpqoN31aS1Si1ypjxeu1xBbgbjyMfsxp6Cfb6XYMLk4nhq5zlxwepyWuS6SJekxkbOMxAAq1BFfQdm6OAKo3FbcCpO2kUCY6U1fsvqE3dUR1IE1UJBAHnDJo+nexQdJENWMobVPAmHCGrth9ys8c0xMY0kRF4jBI17Dadal0YqcpTLau+ZsAk9EmaoETPQAdAEAWHa8jrlukiXoMAVqaKDNW6YgrPm51S8HfQNiiJzpPmI0ltp7YfUBo0xKXIU1UJMakSevTAXxKT3RarSeu+DhSACo0Bc/YOn6iuVtfi/Q0UeA4TXFdIU3UQ47u2HkK9Iy9U93cXaMhrjgIApp0xY6rbnMH2HVZupqozmNvtJMm6iFkW6dpCr1+bdvUbZpiiwMwSNsyMotprK7YRxLdVLAVgI4p+9JERWIQWM8WOMbftcQVB+XY+pooM43SFfvIiAHsSnxcHpb4mO6RJuopNEFLVOJ3dMQVB1fzXkErAD2nBRAbbKIAtPx30VCjL8wGSZqolzCCesJasrTJVcTQtY+eYGzrZy8dPxxoS/6Jvr0alSbqLXqaKLE0UZcxoOcZtOIhWuL2nZYr7Ljl+Pa5aEoeVOdho7VE7UarlrjikAi8XcsRZhaMDmcmwnJmagOxA+5pqATsBaj3xFxuV2AmtrpA6JlZy2onCHEmciymHQCgiPfYrDoBoBv29r05eN/If1ACSBP1iMio9VmM3VpO9VSBTg0vA8Th0XYtYTnx57/3R7Sl+AdaAuvZUOoKuZ33CCurc6Su2MPSj92jK7Y4FE1NlCiuJa4YMGmiHtHtdA3VFDr+wrsndmqKLdzG3G26BPFx0kS9Qml7tLJXU1xxGATO0BKXrS4dccXASRP1iICl7VmX6be5KUrXW3Ru1xNXDJQ00eSX5vczbPyJ9DRRC9JEPUaaqGdY+3RFzkwzvkA75TBDy+JxVprWn4oBkybqEaxsbS9/bPO7XFIPYbyOsBZIy2BkMXDSRD3CsXm3rtgUV2N0xRaHQvk6ojqWn1dUJqeUbqKzP6zMmrdrpScazLaso7YCYB2xlUUn64grDq7naGPO0RE7La6kiXpM0uxYmt++Ooed7rEgJwewcogoB1A5AOX0fENTjgJyAOQQ4TgAxwMqA3F6DTB7ABgArF8/qSscrO8AkJ3o2Aw+NdExxaF1OTxBw4ZPANhasTG0VU9oMVC+aaIRrgwc1+HcR7BGMjAS4JEEjGTgaABZjC7ABv51cc1g/HvvMu33v//BE1eivTZDQxMFIE3URRZUAevYNw9om1MqBs43t/NRKosD9HkGXw7wTABncs/Uo6xBhh4V4UqP/DChFi1RAT3DnsVBaTuxlaSJepFvmmivDzTEtEbtxjEa4vYbA+9pCp07Y/y6PE2xxYEYU/TEpb9piSsGxV9NlLFZR1g7DnMnKO7H0jj3M666Z+qKLf6t/Pi6kQC0vMhjRWt1xBWD46smyqTlShSAY+4Exf3oPOCMQNJEXeBY1ixoGSSKHWPa3ntDQ1wxSL5qohaTlsGtBEvL2Ub9FVf2qxrDlwPsq39vP1LEl+mIy8DapZij46RNMUi++lAp4mY9kdkTTXRN6+RNAD7UEpwxqjSvoURLbAEAOHvMq0MJOFdLcMIKLXHFoPmqiYK1Hf7lpcXo9boCE+NqXbEFsC+j83wAWoa9sKOkiXqUr5oog/S8vWacBmZN66P7i1drDH65THTSh4ArNYXeuLot9HdNscUg+aqJqm7S9fY6+4pt0eM1xe4XJqrRGH74sID6rMb4Kat0XO2JAM7XFP7p3mOYhQf5qokuHV22C3rWiiIeUKfpiNtfu4+xGqDpWFoAUITrdMVOaURfg6bPEzOe1hFXJIavmmgPel1HVJv5TB1x+6upqbCboe8lAjHCkWDjkH53VQAAGphJREFUNF3xU1Ek/5VsIm3PmzdVtxbpvDvpk8jYRk9sSPEij2x37Afi18FI+JpHJgolOuZAWYy/MOFSXfEZ6g4A5bripxrldH2FiAa7/figGFgIkNIRux9VEAca3gwH6wMMrLdANQxeE7BVfcWGEi0bYPzEd02UmF/XMtyB4ZnlP0534HkrPR6Hvn+fGWXj6sOVbcVVmuKnjPLxtWPiDt2sK75t08O6YvdVJL/pZFY9W6MJOIvBZwFA3LEQDta/D6CJwE0MaupS8TVr26am1PR93zVREP1dz9RNjL6q/cXxj2afs0FL9H5Y/cHkLaXB+goCztGVw7FxB4CIrvipwnHoDgDDNYVfXbmh6C1NsfuMHTXlMNctxwH4DIM+AwDpVqC3sfZcrVqwmjpVV9PatqlJe+qs75rozt17Xs/KzNRyldZNgWkAjDfRHrwYIG1NlBjh0mD9nOpY8RJdOZLd9GDtJxh0ra74TLhXV+z+INBZ3L8rl+MAnk3AbIZCuhXoDgfr/07gBkVoYIcb7La9b0RRFtdVs5t892Jp2dgL9gCs5eUSMcp0xB2IznR+FsAenTkI+MWUcS8frTNH8mLLYutX0Hch0jympfk5TbH7hYkH+8M8DcBkBl1PTL+3LOtVDg7tKM2r/+9E1Gea75ooABCoVk9c77xsqXu3ZAeYn9CcZkw62fdozpGUwrn1N4H0PQ4h0H1e2CtfOq7xNEDLlLNMaFqu6DZfNlEw6vSERfDKjsqJOmIPBAG/0Z+EvlCaVzdDe54kEslt+CSIfqgxxeadcXpQY/w+I5s/rS86v6wvtnt82USdgNLSRAFAQWn8pumfaGuoEUCD5jRETI+Uj6/10jEpnjVp0vp0Jn4UwBBdOYjwk6ZNhVof5fQZa2uiH1a3hDzy/mFwfNlET81a8xaAj7QEZ1ygJe4AMfATF9KMizvW0oKCxjQXcvnaMTt2/QbApzSm+CB9X4b+O5A+iIxanwXgLC3BGWu0xDXAl010AS1QAGtZ48hA5Iqty3UtWem3MbHmpwG840Kq6Vlb+Kcu5PGtcLD+NhBdozMHE3/npc1n7NaZo6/UkD0zAGToiM0WVeiIa4IvmygAgKxVmiKnO3b62Zpi99tSzHGI+MfuZOMbS/MatDYJvwoH62YD+IHWJESvjWlpeVhrjn4gYl0DVWCRNFHjlOVU6optwdIynXygdh5jPwLwu27kIuYHS3PrL3cjl1+UjasPA/QI9H5eGHBu8sIbeaDn2S+gbevxpmhz4T80xXadb5vok8NmvQnCJj3R+YLZH1Zq2Qs9EE1Nhd3M9B2X0tlEeDyS2zDXpXyeFslviCiL/wLgKJ15CFhY1VKi7cKgv47Ztet8ACN1xCaNA3ZM8G0TBQAw/1VLWCDTzuALdcQeqOrWoiUANbmUzmbihWW5DRe5lM+TwsH6C1jxXwE9w0X2s9XpCnxLc47+UXSVrtAMfl5XbBN83kSxTFtsxfO0xR4QYgLdBGiaHPCf0hTxU+Hc+i+5lM9Twrl18wA8DU0vVj6G+cbVH0zeoj1PH00Lrs4B4TxN4bvJSpcrUa/YtXfvS6RpayQRPj13y0tjdcQeqGissIaAhS6mDIDw63Cw/oFUWf40G0vsSLDhLhA9jp7tilox8HRVa2ix7jz9YWHIHOj74VEVbT6zXVNsI3zdRJeNvWAPA1FN4QOUZn9OU+wBs211CwC3vwm/mLVFPT8tuDrH5byumnrCmtEfBsevYPAt0HN2/IHaFDr/y4U8/cTabuUBjXePhvi6ifbgP2uLDFzrnQPselRsKNnMRCYGN8yykfFaWW6dtslSJkXyGyJp3WlNALs1hCZOsObVxKZvdylfn0TyG08hYKqm8GzbAU8MVUkk3zfRuJ3+DAAtI7UImDi3o9Jz+8qrW4r+AMazBlKPU0R/DQfrFp51cs0wA/kTLpL/SnY4WH8fK66AnkEbB0WE26KxQuPHfhyIlfoGNF2FM/Dyqg2TW3TENsn3TXTpsNItAGtbuEvEX9MVezDiCHwVgKEJ4nRVYG/6a5HcuovN5E+McLBuNqvuNwFoO2TuoBjPRFuKPLc7rHcsoq5jn0HgJ3XFNsn3TRQAiEnfyDjGZy5vrzhBW/wBWtM6eROAq+He2/oD5TPRs+Fg/ZqyYIOe/dWalI2rD4dz6ysBWgLgWHezU9Mux7rKi0cgp1uBr6JnRJ0OKs5pSXlqaXI0UdX5DIB9msJbFuGrmmIPSlWseBkxfma4jKkKXBPOa3g2nFtfZLiWwyrNrS8NBxtWKQtRnbNAD6MtzvaFnpnQtJ9zJ76TAUDncrZVvT/4k46nXpoMxrz2iqUAdG3X3Bmn7vylIz7tuQO4Cgoa07K2OKsA8sQxyExcZzHdf1R6ztIX3j2x03Q9Z495dWhXeudsRbiOdE0k6pttxBSOthZpOZVhsErzGq4h5od0xWfiK6pbQot0xTcpKa5EAQCk7xsAwLA0lebJZ6NNTYXd3WnxSwE0m64FAIgpxMCje7q2x0qD9T8vza0vnY0ltrtVsFWaVz81HKz/XWdG5/tM+KPZBsq7yFLne7WBAkzEfJPGBB3djmPiRagrkuZKdAEvsN7qmP4egDxNKToy2Mp/OKfMkwuFS8c1nkaWWgPAe2/NCVtI0Z/ZUs8r2LWrWwrfT3SKs3LXjU1D/GwGZsHCLDBGJTrHAO0l0IXRWNFK04UcSs+EKtJ2YCGDflsdK0ranW9J00QBYG5Hxe3EWKArPoG/vSh75p264g9WaW7t2UTWMgDppms5glYG6glcT4y3ibjVstFWsaFk85H+4pRxLx89xAocp8CfANNpAD4J4tMA8syxLvvZzcQXVreEdI1tHLQIKgMcHPo6gJN15SDmot5TGpJSUjXR2dtWBAOW9R4AXbeP7YT0CYuyvbVAen+9VxWLoe9roNM+9BxepkCIg2lnz2/zUBBGgjESvnkExbuY6fzq1uJq05UcTjjY8EWAH9CWgFFb1Vo8RVt8D/DJN2TfLD16VgyAth1MALIZ3bdqjD9oVbHQUiK+AYAyXcsADAGQD2ACGCcBXNDzC6f03p775ft1MzHKvN5AI/mVQwDWOmKRLf6lzvhe4Jdvyr5juk9zgq/N3fpirt4cgxNtCf2eia+Cpp1c4rDeY6Wm++H2VanMrwPQ+b384dC0o5Nybej+kq6JLs6ZUQXgFY0phiAQ+J7G+AlR3RJaRMAXII3UNUyoUl2Bkuq2EjfOxBqUSP4r2QS6WWcOAv/GC8vcdEu6JgoAYNZ6NUqMz1/RUVmiM0ciRGPFjwF0HoAdpmtJAQ/uPsaa5aW5oIfD3PVdAEdrTLEHcft+jfE9IymbaHt21xMANmpMQYrVfQt4gee/flWxohXEXI6eFzYi8XYT4wtVseLrm5oKu00X0xdl4+vOANONOnMQ8LvopkI9x5p7jOebwEC8QOd1grWf1178dse0L2jOkRDR1lCjreKFTFxnupYk8wYra0q0tfhh04X01WwssZVjPQQgoDFNt2UHfq4xvqckZRMFgF179zwI4EOdORj0U69Nvz+UVW1TN1q0JwLmP5iuJQkwM9/fpeKF1W2FfzddTH9sCY6/sXfFg0a0OBlH3h1K0jbRZWMv2APQvZrTjLDSAqYHgPRZtLlsX1Vr6FqA58D96fjJYgMTz6xuDd24tm3qXtPF9Me0CY1Bhvq+5jSO46gfas7hKUnbRAHAcvb9CsBWnTkYfPkVO1Z+RmeORKuKhZY6oAIwak3X4iNxBu7N6Mw4zcs7kA7HjqtfunBy6R9rNobe1pzDU5Jqx9LBzG2v+B8C7tGc5sOAHT/t0WHnaH18kHhshYON1wHqpy58uPysAYyvVLUWN5guZKBK8+rmE9PjmtN0keWcHG2e0qw5j6ck9ZUoAAwZYd0PUKvmNKPjTkDf1jltSFXFih5kwukALzddjfdwCwFXVcWKQn5uoDNyG08gpt/ozsPMD6ZaAwVSoIk+TGX7COoOF1JdPLejQucpidpUt4Q2VMVC5xNoFgBfvSjRZCuDbyVrzym9a209N4W+ryKoDDikHgUwXHOqnWkB/oHmHJ6U9E0UALpHbHsYwJu68xDj/is7Kr04TahPorGilbtGWQUMugGA7qt3L9oM8C3xo7rGV8dCd0eby3SdluAaDmbeCUD7ABAC7uzLFK5klPTPRP9lfvvKmQxa4UKq1+I7jypZmuuvN7cHOnfiOxm7u9uvI8U3gxA0XY9e/C6RdV+n0/2Q3964H07vaMQXoP9iqW1X3DrZi8eeuCFlmigAzOuoeA6MC3XnIeC3i7LLk2QILVvhYMP5AG6FvvPITVAAVgH84OhYyzNLMccxXVAilY+vHRN3rFcBjNGdixlzq1uLk/Ikz75IqSZ6eXvFCRawHkCG7lzE9PlFOTMW6s7jprJg/SQGXcXg6wCMNF3PwHALwXoiDjxYEyt6z3Q1OkyatD79mJ27VwAo1Z2LgYrqWPFM3Xm8LKWaKADMbV/1QwL/rwup9jFR5IkRM5Juq2XB2MbMoba6gIgv6x1wouuY3UR5i0B/IkXPVrYVJt2/x4HCwfoHAHzRhVRdTM6nqlumaH/f4GUp10Qv2LQsMysz8zUAbpwl/4HlWEWPjyxrcyGXEQVjGzOH2zxLWXwOGOcAmGC6JoB3ARQlUIWi+Iup9CEvDdbdQqC7XEr3o6pYsRsXJJ6Wck0UAOa1r5wF0Etu5GKgIW1fvOzRY8/Z7UY+00rz6sYDNBWKS4goBGAS9F6pOiD8kxgNDK6zlF3PbTuboihLuTmqZXl15yum5+DG0TCEt7uc+KeS6UXcQKVkEwWAeR0rHwHT51xKt/z9EdZFUUq9DzbAVmTcugmg+CcZ1ngQ5wMYD8YoEEYCGAUg+zABOgBsA7CdQe8DaCVGK6A2kE1vHhXIeTMVBv8eSWlew5nEvBrAUBfSKfbB8SduSd0muqPyGCj1BuDW0br0wOLsGTe4k8ufZk5oHLEvvtcKWFkcbT5TBqT00bQJjUE7rl4GcLwrCQm/rmop/ooruXwgZZsoAMzfvuqzTOzaGTDEuGNRTvkCt/KJ5HdW7rqxAequcvHI6Ob4UV2nr3lr2k6X8nleSuxYOpRFOTOeAdEjbuVjwu3z2ytucSufSG7Tj103KkDxFS42UEUWfUEa6MeldBMFACu+72sAmt3Kx8Bd87av/KZb+URyiuS/km2lx18E8Am3chLRj6LNRVG38vlFyjfRx0eetwNMV8PNc9qJfjK/vSJJdjQJt82c0DiCVfcKAGe6mHbdlqxMz59ya0LKN1Gg95hlJjcn0BADv5q7fdU3XMwpkkAk/5XsLsd5EUChi2l3sFJz16+f1OViTt+QJtornv3R9wC4ObGciPhn89pX3eZiTuFj0/Maj2PVXUlMITfzMvGXqttK3nEzp5+k9Nv5A12188XRcRV4BQxXD58j5l+clF3zjQW0wL1HCsJXSvPWnkrK/qv7E7Xol1Wxoq+5m9Nf5Ep0P48OO+dDUnwlAFcXxTPR197qmP74ubxc+2AU4T9lwYaziO0aAyMJ6zPTs7/lck7fkSZ6gEU5MyvBMPGNMze7I+OF2R1/PdpAbuFRZbkNFynwCgBuf198QI66VHaDHZk00YNYnFN+L4DfGUhdFuC0+it2rnRt2YrwrtJg/ddVz2aQo1xO3UmWuiS6sSRpB+ckkjTRQ2gf0XkjgLUGUp+gHHp5XsfKTxvILTzg7DGvDg3n1S0i4F64MUzkAMS4IdpcIsdp95G8WDqM2bsqjw3EVS2APAPpHSK646Th1T+UF06po3Rc7YlkWU8DOM1IAcR3VrWEvm0kt09JEz2Cy3euONVyrBq4/0zqX1YhwPMXZ81MyUPAUkk4WH8BgIU4/FQrbQh4Mhormufn001NkNv5I3hy2Kw3iXEJAFMnP86gONXP316h/agHYUYElYFIsOEuAM/BUANlQtVR6Tmflwbaf3Il2kfz2lfNAXgxzP3gcQDcEx+x9falNEd2jiSJSG7DJ5nwMMAFxopgvOpQZ1lNbPp2YzX4mDTRfpjbXnEDAb+Gwa8bAevYoc8tHjljvakaxOBFUBlQwcz/JtAdcOHgxEPjd8mi6dHm4g/M1eBv0kT7af72lV9nonsNl9HNwM86RnTe/gKdJ+v4fGZ6sPYTFqw/Aig2XEobWc70aPOUZsN1+Jo00QGY17Hyu2C6w3QdAP5OhOsWjSivN12IOLIIKgOcl/UNMH8PwBDD5bzvOByp2Rh623AdvidNdIDmta+8EyAvDA9RAB6K22nfXjqsdIvpYsTBlebVzSCme2Fq6dLHbVZQM1bHSt4wXUgykCY6CPO3Vyxgwu2m6+i1nQjf3TTc+m1qHojnTZFxTRPZUncCPNt0Lb2kgSaYNNFBmte+6lsA/9h0Hft5i4D/WzRixlMgWa5iSmhi7fAhXfa3Ab4JQLrpenq1Og7PlFv4xJImmgC9L5t+Dm99PdcS49ZFOeVyrK2Lpox7+agMO+1aZv4OgDGm69nPP5yAdU7Ne4Ux04UkGy996H1tXsfKK8H0ELxz1QEAYMYaYty9+OjyZaZrSWZnj3l16L6MzusI+BbcOrq4z6hJddnnrv5gsjwz10CaaAJd3l5xtgU8BWCY6VoOxIw1ts13nTisZrnsxU+cSP4r2eDurzLjJgAjTddzECv2pavL6t4t2WG6kGQlTTTBrti24jRlWS/Ac1cj/98/ifmXdqfz+0ePPWe36WL8asb4dXmOE78ewJcBjDBdz0Ex/2HXaPuGpqbCbtOlJDNpohrM3V6ZT6SeA3C66VoOYxsICy2Lf/f4sJnyprZP2IoEG2cw8EWALwEQMF3RITCBvxeNhRaYLiQVSBPVZPaHlVmBdPUogItN13IkzFhjAb8n1fnM4yPPk9u+A8wYvy7PicevBeEaePcO4192M3BNdax4ielCUoU0UZ2YaX77qtuZ8F3442u9jxkrLdDSnXt3P7Vs7AV7TBdkSiS//lil6CICXwqgHP6YeLbBsvmSyg2hV00Xkkr88MH2vfnbV13ExA/D0JizgSBgj2KssoiWcUA9lwrzTKcFGyZYxJeAcQkBU+CPxgkAYKAizeHLKzaGtpquJdVIE3XJ/I6XTmS2lwI4w3QtAxAHsIYJK21YKzcOR2My7Io6e8yrQzszuqYycykRPgPgU6ZrGgDFjDvHtDYvWIo5juliUpE0URfNbn35qMCwPfcDdI3pWgapA4RqBuoJ3JhGaFg4fKbnr4DOOrlmWNrejBCgpjHoLADTYXQM3aB9RApXRduK/2q6kFQmTdSA+R0r5zLTb+Cj2/s+eI9ADcyqQRH93Qa/u2mEHfPKFWs4r+4SMD0FH92iHx5V2qr7qlVtUzeariTVSRM1ZO7WF3PJDjwCoMx0LRp1A2gm4F1mvEuE1Yuyy5eaKKR3hmcyDLLuZPDt1bHiewCSTRMekCQ/lf3niZHntJ48YvVMgG6GufObdEsDcCID54JwI4MvN1XI6ljoHwB2msqfIOvJQkl1LHS3NFDvkCZq0AJaoBZnz7jHJus0AJWm69GOqM1gcgXgFXP5B6WbQHdnpucURJuL/2a6GPFx0kQ94LERZe8uHjGjnEDXw/9XS4fGZPb5HVGj0fwD8woThaKxoltfePdEOQrGg6SJegURL8qe8WBcqU8C+JPpcnRggtEmylBNJvP3UwcDN42ONRdVtxT59Qo6JXh172/KWnr0rBiAS+a1V8wA4RdgTDJdU6JYig3ezgMqjkbbNllBnzBAT5HjfLNqY4nRr5foG7kS9ajF2eWr4sO3Tgb4FiTJLb5lWZtM5q/ZWPwOgA6TNRzBOoJVWhUrmhOVBuob0kQ9bCnN6VqcPfPHaRaPZ+BuAL5+Jta5I8PwmkZiAF68pW8D6PrRsebiaKywxnQxon9knaiPzN62Imhb9G0CXQf//QDcuji7/BjTRYSDdT8G6Fum6+jVTsDdnSp+39q2qXtNFyMGxm8fxJS29OhZsSeyZ17PrAoBPAvATwfReWJnDcMLb+h5F4HudtA5IRorvksaqL/JiyUfeiJn1isAPnv5tspP2qRuZsJ8AF5/ZeKJZ3wK1Gib+9nTzoz7FXX9rCY2fbupIkRiye18Erh854pTLcf6JoArAQwxXc8h/H5xdvl/mS4CYAoHG7bA3fOQNhP4t7DS7402n9nuYl7hArmdTwJPDpv15uLs8v+K22lBAm6FR26d98fkjSvR3pdL61xK9goxvvDRsKHBaCy0QBpocpLb+SSydFjpFgB3n8vL781pH3I5W/gvME8zXRcAgGF0edMBGgHM0hS7C6DnCHgwGitaqSmH8BBpoknoBTqvE8BCAAuv3LHq5LjiLxBwDYBRpmoi4lZTuQ9kETUpTvhz0X8A/MeAzY9UbChJ+lMAxL/JM9EUcS4vz8hpH3I+k5oP0Plw+9mp4jMWHz3zNVdzHkLvccfNCQjVDuApJvyxuqX45QTEEz4kTTQFXbF1+XBlpV8CwjyAygCk686ZZvExXpp+Hw7WbwYwegB/dQ+AVQAvzEw/+s8yFERIE01xF2xalpk1JLOcCLO555yhHA1p9i7OLs/UEHfAwrn1y0E4t49/fBOAvwD4C1m7V0Sby5J1/qsYAHkmmuJ6j0VeBmBZhCsDY9ud6UxUzuByAhUhMetPvfRSCQDAQBPhkE20C0AtCCstVssrY6F1vW/1hfgP0kTF/9d7HlJl76/vzN62YkQa2RG2OMIKRRbhTAYGckXpkeVN/2aDGtW/F93vBbiJYK1R7Kza7QRqmjYV7jFZn/APaaLikJYePasDwHO9vzCbl9iBbcecQhYKAFWgQAVEKMSRTsxkkxPtDy7ebb9M6fGbWNHaPWPolaamwm7TNQl/kmeiYlCu5sohe3c4p1mgiQSayMAJUHwiCCcAGNPzp/iexdkzbzZaqBCaSBMV2lyzpWbYnsDeiUzWjiezy/9puh4hhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgjhD/8PqFPEuJ04oDMAAAAASUVORK5CYII=";
Constant.explorer_base_url = "https://mainnet.aion.network/#/";

class Transaction {
    constructor() {
        this.value = 0;
        this.timestamp = 0;
        this.type = 0;
    }
}

class TxnResponse {
    constructor() {
        this.status = '';
        this.msgHash = '';
        this.txHash = '';
        this.txResult = '';
        this.txDeploy = '';
        this.error = '';
    }
}

var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};

function commonjsRequire () {
	throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs');
}

function unwrapExports (x) {
	return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
}

function createCommonjsModule(fn, module) {
	return module = { exports: {} }, fn(module, module.exports), module.exports;
}

assert.notEqual = notEqual;
assert.notOk = notOk;
assert.equal = equal;
assert.ok = assert;

var nanoassert = assert;

function equal (a, b, m) {
  assert(a == b, m); // eslint-disable-line eqeqeq
}

function notEqual (a, b, m) {
  assert(a != b, m); // eslint-disable-line eqeqeq
}

function notOk (t, m) {
  assert(!t, m);
}

function assert (t, m) {
  if (!t) throw new Error(m || 'AssertionError')
}

var blake2b = loadWebAssembly;

loadWebAssembly.supported = typeof WebAssembly !== 'undefined';

function loadWebAssembly (opts) {
  if (!loadWebAssembly.supported) return null

  var imp = opts && opts.imports;
  var wasm = toUint8Array('AGFzbQEAAAABEANgAn9/AGADf39/AGABfwADBQQAAQICBQUBAQroBwdNBQZtZW1vcnkCAAxibGFrZTJiX2luaXQAAA5ibGFrZTJiX3VwZGF0ZQABDWJsYWtlMmJfZmluYWwAAhBibGFrZTJiX2NvbXByZXNzAAMK00AElgMAIABCADcDACAAQQhqQgA3AwAgAEEQakIANwMAIABBGGpCADcDACAAQSBqQgA3AwAgAEEoakIANwMAIABBMGpCADcDACAAQThqQgA3AwAgAEHAAGpCADcDACAAQcgAakIANwMAIABB0ABqQgA3AwAgAEHYAGpCADcDACAAQeAAakIANwMAIABB6ABqQgA3AwAgAEHwAGpCADcDACAAQfgAakIANwMAIABBgAFqQoiS853/zPmE6gBBACkDAIU3AwAgAEGIAWpCu86qptjQ67O7f0EIKQMAhTcDACAAQZABakKr8NP0r+68tzxBECkDAIU3AwAgAEGYAWpC8e30+KWn/aelf0EYKQMAhTcDACAAQaABakLRhZrv+s+Uh9EAQSApAwCFNwMAIABBqAFqQp/Y+dnCkdqCm39BKCkDAIU3AwAgAEGwAWpC6/qG2r+19sEfQTApAwCFNwMAIABBuAFqQvnC+JuRo7Pw2wBBOCkDAIU3AwAgAEHAAWpCADcDACAAQcgBakIANwMAIABB0AFqQgA3AwALbQEDfyAAQcABaiEDIABByAFqIQQgBCkDAKchBQJAA0AgASACRg0BIAVBgAFGBEAgAyADKQMAIAWtfDcDAEEAIQUgABADCyAAIAVqIAEtAAA6AAAgBUEBaiEFIAFBAWohAQwACwsgBCAFrTcDAAtkAQN/IABBwAFqIQEgAEHIAWohAiABIAEpAwAgAikDAHw3AwAgAEHQAWpCfzcDACACKQMApyEDAkADQCADQYABRg0BIAAgA2pBADoAACADQQFqIQMMAAsLIAIgA603AwAgABADC+U7AiB+CX8gAEGAAWohISAAQYgBaiEiIABBkAFqISMgAEGYAWohJCAAQaABaiElIABBqAFqISYgAEGwAWohJyAAQbgBaiEoICEpAwAhASAiKQMAIQIgIykDACEDICQpAwAhBCAlKQMAIQUgJikDACEGICcpAwAhByAoKQMAIQhCiJLznf/M+YTqACEJQrvOqqbY0Ouzu38hCkKr8NP0r+68tzwhC0Lx7fT4paf9p6V/IQxC0YWa7/rPlIfRACENQp/Y+dnCkdqCm38hDkLr+obav7X2wR8hD0L5wvibkaOz8NsAIRAgACkDACERIABBCGopAwAhEiAAQRBqKQMAIRMgAEEYaikDACEUIABBIGopAwAhFSAAQShqKQMAIRYgAEEwaikDACEXIABBOGopAwAhGCAAQcAAaikDACEZIABByABqKQMAIRogAEHQAGopAwAhGyAAQdgAaikDACEcIABB4ABqKQMAIR0gAEHoAGopAwAhHiAAQfAAaikDACEfIABB+ABqKQMAISAgDSAAQcABaikDAIUhDSAPIABB0AFqKQMAhSEPIAEgBSARfHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgEnx8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBN8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAUfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgFXx8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIBZ8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAXfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggGHx8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIBl8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiAafHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgG3x8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIBx8fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAdfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggHnx8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIB98fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAgfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgH3x8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIBt8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAVfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgGXx8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBp8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByAgfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggHnx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIBd8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiASfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgHXx8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIBF8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByATfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggHHx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIBh8fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSAWfHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgFHx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIBx8fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSAZfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgHXx8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBF8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAWfHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgE3x8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIICB8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAefHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgG3x8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIB98fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAUfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgF3x8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBh8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCASfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgGnx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBV8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSAYfHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgGnx8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBR8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiASfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgHnx8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIB18fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAcfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggH3x8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIBN8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiAXfHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgFnx8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIBt8fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAVfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggEXx8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFICB8fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAZfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgGnx8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIBF8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAWfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgGHx8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBN8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByAVfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggG3x8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIICB8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiAffHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgEnx8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIBx8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByAdfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggF3x8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIBl8fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSAUfHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgHnx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIBN8fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSAdfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgF3x8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBt8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByARfHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgHHx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBl8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAUfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgFXx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIB58fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAYfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgFnx8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIICB8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCAffHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgEnx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBp8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSAdfHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgFnx8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBJ8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAgfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgH3x8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIB58fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAVfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggG3x8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIBF8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiAYfHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgF3x8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIBR8fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAafHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggE3x8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIBl8fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAcfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgHnx8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIBx8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAYfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgH3x8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIB18fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByASfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggFHx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIBp8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiAWfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgEXx8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHICB8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByAVfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggGXx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIBd8fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSATfHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgG3x8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIBd8fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSAgfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgH3x8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBp8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAcfHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgFHx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBF8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAZfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgHXx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIBN8fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAefHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgGHx8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBJ8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCAVfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgG3x8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBZ8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSAbfHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgE3x8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBl8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAVfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgGHx8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIBd8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCASfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggFnx8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGICB8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiAcfHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgGnx8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIB98fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAUfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggHXx8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIB58fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSARfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgEXx8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIBJ8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiATfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgFHx8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBV8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByAWfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggF3x8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIBh8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiAZfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgGnx8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIBt8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByAcfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggHXx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIB58fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSAffHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgIHx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIB98fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSAbfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgFXx8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBl8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAafHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgIHx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIB58fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAXfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgEnx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIB18fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByARfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgE3x8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBx8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCAYfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgFnx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBR8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFICEgISkDACABIAmFhTcDACAiICIpAwAgAiAKhYU3AwAgIyAjKQMAIAMgC4WFNwMAICQgJCkDACAEIAyFhTcDACAlICUpAwAgBSANhYU3AwAgJiAmKQMAIAYgDoWFNwMAICcgJykDACAHIA+FhTcDACAoICgpAwAgCCAQhYU3AwAL');
  var ready = null;

  var mod = {
    buffer: wasm,
    memory: null,
    exports: null,
    realloc: realloc,
    onload: onload
  };

  onload(function () {});

  return mod

  function realloc (size) {
    mod.exports.memory.grow(Math.ceil(Math.abs(size - mod.memory.length) / 65536));
    mod.memory = new Uint8Array(mod.exports.memory.buffer);
  }

  function onload (cb) {
    if (mod.exports) return cb()

    if (ready) {
      ready.then(cb.bind(null, null)).catch(cb);
      return
    }

    try {
      if (opts && opts.async) throw new Error('async')
      setup({instance: new WebAssembly.Instance(new WebAssembly.Module(wasm), imp)});
    } catch (err) {
      ready = WebAssembly.instantiate(wasm, imp).then(setup);
    }

    onload(cb);
  }

  function setup (w) {
    mod.exports = w.instance.exports;
    mod.memory = mod.exports.memory && mod.exports.memory.buffer && new Uint8Array(mod.exports.memory.buffer);
  }
}

function toUint8Array (s) {
  if (typeof atob === 'function') return new Uint8Array(atob(s).split('').map(charCodeAt))
  return new (commonjsRequire('buf' + 'fer').Buffer)(s, 'base64')
}

function charCodeAt (c) {
  return c.charCodeAt(0)
}

var blake2bWasm = createCommonjsModule(function (module) {
var wasm = blake2b();

var head = 64;
var freeList = [];

module.exports = Blake2b;
var BYTES_MIN = module.exports.BYTES_MIN = 16;
var BYTES_MAX = module.exports.BYTES_MAX = 64;
var BYTES = module.exports.BYTES = 32;
var KEYBYTES_MIN = module.exports.KEYBYTES_MIN = 16;
var KEYBYTES_MAX = module.exports.KEYBYTES_MAX = 64;
var KEYBYTES = module.exports.KEYBYTES = 32;
var SALTBYTES = module.exports.SALTBYTES = 16;
var PERSONALBYTES = module.exports.PERSONALBYTES = 16;

function Blake2b (digestLength, key, salt, personal, noAssert) {
  if (!(this instanceof Blake2b)) return new Blake2b(digestLength, key, salt, personal, noAssert)
  if (!(wasm && wasm.exports)) throw new Error('WASM not loaded. Wait for Blake2b.ready(cb)')
  if (!digestLength) digestLength = 32;

  if (noAssert !== true) {
    nanoassert(digestLength >= BYTES_MIN, 'digestLength must be at least ' + BYTES_MIN + ', was given ' + digestLength);
    nanoassert(digestLength <= BYTES_MAX, 'digestLength must be at most ' + BYTES_MAX + ', was given ' + digestLength);
    if (key != null) nanoassert(key.length >= KEYBYTES_MIN, 'key must be at least ' + KEYBYTES_MIN + ', was given ' + key.length);
    if (key != null) nanoassert(key.length <= KEYBYTES_MAX, 'key must be at least ' + KEYBYTES_MAX + ', was given ' + key.length);
    if (salt != null) nanoassert(salt.length === SALTBYTES, 'salt must be exactly ' + SALTBYTES + ', was given ' + salt.length);
    if (personal != null) nanoassert(personal.length === PERSONALBYTES, 'personal must be exactly ' + PERSONALBYTES + ', was given ' + personal.length);
  }

  if (!freeList.length) {
    freeList.push(head);
    head += 216;
  }

  this.digestLength = digestLength;
  this.finalized = false;
  this.pointer = freeList.pop();

  wasm.memory.fill(0, 0, 64);
  wasm.memory[0] = this.digestLength;
  wasm.memory[1] = key ? key.length : 0;
  wasm.memory[2] = 1; // fanout
  wasm.memory[3] = 1; // depth

  if (salt) wasm.memory.set(salt, 32);
  if (personal) wasm.memory.set(personal, 48);

  if (this.pointer + 216 > wasm.memory.length) wasm.realloc(this.pointer + 216); // we need 216 bytes for the state
  wasm.exports.blake2b_init(this.pointer, this.digestLength);

  if (key) {
    this.update(key);
    wasm.memory.fill(0, head, head + key.length); // whiteout key
    wasm.memory[this.pointer + 200] = 128;
  }
}


Blake2b.prototype.update = function (input) {
  nanoassert(this.finalized === false, 'Hash instance finalized');
  nanoassert(input, 'input must be TypedArray or Buffer');

  if (head + input.length > wasm.memory.length) wasm.realloc(head + input.length);
  wasm.memory.set(input, head);
  wasm.exports.blake2b_update(this.pointer, head, head + input.length);
  return this
};

Blake2b.prototype.digest = function (enc) {
  nanoassert(this.finalized === false, 'Hash instance finalized');
  this.finalized = true;

  freeList.push(this.pointer);
  wasm.exports.blake2b_final(this.pointer);

  if (!enc || enc === 'binary') {
    return wasm.memory.slice(this.pointer + 128, this.pointer + 128 + this.digestLength)
  }

  if (enc === 'hex') {
    return hexSlice(wasm.memory, this.pointer + 128, this.digestLength)
  }

  nanoassert(enc.length >= this.digestLength, 'input must be TypedArray or Buffer');
  for (var i = 0; i < this.digestLength; i++) {
    enc[i] = wasm.memory[this.pointer + 128 + i];
  }

  return enc
};

// libsodium compat
Blake2b.prototype.final = Blake2b.prototype.digest;

Blake2b.WASM = wasm && wasm.buffer;
Blake2b.SUPPORTED = typeof WebAssembly !== 'undefined';

Blake2b.ready = function (cb) {
  if (!cb) cb = noop;
  if (!wasm) return cb(new Error('WebAssembly not supported'))

  // backwards compat, can be removed in a new major
  var p = new Promise(function (reject, resolve) {
    wasm.onload(function (err) {
      if (err) resolve();
      else reject();
      cb(err);
    });
  });

  return p
};

Blake2b.prototype.ready = Blake2b.ready;

function noop () {}

function hexSlice (buf, start, len) {
  var str = '';
  for (var i = 0; i < len; i++) str += toHex(buf[start + i]);
  return str
}

function toHex (n) {
  if (n < 16) return '0' + n.toString(16)
  return n.toString(16)
}
});
var blake2bWasm_1 = blake2bWasm.BYTES_MIN;
var blake2bWasm_2 = blake2bWasm.BYTES_MAX;
var blake2bWasm_3 = blake2bWasm.BYTES;
var blake2bWasm_4 = blake2bWasm.KEYBYTES_MIN;
var blake2bWasm_5 = blake2bWasm.KEYBYTES_MAX;
var blake2bWasm_6 = blake2bWasm.KEYBYTES;
var blake2bWasm_7 = blake2bWasm.SALTBYTES;
var blake2bWasm_8 = blake2bWasm.PERSONALBYTES;

var blake2b$1 = createCommonjsModule(function (module) {
// 64-bit unsigned addition
// Sets v[a,a+1] += v[b,b+1]
// v should be a Uint32Array
function ADD64AA (v, a, b) {
  var o0 = v[a] + v[b];
  var o1 = v[a + 1] + v[b + 1];
  if (o0 >= 0x100000000) {
    o1++;
  }
  v[a] = o0;
  v[a + 1] = o1;
}

// 64-bit unsigned addition
// Sets v[a,a+1] += b
// b0 is the low 32 bits of b, b1 represents the high 32 bits
function ADD64AC (v, a, b0, b1) {
  var o0 = v[a] + b0;
  if (b0 < 0) {
    o0 += 0x100000000;
  }
  var o1 = v[a + 1] + b1;
  if (o0 >= 0x100000000) {
    o1++;
  }
  v[a] = o0;
  v[a + 1] = o1;
}

// Little-endian byte access
function B2B_GET32 (arr, i) {
  return (arr[i] ^
  (arr[i + 1] << 8) ^
  (arr[i + 2] << 16) ^
  (arr[i + 3] << 24))
}

// G Mixing function
// The ROTRs are inlined for speed
function B2B_G (a, b, c, d, ix, iy) {
  var x0 = m[ix];
  var x1 = m[ix + 1];
  var y0 = m[iy];
  var y1 = m[iy + 1];

  ADD64AA(v, a, b); // v[a,a+1] += v[b,b+1] ... in JS we must store a uint64 as two uint32s
  ADD64AC(v, a, x0, x1); // v[a, a+1] += x ... x0 is the low 32 bits of x, x1 is the high 32 bits

  // v[d,d+1] = (v[d,d+1] xor v[a,a+1]) rotated to the right by 32 bits
  var xor0 = v[d] ^ v[a];
  var xor1 = v[d + 1] ^ v[a + 1];
  v[d] = xor1;
  v[d + 1] = xor0;

  ADD64AA(v, c, d);

  // v[b,b+1] = (v[b,b+1] xor v[c,c+1]) rotated right by 24 bits
  xor0 = v[b] ^ v[c];
  xor1 = v[b + 1] ^ v[c + 1];
  v[b] = (xor0 >>> 24) ^ (xor1 << 8);
  v[b + 1] = (xor1 >>> 24) ^ (xor0 << 8);

  ADD64AA(v, a, b);
  ADD64AC(v, a, y0, y1);

  // v[d,d+1] = (v[d,d+1] xor v[a,a+1]) rotated right by 16 bits
  xor0 = v[d] ^ v[a];
  xor1 = v[d + 1] ^ v[a + 1];
  v[d] = (xor0 >>> 16) ^ (xor1 << 16);
  v[d + 1] = (xor1 >>> 16) ^ (xor0 << 16);

  ADD64AA(v, c, d);

  // v[b,b+1] = (v[b,b+1] xor v[c,c+1]) rotated right by 63 bits
  xor0 = v[b] ^ v[c];
  xor1 = v[b + 1] ^ v[c + 1];
  v[b] = (xor1 >>> 31) ^ (xor0 << 1);
  v[b + 1] = (xor0 >>> 31) ^ (xor1 << 1);
}

// Initialization Vector
var BLAKE2B_IV32 = new Uint32Array([
  0xF3BCC908, 0x6A09E667, 0x84CAA73B, 0xBB67AE85,
  0xFE94F82B, 0x3C6EF372, 0x5F1D36F1, 0xA54FF53A,
  0xADE682D1, 0x510E527F, 0x2B3E6C1F, 0x9B05688C,
  0xFB41BD6B, 0x1F83D9AB, 0x137E2179, 0x5BE0CD19
]);

var SIGMA8 = [
  0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
  14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3,
  11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4,
  7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8,
  9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13,
  2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9,
  12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11,
  13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10,
  6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5,
  10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13, 0,
  0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
  14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3
];

// These are offsets into a uint64 buffer.
// Multiply them all by 2 to make them offsets into a uint32 buffer,
// because this is Javascript and we don't have uint64s
var SIGMA82 = new Uint8Array(SIGMA8.map(function (x) { return x * 2 }));

// Compression function. 'last' flag indicates last block.
// Note we're representing 16 uint64s as 32 uint32s
var v = new Uint32Array(32);
var m = new Uint32Array(32);
function blake2bCompress (ctx, last) {
  var i = 0;

  // init work variables
  for (i = 0; i < 16; i++) {
    v[i] = ctx.h[i];
    v[i + 16] = BLAKE2B_IV32[i];
  }

  // low 64 bits of offset
  v[24] = v[24] ^ ctx.t;
  v[25] = v[25] ^ (ctx.t / 0x100000000);
  // high 64 bits not supported, offset may not be higher than 2**53-1

  // last block flag set ?
  if (last) {
    v[28] = ~v[28];
    v[29] = ~v[29];
  }

  // get little-endian words
  for (i = 0; i < 32; i++) {
    m[i] = B2B_GET32(ctx.b, 4 * i);
  }

  // twelve rounds of mixing
  for (i = 0; i < 12; i++) {
    B2B_G(0, 8, 16, 24, SIGMA82[i * 16 + 0], SIGMA82[i * 16 + 1]);
    B2B_G(2, 10, 18, 26, SIGMA82[i * 16 + 2], SIGMA82[i * 16 + 3]);
    B2B_G(4, 12, 20, 28, SIGMA82[i * 16 + 4], SIGMA82[i * 16 + 5]);
    B2B_G(6, 14, 22, 30, SIGMA82[i * 16 + 6], SIGMA82[i * 16 + 7]);
    B2B_G(0, 10, 20, 30, SIGMA82[i * 16 + 8], SIGMA82[i * 16 + 9]);
    B2B_G(2, 12, 22, 24, SIGMA82[i * 16 + 10], SIGMA82[i * 16 + 11]);
    B2B_G(4, 14, 16, 26, SIGMA82[i * 16 + 12], SIGMA82[i * 16 + 13]);
    B2B_G(6, 8, 18, 28, SIGMA82[i * 16 + 14], SIGMA82[i * 16 + 15]);
  }

  for (i = 0; i < 16; i++) {
    ctx.h[i] = ctx.h[i] ^ v[i] ^ v[i + 16];
  }
}

// reusable parameter_block
var parameter_block = new Uint8Array([
  0, 0, 0, 0,      //  0: outlen, keylen, fanout, depth
  0, 0, 0, 0,      //  4: leaf length, sequential mode
  0, 0, 0, 0,      //  8: node offset
  0, 0, 0, 0,      // 12: node offset
  0, 0, 0, 0,      // 16: node depth, inner length, rfu
  0, 0, 0, 0,      // 20: rfu
  0, 0, 0, 0,      // 24: rfu
  0, 0, 0, 0,      // 28: rfu
  0, 0, 0, 0,      // 32: salt
  0, 0, 0, 0,      // 36: salt
  0, 0, 0, 0,      // 40: salt
  0, 0, 0, 0,      // 44: salt
  0, 0, 0, 0,      // 48: personal
  0, 0, 0, 0,      // 52: personal
  0, 0, 0, 0,      // 56: personal
  0, 0, 0, 0       // 60: personal
]);

// Creates a BLAKE2b hashing context
// Requires an output length between 1 and 64 bytes
// Takes an optional Uint8Array key
function Blake2b (outlen, key, salt, personal) {
  // zero out parameter_block before usage
  parameter_block.fill(0);
  // state, 'param block'

  this.b = new Uint8Array(128);
  this.h = new Uint32Array(16);
  this.t = 0; // input count
  this.c = 0; // pointer within buffer
  this.outlen = outlen; // output length in bytes

  parameter_block[0] = outlen;
  if (key) parameter_block[1] = key.length;
  parameter_block[2] = 1; // fanout
  parameter_block[3] = 1; // depth

  if (salt) parameter_block.set(salt, 32);
  if (personal) parameter_block.set(personal, 48);

  // initialize hash state
  for (var i = 0; i < 16; i++) {
    this.h[i] = BLAKE2B_IV32[i] ^ B2B_GET32(parameter_block, i * 4);
  }

  // key the hash, if applicable
  if (key) {
    blake2bUpdate(this, key);
    // at the end
    this.c = 128;
  }
}

Blake2b.prototype.update = function (input) {
  nanoassert(input != null, 'input must be Uint8Array or Buffer');
  blake2bUpdate(this, input);
  return this
};

Blake2b.prototype.digest = function (out) {
  var buf = (!out || out === 'binary' || out === 'hex') ? new Uint8Array(this.outlen) : out;
  nanoassert(buf.length >= this.outlen, 'out must have at least outlen bytes of space');
  blake2bFinal(this, buf);
  if (out === 'hex') return hexSlice(buf)
  return buf
};

Blake2b.prototype.final = Blake2b.prototype.digest;

Blake2b.ready = function (cb) {
  blake2bWasm.ready(function () {
    cb(); // ignore the error
  });
};

// Updates a BLAKE2b streaming hash
// Requires hash context and Uint8Array (byte array)
function blake2bUpdate (ctx, input) {
  for (var i = 0; i < input.length; i++) {
    if (ctx.c === 128) { // buffer full ?
      ctx.t += ctx.c; // add counters
      blake2bCompress(ctx, false); // compress (not last)
      ctx.c = 0; // counter to zero
    }
    ctx.b[ctx.c++] = input[i];
  }
}

// Completes a BLAKE2b streaming hash
// Returns a Uint8Array containing the message digest
function blake2bFinal (ctx, out) {
  ctx.t += ctx.c; // mark last block offset

  while (ctx.c < 128) { // fill up with zeros
    ctx.b[ctx.c++] = 0;
  }
  blake2bCompress(ctx, true); // final block flag = 1

  for (var i = 0; i < ctx.outlen; i++) {
    out[i] = ctx.h[i >> 2] >> (8 * (i & 3));
  }
  return out
}

function hexSlice (buf) {
  var str = '';
  for (var i = 0; i < buf.length; i++) str += toHex(buf[i]);
  return str
}

function toHex (n) {
  if (n < 16) return '0' + n.toString(16)
  return n.toString(16)
}

var Proto = Blake2b;

module.exports = function createHash (outlen, key, salt, personal, noAssert) {
  if (noAssert !== true) {
    nanoassert(outlen >= BYTES_MIN, 'outlen must be at least ' + BYTES_MIN + ', was given ' + outlen);
    nanoassert(outlen <= BYTES_MAX, 'outlen must be at most ' + BYTES_MAX + ', was given ' + outlen);
    if (key != null) nanoassert(key.length >= KEYBYTES_MIN, 'key must be at least ' + KEYBYTES_MIN + ', was given ' + key.length);
    if (key != null) nanoassert(key.length <= KEYBYTES_MAX, 'key must be at most ' + KEYBYTES_MAX + ', was given ' + key.length);
    if (salt != null) nanoassert(salt.length === SALTBYTES, 'salt must be exactly ' + SALTBYTES + ', was given ' + salt.length);
    if (personal != null) nanoassert(personal.length === PERSONALBYTES, 'personal must be exactly ' + PERSONALBYTES + ', was given ' + personal.length);
  }

  return new Proto(outlen, key, salt, personal)
};

module.exports.ready = function (cb) {
  blake2bWasm.ready(function () { // ignore errors
    cb();
  });
};

module.exports.WASM_SUPPORTED = blake2bWasm.SUPPORTED;
module.exports.WASM_LOADED = false;

var BYTES_MIN = module.exports.BYTES_MIN = 16;
var BYTES_MAX = module.exports.BYTES_MAX = 64;
var BYTES = module.exports.BYTES = 32;
var KEYBYTES_MIN = module.exports.KEYBYTES_MIN = 16;
var KEYBYTES_MAX = module.exports.KEYBYTES_MAX = 64;
var KEYBYTES = module.exports.KEYBYTES = 32;
var SALTBYTES = module.exports.SALTBYTES = 16;
var PERSONALBYTES = module.exports.PERSONALBYTES = 16;

blake2bWasm.ready(function (err) {
  if (!err) {
    module.exports.WASM_LOADED = true;
    Proto = blake2bWasm;
  }
});
});
var blake2b_1 = blake2b$1.ready;
var blake2b_2 = blake2b$1.WASM_SUPPORTED;
var blake2b_3 = blake2b$1.WASM_LOADED;
var blake2b_4 = blake2b$1.BYTES_MIN;
var blake2b_5 = blake2b$1.BYTES_MAX;
var blake2b_6 = blake2b$1.BYTES;
var blake2b_7 = blake2b$1.KEYBYTES_MIN;
var blake2b_8 = blake2b$1.KEYBYTES_MAX;
var blake2b_9 = blake2b$1.KEYBYTES;
var blake2b_10 = blake2b$1.SALTBYTES;
var blake2b_11 = blake2b$1.PERSONALBYTES;

class CryptoUtil {
    static blake2b256(val) {
        var out = new Uint8Array(blake2b$1.BYTES);
        blake2b$1(blake2b$1.BYTES).update(val).digest(out);
        return out;
    }
    static uia2hex(arrayBuffer, ignorePrefix = false) {
        if (typeof arrayBuffer !== 'object' || arrayBuffer === null || typeof arrayBuffer.byteLength !== 'number') {
            throw new TypeError('Expected input to be an ArrayBuffer');
        }
        var view = new Uint8Array(arrayBuffer);
        var result = '';
        var value;
        for (var i = 0; i < view.length; i++) {
            value = view[i].toString(16);
            result += (value.length === 1 ? '0' + value : value);
        }
        if (!ignorePrefix)
            result = "0x" + result;
        return result;
    }
    static hex2ua(hex) {
        if (typeof hex !== 'string') {
            throw new TypeError('Expected input to be a string');
        }
        if ((hex.length % 2) !== 0) {
            throw new RangeError('Expected string to be an even number of characters');
        }
        var view = new Uint8Array(hex.length / 2);
        for (var i = 0; i < hex.length; i += 2) {
            view[i / 2] = parseInt(hex.substring(i, i + 2), 16);
        }
        return view;
    }
    static createA0Address(publicKeyBuffer) {
        let pkHash = CryptoUtil.blake2b256(publicKeyBuffer).slice(1, 32);
        let address = CryptoUtil.concatBuffer(CryptoUtil.A0_IDENTIFIER, pkHash, 32);
        return CryptoUtil.uia2hex(address);
    }
    static concatBuffer(buffer1, buffer2, length) {
        var tmp = new Uint8Array(length);
        tmp.set(buffer1, 0);
        tmp.set(buffer2, buffer1.byteLength);
        return tmp;
    }
    static convertnAmpBalanceToAION(balance) {
        if (!balance)
            return 0;
        else
            return balance / Math.pow(10, 18);
    }
    static convertAIONTonAmpBalance(balance) {
        if (!balance)
            return 0;
        else
            return balance * Math.pow(10, 18);
    }
}
CryptoUtil.A0_IDENTIFIER = CryptoUtil.hex2ua('a0');

// Copyright 2014 Google Inc. All rights reserved

/** Namespace for the U2F api.
 * @type {Object}
 */
var u2f = u2f || {};

var googleU2fApi = u2f; // Adaptation for u2f-api package

/**
 * The U2F extension id
 * @type {string}
 * @const
 */
u2f.EXTENSION_ID = 'kmendfapggjehodndflmmgagdbamhnfd';

/**
 * Message types for messsages to/from the extension
 * @const
 * @enum {string}
 */
u2f.MessageTypes = {
  'U2F_REGISTER_REQUEST': 'u2f_register_request',
  'U2F_SIGN_REQUEST': 'u2f_sign_request',
  'U2F_REGISTER_RESPONSE': 'u2f_register_response',
  'U2F_SIGN_RESPONSE': 'u2f_sign_response'
};

/**
 * Response status codes
 * @const
 * @enum {number}
 */
u2f.ErrorCodes = {
  'OK': 0,
  'OTHER_ERROR': 1,
  'BAD_REQUEST': 2,
  'CONFIGURATION_UNSUPPORTED': 3,
  'DEVICE_INELIGIBLE': 4,
  'TIMEOUT': 5
};


// Low level MessagePort API support

/**
 * Call MessagePort disconnect
 */
u2f.disconnect = function() {
  if (u2f.port_ && u2f.port_.port_) {
    u2f.port_.port_.disconnect();
    u2f.port_ = null;
  }
};

/**
 * Sets up a MessagePort to the U2F extension using the
 * available mechanisms.
 * @param {function((MessagePort|u2f.WrappedChromeRuntimePort_))} callback
 */
u2f.getMessagePort = function(callback) {
  if (typeof chrome != 'undefined' && chrome.runtime) {
    // The actual message here does not matter, but we need to get a reply
    // for the callback to run. Thus, send an empty signature request
    // in order to get a failure response.
    var msg = {
      type: u2f.MessageTypes.U2F_SIGN_REQUEST,
      signRequests: []
    };
    chrome.runtime.sendMessage(u2f.EXTENSION_ID, msg, function() {
      if (!chrome.runtime.lastError) {
        // We are on a whitelisted origin and can talk directly
        // with the extension.
        u2f.getChromeRuntimePort_(callback);
      } else {
        // chrome.runtime was available, but we couldn't message
        // the extension directly, use iframe
        u2f.getIframePort_(callback);
      }
    });
  } else {
    // chrome.runtime was not available at all, which is normal
    // when this origin doesn't have access to any extensions.
    u2f.getIframePort_(callback);
  }
};

/**
 * Connects directly to the extension via chrome.runtime.connect
 * @param {function(u2f.WrappedChromeRuntimePort_)} callback
 * @private
 */
u2f.getChromeRuntimePort_ = function(callback) {
  var port = chrome.runtime.connect(u2f.EXTENSION_ID,
    {'includeTlsChannelId': true});
  setTimeout(function() {
    callback(null, new u2f.WrappedChromeRuntimePort_(port));
  }, 0);
};

/**
 * A wrapper for chrome.runtime.Port that is compatible with MessagePort.
 * @param {Port} port
 * @constructor
 * @private
 */
u2f.WrappedChromeRuntimePort_ = function(port) {
  this.port_ = port;
};

/**
 * Posts a message on the underlying channel.
 * @param {Object} message
 */
u2f.WrappedChromeRuntimePort_.prototype.postMessage = function(message) {
  this.port_.postMessage(message);
};

/**
 * Emulates the HTML 5 addEventListener interface. Works only for the
 * onmessage event, which is hooked up to the chrome.runtime.Port.onMessage.
 * @param {string} eventName
 * @param {function({data: Object})} handler
 */
u2f.WrappedChromeRuntimePort_.prototype.addEventListener =
    function(eventName, handler) {
  var name = eventName.toLowerCase();
  if (name == 'message' || name == 'onmessage') {
    this.port_.onMessage.addListener(function(message) {
      // Emulate a minimal MessageEvent object
      handler({'data': message});
    });
  } else {
    console.error('WrappedChromeRuntimePort only supports onMessage');
  }
};

/**
 * Sets up an embedded trampoline iframe, sourced from the extension.
 * @param {function(MessagePort)} callback
 * @private
 */
u2f.getIframePort_ = function(callback) {
  // Create the iframe
  var iframeOrigin = 'chrome-extension://' + u2f.EXTENSION_ID;
  var iframe = document.createElement('iframe');
  iframe.src = iframeOrigin + '/u2f-comms.html';
  iframe.setAttribute('style', 'display:none');
  document.body.appendChild(iframe);

  var hasCalledBack = false;

  var channel = new MessageChannel();
  var ready = function(message) {
    if (message.data == 'ready') {
      channel.port1.removeEventListener('message', ready);
      if (!hasCalledBack)
      {
        hasCalledBack = true;
        callback(null, channel.port1);
      }
    } else {
      console.error('First event on iframe port was not "ready"');
    }
  };
  channel.port1.addEventListener('message', ready);
  channel.port1.start();

  iframe.addEventListener('load', function() {
    // Deliver the port to the iframe and initialize
    iframe.contentWindow.postMessage('init', iframeOrigin, [channel.port2]);
  });

  // Give this 200ms to initialize, after that, we treat this method as failed
  setTimeout(function() {
    if (!hasCalledBack)
    {
      hasCalledBack = true;
      callback(new Error("IFrame extension not supported"));
    }
  }, 200);
};


// High-level JS API

/**
 * Default extension response timeout in seconds.
 * @const
 */
u2f.EXTENSION_TIMEOUT_SEC = 30;

/**
 * A singleton instance for a MessagePort to the extension.
 * @type {MessagePort|u2f.WrappedChromeRuntimePort_}
 * @private
 */
u2f.port_ = null;

/**
 * Callbacks waiting for a port
 * @type {Array.<function((MessagePort|u2f.WrappedChromeRuntimePort_))>}
 * @private
 */
u2f.waitingForPort_ = [];

/**
 * A counter for requestIds.
 * @type {number}
 * @private
 */
u2f.reqCounter_ = 0;

/**
 * A map from requestIds to client callbacks
 * @type {Object.<number,(function((u2f.Error|u2f.RegisterResponse))
 *                       |function((u2f.Error|u2f.SignResponse)))>}
 * @private
 */
u2f.callbackMap_ = {};

/**
 * Creates or retrieves the MessagePort singleton to use.
 * @param {function((MessagePort|u2f.WrappedChromeRuntimePort_))} callback
 * @private
 */
u2f.getPortSingleton_ = function(callback) {
  if (u2f.port_) {
    callback(null, u2f.port_);
  } else {
    if (u2f.waitingForPort_.length == 0) {
      u2f.getMessagePort(function(err, port) {
        if (!err) {
          u2f.port_ = port;
          u2f.port_.addEventListener('message',
            /** @type {function(Event)} */ (u2f.responseHandler_));
        }

        // Careful, here be async callbacks. Maybe.
        while (u2f.waitingForPort_.length)
          u2f.waitingForPort_.shift()(err, port);
      });
    }
    u2f.waitingForPort_.push(callback);
  }
};

/**
 * Handles response messages from the extension.
 * @param {MessageEvent.<u2f.Response>} message
 * @private
 */
u2f.responseHandler_ = function(message) {
  var response = message.data;
  var reqId = response['requestId'];
  if (!reqId || !u2f.callbackMap_[reqId]) {
    console.error('Unknown or missing requestId in response.');
    return;
  }
  var cb = u2f.callbackMap_[reqId];
  delete u2f.callbackMap_[reqId];
  cb(null, response['responseData']);
};

/**
 * Calls the callback with true or false as first and only argument
 * @param {Function} callback
 */
u2f.isSupported = function(callback) {
  u2f.getPortSingleton_(function(err, port) {
    callback(!err);
  });
};

/**
 * Dispatches an array of sign requests to available U2F tokens.
 * @param {Array.<u2f.SignRequest>} signRequests
 * @param {function((u2f.Error|u2f.SignResponse))} callback
 * @param {number=} opt_timeoutSeconds
 */
u2f.sign = function(signRequests, callback, opt_timeoutSeconds) {
  u2f.getPortSingleton_(function(err, port) {
    if (err)
      return callback(err);

    var reqId = ++u2f.reqCounter_;
    u2f.callbackMap_[reqId] = callback;
    var req = {
      type: u2f.MessageTypes.U2F_SIGN_REQUEST,
      signRequests: signRequests,
      timeoutSeconds: (typeof opt_timeoutSeconds !== 'undefined' ?
        opt_timeoutSeconds : u2f.EXTENSION_TIMEOUT_SEC),
      requestId: reqId
    };
    port.postMessage(req);
  });
};

/**
 * Dispatches register requests to available U2F tokens. An array of sign
 * requests identifies already registered tokens.
 * @param {Array.<u2f.RegisterRequest>} registerRequests
 * @param {Array.<u2f.SignRequest>} signRequests
 * @param {function((u2f.Error|u2f.RegisterResponse))} callback
 * @param {number=} opt_timeoutSeconds
 */
u2f.register = function(registerRequests, signRequests,
    callback, opt_timeoutSeconds) {
  u2f.getPortSingleton_(function(err, port) {
    if (err)
      return callback(err);

    var reqId = ++u2f.reqCounter_;
    u2f.callbackMap_[reqId] = callback;
    var req = {
      type: u2f.MessageTypes.U2F_REGISTER_REQUEST,
      signRequests: signRequests,
      registerRequests: registerRequests,
      timeoutSeconds: (typeof opt_timeoutSeconds !== 'undefined' ?
        opt_timeoutSeconds : u2f.EXTENSION_TIMEOUT_SEC),
      requestId: reqId
    };
    port.postMessage(req);
  });
};

var u2fApi = API;



// Feature detection (yes really)
var isBrowser = ( typeof navigator !== 'undefined' ) && !!navigator.userAgent;
var isSafari = isBrowser && navigator.userAgent.match( /Safari\// )
	&& !navigator.userAgent.match( /Chrome\// );
var isEDGE = isBrowser && navigator.userAgent.match( /Edge\/1[2345]/ );

var _backend = null;
function getBackend( Promise )
{
	if ( !_backend )
		_backend = new Promise( function( resolve, reject )
		{
			function notSupported( )
			{
				// Note; {native: true} means *not* using Google's hack
				resolve( { u2f: null, native: true } );
			}

			if ( !isBrowser )
				return notSupported( );

			if ( isSafari )
				// Safari doesn't support U2F, and the Safari-FIDO-U2F
				// extension lacks full support (Multi-facet apps), so we
				// block it until proper support.
				return notSupported( );

			var hasNativeSupport =
				( typeof window.u2f !== 'undefined' ) &&
				( typeof window.u2f.sign === 'function' );

			if ( hasNativeSupport )
				resolve( { u2f: window.u2f, native: true } );

			if ( isEDGE )
				// We don't want to check for Google's extension hack on EDGE
				// as it'll cause trouble (popups, etc)
				return notSupported( );

			if ( location.protocol === 'http:' )
				// U2F isn't supported over http, only https
				return notSupported( );

			if ( typeof MessageChannel === 'undefined' )
				// Unsupported browser, the chrome hack would throw
				return notSupported( );

			// Test for google extension support
			googleU2fApi.isSupported( function( ok )
			{
				if ( ok )
					resolve( { u2f: googleU2fApi, native: false } );
				else
					notSupported( );
			} );
		} );

	return _backend;
}

function API( Promise )
{
	return {
		isSupported   : isSupported.bind( Promise ),
		ensureSupport : ensureSupport.bind( Promise ),
		register      : register.bind( Promise ),
		sign          : sign.bind( Promise ),
		ErrorCodes    : API.ErrorCodes,
		ErrorNames    : API.ErrorNames
	};
}

API.ErrorCodes = {
	CANCELLED: -1,
	OK: 0,
	OTHER_ERROR: 1,
	BAD_REQUEST: 2,
	CONFIGURATION_UNSUPPORTED: 3,
	DEVICE_INELIGIBLE: 4,
	TIMEOUT: 5
};
API.ErrorNames = {
	"-1": "CANCELLED",
	"0": "OK",
	"1": "OTHER_ERROR",
	"2": "BAD_REQUEST",
	"3": "CONFIGURATION_UNSUPPORTED",
	"4": "DEVICE_INELIGIBLE",
	"5": "TIMEOUT"
};

function makeError( msg, err )
{
	var code = err != null ? err.errorCode : 1; // Default to OTHER_ERROR
	var type = API.ErrorNames[ '' + code ];
	var error = new Error( msg );
	error.metaData = {
		type: type,
		code: code
	};
	return error;
}

function deferPromise( Promise, promise )
{
	var ret = { };
	ret.promise = new Promise( function( resolve, reject ) {
		ret.resolve = resolve;
		ret.reject = reject;
		promise.then( resolve, reject );
	} );
	/**
	 * Reject request promise and disconnect port if 'disconnect' flag is true
	 * @param {string} msg
	 * @param {boolean} disconnect
	 */
	ret.promise.cancel = function( msg, disconnect )
	{
		getBackend( Promise )
		.then( function( backend )
		{
			if ( disconnect && !backend.native )
				backend.u2f.disconnect( );

			ret.reject( makeError( msg, { errorCode: -1 } ) );
		} );
	};
	return ret;
}

function isSupported( )
{
	var Promise = this;

	return getBackend( Promise )
	.then( function( backend )
	{
		return !!backend.u2f;
	} );
}

function _ensureSupport( backend )
{
	if ( !backend.u2f )
	{
		if ( location.protocol === 'http:' )
			throw new Error( "U2F isn't supported over http, only https" );
		throw new Error( "U2F not supported" );
	}
}

function ensureSupport( )
{
	var Promise = this;

	return getBackend( Promise )
	.then( _ensureSupport );
}

function register( registerRequests, signRequests /* = null */, timeout )
{
	var Promise = this;

	if ( !Array.isArray( registerRequests ) )
		registerRequests = [ registerRequests ];

	if ( typeof signRequests === 'number' && typeof timeout === 'undefined' )
	{
		timeout = signRequests;
		signRequests = null;
	}

	if ( !signRequests )
		signRequests = [ ];

	return deferPromise( Promise, getBackend( Promise )
	.then( function( backend )
	{
		_ensureSupport( backend );

		var native = backend.native;
		var u2f = backend.u2f;

		return new Promise( function( resolve, reject )
		{
			function cbNative( response )
			{
				if ( response.errorCode )
					reject( makeError( "Registration failed", response ) );
				else
				{
					delete response.errorCode;
					resolve( response );
				}
			}

			function cbChrome( err, response )
			{
				if ( err )
					reject( err );
				else if ( response.errorCode )
					reject( makeError( "Registration failed", response ) );
				else
					resolve( response );
			}

			if ( native )
			{
				var appId = registerRequests[ 0 ].appId;

				u2f.register(
					appId, registerRequests, signRequests, cbNative, timeout );
			}
			else
			{
				u2f.register(
					registerRequests, signRequests, cbChrome, timeout );
			}
		} );
	} ) ).promise;
}

function sign( signRequests, timeout )
{
	var Promise = this;

	if ( !Array.isArray( signRequests ) )
		signRequests = [ signRequests ];

	return deferPromise( Promise, getBackend( Promise )
	.then( function( backend )
	{
		_ensureSupport( backend );

		var native = backend.native;
		var u2f = backend.u2f;

		return new Promise( function( resolve, reject )
		{
			function cbNative( response )
			{
				if ( response.errorCode )
					reject( makeError( "Sign failed", response ) );
				else
				{
					delete response.errorCode;
					resolve( response );
				}
			}

			function cbChrome( err, response )
			{
				if ( err )
					reject( err );
				else if ( response.errorCode )
					reject( makeError( "Sign failed", response ) );
				else
					resolve( response );
			}

			if ( native )
			{
				var appId = signRequests[ 0 ].appId;
				var challenge = signRequests[ 0 ].challenge;

				u2f.sign( appId, challenge, signRequests, cbNative, timeout );
			}
			else
			{
				u2f.sign( signRequests, cbChrome, timeout );
			}
		} );
	} ) ).promise;
}

function makeDefault( func )
{
	API[ func ] = function( )
	{
		if ( !commonjsGlobal.Promise )
			// This is very unlikely to ever happen, since browsers
			// supporting U2F will most likely support Promises.
			throw new Error( "The platform doesn't natively support promises" );

		var args = [ ].slice.call( arguments );
		return API( commonjsGlobal.Promise )[ func ].apply( null, args );
	};
}

// Provide default functions using the built-in Promise if available.
makeDefault( 'isSupported' );
makeDefault( 'ensureSupport' );
makeDefault( 'register' );
makeDefault( 'sign' );

var u2fApi$1 = u2fApi;

// 7.1.4 ToInteger
var ceil = Math.ceil;
var floor = Math.floor;
var _toInteger = function (it) {
  return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
};

// 7.2.1 RequireObjectCoercible(argument)
var _defined = function (it) {
  if (it == undefined) throw TypeError("Can't call method on  " + it);
  return it;
};

// true  -> String#at
// false -> String#codePointAt
var _stringAt = function (TO_STRING) {
  return function (that, pos) {
    var s = String(_defined(that));
    var i = _toInteger(pos);
    var l = s.length;
    var a, b;
    if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
    a = s.charCodeAt(i);
    return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
      ? TO_STRING ? s.charAt(i) : a
      : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
  };
};

var _library = true;

var _global = createCommonjsModule(function (module) {
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
var global = module.exports = typeof window != 'undefined' && window.Math == Math
  ? window : typeof self != 'undefined' && self.Math == Math ? self
  // eslint-disable-next-line no-new-func
  : Function('return this')();
if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
});

var _core = createCommonjsModule(function (module) {
var core = module.exports = { version: '2.5.7' };
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
});
var _core_1 = _core.version;

var _aFunction = function (it) {
  if (typeof it != 'function') throw TypeError(it + ' is not a function!');
  return it;
};

// optional / simple context binding

var _ctx = function (fn, that, length) {
  _aFunction(fn);
  if (that === undefined) return fn;
  switch (length) {
    case 1: return function (a) {
      return fn.call(that, a);
    };
    case 2: return function (a, b) {
      return fn.call(that, a, b);
    };
    case 3: return function (a, b, c) {
      return fn.call(that, a, b, c);
    };
  }
  return function (/* ...args */) {
    return fn.apply(that, arguments);
  };
};

var _isObject = function (it) {
  return typeof it === 'object' ? it !== null : typeof it === 'function';
};

var _anObject = function (it) {
  if (!_isObject(it)) throw TypeError(it + ' is not an object!');
  return it;
};

var _fails = function (exec) {
  try {
    return !!exec();
  } catch (e) {
    return true;
  }
};

// Thank's IE8 for his funny defineProperty
var _descriptors = !_fails(function () {
  return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
});

var document$1 = _global.document;
// typeof document.createElement is 'object' in old IE
var is = _isObject(document$1) && _isObject(document$1.createElement);
var _domCreate = function (it) {
  return is ? document$1.createElement(it) : {};
};

var _ie8DomDefine = !_descriptors && !_fails(function () {
  return Object.defineProperty(_domCreate('div'), 'a', { get: function () { return 7; } }).a != 7;
});

// 7.1.1 ToPrimitive(input [, PreferredType])

// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
var _toPrimitive = function (it, S) {
  if (!_isObject(it)) return it;
  var fn, val;
  if (S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val;
  if (typeof (fn = it.valueOf) == 'function' && !_isObject(val = fn.call(it))) return val;
  if (!S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val;
  throw TypeError("Can't convert object to primitive value");
};

var dP = Object.defineProperty;

var f = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) {
  _anObject(O);
  P = _toPrimitive(P, true);
  _anObject(Attributes);
  if (_ie8DomDefine) try {
    return dP(O, P, Attributes);
  } catch (e) { /* empty */ }
  if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
  if ('value' in Attributes) O[P] = Attributes.value;
  return O;
};

var _objectDp = {
	f: f
};

var _propertyDesc = function (bitmap, value) {
  return {
    enumerable: !(bitmap & 1),
    configurable: !(bitmap & 2),
    writable: !(bitmap & 4),
    value: value
  };
};

var _hide = _descriptors ? function (object, key, value) {
  return _objectDp.f(object, key, _propertyDesc(1, value));
} : function (object, key, value) {
  object[key] = value;
  return object;
};

var hasOwnProperty = {}.hasOwnProperty;
var _has = function (it, key) {
  return hasOwnProperty.call(it, key);
};

var PROTOTYPE = 'prototype';

var $export = function (type, name, source) {
  var IS_FORCED = type & $export.F;
  var IS_GLOBAL = type & $export.G;
  var IS_STATIC = type & $export.S;
  var IS_PROTO = type & $export.P;
  var IS_BIND = type & $export.B;
  var IS_WRAP = type & $export.W;
  var exports = IS_GLOBAL ? _core : _core[name] || (_core[name] = {});
  var expProto = exports[PROTOTYPE];
  var target = IS_GLOBAL ? _global : IS_STATIC ? _global[name] : (_global[name] || {})[PROTOTYPE];
  var key, own, out;
  if (IS_GLOBAL) source = name;
  for (key in source) {
    // contains in native
    own = !IS_FORCED && target && target[key] !== undefined;
    if (own && _has(exports, key)) continue;
    // export native or passed
    out = own ? target[key] : source[key];
    // prevent global pollution for namespaces
    exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
    // bind timers to global for call from export context
    : IS_BIND && own ? _ctx(out, _global)
    // wrap global constructors for prevent change them in library
    : IS_WRAP && target[key] == out ? (function (C) {
      var F = function (a, b, c) {
        if (this instanceof C) {
          switch (arguments.length) {
            case 0: return new C();
            case 1: return new C(a);
            case 2: return new C(a, b);
          } return new C(a, b, c);
        } return C.apply(this, arguments);
      };
      F[PROTOTYPE] = C[PROTOTYPE];
      return F;
    // make static versions for prototype methods
    })(out) : IS_PROTO && typeof out == 'function' ? _ctx(Function.call, out) : out;
    // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
    if (IS_PROTO) {
      (exports.virtual || (exports.virtual = {}))[key] = out;
      // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
      if (type & $export.R && expProto && !expProto[key]) _hide(expProto, key, out);
    }
  }
};
// type bitmap
$export.F = 1;   // forced
$export.G = 2;   // global
$export.S = 4;   // static
$export.P = 8;   // proto
$export.B = 16;  // bind
$export.W = 32;  // wrap
$export.U = 64;  // safe
$export.R = 128; // real proto method for `library`
var _export = $export;

var _redefine = _hide;

var _iterators = {};

var toString$1 = {}.toString;

var _cof = function (it) {
  return toString$1.call(it).slice(8, -1);
};

// fallback for non-array-like ES3 and non-enumerable old V8 strings

// eslint-disable-next-line no-prototype-builtins
var _iobject = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
  return _cof(it) == 'String' ? it.split('') : Object(it);
};

// to indexed object, toObject with fallback for non-array-like ES3 strings


var _toIobject = function (it) {
  return _iobject(_defined(it));
};

// 7.1.15 ToLength

var min = Math.min;
var _toLength = function (it) {
  return it > 0 ? min(_toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
};

var max = Math.max;
var min$1 = Math.min;
var _toAbsoluteIndex = function (index, length) {
  index = _toInteger(index);
  return index < 0 ? max(index + length, 0) : min$1(index, length);
};

// false -> Array#indexOf
// true  -> Array#includes



var _arrayIncludes = function (IS_INCLUDES) {
  return function ($this, el, fromIndex) {
    var O = _toIobject($this);
    var length = _toLength(O.length);
    var index = _toAbsoluteIndex(fromIndex, length);
    var value;
    // Array#includes uses SameValueZero equality algorithm
    // eslint-disable-next-line no-self-compare
    if (IS_INCLUDES && el != el) while (length > index) {
      value = O[index++];
      // eslint-disable-next-line no-self-compare
      if (value != value) return true;
    // Array#indexOf ignores holes, Array#includes - not
    } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
      if (O[index] === el) return IS_INCLUDES || index || 0;
    } return !IS_INCLUDES && -1;
  };
};

var _shared = createCommonjsModule(function (module) {
var SHARED = '__core-js_shared__';
var store = _global[SHARED] || (_global[SHARED] = {});

(module.exports = function (key, value) {
  return store[key] || (store[key] = value !== undefined ? value : {});
})('versions', []).push({
  version: _core.version,
  mode: 'pure',
  copyright: '© 2018 Denis Pushkarev (zloirock.ru)'
});
});

var id = 0;
var px = Math.random();
var _uid = function (key) {
  return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
};

var shared = _shared('keys');

var _sharedKey = function (key) {
  return shared[key] || (shared[key] = _uid(key));
};

var arrayIndexOf$1 = _arrayIncludes(false);
var IE_PROTO = _sharedKey('IE_PROTO');

var _objectKeysInternal = function (object, names) {
  var O = _toIobject(object);
  var i = 0;
  var result = [];
  var key;
  for (key in O) if (key != IE_PROTO) _has(O, key) && result.push(key);
  // Don't enum bug & hidden keys
  while (names.length > i) if (_has(O, key = names[i++])) {
    ~arrayIndexOf$1(result, key) || result.push(key);
  }
  return result;
};

// IE 8- don't enum bug keys
var _enumBugKeys = (
  'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
).split(',');

// 19.1.2.14 / 15.2.3.14 Object.keys(O)



var _objectKeys = Object.keys || function keys(O) {
  return _objectKeysInternal(O, _enumBugKeys);
};

var _objectDps = _descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
  _anObject(O);
  var keys = _objectKeys(Properties);
  var length = keys.length;
  var i = 0;
  var P;
  while (length > i) _objectDp.f(O, P = keys[i++], Properties[P]);
  return O;
};

var document$2 = _global.document;
var _html = document$2 && document$2.documentElement;

// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])



var IE_PROTO$1 = _sharedKey('IE_PROTO');
var Empty = function () { /* empty */ };
var PROTOTYPE$1 = 'prototype';

// Create object with fake `null` prototype: use iframe Object with cleared prototype
var createDict = function () {
  // Thrash, waste and sodomy: IE GC bug
  var iframe = _domCreate('iframe');
  var i = _enumBugKeys.length;
  var lt = '<';
  var gt = '>';
  var iframeDocument;
  iframe.style.display = 'none';
  _html.appendChild(iframe);
  iframe.src = 'javascript:'; // eslint-disable-line no-script-url
  // createDict = iframe.contentWindow.Object;
  // html.removeChild(iframe);
  iframeDocument = iframe.contentWindow.document;
  iframeDocument.open();
  iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
  iframeDocument.close();
  createDict = iframeDocument.F;
  while (i--) delete createDict[PROTOTYPE$1][_enumBugKeys[i]];
  return createDict();
};

var _objectCreate = Object.create || function create(O, Properties) {
  var result;
  if (O !== null) {
    Empty[PROTOTYPE$1] = _anObject(O);
    result = new Empty();
    Empty[PROTOTYPE$1] = null;
    // add "__proto__" for Object.getPrototypeOf polyfill
    result[IE_PROTO$1] = O;
  } else result = createDict();
  return Properties === undefined ? result : _objectDps(result, Properties);
};

var _wks = createCommonjsModule(function (module) {
var store = _shared('wks');

var Symbol = _global.Symbol;
var USE_SYMBOL = typeof Symbol == 'function';

var $exports = module.exports = function (name) {
  return store[name] || (store[name] =
    USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : _uid)('Symbol.' + name));
};

$exports.store = store;
});

var def = _objectDp.f;

var TAG = _wks('toStringTag');

var _setToStringTag = function (it, tag, stat) {
  if (it && !_has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
};

var IteratorPrototype = {};

// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
_hide(IteratorPrototype, _wks('iterator'), function () { return this; });

var _iterCreate = function (Constructor, NAME, next) {
  Constructor.prototype = _objectCreate(IteratorPrototype, { next: _propertyDesc(1, next) });
  _setToStringTag(Constructor, NAME + ' Iterator');
};

// 7.1.13 ToObject(argument)

var _toObject = function (it) {
  return Object(_defined(it));
};

// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)


var IE_PROTO$2 = _sharedKey('IE_PROTO');
var ObjectProto = Object.prototype;

var _objectGpo = Object.getPrototypeOf || function (O) {
  O = _toObject(O);
  if (_has(O, IE_PROTO$2)) return O[IE_PROTO$2];
  if (typeof O.constructor == 'function' && O instanceof O.constructor) {
    return O.constructor.prototype;
  } return O instanceof Object ? ObjectProto : null;
};

var ITERATOR = _wks('iterator');
var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
var FF_ITERATOR = '@@iterator';
var KEYS = 'keys';
var VALUES = 'values';

var returnThis = function () { return this; };

var _iterDefine = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
  _iterCreate(Constructor, NAME, next);
  var getMethod = function (kind) {
    if (!BUGGY && kind in proto) return proto[kind];
    switch (kind) {
      case KEYS: return function keys() { return new Constructor(this, kind); };
      case VALUES: return function values() { return new Constructor(this, kind); };
    } return function entries() { return new Constructor(this, kind); };
  };
  var TAG = NAME + ' Iterator';
  var DEF_VALUES = DEFAULT == VALUES;
  var VALUES_BUG = false;
  var proto = Base.prototype;
  var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
  var $default = $native || getMethod(DEFAULT);
  var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
  var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
  var methods, key, IteratorPrototype;
  // Fix native
  if ($anyNative) {
    IteratorPrototype = _objectGpo($anyNative.call(new Base()));
    if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
      // Set @@toStringTag to native iterators
      _setToStringTag(IteratorPrototype, TAG, true);
      // fix for some old engines
      if (!_library && typeof IteratorPrototype[ITERATOR] != 'function') _hide(IteratorPrototype, ITERATOR, returnThis);
    }
  }
  // fix Array#{values, @@iterator}.name in V8 / FF
  if (DEF_VALUES && $native && $native.name !== VALUES) {
    VALUES_BUG = true;
    $default = function values() { return $native.call(this); };
  }
  // Define iterator
  if ((!_library || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
    _hide(proto, ITERATOR, $default);
  }
  // Plug for library
  _iterators[NAME] = $default;
  _iterators[TAG] = returnThis;
  if (DEFAULT) {
    methods = {
      values: DEF_VALUES ? $default : getMethod(VALUES),
      keys: IS_SET ? $default : getMethod(KEYS),
      entries: $entries
    };
    if (FORCED) for (key in methods) {
      if (!(key in proto)) _redefine(proto, key, methods[key]);
    } else _export(_export.P + _export.F * (BUGGY || VALUES_BUG), NAME, methods);
  }
  return methods;
};

var $at = _stringAt(true);

// 21.1.3.27 String.prototype[@@iterator]()
_iterDefine(String, 'String', function (iterated) {
  this._t = String(iterated); // target
  this._i = 0;                // next index
// 21.1.5.2.1 %StringIteratorPrototype%.next()
}, function () {
  var O = this._t;
  var index = this._i;
  var point;
  if (index >= O.length) return { value: undefined, done: true };
  point = $at(O, index);
  this._i += point.length;
  return { value: point, done: false };
});

var _iterStep = function (done, value) {
  return { value: value, done: !!done };
};

// 22.1.3.4 Array.prototype.entries()
// 22.1.3.13 Array.prototype.keys()
// 22.1.3.29 Array.prototype.values()
// 22.1.3.30 Array.prototype[@@iterator]()
var es6_array_iterator = _iterDefine(Array, 'Array', function (iterated, kind) {
  this._t = _toIobject(iterated); // target
  this._i = 0;                   // next index
  this._k = kind;                // kind
// 22.1.5.2.1 %ArrayIteratorPrototype%.next()
}, function () {
  var O = this._t;
  var kind = this._k;
  var index = this._i++;
  if (!O || index >= O.length) {
    this._t = undefined;
    return _iterStep(1);
  }
  if (kind == 'keys') return _iterStep(0, index);
  if (kind == 'values') return _iterStep(0, O[index]);
  return _iterStep(0, [index, O[index]]);
}, 'values');

// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
_iterators.Arguments = _iterators.Array;

var TO_STRING_TAG = _wks('toStringTag');

var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +
  'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +
  'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +
  'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +
  'TextTrackList,TouchList').split(',');

for (var i = 0; i < DOMIterables.length; i++) {
  var NAME = DOMIterables[i];
  var Collection = _global[NAME];
  var proto = Collection && Collection.prototype;
  if (proto && !proto[TO_STRING_TAG]) _hide(proto, TO_STRING_TAG, NAME);
  _iterators[NAME] = _iterators.Array;
}

// getting tag from 19.1.3.6 Object.prototype.toString()

var TAG$1 = _wks('toStringTag');
// ES3 wrong here
var ARG = _cof(function () { return arguments; }()) == 'Arguments';

// fallback for IE11 Script Access Denied error
var tryGet = function (it, key) {
  try {
    return it[key];
  } catch (e) { /* empty */ }
};

var _classof = function (it) {
  var O, T, B;
  return it === undefined ? 'Undefined' : it === null ? 'Null'
    // @@toStringTag case
    : typeof (T = tryGet(O = Object(it), TAG$1)) == 'string' ? T
    // builtinTag case
    : ARG ? _cof(O)
    // ES3 arguments fallback
    : (B = _cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
};

var _anInstance = function (it, Constructor, name, forbiddenField) {
  if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {
    throw TypeError(name + ': incorrect invocation!');
  } return it;
};

// call something on iterator step with safe closing on error

var _iterCall = function (iterator, fn, value, entries) {
  try {
    return entries ? fn(_anObject(value)[0], value[1]) : fn(value);
  // 7.4.6 IteratorClose(iterator, completion)
  } catch (e) {
    var ret = iterator['return'];
    if (ret !== undefined) _anObject(ret.call(iterator));
    throw e;
  }
};

// check on default Array iterator

var ITERATOR$1 = _wks('iterator');
var ArrayProto = Array.prototype;

var _isArrayIter = function (it) {
  return it !== undefined && (_iterators.Array === it || ArrayProto[ITERATOR$1] === it);
};

var ITERATOR$2 = _wks('iterator');

var core_getIteratorMethod = _core.getIteratorMethod = function (it) {
  if (it != undefined) return it[ITERATOR$2]
    || it['@@iterator']
    || _iterators[_classof(it)];
};

var _forOf = createCommonjsModule(function (module) {
var BREAK = {};
var RETURN = {};
var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {
  var iterFn = ITERATOR ? function () { return iterable; } : core_getIteratorMethod(iterable);
  var f = _ctx(fn, that, entries ? 2 : 1);
  var index = 0;
  var length, step, iterator, result;
  if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');
  // fast case for arrays with default iterator
  if (_isArrayIter(iterFn)) for (length = _toLength(iterable.length); length > index; index++) {
    result = entries ? f(_anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
    if (result === BREAK || result === RETURN) return result;
  } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {
    result = _iterCall(iterator, f, step.value, entries);
    if (result === BREAK || result === RETURN) return result;
  }
};
exports.BREAK = BREAK;
exports.RETURN = RETURN;
});

// 7.3.20 SpeciesConstructor(O, defaultConstructor)


var SPECIES = _wks('species');
var _speciesConstructor = function (O, D) {
  var C = _anObject(O).constructor;
  var S;
  return C === undefined || (S = _anObject(C)[SPECIES]) == undefined ? D : _aFunction(S);
};

// fast apply, http://jsperf.lnkit.com/fast-apply/5
var _invoke = function (fn, args, that) {
  var un = that === undefined;
  switch (args.length) {
    case 0: return un ? fn()
                      : fn.call(that);
    case 1: return un ? fn(args[0])
                      : fn.call(that, args[0]);
    case 2: return un ? fn(args[0], args[1])
                      : fn.call(that, args[0], args[1]);
    case 3: return un ? fn(args[0], args[1], args[2])
                      : fn.call(that, args[0], args[1], args[2]);
    case 4: return un ? fn(args[0], args[1], args[2], args[3])
                      : fn.call(that, args[0], args[1], args[2], args[3]);
  } return fn.apply(that, args);
};

var process = _global.process;
var setTask = _global.setImmediate;
var clearTask = _global.clearImmediate;
var MessageChannel$1 = _global.MessageChannel;
var Dispatch = _global.Dispatch;
var counter = 0;
var queue = {};
var ONREADYSTATECHANGE = 'onreadystatechange';
var defer$1, channel, port;
var run = function () {
  var id = +this;
  // eslint-disable-next-line no-prototype-builtins
  if (queue.hasOwnProperty(id)) {
    var fn = queue[id];
    delete queue[id];
    fn();
  }
};
var listener = function (event) {
  run.call(event.data);
};
// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
if (!setTask || !clearTask) {
  setTask = function setImmediate(fn) {
    var args = [];
    var i = 1;
    while (arguments.length > i) args.push(arguments[i++]);
    queue[++counter] = function () {
      // eslint-disable-next-line no-new-func
      _invoke(typeof fn == 'function' ? fn : Function(fn), args);
    };
    defer$1(counter);
    return counter;
  };
  clearTask = function clearImmediate(id) {
    delete queue[id];
  };
  // Node.js 0.8-
  if (_cof(process) == 'process') {
    defer$1 = function (id) {
      process.nextTick(_ctx(run, id, 1));
    };
  // Sphere (JS game engine) Dispatch API
  } else if (Dispatch && Dispatch.now) {
    defer$1 = function (id) {
      Dispatch.now(_ctx(run, id, 1));
    };
  // Browsers with MessageChannel, includes WebWorkers
  } else if (MessageChannel$1) {
    channel = new MessageChannel$1();
    port = channel.port2;
    channel.port1.onmessage = listener;
    defer$1 = _ctx(port.postMessage, port, 1);
  // Browsers with postMessage, skip WebWorkers
  // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
  } else if (_global.addEventListener && typeof postMessage == 'function' && !_global.importScripts) {
    defer$1 = function (id) {
      _global.postMessage(id + '', '*');
    };
    _global.addEventListener('message', listener, false);
  // IE8-
  } else if (ONREADYSTATECHANGE in _domCreate('script')) {
    defer$1 = function (id) {
      _html.appendChild(_domCreate('script'))[ONREADYSTATECHANGE] = function () {
        _html.removeChild(this);
        run.call(id);
      };
    };
  // Rest old browsers
  } else {
    defer$1 = function (id) {
      setTimeout(_ctx(run, id, 1), 0);
    };
  }
}
var _task = {
  set: setTask,
  clear: clearTask
};

var macrotask = _task.set;
var Observer = _global.MutationObserver || _global.WebKitMutationObserver;
var process$1 = _global.process;
var Promise$1 = _global.Promise;
var isNode = _cof(process$1) == 'process';

var _microtask = function () {
  var head, last, notify;

  var flush = function () {
    var parent, fn;
    if (isNode && (parent = process$1.domain)) parent.exit();
    while (head) {
      fn = head.fn;
      head = head.next;
      try {
        fn();
      } catch (e) {
        if (head) notify();
        else last = undefined;
        throw e;
      }
    } last = undefined;
    if (parent) parent.enter();
  };

  // Node.js
  if (isNode) {
    notify = function () {
      process$1.nextTick(flush);
    };
  // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339
  } else if (Observer && !(_global.navigator && _global.navigator.standalone)) {
    var toggle = true;
    var node = document.createTextNode('');
    new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new
    notify = function () {
      node.data = toggle = !toggle;
    };
  // environments with maybe non-completely correct, but existent Promise
  } else if (Promise$1 && Promise$1.resolve) {
    // Promise.resolve without an argument throws an error in LG WebOS 2
    var promise = Promise$1.resolve(undefined);
    notify = function () {
      promise.then(flush);
    };
  // for other environments - macrotask based on:
  // - setImmediate
  // - MessageChannel
  // - window.postMessag
  // - onreadystatechange
  // - setTimeout
  } else {
    notify = function () {
      // strange IE + webpack dev server bug - use .call(global)
      macrotask.call(_global, flush);
    };
  }

  return function (fn) {
    var task = { fn: fn, next: undefined };
    if (last) last.next = task;
    if (!head) {
      head = task;
      notify();
    } last = task;
  };
};

// 25.4.1.5 NewPromiseCapability(C)


function PromiseCapability(C) {
  var resolve, reject;
  this.promise = new C(function ($$resolve, $$reject) {
    if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
    resolve = $$resolve;
    reject = $$reject;
  });
  this.resolve = _aFunction(resolve);
  this.reject = _aFunction(reject);
}

var f$1 = function (C) {
  return new PromiseCapability(C);
};

var _newPromiseCapability = {
	f: f$1
};

var _perform = function (exec) {
  try {
    return { e: false, v: exec() };
  } catch (e) {
    return { e: true, v: e };
  }
};

var navigator$1 = _global.navigator;

var _userAgent = navigator$1 && navigator$1.userAgent || '';

var _promiseResolve = function (C, x) {
  _anObject(C);
  if (_isObject(x) && x.constructor === C) return x;
  var promiseCapability = _newPromiseCapability.f(C);
  var resolve = promiseCapability.resolve;
  resolve(x);
  return promiseCapability.promise;
};

var _redefineAll = function (target, src, safe) {
  for (var key in src) {
    if (safe && target[key]) target[key] = src[key];
    else _hide(target, key, src[key]);
  } return target;
};

var SPECIES$1 = _wks('species');

var _setSpecies = function (KEY) {
  var C = typeof _core[KEY] == 'function' ? _core[KEY] : _global[KEY];
  if (_descriptors && C && !C[SPECIES$1]) _objectDp.f(C, SPECIES$1, {
    configurable: true,
    get: function () { return this; }
  });
};

var ITERATOR$3 = _wks('iterator');
var SAFE_CLOSING = false;

try {
  var riter = [7][ITERATOR$3]();
  riter['return'] = function () { SAFE_CLOSING = true; };
} catch (e) { /* empty */ }

var _iterDetect = function (exec, skipClosing) {
  if (!skipClosing && !SAFE_CLOSING) return false;
  var safe = false;
  try {
    var arr = [7];
    var iter = arr[ITERATOR$3]();
    iter.next = function () { return { done: safe = true }; };
    arr[ITERATOR$3] = function () { return iter; };
    exec(arr);
  } catch (e) { /* empty */ }
  return safe;
};

var task = _task.set;
var microtask = _microtask();




var PROMISE = 'Promise';
var TypeError$1 = _global.TypeError;
var process$2 = _global.process;
var versions = process$2 && process$2.versions;
var v8 = versions && versions.v8 || '';
var $Promise = _global[PROMISE];
var isNode$1 = _classof(process$2) == 'process';
var empty = function () { /* empty */ };
var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;
var newPromiseCapability = newGenericPromiseCapability = _newPromiseCapability.f;

var USE_NATIVE = !!function () {
  try {
    // correct subclassing with @@species support
    var promise = $Promise.resolve(1);
    var FakePromise = (promise.constructor = {})[_wks('species')] = function (exec) {
      exec(empty, empty);
    };
    // unhandled rejections tracking support, NodeJS Promise without it fails @@species test
    return (isNode$1 || typeof PromiseRejectionEvent == 'function')
      && promise.then(empty) instanceof FakePromise
      // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
      // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
      // we can't detect it synchronously, so just check versions
      && v8.indexOf('6.6') !== 0
      && _userAgent.indexOf('Chrome/66') === -1;
  } catch (e) { /* empty */ }
}();

// helpers
var isThenable = function (it) {
  var then;
  return _isObject(it) && typeof (then = it.then) == 'function' ? then : false;
};
var notify = function (promise, isReject) {
  if (promise._n) return;
  promise._n = true;
  var chain = promise._c;
  microtask(function () {
    var value = promise._v;
    var ok = promise._s == 1;
    var i = 0;
    var run = function (reaction) {
      var handler = ok ? reaction.ok : reaction.fail;
      var resolve = reaction.resolve;
      var reject = reaction.reject;
      var domain = reaction.domain;
      var result, then, exited;
      try {
        if (handler) {
          if (!ok) {
            if (promise._h == 2) onHandleUnhandled(promise);
            promise._h = 1;
          }
          if (handler === true) result = value;
          else {
            if (domain) domain.enter();
            result = handler(value); // may throw
            if (domain) {
              domain.exit();
              exited = true;
            }
          }
          if (result === reaction.promise) {
            reject(TypeError$1('Promise-chain cycle'));
          } else if (then = isThenable(result)) {
            then.call(result, resolve, reject);
          } else resolve(result);
        } else reject(value);
      } catch (e) {
        if (domain && !exited) domain.exit();
        reject(e);
      }
    };
    while (chain.length > i) run(chain[i++]); // variable length - can't use forEach
    promise._c = [];
    promise._n = false;
    if (isReject && !promise._h) onUnhandled(promise);
  });
};
var onUnhandled = function (promise) {
  task.call(_global, function () {
    var value = promise._v;
    var unhandled = isUnhandled(promise);
    var result, handler, console;
    if (unhandled) {
      result = _perform(function () {
        if (isNode$1) {
          process$2.emit('unhandledRejection', value, promise);
        } else if (handler = _global.onunhandledrejection) {
          handler({ promise: promise, reason: value });
        } else if ((console = _global.console) && console.error) {
          console.error('Unhandled promise rejection', value);
        }
      });
      // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
      promise._h = isNode$1 || isUnhandled(promise) ? 2 : 1;
    } promise._a = undefined;
    if (unhandled && result.e) throw result.v;
  });
};
var isUnhandled = function (promise) {
  return promise._h !== 1 && (promise._a || promise._c).length === 0;
};
var onHandleUnhandled = function (promise) {
  task.call(_global, function () {
    var handler;
    if (isNode$1) {
      process$2.emit('rejectionHandled', promise);
    } else if (handler = _global.onrejectionhandled) {
      handler({ promise: promise, reason: promise._v });
    }
  });
};
var $reject = function (value) {
  var promise = this;
  if (promise._d) return;
  promise._d = true;
  promise = promise._w || promise; // unwrap
  promise._v = value;
  promise._s = 2;
  if (!promise._a) promise._a = promise._c.slice();
  notify(promise, true);
};
var $resolve = function (value) {
  var promise = this;
  var then;
  if (promise._d) return;
  promise._d = true;
  promise = promise._w || promise; // unwrap
  try {
    if (promise === value) throw TypeError$1("Promise can't be resolved itself");
    if (then = isThenable(value)) {
      microtask(function () {
        var wrapper = { _w: promise, _d: false }; // wrap
        try {
          then.call(value, _ctx($resolve, wrapper, 1), _ctx($reject, wrapper, 1));
        } catch (e) {
          $reject.call(wrapper, e);
        }
      });
    } else {
      promise._v = value;
      promise._s = 1;
      notify(promise, false);
    }
  } catch (e) {
    $reject.call({ _w: promise, _d: false }, e); // wrap
  }
};

// constructor polyfill
if (!USE_NATIVE) {
  // 25.4.3.1 Promise(executor)
  $Promise = function Promise(executor) {
    _anInstance(this, $Promise, PROMISE, '_h');
    _aFunction(executor);
    Internal.call(this);
    try {
      executor(_ctx($resolve, this, 1), _ctx($reject, this, 1));
    } catch (err) {
      $reject.call(this, err);
    }
  };
  // eslint-disable-next-line no-unused-vars
  Internal = function Promise(executor) {
    this._c = [];             // <- awaiting reactions
    this._a = undefined;      // <- checked in isUnhandled reactions
    this._s = 0;              // <- state
    this._d = false;          // <- done
    this._v = undefined;      // <- value
    this._h = 0;              // <- rejection state, 0 - default, 1 - handled, 2 - unhandled
    this._n = false;          // <- notify
  };
  Internal.prototype = _redefineAll($Promise.prototype, {
    // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)
    then: function then(onFulfilled, onRejected) {
      var reaction = newPromiseCapability(_speciesConstructor(this, $Promise));
      reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
      reaction.fail = typeof onRejected == 'function' && onRejected;
      reaction.domain = isNode$1 ? process$2.domain : undefined;
      this._c.push(reaction);
      if (this._a) this._a.push(reaction);
      if (this._s) notify(this, false);
      return reaction.promise;
    },
    // 25.4.5.1 Promise.prototype.catch(onRejected)
    'catch': function (onRejected) {
      return this.then(undefined, onRejected);
    }
  });
  OwnPromiseCapability = function () {
    var promise = new Internal();
    this.promise = promise;
    this.resolve = _ctx($resolve, promise, 1);
    this.reject = _ctx($reject, promise, 1);
  };
  _newPromiseCapability.f = newPromiseCapability = function (C) {
    return C === $Promise || C === Wrapper
      ? new OwnPromiseCapability(C)
      : newGenericPromiseCapability(C);
  };
}

_export(_export.G + _export.W + _export.F * !USE_NATIVE, { Promise: $Promise });
_setToStringTag($Promise, PROMISE);
_setSpecies(PROMISE);
Wrapper = _core[PROMISE];

// statics
_export(_export.S + _export.F * !USE_NATIVE, PROMISE, {
  // 25.4.4.5 Promise.reject(r)
  reject: function reject(r) {
    var capability = newPromiseCapability(this);
    var $$reject = capability.reject;
    $$reject(r);
    return capability.promise;
  }
});
_export(_export.S + _export.F * (_library || !USE_NATIVE), PROMISE, {
  // 25.4.4.6 Promise.resolve(x)
  resolve: function resolve(x) {
    return _promiseResolve(_library && this === Wrapper ? $Promise : this, x);
  }
});
_export(_export.S + _export.F * !(USE_NATIVE && _iterDetect(function (iter) {
  $Promise.all(iter)['catch'](empty);
})), PROMISE, {
  // 25.4.4.1 Promise.all(iterable)
  all: function all(iterable) {
    var C = this;
    var capability = newPromiseCapability(C);
    var resolve = capability.resolve;
    var reject = capability.reject;
    var result = _perform(function () {
      var values = [];
      var index = 0;
      var remaining = 1;
      _forOf(iterable, false, function (promise) {
        var $index = index++;
        var alreadyCalled = false;
        values.push(undefined);
        remaining++;
        C.resolve(promise).then(function (value) {
          if (alreadyCalled) return;
          alreadyCalled = true;
          values[$index] = value;
          --remaining || resolve(values);
        }, reject);
      });
      --remaining || resolve(values);
    });
    if (result.e) reject(result.v);
    return capability.promise;
  },
  // 25.4.4.4 Promise.race(iterable)
  race: function race(iterable) {
    var C = this;
    var capability = newPromiseCapability(C);
    var reject = capability.reject;
    var result = _perform(function () {
      _forOf(iterable, false, function (promise) {
        C.resolve(promise).then(capability.resolve, reject);
      });
    });
    if (result.e) reject(result.v);
    return capability.promise;
  }
});

_export(_export.P + _export.R, 'Promise', { 'finally': function (onFinally) {
  var C = _speciesConstructor(this, _core.Promise || _global.Promise);
  var isFunction = typeof onFinally == 'function';
  return this.then(
    isFunction ? function (x) {
      return _promiseResolve(C, onFinally()).then(function () { return x; });
    } : onFinally,
    isFunction ? function (e) {
      return _promiseResolve(C, onFinally()).then(function () { throw e; });
    } : onFinally
  );
} });

// https://github.com/tc39/proposal-promise-try




_export(_export.S, 'Promise', { 'try': function (callbackfn) {
  var promiseCapability = _newPromiseCapability.f(this);
  var result = _perform(callbackfn);
  (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v);
  return promiseCapability.promise;
} });

var promise = _core.Promise;

var promise$1 = createCommonjsModule(function (module) {
module.exports = { "default": promise, __esModule: true };
});

unwrapExports(promise$1);

var f$2 = Object.getOwnPropertySymbols;

var _objectGops = {
	f: f$2
};

var f$3 = {}.propertyIsEnumerable;

var _objectPie = {
	f: f$3
};

// 19.1.2.1 Object.assign(target, source, ...)





var $assign = Object.assign;

// should work with symbols and should have deterministic property order (V8 bug)
var _objectAssign = !$assign || _fails(function () {
  var A = {};
  var B = {};
  // eslint-disable-next-line no-undef
  var S = Symbol();
  var K = 'abcdefghijklmnopqrst';
  A[S] = 7;
  K.split('').forEach(function (k) { B[k] = k; });
  return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars
  var T = _toObject(target);
  var aLen = arguments.length;
  var index = 1;
  var getSymbols = _objectGops.f;
  var isEnum = _objectPie.f;
  while (aLen > index) {
    var S = _iobject(arguments[index++]);
    var keys = getSymbols ? _objectKeys(S).concat(getSymbols(S)) : _objectKeys(S);
    var length = keys.length;
    var j = 0;
    var key;
    while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];
  } return T;
} : $assign;

// 19.1.3.1 Object.assign(target, source)


_export(_export.S + _export.F, 'Object', { assign: _objectAssign });

var assign = _core.Object.assign;

var assign$1 = createCommonjsModule(function (module) {
module.exports = { "default": assign, __esModule: true };
});

unwrapExports(assign$1);

var core_getIterator = _core.getIterator = function (it) {
  var iterFn = core_getIteratorMethod(it);
  if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!');
  return _anObject(iterFn.call(it));
};

var getIterator = core_getIterator;

var getIterator$1 = createCommonjsModule(function (module) {
module.exports = { "default": getIterator, __esModule: true };
});

unwrapExports(getIterator$1);

var _createProperty = function (object, index, value) {
  if (index in object) _objectDp.f(object, index, _propertyDesc(0, value));
  else object[index] = value;
};

_export(_export.S + _export.F * !_iterDetect(function (iter) { }), 'Array', {
  // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
  from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
    var O = _toObject(arrayLike);
    var C = typeof this == 'function' ? this : Array;
    var aLen = arguments.length;
    var mapfn = aLen > 1 ? arguments[1] : undefined;
    var mapping = mapfn !== undefined;
    var index = 0;
    var iterFn = core_getIteratorMethod(O);
    var length, result, step, iterator;
    if (mapping) mapfn = _ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
    // if object isn't iterable or it's array with default iterator - use simple case
    if (iterFn != undefined && !(C == Array && _isArrayIter(iterFn))) {
      for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {
        _createProperty(result, index, mapping ? _iterCall(iterator, mapfn, [step.value, index], true) : step.value);
      }
    } else {
      length = _toLength(O.length);
      for (result = new C(length); length > index; index++) {
        _createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
      }
    }
    result.length = index;
    return result;
  }
});

var from_1 = _core.Array.from;

var from_1$1 = createCommonjsModule(function (module) {
module.exports = { "default": from_1, __esModule: true };
});

unwrapExports(from_1$1);

var toConsumableArray = createCommonjsModule(function (module, exports) {

exports.__esModule = true;



var _from2 = _interopRequireDefault(from_1$1);

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

exports.default = function (arr) {
  if (Array.isArray(arr)) {
    for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
      arr2[i] = arr[i];
    }

    return arr2;
  } else {
    return (0, _from2.default)(arr);
  }
};
});

unwrapExports(toConsumableArray);

var runtime = createCommonjsModule(function (module) {
/**
 * Copyright (c) 2014-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

!(function(global) {

  var Op = Object.prototype;
  var hasOwn = Op.hasOwnProperty;
  var undefined; // More compressible than void 0.
  var $Symbol = typeof Symbol === "function" ? Symbol : {};
  var iteratorSymbol = $Symbol.iterator || "@@iterator";
  var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  var runtime = global.regeneratorRuntime;
  if (runtime) {
    {
      // If regeneratorRuntime is defined globally and we're in a module,
      // make the exports object identical to regeneratorRuntime.
      module.exports = runtime;
    }
    // Don't bother evaluating the rest of this file if the runtime was
    // already defined globally.
    return;
  }

  // Define the runtime globally (as expected by generated code) as either
  // module.exports (if we're in a module) or a new, empty object.
  runtime = global.regeneratorRuntime = module.exports;

  function wrap(innerFn, outerFn, self, tryLocsList) {
    // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
    var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
    var generator = Object.create(protoGenerator.prototype);
    var context = new Context(tryLocsList || []);

    // The ._invoke method unifies the implementations of the .next,
    // .throw, and .return methods.
    generator._invoke = makeInvokeMethod(innerFn, self, context);

    return generator;
  }
  runtime.wrap = wrap;

  // Try/catch helper to minimize deoptimizations. Returns a completion
  // record like context.tryEntries[i].completion. This interface could
  // have been (and was previously) designed to take a closure to be
  // invoked without arguments, but in all the cases we care about we
  // already have an existing method we want to call, so there's no need
  // to create a new function object. We can even get away with assuming
  // the method takes exactly one argument, since that happens to be true
  // in every case, so we don't have to touch the arguments object. The
  // only additional allocation required is the completion record, which
  // has a stable shape and so hopefully should be cheap to allocate.
  function tryCatch(fn, obj, arg) {
    try {
      return { type: "normal", arg: fn.call(obj, arg) };
    } catch (err) {
      return { type: "throw", arg: err };
    }
  }

  var GenStateSuspendedStart = "suspendedStart";
  var GenStateSuspendedYield = "suspendedYield";
  var GenStateExecuting = "executing";
  var GenStateCompleted = "completed";

  // Returning this object from the innerFn has the same effect as
  // breaking out of the dispatch switch statement.
  var ContinueSentinel = {};

  // Dummy constructor functions that we use as the .constructor and
  // .constructor.prototype properties for functions that return Generator
  // objects. For full spec compliance, you may wish to configure your
  // minifier not to mangle the names of these two functions.
  function Generator() {}
  function GeneratorFunction() {}
  function GeneratorFunctionPrototype() {}

  // This is a polyfill for %IteratorPrototype% for environments that
  // don't natively support it.
  var IteratorPrototype = {};
  IteratorPrototype[iteratorSymbol] = function () {
    return this;
  };

  var getProto = Object.getPrototypeOf;
  var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  if (NativeIteratorPrototype &&
      NativeIteratorPrototype !== Op &&
      hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
    // This environment has a native %IteratorPrototype%; use it instead
    // of the polyfill.
    IteratorPrototype = NativeIteratorPrototype;
  }

  var Gp = GeneratorFunctionPrototype.prototype =
    Generator.prototype = Object.create(IteratorPrototype);
  GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  GeneratorFunctionPrototype.constructor = GeneratorFunction;
  GeneratorFunctionPrototype[toStringTagSymbol] =
    GeneratorFunction.displayName = "GeneratorFunction";

  // Helper for defining the .next, .throw, and .return methods of the
  // Iterator interface in terms of a single ._invoke method.
  function defineIteratorMethods(prototype) {
    ["next", "throw", "return"].forEach(function(method) {
      prototype[method] = function(arg) {
        return this._invoke(method, arg);
      };
    });
  }

  runtime.isGeneratorFunction = function(genFun) {
    var ctor = typeof genFun === "function" && genFun.constructor;
    return ctor
      ? ctor === GeneratorFunction ||
        // For the native GeneratorFunction constructor, the best we can
        // do is to check its .name property.
        (ctor.displayName || ctor.name) === "GeneratorFunction"
      : false;
  };

  runtime.mark = function(genFun) {
    if (Object.setPrototypeOf) {
      Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
    } else {
      genFun.__proto__ = GeneratorFunctionPrototype;
      if (!(toStringTagSymbol in genFun)) {
        genFun[toStringTagSymbol] = "GeneratorFunction";
      }
    }
    genFun.prototype = Object.create(Gp);
    return genFun;
  };

  // Within the body of any async function, `await x` is transformed to
  // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  // `hasOwn.call(value, "__await")` to determine if the yielded value is
  // meant to be awaited.
  runtime.awrap = function(arg) {
    return { __await: arg };
  };

  function AsyncIterator(generator) {
    function invoke(method, arg, resolve, reject) {
      var record = tryCatch(generator[method], generator, arg);
      if (record.type === "throw") {
        reject(record.arg);
      } else {
        var result = record.arg;
        var value = result.value;
        if (value &&
            typeof value === "object" &&
            hasOwn.call(value, "__await")) {
          return Promise.resolve(value.__await).then(function(value) {
            invoke("next", value, resolve, reject);
          }, function(err) {
            invoke("throw", err, resolve, reject);
          });
        }

        return Promise.resolve(value).then(function(unwrapped) {
          // When a yielded Promise is resolved, its final value becomes
          // the .value of the Promise<{value,done}> result for the
          // current iteration. If the Promise is rejected, however, the
          // result for this iteration will be rejected with the same
          // reason. Note that rejections of yielded Promises are not
          // thrown back into the generator function, as is the case
          // when an awaited Promise is rejected. This difference in
          // behavior between yield and await is important, because it
          // allows the consumer to decide what to do with the yielded
          // rejection (swallow it and continue, manually .throw it back
          // into the generator, abandon iteration, whatever). With
          // await, by contrast, there is no opportunity to examine the
          // rejection reason outside the generator function, so the
          // only option is to throw it from the await expression, and
          // let the generator function handle the exception.
          result.value = unwrapped;
          resolve(result);
        }, reject);
      }
    }

    var previousPromise;

    function enqueue(method, arg) {
      function callInvokeWithMethodAndArg() {
        return new Promise(function(resolve, reject) {
          invoke(method, arg, resolve, reject);
        });
      }

      return previousPromise =
        // If enqueue has been called before, then we want to wait until
        // all previous Promises have been resolved before calling invoke,
        // so that results are always delivered in the correct order. If
        // enqueue has not been called before, then it is important to
        // call invoke immediately, without waiting on a callback to fire,
        // so that the async generator function has the opportunity to do
        // any necessary setup in a predictable way. This predictability
        // is why the Promise constructor synchronously invokes its
        // executor callback, and why async functions synchronously
        // execute code before the first await. Since we implement simple
        // async functions in terms of async generators, it is especially
        // important to get this right, even though it requires care.
        previousPromise ? previousPromise.then(
          callInvokeWithMethodAndArg,
          // Avoid propagating failures to Promises returned by later
          // invocations of the iterator.
          callInvokeWithMethodAndArg
        ) : callInvokeWithMethodAndArg();
    }

    // Define the unified helper method that is used to implement .next,
    // .throw, and .return (see defineIteratorMethods).
    this._invoke = enqueue;
  }

  defineIteratorMethods(AsyncIterator.prototype);
  AsyncIterator.prototype[asyncIteratorSymbol] = function () {
    return this;
  };
  runtime.AsyncIterator = AsyncIterator;

  // Note that simple async functions are implemented on top of
  // AsyncIterator objects; they just return a Promise for the value of
  // the final result produced by the iterator.
  runtime.async = function(innerFn, outerFn, self, tryLocsList) {
    var iter = new AsyncIterator(
      wrap(innerFn, outerFn, self, tryLocsList)
    );

    return runtime.isGeneratorFunction(outerFn)
      ? iter // If outerFn is a generator, return the full iterator.
      : iter.next().then(function(result) {
          return result.done ? result.value : iter.next();
        });
  };

  function makeInvokeMethod(innerFn, self, context) {
    var state = GenStateSuspendedStart;

    return function invoke(method, arg) {
      if (state === GenStateExecuting) {
        throw new Error("Generator is already running");
      }

      if (state === GenStateCompleted) {
        if (method === "throw") {
          throw arg;
        }

        // Be forgiving, per 25.3.3.3.3 of the spec:
        // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
        return doneResult();
      }

      context.method = method;
      context.arg = arg;

      while (true) {
        var delegate = context.delegate;
        if (delegate) {
          var delegateResult = maybeInvokeDelegate(delegate, context);
          if (delegateResult) {
            if (delegateResult === ContinueSentinel) continue;
            return delegateResult;
          }
        }

        if (context.method === "next") {
          // Setting context._sent for legacy support of Babel's
          // function.sent implementation.
          context.sent = context._sent = context.arg;

        } else if (context.method === "throw") {
          if (state === GenStateSuspendedStart) {
            state = GenStateCompleted;
            throw context.arg;
          }

          context.dispatchException(context.arg);

        } else if (context.method === "return") {
          context.abrupt("return", context.arg);
        }

        state = GenStateExecuting;

        var record = tryCatch(innerFn, self, context);
        if (record.type === "normal") {
          // If an exception is thrown from innerFn, we leave state ===
          // GenStateExecuting and loop back for another invocation.
          state = context.done
            ? GenStateCompleted
            : GenStateSuspendedYield;

          if (record.arg === ContinueSentinel) {
            continue;
          }

          return {
            value: record.arg,
            done: context.done
          };

        } else if (record.type === "throw") {
          state = GenStateCompleted;
          // Dispatch the exception by looping back around to the
          // context.dispatchException(context.arg) call above.
          context.method = "throw";
          context.arg = record.arg;
        }
      }
    };
  }

  // Call delegate.iterator[context.method](context.arg) and handle the
  // result, either by returning a { value, done } result from the
  // delegate iterator, or by modifying context.method and context.arg,
  // setting context.delegate to null, and returning the ContinueSentinel.
  function maybeInvokeDelegate(delegate, context) {
    var method = delegate.iterator[context.method];
    if (method === undefined) {
      // A .throw or .return when the delegate iterator has no .throw
      // method always terminates the yield* loop.
      context.delegate = null;

      if (context.method === "throw") {
        if (delegate.iterator.return) {
          // If the delegate iterator has a return method, give it a
          // chance to clean up.
          context.method = "return";
          context.arg = undefined;
          maybeInvokeDelegate(delegate, context);

          if (context.method === "throw") {
            // If maybeInvokeDelegate(context) changed context.method from
            // "return" to "throw", let that override the TypeError below.
            return ContinueSentinel;
          }
        }

        context.method = "throw";
        context.arg = new TypeError(
          "The iterator does not provide a 'throw' method");
      }

      return ContinueSentinel;
    }

    var record = tryCatch(method, delegate.iterator, context.arg);

    if (record.type === "throw") {
      context.method = "throw";
      context.arg = record.arg;
      context.delegate = null;
      return ContinueSentinel;
    }

    var info = record.arg;

    if (! info) {
      context.method = "throw";
      context.arg = new TypeError("iterator result is not an object");
      context.delegate = null;
      return ContinueSentinel;
    }

    if (info.done) {
      // Assign the result of the finished delegate to the temporary
      // variable specified by delegate.resultName (see delegateYield).
      context[delegate.resultName] = info.value;

      // Resume execution at the desired location (see delegateYield).
      context.next = delegate.nextLoc;

      // If context.method was "throw" but the delegate handled the
      // exception, let the outer generator proceed normally. If
      // context.method was "next", forget context.arg since it has been
      // "consumed" by the delegate iterator. If context.method was
      // "return", allow the original .return call to continue in the
      // outer generator.
      if (context.method !== "return") {
        context.method = "next";
        context.arg = undefined;
      }

    } else {
      // Re-yield the result returned by the delegate method.
      return info;
    }

    // The delegate iterator is finished, so forget it and continue with
    // the outer generator.
    context.delegate = null;
    return ContinueSentinel;
  }

  // Define Generator.prototype.{next,throw,return} in terms of the
  // unified ._invoke helper method.
  defineIteratorMethods(Gp);

  Gp[toStringTagSymbol] = "Generator";

  // A Generator should always return itself as the iterator object when the
  // @@iterator function is called on it. Some browsers' implementations of the
  // iterator prototype chain incorrectly implement this, causing the Generator
  // object to not be returned from this call. This ensures that doesn't happen.
  // See https://github.com/facebook/regenerator/issues/274 for more details.
  Gp[iteratorSymbol] = function() {
    return this;
  };

  Gp.toString = function() {
    return "[object Generator]";
  };

  function pushTryEntry(locs) {
    var entry = { tryLoc: locs[0] };

    if (1 in locs) {
      entry.catchLoc = locs[1];
    }

    if (2 in locs) {
      entry.finallyLoc = locs[2];
      entry.afterLoc = locs[3];
    }

    this.tryEntries.push(entry);
  }

  function resetTryEntry(entry) {
    var record = entry.completion || {};
    record.type = "normal";
    delete record.arg;
    entry.completion = record;
  }

  function Context(tryLocsList) {
    // The root entry object (effectively a try statement without a catch
    // or a finally block) gives us a place to store values thrown from
    // locations where there is no enclosing try statement.
    this.tryEntries = [{ tryLoc: "root" }];
    tryLocsList.forEach(pushTryEntry, this);
    this.reset(true);
  }

  runtime.keys = function(object) {
    var keys = [];
    for (var key in object) {
      keys.push(key);
    }
    keys.reverse();

    // Rather than returning an object with a next method, we keep
    // things simple and return the next function itself.
    return function next() {
      while (keys.length) {
        var key = keys.pop();
        if (key in object) {
          next.value = key;
          next.done = false;
          return next;
        }
      }

      // To avoid creating an additional object, we just hang the .value
      // and .done properties off the next function object itself. This
      // also ensures that the minifier will not anonymize the function.
      next.done = true;
      return next;
    };
  };

  function values(iterable) {
    if (iterable) {
      var iteratorMethod = iterable[iteratorSymbol];
      if (iteratorMethod) {
        return iteratorMethod.call(iterable);
      }

      if (typeof iterable.next === "function") {
        return iterable;
      }

      if (!isNaN(iterable.length)) {
        var i = -1, next = function next() {
          while (++i < iterable.length) {
            if (hasOwn.call(iterable, i)) {
              next.value = iterable[i];
              next.done = false;
              return next;
            }
          }

          next.value = undefined;
          next.done = true;

          return next;
        };

        return next.next = next;
      }
    }

    // Return an iterator with no values.
    return { next: doneResult };
  }
  runtime.values = values;

  function doneResult() {
    return { value: undefined, done: true };
  }

  Context.prototype = {
    constructor: Context,

    reset: function(skipTempReset) {
      this.prev = 0;
      this.next = 0;
      // Resetting context._sent for legacy support of Babel's
      // function.sent implementation.
      this.sent = this._sent = undefined;
      this.done = false;
      this.delegate = null;

      this.method = "next";
      this.arg = undefined;

      this.tryEntries.forEach(resetTryEntry);

      if (!skipTempReset) {
        for (var name in this) {
          // Not sure about the optimal order of these conditions:
          if (name.charAt(0) === "t" &&
              hasOwn.call(this, name) &&
              !isNaN(+name.slice(1))) {
            this[name] = undefined;
          }
        }
      }
    },

    stop: function() {
      this.done = true;

      var rootEntry = this.tryEntries[0];
      var rootRecord = rootEntry.completion;
      if (rootRecord.type === "throw") {
        throw rootRecord.arg;
      }

      return this.rval;
    },

    dispatchException: function(exception) {
      if (this.done) {
        throw exception;
      }

      var context = this;
      function handle(loc, caught) {
        record.type = "throw";
        record.arg = exception;
        context.next = loc;

        if (caught) {
          // If the dispatched exception was caught by a catch block,
          // then let that catch block handle the exception normally.
          context.method = "next";
          context.arg = undefined;
        }

        return !! caught;
      }

      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
        var entry = this.tryEntries[i];
        var record = entry.completion;

        if (entry.tryLoc === "root") {
          // Exception thrown outside of any try block that could handle
          // it, so set the completion value of the entire function to
          // throw the exception.
          return handle("end");
        }

        if (entry.tryLoc <= this.prev) {
          var hasCatch = hasOwn.call(entry, "catchLoc");
          var hasFinally = hasOwn.call(entry, "finallyLoc");

          if (hasCatch && hasFinally) {
            if (this.prev < entry.catchLoc) {
              return handle(entry.catchLoc, true);
            } else if (this.prev < entry.finallyLoc) {
              return handle(entry.finallyLoc);
            }

          } else if (hasCatch) {
            if (this.prev < entry.catchLoc) {
              return handle(entry.catchLoc, true);
            }

          } else if (hasFinally) {
            if (this.prev < entry.finallyLoc) {
              return handle(entry.finallyLoc);
            }

          } else {
            throw new Error("try statement without catch or finally");
          }
        }
      }
    },

    abrupt: function(type, arg) {
      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
        var entry = this.tryEntries[i];
        if (entry.tryLoc <= this.prev &&
            hasOwn.call(entry, "finallyLoc") &&
            this.prev < entry.finallyLoc) {
          var finallyEntry = entry;
          break;
        }
      }

      if (finallyEntry &&
          (type === "break" ||
           type === "continue") &&
          finallyEntry.tryLoc <= arg &&
          arg <= finallyEntry.finallyLoc) {
        // Ignore the finally entry if control is not jumping to a
        // location outside the try/catch block.
        finallyEntry = null;
      }

      var record = finallyEntry ? finallyEntry.completion : {};
      record.type = type;
      record.arg = arg;

      if (finallyEntry) {
        this.method = "next";
        this.next = finallyEntry.finallyLoc;
        return ContinueSentinel;
      }

      return this.complete(record);
    },

    complete: function(record, afterLoc) {
      if (record.type === "throw") {
        throw record.arg;
      }

      if (record.type === "break" ||
          record.type === "continue") {
        this.next = record.arg;
      } else if (record.type === "return") {
        this.rval = this.arg = record.arg;
        this.method = "return";
        this.next = "end";
      } else if (record.type === "normal" && afterLoc) {
        this.next = afterLoc;
      }

      return ContinueSentinel;
    },

    finish: function(finallyLoc) {
      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
        var entry = this.tryEntries[i];
        if (entry.finallyLoc === finallyLoc) {
          this.complete(entry.completion, entry.afterLoc);
          resetTryEntry(entry);
          return ContinueSentinel;
        }
      }
    },

    "catch": function(tryLoc) {
      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
        var entry = this.tryEntries[i];
        if (entry.tryLoc === tryLoc) {
          var record = entry.completion;
          if (record.type === "throw") {
            var thrown = record.arg;
            resetTryEntry(entry);
          }
          return thrown;
        }
      }

      // The context.catch method must only be called with a location
      // argument that corresponds to a known catch block.
      throw new Error("illegal catch attempt");
    },

    delegateYield: function(iterable, resultName, nextLoc) {
      this.delegate = {
        iterator: values(iterable),
        resultName: resultName,
        nextLoc: nextLoc
      };

      if (this.method === "next") {
        // Deliberately forget the last sent value so that we don't
        // accidentally pass it on to the delegate.
        this.arg = undefined;
      }

      return ContinueSentinel;
    }
  };
})(
  // In sloppy mode, unbound `this` refers to the global object, fallback to
  // Function constructor if we're in global strict mode. That is sadly a form
  // of indirect eval which violates Content Security Policy.
  (function() { return this })() || Function("return this")()
);
});

/**
 * Copyright (c) 2014-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

// This method of obtaining a reference to the global object needs to be
// kept identical to the way it is obtained in runtime.js
var g = (function() { return this })() || Function("return this")();

// Use `getOwnPropertyNames` because not all browsers support calling
// `hasOwnProperty` on the global `self` object in a worker. See #183.
var hadRuntime = g.regeneratorRuntime &&
  Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0;

// Save the old regeneratorRuntime in case it needs to be restored later.
var oldRuntime = hadRuntime && g.regeneratorRuntime;

// Force reevalutation of runtime.js.
g.regeneratorRuntime = undefined;

var runtimeModule = runtime;

if (hadRuntime) {
  // Restore the original runtime.
  g.regeneratorRuntime = oldRuntime;
} else {
  // Remove the global property added by runtime.js.
  try {
    delete g.regeneratorRuntime;
  } catch(e) {
    g.regeneratorRuntime = undefined;
  }
}

var regenerator = runtimeModule;

var asyncToGenerator = createCommonjsModule(function (module, exports) {

exports.__esModule = true;



var _promise2 = _interopRequireDefault(promise$1);

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

exports.default = function (fn) {
  return function () {
    var gen = fn.apply(this, arguments);
    return new _promise2.default(function (resolve, reject) {
      function step(key, arg) {
        try {
          var info = gen[key](arg);
          var value = info.value;
        } catch (error) {
          reject(error);
          return;
        }

        if (info.done) {
          resolve(value);
        } else {
          return _promise2.default.resolve(value).then(function (value) {
            step("next", value);
          }, function (err) {
            step("throw", err);
          });
        }
      }

      return step("next");
    });
  };
};
});

unwrapExports(asyncToGenerator);

var classCallCheck = createCommonjsModule(function (module, exports) {

exports.__esModule = true;

exports.default = function (instance, Constructor) {
  if (!(instance instanceof Constructor)) {
    throw new TypeError("Cannot call a class as a function");
  }
};
});

unwrapExports(classCallCheck);

// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
_export(_export.S + _export.F * !_descriptors, 'Object', { defineProperty: _objectDp.f });

var $Object = _core.Object;
var defineProperty = function defineProperty(it, key, desc) {
  return $Object.defineProperty(it, key, desc);
};

var defineProperty$1 = createCommonjsModule(function (module) {
module.exports = { "default": defineProperty, __esModule: true };
});

unwrapExports(defineProperty$1);

var createClass = createCommonjsModule(function (module, exports) {

exports.__esModule = true;



var _defineProperty2 = _interopRequireDefault(defineProperty$1);

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

exports.default = function () {
  function defineProperties(target, props) {
    for (var i = 0; i < props.length; i++) {
      var descriptor = props[i];
      descriptor.enumerable = descriptor.enumerable || false;
      descriptor.configurable = true;
      if ("value" in descriptor) descriptor.writable = true;
      (0, _defineProperty2.default)(target, descriptor.key, descriptor);
    }
  }

  return function (Constructor, protoProps, staticProps) {
    if (protoProps) defineProperties(Constructor.prototype, protoProps);
    if (staticProps) defineProperties(Constructor, staticProps);
    return Constructor;
  };
}();
});

unwrapExports(createClass);

// most Object methods by ES6 should accept primitives



var _objectSap = function (KEY, exec) {
  var fn = (_core.Object || {})[KEY] || Object[KEY];
  var exp = {};
  exp[KEY] = exec(fn);
  _export(_export.S + _export.F * _fails(function () { fn(1); }), 'Object', exp);
};

// 19.1.2.14 Object.keys(O)



_objectSap('keys', function () {
  return function keys(it) {
    return _objectKeys(_toObject(it));
  };
});

var keys = _core.Object.keys;

var keys$1 = createCommonjsModule(function (module) {
module.exports = { "default": keys, __esModule: true };
});

unwrapExports(keys$1);

var domain;

// This constructor is used to store event handlers. Instantiating this is
// faster than explicitly calling `Object.create(null)` to get a "clean" empty
// object (tested with v8 v4.9).
function EventHandlers() {}
EventHandlers.prototype = Object.create(null);

function EventEmitter() {
  EventEmitter.init.call(this);
}

// nodejs oddity
// require('events') === require('events').EventEmitter
EventEmitter.EventEmitter = EventEmitter;

EventEmitter.usingDomains = false;

EventEmitter.prototype.domain = undefined;
EventEmitter.prototype._events = undefined;
EventEmitter.prototype._maxListeners = undefined;

// By default EventEmitters will print a warning if more than 10 listeners are
// added to it. This is a useful default which helps finding memory leaks.
EventEmitter.defaultMaxListeners = 10;

EventEmitter.init = function() {
  this.domain = null;
  if (EventEmitter.usingDomains) {
    // if there is an active domain, then attach to it.
    if (domain.active && !(this instanceof domain.Domain)) ;
  }

  if (!this._events || this._events === Object.getPrototypeOf(this)._events) {
    this._events = new EventHandlers();
    this._eventsCount = 0;
  }

  this._maxListeners = this._maxListeners || undefined;
};

// Obviously not all Emitters should be limited to 10. This function allows
// that to be increased. Set to zero for unlimited.
EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
  if (typeof n !== 'number' || n < 0 || isNaN(n))
    throw new TypeError('"n" argument must be a positive number');
  this._maxListeners = n;
  return this;
};

function $getMaxListeners(that) {
  if (that._maxListeners === undefined)
    return EventEmitter.defaultMaxListeners;
  return that._maxListeners;
}

EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
  return $getMaxListeners(this);
};

// These standalone emit* functions are used to optimize calling of event
// handlers for fast cases because emit() itself often has a variable number of
// arguments and can be deoptimized because of that. These functions always have
// the same number of arguments and thus do not get deoptimized, so the code
// inside them can execute faster.
function emitNone(handler, isFn, self) {
  if (isFn)
    handler.call(self);
  else {
    var len = handler.length;
    var listeners = arrayClone(handler, len);
    for (var i = 0; i < len; ++i)
      listeners[i].call(self);
  }
}
function emitOne(handler, isFn, self, arg1) {
  if (isFn)
    handler.call(self, arg1);
  else {
    var len = handler.length;
    var listeners = arrayClone(handler, len);
    for (var i = 0; i < len; ++i)
      listeners[i].call(self, arg1);
  }
}
function emitTwo(handler, isFn, self, arg1, arg2) {
  if (isFn)
    handler.call(self, arg1, arg2);
  else {
    var len = handler.length;
    var listeners = arrayClone(handler, len);
    for (var i = 0; i < len; ++i)
      listeners[i].call(self, arg1, arg2);
  }
}
function emitThree(handler, isFn, self, arg1, arg2, arg3) {
  if (isFn)
    handler.call(self, arg1, arg2, arg3);
  else {
    var len = handler.length;
    var listeners = arrayClone(handler, len);
    for (var i = 0; i < len; ++i)
      listeners[i].call(self, arg1, arg2, arg3);
  }
}

function emitMany(handler, isFn, self, args) {
  if (isFn)
    handler.apply(self, args);
  else {
    var len = handler.length;
    var listeners = arrayClone(handler, len);
    for (var i = 0; i < len; ++i)
      listeners[i].apply(self, args);
  }
}

EventEmitter.prototype.emit = function emit(type) {
  var er, handler, len, args, i, events, domain;
  var doError = (type === 'error');

  events = this._events;
  if (events)
    doError = (doError && events.error == null);
  else if (!doError)
    return false;

  domain = this.domain;

  // If there is no 'error' event listener then throw.
  if (doError) {
    er = arguments[1];
    if (domain) {
      if (!er)
        er = new Error('Uncaught, unspecified "error" event');
      er.domainEmitter = this;
      er.domain = domain;
      er.domainThrown = false;
      domain.emit('error', er);
    } else if (er instanceof Error) {
      throw er; // Unhandled 'error' event
    } else {
      // At least give some kind of context to the user
      var err = new Error('Uncaught, unspecified "error" event. (' + er + ')');
      err.context = er;
      throw err;
    }
    return false;
  }

  handler = events[type];

  if (!handler)
    return false;

  var isFn = typeof handler === 'function';
  len = arguments.length;
  switch (len) {
    // fast cases
    case 1:
      emitNone(handler, isFn, this);
      break;
    case 2:
      emitOne(handler, isFn, this, arguments[1]);
      break;
    case 3:
      emitTwo(handler, isFn, this, arguments[1], arguments[2]);
      break;
    case 4:
      emitThree(handler, isFn, this, arguments[1], arguments[2], arguments[3]);
      break;
    // slower
    default:
      args = new Array(len - 1);
      for (i = 1; i < len; i++)
        args[i - 1] = arguments[i];
      emitMany(handler, isFn, this, args);
  }

  return true;
};

function _addListener(target, type, listener, prepend) {
  var m;
  var events;
  var existing;

  if (typeof listener !== 'function')
    throw new TypeError('"listener" argument must be a function');

  events = target._events;
  if (!events) {
    events = target._events = new EventHandlers();
    target._eventsCount = 0;
  } else {
    // To avoid recursion in the case that type === "newListener"! Before
    // adding it to the listeners, first emit "newListener".
    if (events.newListener) {
      target.emit('newListener', type,
                  listener.listener ? listener.listener : listener);

      // Re-assign `events` because a newListener handler could have caused the
      // this._events to be assigned to a new object
      events = target._events;
    }
    existing = events[type];
  }

  if (!existing) {
    // Optimize the case of one listener. Don't need the extra array object.
    existing = events[type] = listener;
    ++target._eventsCount;
  } else {
    if (typeof existing === 'function') {
      // Adding the second element, need to change to array.
      existing = events[type] = prepend ? [listener, existing] :
                                          [existing, listener];
    } else {
      // If we've already got an array, just append.
      if (prepend) {
        existing.unshift(listener);
      } else {
        existing.push(listener);
      }
    }

    // Check for listener leak
    if (!existing.warned) {
      m = $getMaxListeners(target);
      if (m && m > 0 && existing.length > m) {
        existing.warned = true;
        var w = new Error('Possible EventEmitter memory leak detected. ' +
                            existing.length + ' ' + type + ' listeners added. ' +
                            'Use emitter.setMaxListeners() to increase limit');
        w.name = 'MaxListenersExceededWarning';
        w.emitter = target;
        w.type = type;
        w.count = existing.length;
        emitWarning(w);
      }
    }
  }

  return target;
}
function emitWarning(e) {
  typeof console.warn === 'function' ? console.warn(e) : console.log(e);
}
EventEmitter.prototype.addListener = function addListener(type, listener) {
  return _addListener(this, type, listener, false);
};

EventEmitter.prototype.on = EventEmitter.prototype.addListener;

EventEmitter.prototype.prependListener =
    function prependListener(type, listener) {
      return _addListener(this, type, listener, true);
    };

function _onceWrap(target, type, listener) {
  var fired = false;
  function g() {
    target.removeListener(type, g);
    if (!fired) {
      fired = true;
      listener.apply(target, arguments);
    }
  }
  g.listener = listener;
  return g;
}

EventEmitter.prototype.once = function once(type, listener) {
  if (typeof listener !== 'function')
    throw new TypeError('"listener" argument must be a function');
  this.on(type, _onceWrap(this, type, listener));
  return this;
};

EventEmitter.prototype.prependOnceListener =
    function prependOnceListener(type, listener) {
      if (typeof listener !== 'function')
        throw new TypeError('"listener" argument must be a function');
      this.prependListener(type, _onceWrap(this, type, listener));
      return this;
    };

// emits a 'removeListener' event iff the listener was removed
EventEmitter.prototype.removeListener =
    function removeListener(type, listener) {
      var list, events, position, i, originalListener;

      if (typeof listener !== 'function')
        throw new TypeError('"listener" argument must be a function');

      events = this._events;
      if (!events)
        return this;

      list = events[type];
      if (!list)
        return this;

      if (list === listener || (list.listener && list.listener === listener)) {
        if (--this._eventsCount === 0)
          this._events = new EventHandlers();
        else {
          delete events[type];
          if (events.removeListener)
            this.emit('removeListener', type, list.listener || listener);
        }
      } else if (typeof list !== 'function') {
        position = -1;

        for (i = list.length; i-- > 0;) {
          if (list[i] === listener ||
              (list[i].listener && list[i].listener === listener)) {
            originalListener = list[i].listener;
            position = i;
            break;
          }
        }

        if (position < 0)
          return this;

        if (list.length === 1) {
          list[0] = undefined;
          if (--this._eventsCount === 0) {
            this._events = new EventHandlers();
            return this;
          } else {
            delete events[type];
          }
        } else {
          spliceOne(list, position);
        }

        if (events.removeListener)
          this.emit('removeListener', type, originalListener || listener);
      }

      return this;
    };

EventEmitter.prototype.removeAllListeners =
    function removeAllListeners(type) {
      var listeners, events;

      events = this._events;
      if (!events)
        return this;

      // not listening for removeListener, no need to emit
      if (!events.removeListener) {
        if (arguments.length === 0) {
          this._events = new EventHandlers();
          this._eventsCount = 0;
        } else if (events[type]) {
          if (--this._eventsCount === 0)
            this._events = new EventHandlers();
          else
            delete events[type];
        }
        return this;
      }

      // emit removeListener for all listeners on all events
      if (arguments.length === 0) {
        var keys = Object.keys(events);
        for (var i = 0, key; i < keys.length; ++i) {
          key = keys[i];
          if (key === 'removeListener') continue;
          this.removeAllListeners(key);
        }
        this.removeAllListeners('removeListener');
        this._events = new EventHandlers();
        this._eventsCount = 0;
        return this;
      }

      listeners = events[type];

      if (typeof listeners === 'function') {
        this.removeListener(type, listeners);
      } else if (listeners) {
        // LIFO order
        do {
          this.removeListener(type, listeners[listeners.length - 1]);
        } while (listeners[0]);
      }

      return this;
    };

EventEmitter.prototype.listeners = function listeners(type) {
  var evlistener;
  var ret;
  var events = this._events;

  if (!events)
    ret = [];
  else {
    evlistener = events[type];
    if (!evlistener)
      ret = [];
    else if (typeof evlistener === 'function')
      ret = [evlistener.listener || evlistener];
    else
      ret = unwrapListeners(evlistener);
  }

  return ret;
};

EventEmitter.listenerCount = function(emitter, type) {
  if (typeof emitter.listenerCount === 'function') {
    return emitter.listenerCount(type);
  } else {
    return listenerCount.call(emitter, type);
  }
};

EventEmitter.prototype.listenerCount = listenerCount;
function listenerCount(type) {
  var events = this._events;

  if (events) {
    var evlistener = events[type];

    if (typeof evlistener === 'function') {
      return 1;
    } else if (evlistener) {
      return evlistener.length;
    }
  }

  return 0;
}

EventEmitter.prototype.eventNames = function eventNames() {
  return this._eventsCount > 0 ? Reflect.ownKeys(this._events) : [];
};

// About 1.5x faster than the two-arg version of Array#splice().
function spliceOne(list, index) {
  for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1)
    list[i] = list[k];
  list.pop();
}

function arrayClone(arr, i) {
  var copy = new Array(i);
  while (i--)
    copy[i] = arr[i];
  return copy;
}

function unwrapListeners(arr) {
  var ret = new Array(arr.length);
  for (var i = 0; i < ret.length; ++i) {
    ret[i] = arr[i].listener || arr[i];
  }
  return ret;
}

var events = /*#__PURE__*/Object.freeze({
  default: EventEmitter,
  EventEmitter: EventEmitter
});

var _events2 = ( events && EventEmitter ) || events;

var Transport_1 = createCommonjsModule(function (module, exports) {

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.StatusCodes = undefined;



var _promise2 = _interopRequireDefault(promise$1);



var _assign2 = _interopRequireDefault(assign$1);



var _getIterator3 = _interopRequireDefault(getIterator$1);



var _toConsumableArray3 = _interopRequireDefault(toConsumableArray);



var _regenerator2 = _interopRequireDefault(regenerator);



var _asyncToGenerator3 = _interopRequireDefault(asyncToGenerator);



var _classCallCheck3 = _interopRequireDefault(classCallCheck);



var _createClass3 = _interopRequireDefault(createClass);



var _keys2 = _interopRequireDefault(keys$1);

exports.getAltStatusMessage = getAltStatusMessage;
exports.TransportError = TransportError;
exports.TransportStatusError = TransportStatusError;



var _events3 = _interopRequireDefault(_events2);

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

/**
 * all possible status codes.
 * @see https://github.com/LedgerHQ/blue-app-btc/blob/d8a03d10f77ca5ef8b22a5d062678eef788b824a/include/btchip_apdu_constants.h#L85-L115
 * @example
 * import { StatusCodes } from "@ledgerhq/hw-transport";
 */


/**
 */


/**
 */


/**
 */

/**
 */
var StatusCodes = exports.StatusCodes = {
  PIN_REMAINING_ATTEMPTS: 0x63c0,
  INCORRECT_LENGTH: 0x6700,
  COMMAND_INCOMPATIBLE_FILE_STRUCTURE: 0x6981,
  SECURITY_STATUS_NOT_SATISFIED: 0x6982,
  CONDITIONS_OF_USE_NOT_SATISFIED: 0x6985,
  INCORRECT_DATA: 0x6a80,
  NOT_ENOUGH_MEMORY_SPACE: 0x6a84,
  REFERENCED_DATA_NOT_FOUND: 0x6a88,
  FILE_ALREADY_EXISTS: 0x6a89,
  INCORRECT_P1_P2: 0x6b00,
  INS_NOT_SUPPORTED: 0x6d00,
  CLA_NOT_SUPPORTED: 0x6e00,
  TECHNICAL_PROBLEM: 0x6f00,
  OK: 0x9000,
  MEMORY_PROBLEM: 0x9240,
  NO_EF_SELECTED: 0x9400,
  INVALID_OFFSET: 0x9402,
  FILE_NOT_FOUND: 0x9404,
  INCONSISTENT_FILE: 0x9408,
  ALGORITHM_NOT_SUPPORTED: 0x9484,
  INVALID_KCV: 0x9485,
  CODE_NOT_INITIALIZED: 0x9802,
  ACCESS_CONDITION_NOT_FULFILLED: 0x9804,
  CONTRADICTION_SECRET_CODE_STATUS: 0x9808,
  CONTRADICTION_INVALIDATION: 0x9810,
  CODE_BLOCKED: 0x9840,
  MAX_VALUE_REACHED: 0x9850,
  GP_AUTH_FAILED: 0x6300,
  LICENSING: 0x6f42,
  HALTED: 0x6faa
};

function getAltStatusMessage(code) {
  switch (code) {
    // improve text of most common errors
    case 0x6700:
      return "Incorrect length";
    case 0x6982:
      return "Security not satisfied (dongle locked or have invalid access rights)";
    case 0x6985:
      return "Condition of use not satisfied (denied by the user?)";
    case 0x6a80:
      return "Invalid data received";
    case 0x6b00:
      return "Invalid parameter received";
  }
  if (0x6f00 <= code && code <= 0x6fff) {
    return "Internal error, please report";
  }
}

/**
 * TransportError is used for any generic transport errors.
 * e.g. Error thrown when data received by exchanges are incorrect or if exchanged failed to communicate with the device for various reason.
 */
function TransportError(message, id) {
  this.name = "TransportError";
  this.message = message;
  this.stack = new Error().stack;
  this.id = id;
}
//$FlowFixMe
TransportError.prototype = new Error();

/**
 * Error thrown when a device returned a non success status.
 * the error.statusCode is one of the `StatusCodes` exported by this library.
 */
function TransportStatusError(statusCode) {
  this.name = "TransportStatusError";
  var statusText = (0, _keys2.default)(StatusCodes).find(function (k) {
    return StatusCodes[k] === statusCode;
  }) || "UNKNOWN_ERROR";
  var smsg = getAltStatusMessage(statusCode) || statusText;
  var statusCodeStr = statusCode.toString(16);
  this.message = "Ledger device: " + smsg + " (0x" + statusCodeStr + ")";
  this.stack = new Error().stack;
  this.statusCode = statusCode;
  this.statusText = statusText;
}
//$FlowFixMe
TransportStatusError.prototype = new Error();

/**
 * Transport defines the generic interface to share between node/u2f impl
 * A **Descriptor** is a parametric type that is up to be determined for the implementation.
 * it can be for instance an ID, an file path, a URL,...
 */

var Transport = function () {
  function Transport() {
    var _this = this;

    (0, _classCallCheck3.default)(this, Transport);
    this.debug = commonjsGlobal.__ledgerDebug || null;
    this.exchangeTimeout = 30000;
    this._events = new _events3.default();

    this.send = function () {
      var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(cla, ins, p1, p2) {
        var data = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : Buffer.alloc(0);
        var statusList = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : [StatusCodes.OK];
        var response, sw;
        return _regenerator2.default.wrap(function _callee$(_context) {
          while (1) {
            switch (_context.prev = _context.next) {
              case 0:
                if (!(data.length >= 256)) {
                  _context.next = 2;
                  break;
                }

                throw new TransportError("data.length exceed 256 bytes limit. Got: " + data.length, "DataLengthTooBig");

              case 2:
                _context.next = 4;
                return _this.exchange(Buffer.concat([Buffer.from([cla, ins, p1, p2]), Buffer.from([data.length]), data]));

              case 4:
                response = _context.sent;
                sw = response.readUInt16BE(response.length - 2);

                if (statusList.some(function (s) {
                  return s === sw;
                })) {
                  _context.next = 8;
                  break;
                }

                throw new TransportStatusError(sw);

              case 8:
                return _context.abrupt("return", response);

              case 9:
              case "end":
                return _context.stop();
            }
          }
        }, _callee, _this);
      }));

      return function (_x, _x2, _x3, _x4) {
        return _ref.apply(this, arguments);
      };
    }();

    this._appAPIlock = null;
  }

  /**
   * Statically check if a transport is supported on the user's platform/browser.
   */


  /**
   * List once all available descriptors. For a better granularity, checkout `listen()`.
   * @return a promise of descriptors
   * @example
   * TransportFoo.list().then(descriptors => ...)
   */


  /**
   * Listen all device events for a given Transport. The method takes an Obverver of DescriptorEvent and returns a Subscription (according to Observable paradigm https://github.com/tc39/proposal-observable )
   * a DescriptorEvent is a `{ descriptor, type }` object. type can be `"add"` or `"remove"` and descriptor is a value you can pass to `open(descriptor)`.
   * each listen() call will first emit all potential device already connected and then will emit events can come over times,
   * for instance if you plug a USB device after listen() or a bluetooth device become discoverable.
   * @param observer is an object with a next, error and complete function (compatible with observer pattern)
   * @return a Subscription object on which you can `.unsubscribe()` to stop listening descriptors.
   * @example
  const sub = TransportFoo.listen({
  next: e => {
    if (e.type==="add") {
      sub.unsubscribe();
      const transport = await TransportFoo.open(e.descriptor);
      ...
    }
  },
  error: error => {},
  complete: () => {}
  })
   */


  /**
   * attempt to create a Transport instance with potentially a descriptor.
   * @param descriptor: the descriptor to open the transport with.
   * @param timeout: an optional timeout
   * @return a Promise of Transport instance
   * @example
  TransportFoo.open(descriptor).then(transport => ...)
   */


  /**
   * low level api to communicate with the device
   * This method is for implementations to implement but should not be directly called.
   * Instead, the recommanded way is to use send() method
   * @param apdu the data to send
   * @return a Promise of response data
   */


  /**
   * set the "scramble key" for the next exchanges with the device.
   * Each App can have a different scramble key and they internally will set it at instanciation.
   * @param key the scramble key
   */


  /**
   * close the exchange with the device.
   * @return a Promise that ends when the transport is closed.
   */


  (0, _createClass3.default)(Transport, [{
    key: "on",


    /**
     * Listen to an event on an instance of transport.
     * Transport implementation can have specific events. Here is the common events:
     * * `"disconnect"` : triggered if Transport is disconnected
     */
    value: function on(eventName, cb) {
      this._events.on(eventName, cb);
    }

    /**
     * Stop listening to an event on an instance of transport.
     */

  }, {
    key: "off",
    value: function off(eventName, cb) {
      this._events.removeListener(eventName, cb);
    }
  }, {
    key: "emit",
    value: function emit(event) {
      var _events;

      for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
        args[_key - 1] = arguments[_key];
      }

      (_events = this._events).emit.apply(_events, [event].concat((0, _toConsumableArray3.default)(args)));
    }

    /**
     * Enable or not logs of the binary exchange
     */

  }, {
    key: "setDebugMode",
    value: function setDebugMode(debug) {
      this.debug = typeof debug === "function" ? debug : debug ? function (log) {
        return console.log(log);
      } : null;
    }

    /**
     * Set a timeout (in milliseconds) for the exchange call. Only some transport might implement it. (e.g. U2F)
     */

  }, {
    key: "setExchangeTimeout",
    value: function setExchangeTimeout(exchangeTimeout) {
      this.exchangeTimeout = exchangeTimeout;
    }

    /**
     * wrapper on top of exchange to simplify work of the implementation.
     * @param cla
     * @param ins
     * @param p1
     * @param p2
     * @param data
     * @param statusList is a list of accepted status code (shorts). [0x9000] by default
     * @return a Promise of response buffer
     */

  }, {
    key: "decorateAppAPIMethods",
    value: function decorateAppAPIMethods(self, methods, scrambleKey) {
      var _iteratorNormalCompletion = true;
      var _didIteratorError = false;
      var _iteratorError = undefined;

      try {
        for (var _iterator = (0, _getIterator3.default)(methods), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
          var methodName = _step.value;

          self[methodName] = this.decorateAppAPIMethod(methodName, self[methodName], self, scrambleKey);
        }
      } catch (err) {
        _didIteratorError = true;
        _iteratorError = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion && _iterator.return) {
            _iterator.return();
          }
        } finally {
          if (_didIteratorError) {
            throw _iteratorError;
          }
        }
      }
    }
  }, {
    key: "decorateAppAPIMethod",
    value: function decorateAppAPIMethod(methodName, f, ctx, scrambleKey) {
      var _this2 = this;

      return function () {
        var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2() {
          for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
            args[_key2] = arguments[_key2];
          }

          var _appAPIlock, _e;

          return _regenerator2.default.wrap(function _callee2$(_context2) {
            while (1) {
              switch (_context2.prev = _context2.next) {
                case 0:
                  _appAPIlock = _this2._appAPIlock;

                  if (!_appAPIlock) {
                    _context2.next = 5;
                    break;
                  }

                  _e = new TransportError("Ledger Device is busy (lock " + _appAPIlock + ")", "TransportLocked");

                  (0, _assign2.default)(_e, {
                    currentLock: _appAPIlock,
                    methodName: methodName
                  });
                  return _context2.abrupt("return", _promise2.default.reject(_e));

                case 5:
                  _context2.prev = 5;

                  _this2._appAPIlock = methodName;
                  _this2.setScrambleKey(scrambleKey);
                  _context2.next = 10;
                  return f.apply(ctx, args);

                case 10:
                  return _context2.abrupt("return", _context2.sent);

                case 11:
                  _context2.prev = 11;

                  _this2._appAPIlock = null;
                  return _context2.finish(11);

                case 14:
                case "end":
                  return _context2.stop();
              }
            }
          }, _callee2, _this2, [[5,, 11, 14]]);
        }));

        return function () {
          return _ref2.apply(this, arguments);
        };
      }();
    }
  }], [{
    key: "create",


    /**
     * create() allows to open the first descriptor available or
     * throw if there is none or if timeout is reached.
     * This is a light helper, alternative to using listen() and open() (that you may need for any more advanced usecase)
     * @example
    TransportFoo.create().then(transport => ...)
     */
    value: function create() {
      var _this3 = this;

      var openTimeout = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 3000;
      var listenTimeout = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10000;

      return new _promise2.default(function (resolve, reject) {
        var found = false;
        var sub = _this3.listen({
          next: function next(e) {
            found = true;
            if (sub) sub.unsubscribe();
            clearTimeout(listenTimeoutId);
            _this3.open(e.descriptor, openTimeout).then(resolve, reject);
          },
          error: function error(e) {
            clearTimeout(listenTimeoutId);
            reject(e);
          },
          complete: function complete() {
            clearTimeout(listenTimeoutId);
            if (!found) {
              reject(new TransportError(_this3.ErrorMessage_NoDeviceFound, "NoDeviceFound"));
            }
          }
        });
        var listenTimeoutId = setTimeout(function () {
          sub.unsubscribe();
          reject(new TransportError(_this3.ErrorMessage_ListenTimeout, "ListenTimeout"));
        }, listenTimeout);
      });
    }
  }]);
  return Transport;
}();

Transport.ErrorMessage_ListenTimeout = "No Ledger device found (timeout)";
Transport.ErrorMessage_NoDeviceFound = "No Ledger device found";
exports.default = Transport;

});

unwrapExports(Transport_1);
var Transport_2 = Transport_1.StatusCodes;
var Transport_3 = Transport_1.getAltStatusMessage;
var Transport_4 = Transport_1.TransportError;
var Transport_5 = Transport_1.TransportStatusError;

var TransportU2F_1 = createCommonjsModule(function (module, exports) {

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();





var _hwTransport2 = _interopRequireDefault(Transport_1);

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

function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

function wrapU2FTransportError(originalError, message, id) {
  var err = new Transport_1.TransportError(message, id);
  // $FlowFixMe
  err.originalError = originalError;
  return err;
}

function wrapApdu(apdu, key) {
  var result = Buffer.alloc(apdu.length);
  for (var i = 0; i < apdu.length; i++) {
    result[i] = apdu[i] ^ key[i % key.length];
  }
  return result;
}

// Convert from normal to web-safe, strip trailing "="s
var webSafe64 = function webSafe64(base64) {
  return base64.replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
};

// Convert from web-safe to normal, add trailing "="s
var normal64 = function normal64(base64) {
  return base64.replace(/-/g, "+").replace(/_/g, "/") + "==".substring(0, 3 * base64.length % 4);
};

function attemptExchange(apdu, timeoutMillis, debug, scrambleKey, unwrap) {
  var keyHandle = wrapApdu(apdu, scrambleKey);
  var challenge = Buffer.from("0000000000000000000000000000000000000000000000000000000000000000", "hex");
  var signRequest = {
    version: "U2F_V2",
    keyHandle: webSafe64(keyHandle.toString("base64")),
    challenge: webSafe64(challenge.toString("base64")),
    appId: location.origin
  };
  if (debug) {
    debug("=> " + apdu.toString("hex"));
  }
  return (0, u2fApi$1.sign)(signRequest, timeoutMillis / 1000).then(function (response) {
    var signatureData = response.signatureData;

    if (typeof signatureData === "string") {
      var data = Buffer.from(normal64(signatureData), "base64");
      var result = void 0;
      if (!unwrap) {
        result = data;
      } else {
        result = data.slice(5);
      }
      if (debug) {
        debug("<= " + result.toString("hex"));
      }
      return result;
    } else {
      throw response;
    }
  });
}

var transportInstances = [];

function emitDisconnect() {
  transportInstances.forEach(function (t) {
    return t.emit("disconnect");
  });
  transportInstances = [];
}

function isTimeoutU2FError(u2fError) {
  return u2fError.metaData.code === 5;
}

/**
 * U2F web Transport implementation
 * @example
 * import TransportU2F from "@ledgerhq/hw-transport-u2f";
 * ...
 * TransportU2F.create().then(transport => ...)
 */

var TransportU2F = function (_Transport) {
  _inherits(TransportU2F, _Transport);

  _createClass(TransportU2F, null, [{
    key: "open",


    /**
     * static function to create a new Transport from a connected Ledger device discoverable via U2F (browser support)
     */


    // this transport is not discoverable but we are going to guess if it is here with isSupported()
    value: function () {
      var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(_) {

        return regeneratorRuntime.wrap(function _callee$(_context) {
          while (1) {
            switch (_context.prev = _context.next) {
              case 0:
                return _context.abrupt("return", new TransportU2F());

              case 1:
              case "end":
                return _context.stop();
            }
          }
        }, _callee, this);
      }));

      function open(_x) {
        return _ref.apply(this, arguments);
      }

      return open;
    }()
  }]);

  function TransportU2F() {
    _classCallCheck(this, TransportU2F);

    var _this = _possibleConstructorReturn(this, (TransportU2F.__proto__ || Object.getPrototypeOf(TransportU2F)).call(this));

    _this.unwrap = true;

    transportInstances.push(_this);
    return _this;
  }

  _createClass(TransportU2F, [{
    key: "exchange",
    value: function () {
      var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(apdu) {
        var isU2FError;
        return regeneratorRuntime.wrap(function _callee2$(_context2) {
          while (1) {
            switch (_context2.prev = _context2.next) {
              case 0:
                _context2.prev = 0;
                _context2.next = 3;
                return attemptExchange(apdu, this.exchangeTimeout, this.debug, this.scrambleKey, this.unwrap);

              case 3:
                return _context2.abrupt("return", _context2.sent);

              case 6:
                _context2.prev = 6;
                _context2.t0 = _context2["catch"](0);
                isU2FError = _typeof(_context2.t0.metaData) === "object";

                if (!isU2FError) {
                  _context2.next = 14;
                  break;
                }

                if (isTimeoutU2FError(_context2.t0)) {
                  emitDisconnect();
                }
                // the wrapping make error more usable and "printable" to the end user.
                throw wrapU2FTransportError(_context2.t0, "Failed to sign with Ledger device: U2F " + _context2.t0.metaData.type, "U2F_" + _context2.t0.metaData.code);

              case 14:
                throw _context2.t0;

              case 15:
              case "end":
                return _context2.stop();
            }
          }
        }, _callee2, this, [[0, 6]]);
      }));

      function exchange(_x3) {
        return _ref2.apply(this, arguments);
      }

      return exchange;
    }()
  }, {
    key: "setScrambleKey",
    value: function setScrambleKey(scrambleKey) {
      this.scrambleKey = Buffer.from(scrambleKey, "ascii");
    }
  }, {
    key: "setUnwrap",
    value: function setUnwrap(unwrap) {
      this.unwrap = unwrap;
    }
  }, {
    key: "close",
    value: function close() {
      var i = transportInstances.indexOf(this);
      if (i === -1) {
        throw new Error("invalid transport instance");
      }
      transportInstances.splice(i, 1);
      return Promise.resolve();
    }
  }]);

  return TransportU2F;
}(_hwTransport2.default);

TransportU2F.isSupported = u2fApi$1.isSupported;

TransportU2F.list = function () {
  return (0, u2fApi$1.isSupported)().then(function (supported) {
    return supported ? [null] : [];
  });
};

TransportU2F.listen = function (observer) {
  var unsubscribed = false;
  (0, u2fApi$1.isSupported)().then(function (supported) {
    if (unsubscribed) return;
    if (supported) {
      observer.next({ type: "add", descriptor: null });
      observer.complete();
    } else {
      observer.error(new Transport_1.TransportError("U2F browser support is needed for Ledger. " + "Please use Chrome, Opera or Firefox with a U2F extension. " + "Also make sure you're on an HTTPS connection", "U2FNotSupported"));
    }
  });
  return {
    unsubscribe: function unsubscribe() {
      unsubscribed = true;
    }
  };
};

exports.default = TransportU2F;

});

var Transport$1 = unwrapExports(TransportU2F_1);

class Util {
    static splitPath(path) {
        let result = [];
        let components = path.split("/");
        components.forEach(element => {
            let number = parseInt(element, 10);
            if (isNaN(number)) {
                return;
            }
            if (element.length > 1 && element[element.length - 1] === "'") {
                number += 0x80000000;
            }
            result.push(number);
        });
        return result;
    }
    static foreach(arr, callback) {
        function iterate(index, array, result) {
            if (index >= array.length) {
                return result;
            }
            else
                return callback(array[index], index).then(function (res) {
                    result.push(res);
                    return iterate(index + 1, array, result);
                });
        }
        return Promise.resolve().then(() => iterate(0, arr, []));
    }
}

// shim for using process in browser
if (typeof global.setTimeout === 'function') ;
if (typeof global.clearTimeout === 'function') ;

// from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js
var performance = global.performance || {};
var performanceNow =
  performance.now        ||
  performance.mozNow     ||
  performance.msNow      ||
  performance.oNow       ||
  performance.webkitNow  ||
  function(){ return (new Date()).getTime() };

var inherits;
if (typeof Object.create === 'function'){
  inherits = function inherits(ctor, superCtor) {
    // implementation from standard node.js 'util' module
    ctor.super_ = superCtor;
    ctor.prototype = Object.create(superCtor.prototype, {
      constructor: {
        value: ctor,
        enumerable: false,
        writable: true,
        configurable: true
      }
    });
  };
} else {
  inherits = function inherits(ctor, superCtor) {
    ctor.super_ = superCtor;
    var TempCtor = function () {};
    TempCtor.prototype = superCtor.prototype;
    ctor.prototype = new TempCtor();
    ctor.prototype.constructor = ctor;
  };
}
var inherits$1 = inherits;

// Copyright Joyent, Inc. and other Node contributors.


/**
 * Echos the value of a value. Trys to print the value out
 * in the best way possible given the different types.
 *
 * @param {Object} obj The object to print out.
 * @param {Object} opts Optional options object that alters the output.
 */
/* legacy: obj, showHidden, depth, colors*/
function inspect(obj, opts) {
  // default options
  var ctx = {
    seen: [],
    stylize: stylizeNoColor
  };
  // legacy...
  if (arguments.length >= 3) ctx.depth = arguments[2];
  if (arguments.length >= 4) ctx.colors = arguments[3];
  if (isBoolean(opts)) {
    // legacy...
    ctx.showHidden = opts;
  } else if (opts) {
    // got an "options" object
    _extend(ctx, opts);
  }
  // set default options
  if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
  if (isUndefined(ctx.depth)) ctx.depth = 2;
  if (isUndefined(ctx.colors)) ctx.colors = false;
  if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
  if (ctx.colors) ctx.stylize = stylizeWithColor;
  return formatValue(ctx, obj, ctx.depth);
}

// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
inspect.colors = {
  'bold' : [1, 22],
  'italic' : [3, 23],
  'underline' : [4, 24],
  'inverse' : [7, 27],
  'white' : [37, 39],
  'grey' : [90, 39],
  'black' : [30, 39],
  'blue' : [34, 39],
  'cyan' : [36, 39],
  'green' : [32, 39],
  'magenta' : [35, 39],
  'red' : [31, 39],
  'yellow' : [33, 39]
};

// Don't use 'blue' not visible on cmd.exe
inspect.styles = {
  'special': 'cyan',
  'number': 'yellow',
  'boolean': 'yellow',
  'undefined': 'grey',
  'null': 'bold',
  'string': 'green',
  'date': 'magenta',
  // "name": intentionally not styling
  'regexp': 'red'
};


function stylizeWithColor(str, styleType) {
  var style = inspect.styles[styleType];

  if (style) {
    return '\u001b[' + inspect.colors[style][0] + 'm' + str +
           '\u001b[' + inspect.colors[style][1] + 'm';
  } else {
    return str;
  }
}


function stylizeNoColor(str, styleType) {
  return str;
}


function arrayToHash(array) {
  var hash = {};

  array.forEach(function(val, idx) {
    hash[val] = true;
  });

  return hash;
}


function formatValue(ctx, value, recurseTimes) {
  // Provide a hook for user-specified inspect functions.
  // Check that value is an object with an inspect function on it
  if (ctx.customInspect &&
      value &&
      isFunction(value.inspect) &&
      // Filter out the util module, it's inspect function is special
      value.inspect !== inspect &&
      // Also filter out any prototype objects using the circular check.
      !(value.constructor && value.constructor.prototype === value)) {
    var ret = value.inspect(recurseTimes, ctx);
    if (!isString(ret)) {
      ret = formatValue(ctx, ret, recurseTimes);
    }
    return ret;
  }

  // Primitive types cannot have properties
  var primitive = formatPrimitive(ctx, value);
  if (primitive) {
    return primitive;
  }

  // Look up the keys of the object.
  var keys = Object.keys(value);
  var visibleKeys = arrayToHash(keys);

  if (ctx.showHidden) {
    keys = Object.getOwnPropertyNames(value);
  }

  // IE doesn't make error fields non-enumerable
  // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
  if (isError(value)
      && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
    return formatError(value);
  }

  // Some type of object without properties can be shortcutted.
  if (keys.length === 0) {
    if (isFunction(value)) {
      var name = value.name ? ': ' + value.name : '';
      return ctx.stylize('[Function' + name + ']', 'special');
    }
    if (isRegExp(value)) {
      return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
    }
    if (isDate(value)) {
      return ctx.stylize(Date.prototype.toString.call(value), 'date');
    }
    if (isError(value)) {
      return formatError(value);
    }
  }

  var base = '', array = false, braces = ['{', '}'];

  // Make Array say that they are Array
  if (isArray$1(value)) {
    array = true;
    braces = ['[', ']'];
  }

  // Make functions say that they are functions
  if (isFunction(value)) {
    var n = value.name ? ': ' + value.name : '';
    base = ' [Function' + n + ']';
  }

  // Make RegExps say that they are RegExps
  if (isRegExp(value)) {
    base = ' ' + RegExp.prototype.toString.call(value);
  }

  // Make dates with properties first say the date
  if (isDate(value)) {
    base = ' ' + Date.prototype.toUTCString.call(value);
  }

  // Make error with message first say the error
  if (isError(value)) {
    base = ' ' + formatError(value);
  }

  if (keys.length === 0 && (!array || value.length == 0)) {
    return braces[0] + base + braces[1];
  }

  if (recurseTimes < 0) {
    if (isRegExp(value)) {
      return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
    } else {
      return ctx.stylize('[Object]', 'special');
    }
  }

  ctx.seen.push(value);

  var output;
  if (array) {
    output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
  } else {
    output = keys.map(function(key) {
      return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
    });
  }

  ctx.seen.pop();

  return reduceToSingleString(output, base, braces);
}


function formatPrimitive(ctx, value) {
  if (isUndefined(value))
    return ctx.stylize('undefined', 'undefined');
  if (isString(value)) {
    var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
                                             .replace(/'/g, "\\'")
                                             .replace(/\\"/g, '"') + '\'';
    return ctx.stylize(simple, 'string');
  }
  if (isNumber(value))
    return ctx.stylize('' + value, 'number');
  if (isBoolean(value))
    return ctx.stylize('' + value, 'boolean');
  // For some reason typeof null is "object", so special case here.
  if (isNull(value))
    return ctx.stylize('null', 'null');
}


function formatError(value) {
  return '[' + Error.prototype.toString.call(value) + ']';
}


function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
  var output = [];
  for (var i = 0, l = value.length; i < l; ++i) {
    if (hasOwnProperty$1(value, String(i))) {
      output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
          String(i), true));
    } else {
      output.push('');
    }
  }
  keys.forEach(function(key) {
    if (!key.match(/^\d+$/)) {
      output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
          key, true));
    }
  });
  return output;
}


function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
  var name, str, desc;
  desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
  if (desc.get) {
    if (desc.set) {
      str = ctx.stylize('[Getter/Setter]', 'special');
    } else {
      str = ctx.stylize('[Getter]', 'special');
    }
  } else {
    if (desc.set) {
      str = ctx.stylize('[Setter]', 'special');
    }
  }
  if (!hasOwnProperty$1(visibleKeys, key)) {
    name = '[' + key + ']';
  }
  if (!str) {
    if (ctx.seen.indexOf(desc.value) < 0) {
      if (isNull(recurseTimes)) {
        str = formatValue(ctx, desc.value, null);
      } else {
        str = formatValue(ctx, desc.value, recurseTimes - 1);
      }
      if (str.indexOf('\n') > -1) {
        if (array) {
          str = str.split('\n').map(function(line) {
            return '  ' + line;
          }).join('\n').substr(2);
        } else {
          str = '\n' + str.split('\n').map(function(line) {
            return '   ' + line;
          }).join('\n');
        }
      }
    } else {
      str = ctx.stylize('[Circular]', 'special');
    }
  }
  if (isUndefined(name)) {
    if (array && key.match(/^\d+$/)) {
      return str;
    }
    name = JSON.stringify('' + key);
    if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
      name = name.substr(1, name.length - 2);
      name = ctx.stylize(name, 'name');
    } else {
      name = name.replace(/'/g, "\\'")
                 .replace(/\\"/g, '"')
                 .replace(/(^"|"$)/g, "'");
      name = ctx.stylize(name, 'string');
    }
  }

  return name + ': ' + str;
}


function reduceToSingleString(output, base, braces) {
  var length = output.reduce(function(prev, cur) {
    if (cur.indexOf('\n') >= 0) ;
    return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
  }, 0);

  if (length > 60) {
    return braces[0] +
           (base === '' ? '' : base + '\n ') +
           ' ' +
           output.join(',\n  ') +
           ' ' +
           braces[1];
  }

  return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
}


// NOTE: These type checking functions intentionally don't use `instanceof`
// because it is fragile and can be easily faked with `Object.create()`.
function isArray$1(ar) {
  return Array.isArray(ar);
}

function isBoolean(arg) {
  return typeof arg === 'boolean';
}

function isNull(arg) {
  return arg === null;
}

function isNumber(arg) {
  return typeof arg === 'number';
}

function isString(arg) {
  return typeof arg === 'string';
}

function isUndefined(arg) {
  return arg === void 0;
}

function isRegExp(re) {
  return isObject(re) && objectToString(re) === '[object RegExp]';
}

function isObject(arg) {
  return typeof arg === 'object' && arg !== null;
}

function isDate(d) {
  return isObject(d) && objectToString(d) === '[object Date]';
}

function isError(e) {
  return isObject(e) &&
      (objectToString(e) === '[object Error]' || e instanceof Error);
}

function isFunction(arg) {
  return typeof arg === 'function';
}

function isPrimitive(arg) {
  return arg === null ||
         typeof arg === 'boolean' ||
         typeof arg === 'number' ||
         typeof arg === 'string' ||
         typeof arg === 'symbol' ||  // ES6 symbol
         typeof arg === 'undefined';
}

function objectToString(o) {
  return Object.prototype.toString.call(o);
}

function _extend(origin, add) {
  // Don't do anything if add isn't an object
  if (!add || !isObject(add)) return origin;

  var keys = Object.keys(add);
  var i = keys.length;
  while (i--) {
    origin[keys[i]] = add[keys[i]];
  }
  return origin;
}
function hasOwnProperty$1(obj, prop) {
  return Object.prototype.hasOwnProperty.call(obj, prop);
}

function compare(a, b) {
  if (a === b) {
    return 0;
  }

  var x = a.length;
  var y = b.length;

  for (var i = 0, len = Math.min(x, y); i < len; ++i) {
    if (a[i] !== b[i]) {
      x = a[i];
      y = b[i];
      break;
    }
  }

  if (x < y) {
    return -1;
  }
  if (y < x) {
    return 1;
  }
  return 0;
}
var hasOwn = Object.prototype.hasOwnProperty;

var objectKeys = Object.keys || function (obj) {
  var keys = [];
  for (var key in obj) {
    if (hasOwn.call(obj, key)) keys.push(key);
  }
  return keys;
};
var pSlice = Array.prototype.slice;
var _functionsHaveNames;
function functionsHaveNames() {
  if (typeof _functionsHaveNames !== 'undefined') {
    return _functionsHaveNames;
  }
  return _functionsHaveNames = (function () {
    return function foo() {}.name === 'foo';
  }());
}
function pToString (obj) {
  return Object.prototype.toString.call(obj);
}
function isView(arrbuf) {
  if (isBuffer(arrbuf)) {
    return false;
  }
  if (typeof global.ArrayBuffer !== 'function') {
    return false;
  }
  if (typeof ArrayBuffer.isView === 'function') {
    return ArrayBuffer.isView(arrbuf);
  }
  if (!arrbuf) {
    return false;
  }
  if (arrbuf instanceof DataView) {
    return true;
  }
  if (arrbuf.buffer && arrbuf.buffer instanceof ArrayBuffer) {
    return true;
  }
  return false;
}
// 1. The assert module provides functions that throw
// AssertionError's when particular conditions are not met. The
// assert module must conform to the following interface.

function assert$1(value, message) {
  if (!value) fail(value, true, message, '==', ok);
}

// 2. The AssertionError is defined in assert.
// new assert.AssertionError({ message: message,
//                             actual: actual,
//                             expected: expected })

var regex = /\s*function\s+([^\(\s]*)\s*/;
// based on https://github.com/ljharb/function.prototype.name/blob/adeeeec8bfcc6068b187d7d9fb3d5bb1d3a30899/implementation.js
function getName(func) {
  if (!isFunction(func)) {
    return;
  }
  if (functionsHaveNames()) {
    return func.name;
  }
  var str = func.toString();
  var match = str.match(regex);
  return match && match[1];
}
assert$1.AssertionError = AssertionError;
function AssertionError(options) {
  this.name = 'AssertionError';
  this.actual = options.actual;
  this.expected = options.expected;
  this.operator = options.operator;
  if (options.message) {
    this.message = options.message;
    this.generatedMessage = false;
  } else {
    this.message = getMessage(this);
    this.generatedMessage = true;
  }
  var stackStartFunction = options.stackStartFunction || fail;
  if (Error.captureStackTrace) {
    Error.captureStackTrace(this, stackStartFunction);
  } else {
    // non v8 browsers so we can have a stacktrace
    var err = new Error();
    if (err.stack) {
      var out = err.stack;

      // try to strip useless frames
      var fn_name = getName(stackStartFunction);
      var idx = out.indexOf('\n' + fn_name);
      if (idx >= 0) {
        // once we have located the function frame
        // we need to strip out everything before it (and its line)
        var next_line = out.indexOf('\n', idx + 1);
        out = out.substring(next_line + 1);
      }

      this.stack = out;
    }
  }
}

// assert.AssertionError instanceof Error
inherits$1(AssertionError, Error);

function truncate(s, n) {
  if (typeof s === 'string') {
    return s.length < n ? s : s.slice(0, n);
  } else {
    return s;
  }
}
function inspect$1(something) {
  if (functionsHaveNames() || !isFunction(something)) {
    return inspect(something);
  }
  var rawname = getName(something);
  var name = rawname ? ': ' + rawname : '';
  return '[Function' +  name + ']';
}
function getMessage(self) {
  return truncate(inspect$1(self.actual), 128) + ' ' +
         self.operator + ' ' +
         truncate(inspect$1(self.expected), 128);
}

// At present only the three keys mentioned above are used and
// understood by the spec. Implementations or sub modules can pass
// other keys to the AssertionError's constructor - they will be
// ignored.

// 3. All of the following functions must throw an AssertionError
// when a corresponding condition is not met, with a message that
// may be undefined if not provided.  All assertion methods provide
// both the actual and expected values to the assertion error for
// display purposes.

function fail(actual, expected, message, operator, stackStartFunction) {
  throw new AssertionError({
    message: message,
    actual: actual,
    expected: expected,
    operator: operator,
    stackStartFunction: stackStartFunction
  });
}

// EXTENSION! allows for well behaved errors defined elsewhere.
assert$1.fail = fail;

// 4. Pure assertion tests whether a value is truthy, as determined
// by !!guard.
// assert.ok(guard, message_opt);
// This statement is equivalent to assert.equal(true, !!guard,
// message_opt);. To test strictly for the value true, use
// assert.strictEqual(true, guard, message_opt);.

function ok(value, message) {
  if (!value) fail(value, true, message, '==', ok);
}
assert$1.ok = ok;

// 5. The equality assertion tests shallow, coercive equality with
// ==.
// assert.equal(actual, expected, message_opt);
assert$1.equal = equal$1;
function equal$1(actual, expected, message) {
  if (actual != expected) fail(actual, expected, message, '==', equal$1);
}

// 6. The non-equality assertion tests for whether two objects are not equal
// with != assert.notEqual(actual, expected, message_opt);
assert$1.notEqual = notEqual$1;
function notEqual$1(actual, expected, message) {
  if (actual == expected) {
    fail(actual, expected, message, '!=', notEqual$1);
  }
}

// 7. The equivalence assertion tests a deep equality relation.
// assert.deepEqual(actual, expected, message_opt);
assert$1.deepEqual = deepEqual;
function deepEqual(actual, expected, message) {
  if (!_deepEqual(actual, expected, false)) {
    fail(actual, expected, message, 'deepEqual', deepEqual);
  }
}
assert$1.deepStrictEqual = deepStrictEqual;
function deepStrictEqual(actual, expected, message) {
  if (!_deepEqual(actual, expected, true)) {
    fail(actual, expected, message, 'deepStrictEqual', deepStrictEqual);
  }
}

function _deepEqual(actual, expected, strict, memos) {
  // 7.1. All identical values are equivalent, as determined by ===.
  if (actual === expected) {
    return true;
  } else if (isBuffer(actual) && isBuffer(expected)) {
    return compare(actual, expected) === 0;

  // 7.2. If the expected value is a Date object, the actual value is
  // equivalent if it is also a Date object that refers to the same time.
  } else if (isDate(actual) && isDate(expected)) {
    return actual.getTime() === expected.getTime();

  // 7.3 If the expected value is a RegExp object, the actual value is
  // equivalent if it is also a RegExp object with the same source and
  // properties (`global`, `multiline`, `lastIndex`, `ignoreCase`).
  } else if (isRegExp(actual) && isRegExp(expected)) {
    return actual.source === expected.source &&
           actual.global === expected.global &&
           actual.multiline === expected.multiline &&
           actual.lastIndex === expected.lastIndex &&
           actual.ignoreCase === expected.ignoreCase;

  // 7.4. Other pairs that do not both pass typeof value == 'object',
  // equivalence is determined by ==.
  } else if ((actual === null || typeof actual !== 'object') &&
             (expected === null || typeof expected !== 'object')) {
    return strict ? actual === expected : actual == expected;

  // If both values are instances of typed arrays, wrap their underlying
  // ArrayBuffers in a Buffer each to increase performance
  // This optimization requires the arrays to have the same type as checked by
  // Object.prototype.toString (aka pToString). Never perform binary
  // comparisons for Float*Arrays, though, since e.g. +0 === -0 but their
  // bit patterns are not identical.
  } else if (isView(actual) && isView(expected) &&
             pToString(actual) === pToString(expected) &&
             !(actual instanceof Float32Array ||
               actual instanceof Float64Array)) {
    return compare(new Uint8Array(actual.buffer),
                   new Uint8Array(expected.buffer)) === 0;

  // 7.5 For all other Object pairs, including Array objects, equivalence is
  // determined by having the same number of owned properties (as verified
  // with Object.prototype.hasOwnProperty.call), the same set of keys
  // (although not necessarily the same order), equivalent values for every
  // corresponding key, and an identical 'prototype' property. Note: this
  // accounts for both named and indexed properties on Arrays.
  } else if (isBuffer(actual) !== isBuffer(expected)) {
    return false;
  } else {
    memos = memos || {actual: [], expected: []};

    var actualIndex = memos.actual.indexOf(actual);
    if (actualIndex !== -1) {
      if (actualIndex === memos.expected.indexOf(expected)) {
        return true;
      }
    }

    memos.actual.push(actual);
    memos.expected.push(expected);

    return objEquiv(actual, expected, strict, memos);
  }
}

function isArguments(object) {
  return Object.prototype.toString.call(object) == '[object Arguments]';
}

function objEquiv(a, b, strict, actualVisitedObjects) {
  if (a === null || a === undefined || b === null || b === undefined)
    return false;
  // if one is a primitive, the other must be same
  if (isPrimitive(a) || isPrimitive(b))
    return a === b;
  if (strict && Object.getPrototypeOf(a) !== Object.getPrototypeOf(b))
    return false;
  var aIsArgs = isArguments(a);
  var bIsArgs = isArguments(b);
  if ((aIsArgs && !bIsArgs) || (!aIsArgs && bIsArgs))
    return false;
  if (aIsArgs) {
    a = pSlice.call(a);
    b = pSlice.call(b);
    return _deepEqual(a, b, strict);
  }
  var ka = objectKeys(a);
  var kb = objectKeys(b);
  var key, i;
  // having the same number of owned properties (keys incorporates
  // hasOwnProperty)
  if (ka.length !== kb.length)
    return false;
  //the same set of keys (although not necessarily the same order),
  ka.sort();
  kb.sort();
  //~~~cheap key test
  for (i = ka.length - 1; i >= 0; i--) {
    if (ka[i] !== kb[i])
      return false;
  }
  //equivalent values for every corresponding key, and
  //~~~possibly expensive deep test
  for (i = ka.length - 1; i >= 0; i--) {
    key = ka[i];
    if (!_deepEqual(a[key], b[key], strict, actualVisitedObjects))
      return false;
  }
  return true;
}

// 8. The non-equivalence assertion tests for any deep inequality.
// assert.notDeepEqual(actual, expected, message_opt);
assert$1.notDeepEqual = notDeepEqual;
function notDeepEqual(actual, expected, message) {
  if (_deepEqual(actual, expected, false)) {
    fail(actual, expected, message, 'notDeepEqual', notDeepEqual);
  }
}

assert$1.notDeepStrictEqual = notDeepStrictEqual;
function notDeepStrictEqual(actual, expected, message) {
  if (_deepEqual(actual, expected, true)) {
    fail(actual, expected, message, 'notDeepStrictEqual', notDeepStrictEqual);
  }
}


// 9. The strict equality assertion tests strict equality, as determined by ===.
// assert.strictEqual(actual, expected, message_opt);
assert$1.strictEqual = strictEqual;
function strictEqual(actual, expected, message) {
  if (actual !== expected) {
    fail(actual, expected, message, '===', strictEqual);
  }
}

// 10. The strict non-equality assertion tests for strict inequality, as
// determined by !==.  assert.notStrictEqual(actual, expected, message_opt);
assert$1.notStrictEqual = notStrictEqual;
function notStrictEqual(actual, expected, message) {
  if (actual === expected) {
    fail(actual, expected, message, '!==', notStrictEqual);
  }
}

function expectedException(actual, expected) {
  if (!actual || !expected) {
    return false;
  }

  if (Object.prototype.toString.call(expected) == '[object RegExp]') {
    return expected.test(actual);
  }

  try {
    if (actual instanceof expected) {
      return true;
    }
  } catch (e) {
    // Ignore.  The instanceof check doesn't work for arrow functions.
  }

  if (Error.isPrototypeOf(expected)) {
    return false;
  }

  return expected.call({}, actual) === true;
}

function _tryBlock(block) {
  var error;
  try {
    block();
  } catch (e) {
    error = e;
  }
  return error;
}

function _throws(shouldThrow, block, expected, message) {
  var actual;

  if (typeof block !== 'function') {
    throw new TypeError('"block" argument must be a function');
  }

  if (typeof expected === 'string') {
    message = expected;
    expected = null;
  }

  actual = _tryBlock(block);

  message = (expected && expected.name ? ' (' + expected.name + ').' : '.') +
            (message ? ' ' + message : '.');

  if (shouldThrow && !actual) {
    fail(actual, expected, 'Missing expected exception' + message);
  }

  var userProvidedMessage = typeof message === 'string';
  var isUnwantedException = !shouldThrow && isError(actual);
  var isUnexpectedException = !shouldThrow && actual && !expected;

  if ((isUnwantedException &&
      userProvidedMessage &&
      expectedException(actual, expected)) ||
      isUnexpectedException) {
    fail(actual, expected, 'Got unwanted exception' + message);
  }

  if ((shouldThrow && actual && expected &&
      !expectedException(actual, expected)) || (!shouldThrow && actual)) {
    throw actual;
  }
}

// 11. Expected to throw an error:
// assert.throws(block, Error_opt, message_opt);
assert$1.throws = throws;
function throws(block, /*optional*/error, /*optional*/message) {
  _throws(true, block, error, message);
}

// EXTENSION! This is annoying to write outside this module.
assert$1.doesNotThrow = doesNotThrow;
function doesNotThrow(block, /*optional*/error, /*optional*/message) {
  _throws(false, block, error, message);
}

assert$1.ifError = ifError;
function ifError(err) {
  if (err) throw err;
}

var assert$2 = /*#__PURE__*/Object.freeze({
  default: assert$1,
  AssertionError: AssertionError,
  fail: fail,
  ok: ok,
  assert: ok,
  equal: equal$1,
  notEqual: notEqual$1,
  deepEqual: deepEqual,
  deepStrictEqual: deepStrictEqual,
  notDeepEqual: notDeepEqual,
  notDeepStrictEqual: notDeepStrictEqual,
  strictEqual: strictEqual,
  notStrictEqual: notStrictEqual,
  throws: throws,
  doesNotThrow: doesNotThrow,
  ifError: ifError
});

var safeBuffer = createCommonjsModule(function (module, exports) {
/* eslint-disable node/no-deprecated-api */

var Buffer = buffer.Buffer;

// alternative to using Object.keys for old browsers
function copyProps (src, dst) {
  for (var key in src) {
    dst[key] = src[key];
  }
}
if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
  module.exports = buffer;
} else {
  // Copy properties from require('buffer')
  copyProps(buffer, exports);
  exports.Buffer = SafeBuffer;
}

function SafeBuffer (arg, encodingOrOffset, length) {
  return Buffer(arg, encodingOrOffset, length)
}

// Copy static methods from Buffer
copyProps(Buffer, SafeBuffer);

SafeBuffer.from = function (arg, encodingOrOffset, length) {
  if (typeof arg === 'number') {
    throw new TypeError('Argument must not be a number')
  }
  return Buffer(arg, encodingOrOffset, length)
};

SafeBuffer.alloc = function (size, fill, encoding) {
  if (typeof size !== 'number') {
    throw new TypeError('Argument must be a number')
  }
  var buf = Buffer(size);
  if (fill !== undefined) {
    if (typeof encoding === 'string') {
      buf.fill(fill, encoding);
    } else {
      buf.fill(fill);
    }
  } else {
    buf.fill(0);
  }
  return buf
};

SafeBuffer.allocUnsafe = function (size) {
  if (typeof size !== 'number') {
    throw new TypeError('Argument must be a number')
  }
  return Buffer(size)
};

SafeBuffer.allocUnsafeSlow = function (size) {
  if (typeof size !== 'number') {
    throw new TypeError('Argument must be a number')
  }
  return buffer.SlowBuffer(size)
};
});
var safeBuffer_1 = safeBuffer.Buffer;

var bn = createCommonjsModule(function (module) {
(function (module, exports) {

  // Utils
  function assert (val, msg) {
    if (!val) throw new Error(msg || 'Assertion failed');
  }

  // Could use `inherits` module, but don't want to move from single file
  // architecture yet.
  function inherits (ctor, superCtor) {
    ctor.super_ = superCtor;
    var TempCtor = function () {};
    TempCtor.prototype = superCtor.prototype;
    ctor.prototype = new TempCtor();
    ctor.prototype.constructor = ctor;
  }

  // BN

  function BN (number, base, endian) {
    if (BN.isBN(number)) {
      return number;
    }

    this.negative = 0;
    this.words = null;
    this.length = 0;

    // Reduction context
    this.red = null;

    if (number !== null) {
      if (base === 'le' || base === 'be') {
        endian = base;
        base = 10;
      }

      this._init(number || 0, base || 10, endian || 'be');
    }
  }
  if (typeof module === 'object') {
    module.exports = BN;
  } else {
    exports.BN = BN;
  }

  BN.BN = BN;
  BN.wordSize = 26;

  var Buffer;
  try {
    Buffer = buffer.Buffer;
  } catch (e) {
  }

  BN.isBN = function isBN (num) {
    if (num instanceof BN) {
      return true;
    }

    return num !== null && typeof num === 'object' &&
      num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);
  };

  BN.max = function max (left, right) {
    if (left.cmp(right) > 0) return left;
    return right;
  };

  BN.min = function min (left, right) {
    if (left.cmp(right) < 0) return left;
    return right;
  };

  BN.prototype._init = function init (number, base, endian) {
    if (typeof number === 'number') {
      return this._initNumber(number, base, endian);
    }

    if (typeof number === 'object') {
      return this._initArray(number, base, endian);
    }

    if (base === 'hex') {
      base = 16;
    }
    assert(base === (base | 0) && base >= 2 && base <= 36);

    number = number.toString().replace(/\s+/g, '');
    var start = 0;
    if (number[0] === '-') {
      start++;
    }

    if (base === 16) {
      this._parseHex(number, start);
    } else {
      this._parseBase(number, base, start);
    }

    if (number[0] === '-') {
      this.negative = 1;
    }

    this.strip();

    if (endian !== 'le') return;

    this._initArray(this.toArray(), base, endian);
  };

  BN.prototype._initNumber = function _initNumber (number, base, endian) {
    if (number < 0) {
      this.negative = 1;
      number = -number;
    }
    if (number < 0x4000000) {
      this.words = [ number & 0x3ffffff ];
      this.length = 1;
    } else if (number < 0x10000000000000) {
      this.words = [
        number & 0x3ffffff,
        (number / 0x4000000) & 0x3ffffff
      ];
      this.length = 2;
    } else {
      assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)
      this.words = [
        number & 0x3ffffff,
        (number / 0x4000000) & 0x3ffffff,
        1
      ];
      this.length = 3;
    }

    if (endian !== 'le') return;

    // Reverse the bytes
    this._initArray(this.toArray(), base, endian);
  };

  BN.prototype._initArray = function _initArray (number, base, endian) {
    // Perhaps a Uint8Array
    assert(typeof number.length === 'number');
    if (number.length <= 0) {
      this.words = [ 0 ];
      this.length = 1;
      return this;
    }

    this.length = Math.ceil(number.length / 3);
    this.words = new Array(this.length);
    for (var i = 0; i < this.length; i++) {
      this.words[i] = 0;
    }

    var j, w;
    var off = 0;
    if (endian === 'be') {
      for (i = number.length - 1, j = 0; i >= 0; i -= 3) {
        w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);
        this.words[j] |= (w << off) & 0x3ffffff;
        this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;
        off += 24;
        if (off >= 26) {
          off -= 26;
          j++;
        }
      }
    } else if (endian === 'le') {
      for (i = 0, j = 0; i < number.length; i += 3) {
        w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);
        this.words[j] |= (w << off) & 0x3ffffff;
        this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;
        off += 24;
        if (off >= 26) {
          off -= 26;
          j++;
        }
      }
    }
    return this.strip();
  };

  function parseHex (str, start, end) {
    var r = 0;
    var len = Math.min(str.length, end);
    for (var i = start; i < len; i++) {
      var c = str.charCodeAt(i) - 48;

      r <<= 4;

      // 'a' - 'f'
      if (c >= 49 && c <= 54) {
        r |= c - 49 + 0xa;

      // 'A' - 'F'
      } else if (c >= 17 && c <= 22) {
        r |= c - 17 + 0xa;

      // '0' - '9'
      } else {
        r |= c & 0xf;
      }
    }
    return r;
  }

  BN.prototype._parseHex = function _parseHex (number, start) {
    // Create possibly bigger array to ensure that it fits the number
    this.length = Math.ceil((number.length - start) / 6);
    this.words = new Array(this.length);
    for (var i = 0; i < this.length; i++) {
      this.words[i] = 0;
    }

    var j, w;
    // Scan 24-bit chunks and add them to the number
    var off = 0;
    for (i = number.length - 6, j = 0; i >= start; i -= 6) {
      w = parseHex(number, i, i + 6);
      this.words[j] |= (w << off) & 0x3ffffff;
      // NOTE: `0x3fffff` is intentional here, 26bits max shift + 24bit hex limb
      this.words[j + 1] |= w >>> (26 - off) & 0x3fffff;
      off += 24;
      if (off >= 26) {
        off -= 26;
        j++;
      }
    }
    if (i + 6 !== start) {
      w = parseHex(number, start, i + 6);
      this.words[j] |= (w << off) & 0x3ffffff;
      this.words[j + 1] |= w >>> (26 - off) & 0x3fffff;
    }
    this.strip();
  };

  function parseBase (str, start, end, mul) {
    var r = 0;
    var len = Math.min(str.length, end);
    for (var i = start; i < len; i++) {
      var c = str.charCodeAt(i) - 48;

      r *= mul;

      // 'a'
      if (c >= 49) {
        r += c - 49 + 0xa;

      // 'A'
      } else if (c >= 17) {
        r += c - 17 + 0xa;

      // '0' - '9'
      } else {
        r += c;
      }
    }
    return r;
  }

  BN.prototype._parseBase = function _parseBase (number, base, start) {
    // Initialize as zero
    this.words = [ 0 ];
    this.length = 1;

    // Find length of limb in base
    for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {
      limbLen++;
    }
    limbLen--;
    limbPow = (limbPow / base) | 0;

    var total = number.length - start;
    var mod = total % limbLen;
    var end = Math.min(total, total - mod) + start;

    var word = 0;
    for (var i = start; i < end; i += limbLen) {
      word = parseBase(number, i, i + limbLen, base);

      this.imuln(limbPow);
      if (this.words[0] + word < 0x4000000) {
        this.words[0] += word;
      } else {
        this._iaddn(word);
      }
    }

    if (mod !== 0) {
      var pow = 1;
      word = parseBase(number, i, number.length, base);

      for (i = 0; i < mod; i++) {
        pow *= base;
      }

      this.imuln(pow);
      if (this.words[0] + word < 0x4000000) {
        this.words[0] += word;
      } else {
        this._iaddn(word);
      }
    }
  };

  BN.prototype.copy = function copy (dest) {
    dest.words = new Array(this.length);
    for (var i = 0; i < this.length; i++) {
      dest.words[i] = this.words[i];
    }
    dest.length = this.length;
    dest.negative = this.negative;
    dest.red = this.red;
  };

  BN.prototype.clone = function clone () {
    var r = new BN(null);
    this.copy(r);
    return r;
  };

  BN.prototype._expand = function _expand (size) {
    while (this.length < size) {
      this.words[this.length++] = 0;
    }
    return this;
  };

  // Remove leading `0` from `this`
  BN.prototype.strip = function strip () {
    while (this.length > 1 && this.words[this.length - 1] === 0) {
      this.length--;
    }
    return this._normSign();
  };

  BN.prototype._normSign = function _normSign () {
    // -0 = 0
    if (this.length === 1 && this.words[0] === 0) {
      this.negative = 0;
    }
    return this;
  };

  BN.prototype.inspect = function inspect () {
    return (this.red ? '<BN-R: ' : '<BN: ') + this.toString(16) + '>';
  };

  /*

  var zeros = [];
  var groupSizes = [];
  var groupBases = [];

  var s = '';
  var i = -1;
  while (++i < BN.wordSize) {
    zeros[i] = s;
    s += '0';
  }
  groupSizes[0] = 0;
  groupSizes[1] = 0;
  groupBases[0] = 0;
  groupBases[1] = 0;
  var base = 2 - 1;
  while (++base < 36 + 1) {
    var groupSize = 0;
    var groupBase = 1;
    while (groupBase < (1 << BN.wordSize) / base) {
      groupBase *= base;
      groupSize += 1;
    }
    groupSizes[base] = groupSize;
    groupBases[base] = groupBase;
  }

  */

  var zeros = [
    '',
    '0',
    '00',
    '000',
    '0000',
    '00000',
    '000000',
    '0000000',
    '00000000',
    '000000000',
    '0000000000',
    '00000000000',
    '000000000000',
    '0000000000000',
    '00000000000000',
    '000000000000000',
    '0000000000000000',
    '00000000000000000',
    '000000000000000000',
    '0000000000000000000',
    '00000000000000000000',
    '000000000000000000000',
    '0000000000000000000000',
    '00000000000000000000000',
    '000000000000000000000000',
    '0000000000000000000000000'
  ];

  var groupSizes = [
    0, 0,
    25, 16, 12, 11, 10, 9, 8,
    8, 7, 7, 7, 7, 6, 6,
    6, 6, 6, 6, 6, 5, 5,
    5, 5, 5, 5, 5, 5, 5,
    5, 5, 5, 5, 5, 5, 5
  ];

  var groupBases = [
    0, 0,
    33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,
    43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,
    16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,
    6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,
    24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176
  ];

  BN.prototype.toString = function toString (base, padding) {
    base = base || 10;
    padding = padding | 0 || 1;

    var out;
    if (base === 16 || base === 'hex') {
      out = '';
      var off = 0;
      var carry = 0;
      for (var i = 0; i < this.length; i++) {
        var w = this.words[i];
        var word = (((w << off) | carry) & 0xffffff).toString(16);
        carry = (w >>> (24 - off)) & 0xffffff;
        if (carry !== 0 || i !== this.length - 1) {
          out = zeros[6 - word.length] + word + out;
        } else {
          out = word + out;
        }
        off += 2;
        if (off >= 26) {
          off -= 26;
          i--;
        }
      }
      if (carry !== 0) {
        out = carry.toString(16) + out;
      }
      while (out.length % padding !== 0) {
        out = '0' + out;
      }
      if (this.negative !== 0) {
        out = '-' + out;
      }
      return out;
    }

    if (base === (base | 0) && base >= 2 && base <= 36) {
      // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));
      var groupSize = groupSizes[base];
      // var groupBase = Math.pow(base, groupSize);
      var groupBase = groupBases[base];
      out = '';
      var c = this.clone();
      c.negative = 0;
      while (!c.isZero()) {
        var r = c.modn(groupBase).toString(base);
        c = c.idivn(groupBase);

        if (!c.isZero()) {
          out = zeros[groupSize - r.length] + r + out;
        } else {
          out = r + out;
        }
      }
      if (this.isZero()) {
        out = '0' + out;
      }
      while (out.length % padding !== 0) {
        out = '0' + out;
      }
      if (this.negative !== 0) {
        out = '-' + out;
      }
      return out;
    }

    assert(false, 'Base should be between 2 and 36');
  };

  BN.prototype.toNumber = function toNumber () {
    var ret = this.words[0];
    if (this.length === 2) {
      ret += this.words[1] * 0x4000000;
    } else if (this.length === 3 && this.words[2] === 0x01) {
      // NOTE: at this stage it is known that the top bit is set
      ret += 0x10000000000000 + (this.words[1] * 0x4000000);
    } else if (this.length > 2) {
      assert(false, 'Number can only safely store up to 53 bits');
    }
    return (this.negative !== 0) ? -ret : ret;
  };

  BN.prototype.toJSON = function toJSON () {
    return this.toString(16);
  };

  BN.prototype.toBuffer = function toBuffer (endian, length) {
    assert(typeof Buffer !== 'undefined');
    return this.toArrayLike(Buffer, endian, length);
  };

  BN.prototype.toArray = function toArray (endian, length) {
    return this.toArrayLike(Array, endian, length);
  };

  BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {
    var byteLength = this.byteLength();
    var reqLength = length || Math.max(1, byteLength);
    assert(byteLength <= reqLength, 'byte array longer than desired length');
    assert(reqLength > 0, 'Requested array length <= 0');

    this.strip();
    var littleEndian = endian === 'le';
    var res = new ArrayType(reqLength);

    var b, i;
    var q = this.clone();
    if (!littleEndian) {
      // Assume big-endian
      for (i = 0; i < reqLength - byteLength; i++) {
        res[i] = 0;
      }

      for (i = 0; !q.isZero(); i++) {
        b = q.andln(0xff);
        q.iushrn(8);

        res[reqLength - i - 1] = b;
      }
    } else {
      for (i = 0; !q.isZero(); i++) {
        b = q.andln(0xff);
        q.iushrn(8);

        res[i] = b;
      }

      for (; i < reqLength; i++) {
        res[i] = 0;
      }
    }

    return res;
  };

  if (Math.clz32) {
    BN.prototype._countBits = function _countBits (w) {
      return 32 - Math.clz32(w);
    };
  } else {
    BN.prototype._countBits = function _countBits (w) {
      var t = w;
      var r = 0;
      if (t >= 0x1000) {
        r += 13;
        t >>>= 13;
      }
      if (t >= 0x40) {
        r += 7;
        t >>>= 7;
      }
      if (t >= 0x8) {
        r += 4;
        t >>>= 4;
      }
      if (t >= 0x02) {
        r += 2;
        t >>>= 2;
      }
      return r + t;
    };
  }

  BN.prototype._zeroBits = function _zeroBits (w) {
    // Short-cut
    if (w === 0) return 26;

    var t = w;
    var r = 0;
    if ((t & 0x1fff) === 0) {
      r += 13;
      t >>>= 13;
    }
    if ((t & 0x7f) === 0) {
      r += 7;
      t >>>= 7;
    }
    if ((t & 0xf) === 0) {
      r += 4;
      t >>>= 4;
    }
    if ((t & 0x3) === 0) {
      r += 2;
      t >>>= 2;
    }
    if ((t & 0x1) === 0) {
      r++;
    }
    return r;
  };

  // Return number of used bits in a BN
  BN.prototype.bitLength = function bitLength () {
    var w = this.words[this.length - 1];
    var hi = this._countBits(w);
    return (this.length - 1) * 26 + hi;
  };

  function toBitArray (num) {
    var w = new Array(num.bitLength());

    for (var bit = 0; bit < w.length; bit++) {
      var off = (bit / 26) | 0;
      var wbit = bit % 26;

      w[bit] = (num.words[off] & (1 << wbit)) >>> wbit;
    }

    return w;
  }

  // Number of trailing zero bits
  BN.prototype.zeroBits = function zeroBits () {
    if (this.isZero()) return 0;

    var r = 0;
    for (var i = 0; i < this.length; i++) {
      var b = this._zeroBits(this.words[i]);
      r += b;
      if (b !== 26) break;
    }
    return r;
  };

  BN.prototype.byteLength = function byteLength () {
    return Math.ceil(this.bitLength() / 8);
  };

  BN.prototype.toTwos = function toTwos (width) {
    if (this.negative !== 0) {
      return this.abs().inotn(width).iaddn(1);
    }
    return this.clone();
  };

  BN.prototype.fromTwos = function fromTwos (width) {
    if (this.testn(width - 1)) {
      return this.notn(width).iaddn(1).ineg();
    }
    return this.clone();
  };

  BN.prototype.isNeg = function isNeg () {
    return this.negative !== 0;
  };

  // Return negative clone of `this`
  BN.prototype.neg = function neg () {
    return this.clone().ineg();
  };

  BN.prototype.ineg = function ineg () {
    if (!this.isZero()) {
      this.negative ^= 1;
    }

    return this;
  };

  // Or `num` with `this` in-place
  BN.prototype.iuor = function iuor (num) {
    while (this.length < num.length) {
      this.words[this.length++] = 0;
    }

    for (var i = 0; i < num.length; i++) {
      this.words[i] = this.words[i] | num.words[i];
    }

    return this.strip();
  };

  BN.prototype.ior = function ior (num) {
    assert((this.negative | num.negative) === 0);
    return this.iuor(num);
  };

  // Or `num` with `this`
  BN.prototype.or = function or (num) {
    if (this.length > num.length) return this.clone().ior(num);
    return num.clone().ior(this);
  };

  BN.prototype.uor = function uor (num) {
    if (this.length > num.length) return this.clone().iuor(num);
    return num.clone().iuor(this);
  };

  // And `num` with `this` in-place
  BN.prototype.iuand = function iuand (num) {
    // b = min-length(num, this)
    var b;
    if (this.length > num.length) {
      b = num;
    } else {
      b = this;
    }

    for (var i = 0; i < b.length; i++) {
      this.words[i] = this.words[i] & num.words[i];
    }

    this.length = b.length;

    return this.strip();
  };

  BN.prototype.iand = function iand (num) {
    assert((this.negative | num.negative) === 0);
    return this.iuand(num);
  };

  // And `num` with `this`
  BN.prototype.and = function and (num) {
    if (this.length > num.length) return this.clone().iand(num);
    return num.clone().iand(this);
  };

  BN.prototype.uand = function uand (num) {
    if (this.length > num.length) return this.clone().iuand(num);
    return num.clone().iuand(this);
  };

  // Xor `num` with `this` in-place
  BN.prototype.iuxor = function iuxor (num) {
    // a.length > b.length
    var a;
    var b;
    if (this.length > num.length) {
      a = this;
      b = num;
    } else {
      a = num;
      b = this;
    }

    for (var i = 0; i < b.length; i++) {
      this.words[i] = a.words[i] ^ b.words[i];
    }

    if (this !== a) {
      for (; i < a.length; i++) {
        this.words[i] = a.words[i];
      }
    }

    this.length = a.length;

    return this.strip();
  };

  BN.prototype.ixor = function ixor (num) {
    assert((this.negative | num.negative) === 0);
    return this.iuxor(num);
  };

  // Xor `num` with `this`
  BN.prototype.xor = function xor (num) {
    if (this.length > num.length) return this.clone().ixor(num);
    return num.clone().ixor(this);
  };

  BN.prototype.uxor = function uxor (num) {
    if (this.length > num.length) return this.clone().iuxor(num);
    return num.clone().iuxor(this);
  };

  // Not ``this`` with ``width`` bitwidth
  BN.prototype.inotn = function inotn (width) {
    assert(typeof width === 'number' && width >= 0);

    var bytesNeeded = Math.ceil(width / 26) | 0;
    var bitsLeft = width % 26;

    // Extend the buffer with leading zeroes
    this._expand(bytesNeeded);

    if (bitsLeft > 0) {
      bytesNeeded--;
    }

    // Handle complete words
    for (var i = 0; i < bytesNeeded; i++) {
      this.words[i] = ~this.words[i] & 0x3ffffff;
    }

    // Handle the residue
    if (bitsLeft > 0) {
      this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));
    }

    // And remove leading zeroes
    return this.strip();
  };

  BN.prototype.notn = function notn (width) {
    return this.clone().inotn(width);
  };

  // Set `bit` of `this`
  BN.prototype.setn = function setn (bit, val) {
    assert(typeof bit === 'number' && bit >= 0);

    var off = (bit / 26) | 0;
    var wbit = bit % 26;

    this._expand(off + 1);

    if (val) {
      this.words[off] = this.words[off] | (1 << wbit);
    } else {
      this.words[off] = this.words[off] & ~(1 << wbit);
    }

    return this.strip();
  };

  // Add `num` to `this` in-place
  BN.prototype.iadd = function iadd (num) {
    var r;

    // negative + positive
    if (this.negative !== 0 && num.negative === 0) {
      this.negative = 0;
      r = this.isub(num);
      this.negative ^= 1;
      return this._normSign();

    // positive + negative
    } else if (this.negative === 0 && num.negative !== 0) {
      num.negative = 0;
      r = this.isub(num);
      num.negative = 1;
      return r._normSign();
    }

    // a.length > b.length
    var a, b;
    if (this.length > num.length) {
      a = this;
      b = num;
    } else {
      a = num;
      b = this;
    }

    var carry = 0;
    for (var i = 0; i < b.length; i++) {
      r = (a.words[i] | 0) + (b.words[i] | 0) + carry;
      this.words[i] = r & 0x3ffffff;
      carry = r >>> 26;
    }
    for (; carry !== 0 && i < a.length; i++) {
      r = (a.words[i] | 0) + carry;
      this.words[i] = r & 0x3ffffff;
      carry = r >>> 26;
    }

    this.length = a.length;
    if (carry !== 0) {
      this.words[this.length] = carry;
      this.length++;
    // Copy the rest of the words
    } else if (a !== this) {
      for (; i < a.length; i++) {
        this.words[i] = a.words[i];
      }
    }

    return this;
  };

  // Add `num` to `this`
  BN.prototype.add = function add (num) {
    var res;
    if (num.negative !== 0 && this.negative === 0) {
      num.negative = 0;
      res = this.sub(num);
      num.negative ^= 1;
      return res;
    } else if (num.negative === 0 && this.negative !== 0) {
      this.negative = 0;
      res = num.sub(this);
      this.negative = 1;
      return res;
    }

    if (this.length > num.length) return this.clone().iadd(num);

    return num.clone().iadd(this);
  };

  // Subtract `num` from `this` in-place
  BN.prototype.isub = function isub (num) {
    // this - (-num) = this + num
    if (num.negative !== 0) {
      num.negative = 0;
      var r = this.iadd(num);
      num.negative = 1;
      return r._normSign();

    // -this - num = -(this + num)
    } else if (this.negative !== 0) {
      this.negative = 0;
      this.iadd(num);
      this.negative = 1;
      return this._normSign();
    }

    // At this point both numbers are positive
    var cmp = this.cmp(num);

    // Optimization - zeroify
    if (cmp === 0) {
      this.negative = 0;
      this.length = 1;
      this.words[0] = 0;
      return this;
    }

    // a > b
    var a, b;
    if (cmp > 0) {
      a = this;
      b = num;
    } else {
      a = num;
      b = this;
    }

    var carry = 0;
    for (var i = 0; i < b.length; i++) {
      r = (a.words[i] | 0) - (b.words[i] | 0) + carry;
      carry = r >> 26;
      this.words[i] = r & 0x3ffffff;
    }
    for (; carry !== 0 && i < a.length; i++) {
      r = (a.words[i] | 0) + carry;
      carry = r >> 26;
      this.words[i] = r & 0x3ffffff;
    }

    // Copy rest of the words
    if (carry === 0 && i < a.length && a !== this) {
      for (; i < a.length; i++) {
        this.words[i] = a.words[i];
      }
    }

    this.length = Math.max(this.length, i);

    if (a !== this) {
      this.negative = 1;
    }

    return this.strip();
  };

  // Subtract `num` from `this`
  BN.prototype.sub = function sub (num) {
    return this.clone().isub(num);
  };

  function smallMulTo (self, num, out) {
    out.negative = num.negative ^ self.negative;
    var len = (self.length + num.length) | 0;
    out.length = len;
    len = (len - 1) | 0;

    // Peel one iteration (compiler can't do it, because of code complexity)
    var a = self.words[0] | 0;
    var b = num.words[0] | 0;
    var r = a * b;

    var lo = r & 0x3ffffff;
    var carry = (r / 0x4000000) | 0;
    out.words[0] = lo;

    for (var k = 1; k < len; k++) {
      // Sum all words with the same `i + j = k` and accumulate `ncarry`,
      // note that ncarry could be >= 0x3ffffff
      var ncarry = carry >>> 26;
      var rword = carry & 0x3ffffff;
      var maxJ = Math.min(k, num.length - 1);
      for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {
        var i = (k - j) | 0;
        a = self.words[i] | 0;
        b = num.words[j] | 0;
        r = a * b + rword;
        ncarry += (r / 0x4000000) | 0;
        rword = r & 0x3ffffff;
      }
      out.words[k] = rword | 0;
      carry = ncarry | 0;
    }
    if (carry !== 0) {
      out.words[k] = carry | 0;
    } else {
      out.length--;
    }

    return out.strip();
  }

  // TODO(indutny): it may be reasonable to omit it for users who don't need
  // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit
  // multiplication (like elliptic secp256k1).
  var comb10MulTo = function comb10MulTo (self, num, out) {
    var a = self.words;
    var b = num.words;
    var o = out.words;
    var c = 0;
    var lo;
    var mid;
    var hi;
    var a0 = a[0] | 0;
    var al0 = a0 & 0x1fff;
    var ah0 = a0 >>> 13;
    var a1 = a[1] | 0;
    var al1 = a1 & 0x1fff;
    var ah1 = a1 >>> 13;
    var a2 = a[2] | 0;
    var al2 = a2 & 0x1fff;
    var ah2 = a2 >>> 13;
    var a3 = a[3] | 0;
    var al3 = a3 & 0x1fff;
    var ah3 = a3 >>> 13;
    var a4 = a[4] | 0;
    var al4 = a4 & 0x1fff;
    var ah4 = a4 >>> 13;
    var a5 = a[5] | 0;
    var al5 = a5 & 0x1fff;
    var ah5 = a5 >>> 13;
    var a6 = a[6] | 0;
    var al6 = a6 & 0x1fff;
    var ah6 = a6 >>> 13;
    var a7 = a[7] | 0;
    var al7 = a7 & 0x1fff;
    var ah7 = a7 >>> 13;
    var a8 = a[8] | 0;
    var al8 = a8 & 0x1fff;
    var ah8 = a8 >>> 13;
    var a9 = a[9] | 0;
    var al9 = a9 & 0x1fff;
    var ah9 = a9 >>> 13;
    var b0 = b[0] | 0;
    var bl0 = b0 & 0x1fff;
    var bh0 = b0 >>> 13;
    var b1 = b[1] | 0;
    var bl1 = b1 & 0x1fff;
    var bh1 = b1 >>> 13;
    var b2 = b[2] | 0;
    var bl2 = b2 & 0x1fff;
    var bh2 = b2 >>> 13;
    var b3 = b[3] | 0;
    var bl3 = b3 & 0x1fff;
    var bh3 = b3 >>> 13;
    var b4 = b[4] | 0;
    var bl4 = b4 & 0x1fff;
    var bh4 = b4 >>> 13;
    var b5 = b[5] | 0;
    var bl5 = b5 & 0x1fff;
    var bh5 = b5 >>> 13;
    var b6 = b[6] | 0;
    var bl6 = b6 & 0x1fff;
    var bh6 = b6 >>> 13;
    var b7 = b[7] | 0;
    var bl7 = b7 & 0x1fff;
    var bh7 = b7 >>> 13;
    var b8 = b[8] | 0;
    var bl8 = b8 & 0x1fff;
    var bh8 = b8 >>> 13;
    var b9 = b[9] | 0;
    var bl9 = b9 & 0x1fff;
    var bh9 = b9 >>> 13;

    out.negative = self.negative ^ num.negative;
    out.length = 19;
    /* k = 0 */
    lo = Math.imul(al0, bl0);
    mid = Math.imul(al0, bh0);
    mid = (mid + Math.imul(ah0, bl0)) | 0;
    hi = Math.imul(ah0, bh0);
    var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
    c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;
    w0 &= 0x3ffffff;
    /* k = 1 */
    lo = Math.imul(al1, bl0);
    mid = Math.imul(al1, bh0);
    mid = (mid + Math.imul(ah1, bl0)) | 0;
    hi = Math.imul(ah1, bh0);
    lo = (lo + Math.imul(al0, bl1)) | 0;
    mid = (mid + Math.imul(al0, bh1)) | 0;
    mid = (mid + Math.imul(ah0, bl1)) | 0;
    hi = (hi + Math.imul(ah0, bh1)) | 0;
    var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
    c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;
    w1 &= 0x3ffffff;
    /* k = 2 */
    lo = Math.imul(al2, bl0);
    mid = Math.imul(al2, bh0);
    mid = (mid + Math.imul(ah2, bl0)) | 0;
    hi = Math.imul(ah2, bh0);
    lo = (lo + Math.imul(al1, bl1)) | 0;
    mid = (mid + Math.imul(al1, bh1)) | 0;
    mid = (mid + Math.imul(ah1, bl1)) | 0;
    hi = (hi + Math.imul(ah1, bh1)) | 0;
    lo = (lo + Math.imul(al0, bl2)) | 0;
    mid = (mid + Math.imul(al0, bh2)) | 0;
    mid = (mid + Math.imul(ah0, bl2)) | 0;
    hi = (hi + Math.imul(ah0, bh2)) | 0;
    var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
    c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;
    w2 &= 0x3ffffff;
    /* k = 3 */
    lo = Math.imul(al3, bl0);
    mid = Math.imul(al3, bh0);
    mid = (mid + Math.imul(ah3, bl0)) | 0;
    hi = Math.imul(ah3, bh0);
    lo = (lo + Math.imul(al2, bl1)) | 0;
    mid = (mid + Math.imul(al2, bh1)) | 0;
    mid = (mid + Math.imul(ah2, bl1)) | 0;
    hi = (hi + Math.imul(ah2, bh1)) | 0;
    lo = (lo + Math.imul(al1, bl2)) | 0;
    mid = (mid + Math.imul(al1, bh2)) | 0;
    mid = (mid + Math.imul(ah1, bl2)) | 0;
    hi = (hi + Math.imul(ah1, bh2)) | 0;
    lo = (lo + Math.imul(al0, bl3)) | 0;
    mid = (mid + Math.imul(al0, bh3)) | 0;
    mid = (mid + Math.imul(ah0, bl3)) | 0;
    hi = (hi + Math.imul(ah0, bh3)) | 0;
    var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
    c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;
    w3 &= 0x3ffffff;
    /* k = 4 */
    lo = Math.imul(al4, bl0);
    mid = Math.imul(al4, bh0);
    mid = (mid + Math.imul(ah4, bl0)) | 0;
    hi = Math.imul(ah4, bh0);
    lo = (lo + Math.imul(al3, bl1)) | 0;
    mid = (mid + Math.imul(al3, bh1)) | 0;
    mid = (mid + Math.imul(ah3, bl1)) | 0;
    hi = (hi + Math.imul(ah3, bh1)) | 0;
    lo = (lo + Math.imul(al2, bl2)) | 0;
    mid = (mid + Math.imul(al2, bh2)) | 0;
    mid = (mid + Math.imul(ah2, bl2)) | 0;
    hi = (hi + Math.imul(ah2, bh2)) | 0;
    lo = (lo + Math.imul(al1, bl3)) | 0;
    mid = (mid + Math.imul(al1, bh3)) | 0;
    mid = (mid + Math.imul(ah1, bl3)) | 0;
    hi = (hi + Math.imul(ah1, bh3)) | 0;
    lo = (lo + Math.imul(al0, bl4)) | 0;
    mid = (mid + Math.imul(al0, bh4)) | 0;
    mid = (mid + Math.imul(ah0, bl4)) | 0;
    hi = (hi + Math.imul(ah0, bh4)) | 0;
    var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
    c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;
    w4 &= 0x3ffffff;
    /* k = 5 */
    lo = Math.imul(al5, bl0);
    mid = Math.imul(al5, bh0);
    mid = (mid + Math.imul(ah5, bl0)) | 0;
    hi = Math.imul(ah5, bh0);
    lo = (lo + Math.imul(al4, bl1)) | 0;
    mid = (mid + Math.imul(al4, bh1)) | 0;
    mid = (mid + Math.imul(ah4, bl1)) | 0;
    hi = (hi + Math.imul(ah4, bh1)) | 0;
    lo = (lo + Math.imul(al3, bl2)) | 0;
    mid = (mid + Math.imul(al3, bh2)) | 0;
    mid = (mid + Math.imul(ah3, bl2)) | 0;
    hi = (hi + Math.imul(ah3, bh2)) | 0;
    lo = (lo + Math.imul(al2, bl3)) | 0;
    mid = (mid + Math.imul(al2, bh3)) | 0;
    mid = (mid + Math.imul(ah2, bl3)) | 0;
    hi = (hi + Math.imul(ah2, bh3)) | 0;
    lo = (lo + Math.imul(al1, bl4)) | 0;
    mid = (mid + Math.imul(al1, bh4)) | 0;
    mid = (mid + Math.imul(ah1, bl4)) | 0;
    hi = (hi + Math.imul(ah1, bh4)) | 0;
    lo = (lo + Math.imul(al0, bl5)) | 0;
    mid = (mid + Math.imul(al0, bh5)) | 0;
    mid = (mid + Math.imul(ah0, bl5)) | 0;
    hi = (hi + Math.imul(ah0, bh5)) | 0;
    var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
    c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;
    w5 &= 0x3ffffff;
    /* k = 6 */
    lo = Math.imul(al6, bl0);
    mid = Math.imul(al6, bh0);
    mid = (mid + Math.imul(ah6, bl0)) | 0;
    hi = Math.imul(ah6, bh0);
    lo = (lo + Math.imul(al5, bl1)) | 0;
    mid = (mid + Math.imul(al5, bh1)) | 0;
    mid = (mid + Math.imul(ah5, bl1)) | 0;
    hi = (hi + Math.imul(ah5, bh1)) | 0;
    lo = (lo + Math.imul(al4, bl2)) | 0;
    mid = (mid + Math.imul(al4, bh2)) | 0;
    mid = (mid + Math.imul(ah4, bl2)) | 0;
    hi = (hi + Math.imul(ah4, bh2)) | 0;
    lo = (lo + Math.imul(al3, bl3)) | 0;
    mid = (mid + Math.imul(al3, bh3)) | 0;
    mid = (mid + Math.imul(ah3, bl3)) | 0;
    hi = (hi + Math.imul(ah3, bh3)) | 0;
    lo = (lo + Math.imul(al2, bl4)) | 0;
    mid = (mid + Math.imul(al2, bh4)) | 0;
    mid = (mid + Math.imul(ah2, bl4)) | 0;
    hi = (hi + Math.imul(ah2, bh4)) | 0;
    lo = (lo + Math.imul(al1, bl5)) | 0;
    mid = (mid + Math.imul(al1, bh5)) | 0;
    mid = (mid + Math.imul(ah1, bl5)) | 0;
    hi = (hi + Math.imul(ah1, bh5)) | 0;
    lo = (lo + Math.imul(al0, bl6)) | 0;
    mid = (mid + Math.imul(al0, bh6)) | 0;
    mid = (mid + Math.imul(ah0, bl6)) | 0;
    hi = (hi + Math.imul(ah0, bh6)) | 0;
    var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
    c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;
    w6 &= 0x3ffffff;
    /* k = 7 */
    lo = Math.imul(al7, bl0);
    mid = Math.imul(al7, bh0);
    mid = (mid + Math.imul(ah7, bl0)) | 0;
    hi = Math.imul(ah7, bh0);
    lo = (lo + Math.imul(al6, bl1)) | 0;
    mid = (mid + Math.imul(al6, bh1)) | 0;
    mid = (mid + Math.imul(ah6, bl1)) | 0;
    hi = (hi + Math.imul(ah6, bh1)) | 0;
    lo = (lo + Math.imul(al5, bl2)) | 0;
    mid = (mid + Math.imul(al5, bh2)) | 0;
    mid = (mid + Math.imul(ah5, bl2)) | 0;
    hi = (hi + Math.imul(ah5, bh2)) | 0;
    lo = (lo + Math.imul(al4, bl3)) | 0;
    mid = (mid + Math.imul(al4, bh3)) | 0;
    mid = (mid + Math.imul(ah4, bl3)) | 0;
    hi = (hi + Math.imul(ah4, bh3)) | 0;
    lo = (lo + Math.imul(al3, bl4)) | 0;
    mid = (mid + Math.imul(al3, bh4)) | 0;
    mid = (mid + Math.imul(ah3, bl4)) | 0;
    hi = (hi + Math.imul(ah3, bh4)) | 0;
    lo = (lo + Math.imul(al2, bl5)) | 0;
    mid = (mid + Math.imul(al2, bh5)) | 0;
    mid = (mid + Math.imul(ah2, bl5)) | 0;
    hi = (hi + Math.imul(ah2, bh5)) | 0;
    lo = (lo + Math.imul(al1, bl6)) | 0;
    mid = (mid + Math.imul(al1, bh6)) | 0;
    mid = (mid + Math.imul(ah1, bl6)) | 0;
    hi = (hi + Math.imul(ah1, bh6)) | 0;
    lo = (lo + Math.imul(al0, bl7)) | 0;
    mid = (mid + Math.imul(al0, bh7)) | 0;
    mid = (mid + Math.imul(ah0, bl7)) | 0;
    hi = (hi + Math.imul(ah0, bh7)) | 0;
    var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
    c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;
    w7 &= 0x3ffffff;
    /* k = 8 */
    lo = Math.imul(al8, bl0);
    mid = Math.imul(al8, bh0);
    mid = (mid + Math.imul(ah8, bl0)) | 0;
    hi = Math.imul(ah8, bh0);
    lo = (lo + Math.imul(al7, bl1)) | 0;
    mid = (mid + Math.imul(al7, bh1)) | 0;
    mid = (mid + Math.imul(ah7, bl1)) | 0;
    hi = (hi + Math.imul(ah7, bh1)) | 0;
    lo = (lo + Math.imul(al6, bl2)) | 0;
    mid = (mid + Math.imul(al6, bh2)) | 0;
    mid = (mid + Math.imul(ah6, bl2)) | 0;
    hi = (hi + Math.imul(ah6, bh2)) | 0;
    lo = (lo + Math.imul(al5, bl3)) | 0;
    mid = (mid + Math.imul(al5, bh3)) | 0;
    mid = (mid + Math.imul(ah5, bl3)) | 0;
    hi = (hi + Math.imul(ah5, bh3)) | 0;
    lo = (lo + Math.imul(al4, bl4)) | 0;
    mid = (mid + Math.imul(al4, bh4)) | 0;
    mid = (mid + Math.imul(ah4, bl4)) | 0;
    hi = (hi + Math.imul(ah4, bh4)) | 0;
    lo = (lo + Math.imul(al3, bl5)) | 0;
    mid = (mid + Math.imul(al3, bh5)) | 0;
    mid = (mid + Math.imul(ah3, bl5)) | 0;
    hi = (hi + Math.imul(ah3, bh5)) | 0;
    lo = (lo + Math.imul(al2, bl6)) | 0;
    mid = (mid + Math.imul(al2, bh6)) | 0;
    mid = (mid + Math.imul(ah2, bl6)) | 0;
    hi = (hi + Math.imul(ah2, bh6)) | 0;
    lo = (lo + Math.imul(al1, bl7)) | 0;
    mid = (mid + Math.imul(al1, bh7)) | 0;
    mid = (mid + Math.imul(ah1, bl7)) | 0;
    hi = (hi + Math.imul(ah1, bh7)) | 0;
    lo = (lo + Math.imul(al0, bl8)) | 0;
    mid = (mid + Math.imul(al0, bh8)) | 0;
    mid = (mid + Math.imul(ah0, bl8)) | 0;
    hi = (hi + Math.imul(ah0, bh8)) | 0;
    var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
    c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;
    w8 &= 0x3ffffff;
    /* k = 9 */
    lo = Math.imul(al9, bl0);
    mid = Math.imul(al9, bh0);
    mid = (mid + Math.imul(ah9, bl0)) | 0;
    hi = Math.imul(ah9, bh0);
    lo = (lo + Math.imul(al8, bl1)) | 0;
    mid = (mid + Math.imul(al8, bh1)) | 0;
    mid = (mid + Math.imul(ah8, bl1)) | 0;
    hi = (hi + Math.imul(ah8, bh1)) | 0;
    lo = (lo + Math.imul(al7, bl2)) | 0;
    mid = (mid + Math.imul(al7, bh2)) | 0;
    mid = (mid + Math.imul(ah7, bl2)) | 0;
    hi = (hi + Math.imul(ah7, bh2)) | 0;
    lo = (lo + Math.imul(al6, bl3)) | 0;
    mid = (mid + Math.imul(al6, bh3)) | 0;
    mid = (mid + Math.imul(ah6, bl3)) | 0;
    hi = (hi + Math.imul(ah6, bh3)) | 0;
    lo = (lo + Math.imul(al5, bl4)) | 0;
    mid = (mid + Math.imul(al5, bh4)) | 0;
    mid = (mid + Math.imul(ah5, bl4)) | 0;
    hi = (hi + Math.imul(ah5, bh4)) | 0;
    lo = (lo + Math.imul(al4, bl5)) | 0;
    mid = (mid + Math.imul(al4, bh5)) | 0;
    mid = (mid + Math.imul(ah4, bl5)) | 0;
    hi = (hi + Math.imul(ah4, bh5)) | 0;
    lo = (lo + Math.imul(al3, bl6)) | 0;
    mid = (mid + Math.imul(al3, bh6)) | 0;
    mid = (mid + Math.imul(ah3, bl6)) | 0;
    hi = (hi + Math.imul(ah3, bh6)) | 0;
    lo = (lo + Math.imul(al2, bl7)) | 0;
    mid = (mid + Math.imul(al2, bh7)) | 0;
    mid = (mid + Math.imul(ah2, bl7)) | 0;
    hi = (hi + Math.imul(ah2, bh7)) | 0;
    lo = (lo + Math.imul(al1, bl8)) | 0;
    mid = (mid + Math.imul(al1, bh8)) | 0;
    mid = (mid + Math.imul(ah1, bl8)) | 0;
    hi = (hi + Math.imul(ah1, bh8)) | 0;
    lo = (lo + Math.imul(al0, bl9)) | 0;
    mid = (mid + Math.imul(al0, bh9)) | 0;
    mid = (mid + Math.imul(ah0, bl9)) | 0;
    hi = (hi + Math.imul(ah0, bh9)) | 0;
    var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
    c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;
    w9 &= 0x3ffffff;
    /* k = 10 */
    lo = Math.imul(al9, bl1);
    mid = Math.imul(al9, bh1);
    mid = (mid + Math.imul(ah9, bl1)) | 0;
    hi = Math.imul(ah9, bh1);
    lo = (lo + Math.imul(al8, bl2)) | 0;
    mid = (mid + Math.imul(al8, bh2)) | 0;
    mid = (mid + Math.imul(ah8, bl2)) | 0;
    hi = (hi + Math.imul(ah8, bh2)) | 0;
    lo = (lo + Math.imul(al7, bl3)) | 0;
    mid = (mid + Math.imul(al7, bh3)) | 0;
    mid = (mid + Math.imul(ah7, bl3)) | 0;
    hi = (hi + Math.imul(ah7, bh3)) | 0;
    lo = (lo + Math.imul(al6, bl4)) | 0;
    mid = (mid + Math.imul(al6, bh4)) | 0;
    mid = (mid + Math.imul(ah6, bl4)) | 0;
    hi = (hi + Math.imul(ah6, bh4)) | 0;
    lo = (lo + Math.imul(al5, bl5)) | 0;
    mid = (mid + Math.imul(al5, bh5)) | 0;
    mid = (mid + Math.imul(ah5, bl5)) | 0;
    hi = (hi + Math.imul(ah5, bh5)) | 0;
    lo = (lo + Math.imul(al4, bl6)) | 0;
    mid = (mid + Math.imul(al4, bh6)) | 0;
    mid = (mid + Math.imul(ah4, bl6)) | 0;
    hi = (hi + Math.imul(ah4, bh6)) | 0;
    lo = (lo + Math.imul(al3, bl7)) | 0;
    mid = (mid + Math.imul(al3, bh7)) | 0;
    mid = (mid + Math.imul(ah3, bl7)) | 0;
    hi = (hi + Math.imul(ah3, bh7)) | 0;
    lo = (lo + Math.imul(al2, bl8)) | 0;
    mid = (mid + Math.imul(al2, bh8)) | 0;
    mid = (mid + Math.imul(ah2, bl8)) | 0;
    hi = (hi + Math.imul(ah2, bh8)) | 0;
    lo = (lo + Math.imul(al1, bl9)) | 0;
    mid = (mid + Math.imul(al1, bh9)) | 0;
    mid = (mid + Math.imul(ah1, bl9)) | 0;
    hi = (hi + Math.imul(ah1, bh9)) | 0;
    var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
    c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;
    w10 &= 0x3ffffff;
    /* k = 11 */
    lo = Math.imul(al9, bl2);
    mid = Math.imul(al9, bh2);
    mid = (mid + Math.imul(ah9, bl2)) | 0;
    hi = Math.imul(ah9, bh2);
    lo = (lo + Math.imul(al8, bl3)) | 0;
    mid = (mid + Math.imul(al8, bh3)) | 0;
    mid = (mid + Math.imul(ah8, bl3)) | 0;
    hi = (hi + Math.imul(ah8, bh3)) | 0;
    lo = (lo + Math.imul(al7, bl4)) | 0;
    mid = (mid + Math.imul(al7, bh4)) | 0;
    mid = (mid + Math.imul(ah7, bl4)) | 0;
    hi = (hi + Math.imul(ah7, bh4)) | 0;
    lo = (lo + Math.imul(al6, bl5)) | 0;
    mid = (mid + Math.imul(al6, bh5)) | 0;
    mid = (mid + Math.imul(ah6, bl5)) | 0;
    hi = (hi + Math.imul(ah6, bh5)) | 0;
    lo = (lo + Math.imul(al5, bl6)) | 0;
    mid = (mid + Math.imul(al5, bh6)) | 0;
    mid = (mid + Math.imul(ah5, bl6)) | 0;
    hi = (hi + Math.imul(ah5, bh6)) | 0;
    lo = (lo + Math.imul(al4, bl7)) | 0;
    mid = (mid + Math.imul(al4, bh7)) | 0;
    mid = (mid + Math.imul(ah4, bl7)) | 0;
    hi = (hi + Math.imul(ah4, bh7)) | 0;
    lo = (lo + Math.imul(al3, bl8)) | 0;
    mid = (mid + Math.imul(al3, bh8)) | 0;
    mid = (mid + Math.imul(ah3, bl8)) | 0;
    hi = (hi + Math.imul(ah3, bh8)) | 0;
    lo = (lo + Math.imul(al2, bl9)) | 0;
    mid = (mid + Math.imul(al2, bh9)) | 0;
    mid = (mid + Math.imul(ah2, bl9)) | 0;
    hi = (hi + Math.imul(ah2, bh9)) | 0;
    var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
    c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;
    w11 &= 0x3ffffff;
    /* k = 12 */
    lo = Math.imul(al9, bl3);
    mid = Math.imul(al9, bh3);
    mid = (mid + Math.imul(ah9, bl3)) | 0;
    hi = Math.imul(ah9, bh3);
    lo = (lo + Math.imul(al8, bl4)) | 0;
    mid = (mid + Math.imul(al8, bh4)) | 0;
    mid = (mid + Math.imul(ah8, bl4)) | 0;
    hi = (hi + Math.imul(ah8, bh4)) | 0;
    lo = (lo + Math.imul(al7, bl5)) | 0;
    mid = (mid + Math.imul(al7, bh5)) | 0;
    mid = (mid + Math.imul(ah7, bl5)) | 0;
    hi = (hi + Math.imul(ah7, bh5)) | 0;
    lo = (lo + Math.imul(al6, bl6)) | 0;
    mid = (mid + Math.imul(al6, bh6)) | 0;
    mid = (mid + Math.imul(ah6, bl6)) | 0;
    hi = (hi + Math.imul(ah6, bh6)) | 0;
    lo = (lo + Math.imul(al5, bl7)) | 0;
    mid = (mid + Math.imul(al5, bh7)) | 0;
    mid = (mid + Math.imul(ah5, bl7)) | 0;
    hi = (hi + Math.imul(ah5, bh7)) | 0;
    lo = (lo + Math.imul(al4, bl8)) | 0;
    mid = (mid + Math.imul(al4, bh8)) | 0;
    mid = (mid + Math.imul(ah4, bl8)) | 0;
    hi = (hi + Math.imul(ah4, bh8)) | 0;
    lo = (lo + Math.imul(al3, bl9)) | 0;
    mid = (mid + Math.imul(al3, bh9)) | 0;
    mid = (mid + Math.imul(ah3, bl9)) | 0;
    hi = (hi + Math.imul(ah3, bh9)) | 0;
    var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
    c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;
    w12 &= 0x3ffffff;
    /* k = 13 */
    lo = Math.imul(al9, bl4);
    mid = Math.imul(al9, bh4);
    mid = (mid + Math.imul(ah9, bl4)) | 0;
    hi = Math.imul(ah9, bh4);
    lo = (lo + Math.imul(al8, bl5)) | 0;
    mid = (mid + Math.imul(al8, bh5)) | 0;
    mid = (mid + Math.imul(ah8, bl5)) | 0;
    hi = (hi + Math.imul(ah8, bh5)) | 0;
    lo = (lo + Math.imul(al7, bl6)) | 0;
    mid = (mid + Math.imul(al7, bh6)) | 0;
    mid = (mid + Math.imul(ah7, bl6)) | 0;
    hi = (hi + Math.imul(ah7, bh6)) | 0;
    lo = (lo + Math.imul(al6, bl7)) | 0;
    mid = (mid + Math.imul(al6, bh7)) | 0;
    mid = (mid + Math.imul(ah6, bl7)) | 0;
    hi = (hi + Math.imul(ah6, bh7)) | 0;
    lo = (lo + Math.imul(al5, bl8)) | 0;
    mid = (mid + Math.imul(al5, bh8)) | 0;
    mid = (mid + Math.imul(ah5, bl8)) | 0;
    hi = (hi + Math.imul(ah5, bh8)) | 0;
    lo = (lo + Math.imul(al4, bl9)) | 0;
    mid = (mid + Math.imul(al4, bh9)) | 0;
    mid = (mid + Math.imul(ah4, bl9)) | 0;
    hi = (hi + Math.imul(ah4, bh9)) | 0;
    var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
    c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;
    w13 &= 0x3ffffff;
    /* k = 14 */
    lo = Math.imul(al9, bl5);
    mid = Math.imul(al9, bh5);
    mid = (mid + Math.imul(ah9, bl5)) | 0;
    hi = Math.imul(ah9, bh5);
    lo = (lo + Math.imul(al8, bl6)) | 0;
    mid = (mid + Math.imul(al8, bh6)) | 0;
    mid = (mid + Math.imul(ah8, bl6)) | 0;
    hi = (hi + Math.imul(ah8, bh6)) | 0;
    lo = (lo + Math.imul(al7, bl7)) | 0;
    mid = (mid + Math.imul(al7, bh7)) | 0;
    mid = (mid + Math.imul(ah7, bl7)) | 0;
    hi = (hi + Math.imul(ah7, bh7)) | 0;
    lo = (lo + Math.imul(al6, bl8)) | 0;
    mid = (mid + Math.imul(al6, bh8)) | 0;
    mid = (mid + Math.imul(ah6, bl8)) | 0;
    hi = (hi + Math.imul(ah6, bh8)) | 0;
    lo = (lo + Math.imul(al5, bl9)) | 0;
    mid = (mid + Math.imul(al5, bh9)) | 0;
    mid = (mid + Math.imul(ah5, bl9)) | 0;
    hi = (hi + Math.imul(ah5, bh9)) | 0;
    var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
    c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;
    w14 &= 0x3ffffff;
    /* k = 15 */
    lo = Math.imul(al9, bl6);
    mid = Math.imul(al9, bh6);
    mid = (mid + Math.imul(ah9, bl6)) | 0;
    hi = Math.imul(ah9, bh6);
    lo = (lo + Math.imul(al8, bl7)) | 0;
    mid = (mid + Math.imul(al8, bh7)) | 0;
    mid = (mid + Math.imul(ah8, bl7)) | 0;
    hi = (hi + Math.imul(ah8, bh7)) | 0;
    lo = (lo + Math.imul(al7, bl8)) | 0;
    mid = (mid + Math.imul(al7, bh8)) | 0;
    mid = (mid + Math.imul(ah7, bl8)) | 0;
    hi = (hi + Math.imul(ah7, bh8)) | 0;
    lo = (lo + Math.imul(al6, bl9)) | 0;
    mid = (mid + Math.imul(al6, bh9)) | 0;
    mid = (mid + Math.imul(ah6, bl9)) | 0;
    hi = (hi + Math.imul(ah6, bh9)) | 0;
    var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
    c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;
    w15 &= 0x3ffffff;
    /* k = 16 */
    lo = Math.imul(al9, bl7);
    mid = Math.imul(al9, bh7);
    mid = (mid + Math.imul(ah9, bl7)) | 0;
    hi = Math.imul(ah9, bh7);
    lo = (lo + Math.imul(al8, bl8)) | 0;
    mid = (mid + Math.imul(al8, bh8)) | 0;
    mid = (mid + Math.imul(ah8, bl8)) | 0;
    hi = (hi + Math.imul(ah8, bh8)) | 0;
    lo = (lo + Math.imul(al7, bl9)) | 0;
    mid = (mid + Math.imul(al7, bh9)) | 0;
    mid = (mid + Math.imul(ah7, bl9)) | 0;
    hi = (hi + Math.imul(ah7, bh9)) | 0;
    var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
    c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;
    w16 &= 0x3ffffff;
    /* k = 17 */
    lo = Math.imul(al9, bl8);
    mid = Math.imul(al9, bh8);
    mid = (mid + Math.imul(ah9, bl8)) | 0;
    hi = Math.imul(ah9, bh8);
    lo = (lo + Math.imul(al8, bl9)) | 0;
    mid = (mid + Math.imul(al8, bh9)) | 0;
    mid = (mid + Math.imul(ah8, bl9)) | 0;
    hi = (hi + Math.imul(ah8, bh9)) | 0;
    var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
    c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;
    w17 &= 0x3ffffff;
    /* k = 18 */
    lo = Math.imul(al9, bl9);
    mid = Math.imul(al9, bh9);
    mid = (mid + Math.imul(ah9, bl9)) | 0;
    hi = Math.imul(ah9, bh9);
    var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
    c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;
    w18 &= 0x3ffffff;
    o[0] = w0;
    o[1] = w1;
    o[2] = w2;
    o[3] = w3;
    o[4] = w4;
    o[5] = w5;
    o[6] = w6;
    o[7] = w7;
    o[8] = w8;
    o[9] = w9;
    o[10] = w10;
    o[11] = w11;
    o[12] = w12;
    o[13] = w13;
    o[14] = w14;
    o[15] = w15;
    o[16] = w16;
    o[17] = w17;
    o[18] = w18;
    if (c !== 0) {
      o[19] = c;
      out.length++;
    }
    return out;
  };

  // Polyfill comb
  if (!Math.imul) {
    comb10MulTo = smallMulTo;
  }

  function bigMulTo (self, num, out) {
    out.negative = num.negative ^ self.negative;
    out.length = self.length + num.length;

    var carry = 0;
    var hncarry = 0;
    for (var k = 0; k < out.length - 1; k++) {
      // Sum all words with the same `i + j = k` and accumulate `ncarry`,
      // note that ncarry could be >= 0x3ffffff
      var ncarry = hncarry;
      hncarry = 0;
      var rword = carry & 0x3ffffff;
      var maxJ = Math.min(k, num.length - 1);
      for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {
        var i = k - j;
        var a = self.words[i] | 0;
        var b = num.words[j] | 0;
        var r = a * b;

        var lo = r & 0x3ffffff;
        ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;
        lo = (lo + rword) | 0;
        rword = lo & 0x3ffffff;
        ncarry = (ncarry + (lo >>> 26)) | 0;

        hncarry += ncarry >>> 26;
        ncarry &= 0x3ffffff;
      }
      out.words[k] = rword;
      carry = ncarry;
      ncarry = hncarry;
    }
    if (carry !== 0) {
      out.words[k] = carry;
    } else {
      out.length--;
    }

    return out.strip();
  }

  function jumboMulTo (self, num, out) {
    var fftm = new FFTM();
    return fftm.mulp(self, num, out);
  }

  BN.prototype.mulTo = function mulTo (num, out) {
    var res;
    var len = this.length + num.length;
    if (this.length === 10 && num.length === 10) {
      res = comb10MulTo(this, num, out);
    } else if (len < 63) {
      res = smallMulTo(this, num, out);
    } else if (len < 1024) {
      res = bigMulTo(this, num, out);
    } else {
      res = jumboMulTo(this, num, out);
    }

    return res;
  };

  // Cooley-Tukey algorithm for FFT
  // slightly revisited to rely on looping instead of recursion

  function FFTM (x, y) {
    this.x = x;
    this.y = y;
  }

  FFTM.prototype.makeRBT = function makeRBT (N) {
    var t = new Array(N);
    var l = BN.prototype._countBits(N) - 1;
    for (var i = 0; i < N; i++) {
      t[i] = this.revBin(i, l, N);
    }

    return t;
  };

  // Returns binary-reversed representation of `x`
  FFTM.prototype.revBin = function revBin (x, l, N) {
    if (x === 0 || x === N - 1) return x;

    var rb = 0;
    for (var i = 0; i < l; i++) {
      rb |= (x & 1) << (l - i - 1);
      x >>= 1;
    }

    return rb;
  };

  // Performs "tweedling" phase, therefore 'emulating'
  // behaviour of the recursive algorithm
  FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {
    for (var i = 0; i < N; i++) {
      rtws[i] = rws[rbt[i]];
      itws[i] = iws[rbt[i]];
    }
  };

  FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {
    this.permute(rbt, rws, iws, rtws, itws, N);

    for (var s = 1; s < N; s <<= 1) {
      var l = s << 1;

      var rtwdf = Math.cos(2 * Math.PI / l);
      var itwdf = Math.sin(2 * Math.PI / l);

      for (var p = 0; p < N; p += l) {
        var rtwdf_ = rtwdf;
        var itwdf_ = itwdf;

        for (var j = 0; j < s; j++) {
          var re = rtws[p + j];
          var ie = itws[p + j];

          var ro = rtws[p + j + s];
          var io = itws[p + j + s];

          var rx = rtwdf_ * ro - itwdf_ * io;

          io = rtwdf_ * io + itwdf_ * ro;
          ro = rx;

          rtws[p + j] = re + ro;
          itws[p + j] = ie + io;

          rtws[p + j + s] = re - ro;
          itws[p + j + s] = ie - io;

          /* jshint maxdepth : false */
          if (j !== l) {
            rx = rtwdf * rtwdf_ - itwdf * itwdf_;

            itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;
            rtwdf_ = rx;
          }
        }
      }
    }
  };

  FFTM.prototype.guessLen13b = function guessLen13b (n, m) {
    var N = Math.max(m, n) | 1;
    var odd = N & 1;
    var i = 0;
    for (N = N / 2 | 0; N; N = N >>> 1) {
      i++;
    }

    return 1 << i + 1 + odd;
  };

  FFTM.prototype.conjugate = function conjugate (rws, iws, N) {
    if (N <= 1) return;

    for (var i = 0; i < N / 2; i++) {
      var t = rws[i];

      rws[i] = rws[N - i - 1];
      rws[N - i - 1] = t;

      t = iws[i];

      iws[i] = -iws[N - i - 1];
      iws[N - i - 1] = -t;
    }
  };

  FFTM.prototype.normalize13b = function normalize13b (ws, N) {
    var carry = 0;
    for (var i = 0; i < N / 2; i++) {
      var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +
        Math.round(ws[2 * i] / N) +
        carry;

      ws[i] = w & 0x3ffffff;

      if (w < 0x4000000) {
        carry = 0;
      } else {
        carry = w / 0x4000000 | 0;
      }
    }

    return ws;
  };

  FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {
    var carry = 0;
    for (var i = 0; i < len; i++) {
      carry = carry + (ws[i] | 0);

      rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;
      rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;
    }

    // Pad with zeroes
    for (i = 2 * len; i < N; ++i) {
      rws[i] = 0;
    }

    assert(carry === 0);
    assert((carry & ~0x1fff) === 0);
  };

  FFTM.prototype.stub = function stub (N) {
    var ph = new Array(N);
    for (var i = 0; i < N; i++) {
      ph[i] = 0;
    }

    return ph;
  };

  FFTM.prototype.mulp = function mulp (x, y, out) {
    var N = 2 * this.guessLen13b(x.length, y.length);

    var rbt = this.makeRBT(N);

    var _ = this.stub(N);

    var rws = new Array(N);
    var rwst = new Array(N);
    var iwst = new Array(N);

    var nrws = new Array(N);
    var nrwst = new Array(N);
    var niwst = new Array(N);

    var rmws = out.words;
    rmws.length = N;

    this.convert13b(x.words, x.length, rws, N);
    this.convert13b(y.words, y.length, nrws, N);

    this.transform(rws, _, rwst, iwst, N, rbt);
    this.transform(nrws, _, nrwst, niwst, N, rbt);

    for (var i = 0; i < N; i++) {
      var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];
      iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];
      rwst[i] = rx;
    }

    this.conjugate(rwst, iwst, N);
    this.transform(rwst, iwst, rmws, _, N, rbt);
    this.conjugate(rmws, _, N);
    this.normalize13b(rmws, N);

    out.negative = x.negative ^ y.negative;
    out.length = x.length + y.length;
    return out.strip();
  };

  // Multiply `this` by `num`
  BN.prototype.mul = function mul (num) {
    var out = new BN(null);
    out.words = new Array(this.length + num.length);
    return this.mulTo(num, out);
  };

  // Multiply employing FFT
  BN.prototype.mulf = function mulf (num) {
    var out = new BN(null);
    out.words = new Array(this.length + num.length);
    return jumboMulTo(this, num, out);
  };

  // In-place Multiplication
  BN.prototype.imul = function imul (num) {
    return this.clone().mulTo(num, this);
  };

  BN.prototype.imuln = function imuln (num) {
    assert(typeof num === 'number');
    assert(num < 0x4000000);

    // Carry
    var carry = 0;
    for (var i = 0; i < this.length; i++) {
      var w = (this.words[i] | 0) * num;
      var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);
      carry >>= 26;
      carry += (w / 0x4000000) | 0;
      // NOTE: lo is 27bit maximum
      carry += lo >>> 26;
      this.words[i] = lo & 0x3ffffff;
    }

    if (carry !== 0) {
      this.words[i] = carry;
      this.length++;
    }

    return this;
  };

  BN.prototype.muln = function muln (num) {
    return this.clone().imuln(num);
  };

  // `this` * `this`
  BN.prototype.sqr = function sqr () {
    return this.mul(this);
  };

  // `this` * `this` in-place
  BN.prototype.isqr = function isqr () {
    return this.imul(this.clone());
  };

  // Math.pow(`this`, `num`)
  BN.prototype.pow = function pow (num) {
    var w = toBitArray(num);
    if (w.length === 0) return new BN(1);

    // Skip leading zeroes
    var res = this;
    for (var i = 0; i < w.length; i++, res = res.sqr()) {
      if (w[i] !== 0) break;
    }

    if (++i < w.length) {
      for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {
        if (w[i] === 0) continue;

        res = res.mul(q);
      }
    }

    return res;
  };

  // Shift-left in-place
  BN.prototype.iushln = function iushln (bits) {
    assert(typeof bits === 'number' && bits >= 0);
    var r = bits % 26;
    var s = (bits - r) / 26;
    var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);
    var i;

    if (r !== 0) {
      var carry = 0;

      for (i = 0; i < this.length; i++) {
        var newCarry = this.words[i] & carryMask;
        var c = ((this.words[i] | 0) - newCarry) << r;
        this.words[i] = c | carry;
        carry = newCarry >>> (26 - r);
      }

      if (carry) {
        this.words[i] = carry;
        this.length++;
      }
    }

    if (s !== 0) {
      for (i = this.length - 1; i >= 0; i--) {
        this.words[i + s] = this.words[i];
      }

      for (i = 0; i < s; i++) {
        this.words[i] = 0;
      }

      this.length += s;
    }

    return this.strip();
  };

  BN.prototype.ishln = function ishln (bits) {
    // TODO(indutny): implement me
    assert(this.negative === 0);
    return this.iushln(bits);
  };

  // Shift-right in-place
  // NOTE: `hint` is a lowest bit before trailing zeroes
  // NOTE: if `extended` is present - it will be filled with destroyed bits
  BN.prototype.iushrn = function iushrn (bits, hint, extended) {
    assert(typeof bits === 'number' && bits >= 0);
    var h;
    if (hint) {
      h = (hint - (hint % 26)) / 26;
    } else {
      h = 0;
    }

    var r = bits % 26;
    var s = Math.min((bits - r) / 26, this.length);
    var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);
    var maskedWords = extended;

    h -= s;
    h = Math.max(0, h);

    // Extended mode, copy masked part
    if (maskedWords) {
      for (var i = 0; i < s; i++) {
        maskedWords.words[i] = this.words[i];
      }
      maskedWords.length = s;
    }

    if (s === 0) ; else if (this.length > s) {
      this.length -= s;
      for (i = 0; i < this.length; i++) {
        this.words[i] = this.words[i + s];
      }
    } else {
      this.words[0] = 0;
      this.length = 1;
    }

    var carry = 0;
    for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {
      var word = this.words[i] | 0;
      this.words[i] = (carry << (26 - r)) | (word >>> r);
      carry = word & mask;
    }

    // Push carried bits as a mask
    if (maskedWords && carry !== 0) {
      maskedWords.words[maskedWords.length++] = carry;
    }

    if (this.length === 0) {
      this.words[0] = 0;
      this.length = 1;
    }

    return this.strip();
  };

  BN.prototype.ishrn = function ishrn (bits, hint, extended) {
    // TODO(indutny): implement me
    assert(this.negative === 0);
    return this.iushrn(bits, hint, extended);
  };

  // Shift-left
  BN.prototype.shln = function shln (bits) {
    return this.clone().ishln(bits);
  };

  BN.prototype.ushln = function ushln (bits) {
    return this.clone().iushln(bits);
  };

  // Shift-right
  BN.prototype.shrn = function shrn (bits) {
    return this.clone().ishrn(bits);
  };

  BN.prototype.ushrn = function ushrn (bits) {
    return this.clone().iushrn(bits);
  };

  // Test if n bit is set
  BN.prototype.testn = function testn (bit) {
    assert(typeof bit === 'number' && bit >= 0);
    var r = bit % 26;
    var s = (bit - r) / 26;
    var q = 1 << r;

    // Fast case: bit is much higher than all existing words
    if (this.length <= s) return false;

    // Check bit and return
    var w = this.words[s];

    return !!(w & q);
  };

  // Return only lowers bits of number (in-place)
  BN.prototype.imaskn = function imaskn (bits) {
    assert(typeof bits === 'number' && bits >= 0);
    var r = bits % 26;
    var s = (bits - r) / 26;

    assert(this.negative === 0, 'imaskn works only with positive numbers');

    if (this.length <= s) {
      return this;
    }

    if (r !== 0) {
      s++;
    }
    this.length = Math.min(s, this.length);

    if (r !== 0) {
      var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);
      this.words[this.length - 1] &= mask;
    }

    return this.strip();
  };

  // Return only lowers bits of number
  BN.prototype.maskn = function maskn (bits) {
    return this.clone().imaskn(bits);
  };

  // Add plain number `num` to `this`
  BN.prototype.iaddn = function iaddn (num) {
    assert(typeof num === 'number');
    assert(num < 0x4000000);
    if (num < 0) return this.isubn(-num);

    // Possible sign change
    if (this.negative !== 0) {
      if (this.length === 1 && (this.words[0] | 0) < num) {
        this.words[0] = num - (this.words[0] | 0);
        this.negative = 0;
        return this;
      }

      this.negative = 0;
      this.isubn(num);
      this.negative = 1;
      return this;
    }

    // Add without checks
    return this._iaddn(num);
  };

  BN.prototype._iaddn = function _iaddn (num) {
    this.words[0] += num;

    // Carry
    for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {
      this.words[i] -= 0x4000000;
      if (i === this.length - 1) {
        this.words[i + 1] = 1;
      } else {
        this.words[i + 1]++;
      }
    }
    this.length = Math.max(this.length, i + 1);

    return this;
  };

  // Subtract plain number `num` from `this`
  BN.prototype.isubn = function isubn (num) {
    assert(typeof num === 'number');
    assert(num < 0x4000000);
    if (num < 0) return this.iaddn(-num);

    if (this.negative !== 0) {
      this.negative = 0;
      this.iaddn(num);
      this.negative = 1;
      return this;
    }

    this.words[0] -= num;

    if (this.length === 1 && this.words[0] < 0) {
      this.words[0] = -this.words[0];
      this.negative = 1;
    } else {
      // Carry
      for (var i = 0; i < this.length && this.words[i] < 0; i++) {
        this.words[i] += 0x4000000;
        this.words[i + 1] -= 1;
      }
    }

    return this.strip();
  };

  BN.prototype.addn = function addn (num) {
    return this.clone().iaddn(num);
  };

  BN.prototype.subn = function subn (num) {
    return this.clone().isubn(num);
  };

  BN.prototype.iabs = function iabs () {
    this.negative = 0;

    return this;
  };

  BN.prototype.abs = function abs () {
    return this.clone().iabs();
  };

  BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {
    var len = num.length + shift;
    var i;

    this._expand(len);

    var w;
    var carry = 0;
    for (i = 0; i < num.length; i++) {
      w = (this.words[i + shift] | 0) + carry;
      var right = (num.words[i] | 0) * mul;
      w -= right & 0x3ffffff;
      carry = (w >> 26) - ((right / 0x4000000) | 0);
      this.words[i + shift] = w & 0x3ffffff;
    }
    for (; i < this.length - shift; i++) {
      w = (this.words[i + shift] | 0) + carry;
      carry = w >> 26;
      this.words[i + shift] = w & 0x3ffffff;
    }

    if (carry === 0) return this.strip();

    // Subtraction overflow
    assert(carry === -1);
    carry = 0;
    for (i = 0; i < this.length; i++) {
      w = -(this.words[i] | 0) + carry;
      carry = w >> 26;
      this.words[i] = w & 0x3ffffff;
    }
    this.negative = 1;

    return this.strip();
  };

  BN.prototype._wordDiv = function _wordDiv (num, mode) {
    var shift = this.length - num.length;

    var a = this.clone();
    var b = num;

    // Normalize
    var bhi = b.words[b.length - 1] | 0;
    var bhiBits = this._countBits(bhi);
    shift = 26 - bhiBits;
    if (shift !== 0) {
      b = b.ushln(shift);
      a.iushln(shift);
      bhi = b.words[b.length - 1] | 0;
    }

    // Initialize quotient
    var m = a.length - b.length;
    var q;

    if (mode !== 'mod') {
      q = new BN(null);
      q.length = m + 1;
      q.words = new Array(q.length);
      for (var i = 0; i < q.length; i++) {
        q.words[i] = 0;
      }
    }

    var diff = a.clone()._ishlnsubmul(b, 1, m);
    if (diff.negative === 0) {
      a = diff;
      if (q) {
        q.words[m] = 1;
      }
    }

    for (var j = m - 1; j >= 0; j--) {
      var qj = (a.words[b.length + j] | 0) * 0x4000000 +
        (a.words[b.length + j - 1] | 0);

      // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max
      // (0x7ffffff)
      qj = Math.min((qj / bhi) | 0, 0x3ffffff);

      a._ishlnsubmul(b, qj, j);
      while (a.negative !== 0) {
        qj--;
        a.negative = 0;
        a._ishlnsubmul(b, 1, j);
        if (!a.isZero()) {
          a.negative ^= 1;
        }
      }
      if (q) {
        q.words[j] = qj;
      }
    }
    if (q) {
      q.strip();
    }
    a.strip();

    // Denormalize
    if (mode !== 'div' && shift !== 0) {
      a.iushrn(shift);
    }

    return {
      div: q || null,
      mod: a
    };
  };

  // NOTE: 1) `mode` can be set to `mod` to request mod only,
  //       to `div` to request div only, or be absent to
  //       request both div & mod
  //       2) `positive` is true if unsigned mod is requested
  BN.prototype.divmod = function divmod (num, mode, positive) {
    assert(!num.isZero());

    if (this.isZero()) {
      return {
        div: new BN(0),
        mod: new BN(0)
      };
    }

    var div, mod, res;
    if (this.negative !== 0 && num.negative === 0) {
      res = this.neg().divmod(num, mode);

      if (mode !== 'mod') {
        div = res.div.neg();
      }

      if (mode !== 'div') {
        mod = res.mod.neg();
        if (positive && mod.negative !== 0) {
          mod.iadd(num);
        }
      }

      return {
        div: div,
        mod: mod
      };
    }

    if (this.negative === 0 && num.negative !== 0) {
      res = this.divmod(num.neg(), mode);

      if (mode !== 'mod') {
        div = res.div.neg();
      }

      return {
        div: div,
        mod: res.mod
      };
    }

    if ((this.negative & num.negative) !== 0) {
      res = this.neg().divmod(num.neg(), mode);

      if (mode !== 'div') {
        mod = res.mod.neg();
        if (positive && mod.negative !== 0) {
          mod.isub(num);
        }
      }

      return {
        div: res.div,
        mod: mod
      };
    }

    // Both numbers are positive at this point

    // Strip both numbers to approximate shift value
    if (num.length > this.length || this.cmp(num) < 0) {
      return {
        div: new BN(0),
        mod: this
      };
    }

    // Very short reduction
    if (num.length === 1) {
      if (mode === 'div') {
        return {
          div: this.divn(num.words[0]),
          mod: null
        };
      }

      if (mode === 'mod') {
        return {
          div: null,
          mod: new BN(this.modn(num.words[0]))
        };
      }

      return {
        div: this.divn(num.words[0]),
        mod: new BN(this.modn(num.words[0]))
      };
    }

    return this._wordDiv(num, mode);
  };

  // Find `this` / `num`
  BN.prototype.div = function div (num) {
    return this.divmod(num, 'div', false).div;
  };

  // Find `this` % `num`
  BN.prototype.mod = function mod (num) {
    return this.divmod(num, 'mod', false).mod;
  };

  BN.prototype.umod = function umod (num) {
    return this.divmod(num, 'mod', true).mod;
  };

  // Find Round(`this` / `num`)
  BN.prototype.divRound = function divRound (num) {
    var dm = this.divmod(num);

    // Fast case - exact division
    if (dm.mod.isZero()) return dm.div;

    var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;

    var half = num.ushrn(1);
    var r2 = num.andln(1);
    var cmp = mod.cmp(half);

    // Round down
    if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div;

    // Round up
    return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);
  };

  BN.prototype.modn = function modn (num) {
    assert(num <= 0x3ffffff);
    var p = (1 << 26) % num;

    var acc = 0;
    for (var i = this.length - 1; i >= 0; i--) {
      acc = (p * acc + (this.words[i] | 0)) % num;
    }

    return acc;
  };

  // In-place division by number
  BN.prototype.idivn = function idivn (num) {
    assert(num <= 0x3ffffff);

    var carry = 0;
    for (var i = this.length - 1; i >= 0; i--) {
      var w = (this.words[i] | 0) + carry * 0x4000000;
      this.words[i] = (w / num) | 0;
      carry = w % num;
    }

    return this.strip();
  };

  BN.prototype.divn = function divn (num) {
    return this.clone().idivn(num);
  };

  BN.prototype.egcd = function egcd (p) {
    assert(p.negative === 0);
    assert(!p.isZero());

    var x = this;
    var y = p.clone();

    if (x.negative !== 0) {
      x = x.umod(p);
    } else {
      x = x.clone();
    }

    // A * x + B * y = x
    var A = new BN(1);
    var B = new BN(0);

    // C * x + D * y = y
    var C = new BN(0);
    var D = new BN(1);

    var g = 0;

    while (x.isEven() && y.isEven()) {
      x.iushrn(1);
      y.iushrn(1);
      ++g;
    }

    var yp = y.clone();
    var xp = x.clone();

    while (!x.isZero()) {
      for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);
      if (i > 0) {
        x.iushrn(i);
        while (i-- > 0) {
          if (A.isOdd() || B.isOdd()) {
            A.iadd(yp);
            B.isub(xp);
          }

          A.iushrn(1);
          B.iushrn(1);
        }
      }

      for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);
      if (j > 0) {
        y.iushrn(j);
        while (j-- > 0) {
          if (C.isOdd() || D.isOdd()) {
            C.iadd(yp);
            D.isub(xp);
          }

          C.iushrn(1);
          D.iushrn(1);
        }
      }

      if (x.cmp(y) >= 0) {
        x.isub(y);
        A.isub(C);
        B.isub(D);
      } else {
        y.isub(x);
        C.isub(A);
        D.isub(B);
      }
    }

    return {
      a: C,
      b: D,
      gcd: y.iushln(g)
    };
  };

  // This is reduced incarnation of the binary EEA
  // above, designated to invert members of the
  // _prime_ fields F(p) at a maximal speed
  BN.prototype._invmp = function _invmp (p) {
    assert(p.negative === 0);
    assert(!p.isZero());

    var a = this;
    var b = p.clone();

    if (a.negative !== 0) {
      a = a.umod(p);
    } else {
      a = a.clone();
    }

    var x1 = new BN(1);
    var x2 = new BN(0);

    var delta = b.clone();

    while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {
      for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);
      if (i > 0) {
        a.iushrn(i);
        while (i-- > 0) {
          if (x1.isOdd()) {
            x1.iadd(delta);
          }

          x1.iushrn(1);
        }
      }

      for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);
      if (j > 0) {
        b.iushrn(j);
        while (j-- > 0) {
          if (x2.isOdd()) {
            x2.iadd(delta);
          }

          x2.iushrn(1);
        }
      }

      if (a.cmp(b) >= 0) {
        a.isub(b);
        x1.isub(x2);
      } else {
        b.isub(a);
        x2.isub(x1);
      }
    }

    var res;
    if (a.cmpn(1) === 0) {
      res = x1;
    } else {
      res = x2;
    }

    if (res.cmpn(0) < 0) {
      res.iadd(p);
    }

    return res;
  };

  BN.prototype.gcd = function gcd (num) {
    if (this.isZero()) return num.abs();
    if (num.isZero()) return this.abs();

    var a = this.clone();
    var b = num.clone();
    a.negative = 0;
    b.negative = 0;

    // Remove common factor of two
    for (var shift = 0; a.isEven() && b.isEven(); shift++) {
      a.iushrn(1);
      b.iushrn(1);
    }

    do {
      while (a.isEven()) {
        a.iushrn(1);
      }
      while (b.isEven()) {
        b.iushrn(1);
      }

      var r = a.cmp(b);
      if (r < 0) {
        // Swap `a` and `b` to make `a` always bigger than `b`
        var t = a;
        a = b;
        b = t;
      } else if (r === 0 || b.cmpn(1) === 0) {
        break;
      }

      a.isub(b);
    } while (true);

    return b.iushln(shift);
  };

  // Invert number in the field F(num)
  BN.prototype.invm = function invm (num) {
    return this.egcd(num).a.umod(num);
  };

  BN.prototype.isEven = function isEven () {
    return (this.words[0] & 1) === 0;
  };

  BN.prototype.isOdd = function isOdd () {
    return (this.words[0] & 1) === 1;
  };

  // And first word and num
  BN.prototype.andln = function andln (num) {
    return this.words[0] & num;
  };

  // Increment at the bit position in-line
  BN.prototype.bincn = function bincn (bit) {
    assert(typeof bit === 'number');
    var r = bit % 26;
    var s = (bit - r) / 26;
    var q = 1 << r;

    // Fast case: bit is much higher than all existing words
    if (this.length <= s) {
      this._expand(s + 1);
      this.words[s] |= q;
      return this;
    }

    // Add bit and propagate, if needed
    var carry = q;
    for (var i = s; carry !== 0 && i < this.length; i++) {
      var w = this.words[i] | 0;
      w += carry;
      carry = w >>> 26;
      w &= 0x3ffffff;
      this.words[i] = w;
    }
    if (carry !== 0) {
      this.words[i] = carry;
      this.length++;
    }
    return this;
  };

  BN.prototype.isZero = function isZero () {
    return this.length === 1 && this.words[0] === 0;
  };

  BN.prototype.cmpn = function cmpn (num) {
    var negative = num < 0;

    if (this.negative !== 0 && !negative) return -1;
    if (this.negative === 0 && negative) return 1;

    this.strip();

    var res;
    if (this.length > 1) {
      res = 1;
    } else {
      if (negative) {
        num = -num;
      }

      assert(num <= 0x3ffffff, 'Number is too big');

      var w = this.words[0] | 0;
      res = w === num ? 0 : w < num ? -1 : 1;
    }
    if (this.negative !== 0) return -res | 0;
    return res;
  };

  // Compare two numbers and return:
  // 1 - if `this` > `num`
  // 0 - if `this` == `num`
  // -1 - if `this` < `num`
  BN.prototype.cmp = function cmp (num) {
    if (this.negative !== 0 && num.negative === 0) return -1;
    if (this.negative === 0 && num.negative !== 0) return 1;

    var res = this.ucmp(num);
    if (this.negative !== 0) return -res | 0;
    return res;
  };

  // Unsigned comparison
  BN.prototype.ucmp = function ucmp (num) {
    // At this point both numbers have the same sign
    if (this.length > num.length) return 1;
    if (this.length < num.length) return -1;

    var res = 0;
    for (var i = this.length - 1; i >= 0; i--) {
      var a = this.words[i] | 0;
      var b = num.words[i] | 0;

      if (a === b) continue;
      if (a < b) {
        res = -1;
      } else if (a > b) {
        res = 1;
      }
      break;
    }
    return res;
  };

  BN.prototype.gtn = function gtn (num) {
    return this.cmpn(num) === 1;
  };

  BN.prototype.gt = function gt (num) {
    return this.cmp(num) === 1;
  };

  BN.prototype.gten = function gten (num) {
    return this.cmpn(num) >= 0;
  };

  BN.prototype.gte = function gte (num) {
    return this.cmp(num) >= 0;
  };

  BN.prototype.ltn = function ltn (num) {
    return this.cmpn(num) === -1;
  };

  BN.prototype.lt = function lt (num) {
    return this.cmp(num) === -1;
  };

  BN.prototype.lten = function lten (num) {
    return this.cmpn(num) <= 0;
  };

  BN.prototype.lte = function lte (num) {
    return this.cmp(num) <= 0;
  };

  BN.prototype.eqn = function eqn (num) {
    return this.cmpn(num) === 0;
  };

  BN.prototype.eq = function eq (num) {
    return this.cmp(num) === 0;
  };

  //
  // A reduce context, could be using montgomery or something better, depending
  // on the `m` itself.
  //
  BN.red = function red (num) {
    return new Red(num);
  };

  BN.prototype.toRed = function toRed (ctx) {
    assert(!this.red, 'Already a number in reduction context');
    assert(this.negative === 0, 'red works only with positives');
    return ctx.convertTo(this)._forceRed(ctx);
  };

  BN.prototype.fromRed = function fromRed () {
    assert(this.red, 'fromRed works only with numbers in reduction context');
    return this.red.convertFrom(this);
  };

  BN.prototype._forceRed = function _forceRed (ctx) {
    this.red = ctx;
    return this;
  };

  BN.prototype.forceRed = function forceRed (ctx) {
    assert(!this.red, 'Already a number in reduction context');
    return this._forceRed(ctx);
  };

  BN.prototype.redAdd = function redAdd (num) {
    assert(this.red, 'redAdd works only with red numbers');
    return this.red.add(this, num);
  };

  BN.prototype.redIAdd = function redIAdd (num) {
    assert(this.red, 'redIAdd works only with red numbers');
    return this.red.iadd(this, num);
  };

  BN.prototype.redSub = function redSub (num) {
    assert(this.red, 'redSub works only with red numbers');
    return this.red.sub(this, num);
  };

  BN.prototype.redISub = function redISub (num) {
    assert(this.red, 'redISub works only with red numbers');
    return this.red.isub(this, num);
  };

  BN.prototype.redShl = function redShl (num) {
    assert(this.red, 'redShl works only with red numbers');
    return this.red.shl(this, num);
  };

  BN.prototype.redMul = function redMul (num) {
    assert(this.red, 'redMul works only with red numbers');
    this.red._verify2(this, num);
    return this.red.mul(this, num);
  };

  BN.prototype.redIMul = function redIMul (num) {
    assert(this.red, 'redMul works only with red numbers');
    this.red._verify2(this, num);
    return this.red.imul(this, num);
  };

  BN.prototype.redSqr = function redSqr () {
    assert(this.red, 'redSqr works only with red numbers');
    this.red._verify1(this);
    return this.red.sqr(this);
  };

  BN.prototype.redISqr = function redISqr () {
    assert(this.red, 'redISqr works only with red numbers');
    this.red._verify1(this);
    return this.red.isqr(this);
  };

  // Square root over p
  BN.prototype.redSqrt = function redSqrt () {
    assert(this.red, 'redSqrt works only with red numbers');
    this.red._verify1(this);
    return this.red.sqrt(this);
  };

  BN.prototype.redInvm = function redInvm () {
    assert(this.red, 'redInvm works only with red numbers');
    this.red._verify1(this);
    return this.red.invm(this);
  };

  // Return negative clone of `this` % `red modulo`
  BN.prototype.redNeg = function redNeg () {
    assert(this.red, 'redNeg works only with red numbers');
    this.red._verify1(this);
    return this.red.neg(this);
  };

  BN.prototype.redPow = function redPow (num) {
    assert(this.red && !num.red, 'redPow(normalNum)');
    this.red._verify1(this);
    return this.red.pow(this, num);
  };

  // Prime numbers with efficient reduction
  var primes = {
    k256: null,
    p224: null,
    p192: null,
    p25519: null
  };

  // Pseudo-Mersenne prime
  function MPrime (name, p) {
    // P = 2 ^ N - K
    this.name = name;
    this.p = new BN(p, 16);
    this.n = this.p.bitLength();
    this.k = new BN(1).iushln(this.n).isub(this.p);

    this.tmp = this._tmp();
  }

  MPrime.prototype._tmp = function _tmp () {
    var tmp = new BN(null);
    tmp.words = new Array(Math.ceil(this.n / 13));
    return tmp;
  };

  MPrime.prototype.ireduce = function ireduce (num) {
    // Assumes that `num` is less than `P^2`
    // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)
    var r = num;
    var rlen;

    do {
      this.split(r, this.tmp);
      r = this.imulK(r);
      r = r.iadd(this.tmp);
      rlen = r.bitLength();
    } while (rlen > this.n);

    var cmp = rlen < this.n ? -1 : r.ucmp(this.p);
    if (cmp === 0) {
      r.words[0] = 0;
      r.length = 1;
    } else if (cmp > 0) {
      r.isub(this.p);
    } else {
      r.strip();
    }

    return r;
  };

  MPrime.prototype.split = function split (input, out) {
    input.iushrn(this.n, 0, out);
  };

  MPrime.prototype.imulK = function imulK (num) {
    return num.imul(this.k);
  };

  function K256 () {
    MPrime.call(
      this,
      'k256',
      'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');
  }
  inherits(K256, MPrime);

  K256.prototype.split = function split (input, output) {
    // 256 = 9 * 26 + 22
    var mask = 0x3fffff;

    var outLen = Math.min(input.length, 9);
    for (var i = 0; i < outLen; i++) {
      output.words[i] = input.words[i];
    }
    output.length = outLen;

    if (input.length <= 9) {
      input.words[0] = 0;
      input.length = 1;
      return;
    }

    // Shift by 9 limbs
    var prev = input.words[9];
    output.words[output.length++] = prev & mask;

    for (i = 10; i < input.length; i++) {
      var next = input.words[i] | 0;
      input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);
      prev = next;
    }
    prev >>>= 22;
    input.words[i - 10] = prev;
    if (prev === 0 && input.length > 10) {
      input.length -= 10;
    } else {
      input.length -= 9;
    }
  };

  K256.prototype.imulK = function imulK (num) {
    // K = 0x1000003d1 = [ 0x40, 0x3d1 ]
    num.words[num.length] = 0;
    num.words[num.length + 1] = 0;
    num.length += 2;

    // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390
    var lo = 0;
    for (var i = 0; i < num.length; i++) {
      var w = num.words[i] | 0;
      lo += w * 0x3d1;
      num.words[i] = lo & 0x3ffffff;
      lo = w * 0x40 + ((lo / 0x4000000) | 0);
    }

    // Fast length reduction
    if (num.words[num.length - 1] === 0) {
      num.length--;
      if (num.words[num.length - 1] === 0) {
        num.length--;
      }
    }
    return num;
  };

  function P224 () {
    MPrime.call(
      this,
      'p224',
      'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');
  }
  inherits(P224, MPrime);

  function P192 () {
    MPrime.call(
      this,
      'p192',
      'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');
  }
  inherits(P192, MPrime);

  function P25519 () {
    // 2 ^ 255 - 19
    MPrime.call(
      this,
      '25519',
      '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');
  }
  inherits(P25519, MPrime);

  P25519.prototype.imulK = function imulK (num) {
    // K = 0x13
    var carry = 0;
    for (var i = 0; i < num.length; i++) {
      var hi = (num.words[i] | 0) * 0x13 + carry;
      var lo = hi & 0x3ffffff;
      hi >>>= 26;

      num.words[i] = lo;
      carry = hi;
    }
    if (carry !== 0) {
      num.words[num.length++] = carry;
    }
    return num;
  };

  // Exported mostly for testing purposes, use plain name instead
  BN._prime = function prime (name) {
    // Cached version of prime
    if (primes[name]) return primes[name];

    var prime;
    if (name === 'k256') {
      prime = new K256();
    } else if (name === 'p224') {
      prime = new P224();
    } else if (name === 'p192') {
      prime = new P192();
    } else if (name === 'p25519') {
      prime = new P25519();
    } else {
      throw new Error('Unknown prime ' + name);
    }
    primes[name] = prime;

    return prime;
  };

  //
  // Base reduction engine
  //
  function Red (m) {
    if (typeof m === 'string') {
      var prime = BN._prime(m);
      this.m = prime.p;
      this.prime = prime;
    } else {
      assert(m.gtn(1), 'modulus must be greater than 1');
      this.m = m;
      this.prime = null;
    }
  }

  Red.prototype._verify1 = function _verify1 (a) {
    assert(a.negative === 0, 'red works only with positives');
    assert(a.red, 'red works only with red numbers');
  };

  Red.prototype._verify2 = function _verify2 (a, b) {
    assert((a.negative | b.negative) === 0, 'red works only with positives');
    assert(a.red && a.red === b.red,
      'red works only with red numbers');
  };

  Red.prototype.imod = function imod (a) {
    if (this.prime) return this.prime.ireduce(a)._forceRed(this);
    return a.umod(this.m)._forceRed(this);
  };

  Red.prototype.neg = function neg (a) {
    if (a.isZero()) {
      return a.clone();
    }

    return this.m.sub(a)._forceRed(this);
  };

  Red.prototype.add = function add (a, b) {
    this._verify2(a, b);

    var res = a.add(b);
    if (res.cmp(this.m) >= 0) {
      res.isub(this.m);
    }
    return res._forceRed(this);
  };

  Red.prototype.iadd = function iadd (a, b) {
    this._verify2(a, b);

    var res = a.iadd(b);
    if (res.cmp(this.m) >= 0) {
      res.isub(this.m);
    }
    return res;
  };

  Red.prototype.sub = function sub (a, b) {
    this._verify2(a, b);

    var res = a.sub(b);
    if (res.cmpn(0) < 0) {
      res.iadd(this.m);
    }
    return res._forceRed(this);
  };

  Red.prototype.isub = function isub (a, b) {
    this._verify2(a, b);

    var res = a.isub(b);
    if (res.cmpn(0) < 0) {
      res.iadd(this.m);
    }
    return res;
  };

  Red.prototype.shl = function shl (a, num) {
    this._verify1(a);
    return this.imod(a.ushln(num));
  };

  Red.prototype.imul = function imul (a, b) {
    this._verify2(a, b);
    return this.imod(a.imul(b));
  };

  Red.prototype.mul = function mul (a, b) {
    this._verify2(a, b);
    return this.imod(a.mul(b));
  };

  Red.prototype.isqr = function isqr (a) {
    return this.imul(a, a.clone());
  };

  Red.prototype.sqr = function sqr (a) {
    return this.mul(a, a);
  };

  Red.prototype.sqrt = function sqrt (a) {
    if (a.isZero()) return a.clone();

    var mod3 = this.m.andln(3);
    assert(mod3 % 2 === 1);

    // Fast case
    if (mod3 === 3) {
      var pow = this.m.add(new BN(1)).iushrn(2);
      return this.pow(a, pow);
    }

    // Tonelli-Shanks algorithm (Totally unoptimized and slow)
    //
    // Find Q and S, that Q * 2 ^ S = (P - 1)
    var q = this.m.subn(1);
    var s = 0;
    while (!q.isZero() && q.andln(1) === 0) {
      s++;
      q.iushrn(1);
    }
    assert(!q.isZero());

    var one = new BN(1).toRed(this);
    var nOne = one.redNeg();

    // Find quadratic non-residue
    // NOTE: Max is such because of generalized Riemann hypothesis.
    var lpow = this.m.subn(1).iushrn(1);
    var z = this.m.bitLength();
    z = new BN(2 * z * z).toRed(this);

    while (this.pow(z, lpow).cmp(nOne) !== 0) {
      z.redIAdd(nOne);
    }

    var c = this.pow(z, q);
    var r = this.pow(a, q.addn(1).iushrn(1));
    var t = this.pow(a, q);
    var m = s;
    while (t.cmp(one) !== 0) {
      var tmp = t;
      for (var i = 0; tmp.cmp(one) !== 0; i++) {
        tmp = tmp.redSqr();
      }
      assert(i < m);
      var b = this.pow(c, new BN(1).iushln(m - i - 1));

      r = r.redMul(b);
      c = b.redSqr();
      t = t.redMul(c);
      m = i;
    }

    return r;
  };

  Red.prototype.invm = function invm (a) {
    var inv = a._invmp(this.m);
    if (inv.negative !== 0) {
      inv.negative = 0;
      return this.imod(inv).redNeg();
    } else {
      return this.imod(inv);
    }
  };

  Red.prototype.pow = function pow (a, num) {
    if (num.isZero()) return new BN(1).toRed(this);
    if (num.cmpn(1) === 0) return a.clone();

    var windowSize = 4;
    var wnd = new Array(1 << windowSize);
    wnd[0] = new BN(1).toRed(this);
    wnd[1] = a;
    for (var i = 2; i < wnd.length; i++) {
      wnd[i] = this.mul(wnd[i - 1], a);
    }

    var res = wnd[0];
    var current = 0;
    var currentLen = 0;
    var start = num.bitLength() % 26;
    if (start === 0) {
      start = 26;
    }

    for (i = num.length - 1; i >= 0; i--) {
      var word = num.words[i];
      for (var j = start - 1; j >= 0; j--) {
        var bit = (word >> j) & 1;
        if (res !== wnd[0]) {
          res = this.sqr(res);
        }

        if (bit === 0 && current === 0) {
          currentLen = 0;
          continue;
        }

        current <<= 1;
        current |= bit;
        currentLen++;
        if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;

        res = this.mul(res, wnd[current]);
        currentLen = 0;
        current = 0;
      }
      start = 26;
    }

    return res;
  };

  Red.prototype.convertTo = function convertTo (num) {
    var r = num.umod(this.m);

    return r === num ? r.clone() : r;
  };

  Red.prototype.convertFrom = function convertFrom (num) {
    var res = num.clone();
    res.red = null;
    return res;
  };

  //
  // Montgomery method engine
  //

  BN.mont = function mont (num) {
    return new Mont(num);
  };

  function Mont (m) {
    Red.call(this, m);

    this.shift = this.m.bitLength();
    if (this.shift % 26 !== 0) {
      this.shift += 26 - (this.shift % 26);
    }

    this.r = new BN(1).iushln(this.shift);
    this.r2 = this.imod(this.r.sqr());
    this.rinv = this.r._invmp(this.m);

    this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);
    this.minv = this.minv.umod(this.r);
    this.minv = this.r.sub(this.minv);
  }
  inherits(Mont, Red);

  Mont.prototype.convertTo = function convertTo (num) {
    return this.imod(num.ushln(this.shift));
  };

  Mont.prototype.convertFrom = function convertFrom (num) {
    var r = this.imod(num.mul(this.rinv));
    r.red = null;
    return r;
  };

  Mont.prototype.imul = function imul (a, b) {
    if (a.isZero() || b.isZero()) {
      a.words[0] = 0;
      a.length = 1;
      return a;
    }

    var t = a.imul(b);
    var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);
    var u = t.isub(c).iushrn(this.shift);
    var res = u;

    if (u.cmp(this.m) >= 0) {
      res = u.isub(this.m);
    } else if (u.cmpn(0) < 0) {
      res = u.iadd(this.m);
    }

    return res._forceRed(this);
  };

  Mont.prototype.mul = function mul (a, b) {
    if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);

    var t = a.mul(b);
    var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);
    var u = t.isub(c).iushrn(this.shift);
    var res = u;
    if (u.cmp(this.m) >= 0) {
      res = u.isub(this.m);
    } else if (u.cmpn(0) < 0) {
      res = u.iadd(this.m);
    }

    return res._forceRed(this);
  };

  Mont.prototype.invm = function invm (a) {
    // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R
    var res = this.imod(a._invmp(this.m).mul(this.r2));
    return res._forceRed(this);
  };
})(module, commonjsGlobal);
});

var assert$3 = ( assert$2 && assert$1 ) || assert$2;

var aionRlp = createCommonjsModule(function (module, exports) {
const Buffer = safeBuffer.Buffer;


const JAVA_LONG_MAX = new bn('9223372036854775807');
const MASK = new bn('4294967295');
const INT_MASK = MASK;

//* --- AION LONG --- */

function AionLong (n) {

  const _this = this;

  if (!(_this instanceof AionLong)) {
    // allow constructor call without new
    return new AionLong(n)
  }

  if (n === null || typeof n === 'undefined' || !('toArray' in n)) {
    throw new Error('unsupported input type')
  }

  if (new bn(n.toArray()).cmp(JAVA_LONG_MAX) > 0) {
    throw new Error('violated upper bound')
  }

  this.buf = n.toArray();
}

AionLong.prototype._aionLong = true;

AionLong.prototype.toArray = function() {
  return this.buf
};

AionLong.isAionLong = (a) => {
  if (a instanceof AionLong) {
    return true
  }

  return a !== null &&
  typeof a === 'object' &&
  a._aionLong === true
};

AionLong._aionEncodeLong = (bn$$1) => {
  const top = bn$$1.shrn(32).and(MASK);
  const bottom = bn$$1.and(MASK);
  const buf = Buffer.alloc(8);
  buf.writeUInt32BE(top.toNumber(), 0);
  buf.writeUInt32BE(bottom.toNumber(), 4);
  return buf
};

AionLong.aionEncodeLong = (aionLong) => {
  const bn$$1 = new bn(aionLong.buf);
  if (bn$$1.and(INT_MASK).cmp(bn$$1) === 0) {
    return Buffer.from(bn$$1.toArray())
  }
  // otherwise this must be a long
  return AionLong._aionEncodeLong(bn$$1)
};

exports.AionLong = AionLong;

/**
 * RLP Encoding based on: https://github.com/ethereum/wiki/wiki/%5BEnglish%5D-RLP
 * This function takes in a data, convert it to buffer if not, and a length for recursion
 *
 * @param {Buffer,String,Integer,Array} data - will be converted to buffer
 * @returns {Buffer} - returns buffer of encoded data
 **/
exports.encode = function (input) {
  if (input instanceof Array) {
    var output = [];
    for (var i = 0; i < input.length; i++) {
      output.push(exports.encode(input[i]));
    }
    var buf = Buffer.concat(output);
    return Buffer.concat([encodeLength(buf.length, 192), buf])
  } else {
    input = toBuffer(input);
    if (input.length === 1 && input[0] < 128) {
      return input
    } else {
      return Buffer.concat([encodeLength(input.length, 128), input])
    }
  }
};

function safeParseInt (v, base) {
  if (v.slice(0, 2) === '00') {
    throw (new Error('invalid RLP: extra zeros'))
  }

  return parseInt(v, base)
}

function encodeLength (len, offset) {
  if (len < 56) {
    return Buffer.from([len + offset])
  } else {
    var hexLength = intToHex(len);
    var lLength = hexLength.length / 2;
    var firstByte = intToHex(offset + 55 + lLength);
    return Buffer.from(firstByte + hexLength, 'hex')
  }
}

/**
 * RLP Decoding based on: {@link https://github.com/ethereum/wiki/wiki/%5BEnglish%5D-RLP|RLP}
 * @param {Buffer,String,Integer,Array} data - will be converted to buffer
 * @returns {Array} - returns decode Array of Buffers containg the original message
 **/
exports.decode = function (input, stream) {
  if (!input || input.length === 0) {
    return Buffer.from([])
  }

  input = toBuffer(input);
  var decoded = _decode(input);

  if (stream) {
    return decoded
  }

  assert$3.equal(decoded.remainder.length, 0, 'invalid remainder');
  return decoded.data
};

exports.getLength = function (input) {
  if (!input || input.length === 0) {
    return Buffer.from([])
  }

  input = toBuffer(input);
  var firstByte = input[0];
  if (firstByte <= 0x7f) {
    return input.length
  } else if (firstByte <= 0xb7) {
    return firstByte - 0x7f
  } else if (firstByte <= 0xbf) {
    return firstByte - 0xb6
  } else if (firstByte <= 0xf7) {
    // a list between  0-55 bytes long
    return firstByte - 0xbf
  } else {
    // a list  over 55 bytes long
    var llength = firstByte - 0xf6;
    var length = safeParseInt(input.slice(1, llength).toString('hex'), 16);
    return llength + length
  }
};

function _decode (input) {
  var length, llength, data, innerRemainder, d;
  var decoded = [];
  var firstByte = input[0];

  if (firstByte <= 0x7f) {
    // a single byte whose value is in the [0x00, 0x7f] range, that byte is its own RLP encoding.
    return {
      data: input.slice(0, 1),
      remainder: input.slice(1)
    }
  } else if (firstByte <= 0xb7) {
    // string is 0-55 bytes long. A single byte with value 0x80 plus the length of the string followed by the string
    // The range of the first byte is [0x80, 0xb7]
    length = firstByte - 0x7f;

    // set 0x80 null to 0
    if (firstByte === 0x80) {
      data = Buffer.from([]);
    } else {
      data = input.slice(1, length);
    }

    if (length === 2 && data[0] < 0x80) {
      throw new Error('invalid rlp encoding: byte must be less 0x80')
    }

    return {
      data: data,
      remainder: input.slice(length)
    }
  } else if (firstByte <= 0xbf) {
    llength = firstByte - 0xb6;
    length = safeParseInt(input.slice(1, llength).toString('hex'), 16);
    data = input.slice(llength, length + llength);
    if (data.length < length) {
      throw (new Error('invalid RLP'))
    }

    return {
      data: data,
      remainder: input.slice(length + llength)
    }
  } else if (firstByte <= 0xf7) {
    // a list between  0-55 bytes long
    length = firstByte - 0xbf;
    innerRemainder = input.slice(1, length);
    while (innerRemainder.length) {
      d = _decode(innerRemainder);
      decoded.push(d.data);
      innerRemainder = d.remainder;
    }

    return {
      data: decoded,
      remainder: input.slice(length)
    }
  } else {
    // a list  over 55 bytes long
    llength = firstByte - 0xf6;
    length = safeParseInt(input.slice(1, llength).toString('hex'), 16);
    var totalLength = llength + length;
    if (totalLength > input.length) {
      throw new Error('invalid rlp: total length is larger than the data')
    }

    innerRemainder = input.slice(llength, totalLength);
    if (innerRemainder.length === 0) {
      throw new Error('invalid rlp, List has a invalid length')
    }

    while (innerRemainder.length) {
      d = _decode(innerRemainder);
      decoded.push(d.data);
      innerRemainder = d.remainder;
    }
    return {
      data: decoded,
      remainder: input.slice(totalLength)
    }
  }
}

function isHexPrefixed (str) {
  return str.slice(0, 2) === '0x'
}

// Removes 0x from a given String
function stripHexPrefix (str) {
  if (typeof str !== 'string') {
    return str
  }
  return isHexPrefixed(str) ? str.slice(2) : str
}

function intToHex (i) {
  var hex = i.toString(16);
  if (hex.length % 2) {
    hex = '0' + hex;
  }

  return hex
}

function padToEven (a) {
  if (a.length % 2) a = '0' + a;
  return a
}

function intToBuffer (i) {
  var hex = intToHex(i);
  return Buffer.from(hex, 'hex')
}

function toBuffer (v) {
  if (!Buffer.isBuffer(v)) {
    if (typeof v === 'string') {
      if (isHexPrefixed(v)) {
        v = Buffer.from(padToEven(stripHexPrefix(v)), 'hex');
      } else {
        v = Buffer.from(v);
      }
    } else if (AionLong.isAionLong(v)) {
      v = AionLong.aionEncodeLong(v);
    } else if (typeof v === 'number') {
      if (!v) {
        v = Buffer.from([]);
      } else {
        v = intToBuffer(v);
      }
    } else if (v === null || v === undefined) {
      v = Buffer.from([]);
    } else if (v.toArray) {
      // converts a BN to a Buffer
      v = Buffer.from(v.toArray());
    } else {
      throw new Error('invalid type')
    }
  }
  return v
}
});
var aionRlp_1 = aionRlp.AionLong;
var aionRlp_2 = aionRlp.encode;
var aionRlp_3 = aionRlp.decode;
var aionRlp_4 = aionRlp.getLength;

var empty$1 = {};

var empty$2 = /*#__PURE__*/Object.freeze({
  default: empty$1
});

var require$$0 = ( empty$2 && empty$1 ) || empty$2;

var naclFast = createCommonjsModule(function (module) {
(function(nacl) {

// Ported in 2014 by Dmitry Chestnykh and Devi Mandiri.
// Public domain.
//
// Implementation derived from TweetNaCl version 20140427.
// See for details: http://tweetnacl.cr.yp.to/

var gf = function(init) {
  var i, r = new Float64Array(16);
  if (init) for (i = 0; i < init.length; i++) r[i] = init[i];
  return r;
};

//  Pluggable, initialized in high-level API below.
var randombytes = function(/* x, n */) { throw new Error('no PRNG'); };

var _0 = new Uint8Array(16);
var _9 = new Uint8Array(32); _9[0] = 9;

var gf0 = gf(),
    gf1 = gf([1]),
    _121665 = gf([0xdb41, 1]),
    D = gf([0x78a3, 0x1359, 0x4dca, 0x75eb, 0xd8ab, 0x4141, 0x0a4d, 0x0070, 0xe898, 0x7779, 0x4079, 0x8cc7, 0xfe73, 0x2b6f, 0x6cee, 0x5203]),
    D2 = gf([0xf159, 0x26b2, 0x9b94, 0xebd6, 0xb156, 0x8283, 0x149a, 0x00e0, 0xd130, 0xeef3, 0x80f2, 0x198e, 0xfce7, 0x56df, 0xd9dc, 0x2406]),
    X = gf([0xd51a, 0x8f25, 0x2d60, 0xc956, 0xa7b2, 0x9525, 0xc760, 0x692c, 0xdc5c, 0xfdd6, 0xe231, 0xc0a4, 0x53fe, 0xcd6e, 0x36d3, 0x2169]),
    Y = gf([0x6658, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666]),
    I = gf([0xa0b0, 0x4a0e, 0x1b27, 0xc4ee, 0xe478, 0xad2f, 0x1806, 0x2f43, 0xd7a7, 0x3dfb, 0x0099, 0x2b4d, 0xdf0b, 0x4fc1, 0x2480, 0x2b83]);

function ts64(x, i, h, l) {
  x[i]   = (h >> 24) & 0xff;
  x[i+1] = (h >> 16) & 0xff;
  x[i+2] = (h >>  8) & 0xff;
  x[i+3] = h & 0xff;
  x[i+4] = (l >> 24)  & 0xff;
  x[i+5] = (l >> 16)  & 0xff;
  x[i+6] = (l >>  8)  & 0xff;
  x[i+7] = l & 0xff;
}

function vn(x, xi, y, yi, n) {
  var i,d = 0;
  for (i = 0; i < n; i++) d |= x[xi+i]^y[yi+i];
  return (1 & ((d - 1) >>> 8)) - 1;
}

function crypto_verify_16(x, xi, y, yi) {
  return vn(x,xi,y,yi,16);
}

function crypto_verify_32(x, xi, y, yi) {
  return vn(x,xi,y,yi,32);
}

function core_salsa20(o, p, k, c) {
  var j0  = c[ 0] & 0xff | (c[ 1] & 0xff)<<8 | (c[ 2] & 0xff)<<16 | (c[ 3] & 0xff)<<24,
      j1  = k[ 0] & 0xff | (k[ 1] & 0xff)<<8 | (k[ 2] & 0xff)<<16 | (k[ 3] & 0xff)<<24,
      j2  = k[ 4] & 0xff | (k[ 5] & 0xff)<<8 | (k[ 6] & 0xff)<<16 | (k[ 7] & 0xff)<<24,
      j3  = k[ 8] & 0xff | (k[ 9] & 0xff)<<8 | (k[10] & 0xff)<<16 | (k[11] & 0xff)<<24,
      j4  = k[12] & 0xff | (k[13] & 0xff)<<8 | (k[14] & 0xff)<<16 | (k[15] & 0xff)<<24,
      j5  = c[ 4] & 0xff | (c[ 5] & 0xff)<<8 | (c[ 6] & 0xff)<<16 | (c[ 7] & 0xff)<<24,
      j6  = p[ 0] & 0xff | (p[ 1] & 0xff)<<8 | (p[ 2] & 0xff)<<16 | (p[ 3] & 0xff)<<24,
      j7  = p[ 4] & 0xff | (p[ 5] & 0xff)<<8 | (p[ 6] & 0xff)<<16 | (p[ 7] & 0xff)<<24,
      j8  = p[ 8] & 0xff | (p[ 9] & 0xff)<<8 | (p[10] & 0xff)<<16 | (p[11] & 0xff)<<24,
      j9  = p[12] & 0xff | (p[13] & 0xff)<<8 | (p[14] & 0xff)<<16 | (p[15] & 0xff)<<24,
      j10 = c[ 8] & 0xff | (c[ 9] & 0xff)<<8 | (c[10] & 0xff)<<16 | (c[11] & 0xff)<<24,
      j11 = k[16] & 0xff | (k[17] & 0xff)<<8 | (k[18] & 0xff)<<16 | (k[19] & 0xff)<<24,
      j12 = k[20] & 0xff | (k[21] & 0xff)<<8 | (k[22] & 0xff)<<16 | (k[23] & 0xff)<<24,
      j13 = k[24] & 0xff | (k[25] & 0xff)<<8 | (k[26] & 0xff)<<16 | (k[27] & 0xff)<<24,
      j14 = k[28] & 0xff | (k[29] & 0xff)<<8 | (k[30] & 0xff)<<16 | (k[31] & 0xff)<<24,
      j15 = c[12] & 0xff | (c[13] & 0xff)<<8 | (c[14] & 0xff)<<16 | (c[15] & 0xff)<<24;

  var x0 = j0, x1 = j1, x2 = j2, x3 = j3, x4 = j4, x5 = j5, x6 = j6, x7 = j7,
      x8 = j8, x9 = j9, x10 = j10, x11 = j11, x12 = j12, x13 = j13, x14 = j14,
      x15 = j15, u;

  for (var i = 0; i < 20; i += 2) {
    u = x0 + x12 | 0;
    x4 ^= u<<7 | u>>>(32-7);
    u = x4 + x0 | 0;
    x8 ^= u<<9 | u>>>(32-9);
    u = x8 + x4 | 0;
    x12 ^= u<<13 | u>>>(32-13);
    u = x12 + x8 | 0;
    x0 ^= u<<18 | u>>>(32-18);

    u = x5 + x1 | 0;
    x9 ^= u<<7 | u>>>(32-7);
    u = x9 + x5 | 0;
    x13 ^= u<<9 | u>>>(32-9);
    u = x13 + x9 | 0;
    x1 ^= u<<13 | u>>>(32-13);
    u = x1 + x13 | 0;
    x5 ^= u<<18 | u>>>(32-18);

    u = x10 + x6 | 0;
    x14 ^= u<<7 | u>>>(32-7);
    u = x14 + x10 | 0;
    x2 ^= u<<9 | u>>>(32-9);
    u = x2 + x14 | 0;
    x6 ^= u<<13 | u>>>(32-13);
    u = x6 + x2 | 0;
    x10 ^= u<<18 | u>>>(32-18);

    u = x15 + x11 | 0;
    x3 ^= u<<7 | u>>>(32-7);
    u = x3 + x15 | 0;
    x7 ^= u<<9 | u>>>(32-9);
    u = x7 + x3 | 0;
    x11 ^= u<<13 | u>>>(32-13);
    u = x11 + x7 | 0;
    x15 ^= u<<18 | u>>>(32-18);

    u = x0 + x3 | 0;
    x1 ^= u<<7 | u>>>(32-7);
    u = x1 + x0 | 0;
    x2 ^= u<<9 | u>>>(32-9);
    u = x2 + x1 | 0;
    x3 ^= u<<13 | u>>>(32-13);
    u = x3 + x2 | 0;
    x0 ^= u<<18 | u>>>(32-18);

    u = x5 + x4 | 0;
    x6 ^= u<<7 | u>>>(32-7);
    u = x6 + x5 | 0;
    x7 ^= u<<9 | u>>>(32-9);
    u = x7 + x6 | 0;
    x4 ^= u<<13 | u>>>(32-13);
    u = x4 + x7 | 0;
    x5 ^= u<<18 | u>>>(32-18);

    u = x10 + x9 | 0;
    x11 ^= u<<7 | u>>>(32-7);
    u = x11 + x10 | 0;
    x8 ^= u<<9 | u>>>(32-9);
    u = x8 + x11 | 0;
    x9 ^= u<<13 | u>>>(32-13);
    u = x9 + x8 | 0;
    x10 ^= u<<18 | u>>>(32-18);

    u = x15 + x14 | 0;
    x12 ^= u<<7 | u>>>(32-7);
    u = x12 + x15 | 0;
    x13 ^= u<<9 | u>>>(32-9);
    u = x13 + x12 | 0;
    x14 ^= u<<13 | u>>>(32-13);
    u = x14 + x13 | 0;
    x15 ^= u<<18 | u>>>(32-18);
  }
   x0 =  x0 +  j0 | 0;
   x1 =  x1 +  j1 | 0;
   x2 =  x2 +  j2 | 0;
   x3 =  x3 +  j3 | 0;
   x4 =  x4 +  j4 | 0;
   x5 =  x5 +  j5 | 0;
   x6 =  x6 +  j6 | 0;
   x7 =  x7 +  j7 | 0;
   x8 =  x8 +  j8 | 0;
   x9 =  x9 +  j9 | 0;
  x10 = x10 + j10 | 0;
  x11 = x11 + j11 | 0;
  x12 = x12 + j12 | 0;
  x13 = x13 + j13 | 0;
  x14 = x14 + j14 | 0;
  x15 = x15 + j15 | 0;

  o[ 0] = x0 >>>  0 & 0xff;
  o[ 1] = x0 >>>  8 & 0xff;
  o[ 2] = x0 >>> 16 & 0xff;
  o[ 3] = x0 >>> 24 & 0xff;

  o[ 4] = x1 >>>  0 & 0xff;
  o[ 5] = x1 >>>  8 & 0xff;
  o[ 6] = x1 >>> 16 & 0xff;
  o[ 7] = x1 >>> 24 & 0xff;

  o[ 8] = x2 >>>  0 & 0xff;
  o[ 9] = x2 >>>  8 & 0xff;
  o[10] = x2 >>> 16 & 0xff;
  o[11] = x2 >>> 24 & 0xff;

  o[12] = x3 >>>  0 & 0xff;
  o[13] = x3 >>>  8 & 0xff;
  o[14] = x3 >>> 16 & 0xff;
  o[15] = x3 >>> 24 & 0xff;

  o[16] = x4 >>>  0 & 0xff;
  o[17] = x4 >>>  8 & 0xff;
  o[18] = x4 >>> 16 & 0xff;
  o[19] = x4 >>> 24 & 0xff;

  o[20] = x5 >>>  0 & 0xff;
  o[21] = x5 >>>  8 & 0xff;
  o[22] = x5 >>> 16 & 0xff;
  o[23] = x5 >>> 24 & 0xff;

  o[24] = x6 >>>  0 & 0xff;
  o[25] = x6 >>>  8 & 0xff;
  o[26] = x6 >>> 16 & 0xff;
  o[27] = x6 >>> 24 & 0xff;

  o[28] = x7 >>>  0 & 0xff;
  o[29] = x7 >>>  8 & 0xff;
  o[30] = x7 >>> 16 & 0xff;
  o[31] = x7 >>> 24 & 0xff;

  o[32] = x8 >>>  0 & 0xff;
  o[33] = x8 >>>  8 & 0xff;
  o[34] = x8 >>> 16 & 0xff;
  o[35] = x8 >>> 24 & 0xff;

  o[36] = x9 >>>  0 & 0xff;
  o[37] = x9 >>>  8 & 0xff;
  o[38] = x9 >>> 16 & 0xff;
  o[39] = x9 >>> 24 & 0xff;

  o[40] = x10 >>>  0 & 0xff;
  o[41] = x10 >>>  8 & 0xff;
  o[42] = x10 >>> 16 & 0xff;
  o[43] = x10 >>> 24 & 0xff;

  o[44] = x11 >>>  0 & 0xff;
  o[45] = x11 >>>  8 & 0xff;
  o[46] = x11 >>> 16 & 0xff;
  o[47] = x11 >>> 24 & 0xff;

  o[48] = x12 >>>  0 & 0xff;
  o[49] = x12 >>>  8 & 0xff;
  o[50] = x12 >>> 16 & 0xff;
  o[51] = x12 >>> 24 & 0xff;

  o[52] = x13 >>>  0 & 0xff;
  o[53] = x13 >>>  8 & 0xff;
  o[54] = x13 >>> 16 & 0xff;
  o[55] = x13 >>> 24 & 0xff;

  o[56] = x14 >>>  0 & 0xff;
  o[57] = x14 >>>  8 & 0xff;
  o[58] = x14 >>> 16 & 0xff;
  o[59] = x14 >>> 24 & 0xff;

  o[60] = x15 >>>  0 & 0xff;
  o[61] = x15 >>>  8 & 0xff;
  o[62] = x15 >>> 16 & 0xff;
  o[63] = x15 >>> 24 & 0xff;
}

function core_hsalsa20(o,p,k,c) {
  var j0  = c[ 0] & 0xff | (c[ 1] & 0xff)<<8 | (c[ 2] & 0xff)<<16 | (c[ 3] & 0xff)<<24,
      j1  = k[ 0] & 0xff | (k[ 1] & 0xff)<<8 | (k[ 2] & 0xff)<<16 | (k[ 3] & 0xff)<<24,
      j2  = k[ 4] & 0xff | (k[ 5] & 0xff)<<8 | (k[ 6] & 0xff)<<16 | (k[ 7] & 0xff)<<24,
      j3  = k[ 8] & 0xff | (k[ 9] & 0xff)<<8 | (k[10] & 0xff)<<16 | (k[11] & 0xff)<<24,
      j4  = k[12] & 0xff | (k[13] & 0xff)<<8 | (k[14] & 0xff)<<16 | (k[15] & 0xff)<<24,
      j5  = c[ 4] & 0xff | (c[ 5] & 0xff)<<8 | (c[ 6] & 0xff)<<16 | (c[ 7] & 0xff)<<24,
      j6  = p[ 0] & 0xff | (p[ 1] & 0xff)<<8 | (p[ 2] & 0xff)<<16 | (p[ 3] & 0xff)<<24,
      j7  = p[ 4] & 0xff | (p[ 5] & 0xff)<<8 | (p[ 6] & 0xff)<<16 | (p[ 7] & 0xff)<<24,
      j8  = p[ 8] & 0xff | (p[ 9] & 0xff)<<8 | (p[10] & 0xff)<<16 | (p[11] & 0xff)<<24,
      j9  = p[12] & 0xff | (p[13] & 0xff)<<8 | (p[14] & 0xff)<<16 | (p[15] & 0xff)<<24,
      j10 = c[ 8] & 0xff | (c[ 9] & 0xff)<<8 | (c[10] & 0xff)<<16 | (c[11] & 0xff)<<24,
      j11 = k[16] & 0xff | (k[17] & 0xff)<<8 | (k[18] & 0xff)<<16 | (k[19] & 0xff)<<24,
      j12 = k[20] & 0xff | (k[21] & 0xff)<<8 | (k[22] & 0xff)<<16 | (k[23] & 0xff)<<24,
      j13 = k[24] & 0xff | (k[25] & 0xff)<<8 | (k[26] & 0xff)<<16 | (k[27] & 0xff)<<24,
      j14 = k[28] & 0xff | (k[29] & 0xff)<<8 | (k[30] & 0xff)<<16 | (k[31] & 0xff)<<24,
      j15 = c[12] & 0xff | (c[13] & 0xff)<<8 | (c[14] & 0xff)<<16 | (c[15] & 0xff)<<24;

  var x0 = j0, x1 = j1, x2 = j2, x3 = j3, x4 = j4, x5 = j5, x6 = j6, x7 = j7,
      x8 = j8, x9 = j9, x10 = j10, x11 = j11, x12 = j12, x13 = j13, x14 = j14,
      x15 = j15, u;

  for (var i = 0; i < 20; i += 2) {
    u = x0 + x12 | 0;
    x4 ^= u<<7 | u>>>(32-7);
    u = x4 + x0 | 0;
    x8 ^= u<<9 | u>>>(32-9);
    u = x8 + x4 | 0;
    x12 ^= u<<13 | u>>>(32-13);
    u = x12 + x8 | 0;
    x0 ^= u<<18 | u>>>(32-18);

    u = x5 + x1 | 0;
    x9 ^= u<<7 | u>>>(32-7);
    u = x9 + x5 | 0;
    x13 ^= u<<9 | u>>>(32-9);
    u = x13 + x9 | 0;
    x1 ^= u<<13 | u>>>(32-13);
    u = x1 + x13 | 0;
    x5 ^= u<<18 | u>>>(32-18);

    u = x10 + x6 | 0;
    x14 ^= u<<7 | u>>>(32-7);
    u = x14 + x10 | 0;
    x2 ^= u<<9 | u>>>(32-9);
    u = x2 + x14 | 0;
    x6 ^= u<<13 | u>>>(32-13);
    u = x6 + x2 | 0;
    x10 ^= u<<18 | u>>>(32-18);

    u = x15 + x11 | 0;
    x3 ^= u<<7 | u>>>(32-7);
    u = x3 + x15 | 0;
    x7 ^= u<<9 | u>>>(32-9);
    u = x7 + x3 | 0;
    x11 ^= u<<13 | u>>>(32-13);
    u = x11 + x7 | 0;
    x15 ^= u<<18 | u>>>(32-18);

    u = x0 + x3 | 0;
    x1 ^= u<<7 | u>>>(32-7);
    u = x1 + x0 | 0;
    x2 ^= u<<9 | u>>>(32-9);
    u = x2 + x1 | 0;
    x3 ^= u<<13 | u>>>(32-13);
    u = x3 + x2 | 0;
    x0 ^= u<<18 | u>>>(32-18);

    u = x5 + x4 | 0;
    x6 ^= u<<7 | u>>>(32-7);
    u = x6 + x5 | 0;
    x7 ^= u<<9 | u>>>(32-9);
    u = x7 + x6 | 0;
    x4 ^= u<<13 | u>>>(32-13);
    u = x4 + x7 | 0;
    x5 ^= u<<18 | u>>>(32-18);

    u = x10 + x9 | 0;
    x11 ^= u<<7 | u>>>(32-7);
    u = x11 + x10 | 0;
    x8 ^= u<<9 | u>>>(32-9);
    u = x8 + x11 | 0;
    x9 ^= u<<13 | u>>>(32-13);
    u = x9 + x8 | 0;
    x10 ^= u<<18 | u>>>(32-18);

    u = x15 + x14 | 0;
    x12 ^= u<<7 | u>>>(32-7);
    u = x12 + x15 | 0;
    x13 ^= u<<9 | u>>>(32-9);
    u = x13 + x12 | 0;
    x14 ^= u<<13 | u>>>(32-13);
    u = x14 + x13 | 0;
    x15 ^= u<<18 | u>>>(32-18);
  }

  o[ 0] = x0 >>>  0 & 0xff;
  o[ 1] = x0 >>>  8 & 0xff;
  o[ 2] = x0 >>> 16 & 0xff;
  o[ 3] = x0 >>> 24 & 0xff;

  o[ 4] = x5 >>>  0 & 0xff;
  o[ 5] = x5 >>>  8 & 0xff;
  o[ 6] = x5 >>> 16 & 0xff;
  o[ 7] = x5 >>> 24 & 0xff;

  o[ 8] = x10 >>>  0 & 0xff;
  o[ 9] = x10 >>>  8 & 0xff;
  o[10] = x10 >>> 16 & 0xff;
  o[11] = x10 >>> 24 & 0xff;

  o[12] = x15 >>>  0 & 0xff;
  o[13] = x15 >>>  8 & 0xff;
  o[14] = x15 >>> 16 & 0xff;
  o[15] = x15 >>> 24 & 0xff;

  o[16] = x6 >>>  0 & 0xff;
  o[17] = x6 >>>  8 & 0xff;
  o[18] = x6 >>> 16 & 0xff;
  o[19] = x6 >>> 24 & 0xff;

  o[20] = x7 >>>  0 & 0xff;
  o[21] = x7 >>>  8 & 0xff;
  o[22] = x7 >>> 16 & 0xff;
  o[23] = x7 >>> 24 & 0xff;

  o[24] = x8 >>>  0 & 0xff;
  o[25] = x8 >>>  8 & 0xff;
  o[26] = x8 >>> 16 & 0xff;
  o[27] = x8 >>> 24 & 0xff;

  o[28] = x9 >>>  0 & 0xff;
  o[29] = x9 >>>  8 & 0xff;
  o[30] = x9 >>> 16 & 0xff;
  o[31] = x9 >>> 24 & 0xff;
}

function crypto_core_salsa20(out,inp,k,c) {
  core_salsa20(out,inp,k,c);
}

function crypto_core_hsalsa20(out,inp,k,c) {
  core_hsalsa20(out,inp,k,c);
}

var sigma = new Uint8Array([101, 120, 112, 97, 110, 100, 32, 51, 50, 45, 98, 121, 116, 101, 32, 107]);
            // "expand 32-byte k"

function crypto_stream_salsa20_xor(c,cpos,m,mpos,b,n,k) {
  var z = new Uint8Array(16), x = new Uint8Array(64);
  var u, i;
  for (i = 0; i < 16; i++) z[i] = 0;
  for (i = 0; i < 8; i++) z[i] = n[i];
  while (b >= 64) {
    crypto_core_salsa20(x,z,k,sigma);
    for (i = 0; i < 64; i++) c[cpos+i] = m[mpos+i] ^ x[i];
    u = 1;
    for (i = 8; i < 16; i++) {
      u = u + (z[i] & 0xff) | 0;
      z[i] = u & 0xff;
      u >>>= 8;
    }
    b -= 64;
    cpos += 64;
    mpos += 64;
  }
  if (b > 0) {
    crypto_core_salsa20(x,z,k,sigma);
    for (i = 0; i < b; i++) c[cpos+i] = m[mpos+i] ^ x[i];
  }
  return 0;
}

function crypto_stream_salsa20(c,cpos,b,n,k) {
  var z = new Uint8Array(16), x = new Uint8Array(64);
  var u, i;
  for (i = 0; i < 16; i++) z[i] = 0;
  for (i = 0; i < 8; i++) z[i] = n[i];
  while (b >= 64) {
    crypto_core_salsa20(x,z,k,sigma);
    for (i = 0; i < 64; i++) c[cpos+i] = x[i];
    u = 1;
    for (i = 8; i < 16; i++) {
      u = u + (z[i] & 0xff) | 0;
      z[i] = u & 0xff;
      u >>>= 8;
    }
    b -= 64;
    cpos += 64;
  }
  if (b > 0) {
    crypto_core_salsa20(x,z,k,sigma);
    for (i = 0; i < b; i++) c[cpos+i] = x[i];
  }
  return 0;
}

function crypto_stream(c,cpos,d,n,k) {
  var s = new Uint8Array(32);
  crypto_core_hsalsa20(s,n,k,sigma);
  var sn = new Uint8Array(8);
  for (var i = 0; i < 8; i++) sn[i] = n[i+16];
  return crypto_stream_salsa20(c,cpos,d,sn,s);
}

function crypto_stream_xor(c,cpos,m,mpos,d,n,k) {
  var s = new Uint8Array(32);
  crypto_core_hsalsa20(s,n,k,sigma);
  var sn = new Uint8Array(8);
  for (var i = 0; i < 8; i++) sn[i] = n[i+16];
  return crypto_stream_salsa20_xor(c,cpos,m,mpos,d,sn,s);
}

/*
* Port of Andrew Moon's Poly1305-donna-16. Public domain.
* https://github.com/floodyberry/poly1305-donna
*/

var poly1305 = function(key) {
  this.buffer = new Uint8Array(16);
  this.r = new Uint16Array(10);
  this.h = new Uint16Array(10);
  this.pad = new Uint16Array(8);
  this.leftover = 0;
  this.fin = 0;

  var t0, t1, t2, t3, t4, t5, t6, t7;

  t0 = key[ 0] & 0xff | (key[ 1] & 0xff) << 8; this.r[0] = ( t0                     ) & 0x1fff;
  t1 = key[ 2] & 0xff | (key[ 3] & 0xff) << 8; this.r[1] = ((t0 >>> 13) | (t1 <<  3)) & 0x1fff;
  t2 = key[ 4] & 0xff | (key[ 5] & 0xff) << 8; this.r[2] = ((t1 >>> 10) | (t2 <<  6)) & 0x1f03;
  t3 = key[ 6] & 0xff | (key[ 7] & 0xff) << 8; this.r[3] = ((t2 >>>  7) | (t3 <<  9)) & 0x1fff;
  t4 = key[ 8] & 0xff | (key[ 9] & 0xff) << 8; this.r[4] = ((t3 >>>  4) | (t4 << 12)) & 0x00ff;
  this.r[5] = ((t4 >>>  1)) & 0x1ffe;
  t5 = key[10] & 0xff | (key[11] & 0xff) << 8; this.r[6] = ((t4 >>> 14) | (t5 <<  2)) & 0x1fff;
  t6 = key[12] & 0xff | (key[13] & 0xff) << 8; this.r[7] = ((t5 >>> 11) | (t6 <<  5)) & 0x1f81;
  t7 = key[14] & 0xff | (key[15] & 0xff) << 8; this.r[8] = ((t6 >>>  8) | (t7 <<  8)) & 0x1fff;
  this.r[9] = ((t7 >>>  5)) & 0x007f;

  this.pad[0] = key[16] & 0xff | (key[17] & 0xff) << 8;
  this.pad[1] = key[18] & 0xff | (key[19] & 0xff) << 8;
  this.pad[2] = key[20] & 0xff | (key[21] & 0xff) << 8;
  this.pad[3] = key[22] & 0xff | (key[23] & 0xff) << 8;
  this.pad[4] = key[24] & 0xff | (key[25] & 0xff) << 8;
  this.pad[5] = key[26] & 0xff | (key[27] & 0xff) << 8;
  this.pad[6] = key[28] & 0xff | (key[29] & 0xff) << 8;
  this.pad[7] = key[30] & 0xff | (key[31] & 0xff) << 8;
};

poly1305.prototype.blocks = function(m, mpos, bytes) {
  var hibit = this.fin ? 0 : (1 << 11);
  var t0, t1, t2, t3, t4, t5, t6, t7, c;
  var d0, d1, d2, d3, d4, d5, d6, d7, d8, d9;

  var h0 = this.h[0],
      h1 = this.h[1],
      h2 = this.h[2],
      h3 = this.h[3],
      h4 = this.h[4],
      h5 = this.h[5],
      h6 = this.h[6],
      h7 = this.h[7],
      h8 = this.h[8],
      h9 = this.h[9];

  var r0 = this.r[0],
      r1 = this.r[1],
      r2 = this.r[2],
      r3 = this.r[3],
      r4 = this.r[4],
      r5 = this.r[5],
      r6 = this.r[6],
      r7 = this.r[7],
      r8 = this.r[8],
      r9 = this.r[9];

  while (bytes >= 16) {
    t0 = m[mpos+ 0] & 0xff | (m[mpos+ 1] & 0xff) << 8; h0 += ( t0                     ) & 0x1fff;
    t1 = m[mpos+ 2] & 0xff | (m[mpos+ 3] & 0xff) << 8; h1 += ((t0 >>> 13) | (t1 <<  3)) & 0x1fff;
    t2 = m[mpos+ 4] & 0xff | (m[mpos+ 5] & 0xff) << 8; h2 += ((t1 >>> 10) | (t2 <<  6)) & 0x1fff;
    t3 = m[mpos+ 6] & 0xff | (m[mpos+ 7] & 0xff) << 8; h3 += ((t2 >>>  7) | (t3 <<  9)) & 0x1fff;
    t4 = m[mpos+ 8] & 0xff | (m[mpos+ 9] & 0xff) << 8; h4 += ((t3 >>>  4) | (t4 << 12)) & 0x1fff;
    h5 += ((t4 >>>  1)) & 0x1fff;
    t5 = m[mpos+10] & 0xff | (m[mpos+11] & 0xff) << 8; h6 += ((t4 >>> 14) | (t5 <<  2)) & 0x1fff;
    t6 = m[mpos+12] & 0xff | (m[mpos+13] & 0xff) << 8; h7 += ((t5 >>> 11) | (t6 <<  5)) & 0x1fff;
    t7 = m[mpos+14] & 0xff | (m[mpos+15] & 0xff) << 8; h8 += ((t6 >>>  8) | (t7 <<  8)) & 0x1fff;
    h9 += ((t7 >>> 5)) | hibit;

    c = 0;

    d0 = c;
    d0 += h0 * r0;
    d0 += h1 * (5 * r9);
    d0 += h2 * (5 * r8);
    d0 += h3 * (5 * r7);
    d0 += h4 * (5 * r6);
    c = (d0 >>> 13); d0 &= 0x1fff;
    d0 += h5 * (5 * r5);
    d0 += h6 * (5 * r4);
    d0 += h7 * (5 * r3);
    d0 += h8 * (5 * r2);
    d0 += h9 * (5 * r1);
    c += (d0 >>> 13); d0 &= 0x1fff;

    d1 = c;
    d1 += h0 * r1;
    d1 += h1 * r0;
    d1 += h2 * (5 * r9);
    d1 += h3 * (5 * r8);
    d1 += h4 * (5 * r7);
    c = (d1 >>> 13); d1 &= 0x1fff;
    d1 += h5 * (5 * r6);
    d1 += h6 * (5 * r5);
    d1 += h7 * (5 * r4);
    d1 += h8 * (5 * r3);
    d1 += h9 * (5 * r2);
    c += (d1 >>> 13); d1 &= 0x1fff;

    d2 = c;
    d2 += h0 * r2;
    d2 += h1 * r1;
    d2 += h2 * r0;
    d2 += h3 * (5 * r9);
    d2 += h4 * (5 * r8);
    c = (d2 >>> 13); d2 &= 0x1fff;
    d2 += h5 * (5 * r7);
    d2 += h6 * (5 * r6);
    d2 += h7 * (5 * r5);
    d2 += h8 * (5 * r4);
    d2 += h9 * (5 * r3);
    c += (d2 >>> 13); d2 &= 0x1fff;

    d3 = c;
    d3 += h0 * r3;
    d3 += h1 * r2;
    d3 += h2 * r1;
    d3 += h3 * r0;
    d3 += h4 * (5 * r9);
    c = (d3 >>> 13); d3 &= 0x1fff;
    d3 += h5 * (5 * r8);
    d3 += h6 * (5 * r7);
    d3 += h7 * (5 * r6);
    d3 += h8 * (5 * r5);
    d3 += h9 * (5 * r4);
    c += (d3 >>> 13); d3 &= 0x1fff;

    d4 = c;
    d4 += h0 * r4;
    d4 += h1 * r3;
    d4 += h2 * r2;
    d4 += h3 * r1;
    d4 += h4 * r0;
    c = (d4 >>> 13); d4 &= 0x1fff;
    d4 += h5 * (5 * r9);
    d4 += h6 * (5 * r8);
    d4 += h7 * (5 * r7);
    d4 += h8 * (5 * r6);
    d4 += h9 * (5 * r5);
    c += (d4 >>> 13); d4 &= 0x1fff;

    d5 = c;
    d5 += h0 * r5;
    d5 += h1 * r4;
    d5 += h2 * r3;
    d5 += h3 * r2;
    d5 += h4 * r1;
    c = (d5 >>> 13); d5 &= 0x1fff;
    d5 += h5 * r0;
    d5 += h6 * (5 * r9);
    d5 += h7 * (5 * r8);
    d5 += h8 * (5 * r7);
    d5 += h9 * (5 * r6);
    c += (d5 >>> 13); d5 &= 0x1fff;

    d6 = c;
    d6 += h0 * r6;
    d6 += h1 * r5;
    d6 += h2 * r4;
    d6 += h3 * r3;
    d6 += h4 * r2;
    c = (d6 >>> 13); d6 &= 0x1fff;
    d6 += h5 * r1;
    d6 += h6 * r0;
    d6 += h7 * (5 * r9);
    d6 += h8 * (5 * r8);
    d6 += h9 * (5 * r7);
    c += (d6 >>> 13); d6 &= 0x1fff;

    d7 = c;
    d7 += h0 * r7;
    d7 += h1 * r6;
    d7 += h2 * r5;
    d7 += h3 * r4;
    d7 += h4 * r3;
    c = (d7 >>> 13); d7 &= 0x1fff;
    d7 += h5 * r2;
    d7 += h6 * r1;
    d7 += h7 * r0;
    d7 += h8 * (5 * r9);
    d7 += h9 * (5 * r8);
    c += (d7 >>> 13); d7 &= 0x1fff;

    d8 = c;
    d8 += h0 * r8;
    d8 += h1 * r7;
    d8 += h2 * r6;
    d8 += h3 * r5;
    d8 += h4 * r4;
    c = (d8 >>> 13); d8 &= 0x1fff;
    d8 += h5 * r3;
    d8 += h6 * r2;
    d8 += h7 * r1;
    d8 += h8 * r0;
    d8 += h9 * (5 * r9);
    c += (d8 >>> 13); d8 &= 0x1fff;

    d9 = c;
    d9 += h0 * r9;
    d9 += h1 * r8;
    d9 += h2 * r7;
    d9 += h3 * r6;
    d9 += h4 * r5;
    c = (d9 >>> 13); d9 &= 0x1fff;
    d9 += h5 * r4;
    d9 += h6 * r3;
    d9 += h7 * r2;
    d9 += h8 * r1;
    d9 += h9 * r0;
    c += (d9 >>> 13); d9 &= 0x1fff;

    c = (((c << 2) + c)) | 0;
    c = (c + d0) | 0;
    d0 = c & 0x1fff;
    c = (c >>> 13);
    d1 += c;

    h0 = d0;
    h1 = d1;
    h2 = d2;
    h3 = d3;
    h4 = d4;
    h5 = d5;
    h6 = d6;
    h7 = d7;
    h8 = d8;
    h9 = d9;

    mpos += 16;
    bytes -= 16;
  }
  this.h[0] = h0;
  this.h[1] = h1;
  this.h[2] = h2;
  this.h[3] = h3;
  this.h[4] = h4;
  this.h[5] = h5;
  this.h[6] = h6;
  this.h[7] = h7;
  this.h[8] = h8;
  this.h[9] = h9;
};

poly1305.prototype.finish = function(mac, macpos) {
  var g = new Uint16Array(10);
  var c, mask, f, i;

  if (this.leftover) {
    i = this.leftover;
    this.buffer[i++] = 1;
    for (; i < 16; i++) this.buffer[i] = 0;
    this.fin = 1;
    this.blocks(this.buffer, 0, 16);
  }

  c = this.h[1] >>> 13;
  this.h[1] &= 0x1fff;
  for (i = 2; i < 10; i++) {
    this.h[i] += c;
    c = this.h[i] >>> 13;
    this.h[i] &= 0x1fff;
  }
  this.h[0] += (c * 5);
  c = this.h[0] >>> 13;
  this.h[0] &= 0x1fff;
  this.h[1] += c;
  c = this.h[1] >>> 13;
  this.h[1] &= 0x1fff;
  this.h[2] += c;

  g[0] = this.h[0] + 5;
  c = g[0] >>> 13;
  g[0] &= 0x1fff;
  for (i = 1; i < 10; i++) {
    g[i] = this.h[i] + c;
    c = g[i] >>> 13;
    g[i] &= 0x1fff;
  }
  g[9] -= (1 << 13);

  mask = (c ^ 1) - 1;
  for (i = 0; i < 10; i++) g[i] &= mask;
  mask = ~mask;
  for (i = 0; i < 10; i++) this.h[i] = (this.h[i] & mask) | g[i];

  this.h[0] = ((this.h[0]       ) | (this.h[1] << 13)                    ) & 0xffff;
  this.h[1] = ((this.h[1] >>>  3) | (this.h[2] << 10)                    ) & 0xffff;
  this.h[2] = ((this.h[2] >>>  6) | (this.h[3] <<  7)                    ) & 0xffff;
  this.h[3] = ((this.h[3] >>>  9) | (this.h[4] <<  4)                    ) & 0xffff;
  this.h[4] = ((this.h[4] >>> 12) | (this.h[5] <<  1) | (this.h[6] << 14)) & 0xffff;
  this.h[5] = ((this.h[6] >>>  2) | (this.h[7] << 11)                    ) & 0xffff;
  this.h[6] = ((this.h[7] >>>  5) | (this.h[8] <<  8)                    ) & 0xffff;
  this.h[7] = ((this.h[8] >>>  8) | (this.h[9] <<  5)                    ) & 0xffff;

  f = this.h[0] + this.pad[0];
  this.h[0] = f & 0xffff;
  for (i = 1; i < 8; i++) {
    f = (((this.h[i] + this.pad[i]) | 0) + (f >>> 16)) | 0;
    this.h[i] = f & 0xffff;
  }

  mac[macpos+ 0] = (this.h[0] >>> 0) & 0xff;
  mac[macpos+ 1] = (this.h[0] >>> 8) & 0xff;
  mac[macpos+ 2] = (this.h[1] >>> 0) & 0xff;
  mac[macpos+ 3] = (this.h[1] >>> 8) & 0xff;
  mac[macpos+ 4] = (this.h[2] >>> 0) & 0xff;
  mac[macpos+ 5] = (this.h[2] >>> 8) & 0xff;
  mac[macpos+ 6] = (this.h[3] >>> 0) & 0xff;
  mac[macpos+ 7] = (this.h[3] >>> 8) & 0xff;
  mac[macpos+ 8] = (this.h[4] >>> 0) & 0xff;
  mac[macpos+ 9] = (this.h[4] >>> 8) & 0xff;
  mac[macpos+10] = (this.h[5] >>> 0) & 0xff;
  mac[macpos+11] = (this.h[5] >>> 8) & 0xff;
  mac[macpos+12] = (this.h[6] >>> 0) & 0xff;
  mac[macpos+13] = (this.h[6] >>> 8) & 0xff;
  mac[macpos+14] = (this.h[7] >>> 0) & 0xff;
  mac[macpos+15] = (this.h[7] >>> 8) & 0xff;
};

poly1305.prototype.update = function(m, mpos, bytes) {
  var i, want;

  if (this.leftover) {
    want = (16 - this.leftover);
    if (want > bytes)
      want = bytes;
    for (i = 0; i < want; i++)
      this.buffer[this.leftover + i] = m[mpos+i];
    bytes -= want;
    mpos += want;
    this.leftover += want;
    if (this.leftover < 16)
      return;
    this.blocks(this.buffer, 0, 16);
    this.leftover = 0;
  }

  if (bytes >= 16) {
    want = bytes - (bytes % 16);
    this.blocks(m, mpos, want);
    mpos += want;
    bytes -= want;
  }

  if (bytes) {
    for (i = 0; i < bytes; i++)
      this.buffer[this.leftover + i] = m[mpos+i];
    this.leftover += bytes;
  }
};

function crypto_onetimeauth(out, outpos, m, mpos, n, k) {
  var s = new poly1305(k);
  s.update(m, mpos, n);
  s.finish(out, outpos);
  return 0;
}

function crypto_onetimeauth_verify(h, hpos, m, mpos, n, k) {
  var x = new Uint8Array(16);
  crypto_onetimeauth(x,0,m,mpos,n,k);
  return crypto_verify_16(h,hpos,x,0);
}

function crypto_secretbox(c,m,d,n,k) {
  var i;
  if (d < 32) return -1;
  crypto_stream_xor(c,0,m,0,d,n,k);
  crypto_onetimeauth(c, 16, c, 32, d - 32, c);
  for (i = 0; i < 16; i++) c[i] = 0;
  return 0;
}

function crypto_secretbox_open(m,c,d,n,k) {
  var i;
  var x = new Uint8Array(32);
  if (d < 32) return -1;
  crypto_stream(x,0,32,n,k);
  if (crypto_onetimeauth_verify(c, 16,c, 32,d - 32,x) !== 0) return -1;
  crypto_stream_xor(m,0,c,0,d,n,k);
  for (i = 0; i < 32; i++) m[i] = 0;
  return 0;
}

function set25519(r, a) {
  var i;
  for (i = 0; i < 16; i++) r[i] = a[i]|0;
}

function car25519(o) {
  var i, v, c = 1;
  for (i = 0; i < 16; i++) {
    v = o[i] + c + 65535;
    c = Math.floor(v / 65536);
    o[i] = v - c * 65536;
  }
  o[0] += c-1 + 37 * (c-1);
}

function sel25519(p, q, b) {
  var t, c = ~(b-1);
  for (var i = 0; i < 16; i++) {
    t = c & (p[i] ^ q[i]);
    p[i] ^= t;
    q[i] ^= t;
  }
}

function pack25519(o, n) {
  var i, j, b;
  var m = gf(), t = gf();
  for (i = 0; i < 16; i++) t[i] = n[i];
  car25519(t);
  car25519(t);
  car25519(t);
  for (j = 0; j < 2; j++) {
    m[0] = t[0] - 0xffed;
    for (i = 1; i < 15; i++) {
      m[i] = t[i] - 0xffff - ((m[i-1]>>16) & 1);
      m[i-1] &= 0xffff;
    }
    m[15] = t[15] - 0x7fff - ((m[14]>>16) & 1);
    b = (m[15]>>16) & 1;
    m[14] &= 0xffff;
    sel25519(t, m, 1-b);
  }
  for (i = 0; i < 16; i++) {
    o[2*i] = t[i] & 0xff;
    o[2*i+1] = t[i]>>8;
  }
}

function neq25519(a, b) {
  var c = new Uint8Array(32), d = new Uint8Array(32);
  pack25519(c, a);
  pack25519(d, b);
  return crypto_verify_32(c, 0, d, 0);
}

function par25519(a) {
  var d = new Uint8Array(32);
  pack25519(d, a);
  return d[0] & 1;
}

function unpack25519(o, n) {
  var i;
  for (i = 0; i < 16; i++) o[i] = n[2*i] + (n[2*i+1] << 8);
  o[15] &= 0x7fff;
}

function A(o, a, b) {
  for (var i = 0; i < 16; i++) o[i] = a[i] + b[i];
}

function Z(o, a, b) {
  for (var i = 0; i < 16; i++) o[i] = a[i] - b[i];
}

function M(o, a, b) {
  var v, c,
     t0 = 0,  t1 = 0,  t2 = 0,  t3 = 0,  t4 = 0,  t5 = 0,  t6 = 0,  t7 = 0,
     t8 = 0,  t9 = 0, t10 = 0, t11 = 0, t12 = 0, t13 = 0, t14 = 0, t15 = 0,
    t16 = 0, t17 = 0, t18 = 0, t19 = 0, t20 = 0, t21 = 0, t22 = 0, t23 = 0,
    t24 = 0, t25 = 0, t26 = 0, t27 = 0, t28 = 0, t29 = 0, t30 = 0,
    b0 = b[0],
    b1 = b[1],
    b2 = b[2],
    b3 = b[3],
    b4 = b[4],
    b5 = b[5],
    b6 = b[6],
    b7 = b[7],
    b8 = b[8],
    b9 = b[9],
    b10 = b[10],
    b11 = b[11],
    b12 = b[12],
    b13 = b[13],
    b14 = b[14],
    b15 = b[15];

  v = a[0];
  t0 += v * b0;
  t1 += v * b1;
  t2 += v * b2;
  t3 += v * b3;
  t4 += v * b4;
  t5 += v * b5;
  t6 += v * b6;
  t7 += v * b7;
  t8 += v * b8;
  t9 += v * b9;
  t10 += v * b10;
  t11 += v * b11;
  t12 += v * b12;
  t13 += v * b13;
  t14 += v * b14;
  t15 += v * b15;
  v = a[1];
  t1 += v * b0;
  t2 += v * b1;
  t3 += v * b2;
  t4 += v * b3;
  t5 += v * b4;
  t6 += v * b5;
  t7 += v * b6;
  t8 += v * b7;
  t9 += v * b8;
  t10 += v * b9;
  t11 += v * b10;
  t12 += v * b11;
  t13 += v * b12;
  t14 += v * b13;
  t15 += v * b14;
  t16 += v * b15;
  v = a[2];
  t2 += v * b0;
  t3 += v * b1;
  t4 += v * b2;
  t5 += v * b3;
  t6 += v * b4;
  t7 += v * b5;
  t8 += v * b6;
  t9 += v * b7;
  t10 += v * b8;
  t11 += v * b9;
  t12 += v * b10;
  t13 += v * b11;
  t14 += v * b12;
  t15 += v * b13;
  t16 += v * b14;
  t17 += v * b15;
  v = a[3];
  t3 += v * b0;
  t4 += v * b1;
  t5 += v * b2;
  t6 += v * b3;
  t7 += v * b4;
  t8 += v * b5;
  t9 += v * b6;
  t10 += v * b7;
  t11 += v * b8;
  t12 += v * b9;
  t13 += v * b10;
  t14 += v * b11;
  t15 += v * b12;
  t16 += v * b13;
  t17 += v * b14;
  t18 += v * b15;
  v = a[4];
  t4 += v * b0;
  t5 += v * b1;
  t6 += v * b2;
  t7 += v * b3;
  t8 += v * b4;
  t9 += v * b5;
  t10 += v * b6;
  t11 += v * b7;
  t12 += v * b8;
  t13 += v * b9;
  t14 += v * b10;
  t15 += v * b11;
  t16 += v * b12;
  t17 += v * b13;
  t18 += v * b14;
  t19 += v * b15;
  v = a[5];
  t5 += v * b0;
  t6 += v * b1;
  t7 += v * b2;
  t8 += v * b3;
  t9 += v * b4;
  t10 += v * b5;
  t11 += v * b6;
  t12 += v * b7;
  t13 += v * b8;
  t14 += v * b9;
  t15 += v * b10;
  t16 += v * b11;
  t17 += v * b12;
  t18 += v * b13;
  t19 += v * b14;
  t20 += v * b15;
  v = a[6];
  t6 += v * b0;
  t7 += v * b1;
  t8 += v * b2;
  t9 += v * b3;
  t10 += v * b4;
  t11 += v * b5;
  t12 += v * b6;
  t13 += v * b7;
  t14 += v * b8;
  t15 += v * b9;
  t16 += v * b10;
  t17 += v * b11;
  t18 += v * b12;
  t19 += v * b13;
  t20 += v * b14;
  t21 += v * b15;
  v = a[7];
  t7 += v * b0;
  t8 += v * b1;
  t9 += v * b2;
  t10 += v * b3;
  t11 += v * b4;
  t12 += v * b5;
  t13 += v * b6;
  t14 += v * b7;
  t15 += v * b8;
  t16 += v * b9;
  t17 += v * b10;
  t18 += v * b11;
  t19 += v * b12;
  t20 += v * b13;
  t21 += v * b14;
  t22 += v * b15;
  v = a[8];
  t8 += v * b0;
  t9 += v * b1;
  t10 += v * b2;
  t11 += v * b3;
  t12 += v * b4;
  t13 += v * b5;
  t14 += v * b6;
  t15 += v * b7;
  t16 += v * b8;
  t17 += v * b9;
  t18 += v * b10;
  t19 += v * b11;
  t20 += v * b12;
  t21 += v * b13;
  t22 += v * b14;
  t23 += v * b15;
  v = a[9];
  t9 += v * b0;
  t10 += v * b1;
  t11 += v * b2;
  t12 += v * b3;
  t13 += v * b4;
  t14 += v * b5;
  t15 += v * b6;
  t16 += v * b7;
  t17 += v * b8;
  t18 += v * b9;
  t19 += v * b10;
  t20 += v * b11;
  t21 += v * b12;
  t22 += v * b13;
  t23 += v * b14;
  t24 += v * b15;
  v = a[10];
  t10 += v * b0;
  t11 += v * b1;
  t12 += v * b2;
  t13 += v * b3;
  t14 += v * b4;
  t15 += v * b5;
  t16 += v * b6;
  t17 += v * b7;
  t18 += v * b8;
  t19 += v * b9;
  t20 += v * b10;
  t21 += v * b11;
  t22 += v * b12;
  t23 += v * b13;
  t24 += v * b14;
  t25 += v * b15;
  v = a[11];
  t11 += v * b0;
  t12 += v * b1;
  t13 += v * b2;
  t14 += v * b3;
  t15 += v * b4;
  t16 += v * b5;
  t17 += v * b6;
  t18 += v * b7;
  t19 += v * b8;
  t20 += v * b9;
  t21 += v * b10;
  t22 += v * b11;
  t23 += v * b12;
  t24 += v * b13;
  t25 += v * b14;
  t26 += v * b15;
  v = a[12];
  t12 += v * b0;
  t13 += v * b1;
  t14 += v * b2;
  t15 += v * b3;
  t16 += v * b4;
  t17 += v * b5;
  t18 += v * b6;
  t19 += v * b7;
  t20 += v * b8;
  t21 += v * b9;
  t22 += v * b10;
  t23 += v * b11;
  t24 += v * b12;
  t25 += v * b13;
  t26 += v * b14;
  t27 += v * b15;
  v = a[13];
  t13 += v * b0;
  t14 += v * b1;
  t15 += v * b2;
  t16 += v * b3;
  t17 += v * b4;
  t18 += v * b5;
  t19 += v * b6;
  t20 += v * b7;
  t21 += v * b8;
  t22 += v * b9;
  t23 += v * b10;
  t24 += v * b11;
  t25 += v * b12;
  t26 += v * b13;
  t27 += v * b14;
  t28 += v * b15;
  v = a[14];
  t14 += v * b0;
  t15 += v * b1;
  t16 += v * b2;
  t17 += v * b3;
  t18 += v * b4;
  t19 += v * b5;
  t20 += v * b6;
  t21 += v * b7;
  t22 += v * b8;
  t23 += v * b9;
  t24 += v * b10;
  t25 += v * b11;
  t26 += v * b12;
  t27 += v * b13;
  t28 += v * b14;
  t29 += v * b15;
  v = a[15];
  t15 += v * b0;
  t16 += v * b1;
  t17 += v * b2;
  t18 += v * b3;
  t19 += v * b4;
  t20 += v * b5;
  t21 += v * b6;
  t22 += v * b7;
  t23 += v * b8;
  t24 += v * b9;
  t25 += v * b10;
  t26 += v * b11;
  t27 += v * b12;
  t28 += v * b13;
  t29 += v * b14;
  t30 += v * b15;

  t0  += 38 * t16;
  t1  += 38 * t17;
  t2  += 38 * t18;
  t3  += 38 * t19;
  t4  += 38 * t20;
  t5  += 38 * t21;
  t6  += 38 * t22;
  t7  += 38 * t23;
  t8  += 38 * t24;
  t9  += 38 * t25;
  t10 += 38 * t26;
  t11 += 38 * t27;
  t12 += 38 * t28;
  t13 += 38 * t29;
  t14 += 38 * t30;
  // t15 left as is

  // first car
  c = 1;
  v =  t0 + c + 65535; c = Math.floor(v / 65536);  t0 = v - c * 65536;
  v =  t1 + c + 65535; c = Math.floor(v / 65536);  t1 = v - c * 65536;
  v =  t2 + c + 65535; c = Math.floor(v / 65536);  t2 = v - c * 65536;
  v =  t3 + c + 65535; c = Math.floor(v / 65536);  t3 = v - c * 65536;
  v =  t4 + c + 65535; c = Math.floor(v / 65536);  t4 = v - c * 65536;
  v =  t5 + c + 65535; c = Math.floor(v / 65536);  t5 = v - c * 65536;
  v =  t6 + c + 65535; c = Math.floor(v / 65536);  t6 = v - c * 65536;
  v =  t7 + c + 65535; c = Math.floor(v / 65536);  t7 = v - c * 65536;
  v =  t8 + c + 65535; c = Math.floor(v / 65536);  t8 = v - c * 65536;
  v =  t9 + c + 65535; c = Math.floor(v / 65536);  t9 = v - c * 65536;
  v = t10 + c + 65535; c = Math.floor(v / 65536); t10 = v - c * 65536;
  v = t11 + c + 65535; c = Math.floor(v / 65536); t11 = v - c * 65536;
  v = t12 + c + 65535; c = Math.floor(v / 65536); t12 = v - c * 65536;
  v = t13 + c + 65535; c = Math.floor(v / 65536); t13 = v - c * 65536;
  v = t14 + c + 65535; c = Math.floor(v / 65536); t14 = v - c * 65536;
  v = t15 + c + 65535; c = Math.floor(v / 65536); t15 = v - c * 65536;
  t0 += c-1 + 37 * (c-1);

  // second car
  c = 1;
  v =  t0 + c + 65535; c = Math.floor(v / 65536);  t0 = v - c * 65536;
  v =  t1 + c + 65535; c = Math.floor(v / 65536);  t1 = v - c * 65536;
  v =  t2 + c + 65535; c = Math.floor(v / 65536);  t2 = v - c * 65536;
  v =  t3 + c + 65535; c = Math.floor(v / 65536);  t3 = v - c * 65536;
  v =  t4 + c + 65535; c = Math.floor(v / 65536);  t4 = v - c * 65536;
  v =  t5 + c + 65535; c = Math.floor(v / 65536);  t5 = v - c * 65536;
  v =  t6 + c + 65535; c = Math.floor(v / 65536);  t6 = v - c * 65536;
  v =  t7 + c + 65535; c = Math.floor(v / 65536);  t7 = v - c * 65536;
  v =  t8 + c + 65535; c = Math.floor(v / 65536);  t8 = v - c * 65536;
  v =  t9 + c + 65535; c = Math.floor(v / 65536);  t9 = v - c * 65536;
  v = t10 + c + 65535; c = Math.floor(v / 65536); t10 = v - c * 65536;
  v = t11 + c + 65535; c = Math.floor(v / 65536); t11 = v - c * 65536;
  v = t12 + c + 65535; c = Math.floor(v / 65536); t12 = v - c * 65536;
  v = t13 + c + 65535; c = Math.floor(v / 65536); t13 = v - c * 65536;
  v = t14 + c + 65535; c = Math.floor(v / 65536); t14 = v - c * 65536;
  v = t15 + c + 65535; c = Math.floor(v / 65536); t15 = v - c * 65536;
  t0 += c-1 + 37 * (c-1);

  o[ 0] = t0;
  o[ 1] = t1;
  o[ 2] = t2;
  o[ 3] = t3;
  o[ 4] = t4;
  o[ 5] = t5;
  o[ 6] = t6;
  o[ 7] = t7;
  o[ 8] = t8;
  o[ 9] = t9;
  o[10] = t10;
  o[11] = t11;
  o[12] = t12;
  o[13] = t13;
  o[14] = t14;
  o[15] = t15;
}

function S(o, a) {
  M(o, a, a);
}

function inv25519(o, i) {
  var c = gf();
  var a;
  for (a = 0; a < 16; a++) c[a] = i[a];
  for (a = 253; a >= 0; a--) {
    S(c, c);
    if(a !== 2 && a !== 4) M(c, c, i);
  }
  for (a = 0; a < 16; a++) o[a] = c[a];
}

function pow2523(o, i) {
  var c = gf();
  var a;
  for (a = 0; a < 16; a++) c[a] = i[a];
  for (a = 250; a >= 0; a--) {
      S(c, c);
      if(a !== 1) M(c, c, i);
  }
  for (a = 0; a < 16; a++) o[a] = c[a];
}

function crypto_scalarmult(q, n, p) {
  var z = new Uint8Array(32);
  var x = new Float64Array(80), r, i;
  var a = gf(), b = gf(), c = gf(),
      d = gf(), e = gf(), f = gf();
  for (i = 0; i < 31; i++) z[i] = n[i];
  z[31]=(n[31]&127)|64;
  z[0]&=248;
  unpack25519(x,p);
  for (i = 0; i < 16; i++) {
    b[i]=x[i];
    d[i]=a[i]=c[i]=0;
  }
  a[0]=d[0]=1;
  for (i=254; i>=0; --i) {
    r=(z[i>>>3]>>>(i&7))&1;
    sel25519(a,b,r);
    sel25519(c,d,r);
    A(e,a,c);
    Z(a,a,c);
    A(c,b,d);
    Z(b,b,d);
    S(d,e);
    S(f,a);
    M(a,c,a);
    M(c,b,e);
    A(e,a,c);
    Z(a,a,c);
    S(b,a);
    Z(c,d,f);
    M(a,c,_121665);
    A(a,a,d);
    M(c,c,a);
    M(a,d,f);
    M(d,b,x);
    S(b,e);
    sel25519(a,b,r);
    sel25519(c,d,r);
  }
  for (i = 0; i < 16; i++) {
    x[i+16]=a[i];
    x[i+32]=c[i];
    x[i+48]=b[i];
    x[i+64]=d[i];
  }
  var x32 = x.subarray(32);
  var x16 = x.subarray(16);
  inv25519(x32,x32);
  M(x16,x16,x32);
  pack25519(q,x16);
  return 0;
}

function crypto_scalarmult_base(q, n) {
  return crypto_scalarmult(q, n, _9);
}

function crypto_box_keypair(y, x) {
  randombytes(x, 32);
  return crypto_scalarmult_base(y, x);
}

function crypto_box_beforenm(k, y, x) {
  var s = new Uint8Array(32);
  crypto_scalarmult(s, x, y);
  return crypto_core_hsalsa20(k, _0, s, sigma);
}

var crypto_box_afternm = crypto_secretbox;
var crypto_box_open_afternm = crypto_secretbox_open;

function crypto_box(c, m, d, n, y, x) {
  var k = new Uint8Array(32);
  crypto_box_beforenm(k, y, x);
  return crypto_box_afternm(c, m, d, n, k);
}

function crypto_box_open(m, c, d, n, y, x) {
  var k = new Uint8Array(32);
  crypto_box_beforenm(k, y, x);
  return crypto_box_open_afternm(m, c, d, n, k);
}

var K = [
  0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,
  0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,
  0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,
  0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,
  0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,
  0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,
  0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,
  0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,
  0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,
  0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,
  0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,
  0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,
  0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,
  0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,
  0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,
  0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,
  0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,
  0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,
  0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,
  0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,
  0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,
  0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,
  0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,
  0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,
  0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,
  0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,
  0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,
  0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,
  0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,
  0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,
  0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,
  0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,
  0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,
  0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,
  0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,
  0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,
  0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,
  0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,
  0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,
  0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817
];

function crypto_hashblocks_hl(hh, hl, m, n) {
  var wh = new Int32Array(16), wl = new Int32Array(16),
      bh0, bh1, bh2, bh3, bh4, bh5, bh6, bh7,
      bl0, bl1, bl2, bl3, bl4, bl5, bl6, bl7,
      th, tl, i, j, h, l, a, b, c, d;

  var ah0 = hh[0],
      ah1 = hh[1],
      ah2 = hh[2],
      ah3 = hh[3],
      ah4 = hh[4],
      ah5 = hh[5],
      ah6 = hh[6],
      ah7 = hh[7],

      al0 = hl[0],
      al1 = hl[1],
      al2 = hl[2],
      al3 = hl[3],
      al4 = hl[4],
      al5 = hl[5],
      al6 = hl[6],
      al7 = hl[7];

  var pos = 0;
  while (n >= 128) {
    for (i = 0; i < 16; i++) {
      j = 8 * i + pos;
      wh[i] = (m[j+0] << 24) | (m[j+1] << 16) | (m[j+2] << 8) | m[j+3];
      wl[i] = (m[j+4] << 24) | (m[j+5] << 16) | (m[j+6] << 8) | m[j+7];
    }
    for (i = 0; i < 80; i++) {
      bh0 = ah0;
      bh1 = ah1;
      bh2 = ah2;
      bh3 = ah3;
      bh4 = ah4;
      bh5 = ah5;
      bh6 = ah6;
      bh7 = ah7;

      bl0 = al0;
      bl1 = al1;
      bl2 = al2;
      bl3 = al3;
      bl4 = al4;
      bl5 = al5;
      bl6 = al6;
      bl7 = al7;

      // add
      h = ah7;
      l = al7;

      a = l & 0xffff; b = l >>> 16;
      c = h & 0xffff; d = h >>> 16;

      // Sigma1
      h = ((ah4 >>> 14) | (al4 << (32-14))) ^ ((ah4 >>> 18) | (al4 << (32-18))) ^ ((al4 >>> (41-32)) | (ah4 << (32-(41-32))));
      l = ((al4 >>> 14) | (ah4 << (32-14))) ^ ((al4 >>> 18) | (ah4 << (32-18))) ^ ((ah4 >>> (41-32)) | (al4 << (32-(41-32))));

      a += l & 0xffff; b += l >>> 16;
      c += h & 0xffff; d += h >>> 16;

      // Ch
      h = (ah4 & ah5) ^ (~ah4 & ah6);
      l = (al4 & al5) ^ (~al4 & al6);

      a += l & 0xffff; b += l >>> 16;
      c += h & 0xffff; d += h >>> 16;

      // K
      h = K[i*2];
      l = K[i*2+1];

      a += l & 0xffff; b += l >>> 16;
      c += h & 0xffff; d += h >>> 16;

      // w
      h = wh[i%16];
      l = wl[i%16];

      a += l & 0xffff; b += l >>> 16;
      c += h & 0xffff; d += h >>> 16;

      b += a >>> 16;
      c += b >>> 16;
      d += c >>> 16;

      th = c & 0xffff | d << 16;
      tl = a & 0xffff | b << 16;

      // add
      h = th;
      l = tl;

      a = l & 0xffff; b = l >>> 16;
      c = h & 0xffff; d = h >>> 16;

      // Sigma0
      h = ((ah0 >>> 28) | (al0 << (32-28))) ^ ((al0 >>> (34-32)) | (ah0 << (32-(34-32)))) ^ ((al0 >>> (39-32)) | (ah0 << (32-(39-32))));
      l = ((al0 >>> 28) | (ah0 << (32-28))) ^ ((ah0 >>> (34-32)) | (al0 << (32-(34-32)))) ^ ((ah0 >>> (39-32)) | (al0 << (32-(39-32))));

      a += l & 0xffff; b += l >>> 16;
      c += h & 0xffff; d += h >>> 16;

      // Maj
      h = (ah0 & ah1) ^ (ah0 & ah2) ^ (ah1 & ah2);
      l = (al0 & al1) ^ (al0 & al2) ^ (al1 & al2);

      a += l & 0xffff; b += l >>> 16;
      c += h & 0xffff; d += h >>> 16;

      b += a >>> 16;
      c += b >>> 16;
      d += c >>> 16;

      bh7 = (c & 0xffff) | (d << 16);
      bl7 = (a & 0xffff) | (b << 16);

      // add
      h = bh3;
      l = bl3;

      a = l & 0xffff; b = l >>> 16;
      c = h & 0xffff; d = h >>> 16;

      h = th;
      l = tl;

      a += l & 0xffff; b += l >>> 16;
      c += h & 0xffff; d += h >>> 16;

      b += a >>> 16;
      c += b >>> 16;
      d += c >>> 16;

      bh3 = (c & 0xffff) | (d << 16);
      bl3 = (a & 0xffff) | (b << 16);

      ah1 = bh0;
      ah2 = bh1;
      ah3 = bh2;
      ah4 = bh3;
      ah5 = bh4;
      ah6 = bh5;
      ah7 = bh6;
      ah0 = bh7;

      al1 = bl0;
      al2 = bl1;
      al3 = bl2;
      al4 = bl3;
      al5 = bl4;
      al6 = bl5;
      al7 = bl6;
      al0 = bl7;

      if (i%16 === 15) {
        for (j = 0; j < 16; j++) {
          // add
          h = wh[j];
          l = wl[j];

          a = l & 0xffff; b = l >>> 16;
          c = h & 0xffff; d = h >>> 16;

          h = wh[(j+9)%16];
          l = wl[(j+9)%16];

          a += l & 0xffff; b += l >>> 16;
          c += h & 0xffff; d += h >>> 16;

          // sigma0
          th = wh[(j+1)%16];
          tl = wl[(j+1)%16];
          h = ((th >>> 1) | (tl << (32-1))) ^ ((th >>> 8) | (tl << (32-8))) ^ (th >>> 7);
          l = ((tl >>> 1) | (th << (32-1))) ^ ((tl >>> 8) | (th << (32-8))) ^ ((tl >>> 7) | (th << (32-7)));

          a += l & 0xffff; b += l >>> 16;
          c += h & 0xffff; d += h >>> 16;

          // sigma1
          th = wh[(j+14)%16];
          tl = wl[(j+14)%16];
          h = ((th >>> 19) | (tl << (32-19))) ^ ((tl >>> (61-32)) | (th << (32-(61-32)))) ^ (th >>> 6);
          l = ((tl >>> 19) | (th << (32-19))) ^ ((th >>> (61-32)) | (tl << (32-(61-32)))) ^ ((tl >>> 6) | (th << (32-6)));

          a += l & 0xffff; b += l >>> 16;
          c += h & 0xffff; d += h >>> 16;

          b += a >>> 16;
          c += b >>> 16;
          d += c >>> 16;

          wh[j] = (c & 0xffff) | (d << 16);
          wl[j] = (a & 0xffff) | (b << 16);
        }
      }
    }

    // add
    h = ah0;
    l = al0;

    a = l & 0xffff; b = l >>> 16;
    c = h & 0xffff; d = h >>> 16;

    h = hh[0];
    l = hl[0];

    a += l & 0xffff; b += l >>> 16;
    c += h & 0xffff; d += h >>> 16;

    b += a >>> 16;
    c += b >>> 16;
    d += c >>> 16;

    hh[0] = ah0 = (c & 0xffff) | (d << 16);
    hl[0] = al0 = (a & 0xffff) | (b << 16);

    h = ah1;
    l = al1;

    a = l & 0xffff; b = l >>> 16;
    c = h & 0xffff; d = h >>> 16;

    h = hh[1];
    l = hl[1];

    a += l & 0xffff; b += l >>> 16;
    c += h & 0xffff; d += h >>> 16;

    b += a >>> 16;
    c += b >>> 16;
    d += c >>> 16;

    hh[1] = ah1 = (c & 0xffff) | (d << 16);
    hl[1] = al1 = (a & 0xffff) | (b << 16);

    h = ah2;
    l = al2;

    a = l & 0xffff; b = l >>> 16;
    c = h & 0xffff; d = h >>> 16;

    h = hh[2];
    l = hl[2];

    a += l & 0xffff; b += l >>> 16;
    c += h & 0xffff; d += h >>> 16;

    b += a >>> 16;
    c += b >>> 16;
    d += c >>> 16;

    hh[2] = ah2 = (c & 0xffff) | (d << 16);
    hl[2] = al2 = (a & 0xffff) | (b << 16);

    h = ah3;
    l = al3;

    a = l & 0xffff; b = l >>> 16;
    c = h & 0xffff; d = h >>> 16;

    h = hh[3];
    l = hl[3];

    a += l & 0xffff; b += l >>> 16;
    c += h & 0xffff; d += h >>> 16;

    b += a >>> 16;
    c += b >>> 16;
    d += c >>> 16;

    hh[3] = ah3 = (c & 0xffff) | (d << 16);
    hl[3] = al3 = (a & 0xffff) | (b << 16);

    h = ah4;
    l = al4;

    a = l & 0xffff; b = l >>> 16;
    c = h & 0xffff; d = h >>> 16;

    h = hh[4];
    l = hl[4];

    a += l & 0xffff; b += l >>> 16;
    c += h & 0xffff; d += h >>> 16;

    b += a >>> 16;
    c += b >>> 16;
    d += c >>> 16;

    hh[4] = ah4 = (c & 0xffff) | (d << 16);
    hl[4] = al4 = (a & 0xffff) | (b << 16);

    h = ah5;
    l = al5;

    a = l & 0xffff; b = l >>> 16;
    c = h & 0xffff; d = h >>> 16;

    h = hh[5];
    l = hl[5];

    a += l & 0xffff; b += l >>> 16;
    c += h & 0xffff; d += h >>> 16;

    b += a >>> 16;
    c += b >>> 16;
    d += c >>> 16;

    hh[5] = ah5 = (c & 0xffff) | (d << 16);
    hl[5] = al5 = (a & 0xffff) | (b << 16);

    h = ah6;
    l = al6;

    a = l & 0xffff; b = l >>> 16;
    c = h & 0xffff; d = h >>> 16;

    h = hh[6];
    l = hl[6];

    a += l & 0xffff; b += l >>> 16;
    c += h & 0xffff; d += h >>> 16;

    b += a >>> 16;
    c += b >>> 16;
    d += c >>> 16;

    hh[6] = ah6 = (c & 0xffff) | (d << 16);
    hl[6] = al6 = (a & 0xffff) | (b << 16);

    h = ah7;
    l = al7;

    a = l & 0xffff; b = l >>> 16;
    c = h & 0xffff; d = h >>> 16;

    h = hh[7];
    l = hl[7];

    a += l & 0xffff; b += l >>> 16;
    c += h & 0xffff; d += h >>> 16;

    b += a >>> 16;
    c += b >>> 16;
    d += c >>> 16;

    hh[7] = ah7 = (c & 0xffff) | (d << 16);
    hl[7] = al7 = (a & 0xffff) | (b << 16);

    pos += 128;
    n -= 128;
  }

  return n;
}

function crypto_hash(out, m, n) {
  var hh = new Int32Array(8),
      hl = new Int32Array(8),
      x = new Uint8Array(256),
      i, b = n;

  hh[0] = 0x6a09e667;
  hh[1] = 0xbb67ae85;
  hh[2] = 0x3c6ef372;
  hh[3] = 0xa54ff53a;
  hh[4] = 0x510e527f;
  hh[5] = 0x9b05688c;
  hh[6] = 0x1f83d9ab;
  hh[7] = 0x5be0cd19;

  hl[0] = 0xf3bcc908;
  hl[1] = 0x84caa73b;
  hl[2] = 0xfe94f82b;
  hl[3] = 0x5f1d36f1;
  hl[4] = 0xade682d1;
  hl[5] = 0x2b3e6c1f;
  hl[6] = 0xfb41bd6b;
  hl[7] = 0x137e2179;

  crypto_hashblocks_hl(hh, hl, m, n);
  n %= 128;

  for (i = 0; i < n; i++) x[i] = m[b-n+i];
  x[n] = 128;

  n = 256-128*(n<112?1:0);
  x[n-9] = 0;
  ts64(x, n-8,  (b / 0x20000000) | 0, b << 3);
  crypto_hashblocks_hl(hh, hl, x, n);

  for (i = 0; i < 8; i++) ts64(out, 8*i, hh[i], hl[i]);

  return 0;
}

function add(p, q) {
  var a = gf(), b = gf(), c = gf(),
      d = gf(), e = gf(), f = gf(),
      g = gf(), h = gf(), t = gf();

  Z(a, p[1], p[0]);
  Z(t, q[1], q[0]);
  M(a, a, t);
  A(b, p[0], p[1]);
  A(t, q[0], q[1]);
  M(b, b, t);
  M(c, p[3], q[3]);
  M(c, c, D2);
  M(d, p[2], q[2]);
  A(d, d, d);
  Z(e, b, a);
  Z(f, d, c);
  A(g, d, c);
  A(h, b, a);

  M(p[0], e, f);
  M(p[1], h, g);
  M(p[2], g, f);
  M(p[3], e, h);
}

function cswap(p, q, b) {
  var i;
  for (i = 0; i < 4; i++) {
    sel25519(p[i], q[i], b);
  }
}

function pack(r, p) {
  var tx = gf(), ty = gf(), zi = gf();
  inv25519(zi, p[2]);
  M(tx, p[0], zi);
  M(ty, p[1], zi);
  pack25519(r, ty);
  r[31] ^= par25519(tx) << 7;
}

function scalarmult(p, q, s) {
  var b, i;
  set25519(p[0], gf0);
  set25519(p[1], gf1);
  set25519(p[2], gf1);
  set25519(p[3], gf0);
  for (i = 255; i >= 0; --i) {
    b = (s[(i/8)|0] >> (i&7)) & 1;
    cswap(p, q, b);
    add(q, p);
    add(p, p);
    cswap(p, q, b);
  }
}

function scalarbase(p, s) {
  var q = [gf(), gf(), gf(), gf()];
  set25519(q[0], X);
  set25519(q[1], Y);
  set25519(q[2], gf1);
  M(q[3], X, Y);
  scalarmult(p, q, s);
}

function crypto_sign_keypair(pk, sk, seeded) {
  var d = new Uint8Array(64);
  var p = [gf(), gf(), gf(), gf()];
  var i;

  if (!seeded) randombytes(sk, 32);
  crypto_hash(d, sk, 32);
  d[0] &= 248;
  d[31] &= 127;
  d[31] |= 64;

  scalarbase(p, d);
  pack(pk, p);

  for (i = 0; i < 32; i++) sk[i+32] = pk[i];
  return 0;
}

var L = new Float64Array([0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x10]);

function modL(r, x) {
  var carry, i, j, k;
  for (i = 63; i >= 32; --i) {
    carry = 0;
    for (j = i - 32, k = i - 12; j < k; ++j) {
      x[j] += carry - 16 * x[i] * L[j - (i - 32)];
      carry = (x[j] + 128) >> 8;
      x[j] -= carry * 256;
    }
    x[j] += carry;
    x[i] = 0;
  }
  carry = 0;
  for (j = 0; j < 32; j++) {
    x[j] += carry - (x[31] >> 4) * L[j];
    carry = x[j] >> 8;
    x[j] &= 255;
  }
  for (j = 0; j < 32; j++) x[j] -= carry * L[j];
  for (i = 0; i < 32; i++) {
    x[i+1] += x[i] >> 8;
    r[i] = x[i] & 255;
  }
}

function reduce(r) {
  var x = new Float64Array(64), i;
  for (i = 0; i < 64; i++) x[i] = r[i];
  for (i = 0; i < 64; i++) r[i] = 0;
  modL(r, x);
}

// Note: difference from C - smlen returned, not passed as argument.
function crypto_sign(sm, m, n, sk) {
  var d = new Uint8Array(64), h = new Uint8Array(64), r = new Uint8Array(64);
  var i, j, x = new Float64Array(64);
  var p = [gf(), gf(), gf(), gf()];

  crypto_hash(d, sk, 32);
  d[0] &= 248;
  d[31] &= 127;
  d[31] |= 64;

  var smlen = n + 64;
  for (i = 0; i < n; i++) sm[64 + i] = m[i];
  for (i = 0; i < 32; i++) sm[32 + i] = d[32 + i];

  crypto_hash(r, sm.subarray(32), n+32);
  reduce(r);
  scalarbase(p, r);
  pack(sm, p);

  for (i = 32; i < 64; i++) sm[i] = sk[i];
  crypto_hash(h, sm, n + 64);
  reduce(h);

  for (i = 0; i < 64; i++) x[i] = 0;
  for (i = 0; i < 32; i++) x[i] = r[i];
  for (i = 0; i < 32; i++) {
    for (j = 0; j < 32; j++) {
      x[i+j] += h[i] * d[j];
    }
  }

  modL(sm.subarray(32), x);
  return smlen;
}

function unpackneg(r, p) {
  var t = gf(), chk = gf(), num = gf(),
      den = gf(), den2 = gf(), den4 = gf(),
      den6 = gf();

  set25519(r[2], gf1);
  unpack25519(r[1], p);
  S(num, r[1]);
  M(den, num, D);
  Z(num, num, r[2]);
  A(den, r[2], den);

  S(den2, den);
  S(den4, den2);
  M(den6, den4, den2);
  M(t, den6, num);
  M(t, t, den);

  pow2523(t, t);
  M(t, t, num);
  M(t, t, den);
  M(t, t, den);
  M(r[0], t, den);

  S(chk, r[0]);
  M(chk, chk, den);
  if (neq25519(chk, num)) M(r[0], r[0], I);

  S(chk, r[0]);
  M(chk, chk, den);
  if (neq25519(chk, num)) return -1;

  if (par25519(r[0]) === (p[31]>>7)) Z(r[0], gf0, r[0]);

  M(r[3], r[0], r[1]);
  return 0;
}

function crypto_sign_open(m, sm, n, pk) {
  var i, mlen;
  var t = new Uint8Array(32), h = new Uint8Array(64);
  var p = [gf(), gf(), gf(), gf()],
      q = [gf(), gf(), gf(), gf()];

  mlen = -1;
  if (n < 64) return -1;

  if (unpackneg(q, pk)) return -1;

  for (i = 0; i < n; i++) m[i] = sm[i];
  for (i = 0; i < 32; i++) m[i+32] = pk[i];
  crypto_hash(h, m, n);
  reduce(h);
  scalarmult(p, q, h);

  scalarbase(q, sm.subarray(32));
  add(p, q);
  pack(t, p);

  n -= 64;
  if (crypto_verify_32(sm, 0, t, 0)) {
    for (i = 0; i < n; i++) m[i] = 0;
    return -1;
  }

  for (i = 0; i < n; i++) m[i] = sm[i + 64];
  mlen = n;
  return mlen;
}

var crypto_secretbox_KEYBYTES = 32,
    crypto_secretbox_NONCEBYTES = 24,
    crypto_secretbox_ZEROBYTES = 32,
    crypto_secretbox_BOXZEROBYTES = 16,
    crypto_scalarmult_BYTES = 32,
    crypto_scalarmult_SCALARBYTES = 32,
    crypto_box_PUBLICKEYBYTES = 32,
    crypto_box_SECRETKEYBYTES = 32,
    crypto_box_BEFORENMBYTES = 32,
    crypto_box_NONCEBYTES = crypto_secretbox_NONCEBYTES,
    crypto_box_ZEROBYTES = crypto_secretbox_ZEROBYTES,
    crypto_box_BOXZEROBYTES = crypto_secretbox_BOXZEROBYTES,
    crypto_sign_BYTES = 64,
    crypto_sign_PUBLICKEYBYTES = 32,
    crypto_sign_SECRETKEYBYTES = 64,
    crypto_sign_SEEDBYTES = 32,
    crypto_hash_BYTES = 64;

nacl.lowlevel = {
  crypto_core_hsalsa20: crypto_core_hsalsa20,
  crypto_stream_xor: crypto_stream_xor,
  crypto_stream: crypto_stream,
  crypto_stream_salsa20_xor: crypto_stream_salsa20_xor,
  crypto_stream_salsa20: crypto_stream_salsa20,
  crypto_onetimeauth: crypto_onetimeauth,
  crypto_onetimeauth_verify: crypto_onetimeauth_verify,
  crypto_verify_16: crypto_verify_16,
  crypto_verify_32: crypto_verify_32,
  crypto_secretbox: crypto_secretbox,
  crypto_secretbox_open: crypto_secretbox_open,
  crypto_scalarmult: crypto_scalarmult,
  crypto_scalarmult_base: crypto_scalarmult_base,
  crypto_box_beforenm: crypto_box_beforenm,
  crypto_box_afternm: crypto_box_afternm,
  crypto_box: crypto_box,
  crypto_box_open: crypto_box_open,
  crypto_box_keypair: crypto_box_keypair,
  crypto_hash: crypto_hash,
  crypto_sign: crypto_sign,
  crypto_sign_keypair: crypto_sign_keypair,
  crypto_sign_open: crypto_sign_open,

  crypto_secretbox_KEYBYTES: crypto_secretbox_KEYBYTES,
  crypto_secretbox_NONCEBYTES: crypto_secretbox_NONCEBYTES,
  crypto_secretbox_ZEROBYTES: crypto_secretbox_ZEROBYTES,
  crypto_secretbox_BOXZEROBYTES: crypto_secretbox_BOXZEROBYTES,
  crypto_scalarmult_BYTES: crypto_scalarmult_BYTES,
  crypto_scalarmult_SCALARBYTES: crypto_scalarmult_SCALARBYTES,
  crypto_box_PUBLICKEYBYTES: crypto_box_PUBLICKEYBYTES,
  crypto_box_SECRETKEYBYTES: crypto_box_SECRETKEYBYTES,
  crypto_box_BEFORENMBYTES: crypto_box_BEFORENMBYTES,
  crypto_box_NONCEBYTES: crypto_box_NONCEBYTES,
  crypto_box_ZEROBYTES: crypto_box_ZEROBYTES,
  crypto_box_BOXZEROBYTES: crypto_box_BOXZEROBYTES,
  crypto_sign_BYTES: crypto_sign_BYTES,
  crypto_sign_PUBLICKEYBYTES: crypto_sign_PUBLICKEYBYTES,
  crypto_sign_SECRETKEYBYTES: crypto_sign_SECRETKEYBYTES,
  crypto_sign_SEEDBYTES: crypto_sign_SEEDBYTES,
  crypto_hash_BYTES: crypto_hash_BYTES
};

/* High-level API */

function checkLengths(k, n) {
  if (k.length !== crypto_secretbox_KEYBYTES) throw new Error('bad key size');
  if (n.length !== crypto_secretbox_NONCEBYTES) throw new Error('bad nonce size');
}

function checkBoxLengths(pk, sk) {
  if (pk.length !== crypto_box_PUBLICKEYBYTES) throw new Error('bad public key size');
  if (sk.length !== crypto_box_SECRETKEYBYTES) throw new Error('bad secret key size');
}

function checkArrayTypes() {
  for (var i = 0; i < arguments.length; i++) {
    if (!(arguments[i] instanceof Uint8Array))
      throw new TypeError('unexpected type, use Uint8Array');
  }
}

function cleanup(arr) {
  for (var i = 0; i < arr.length; i++) arr[i] = 0;
}

nacl.randomBytes = function(n) {
  var b = new Uint8Array(n);
  randombytes(b, n);
  return b;
};

nacl.secretbox = function(msg, nonce, key) {
  checkArrayTypes(msg, nonce, key);
  checkLengths(key, nonce);
  var m = new Uint8Array(crypto_secretbox_ZEROBYTES + msg.length);
  var c = new Uint8Array(m.length);
  for (var i = 0; i < msg.length; i++) m[i+crypto_secretbox_ZEROBYTES] = msg[i];
  crypto_secretbox(c, m, m.length, nonce, key);
  return c.subarray(crypto_secretbox_BOXZEROBYTES);
};

nacl.secretbox.open = function(box, nonce, key) {
  checkArrayTypes(box, nonce, key);
  checkLengths(key, nonce);
  var c = new Uint8Array(crypto_secretbox_BOXZEROBYTES + box.length);
  var m = new Uint8Array(c.length);
  for (var i = 0; i < box.length; i++) c[i+crypto_secretbox_BOXZEROBYTES] = box[i];
  if (c.length < 32) return null;
  if (crypto_secretbox_open(m, c, c.length, nonce, key) !== 0) return null;
  return m.subarray(crypto_secretbox_ZEROBYTES);
};

nacl.secretbox.keyLength = crypto_secretbox_KEYBYTES;
nacl.secretbox.nonceLength = crypto_secretbox_NONCEBYTES;
nacl.secretbox.overheadLength = crypto_secretbox_BOXZEROBYTES;

nacl.scalarMult = function(n, p) {
  checkArrayTypes(n, p);
  if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size');
  if (p.length !== crypto_scalarmult_BYTES) throw new Error('bad p size');
  var q = new Uint8Array(crypto_scalarmult_BYTES);
  crypto_scalarmult(q, n, p);
  return q;
};

nacl.scalarMult.base = function(n) {
  checkArrayTypes(n);
  if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size');
  var q = new Uint8Array(crypto_scalarmult_BYTES);
  crypto_scalarmult_base(q, n);
  return q;
};

nacl.scalarMult.scalarLength = crypto_scalarmult_SCALARBYTES;
nacl.scalarMult.groupElementLength = crypto_scalarmult_BYTES;

nacl.box = function(msg, nonce, publicKey, secretKey) {
  var k = nacl.box.before(publicKey, secretKey);
  return nacl.secretbox(msg, nonce, k);
};

nacl.box.before = function(publicKey, secretKey) {
  checkArrayTypes(publicKey, secretKey);
  checkBoxLengths(publicKey, secretKey);
  var k = new Uint8Array(crypto_box_BEFORENMBYTES);
  crypto_box_beforenm(k, publicKey, secretKey);
  return k;
};

nacl.box.after = nacl.secretbox;

nacl.box.open = function(msg, nonce, publicKey, secretKey) {
  var k = nacl.box.before(publicKey, secretKey);
  return nacl.secretbox.open(msg, nonce, k);
};

nacl.box.open.after = nacl.secretbox.open;

nacl.box.keyPair = function() {
  var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES);
  var sk = new Uint8Array(crypto_box_SECRETKEYBYTES);
  crypto_box_keypair(pk, sk);
  return {publicKey: pk, secretKey: sk};
};

nacl.box.keyPair.fromSecretKey = function(secretKey) {
  checkArrayTypes(secretKey);
  if (secretKey.length !== crypto_box_SECRETKEYBYTES)
    throw new Error('bad secret key size');
  var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES);
  crypto_scalarmult_base(pk, secretKey);
  return {publicKey: pk, secretKey: new Uint8Array(secretKey)};
};

nacl.box.publicKeyLength = crypto_box_PUBLICKEYBYTES;
nacl.box.secretKeyLength = crypto_box_SECRETKEYBYTES;
nacl.box.sharedKeyLength = crypto_box_BEFORENMBYTES;
nacl.box.nonceLength = crypto_box_NONCEBYTES;
nacl.box.overheadLength = nacl.secretbox.overheadLength;

nacl.sign = function(msg, secretKey) {
  checkArrayTypes(msg, secretKey);
  if (secretKey.length !== crypto_sign_SECRETKEYBYTES)
    throw new Error('bad secret key size');
  var signedMsg = new Uint8Array(crypto_sign_BYTES+msg.length);
  crypto_sign(signedMsg, msg, msg.length, secretKey);
  return signedMsg;
};

nacl.sign.open = function(signedMsg, publicKey) {
  checkArrayTypes(signedMsg, publicKey);
  if (publicKey.length !== crypto_sign_PUBLICKEYBYTES)
    throw new Error('bad public key size');
  var tmp = new Uint8Array(signedMsg.length);
  var mlen = crypto_sign_open(tmp, signedMsg, signedMsg.length, publicKey);
  if (mlen < 0) return null;
  var m = new Uint8Array(mlen);
  for (var i = 0; i < m.length; i++) m[i] = tmp[i];
  return m;
};

nacl.sign.detached = function(msg, secretKey) {
  var signedMsg = nacl.sign(msg, secretKey);
  var sig = new Uint8Array(crypto_sign_BYTES);
  for (var i = 0; i < sig.length; i++) sig[i] = signedMsg[i];
  return sig;
};

nacl.sign.detached.verify = function(msg, sig, publicKey) {
  checkArrayTypes(msg, sig, publicKey);
  if (sig.length !== crypto_sign_BYTES)
    throw new Error('bad signature size');
  if (publicKey.length !== crypto_sign_PUBLICKEYBYTES)
    throw new Error('bad public key size');
  var sm = new Uint8Array(crypto_sign_BYTES + msg.length);
  var m = new Uint8Array(crypto_sign_BYTES + msg.length);
  var i;
  for (i = 0; i < crypto_sign_BYTES; i++) sm[i] = sig[i];
  for (i = 0; i < msg.length; i++) sm[i+crypto_sign_BYTES] = msg[i];
  return (crypto_sign_open(m, sm, sm.length, publicKey) >= 0);
};

nacl.sign.keyPair = function() {
  var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES);
  var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES);
  crypto_sign_keypair(pk, sk);
  return {publicKey: pk, secretKey: sk};
};

nacl.sign.keyPair.fromSecretKey = function(secretKey) {
  checkArrayTypes(secretKey);
  if (secretKey.length !== crypto_sign_SECRETKEYBYTES)
    throw new Error('bad secret key size');
  var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES);
  for (var i = 0; i < pk.length; i++) pk[i] = secretKey[32+i];
  return {publicKey: pk, secretKey: new Uint8Array(secretKey)};
};

nacl.sign.keyPair.fromSeed = function(seed) {
  checkArrayTypes(seed);
  if (seed.length !== crypto_sign_SEEDBYTES)
    throw new Error('bad seed size');
  var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES);
  var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES);
  for (var i = 0; i < 32; i++) sk[i] = seed[i];
  crypto_sign_keypair(pk, sk, true);
  return {publicKey: pk, secretKey: sk};
};

nacl.sign.publicKeyLength = crypto_sign_PUBLICKEYBYTES;
nacl.sign.secretKeyLength = crypto_sign_SECRETKEYBYTES;
nacl.sign.seedLength = crypto_sign_SEEDBYTES;
nacl.sign.signatureLength = crypto_sign_BYTES;

nacl.hash = function(msg) {
  checkArrayTypes(msg);
  var h = new Uint8Array(crypto_hash_BYTES);
  crypto_hash(h, msg, msg.length);
  return h;
};

nacl.hash.hashLength = crypto_hash_BYTES;

nacl.verify = function(x, y) {
  checkArrayTypes(x, y);
  // Zero length arguments are considered not equal.
  if (x.length === 0 || y.length === 0) return false;
  if (x.length !== y.length) return false;
  return (vn(x, 0, y, 0, x.length) === 0) ? true : false;
};

nacl.setPRNG = function(fn) {
  randombytes = fn;
};

(function() {
  // Initialize PRNG if environment provides CSPRNG.
  // If not, methods calling randombytes will throw.
  var crypto = typeof self !== 'undefined' ? (self.crypto || self.msCrypto) : null;
  if (crypto && crypto.getRandomValues) {
    // Browsers.
    var QUOTA = 65536;
    nacl.setPRNG(function(x, n) {
      var i, v = new Uint8Array(n);
      for (i = 0; i < n; i += QUOTA) {
        crypto.getRandomValues(v.subarray(i, i + Math.min(n - i, QUOTA)));
      }
      for (i = 0; i < n; i++) x[i] = v[i];
      cleanup(v);
    });
  } else if (typeof commonjsRequire !== 'undefined') {
    // Node.js.
    crypto = require$$0;
    if (crypto && crypto.randomBytes) {
      nacl.setPRNG(function(x, n) {
        var i, v = crypto.randomBytes(n);
        for (i = 0; i < n; i++) x[i] = v[i];
        cleanup(v);
      });
    }
  }
})();

})(module.exports ? module.exports : (self.nacl = self.nacl || {}));
});

class SignedTransaction {
}

class TransactionUtil {
    static signTransaction(transaction, privateKey) {
        if (privateKey) {
            if (privateKey.startsWith("0x"))
                privateKey = privateKey.substring(2);
        }
        const rlpOutput = this.rlpEncode(transaction);
        const hash = CryptoUtil.blake2b256(rlpOutput);
        const privateKeyBuff = CryptoUtil.hex2ua(privateKey);
        const keyPair = naclFast.sign.keyPair.fromSecretKey(privateKeyBuff);
        const signature = naclFast.sign.detached(hash, keyPair.secretKey);
        if (naclFast.sign.detached.verify(hash, signature, keyPair.publicKey) === false) {
            throw new Error('Could not verify signature.');
        }
        let aionPubSigLen = naclFast.sign.publicKeyLength + naclFast.sign.signatureLength;
        const aionPubSig = CryptoUtil.concatBuffer(keyPair.publicKey, signature, aionPubSigLen);
        const rawTx = aionRlp.decode(rlpOutput).concat(Buffer$1.from(aionPubSig));
        const rawTransaction = aionRlp.encode(rawTx);
        const rawTransactionHash = CryptoUtil.uia2hex(rawTransaction);
        console.log(rawTransactionHash);
        let signedTransaction = new SignedTransaction();
        signedTransaction.messageHash = CryptoUtil.uia2hex(hash);
        signedTransaction.signature = CryptoUtil.uia2hex(aionPubSig);
        signedTransaction.rawTransaction = CryptoUtil.uia2hex(rawTransaction);
        signedTransaction.input = transaction;
        return signedTransaction;
    }
    static verifyAndEncodedSignTransaction(transaction, rlpEncoded, signature, publicKey) {
        const hash = CryptoUtil.blake2b256(rlpEncoded);
        if (naclFast.sign.detached.verify(hash, signature, publicKey) === false) {
            console.log("Could not verify the signature from ledger");
        }
        let aionPubSigLen = naclFast.sign.publicKeyLength + naclFast.sign.signatureLength;
        const aionPubSig = CryptoUtil.concatBuffer(publicKey, signature, aionPubSigLen);
        const rawTx = aionRlp.decode(rlpEncoded).concat(Buffer$1.from(aionPubSig));
        const rawTransaction = aionRlp.encode(rawTx);
        const rawTransactionHash = CryptoUtil.uia2hex(rawTransaction);
        console.log(rawTransactionHash);
        let signedTransaction = new SignedTransaction();
        signedTransaction.messageHash = CryptoUtil.uia2hex(hash);
        signedTransaction.signature = CryptoUtil.uia2hex(aionPubSig);
        signedTransaction.rawTransaction = CryptoUtil.uia2hex(rawTransaction);
        signedTransaction.input = transaction;
        return signedTransaction;
    }
    static rlpEncode(transaction) {
        const txArray = new Array();
        if (transaction.to) {
            transaction.to = transaction.to.toLowerCase();
            if (!transaction.to.startsWith("0x"))
                transaction.to = "0x" + transaction.to;
        }
        txArray.push(new bn(transaction.nonce));
        txArray.push(transaction.to);
        txArray.push(transaction.value);
        txArray.push(transaction.data);
        if (transaction.timestamp !== 0)
            txArray.push(transaction.timestamp);
        else {
            transaction.timestamp = Date.now() * 1000;
            txArray.push(transaction.timestamp);
        }
        if (transaction.gas)
            txArray.push(new aionRlp_1(new bn(transaction.gas)));
        else {
            transaction.gas = "22000";
            txArray.push(new aionRlp_1(new bn(transaction.gas)));
        }
        if (transaction.gasPrice) {
            txArray.push(new aionRlp_1(new bn(transaction.gasPrice)));
        }
        else {
            transaction.gasPrice = this.defaultNrgPrice.toString();
            txArray.push(new aionRlp_1(new bn(transaction.gasPrice)));
        }
        if (transaction.type !== 0)
            txArray.push(transaction.type);
        else {
            transaction.type = 1;
            txArray.push(transaction.type);
        }
        const rlpOutput = aionRlp.encode(txArray);
        return rlpOutput;
    }
    static getAddress(privateKey) {
        const privateKeyBuff = CryptoUtil.hex2ua(privateKey);
        const keyPair = naclFast.sign.keyPair.fromSecretKey(privateKeyBuff);
        return [CryptoUtil.createA0Address(keyPair.publicKey), CryptoUtil.uia2hex(keyPair.publicKey)];
    }
}
TransactionUtil.defaultNrgPrice = 10000000000;
TransactionUtil.defaultNrgLimit = 22000;

class LedgerProvider {
    constructor() {
        this.path = "44'/425'/0'/0'/0'";
        this.connect();
    }
    async connect() {
        return Transport$1.create().then(_transport => {
            _transport.decorateAppAPIMethods(this, [
                "getAddress",
                "sign"
            ], "aion");
            return _transport;
        });
    }
    async unlock(progressCallback) {
        try {
            if (!this.transport)
                this.transport = await this.connect();
            let result = await this.getAddress(this.path, true, false);
            if (progressCallback)
                progressCallback(100);
            this.address = result.address;
            this.publicKey = result.publicKey;
            return [result.address, result.publicKey];
        }
        catch (e) {
            console.log("Error getting address", e);
            throw e;
        }
    }
    getAddress(path, boolDisplay, boolChaincode) {
        let paths = Util.splitPath(path);
        let buffer = new Buffer$1(1 + paths.length * 4);
        buffer[0] = paths.length;
        paths.forEach((element, index) => {
            buffer.writeUInt32BE(element, 1 + 4 * index);
        });
        return this.transport.send(0xe0, 0x02, boolDisplay ? 0x01 : 0x00, boolChaincode ? 0x01 : 0x00, buffer)
            .then(response => {
            let result = {
                publicKey: '',
                address: ''
            };
            if (response.length < 64)
                throw new Error("Invalid response for getAddress");
            let publicKeyBuff = response.slice(0, 32);
            let addressBuff = response.slice(32, 64);
            result.publicKey = CryptoUtil.uia2hex(publicKeyBuff, true);
            result.address = CryptoUtil.uia2hex(addressBuff);
            return result;
        });
    }
    async sign(transaction) {
        let rawTransaction = TransactionUtil.rlpEncode(transaction);
        let rawTxHash = CryptoUtil.uia2hex(rawTransaction, true);
        let paths = Util.splitPath(this.path);
        let offset = 0;
        let rawTx = new Buffer$1(rawTxHash, "hex");
        let toSend = [];
        let response;
        while (offset !== rawTx.length) {
            let maxChunkSize = offset === 0 ? 150 - 1 - paths.length * 4 : 150;
            let chunkSize = offset + maxChunkSize > rawTx.length
                ? rawTx.length - offset
                : maxChunkSize;
            let buffer = new Buffer$1(offset === 0 ? 1 + paths.length * 4 + chunkSize : chunkSize);
            if (offset === 0) {
                buffer[0] = paths.length;
                paths.forEach((element, index) => {
                    buffer.writeUInt32BE(element, 1 + 4 * index);
                });
                rawTx.copy(buffer, 1 + 4 * paths.length, offset, offset + chunkSize);
            }
            else {
                rawTx.copy(buffer, 0, offset, offset + chunkSize);
            }
            toSend.push(buffer);
            offset += chunkSize;
        }
        return Util.foreach(toSend, (data, i) => {
            return this.transport
                .send(0xe0, 0x04, i === 0 ? 0x00 : 0x80, 0x00, data)
                .then(apduResponse => {
                response = apduResponse;
            });
        }).then(() => {
            let signature = response.slice(0, 64);
            return TransactionUtil.verifyAndEncodedSignTransaction(transaction, rawTransaction, signature, CryptoUtil.hex2ua(this.publicKey));
        });
    }
}

class PrivateKeyWalletProvider {
    constructor(privateKey) {
        this.privateKey = privateKey;
    }
    async unlock(progressCallback) {
        try {
            let [address, publicKey] = TransactionUtil.getAddress(this.privateKey);
            this.address = address;
            this.publicKey = publicKey;
            if (progressCallback)
                progressCallback(100);
            return [address, publicKey];
        }
        catch (e) {
            console.log(e);
            throw e;
        }
    }
    async sign(transaction) {
        let mainThis = this;
        if (!mainThis.privateKey) {
            throw new Error("Can not sign a transaction with null privatekey");
        }
        let encodedSignedTxn = TransactionUtil.signTransaction(transaction, mainThis.privateKey);
        return encodedSignedTxn;
    }
}

var scrypt = createCommonjsModule(function (module, exports) {

(function(root) {
    var MAX_VALUE = 0x7fffffff;

    // The SHA256 and PBKDF2 implementation are from scrypt-async-js:
    // See: https://github.com/dchest/scrypt-async-js
    function SHA256(m) {
        var K = [
           0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b,
           0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01,
           0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7,
           0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,
           0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152,
           0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147,
           0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc,
           0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
           0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819,
           0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08,
           0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f,
           0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
           0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
       ];

        var h0 = 0x6a09e667, h1 = 0xbb67ae85, h2 = 0x3c6ef372, h3 = 0xa54ff53a;
        var h4 = 0x510e527f, h5 = 0x9b05688c, h6 = 0x1f83d9ab, h7 = 0x5be0cd19;
        var w = new Array(64);

        function blocks(p) {
            var off = 0, len = p.length;
            while (len >= 64) {
                var a = h0, b = h1, c = h2, d = h3, e = h4, f = h5, g = h6, h = h7, u, i, j, t1, t2;

                for (i = 0; i < 16; i++) {
                    j = off + i*4;
                    w[i] = ((p[j] & 0xff)<<24) | ((p[j+1] & 0xff)<<16) |
                    ((p[j+2] & 0xff)<<8) | (p[j+3] & 0xff);
                }

                for (i = 16; i < 64; i++) {
                    u = w[i-2];
                    t1 = ((u>>>17) | (u<<(32-17))) ^ ((u>>>19) | (u<<(32-19))) ^ (u>>>10);

                    u = w[i-15];
                    t2 = ((u>>>7) | (u<<(32-7))) ^ ((u>>>18) | (u<<(32-18))) ^ (u>>>3);

                    w[i] = (((t1 + w[i-7]) | 0) + ((t2 + w[i-16]) | 0)) | 0;
                }

                for (i = 0; i < 64; i++) {
                    t1 = ((((((e>>>6) | (e<<(32-6))) ^ ((e>>>11) | (e<<(32-11))) ^
                             ((e>>>25) | (e<<(32-25)))) + ((e & f) ^ (~e & g))) | 0) +
                          ((h + ((K[i] + w[i]) | 0)) | 0)) | 0;

                    t2 = ((((a>>>2) | (a<<(32-2))) ^ ((a>>>13) | (a<<(32-13))) ^
                           ((a>>>22) | (a<<(32-22)))) + ((a & b) ^ (a & c) ^ (b & c))) | 0;

                    h = g;
                    g = f;
                    f = e;
                    e = (d + t1) | 0;
                    d = c;
                    c = b;
                    b = a;
                    a = (t1 + t2) | 0;
                }

                h0 = (h0 + a) | 0;
                h1 = (h1 + b) | 0;
                h2 = (h2 + c) | 0;
                h3 = (h3 + d) | 0;
                h4 = (h4 + e) | 0;
                h5 = (h5 + f) | 0;
                h6 = (h6 + g) | 0;
                h7 = (h7 + h) | 0;

                off += 64;
                len -= 64;
            }
        }

        blocks(m);

        var i, bytesLeft = m.length % 64,
        bitLenHi = (m.length / 0x20000000) | 0,
        bitLenLo = m.length << 3,
        numZeros = (bytesLeft < 56) ? 56 : 120,
        p = m.slice(m.length - bytesLeft, m.length);

        p.push(0x80);
        for (i = bytesLeft + 1; i < numZeros; i++) { p.push(0); }
        p.push((bitLenHi>>>24) & 0xff);
        p.push((bitLenHi>>>16) & 0xff);
        p.push((bitLenHi>>>8)  & 0xff);
        p.push((bitLenHi>>>0)  & 0xff);
        p.push((bitLenLo>>>24) & 0xff);
        p.push((bitLenLo>>>16) & 0xff);
        p.push((bitLenLo>>>8)  & 0xff);
        p.push((bitLenLo>>>0)  & 0xff);

        blocks(p);

        return [
            (h0>>>24) & 0xff, (h0>>>16) & 0xff, (h0>>>8) & 0xff, (h0>>>0) & 0xff,
            (h1>>>24) & 0xff, (h1>>>16) & 0xff, (h1>>>8) & 0xff, (h1>>>0) & 0xff,
            (h2>>>24) & 0xff, (h2>>>16) & 0xff, (h2>>>8) & 0xff, (h2>>>0) & 0xff,
            (h3>>>24) & 0xff, (h3>>>16) & 0xff, (h3>>>8) & 0xff, (h3>>>0) & 0xff,
            (h4>>>24) & 0xff, (h4>>>16) & 0xff, (h4>>>8) & 0xff, (h4>>>0) & 0xff,
            (h5>>>24) & 0xff, (h5>>>16) & 0xff, (h5>>>8) & 0xff, (h5>>>0) & 0xff,
            (h6>>>24) & 0xff, (h6>>>16) & 0xff, (h6>>>8) & 0xff, (h6>>>0) & 0xff,
            (h7>>>24) & 0xff, (h7>>>16) & 0xff, (h7>>>8) & 0xff, (h7>>>0) & 0xff
        ];
    }

    function PBKDF2_HMAC_SHA256_OneIter(password, salt, dkLen) {
        // compress password if it's longer than hash block length
        password = password.length <= 64 ? password : SHA256(password);

        var i;
        var innerLen = 64 + salt.length + 4;
        var inner = new Array(innerLen);
        var outerKey = new Array(64);
        var dk = [];

        // inner = (password ^ ipad) || salt || counter
        for (i = 0; i < 64; i++) inner[i] = 0x36;
        for (i = 0; i < password.length; i++) inner[i] ^= password[i];
        for (i = 0; i < salt.length; i++) inner[64+i] = salt[i];
        for (i = innerLen - 4; i < innerLen; i++) inner[i] = 0;

        // outerKey = password ^ opad
        for (i = 0; i < 64; i++) outerKey[i] = 0x5c;
        for (i = 0; i < password.length; i++) outerKey[i] ^= password[i];

        // increments counter inside inner
        function incrementCounter() {
            for (var i = innerLen-1; i >= innerLen-4; i--) {
                inner[i]++;
                if (inner[i] <= 0xff) return;
                inner[i] = 0;
            }
        }

        // output blocks = SHA256(outerKey || SHA256(inner)) ...
        while (dkLen >= 32) {
            incrementCounter();
            dk = dk.concat(SHA256(outerKey.concat(SHA256(inner))));
            dkLen -= 32;
        }
        if (dkLen > 0) {
            incrementCounter();
            dk = dk.concat(SHA256(outerKey.concat(SHA256(inner))).slice(0, dkLen));
        }

        return dk;
    }

    // The following is an adaptation of scryptsy
    // See: https://www.npmjs.com/package/scryptsy
    function blockmix_salsa8(BY, Yi, r, x, _X) {
        var i;

        arraycopy(BY, (2 * r - 1) * 16, _X, 0, 16);
        for (i = 0; i < 2 * r; i++) {
            blockxor(BY, i * 16, _X, 16);
            salsa20_8(_X, x);
            arraycopy(_X, 0, BY, Yi + (i * 16), 16);
        }

        for (i = 0; i < r; i++) {
            arraycopy(BY, Yi + (i * 2) * 16, BY, (i * 16), 16);
        }

        for (i = 0; i < r; i++) {
            arraycopy(BY, Yi + (i * 2 + 1) * 16, BY, (i + r) * 16, 16);
        }
    }

    function R(a, b) {
        return (a << b) | (a >>> (32 - b));
    }

    function salsa20_8(B, x) {
        arraycopy(B, 0, x, 0, 16);

        for (var i = 8; i > 0; i -= 2) {
            x[ 4] ^= R(x[ 0] + x[12], 7);
            x[ 8] ^= R(x[ 4] + x[ 0], 9);
            x[12] ^= R(x[ 8] + x[ 4], 13);
            x[ 0] ^= R(x[12] + x[ 8], 18);
            x[ 9] ^= R(x[ 5] + x[ 1], 7);
            x[13] ^= R(x[ 9] + x[ 5], 9);
            x[ 1] ^= R(x[13] + x[ 9], 13);
            x[ 5] ^= R(x[ 1] + x[13], 18);
            x[14] ^= R(x[10] + x[ 6], 7);
            x[ 2] ^= R(x[14] + x[10], 9);
            x[ 6] ^= R(x[ 2] + x[14], 13);
            x[10] ^= R(x[ 6] + x[ 2], 18);
            x[ 3] ^= R(x[15] + x[11], 7);
            x[ 7] ^= R(x[ 3] + x[15], 9);
            x[11] ^= R(x[ 7] + x[ 3], 13);
            x[15] ^= R(x[11] + x[ 7], 18);
            x[ 1] ^= R(x[ 0] + x[ 3], 7);
            x[ 2] ^= R(x[ 1] + x[ 0], 9);
            x[ 3] ^= R(x[ 2] + x[ 1], 13);
            x[ 0] ^= R(x[ 3] + x[ 2], 18);
            x[ 6] ^= R(x[ 5] + x[ 4], 7);
            x[ 7] ^= R(x[ 6] + x[ 5], 9);
            x[ 4] ^= R(x[ 7] + x[ 6], 13);
            x[ 5] ^= R(x[ 4] + x[ 7], 18);
            x[11] ^= R(x[10] + x[ 9], 7);
            x[ 8] ^= R(x[11] + x[10], 9);
            x[ 9] ^= R(x[ 8] + x[11], 13);
            x[10] ^= R(x[ 9] + x[ 8], 18);
            x[12] ^= R(x[15] + x[14], 7);
            x[13] ^= R(x[12] + x[15], 9);
            x[14] ^= R(x[13] + x[12], 13);
            x[15] ^= R(x[14] + x[13], 18);
        }

        for (i = 0; i < 16; ++i) {
            B[i] += x[i];
        }
    }

    // naive approach... going back to loop unrolling may yield additional performance
    function blockxor(S, Si, D, len) {
        for (var i = 0; i < len; i++) {
            D[i] ^= S[Si + i];
        }
    }

    function arraycopy(src, srcPos, dest, destPos, length) {
        while (length--) {
            dest[destPos++] = src[srcPos++];
        }
    }

    function checkBufferish(o) {
        if (!o || typeof(o.length) !== 'number') {
            return false;
        }
        for (var i = 0; i < o.length; i++) {
            if (typeof(o[i]) !== 'number') { return false; }

            var v = parseInt(o[i]);
            if (v != o[i] || v < 0 || v >= 256) {
                return false;
            }
        }
        return true;
    }

    function ensureInteger(value, name) {
        var intValue = parseInt(value);
        if (value != intValue) { throw new Error('invalid ' + name); }
        return intValue;
    }

    // N = Cpu cost, r = Memory cost, p = parallelization cost
    // callback(error, progress, key)
    function scrypt(password, salt, N, r, p, dkLen, callback) {

        if (!callback) { throw new Error('missing callback'); }

        N = ensureInteger(N, 'N');
        r = ensureInteger(r, 'r');
        p = ensureInteger(p, 'p');

        dkLen = ensureInteger(dkLen, 'dkLen');

        if (N === 0 || (N & (N - 1)) !== 0) { throw new Error('N must be power of 2'); }

        if (N > MAX_VALUE / 128 / r) { throw new Error('N too large'); }
        if (r > MAX_VALUE / 128 / p) { throw new Error('r too large'); }

        if (!checkBufferish(password)) {
            throw new Error('password must be an array or buffer');
        }
        password = Array.prototype.slice.call(password);

        if (!checkBufferish(salt)) {
            throw new Error('salt must be an array or buffer');
        }
        salt = Array.prototype.slice.call(salt);

        var b = PBKDF2_HMAC_SHA256_OneIter(password, salt, p * 128 * r);
        var B = new Uint32Array(p * 32 * r);
        for (var i = 0; i < B.length; i++) {
            var j = i * 4;
            B[i] = ((b[j + 3] & 0xff) << 24) |
                   ((b[j + 2] & 0xff) << 16) |
                   ((b[j + 1] & 0xff) << 8) |
                   ((b[j + 0] & 0xff) << 0);
        }

        var XY = new Uint32Array(64 * r);
        var V = new Uint32Array(32 * r * N);

        var Yi = 32 * r;

        // scratch space
        var x = new Uint32Array(16);       // salsa20_8
        var _X = new Uint32Array(16);      // blockmix_salsa8

        var totalOps = p * N * 2;
        var currentOp = 0;
        var lastPercent10 = null;

        // Set this to true to abandon the scrypt on the next step
        var stop = false;

        // State information
        var state = 0;
        var i0 = 0, i1;
        var Bi;

        // How many blockmix_salsa8 can we do per step?
        var limit = parseInt(1000 / r);

        // Trick from scrypt-async; if there is a setImmediate shim in place, use it
        var nextTick = (typeof(setImmediate) !== 'undefined') ? setImmediate : setTimeout;

        // This is really all I changed; making scryptsy a state machine so we occasionally
        // stop and give other evnts on the evnt loop a chance to run. ~RicMoo
        var incrementalSMix = function() {
            if (stop) {
                return callback(new Error('cancelled'), currentOp / totalOps);
            }

            switch (state) {
                case 0:
                    // for (var i = 0; i < p; i++)...
                    Bi = i0 * 32 * r;

                    arraycopy(B, Bi, XY, 0, Yi);                       // ROMix - 1

                    state = 1;                                         // Move to ROMix 2
                    i1 = 0;

                    // Fall through

                case 1:

                    // Run up to 1000 steps of the first inner smix loop
                    var steps = N - i1;
                    if (steps > limit) { steps = limit; }
                    for (var i = 0; i < steps; i++) {                  // ROMix - 2
                        arraycopy(XY, 0, V, (i1 + i) * Yi, Yi);         // ROMix - 3
                        blockmix_salsa8(XY, Yi, r, x, _X);             // ROMix - 4
                    }

                    // for (var i = 0; i < N; i++)
                    i1 += steps;
                    currentOp += steps;

                    // Call the callback with the progress (optionally stopping us)
                    var percent10 = parseInt(1000 * currentOp / totalOps);
                    if (percent10 !== lastPercent10) {
                        stop = callback(null, currentOp / totalOps);
                        if (stop) { break; }
                        lastPercent10 = percent10;
                    }

                    if (i1 < N) {
                        break;
                    }

                    i1 = 0;                                          // Move to ROMix 6
                    state = 2;

                    // Fall through

                case 2:

                    // Run up to 1000 steps of the second inner smix loop
                    var steps = N - i1;
                    if (steps > limit) { steps = limit; }
                    for (var i = 0; i < steps; i++) {                // ROMix - 6
                        var offset = (2 * r - 1) * 16;               // ROMix - 7
                        var j = XY[offset] & (N - 1);
                        blockxor(V, j * Yi, XY, Yi);                 // ROMix - 8 (inner)
                        blockmix_salsa8(XY, Yi, r, x, _X);           // ROMix - 9 (outer)
                    }

                    // for (var i = 0; i < N; i++)...
                    i1 += steps;
                    currentOp += steps;

                    // Call the callback with the progress (optionally stopping us)
                    var percent10 = parseInt(1000 * currentOp / totalOps);
                    if (percent10 !== lastPercent10) {
                        stop = callback(null, currentOp / totalOps);
                        if (stop) { break; }
                        lastPercent10 = percent10;
                    }

                    if (i1 < N) {
                        break;
                    }

                    arraycopy(XY, 0, B, Bi, Yi);                     // ROMix - 10

                    // for (var i = 0; i < p; i++)...
                    i0++;
                    if (i0 < p) {
                        state = 0;
                        break;
                    }

                    b = [];
                    for (var i = 0; i < B.length; i++) {
                        b.push((B[i] >>  0) & 0xff);
                        b.push((B[i] >>  8) & 0xff);
                        b.push((B[i] >> 16) & 0xff);
                        b.push((B[i] >> 24) & 0xff);
                    }

                    var derivedKey = PBKDF2_HMAC_SHA256_OneIter(password, b, dkLen);

                    // Done; don't break (which would reschedule)
                    return callback(null, 1.0, derivedKey);
                }

                // Schedule the next steps
                nextTick(incrementalSMix);
            };

            // Bootstrap the incremental smix
            incrementalSMix();
    }

    // node.js
    {
       module.exports = scrypt;

    // RequireJS/AMD
    // http://www.requirejs.org/docs/api.html
    // https://github.com/amdjs/amdjs-api/wiki/AMD
    }

})(commonjsGlobal);
});

var aesJs = createCommonjsModule(function (module, exports) {
(function(root) {

    function checkInt(value) {
        return (parseInt(value) === value);
    }

    function checkInts(arrayish) {
        if (!checkInt(arrayish.length)) { return false; }

        for (var i = 0; i < arrayish.length; i++) {
            if (!checkInt(arrayish[i]) || arrayish[i] < 0 || arrayish[i] > 255) {
                return false;
            }
        }

        return true;
    }

    function coerceArray(arg, copy) {

        // ArrayBuffer view
        if (arg.buffer && ArrayBuffer.isView(arg) && arg.name === 'Uint8Array') {

            if (copy) {
                if (arg.slice) {
                    arg = arg.slice();
                } else {
                    arg = Array.prototype.slice.call(arg);
                }
            }

            return arg;
        }

        // It's an array; check it is a valid representation of a byte
        if (Array.isArray(arg)) {
            if (!checkInts(arg)) {
                throw new Error('Array contains invalid value: ' + arg);
            }

            return new Uint8Array(arg);
        }

        // Something else, but behaves like an array (maybe a Buffer? Arguments?)
        if (checkInt(arg.length) && checkInts(arg)) {
            return new Uint8Array(arg);
        }

        throw new Error('unsupported array-like object');
    }

    function createArray(length) {
        return new Uint8Array(length);
    }

    function copyArray(sourceArray, targetArray, targetStart, sourceStart, sourceEnd) {
        if (sourceStart != null || sourceEnd != null) {
            if (sourceArray.slice) {
                sourceArray = sourceArray.slice(sourceStart, sourceEnd);
            } else {
                sourceArray = Array.prototype.slice.call(sourceArray, sourceStart, sourceEnd);
            }
        }
        targetArray.set(sourceArray, targetStart);
    }



    var convertUtf8 = (function() {
        function toBytes(text) {
            var result = [], i = 0;
            text = encodeURI(text);
            while (i < text.length) {
                var c = text.charCodeAt(i++);

                // if it is a % sign, encode the following 2 bytes as a hex value
                if (c === 37) {
                    result.push(parseInt(text.substr(i, 2), 16));
                    i += 2;

                // otherwise, just the actual byte
                } else {
                    result.push(c);
                }
            }

            return coerceArray(result);
        }

        function fromBytes(bytes) {
            var result = [], i = 0;

            while (i < bytes.length) {
                var c = bytes[i];

                if (c < 128) {
                    result.push(String.fromCharCode(c));
                    i++;
                } else if (c > 191 && c < 224) {
                    result.push(String.fromCharCode(((c & 0x1f) << 6) | (bytes[i + 1] & 0x3f)));
                    i += 2;
                } else {
                    result.push(String.fromCharCode(((c & 0x0f) << 12) | ((bytes[i + 1] & 0x3f) << 6) | (bytes[i + 2] & 0x3f)));
                    i += 3;
                }
            }

            return result.join('');
        }

        return {
            toBytes: toBytes,
            fromBytes: fromBytes,
        }
    })();

    var convertHex = (function() {
        function toBytes(text) {
            var result = [];
            for (var i = 0; i < text.length; i += 2) {
                result.push(parseInt(text.substr(i, 2), 16));
            }

            return result;
        }

        // http://ixti.net/development/javascript/2011/11/11/base64-encodedecode-of-utf8-in-browser-with-js.html
        var Hex = '0123456789abcdef';

        function fromBytes(bytes) {
                var result = [];
                for (var i = 0; i < bytes.length; i++) {
                    var v = bytes[i];
                    result.push(Hex[(v & 0xf0) >> 4] + Hex[v & 0x0f]);
                }
                return result.join('');
        }

        return {
            toBytes: toBytes,
            fromBytes: fromBytes,
        }
    })();


    // Number of rounds by keysize
    var numberOfRounds = {16: 10, 24: 12, 32: 14};

    // Round constant words
    var rcon = [0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91];

    // S-box and Inverse S-box (S is for Substitution)
    var S = [0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15, 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75, 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf, 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8, 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2, 0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73, 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb, 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79, 0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08, 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a, 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e, 0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf, 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16];
    var Si =[0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38, 0xbf, 0x40, 0xa3, 0x9e, 0x81, 0xf3, 0xd7, 0xfb, 0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87, 0x34, 0x8e, 0x43, 0x44, 0xc4, 0xde, 0xe9, 0xcb, 0x54, 0x7b, 0x94, 0x32, 0xa6, 0xc2, 0x23, 0x3d, 0xee, 0x4c, 0x95, 0x0b, 0x42, 0xfa, 0xc3, 0x4e, 0x08, 0x2e, 0xa1, 0x66, 0x28, 0xd9, 0x24, 0xb2, 0x76, 0x5b, 0xa2, 0x49, 0x6d, 0x8b, 0xd1, 0x25, 0x72, 0xf8, 0xf6, 0x64, 0x86, 0x68, 0x98, 0x16, 0xd4, 0xa4, 0x5c, 0xcc, 0x5d, 0x65, 0xb6, 0x92, 0x6c, 0x70, 0x48, 0x50, 0xfd, 0xed, 0xb9, 0xda, 0x5e, 0x15, 0x46, 0x57, 0xa7, 0x8d, 0x9d, 0x84, 0x90, 0xd8, 0xab, 0x00, 0x8c, 0xbc, 0xd3, 0x0a, 0xf7, 0xe4, 0x58, 0x05, 0xb8, 0xb3, 0x45, 0x06, 0xd0, 0x2c, 0x1e, 0x8f, 0xca, 0x3f, 0x0f, 0x02, 0xc1, 0xaf, 0xbd, 0x03, 0x01, 0x13, 0x8a, 0x6b, 0x3a, 0x91, 0x11, 0x41, 0x4f, 0x67, 0xdc, 0xea, 0x97, 0xf2, 0xcf, 0xce, 0xf0, 0xb4, 0xe6, 0x73, 0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85, 0xe2, 0xf9, 0x37, 0xe8, 0x1c, 0x75, 0xdf, 0x6e, 0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89, 0x6f, 0xb7, 0x62, 0x0e, 0xaa, 0x18, 0xbe, 0x1b, 0xfc, 0x56, 0x3e, 0x4b, 0xc6, 0xd2, 0x79, 0x20, 0x9a, 0xdb, 0xc0, 0xfe, 0x78, 0xcd, 0x5a, 0xf4, 0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31, 0xb1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xec, 0x5f, 0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d, 0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef, 0xa0, 0xe0, 0x3b, 0x4d, 0xae, 0x2a, 0xf5, 0xb0, 0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61, 0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d];

    // Transformations for encryption
    var T1 = [0xc66363a5, 0xf87c7c84, 0xee777799, 0xf67b7b8d, 0xfff2f20d, 0xd66b6bbd, 0xde6f6fb1, 0x91c5c554, 0x60303050, 0x02010103, 0xce6767a9, 0x562b2b7d, 0xe7fefe19, 0xb5d7d762, 0x4dababe6, 0xec76769a, 0x8fcaca45, 0x1f82829d, 0x89c9c940, 0xfa7d7d87, 0xeffafa15, 0xb25959eb, 0x8e4747c9, 0xfbf0f00b, 0x41adadec, 0xb3d4d467, 0x5fa2a2fd, 0x45afafea, 0x239c9cbf, 0x53a4a4f7, 0xe4727296, 0x9bc0c05b, 0x75b7b7c2, 0xe1fdfd1c, 0x3d9393ae, 0x4c26266a, 0x6c36365a, 0x7e3f3f41, 0xf5f7f702, 0x83cccc4f, 0x6834345c, 0x51a5a5f4, 0xd1e5e534, 0xf9f1f108, 0xe2717193, 0xabd8d873, 0x62313153, 0x2a15153f, 0x0804040c, 0x95c7c752, 0x46232365, 0x9dc3c35e, 0x30181828, 0x379696a1, 0x0a05050f, 0x2f9a9ab5, 0x0e070709, 0x24121236, 0x1b80809b, 0xdfe2e23d, 0xcdebeb26, 0x4e272769, 0x7fb2b2cd, 0xea75759f, 0x1209091b, 0x1d83839e, 0x582c2c74, 0x341a1a2e, 0x361b1b2d, 0xdc6e6eb2, 0xb45a5aee, 0x5ba0a0fb, 0xa45252f6, 0x763b3b4d, 0xb7d6d661, 0x7db3b3ce, 0x5229297b, 0xdde3e33e, 0x5e2f2f71, 0x13848497, 0xa65353f5, 0xb9d1d168, 0x00000000, 0xc1eded2c, 0x40202060, 0xe3fcfc1f, 0x79b1b1c8, 0xb65b5bed, 0xd46a6abe, 0x8dcbcb46, 0x67bebed9, 0x7239394b, 0x944a4ade, 0x984c4cd4, 0xb05858e8, 0x85cfcf4a, 0xbbd0d06b, 0xc5efef2a, 0x4faaaae5, 0xedfbfb16, 0x864343c5, 0x9a4d4dd7, 0x66333355, 0x11858594, 0x8a4545cf, 0xe9f9f910, 0x04020206, 0xfe7f7f81, 0xa05050f0, 0x783c3c44, 0x259f9fba, 0x4ba8a8e3, 0xa25151f3, 0x5da3a3fe, 0x804040c0, 0x058f8f8a, 0x3f9292ad, 0x219d9dbc, 0x70383848, 0xf1f5f504, 0x63bcbcdf, 0x77b6b6c1, 0xafdada75, 0x42212163, 0x20101030, 0xe5ffff1a, 0xfdf3f30e, 0xbfd2d26d, 0x81cdcd4c, 0x180c0c14, 0x26131335, 0xc3ecec2f, 0xbe5f5fe1, 0x359797a2, 0x884444cc, 0x2e171739, 0x93c4c457, 0x55a7a7f2, 0xfc7e7e82, 0x7a3d3d47, 0xc86464ac, 0xba5d5de7, 0x3219192b, 0xe6737395, 0xc06060a0, 0x19818198, 0x9e4f4fd1, 0xa3dcdc7f, 0x44222266, 0x542a2a7e, 0x3b9090ab, 0x0b888883, 0x8c4646ca, 0xc7eeee29, 0x6bb8b8d3, 0x2814143c, 0xa7dede79, 0xbc5e5ee2, 0x160b0b1d, 0xaddbdb76, 0xdbe0e03b, 0x64323256, 0x743a3a4e, 0x140a0a1e, 0x924949db, 0x0c06060a, 0x4824246c, 0xb85c5ce4, 0x9fc2c25d, 0xbdd3d36e, 0x43acacef, 0xc46262a6, 0x399191a8, 0x319595a4, 0xd3e4e437, 0xf279798b, 0xd5e7e732, 0x8bc8c843, 0x6e373759, 0xda6d6db7, 0x018d8d8c, 0xb1d5d564, 0x9c4e4ed2, 0x49a9a9e0, 0xd86c6cb4, 0xac5656fa, 0xf3f4f407, 0xcfeaea25, 0xca6565af, 0xf47a7a8e, 0x47aeaee9, 0x10080818, 0x6fbabad5, 0xf0787888, 0x4a25256f, 0x5c2e2e72, 0x381c1c24, 0x57a6a6f1, 0x73b4b4c7, 0x97c6c651, 0xcbe8e823, 0xa1dddd7c, 0xe874749c, 0x3e1f1f21, 0x964b4bdd, 0x61bdbddc, 0x0d8b8b86, 0x0f8a8a85, 0xe0707090, 0x7c3e3e42, 0x71b5b5c4, 0xcc6666aa, 0x904848d8, 0x06030305, 0xf7f6f601, 0x1c0e0e12, 0xc26161a3, 0x6a35355f, 0xae5757f9, 0x69b9b9d0, 0x17868691, 0x99c1c158, 0x3a1d1d27, 0x279e9eb9, 0xd9e1e138, 0xebf8f813, 0x2b9898b3, 0x22111133, 0xd26969bb, 0xa9d9d970, 0x078e8e89, 0x339494a7, 0x2d9b9bb6, 0x3c1e1e22, 0x15878792, 0xc9e9e920, 0x87cece49, 0xaa5555ff, 0x50282878, 0xa5dfdf7a, 0x038c8c8f, 0x59a1a1f8, 0x09898980, 0x1a0d0d17, 0x65bfbfda, 0xd7e6e631, 0x844242c6, 0xd06868b8, 0x824141c3, 0x299999b0, 0x5a2d2d77, 0x1e0f0f11, 0x7bb0b0cb, 0xa85454fc, 0x6dbbbbd6, 0x2c16163a];
    var T2 = [0xa5c66363, 0x84f87c7c, 0x99ee7777, 0x8df67b7b, 0x0dfff2f2, 0xbdd66b6b, 0xb1de6f6f, 0x5491c5c5, 0x50603030, 0x03020101, 0xa9ce6767, 0x7d562b2b, 0x19e7fefe, 0x62b5d7d7, 0xe64dabab, 0x9aec7676, 0x458fcaca, 0x9d1f8282, 0x4089c9c9, 0x87fa7d7d, 0x15effafa, 0xebb25959, 0xc98e4747, 0x0bfbf0f0, 0xec41adad, 0x67b3d4d4, 0xfd5fa2a2, 0xea45afaf, 0xbf239c9c, 0xf753a4a4, 0x96e47272, 0x5b9bc0c0, 0xc275b7b7, 0x1ce1fdfd, 0xae3d9393, 0x6a4c2626, 0x5a6c3636, 0x417e3f3f, 0x02f5f7f7, 0x4f83cccc, 0x5c683434, 0xf451a5a5, 0x34d1e5e5, 0x08f9f1f1, 0x93e27171, 0x73abd8d8, 0x53623131, 0x3f2a1515, 0x0c080404, 0x5295c7c7, 0x65462323, 0x5e9dc3c3, 0x28301818, 0xa1379696, 0x0f0a0505, 0xb52f9a9a, 0x090e0707, 0x36241212, 0x9b1b8080, 0x3ddfe2e2, 0x26cdebeb, 0x694e2727, 0xcd7fb2b2, 0x9fea7575, 0x1b120909, 0x9e1d8383, 0x74582c2c, 0x2e341a1a, 0x2d361b1b, 0xb2dc6e6e, 0xeeb45a5a, 0xfb5ba0a0, 0xf6a45252, 0x4d763b3b, 0x61b7d6d6, 0xce7db3b3, 0x7b522929, 0x3edde3e3, 0x715e2f2f, 0x97138484, 0xf5a65353, 0x68b9d1d1, 0x00000000, 0x2cc1eded, 0x60402020, 0x1fe3fcfc, 0xc879b1b1, 0xedb65b5b, 0xbed46a6a, 0x468dcbcb, 0xd967bebe, 0x4b723939, 0xde944a4a, 0xd4984c4c, 0xe8b05858, 0x4a85cfcf, 0x6bbbd0d0, 0x2ac5efef, 0xe54faaaa, 0x16edfbfb, 0xc5864343, 0xd79a4d4d, 0x55663333, 0x94118585, 0xcf8a4545, 0x10e9f9f9, 0x06040202, 0x81fe7f7f, 0xf0a05050, 0x44783c3c, 0xba259f9f, 0xe34ba8a8, 0xf3a25151, 0xfe5da3a3, 0xc0804040, 0x8a058f8f, 0xad3f9292, 0xbc219d9d, 0x48703838, 0x04f1f5f5, 0xdf63bcbc, 0xc177b6b6, 0x75afdada, 0x63422121, 0x30201010, 0x1ae5ffff, 0x0efdf3f3, 0x6dbfd2d2, 0x4c81cdcd, 0x14180c0c, 0x35261313, 0x2fc3ecec, 0xe1be5f5f, 0xa2359797, 0xcc884444, 0x392e1717, 0x5793c4c4, 0xf255a7a7, 0x82fc7e7e, 0x477a3d3d, 0xacc86464, 0xe7ba5d5d, 0x2b321919, 0x95e67373, 0xa0c06060, 0x98198181, 0xd19e4f4f, 0x7fa3dcdc, 0x66442222, 0x7e542a2a, 0xab3b9090, 0x830b8888, 0xca8c4646, 0x29c7eeee, 0xd36bb8b8, 0x3c281414, 0x79a7dede, 0xe2bc5e5e, 0x1d160b0b, 0x76addbdb, 0x3bdbe0e0, 0x56643232, 0x4e743a3a, 0x1e140a0a, 0xdb924949, 0x0a0c0606, 0x6c482424, 0xe4b85c5c, 0x5d9fc2c2, 0x6ebdd3d3, 0xef43acac, 0xa6c46262, 0xa8399191, 0xa4319595, 0x37d3e4e4, 0x8bf27979, 0x32d5e7e7, 0x438bc8c8, 0x596e3737, 0xb7da6d6d, 0x8c018d8d, 0x64b1d5d5, 0xd29c4e4e, 0xe049a9a9, 0xb4d86c6c, 0xfaac5656, 0x07f3f4f4, 0x25cfeaea, 0xafca6565, 0x8ef47a7a, 0xe947aeae, 0x18100808, 0xd56fbaba, 0x88f07878, 0x6f4a2525, 0x725c2e2e, 0x24381c1c, 0xf157a6a6, 0xc773b4b4, 0x5197c6c6, 0x23cbe8e8, 0x7ca1dddd, 0x9ce87474, 0x213e1f1f, 0xdd964b4b, 0xdc61bdbd, 0x860d8b8b, 0x850f8a8a, 0x90e07070, 0x427c3e3e, 0xc471b5b5, 0xaacc6666, 0xd8904848, 0x05060303, 0x01f7f6f6, 0x121c0e0e, 0xa3c26161, 0x5f6a3535, 0xf9ae5757, 0xd069b9b9, 0x91178686, 0x5899c1c1, 0x273a1d1d, 0xb9279e9e, 0x38d9e1e1, 0x13ebf8f8, 0xb32b9898, 0x33221111, 0xbbd26969, 0x70a9d9d9, 0x89078e8e, 0xa7339494, 0xb62d9b9b, 0x223c1e1e, 0x92158787, 0x20c9e9e9, 0x4987cece, 0xffaa5555, 0x78502828, 0x7aa5dfdf, 0x8f038c8c, 0xf859a1a1, 0x80098989, 0x171a0d0d, 0xda65bfbf, 0x31d7e6e6, 0xc6844242, 0xb8d06868, 0xc3824141, 0xb0299999, 0x775a2d2d, 0x111e0f0f, 0xcb7bb0b0, 0xfca85454, 0xd66dbbbb, 0x3a2c1616];
    var T3 = [0x63a5c663, 0x7c84f87c, 0x7799ee77, 0x7b8df67b, 0xf20dfff2, 0x6bbdd66b, 0x6fb1de6f, 0xc55491c5, 0x30506030, 0x01030201, 0x67a9ce67, 0x2b7d562b, 0xfe19e7fe, 0xd762b5d7, 0xabe64dab, 0x769aec76, 0xca458fca, 0x829d1f82, 0xc94089c9, 0x7d87fa7d, 0xfa15effa, 0x59ebb259, 0x47c98e47, 0xf00bfbf0, 0xadec41ad, 0xd467b3d4, 0xa2fd5fa2, 0xafea45af, 0x9cbf239c, 0xa4f753a4, 0x7296e472, 0xc05b9bc0, 0xb7c275b7, 0xfd1ce1fd, 0x93ae3d93, 0x266a4c26, 0x365a6c36, 0x3f417e3f, 0xf702f5f7, 0xcc4f83cc, 0x345c6834, 0xa5f451a5, 0xe534d1e5, 0xf108f9f1, 0x7193e271, 0xd873abd8, 0x31536231, 0x153f2a15, 0x040c0804, 0xc75295c7, 0x23654623, 0xc35e9dc3, 0x18283018, 0x96a13796, 0x050f0a05, 0x9ab52f9a, 0x07090e07, 0x12362412, 0x809b1b80, 0xe23ddfe2, 0xeb26cdeb, 0x27694e27, 0xb2cd7fb2, 0x759fea75, 0x091b1209, 0x839e1d83, 0x2c74582c, 0x1a2e341a, 0x1b2d361b, 0x6eb2dc6e, 0x5aeeb45a, 0xa0fb5ba0, 0x52f6a452, 0x3b4d763b, 0xd661b7d6, 0xb3ce7db3, 0x297b5229, 0xe33edde3, 0x2f715e2f, 0x84971384, 0x53f5a653, 0xd168b9d1, 0x00000000, 0xed2cc1ed, 0x20604020, 0xfc1fe3fc, 0xb1c879b1, 0x5bedb65b, 0x6abed46a, 0xcb468dcb, 0xbed967be, 0x394b7239, 0x4ade944a, 0x4cd4984c, 0x58e8b058, 0xcf4a85cf, 0xd06bbbd0, 0xef2ac5ef, 0xaae54faa, 0xfb16edfb, 0x43c58643, 0x4dd79a4d, 0x33556633, 0x85941185, 0x45cf8a45, 0xf910e9f9, 0x02060402, 0x7f81fe7f, 0x50f0a050, 0x3c44783c, 0x9fba259f, 0xa8e34ba8, 0x51f3a251, 0xa3fe5da3, 0x40c08040, 0x8f8a058f, 0x92ad3f92, 0x9dbc219d, 0x38487038, 0xf504f1f5, 0xbcdf63bc, 0xb6c177b6, 0xda75afda, 0x21634221, 0x10302010, 0xff1ae5ff, 0xf30efdf3, 0xd26dbfd2, 0xcd4c81cd, 0x0c14180c, 0x13352613, 0xec2fc3ec, 0x5fe1be5f, 0x97a23597, 0x44cc8844, 0x17392e17, 0xc45793c4, 0xa7f255a7, 0x7e82fc7e, 0x3d477a3d, 0x64acc864, 0x5de7ba5d, 0x192b3219, 0x7395e673, 0x60a0c060, 0x81981981, 0x4fd19e4f, 0xdc7fa3dc, 0x22664422, 0x2a7e542a, 0x90ab3b90, 0x88830b88, 0x46ca8c46, 0xee29c7ee, 0xb8d36bb8, 0x143c2814, 0xde79a7de, 0x5ee2bc5e, 0x0b1d160b, 0xdb76addb, 0xe03bdbe0, 0x32566432, 0x3a4e743a, 0x0a1e140a, 0x49db9249, 0x060a0c06, 0x246c4824, 0x5ce4b85c, 0xc25d9fc2, 0xd36ebdd3, 0xacef43ac, 0x62a6c462, 0x91a83991, 0x95a43195, 0xe437d3e4, 0x798bf279, 0xe732d5e7, 0xc8438bc8, 0x37596e37, 0x6db7da6d, 0x8d8c018d, 0xd564b1d5, 0x4ed29c4e, 0xa9e049a9, 0x6cb4d86c, 0x56faac56, 0xf407f3f4, 0xea25cfea, 0x65afca65, 0x7a8ef47a, 0xaee947ae, 0x08181008, 0xbad56fba, 0x7888f078, 0x256f4a25, 0x2e725c2e, 0x1c24381c, 0xa6f157a6, 0xb4c773b4, 0xc65197c6, 0xe823cbe8, 0xdd7ca1dd, 0x749ce874, 0x1f213e1f, 0x4bdd964b, 0xbddc61bd, 0x8b860d8b, 0x8a850f8a, 0x7090e070, 0x3e427c3e, 0xb5c471b5, 0x66aacc66, 0x48d89048, 0x03050603, 0xf601f7f6, 0x0e121c0e, 0x61a3c261, 0x355f6a35, 0x57f9ae57, 0xb9d069b9, 0x86911786, 0xc15899c1, 0x1d273a1d, 0x9eb9279e, 0xe138d9e1, 0xf813ebf8, 0x98b32b98, 0x11332211, 0x69bbd269, 0xd970a9d9, 0x8e89078e, 0x94a73394, 0x9bb62d9b, 0x1e223c1e, 0x87921587, 0xe920c9e9, 0xce4987ce, 0x55ffaa55, 0x28785028, 0xdf7aa5df, 0x8c8f038c, 0xa1f859a1, 0x89800989, 0x0d171a0d, 0xbfda65bf, 0xe631d7e6, 0x42c68442, 0x68b8d068, 0x41c38241, 0x99b02999, 0x2d775a2d, 0x0f111e0f, 0xb0cb7bb0, 0x54fca854, 0xbbd66dbb, 0x163a2c16];
    var T4 = [0x6363a5c6, 0x7c7c84f8, 0x777799ee, 0x7b7b8df6, 0xf2f20dff, 0x6b6bbdd6, 0x6f6fb1de, 0xc5c55491, 0x30305060, 0x01010302, 0x6767a9ce, 0x2b2b7d56, 0xfefe19e7, 0xd7d762b5, 0xababe64d, 0x76769aec, 0xcaca458f, 0x82829d1f, 0xc9c94089, 0x7d7d87fa, 0xfafa15ef, 0x5959ebb2, 0x4747c98e, 0xf0f00bfb, 0xadadec41, 0xd4d467b3, 0xa2a2fd5f, 0xafafea45, 0x9c9cbf23, 0xa4a4f753, 0x727296e4, 0xc0c05b9b, 0xb7b7c275, 0xfdfd1ce1, 0x9393ae3d, 0x26266a4c, 0x36365a6c, 0x3f3f417e, 0xf7f702f5, 0xcccc4f83, 0x34345c68, 0xa5a5f451, 0xe5e534d1, 0xf1f108f9, 0x717193e2, 0xd8d873ab, 0x31315362, 0x15153f2a, 0x04040c08, 0xc7c75295, 0x23236546, 0xc3c35e9d, 0x18182830, 0x9696a137, 0x05050f0a, 0x9a9ab52f, 0x0707090e, 0x12123624, 0x80809b1b, 0xe2e23ddf, 0xebeb26cd, 0x2727694e, 0xb2b2cd7f, 0x75759fea, 0x09091b12, 0x83839e1d, 0x2c2c7458, 0x1a1a2e34, 0x1b1b2d36, 0x6e6eb2dc, 0x5a5aeeb4, 0xa0a0fb5b, 0x5252f6a4, 0x3b3b4d76, 0xd6d661b7, 0xb3b3ce7d, 0x29297b52, 0xe3e33edd, 0x2f2f715e, 0x84849713, 0x5353f5a6, 0xd1d168b9, 0x00000000, 0xeded2cc1, 0x20206040, 0xfcfc1fe3, 0xb1b1c879, 0x5b5bedb6, 0x6a6abed4, 0xcbcb468d, 0xbebed967, 0x39394b72, 0x4a4ade94, 0x4c4cd498, 0x5858e8b0, 0xcfcf4a85, 0xd0d06bbb, 0xefef2ac5, 0xaaaae54f, 0xfbfb16ed, 0x4343c586, 0x4d4dd79a, 0x33335566, 0x85859411, 0x4545cf8a, 0xf9f910e9, 0x02020604, 0x7f7f81fe, 0x5050f0a0, 0x3c3c4478, 0x9f9fba25, 0xa8a8e34b, 0x5151f3a2, 0xa3a3fe5d, 0x4040c080, 0x8f8f8a05, 0x9292ad3f, 0x9d9dbc21, 0x38384870, 0xf5f504f1, 0xbcbcdf63, 0xb6b6c177, 0xdada75af, 0x21216342, 0x10103020, 0xffff1ae5, 0xf3f30efd, 0xd2d26dbf, 0xcdcd4c81, 0x0c0c1418, 0x13133526, 0xecec2fc3, 0x5f5fe1be, 0x9797a235, 0x4444cc88, 0x1717392e, 0xc4c45793, 0xa7a7f255, 0x7e7e82fc, 0x3d3d477a, 0x6464acc8, 0x5d5de7ba, 0x19192b32, 0x737395e6, 0x6060a0c0, 0x81819819, 0x4f4fd19e, 0xdcdc7fa3, 0x22226644, 0x2a2a7e54, 0x9090ab3b, 0x8888830b, 0x4646ca8c, 0xeeee29c7, 0xb8b8d36b, 0x14143c28, 0xdede79a7, 0x5e5ee2bc, 0x0b0b1d16, 0xdbdb76ad, 0xe0e03bdb, 0x32325664, 0x3a3a4e74, 0x0a0a1e14, 0x4949db92, 0x06060a0c, 0x24246c48, 0x5c5ce4b8, 0xc2c25d9f, 0xd3d36ebd, 0xacacef43, 0x6262a6c4, 0x9191a839, 0x9595a431, 0xe4e437d3, 0x79798bf2, 0xe7e732d5, 0xc8c8438b, 0x3737596e, 0x6d6db7da, 0x8d8d8c01, 0xd5d564b1, 0x4e4ed29c, 0xa9a9e049, 0x6c6cb4d8, 0x5656faac, 0xf4f407f3, 0xeaea25cf, 0x6565afca, 0x7a7a8ef4, 0xaeaee947, 0x08081810, 0xbabad56f, 0x787888f0, 0x25256f4a, 0x2e2e725c, 0x1c1c2438, 0xa6a6f157, 0xb4b4c773, 0xc6c65197, 0xe8e823cb, 0xdddd7ca1, 0x74749ce8, 0x1f1f213e, 0x4b4bdd96, 0xbdbddc61, 0x8b8b860d, 0x8a8a850f, 0x707090e0, 0x3e3e427c, 0xb5b5c471, 0x6666aacc, 0x4848d890, 0x03030506, 0xf6f601f7, 0x0e0e121c, 0x6161a3c2, 0x35355f6a, 0x5757f9ae, 0xb9b9d069, 0x86869117, 0xc1c15899, 0x1d1d273a, 0x9e9eb927, 0xe1e138d9, 0xf8f813eb, 0x9898b32b, 0x11113322, 0x6969bbd2, 0xd9d970a9, 0x8e8e8907, 0x9494a733, 0x9b9bb62d, 0x1e1e223c, 0x87879215, 0xe9e920c9, 0xcece4987, 0x5555ffaa, 0x28287850, 0xdfdf7aa5, 0x8c8c8f03, 0xa1a1f859, 0x89898009, 0x0d0d171a, 0xbfbfda65, 0xe6e631d7, 0x4242c684, 0x6868b8d0, 0x4141c382, 0x9999b029, 0x2d2d775a, 0x0f0f111e, 0xb0b0cb7b, 0x5454fca8, 0xbbbbd66d, 0x16163a2c];

    // Transformations for decryption
    var T5 = [0x51f4a750, 0x7e416553, 0x1a17a4c3, 0x3a275e96, 0x3bab6bcb, 0x1f9d45f1, 0xacfa58ab, 0x4be30393, 0x2030fa55, 0xad766df6, 0x88cc7691, 0xf5024c25, 0x4fe5d7fc, 0xc52acbd7, 0x26354480, 0xb562a38f, 0xdeb15a49, 0x25ba1b67, 0x45ea0e98, 0x5dfec0e1, 0xc32f7502, 0x814cf012, 0x8d4697a3, 0x6bd3f9c6, 0x038f5fe7, 0x15929c95, 0xbf6d7aeb, 0x955259da, 0xd4be832d, 0x587421d3, 0x49e06929, 0x8ec9c844, 0x75c2896a, 0xf48e7978, 0x99583e6b, 0x27b971dd, 0xbee14fb6, 0xf088ad17, 0xc920ac66, 0x7dce3ab4, 0x63df4a18, 0xe51a3182, 0x97513360, 0x62537f45, 0xb16477e0, 0xbb6bae84, 0xfe81a01c, 0xf9082b94, 0x70486858, 0x8f45fd19, 0x94de6c87, 0x527bf8b7, 0xab73d323, 0x724b02e2, 0xe31f8f57, 0x6655ab2a, 0xb2eb2807, 0x2fb5c203, 0x86c57b9a, 0xd33708a5, 0x302887f2, 0x23bfa5b2, 0x02036aba, 0xed16825c, 0x8acf1c2b, 0xa779b492, 0xf307f2f0, 0x4e69e2a1, 0x65daf4cd, 0x0605bed5, 0xd134621f, 0xc4a6fe8a, 0x342e539d, 0xa2f355a0, 0x058ae132, 0xa4f6eb75, 0x0b83ec39, 0x4060efaa, 0x5e719f06, 0xbd6e1051, 0x3e218af9, 0x96dd063d, 0xdd3e05ae, 0x4de6bd46, 0x91548db5, 0x71c45d05, 0x0406d46f, 0x605015ff, 0x1998fb24, 0xd6bde997, 0x894043cc, 0x67d99e77, 0xb0e842bd, 0x07898b88, 0xe7195b38, 0x79c8eedb, 0xa17c0a47, 0x7c420fe9, 0xf8841ec9, 0x00000000, 0x09808683, 0x322bed48, 0x1e1170ac, 0x6c5a724e, 0xfd0efffb, 0x0f853856, 0x3daed51e, 0x362d3927, 0x0a0fd964, 0x685ca621, 0x9b5b54d1, 0x24362e3a, 0x0c0a67b1, 0x9357e70f, 0xb4ee96d2, 0x1b9b919e, 0x80c0c54f, 0x61dc20a2, 0x5a774b69, 0x1c121a16, 0xe293ba0a, 0xc0a02ae5, 0x3c22e043, 0x121b171d, 0x0e090d0b, 0xf28bc7ad, 0x2db6a8b9, 0x141ea9c8, 0x57f11985, 0xaf75074c, 0xee99ddbb, 0xa37f60fd, 0xf701269f, 0x5c72f5bc, 0x44663bc5, 0x5bfb7e34, 0x8b432976, 0xcb23c6dc, 0xb6edfc68, 0xb8e4f163, 0xd731dcca, 0x42638510, 0x13972240, 0x84c61120, 0x854a247d, 0xd2bb3df8, 0xaef93211, 0xc729a16d, 0x1d9e2f4b, 0xdcb230f3, 0x0d8652ec, 0x77c1e3d0, 0x2bb3166c, 0xa970b999, 0x119448fa, 0x47e96422, 0xa8fc8cc4, 0xa0f03f1a, 0x567d2cd8, 0x223390ef, 0x87494ec7, 0xd938d1c1, 0x8ccaa2fe, 0x98d40b36, 0xa6f581cf, 0xa57ade28, 0xdab78e26, 0x3fadbfa4, 0x2c3a9de4, 0x5078920d, 0x6a5fcc9b, 0x547e4662, 0xf68d13c2, 0x90d8b8e8, 0x2e39f75e, 0x82c3aff5, 0x9f5d80be, 0x69d0937c, 0x6fd52da9, 0xcf2512b3, 0xc8ac993b, 0x10187da7, 0xe89c636e, 0xdb3bbb7b, 0xcd267809, 0x6e5918f4, 0xec9ab701, 0x834f9aa8, 0xe6956e65, 0xaaffe67e, 0x21bccf08, 0xef15e8e6, 0xbae79bd9, 0x4a6f36ce, 0xea9f09d4, 0x29b07cd6, 0x31a4b2af, 0x2a3f2331, 0xc6a59430, 0x35a266c0, 0x744ebc37, 0xfc82caa6, 0xe090d0b0, 0x33a7d815, 0xf104984a, 0x41ecdaf7, 0x7fcd500e, 0x1791f62f, 0x764dd68d, 0x43efb04d, 0xccaa4d54, 0xe49604df, 0x9ed1b5e3, 0x4c6a881b, 0xc12c1fb8, 0x4665517f, 0x9d5eea04, 0x018c355d, 0xfa877473, 0xfb0b412e, 0xb3671d5a, 0x92dbd252, 0xe9105633, 0x6dd64713, 0x9ad7618c, 0x37a10c7a, 0x59f8148e, 0xeb133c89, 0xcea927ee, 0xb761c935, 0xe11ce5ed, 0x7a47b13c, 0x9cd2df59, 0x55f2733f, 0x1814ce79, 0x73c737bf, 0x53f7cdea, 0x5ffdaa5b, 0xdf3d6f14, 0x7844db86, 0xcaaff381, 0xb968c43e, 0x3824342c, 0xc2a3405f, 0x161dc372, 0xbce2250c, 0x283c498b, 0xff0d9541, 0x39a80171, 0x080cb3de, 0xd8b4e49c, 0x6456c190, 0x7bcb8461, 0xd532b670, 0x486c5c74, 0xd0b85742];
    var T6 = [0x5051f4a7, 0x537e4165, 0xc31a17a4, 0x963a275e, 0xcb3bab6b, 0xf11f9d45, 0xabacfa58, 0x934be303, 0x552030fa, 0xf6ad766d, 0x9188cc76, 0x25f5024c, 0xfc4fe5d7, 0xd7c52acb, 0x80263544, 0x8fb562a3, 0x49deb15a, 0x6725ba1b, 0x9845ea0e, 0xe15dfec0, 0x02c32f75, 0x12814cf0, 0xa38d4697, 0xc66bd3f9, 0xe7038f5f, 0x9515929c, 0xebbf6d7a, 0xda955259, 0x2dd4be83, 0xd3587421, 0x2949e069, 0x448ec9c8, 0x6a75c289, 0x78f48e79, 0x6b99583e, 0xdd27b971, 0xb6bee14f, 0x17f088ad, 0x66c920ac, 0xb47dce3a, 0x1863df4a, 0x82e51a31, 0x60975133, 0x4562537f, 0xe0b16477, 0x84bb6bae, 0x1cfe81a0, 0x94f9082b, 0x58704868, 0x198f45fd, 0x8794de6c, 0xb7527bf8, 0x23ab73d3, 0xe2724b02, 0x57e31f8f, 0x2a6655ab, 0x07b2eb28, 0x032fb5c2, 0x9a86c57b, 0xa5d33708, 0xf2302887, 0xb223bfa5, 0xba02036a, 0x5ced1682, 0x2b8acf1c, 0x92a779b4, 0xf0f307f2, 0xa14e69e2, 0xcd65daf4, 0xd50605be, 0x1fd13462, 0x8ac4a6fe, 0x9d342e53, 0xa0a2f355, 0x32058ae1, 0x75a4f6eb, 0x390b83ec, 0xaa4060ef, 0x065e719f, 0x51bd6e10, 0xf93e218a, 0x3d96dd06, 0xaedd3e05, 0x464de6bd, 0xb591548d, 0x0571c45d, 0x6f0406d4, 0xff605015, 0x241998fb, 0x97d6bde9, 0xcc894043, 0x7767d99e, 0xbdb0e842, 0x8807898b, 0x38e7195b, 0xdb79c8ee, 0x47a17c0a, 0xe97c420f, 0xc9f8841e, 0x00000000, 0x83098086, 0x48322bed, 0xac1e1170, 0x4e6c5a72, 0xfbfd0eff, 0x560f8538, 0x1e3daed5, 0x27362d39, 0x640a0fd9, 0x21685ca6, 0xd19b5b54, 0x3a24362e, 0xb10c0a67, 0x0f9357e7, 0xd2b4ee96, 0x9e1b9b91, 0x4f80c0c5, 0xa261dc20, 0x695a774b, 0x161c121a, 0x0ae293ba, 0xe5c0a02a, 0x433c22e0, 0x1d121b17, 0x0b0e090d, 0xadf28bc7, 0xb92db6a8, 0xc8141ea9, 0x8557f119, 0x4caf7507, 0xbbee99dd, 0xfda37f60, 0x9ff70126, 0xbc5c72f5, 0xc544663b, 0x345bfb7e, 0x768b4329, 0xdccb23c6, 0x68b6edfc, 0x63b8e4f1, 0xcad731dc, 0x10426385, 0x40139722, 0x2084c611, 0x7d854a24, 0xf8d2bb3d, 0x11aef932, 0x6dc729a1, 0x4b1d9e2f, 0xf3dcb230, 0xec0d8652, 0xd077c1e3, 0x6c2bb316, 0x99a970b9, 0xfa119448, 0x2247e964, 0xc4a8fc8c, 0x1aa0f03f, 0xd8567d2c, 0xef223390, 0xc787494e, 0xc1d938d1, 0xfe8ccaa2, 0x3698d40b, 0xcfa6f581, 0x28a57ade, 0x26dab78e, 0xa43fadbf, 0xe42c3a9d, 0x0d507892, 0x9b6a5fcc, 0x62547e46, 0xc2f68d13, 0xe890d8b8, 0x5e2e39f7, 0xf582c3af, 0xbe9f5d80, 0x7c69d093, 0xa96fd52d, 0xb3cf2512, 0x3bc8ac99, 0xa710187d, 0x6ee89c63, 0x7bdb3bbb, 0x09cd2678, 0xf46e5918, 0x01ec9ab7, 0xa8834f9a, 0x65e6956e, 0x7eaaffe6, 0x0821bccf, 0xe6ef15e8, 0xd9bae79b, 0xce4a6f36, 0xd4ea9f09, 0xd629b07c, 0xaf31a4b2, 0x312a3f23, 0x30c6a594, 0xc035a266, 0x37744ebc, 0xa6fc82ca, 0xb0e090d0, 0x1533a7d8, 0x4af10498, 0xf741ecda, 0x0e7fcd50, 0x2f1791f6, 0x8d764dd6, 0x4d43efb0, 0x54ccaa4d, 0xdfe49604, 0xe39ed1b5, 0x1b4c6a88, 0xb8c12c1f, 0x7f466551, 0x049d5eea, 0x5d018c35, 0x73fa8774, 0x2efb0b41, 0x5ab3671d, 0x5292dbd2, 0x33e91056, 0x136dd647, 0x8c9ad761, 0x7a37a10c, 0x8e59f814, 0x89eb133c, 0xeecea927, 0x35b761c9, 0xede11ce5, 0x3c7a47b1, 0x599cd2df, 0x3f55f273, 0x791814ce, 0xbf73c737, 0xea53f7cd, 0x5b5ffdaa, 0x14df3d6f, 0x867844db, 0x81caaff3, 0x3eb968c4, 0x2c382434, 0x5fc2a340, 0x72161dc3, 0x0cbce225, 0x8b283c49, 0x41ff0d95, 0x7139a801, 0xde080cb3, 0x9cd8b4e4, 0x906456c1, 0x617bcb84, 0x70d532b6, 0x74486c5c, 0x42d0b857];
    var T7 = [0xa75051f4, 0x65537e41, 0xa4c31a17, 0x5e963a27, 0x6bcb3bab, 0x45f11f9d, 0x58abacfa, 0x03934be3, 0xfa552030, 0x6df6ad76, 0x769188cc, 0x4c25f502, 0xd7fc4fe5, 0xcbd7c52a, 0x44802635, 0xa38fb562, 0x5a49deb1, 0x1b6725ba, 0x0e9845ea, 0xc0e15dfe, 0x7502c32f, 0xf012814c, 0x97a38d46, 0xf9c66bd3, 0x5fe7038f, 0x9c951592, 0x7aebbf6d, 0x59da9552, 0x832dd4be, 0x21d35874, 0x692949e0, 0xc8448ec9, 0x896a75c2, 0x7978f48e, 0x3e6b9958, 0x71dd27b9, 0x4fb6bee1, 0xad17f088, 0xac66c920, 0x3ab47dce, 0x4a1863df, 0x3182e51a, 0x33609751, 0x7f456253, 0x77e0b164, 0xae84bb6b, 0xa01cfe81, 0x2b94f908, 0x68587048, 0xfd198f45, 0x6c8794de, 0xf8b7527b, 0xd323ab73, 0x02e2724b, 0x8f57e31f, 0xab2a6655, 0x2807b2eb, 0xc2032fb5, 0x7b9a86c5, 0x08a5d337, 0x87f23028, 0xa5b223bf, 0x6aba0203, 0x825ced16, 0x1c2b8acf, 0xb492a779, 0xf2f0f307, 0xe2a14e69, 0xf4cd65da, 0xbed50605, 0x621fd134, 0xfe8ac4a6, 0x539d342e, 0x55a0a2f3, 0xe132058a, 0xeb75a4f6, 0xec390b83, 0xefaa4060, 0x9f065e71, 0x1051bd6e, 0x8af93e21, 0x063d96dd, 0x05aedd3e, 0xbd464de6, 0x8db59154, 0x5d0571c4, 0xd46f0406, 0x15ff6050, 0xfb241998, 0xe997d6bd, 0x43cc8940, 0x9e7767d9, 0x42bdb0e8, 0x8b880789, 0x5b38e719, 0xeedb79c8, 0x0a47a17c, 0x0fe97c42, 0x1ec9f884, 0x00000000, 0x86830980, 0xed48322b, 0x70ac1e11, 0x724e6c5a, 0xfffbfd0e, 0x38560f85, 0xd51e3dae, 0x3927362d, 0xd9640a0f, 0xa621685c, 0x54d19b5b, 0x2e3a2436, 0x67b10c0a, 0xe70f9357, 0x96d2b4ee, 0x919e1b9b, 0xc54f80c0, 0x20a261dc, 0x4b695a77, 0x1a161c12, 0xba0ae293, 0x2ae5c0a0, 0xe0433c22, 0x171d121b, 0x0d0b0e09, 0xc7adf28b, 0xa8b92db6, 0xa9c8141e, 0x198557f1, 0x074caf75, 0xddbbee99, 0x60fda37f, 0x269ff701, 0xf5bc5c72, 0x3bc54466, 0x7e345bfb, 0x29768b43, 0xc6dccb23, 0xfc68b6ed, 0xf163b8e4, 0xdccad731, 0x85104263, 0x22401397, 0x112084c6, 0x247d854a, 0x3df8d2bb, 0x3211aef9, 0xa16dc729, 0x2f4b1d9e, 0x30f3dcb2, 0x52ec0d86, 0xe3d077c1, 0x166c2bb3, 0xb999a970, 0x48fa1194, 0x642247e9, 0x8cc4a8fc, 0x3f1aa0f0, 0x2cd8567d, 0x90ef2233, 0x4ec78749, 0xd1c1d938, 0xa2fe8cca, 0x0b3698d4, 0x81cfa6f5, 0xde28a57a, 0x8e26dab7, 0xbfa43fad, 0x9de42c3a, 0x920d5078, 0xcc9b6a5f, 0x4662547e, 0x13c2f68d, 0xb8e890d8, 0xf75e2e39, 0xaff582c3, 0x80be9f5d, 0x937c69d0, 0x2da96fd5, 0x12b3cf25, 0x993bc8ac, 0x7da71018, 0x636ee89c, 0xbb7bdb3b, 0x7809cd26, 0x18f46e59, 0xb701ec9a, 0x9aa8834f, 0x6e65e695, 0xe67eaaff, 0xcf0821bc, 0xe8e6ef15, 0x9bd9bae7, 0x36ce4a6f, 0x09d4ea9f, 0x7cd629b0, 0xb2af31a4, 0x23312a3f, 0x9430c6a5, 0x66c035a2, 0xbc37744e, 0xcaa6fc82, 0xd0b0e090, 0xd81533a7, 0x984af104, 0xdaf741ec, 0x500e7fcd, 0xf62f1791, 0xd68d764d, 0xb04d43ef, 0x4d54ccaa, 0x04dfe496, 0xb5e39ed1, 0x881b4c6a, 0x1fb8c12c, 0x517f4665, 0xea049d5e, 0x355d018c, 0x7473fa87, 0x412efb0b, 0x1d5ab367, 0xd25292db, 0x5633e910, 0x47136dd6, 0x618c9ad7, 0x0c7a37a1, 0x148e59f8, 0x3c89eb13, 0x27eecea9, 0xc935b761, 0xe5ede11c, 0xb13c7a47, 0xdf599cd2, 0x733f55f2, 0xce791814, 0x37bf73c7, 0xcdea53f7, 0xaa5b5ffd, 0x6f14df3d, 0xdb867844, 0xf381caaf, 0xc43eb968, 0x342c3824, 0x405fc2a3, 0xc372161d, 0x250cbce2, 0x498b283c, 0x9541ff0d, 0x017139a8, 0xb3de080c, 0xe49cd8b4, 0xc1906456, 0x84617bcb, 0xb670d532, 0x5c74486c, 0x5742d0b8];
    var T8 = [0xf4a75051, 0x4165537e, 0x17a4c31a, 0x275e963a, 0xab6bcb3b, 0x9d45f11f, 0xfa58abac, 0xe303934b, 0x30fa5520, 0x766df6ad, 0xcc769188, 0x024c25f5, 0xe5d7fc4f, 0x2acbd7c5, 0x35448026, 0x62a38fb5, 0xb15a49de, 0xba1b6725, 0xea0e9845, 0xfec0e15d, 0x2f7502c3, 0x4cf01281, 0x4697a38d, 0xd3f9c66b, 0x8f5fe703, 0x929c9515, 0x6d7aebbf, 0x5259da95, 0xbe832dd4, 0x7421d358, 0xe0692949, 0xc9c8448e, 0xc2896a75, 0x8e7978f4, 0x583e6b99, 0xb971dd27, 0xe14fb6be, 0x88ad17f0, 0x20ac66c9, 0xce3ab47d, 0xdf4a1863, 0x1a3182e5, 0x51336097, 0x537f4562, 0x6477e0b1, 0x6bae84bb, 0x81a01cfe, 0x082b94f9, 0x48685870, 0x45fd198f, 0xde6c8794, 0x7bf8b752, 0x73d323ab, 0x4b02e272, 0x1f8f57e3, 0x55ab2a66, 0xeb2807b2, 0xb5c2032f, 0xc57b9a86, 0x3708a5d3, 0x2887f230, 0xbfa5b223, 0x036aba02, 0x16825ced, 0xcf1c2b8a, 0x79b492a7, 0x07f2f0f3, 0x69e2a14e, 0xdaf4cd65, 0x05bed506, 0x34621fd1, 0xa6fe8ac4, 0x2e539d34, 0xf355a0a2, 0x8ae13205, 0xf6eb75a4, 0x83ec390b, 0x60efaa40, 0x719f065e, 0x6e1051bd, 0x218af93e, 0xdd063d96, 0x3e05aedd, 0xe6bd464d, 0x548db591, 0xc45d0571, 0x06d46f04, 0x5015ff60, 0x98fb2419, 0xbde997d6, 0x4043cc89, 0xd99e7767, 0xe842bdb0, 0x898b8807, 0x195b38e7, 0xc8eedb79, 0x7c0a47a1, 0x420fe97c, 0x841ec9f8, 0x00000000, 0x80868309, 0x2bed4832, 0x1170ac1e, 0x5a724e6c, 0x0efffbfd, 0x8538560f, 0xaed51e3d, 0x2d392736, 0x0fd9640a, 0x5ca62168, 0x5b54d19b, 0x362e3a24, 0x0a67b10c, 0x57e70f93, 0xee96d2b4, 0x9b919e1b, 0xc0c54f80, 0xdc20a261, 0x774b695a, 0x121a161c, 0x93ba0ae2, 0xa02ae5c0, 0x22e0433c, 0x1b171d12, 0x090d0b0e, 0x8bc7adf2, 0xb6a8b92d, 0x1ea9c814, 0xf1198557, 0x75074caf, 0x99ddbbee, 0x7f60fda3, 0x01269ff7, 0x72f5bc5c, 0x663bc544, 0xfb7e345b, 0x4329768b, 0x23c6dccb, 0xedfc68b6, 0xe4f163b8, 0x31dccad7, 0x63851042, 0x97224013, 0xc6112084, 0x4a247d85, 0xbb3df8d2, 0xf93211ae, 0x29a16dc7, 0x9e2f4b1d, 0xb230f3dc, 0x8652ec0d, 0xc1e3d077, 0xb3166c2b, 0x70b999a9, 0x9448fa11, 0xe9642247, 0xfc8cc4a8, 0xf03f1aa0, 0x7d2cd856, 0x3390ef22, 0x494ec787, 0x38d1c1d9, 0xcaa2fe8c, 0xd40b3698, 0xf581cfa6, 0x7ade28a5, 0xb78e26da, 0xadbfa43f, 0x3a9de42c, 0x78920d50, 0x5fcc9b6a, 0x7e466254, 0x8d13c2f6, 0xd8b8e890, 0x39f75e2e, 0xc3aff582, 0x5d80be9f, 0xd0937c69, 0xd52da96f, 0x2512b3cf, 0xac993bc8, 0x187da710, 0x9c636ee8, 0x3bbb7bdb, 0x267809cd, 0x5918f46e, 0x9ab701ec, 0x4f9aa883, 0x956e65e6, 0xffe67eaa, 0xbccf0821, 0x15e8e6ef, 0xe79bd9ba, 0x6f36ce4a, 0x9f09d4ea, 0xb07cd629, 0xa4b2af31, 0x3f23312a, 0xa59430c6, 0xa266c035, 0x4ebc3774, 0x82caa6fc, 0x90d0b0e0, 0xa7d81533, 0x04984af1, 0xecdaf741, 0xcd500e7f, 0x91f62f17, 0x4dd68d76, 0xefb04d43, 0xaa4d54cc, 0x9604dfe4, 0xd1b5e39e, 0x6a881b4c, 0x2c1fb8c1, 0x65517f46, 0x5eea049d, 0x8c355d01, 0x877473fa, 0x0b412efb, 0x671d5ab3, 0xdbd25292, 0x105633e9, 0xd647136d, 0xd7618c9a, 0xa10c7a37, 0xf8148e59, 0x133c89eb, 0xa927eece, 0x61c935b7, 0x1ce5ede1, 0x47b13c7a, 0xd2df599c, 0xf2733f55, 0x14ce7918, 0xc737bf73, 0xf7cdea53, 0xfdaa5b5f, 0x3d6f14df, 0x44db8678, 0xaff381ca, 0x68c43eb9, 0x24342c38, 0xa3405fc2, 0x1dc37216, 0xe2250cbc, 0x3c498b28, 0x0d9541ff, 0xa8017139, 0x0cb3de08, 0xb4e49cd8, 0x56c19064, 0xcb84617b, 0x32b670d5, 0x6c5c7448, 0xb85742d0];

    // Transformations for decryption key expansion
    var U1 = [0x00000000, 0x0e090d0b, 0x1c121a16, 0x121b171d, 0x3824342c, 0x362d3927, 0x24362e3a, 0x2a3f2331, 0x70486858, 0x7e416553, 0x6c5a724e, 0x62537f45, 0x486c5c74, 0x4665517f, 0x547e4662, 0x5a774b69, 0xe090d0b0, 0xee99ddbb, 0xfc82caa6, 0xf28bc7ad, 0xd8b4e49c, 0xd6bde997, 0xc4a6fe8a, 0xcaaff381, 0x90d8b8e8, 0x9ed1b5e3, 0x8ccaa2fe, 0x82c3aff5, 0xa8fc8cc4, 0xa6f581cf, 0xb4ee96d2, 0xbae79bd9, 0xdb3bbb7b, 0xd532b670, 0xc729a16d, 0xc920ac66, 0xe31f8f57, 0xed16825c, 0xff0d9541, 0xf104984a, 0xab73d323, 0xa57ade28, 0xb761c935, 0xb968c43e, 0x9357e70f, 0x9d5eea04, 0x8f45fd19, 0x814cf012, 0x3bab6bcb, 0x35a266c0, 0x27b971dd, 0x29b07cd6, 0x038f5fe7, 0x0d8652ec, 0x1f9d45f1, 0x119448fa, 0x4be30393, 0x45ea0e98, 0x57f11985, 0x59f8148e, 0x73c737bf, 0x7dce3ab4, 0x6fd52da9, 0x61dc20a2, 0xad766df6, 0xa37f60fd, 0xb16477e0, 0xbf6d7aeb, 0x955259da, 0x9b5b54d1, 0x894043cc, 0x87494ec7, 0xdd3e05ae, 0xd33708a5, 0xc12c1fb8, 0xcf2512b3, 0xe51a3182, 0xeb133c89, 0xf9082b94, 0xf701269f, 0x4de6bd46, 0x43efb04d, 0x51f4a750, 0x5ffdaa5b, 0x75c2896a, 0x7bcb8461, 0x69d0937c, 0x67d99e77, 0x3daed51e, 0x33a7d815, 0x21bccf08, 0x2fb5c203, 0x058ae132, 0x0b83ec39, 0x1998fb24, 0x1791f62f, 0x764dd68d, 0x7844db86, 0x6a5fcc9b, 0x6456c190, 0x4e69e2a1, 0x4060efaa, 0x527bf8b7, 0x5c72f5bc, 0x0605bed5, 0x080cb3de, 0x1a17a4c3, 0x141ea9c8, 0x3e218af9, 0x302887f2, 0x223390ef, 0x2c3a9de4, 0x96dd063d, 0x98d40b36, 0x8acf1c2b, 0x84c61120, 0xaef93211, 0xa0f03f1a, 0xb2eb2807, 0xbce2250c, 0xe6956e65, 0xe89c636e, 0xfa877473, 0xf48e7978, 0xdeb15a49, 0xd0b85742, 0xc2a3405f, 0xccaa4d54, 0x41ecdaf7, 0x4fe5d7fc, 0x5dfec0e1, 0x53f7cdea, 0x79c8eedb, 0x77c1e3d0, 0x65daf4cd, 0x6bd3f9c6, 0x31a4b2af, 0x3fadbfa4, 0x2db6a8b9, 0x23bfa5b2, 0x09808683, 0x07898b88, 0x15929c95, 0x1b9b919e, 0xa17c0a47, 0xaf75074c, 0xbd6e1051, 0xb3671d5a, 0x99583e6b, 0x97513360, 0x854a247d, 0x8b432976, 0xd134621f, 0xdf3d6f14, 0xcd267809, 0xc32f7502, 0xe9105633, 0xe7195b38, 0xf5024c25, 0xfb0b412e, 0x9ad7618c, 0x94de6c87, 0x86c57b9a, 0x88cc7691, 0xa2f355a0, 0xacfa58ab, 0xbee14fb6, 0xb0e842bd, 0xea9f09d4, 0xe49604df, 0xf68d13c2, 0xf8841ec9, 0xd2bb3df8, 0xdcb230f3, 0xcea927ee, 0xc0a02ae5, 0x7a47b13c, 0x744ebc37, 0x6655ab2a, 0x685ca621, 0x42638510, 0x4c6a881b, 0x5e719f06, 0x5078920d, 0x0a0fd964, 0x0406d46f, 0x161dc372, 0x1814ce79, 0x322bed48, 0x3c22e043, 0x2e39f75e, 0x2030fa55, 0xec9ab701, 0xe293ba0a, 0xf088ad17, 0xfe81a01c, 0xd4be832d, 0xdab78e26, 0xc8ac993b, 0xc6a59430, 0x9cd2df59, 0x92dbd252, 0x80c0c54f, 0x8ec9c844, 0xa4f6eb75, 0xaaffe67e, 0xb8e4f163, 0xb6edfc68, 0x0c0a67b1, 0x02036aba, 0x10187da7, 0x1e1170ac, 0x342e539d, 0x3a275e96, 0x283c498b, 0x26354480, 0x7c420fe9, 0x724b02e2, 0x605015ff, 0x6e5918f4, 0x44663bc5, 0x4a6f36ce, 0x587421d3, 0x567d2cd8, 0x37a10c7a, 0x39a80171, 0x2bb3166c, 0x25ba1b67, 0x0f853856, 0x018c355d, 0x13972240, 0x1d9e2f4b, 0x47e96422, 0x49e06929, 0x5bfb7e34, 0x55f2733f, 0x7fcd500e, 0x71c45d05, 0x63df4a18, 0x6dd64713, 0xd731dcca, 0xd938d1c1, 0xcb23c6dc, 0xc52acbd7, 0xef15e8e6, 0xe11ce5ed, 0xf307f2f0, 0xfd0efffb, 0xa779b492, 0xa970b999, 0xbb6bae84, 0xb562a38f, 0x9f5d80be, 0x91548db5, 0x834f9aa8, 0x8d4697a3];
    var U2 = [0x00000000, 0x0b0e090d, 0x161c121a, 0x1d121b17, 0x2c382434, 0x27362d39, 0x3a24362e, 0x312a3f23, 0x58704868, 0x537e4165, 0x4e6c5a72, 0x4562537f, 0x74486c5c, 0x7f466551, 0x62547e46, 0x695a774b, 0xb0e090d0, 0xbbee99dd, 0xa6fc82ca, 0xadf28bc7, 0x9cd8b4e4, 0x97d6bde9, 0x8ac4a6fe, 0x81caaff3, 0xe890d8b8, 0xe39ed1b5, 0xfe8ccaa2, 0xf582c3af, 0xc4a8fc8c, 0xcfa6f581, 0xd2b4ee96, 0xd9bae79b, 0x7bdb3bbb, 0x70d532b6, 0x6dc729a1, 0x66c920ac, 0x57e31f8f, 0x5ced1682, 0x41ff0d95, 0x4af10498, 0x23ab73d3, 0x28a57ade, 0x35b761c9, 0x3eb968c4, 0x0f9357e7, 0x049d5eea, 0x198f45fd, 0x12814cf0, 0xcb3bab6b, 0xc035a266, 0xdd27b971, 0xd629b07c, 0xe7038f5f, 0xec0d8652, 0xf11f9d45, 0xfa119448, 0x934be303, 0x9845ea0e, 0x8557f119, 0x8e59f814, 0xbf73c737, 0xb47dce3a, 0xa96fd52d, 0xa261dc20, 0xf6ad766d, 0xfda37f60, 0xe0b16477, 0xebbf6d7a, 0xda955259, 0xd19b5b54, 0xcc894043, 0xc787494e, 0xaedd3e05, 0xa5d33708, 0xb8c12c1f, 0xb3cf2512, 0x82e51a31, 0x89eb133c, 0x94f9082b, 0x9ff70126, 0x464de6bd, 0x4d43efb0, 0x5051f4a7, 0x5b5ffdaa, 0x6a75c289, 0x617bcb84, 0x7c69d093, 0x7767d99e, 0x1e3daed5, 0x1533a7d8, 0x0821bccf, 0x032fb5c2, 0x32058ae1, 0x390b83ec, 0x241998fb, 0x2f1791f6, 0x8d764dd6, 0x867844db, 0x9b6a5fcc, 0x906456c1, 0xa14e69e2, 0xaa4060ef, 0xb7527bf8, 0xbc5c72f5, 0xd50605be, 0xde080cb3, 0xc31a17a4, 0xc8141ea9, 0xf93e218a, 0xf2302887, 0xef223390, 0xe42c3a9d, 0x3d96dd06, 0x3698d40b, 0x2b8acf1c, 0x2084c611, 0x11aef932, 0x1aa0f03f, 0x07b2eb28, 0x0cbce225, 0x65e6956e, 0x6ee89c63, 0x73fa8774, 0x78f48e79, 0x49deb15a, 0x42d0b857, 0x5fc2a340, 0x54ccaa4d, 0xf741ecda, 0xfc4fe5d7, 0xe15dfec0, 0xea53f7cd, 0xdb79c8ee, 0xd077c1e3, 0xcd65daf4, 0xc66bd3f9, 0xaf31a4b2, 0xa43fadbf, 0xb92db6a8, 0xb223bfa5, 0x83098086, 0x8807898b, 0x9515929c, 0x9e1b9b91, 0x47a17c0a, 0x4caf7507, 0x51bd6e10, 0x5ab3671d, 0x6b99583e, 0x60975133, 0x7d854a24, 0x768b4329, 0x1fd13462, 0x14df3d6f, 0x09cd2678, 0x02c32f75, 0x33e91056, 0x38e7195b, 0x25f5024c, 0x2efb0b41, 0x8c9ad761, 0x8794de6c, 0x9a86c57b, 0x9188cc76, 0xa0a2f355, 0xabacfa58, 0xb6bee14f, 0xbdb0e842, 0xd4ea9f09, 0xdfe49604, 0xc2f68d13, 0xc9f8841e, 0xf8d2bb3d, 0xf3dcb230, 0xeecea927, 0xe5c0a02a, 0x3c7a47b1, 0x37744ebc, 0x2a6655ab, 0x21685ca6, 0x10426385, 0x1b4c6a88, 0x065e719f, 0x0d507892, 0x640a0fd9, 0x6f0406d4, 0x72161dc3, 0x791814ce, 0x48322bed, 0x433c22e0, 0x5e2e39f7, 0x552030fa, 0x01ec9ab7, 0x0ae293ba, 0x17f088ad, 0x1cfe81a0, 0x2dd4be83, 0x26dab78e, 0x3bc8ac99, 0x30c6a594, 0x599cd2df, 0x5292dbd2, 0x4f80c0c5, 0x448ec9c8, 0x75a4f6eb, 0x7eaaffe6, 0x63b8e4f1, 0x68b6edfc, 0xb10c0a67, 0xba02036a, 0xa710187d, 0xac1e1170, 0x9d342e53, 0x963a275e, 0x8b283c49, 0x80263544, 0xe97c420f, 0xe2724b02, 0xff605015, 0xf46e5918, 0xc544663b, 0xce4a6f36, 0xd3587421, 0xd8567d2c, 0x7a37a10c, 0x7139a801, 0x6c2bb316, 0x6725ba1b, 0x560f8538, 0x5d018c35, 0x40139722, 0x4b1d9e2f, 0x2247e964, 0x2949e069, 0x345bfb7e, 0x3f55f273, 0x0e7fcd50, 0x0571c45d, 0x1863df4a, 0x136dd647, 0xcad731dc, 0xc1d938d1, 0xdccb23c6, 0xd7c52acb, 0xe6ef15e8, 0xede11ce5, 0xf0f307f2, 0xfbfd0eff, 0x92a779b4, 0x99a970b9, 0x84bb6bae, 0x8fb562a3, 0xbe9f5d80, 0xb591548d, 0xa8834f9a, 0xa38d4697];
    var U3 = [0x00000000, 0x0d0b0e09, 0x1a161c12, 0x171d121b, 0x342c3824, 0x3927362d, 0x2e3a2436, 0x23312a3f, 0x68587048, 0x65537e41, 0x724e6c5a, 0x7f456253, 0x5c74486c, 0x517f4665, 0x4662547e, 0x4b695a77, 0xd0b0e090, 0xddbbee99, 0xcaa6fc82, 0xc7adf28b, 0xe49cd8b4, 0xe997d6bd, 0xfe8ac4a6, 0xf381caaf, 0xb8e890d8, 0xb5e39ed1, 0xa2fe8cca, 0xaff582c3, 0x8cc4a8fc, 0x81cfa6f5, 0x96d2b4ee, 0x9bd9bae7, 0xbb7bdb3b, 0xb670d532, 0xa16dc729, 0xac66c920, 0x8f57e31f, 0x825ced16, 0x9541ff0d, 0x984af104, 0xd323ab73, 0xde28a57a, 0xc935b761, 0xc43eb968, 0xe70f9357, 0xea049d5e, 0xfd198f45, 0xf012814c, 0x6bcb3bab, 0x66c035a2, 0x71dd27b9, 0x7cd629b0, 0x5fe7038f, 0x52ec0d86, 0x45f11f9d, 0x48fa1194, 0x03934be3, 0x0e9845ea, 0x198557f1, 0x148e59f8, 0x37bf73c7, 0x3ab47dce, 0x2da96fd5, 0x20a261dc, 0x6df6ad76, 0x60fda37f, 0x77e0b164, 0x7aebbf6d, 0x59da9552, 0x54d19b5b, 0x43cc8940, 0x4ec78749, 0x05aedd3e, 0x08a5d337, 0x1fb8c12c, 0x12b3cf25, 0x3182e51a, 0x3c89eb13, 0x2b94f908, 0x269ff701, 0xbd464de6, 0xb04d43ef, 0xa75051f4, 0xaa5b5ffd, 0x896a75c2, 0x84617bcb, 0x937c69d0, 0x9e7767d9, 0xd51e3dae, 0xd81533a7, 0xcf0821bc, 0xc2032fb5, 0xe132058a, 0xec390b83, 0xfb241998, 0xf62f1791, 0xd68d764d, 0xdb867844, 0xcc9b6a5f, 0xc1906456, 0xe2a14e69, 0xefaa4060, 0xf8b7527b, 0xf5bc5c72, 0xbed50605, 0xb3de080c, 0xa4c31a17, 0xa9c8141e, 0x8af93e21, 0x87f23028, 0x90ef2233, 0x9de42c3a, 0x063d96dd, 0x0b3698d4, 0x1c2b8acf, 0x112084c6, 0x3211aef9, 0x3f1aa0f0, 0x2807b2eb, 0x250cbce2, 0x6e65e695, 0x636ee89c, 0x7473fa87, 0x7978f48e, 0x5a49deb1, 0x5742d0b8, 0x405fc2a3, 0x4d54ccaa, 0xdaf741ec, 0xd7fc4fe5, 0xc0e15dfe, 0xcdea53f7, 0xeedb79c8, 0xe3d077c1, 0xf4cd65da, 0xf9c66bd3, 0xb2af31a4, 0xbfa43fad, 0xa8b92db6, 0xa5b223bf, 0x86830980, 0x8b880789, 0x9c951592, 0x919e1b9b, 0x0a47a17c, 0x074caf75, 0x1051bd6e, 0x1d5ab367, 0x3e6b9958, 0x33609751, 0x247d854a, 0x29768b43, 0x621fd134, 0x6f14df3d, 0x7809cd26, 0x7502c32f, 0x5633e910, 0x5b38e719, 0x4c25f502, 0x412efb0b, 0x618c9ad7, 0x6c8794de, 0x7b9a86c5, 0x769188cc, 0x55a0a2f3, 0x58abacfa, 0x4fb6bee1, 0x42bdb0e8, 0x09d4ea9f, 0x04dfe496, 0x13c2f68d, 0x1ec9f884, 0x3df8d2bb, 0x30f3dcb2, 0x27eecea9, 0x2ae5c0a0, 0xb13c7a47, 0xbc37744e, 0xab2a6655, 0xa621685c, 0x85104263, 0x881b4c6a, 0x9f065e71, 0x920d5078, 0xd9640a0f, 0xd46f0406, 0xc372161d, 0xce791814, 0xed48322b, 0xe0433c22, 0xf75e2e39, 0xfa552030, 0xb701ec9a, 0xba0ae293, 0xad17f088, 0xa01cfe81, 0x832dd4be, 0x8e26dab7, 0x993bc8ac, 0x9430c6a5, 0xdf599cd2, 0xd25292db, 0xc54f80c0, 0xc8448ec9, 0xeb75a4f6, 0xe67eaaff, 0xf163b8e4, 0xfc68b6ed, 0x67b10c0a, 0x6aba0203, 0x7da71018, 0x70ac1e11, 0x539d342e, 0x5e963a27, 0x498b283c, 0x44802635, 0x0fe97c42, 0x02e2724b, 0x15ff6050, 0x18f46e59, 0x3bc54466, 0x36ce4a6f, 0x21d35874, 0x2cd8567d, 0x0c7a37a1, 0x017139a8, 0x166c2bb3, 0x1b6725ba, 0x38560f85, 0x355d018c, 0x22401397, 0x2f4b1d9e, 0x642247e9, 0x692949e0, 0x7e345bfb, 0x733f55f2, 0x500e7fcd, 0x5d0571c4, 0x4a1863df, 0x47136dd6, 0xdccad731, 0xd1c1d938, 0xc6dccb23, 0xcbd7c52a, 0xe8e6ef15, 0xe5ede11c, 0xf2f0f307, 0xfffbfd0e, 0xb492a779, 0xb999a970, 0xae84bb6b, 0xa38fb562, 0x80be9f5d, 0x8db59154, 0x9aa8834f, 0x97a38d46];
    var U4 = [0x00000000, 0x090d0b0e, 0x121a161c, 0x1b171d12, 0x24342c38, 0x2d392736, 0x362e3a24, 0x3f23312a, 0x48685870, 0x4165537e, 0x5a724e6c, 0x537f4562, 0x6c5c7448, 0x65517f46, 0x7e466254, 0x774b695a, 0x90d0b0e0, 0x99ddbbee, 0x82caa6fc, 0x8bc7adf2, 0xb4e49cd8, 0xbde997d6, 0xa6fe8ac4, 0xaff381ca, 0xd8b8e890, 0xd1b5e39e, 0xcaa2fe8c, 0xc3aff582, 0xfc8cc4a8, 0xf581cfa6, 0xee96d2b4, 0xe79bd9ba, 0x3bbb7bdb, 0x32b670d5, 0x29a16dc7, 0x20ac66c9, 0x1f8f57e3, 0x16825ced, 0x0d9541ff, 0x04984af1, 0x73d323ab, 0x7ade28a5, 0x61c935b7, 0x68c43eb9, 0x57e70f93, 0x5eea049d, 0x45fd198f, 0x4cf01281, 0xab6bcb3b, 0xa266c035, 0xb971dd27, 0xb07cd629, 0x8f5fe703, 0x8652ec0d, 0x9d45f11f, 0x9448fa11, 0xe303934b, 0xea0e9845, 0xf1198557, 0xf8148e59, 0xc737bf73, 0xce3ab47d, 0xd52da96f, 0xdc20a261, 0x766df6ad, 0x7f60fda3, 0x6477e0b1, 0x6d7aebbf, 0x5259da95, 0x5b54d19b, 0x4043cc89, 0x494ec787, 0x3e05aedd, 0x3708a5d3, 0x2c1fb8c1, 0x2512b3cf, 0x1a3182e5, 0x133c89eb, 0x082b94f9, 0x01269ff7, 0xe6bd464d, 0xefb04d43, 0xf4a75051, 0xfdaa5b5f, 0xc2896a75, 0xcb84617b, 0xd0937c69, 0xd99e7767, 0xaed51e3d, 0xa7d81533, 0xbccf0821, 0xb5c2032f, 0x8ae13205, 0x83ec390b, 0x98fb2419, 0x91f62f17, 0x4dd68d76, 0x44db8678, 0x5fcc9b6a, 0x56c19064, 0x69e2a14e, 0x60efaa40, 0x7bf8b752, 0x72f5bc5c, 0x05bed506, 0x0cb3de08, 0x17a4c31a, 0x1ea9c814, 0x218af93e, 0x2887f230, 0x3390ef22, 0x3a9de42c, 0xdd063d96, 0xd40b3698, 0xcf1c2b8a, 0xc6112084, 0xf93211ae, 0xf03f1aa0, 0xeb2807b2, 0xe2250cbc, 0x956e65e6, 0x9c636ee8, 0x877473fa, 0x8e7978f4, 0xb15a49de, 0xb85742d0, 0xa3405fc2, 0xaa4d54cc, 0xecdaf741, 0xe5d7fc4f, 0xfec0e15d, 0xf7cdea53, 0xc8eedb79, 0xc1e3d077, 0xdaf4cd65, 0xd3f9c66b, 0xa4b2af31, 0xadbfa43f, 0xb6a8b92d, 0xbfa5b223, 0x80868309, 0x898b8807, 0x929c9515, 0x9b919e1b, 0x7c0a47a1, 0x75074caf, 0x6e1051bd, 0x671d5ab3, 0x583e6b99, 0x51336097, 0x4a247d85, 0x4329768b, 0x34621fd1, 0x3d6f14df, 0x267809cd, 0x2f7502c3, 0x105633e9, 0x195b38e7, 0x024c25f5, 0x0b412efb, 0xd7618c9a, 0xde6c8794, 0xc57b9a86, 0xcc769188, 0xf355a0a2, 0xfa58abac, 0xe14fb6be, 0xe842bdb0, 0x9f09d4ea, 0x9604dfe4, 0x8d13c2f6, 0x841ec9f8, 0xbb3df8d2, 0xb230f3dc, 0xa927eece, 0xa02ae5c0, 0x47b13c7a, 0x4ebc3774, 0x55ab2a66, 0x5ca62168, 0x63851042, 0x6a881b4c, 0x719f065e, 0x78920d50, 0x0fd9640a, 0x06d46f04, 0x1dc37216, 0x14ce7918, 0x2bed4832, 0x22e0433c, 0x39f75e2e, 0x30fa5520, 0x9ab701ec, 0x93ba0ae2, 0x88ad17f0, 0x81a01cfe, 0xbe832dd4, 0xb78e26da, 0xac993bc8, 0xa59430c6, 0xd2df599c, 0xdbd25292, 0xc0c54f80, 0xc9c8448e, 0xf6eb75a4, 0xffe67eaa, 0xe4f163b8, 0xedfc68b6, 0x0a67b10c, 0x036aba02, 0x187da710, 0x1170ac1e, 0x2e539d34, 0x275e963a, 0x3c498b28, 0x35448026, 0x420fe97c, 0x4b02e272, 0x5015ff60, 0x5918f46e, 0x663bc544, 0x6f36ce4a, 0x7421d358, 0x7d2cd856, 0xa10c7a37, 0xa8017139, 0xb3166c2b, 0xba1b6725, 0x8538560f, 0x8c355d01, 0x97224013, 0x9e2f4b1d, 0xe9642247, 0xe0692949, 0xfb7e345b, 0xf2733f55, 0xcd500e7f, 0xc45d0571, 0xdf4a1863, 0xd647136d, 0x31dccad7, 0x38d1c1d9, 0x23c6dccb, 0x2acbd7c5, 0x15e8e6ef, 0x1ce5ede1, 0x07f2f0f3, 0x0efffbfd, 0x79b492a7, 0x70b999a9, 0x6bae84bb, 0x62a38fb5, 0x5d80be9f, 0x548db591, 0x4f9aa883, 0x4697a38d];

    function convertToInt32(bytes) {
        var result = [];
        for (var i = 0; i < bytes.length; i += 4) {
            result.push(
                (bytes[i    ] << 24) |
                (bytes[i + 1] << 16) |
                (bytes[i + 2] <<  8) |
                 bytes[i + 3]
            );
        }
        return result;
    }

    var AES = function(key) {
        if (!(this instanceof AES)) {
            throw Error('AES must be instanitated with `new`');
        }

        Object.defineProperty(this, 'key', {
            value: coerceArray(key, true)
        });

        this._prepare();
    };


    AES.prototype._prepare = function() {

        var rounds = numberOfRounds[this.key.length];
        if (rounds == null) {
            throw new Error('invalid key size (must be 16, 24 or 32 bytes)');
        }

        // encryption round keys
        this._Ke = [];

        // decryption round keys
        this._Kd = [];

        for (var i = 0; i <= rounds; i++) {
            this._Ke.push([0, 0, 0, 0]);
            this._Kd.push([0, 0, 0, 0]);
        }

        var roundKeyCount = (rounds + 1) * 4;
        var KC = this.key.length / 4;

        // convert the key into ints
        var tk = convertToInt32(this.key);

        // copy values into round key arrays
        var index;
        for (var i = 0; i < KC; i++) {
            index = i >> 2;
            this._Ke[index][i % 4] = tk[i];
            this._Kd[rounds - index][i % 4] = tk[i];
        }

        // key expansion (fips-197 section 5.2)
        var rconpointer = 0;
        var t = KC, tt;
        while (t < roundKeyCount) {
            tt = tk[KC - 1];
            tk[0] ^= ((S[(tt >> 16) & 0xFF] << 24) ^
                      (S[(tt >>  8) & 0xFF] << 16) ^
                      (S[ tt        & 0xFF] <<  8) ^
                       S[(tt >> 24) & 0xFF]        ^
                      (rcon[rconpointer] << 24));
            rconpointer += 1;

            // key expansion (for non-256 bit)
            if (KC != 8) {
                for (var i = 1; i < KC; i++) {
                    tk[i] ^= tk[i - 1];
                }

            // key expansion for 256-bit keys is "slightly different" (fips-197)
            } else {
                for (var i = 1; i < (KC / 2); i++) {
                    tk[i] ^= tk[i - 1];
                }
                tt = tk[(KC / 2) - 1];

                tk[KC / 2] ^= (S[ tt        & 0xFF]        ^
                              (S[(tt >>  8) & 0xFF] <<  8) ^
                              (S[(tt >> 16) & 0xFF] << 16) ^
                              (S[(tt >> 24) & 0xFF] << 24));

                for (var i = (KC / 2) + 1; i < KC; i++) {
                    tk[i] ^= tk[i - 1];
                }
            }

            // copy values into round key arrays
            var i = 0, r, c;
            while (i < KC && t < roundKeyCount) {
                r = t >> 2;
                c = t % 4;
                this._Ke[r][c] = tk[i];
                this._Kd[rounds - r][c] = tk[i++];
                t++;
            }
        }

        // inverse-cipher-ify the decryption round key (fips-197 section 5.3)
        for (var r = 1; r < rounds; r++) {
            for (var c = 0; c < 4; c++) {
                tt = this._Kd[r][c];
                this._Kd[r][c] = (U1[(tt >> 24) & 0xFF] ^
                                  U2[(tt >> 16) & 0xFF] ^
                                  U3[(tt >>  8) & 0xFF] ^
                                  U4[ tt        & 0xFF]);
            }
        }
    };

    AES.prototype.encrypt = function(plaintext) {
        if (plaintext.length != 16) {
            throw new Error('invalid plaintext size (must be 16 bytes)');
        }

        var rounds = this._Ke.length - 1;
        var a = [0, 0, 0, 0];

        // convert plaintext to (ints ^ key)
        var t = convertToInt32(plaintext);
        for (var i = 0; i < 4; i++) {
            t[i] ^= this._Ke[0][i];
        }

        // apply round transforms
        for (var r = 1; r < rounds; r++) {
            for (var i = 0; i < 4; i++) {
                a[i] = (T1[(t[ i         ] >> 24) & 0xff] ^
                        T2[(t[(i + 1) % 4] >> 16) & 0xff] ^
                        T3[(t[(i + 2) % 4] >>  8) & 0xff] ^
                        T4[ t[(i + 3) % 4]        & 0xff] ^
                        this._Ke[r][i]);
            }
            t = a.slice();
        }

        // the last round is special
        var result = createArray(16), tt;
        for (var i = 0; i < 4; i++) {
            tt = this._Ke[rounds][i];
            result[4 * i    ] = (S[(t[ i         ] >> 24) & 0xff] ^ (tt >> 24)) & 0xff;
            result[4 * i + 1] = (S[(t[(i + 1) % 4] >> 16) & 0xff] ^ (tt >> 16)) & 0xff;
            result[4 * i + 2] = (S[(t[(i + 2) % 4] >>  8) & 0xff] ^ (tt >>  8)) & 0xff;
            result[4 * i + 3] = (S[ t[(i + 3) % 4]        & 0xff] ^  tt       ) & 0xff;
        }

        return result;
    };

    AES.prototype.decrypt = function(ciphertext) {
        if (ciphertext.length != 16) {
            throw new Error('invalid ciphertext size (must be 16 bytes)');
        }

        var rounds = this._Kd.length - 1;
        var a = [0, 0, 0, 0];

        // convert plaintext to (ints ^ key)
        var t = convertToInt32(ciphertext);
        for (var i = 0; i < 4; i++) {
            t[i] ^= this._Kd[0][i];
        }

        // apply round transforms
        for (var r = 1; r < rounds; r++) {
            for (var i = 0; i < 4; i++) {
                a[i] = (T5[(t[ i          ] >> 24) & 0xff] ^
                        T6[(t[(i + 3) % 4] >> 16) & 0xff] ^
                        T7[(t[(i + 2) % 4] >>  8) & 0xff] ^
                        T8[ t[(i + 1) % 4]        & 0xff] ^
                        this._Kd[r][i]);
            }
            t = a.slice();
        }

        // the last round is special
        var result = createArray(16), tt;
        for (var i = 0; i < 4; i++) {
            tt = this._Kd[rounds][i];
            result[4 * i    ] = (Si[(t[ i         ] >> 24) & 0xff] ^ (tt >> 24)) & 0xff;
            result[4 * i + 1] = (Si[(t[(i + 3) % 4] >> 16) & 0xff] ^ (tt >> 16)) & 0xff;
            result[4 * i + 2] = (Si[(t[(i + 2) % 4] >>  8) & 0xff] ^ (tt >>  8)) & 0xff;
            result[4 * i + 3] = (Si[ t[(i + 1) % 4]        & 0xff] ^  tt       ) & 0xff;
        }

        return result;
    };


    /**
     *  Mode Of Operation - Electonic Codebook (ECB)
     */
    var ModeOfOperationECB = function(key) {
        if (!(this instanceof ModeOfOperationECB)) {
            throw Error('AES must be instanitated with `new`');
        }

        this.description = "Electronic Code Block";
        this.name = "ecb";

        this._aes = new AES(key);
    };

    ModeOfOperationECB.prototype.encrypt = function(plaintext) {
        plaintext = coerceArray(plaintext);

        if ((plaintext.length % 16) !== 0) {
            throw new Error('invalid plaintext size (must be multiple of 16 bytes)');
        }

        var ciphertext = createArray(plaintext.length);
        var block = createArray(16);

        for (var i = 0; i < plaintext.length; i += 16) {
            copyArray(plaintext, block, 0, i, i + 16);
            block = this._aes.encrypt(block);
            copyArray(block, ciphertext, i);
        }

        return ciphertext;
    };

    ModeOfOperationECB.prototype.decrypt = function(ciphertext) {
        ciphertext = coerceArray(ciphertext);

        if ((ciphertext.length % 16) !== 0) {
            throw new Error('invalid ciphertext size (must be multiple of 16 bytes)');
        }

        var plaintext = createArray(ciphertext.length);
        var block = createArray(16);

        for (var i = 0; i < ciphertext.length; i += 16) {
            copyArray(ciphertext, block, 0, i, i + 16);
            block = this._aes.decrypt(block);
            copyArray(block, plaintext, i);
        }

        return plaintext;
    };


    /**
     *  Mode Of Operation - Cipher Block Chaining (CBC)
     */
    var ModeOfOperationCBC = function(key, iv) {
        if (!(this instanceof ModeOfOperationCBC)) {
            throw Error('AES must be instanitated with `new`');
        }

        this.description = "Cipher Block Chaining";
        this.name = "cbc";

        if (!iv) {
            iv = createArray(16);

        } else if (iv.length != 16) {
            throw new Error('invalid initialation vector size (must be 16 bytes)');
        }

        this._lastCipherblock = coerceArray(iv, true);

        this._aes = new AES(key);
    };

    ModeOfOperationCBC.prototype.encrypt = function(plaintext) {
        plaintext = coerceArray(plaintext);

        if ((plaintext.length % 16) !== 0) {
            throw new Error('invalid plaintext size (must be multiple of 16 bytes)');
        }

        var ciphertext = createArray(plaintext.length);
        var block = createArray(16);

        for (var i = 0; i < plaintext.length; i += 16) {
            copyArray(plaintext, block, 0, i, i + 16);

            for (var j = 0; j < 16; j++) {
                block[j] ^= this._lastCipherblock[j];
            }

            this._lastCipherblock = this._aes.encrypt(block);
            copyArray(this._lastCipherblock, ciphertext, i);
        }

        return ciphertext;
    };

    ModeOfOperationCBC.prototype.decrypt = function(ciphertext) {
        ciphertext = coerceArray(ciphertext);

        if ((ciphertext.length % 16) !== 0) {
            throw new Error('invalid ciphertext size (must be multiple of 16 bytes)');
        }

        var plaintext = createArray(ciphertext.length);
        var block = createArray(16);

        for (var i = 0; i < ciphertext.length; i += 16) {
            copyArray(ciphertext, block, 0, i, i + 16);
            block = this._aes.decrypt(block);

            for (var j = 0; j < 16; j++) {
                plaintext[i + j] = block[j] ^ this._lastCipherblock[j];
            }

            copyArray(ciphertext, this._lastCipherblock, 0, i, i + 16);
        }

        return plaintext;
    };


    /**
     *  Mode Of Operation - Cipher Feedback (CFB)
     */
    var ModeOfOperationCFB = function(key, iv, segmentSize) {
        if (!(this instanceof ModeOfOperationCFB)) {
            throw Error('AES must be instanitated with `new`');
        }

        this.description = "Cipher Feedback";
        this.name = "cfb";

        if (!iv) {
            iv = createArray(16);

        } else if (iv.length != 16) {
            throw new Error('invalid initialation vector size (must be 16 size)');
        }

        if (!segmentSize) { segmentSize = 1; }

        this.segmentSize = segmentSize;

        this._shiftRegister = coerceArray(iv, true);

        this._aes = new AES(key);
    };

    ModeOfOperationCFB.prototype.encrypt = function(plaintext) {
        if ((plaintext.length % this.segmentSize) != 0) {
            throw new Error('invalid plaintext size (must be segmentSize bytes)');
        }

        var encrypted = coerceArray(plaintext, true);

        var xorSegment;
        for (var i = 0; i < encrypted.length; i += this.segmentSize) {
            xorSegment = this._aes.encrypt(this._shiftRegister);
            for (var j = 0; j < this.segmentSize; j++) {
                encrypted[i + j] ^= xorSegment[j];
            }

            // Shift the register
            copyArray(this._shiftRegister, this._shiftRegister, 0, this.segmentSize);
            copyArray(encrypted, this._shiftRegister, 16 - this.segmentSize, i, i + this.segmentSize);
        }

        return encrypted;
    };

    ModeOfOperationCFB.prototype.decrypt = function(ciphertext) {
        if ((ciphertext.length % this.segmentSize) != 0) {
            throw new Error('invalid ciphertext size (must be segmentSize bytes)');
        }

        var plaintext = coerceArray(ciphertext, true);

        var xorSegment;
        for (var i = 0; i < plaintext.length; i += this.segmentSize) {
            xorSegment = this._aes.encrypt(this._shiftRegister);

            for (var j = 0; j < this.segmentSize; j++) {
                plaintext[i + j] ^= xorSegment[j];
            }

            // Shift the register
            copyArray(this._shiftRegister, this._shiftRegister, 0, this.segmentSize);
            copyArray(ciphertext, this._shiftRegister, 16 - this.segmentSize, i, i + this.segmentSize);
        }

        return plaintext;
    };

    /**
     *  Mode Of Operation - Output Feedback (OFB)
     */
    var ModeOfOperationOFB = function(key, iv) {
        if (!(this instanceof ModeOfOperationOFB)) {
            throw Error('AES must be instanitated with `new`');
        }

        this.description = "Output Feedback";
        this.name = "ofb";

        if (!iv) {
            iv = createArray(16);

        } else if (iv.length != 16) {
            throw new Error('invalid initialation vector size (must be 16 bytes)');
        }

        this._lastPrecipher = coerceArray(iv, true);
        this._lastPrecipherIndex = 16;

        this._aes = new AES(key);
    };

    ModeOfOperationOFB.prototype.encrypt = function(plaintext) {
        var encrypted = coerceArray(plaintext, true);

        for (var i = 0; i < encrypted.length; i++) {
            if (this._lastPrecipherIndex === 16) {
                this._lastPrecipher = this._aes.encrypt(this._lastPrecipher);
                this._lastPrecipherIndex = 0;
            }
            encrypted[i] ^= this._lastPrecipher[this._lastPrecipherIndex++];
        }

        return encrypted;
    };

    // Decryption is symetric
    ModeOfOperationOFB.prototype.decrypt = ModeOfOperationOFB.prototype.encrypt;


    /**
     *  Counter object for CTR common mode of operation
     */
    var Counter = function(initialValue) {
        if (!(this instanceof Counter)) {
            throw Error('Counter must be instanitated with `new`');
        }

        // We allow 0, but anything false-ish uses the default 1
        if (initialValue !== 0 && !initialValue) { initialValue = 1; }

        if (typeof(initialValue) === 'number') {
            this._counter = createArray(16);
            this.setValue(initialValue);

        } else {
            this.setBytes(initialValue);
        }
    };

    Counter.prototype.setValue = function(value) {
        if (typeof(value) !== 'number' || parseInt(value) != value) {
            throw new Error('invalid counter value (must be an integer)');
        }

        // We cannot safely handle numbers beyond the safe range for integers
        if (value > Number.MAX_SAFE_INTEGER) {
            throw new Error('integer value out of safe range');
        }

        for (var index = 15; index >= 0; --index) {
            this._counter[index] = value % 256;
            value = parseInt(value / 256);
        }
    };

    Counter.prototype.setBytes = function(bytes) {
        bytes = coerceArray(bytes, true);

        if (bytes.length != 16) {
            throw new Error('invalid counter bytes size (must be 16 bytes)');
        }

        this._counter = bytes;
    };

    Counter.prototype.increment = function() {
        for (var i = 15; i >= 0; i--) {
            if (this._counter[i] === 255) {
                this._counter[i] = 0;
            } else {
                this._counter[i]++;
                break;
            }
        }
    };


    /**
     *  Mode Of Operation - Counter (CTR)
     */
    var ModeOfOperationCTR = function(key, counter) {
        if (!(this instanceof ModeOfOperationCTR)) {
            throw Error('AES must be instanitated with `new`');
        }

        this.description = "Counter";
        this.name = "ctr";

        if (!(counter instanceof Counter)) {
            counter = new Counter(counter);
        }

        this._counter = counter;

        this._remainingCounter = null;
        this._remainingCounterIndex = 16;

        this._aes = new AES(key);
    };

    ModeOfOperationCTR.prototype.encrypt = function(plaintext) {
        var encrypted = coerceArray(plaintext, true);

        for (var i = 0; i < encrypted.length; i++) {
            if (this._remainingCounterIndex === 16) {
                this._remainingCounter = this._aes.encrypt(this._counter._counter);
                this._remainingCounterIndex = 0;
                this._counter.increment();
            }
            encrypted[i] ^= this._remainingCounter[this._remainingCounterIndex++];
        }

        return encrypted;
    };

    // Decryption is symetric
    ModeOfOperationCTR.prototype.decrypt = ModeOfOperationCTR.prototype.encrypt;


    ///////////////////////
    // Padding

    // See:https://tools.ietf.org/html/rfc2315
    function pkcs7pad(data) {
        data = coerceArray(data, true);
        var padder = 16 - (data.length % 16);
        var result = createArray(data.length + padder);
        copyArray(data, result);
        for (var i = data.length; i < result.length; i++) {
            result[i] = padder;
        }
        return result;
    }

    function pkcs7strip(data) {
        data = coerceArray(data, true);
        if (data.length < 16) { throw new Error('PKCS#7 invalid length'); }

        var padder = data[data.length - 1];
        if (padder > 16) { throw new Error('PKCS#7 padding byte out of range'); }

        var length = data.length - padder;
        for (var i = 0; i < padder; i++) {
            if (data[length + i] !== padder) {
                throw new Error('PKCS#7 invalid padding byte');
            }
        }

        var result = createArray(length);
        copyArray(data, result, 0, 0, length);
        return result;
    }

    ///////////////////////
    // Exporting


    // The block cipher
    var aesjs = {
        AES: AES,
        Counter: Counter,

        ModeOfOperation: {
            ecb: ModeOfOperationECB,
            cbc: ModeOfOperationCBC,
            cfb: ModeOfOperationCFB,
            ofb: ModeOfOperationOFB,
            ctr: ModeOfOperationCTR
        },

        utils: {
            hex: convertHex,
            utf8: convertUtf8
        },

        padding: {
            pkcs7: {
                pad: pkcs7pad,
                strip: pkcs7strip
            }
        },

        _arrayTest: {
            coerceArray: coerceArray,
            createArray: createArray,
            copyArray: copyArray,
        }
    };


    // node.js
    {
        module.exports = aesjs;

    // RequireJS/AMD
    // http://www.requirejs.org/docs/api.html
    // https://github.com/amdjs/amdjs-api/wiki/AMD
    }


})(commonjsGlobal);
});

class KeystoreWalletProvider {
    constructor(keystore, password) {
        this.keystore = keystore;
        this.password = password;
    }
    init(keystore, password) {
        this.keystore = keystore;
        this.password = password;
        this.privateKey = null;
        this.publicKey = null;
        this.address = null;
    }
    async unlock(progressCallback) {
        try {
            if (!this.password) {
                throw new Error('No password given.');
            }
            let ksv3 = this.fromRlp(this.keystore);
            console.log(ksv3);
            return this._decrypt(ksv3, this.password, progressCallback);
        }
        catch (error) {
            console.log(error);
            throw error;
        }
    }
    async sign(transaction) {
        let mainThis = this;
        if (!mainThis.privateKey) {
            throw new Error("Can not sign a transaction with null privatekey");
        }
        let encodedSignedTxn = TransactionUtil.signTransaction(transaction, mainThis.privateKey);
        return encodedSignedTxn;
    }
    fromRlp(keystore) {
        let hexContent = Buffer$1.from(keystore, 'hex');
        let Ksv3 = aionRlp.decode(hexContent);
        const Crypto = aionRlp.decode(Ksv3[3]);
        const Cipherparams = aionRlp.decode(Crypto[4]);
        const Kdfparams = aionRlp.decode(Crypto[5]);
        let ksv3Json = {
            id: Ksv3[0].toString('utf8'),
            version: parseInt(Ksv3[1].toString('hex'), 16),
            address: Ksv3[2].toString('utf8'),
            crypto: {
                cipher: Crypto[0].toString('utf8'),
                ciphertext: Crypto[1].toString('utf8'),
                kdf: Crypto[2].toString('utf8'),
                mac: Crypto[3].toString('utf8'),
                cipherparams: {
                    iv: Cipherparams[0].toString('utf8')
                },
                kdfparams: {
                    dklen: parseInt(Kdfparams[1].toString('hex'), 16),
                    n: parseInt(Kdfparams[2].toString('hex'), 16),
                    p: parseInt(Kdfparams[3].toString('hex'), 16),
                    r: parseInt(Kdfparams[4].toString('hex'), 16),
                    salt: Kdfparams[5].toString('utf8')
                }
            }
        };
        return ksv3Json;
    }
    async _decrypt(v3Keystore, password, progressCallback) {
        if (!password) {
            throw new Error('No password given.');
        }
        let json = v3Keystore;
        if (json.version !== 3) {
            throw new Error('Not a valid V3 wallet');
        }
        let mainThis = this;
        return new Promise(function (resolve, reject) {
            let kdfparams;
            if (json.crypto.kdf === 'scrypt') {
                kdfparams = json.crypto.kdfparams;
                scrypt(new Buffer$1(password), new Buffer$1(kdfparams.salt, 'hex'), kdfparams.n, kdfparams.r, kdfparams.p, kdfparams.dklen, function (error, _progress, key) {
                    if (error) {
                        console.log("Error: " + error);
                        reject(error);
                    }
                    else if (key) {
                        console.log("Start unlocking.....");
                        try {
                            const ciphertext = new Buffer$1(json.crypto.ciphertext, 'hex');
                            let buffKey = new Buffer$1(key);
                            let mac = CryptoUtil.uia2hex(CryptoUtil.blake2b256(Buffer$1.concat([buffKey.slice(16, 32), ciphertext])));
                            if (!json.crypto.mac.startsWith("0x"))
                                mac = mac.substring(2);
                            if (mac !== json.crypto.mac) {
                                throw new Error('Key derivation failed - possibly wrong password');
                            }
                            if (json.crypto.cipher !== 'aes-128-ctr')
                                throw new Error("Cipher not supported yet : " + json.crypto.cipher);
                            const aesCbc = new aesJs.ModeOfOperation.ctr(buffKey.slice(0, 16), new Buffer$1(json.crypto.cipherparams.iv, 'hex'));
                            const seed = aesCbc.decrypt(ciphertext);
                            let keyPair = mainThis._createKeyPair(seed);
                            mainThis.address = CryptoUtil.createA0Address(keyPair._publicKey);
                            mainThis.privateKey = CryptoUtil.uia2hex(keyPair._privateKey, true);
                            mainThis.publicKey = CryptoUtil.uia2hex(keyPair._publicKey);
                            resolve([mainThis.address, mainThis.publicKey]);
                        }
                        catch (error) {
                            console.error(error);
                            reject(error);
                        }
                    }
                    else {
                        if (progressCallback)
                            progressCallback(_progress * 100);
                    }
                });
            }
            else if (json.crypto.kdf === 'pbkdf2') {
                let error = new Error('pbkdf2 is unsupported by AION keystore format');
                console.error(error);
                reject(error);
            }
            else {
                let error = new Error('Unsupported key derivation scheme');
                console.error(error);
                reject(error);
            }
        });
    }
    _createKeyPair(privateKey) {
        let kp;
        let keyPair;
        if (privateKey !== undefined) {
            kp = naclFast.sign.keyPair.fromSecretKey(privateKey);
            keyPair = {
                _privateKey: Buffer$1.from(kp.secretKey),
                _publicKey: Buffer$1.from(kp.publicKey)
            };
            return keyPair;
        }
    }
}

class AionPayService {
    constructor(gqlUrl) {
        this.NONCE_NRG_QUERY = `
    query nonceAndNrg($address: String!, $txArgs:  TxArgsInput!) {
     chainApi {
      nonce(address: $address) 
     }
     txnApi {
       estimateNrgByTxArgs(txArgs: $txArgs)
     }
   }`;
        this.BALANCE_QUERY = `
    query nonce($address: String!) {
     chainApi {
      balance(address: $address) 
     }
     txnApi {
      nrgPrice
     }
    }`;
        this.SEND_RAWTXN_QUERY = `
    mutation sendRawTransaction($encodedTx: String!) {
     txnApi {
        sendRawTransaction(encodedTx: $encodedTx) {
          status
          msgHash
          txHash
          txResult
          txDeploy
          error
        }
      }
    }`;
        this.gqlUrl = gqlUrl;
    }
    fetchNonceNrg(address, txn) {
        let txArgs = {
            to: txn.to,
            from: address,
            value: txn.value,
            data: txn.data,
        };
        console.log(txArgs);
        return fetch(this.gqlUrl, {
            method: 'POST',
            headers: { 'Content-Type': 'application/json' },
            body: JSON.stringify({ "query": this.NONCE_NRG_QUERY, "variables": { "address": address, "txArgs": txArgs } }),
        })
            .then(res => res.json())
            .then(res => {
            console.log("Nonce & NrgPrice fetched");
            let error = this.getError(res);
            if (error) {
                throw new Error(error);
            }
            let nonceData = ((res["data"])["chainApi"])["nonce"];
            let estimatedNrg = null;
            try {
                estimatedNrg = ((res["data"])["txnApi"])["estimateNrgByTxArgs"];
            }
            catch (e) {
                console.log("Error getting estimated energy");
            }
            try {
                let nonce = nonceData;
                return [nonce, estimatedNrg];
            }
            catch (e) {
                console.log(e);
                throw new Error("Unable to get nonce or estimated nrg");
            }
        });
    }
    fetchBalance(address) {
        return fetch(this.gqlUrl, {
            method: 'POST',
            headers: { 'Content-Type': 'application/json' },
            body: JSON.stringify({ "query": this.BALANCE_QUERY, "variables": { "address": address } }),
        })
            .then(res => res.json())
            .then(res => {
            console.log("Balance fetched");
            let error = this.getError(res);
            if (error) {
                throw new Error(error);
            }
            let data = ((res["data"])["chainApi"])["balance"];
            let nrgPriceData = null;
            try {
                nrgPriceData = ((res["data"])["txnApi"])["nrgPrice"];
            }
            catch (e) {
                console.log("Error getting current nrg price");
            }
            console.log("Nrg price fetched is " + nrgPriceData);
            if (data) {
                let balance = data;
                if (nrgPriceData)
                    nrgPriceData = nrgPriceData;
                return [balance, nrgPriceData];
            }
            else
                return null;
        });
    }
    sendRawTransaction(encodedTx) {
        return fetch(this.gqlUrl, {
            method: 'POST',
            headers: { 'Content-Type': 'application/json' },
            body: JSON.stringify({ "query": this.SEND_RAWTXN_QUERY, "variables": { "encodedTx": encodedTx } }),
        })
            .then(res => res.json())
            .then(res => {
            let error = this.getError(res);
            if (error) {
                throw new Error(error);
            }
            let data = ((res["data"])["txnApi"])["sendRawTransaction"];
            if (data) {
                let txnResponse = data;
                return txnResponse;
            }
            else
                return null;
        });
    }
    getError(res) {
        let errors = this._getErrors(res);
        if (errors.length > 0) {
            let errorMsg = '';
            errors.forEach(e => errorMsg += e + ", ");
            return errorMsg;
        }
        else
            return null;
    }
    _getErrors(res) {
        let errors = res["errors"];
        if (errors && errors.length > 0) {
            return errors.map(error => error["message"]);
        }
        else
            return [];
    }
}

class AionPay {
    constructor() {
        this.default_button_text = "Pay";
        this.to_readonly = false;
        this.readonly = false;
        this.unlockBy = "ledger";
        this.visible = false;
        this.inputDialogEnable = false;
        this.txnInProgress = false;
        this.txnDone = false;
        this.showConfirm = false;
        this.isNotification = false;
        this.isError = false;
        this.errors = [];
        this.keystoreLoadingPercentage = 0;
        this.gas = TransactionUtil.defaultNrgLimit;
        this.gasPrice = TransactionUtil.defaultNrgPrice;
        this.txnResponse = new TxnResponse();
        this.handleHidePaymentDialog = this.handleHidePaymentDialog.bind(this);
        this.handleShowPaymentDialog = this.handleShowPaymentDialog.bind(this);
        this.handleHideTransactionInprogressDialog = this.handleHideTransactionInprogressDialog.bind(this);
        this.handleCloseConfirmDialog = this.handleCloseConfirmDialog.bind(this);
        this.handleHideError = this.handleHideError.bind(this);
        this.handleHideNotification = this.handleHideNotification.bind(this);
        this.handleResetData = this.handleResetData.bind(this);
        this.handleShowInputDialog = this.handleShowInputDialog.bind(this);
        this.handleHideInputDialog = this.handleHideInputDialog.bind(this);
        this.signPayment = this.signPayment.bind(this);
        this.confirmPayment = this.confirmPayment.bind(this);
        this.handleUnlockBy = this.handleUnlockBy.bind(this);
        this.handleFromInput = this.handleFromInput.bind(this);
        this.handleToInput = this.handleToInput.bind(this);
        this.handleValueInput = this.handleValueInput.bind(this);
        this.handleNrgInput = this.handleNrgInput.bind(this);
        this.handleNrgPriceInput = this.handleNrgPriceInput.bind(this);
        this.handleMessageInput = this.handleMessageInput.bind(this);
        this.handlePrivateKeyInput = this.handlePrivateKeyInput.bind(this);
        this.handleKeyStoreFileSelected = this.handleKeyStoreFileSelected.bind(this);
        this.handleKeystorePasswordInput = this.handleKeystorePasswordInput.bind(this);
        this.handleUnlockKeystore = this.handleUnlockKeystore.bind(this);
        this.handleDerivePublicKey = this.handleDerivePublicKey.bind(this);
        this.submitRawTransansaction = this.submitRawTransansaction.bind(this);
        this.handleLedgerConnect = this.handleLedgerConnect.bind(this);
    }
    componentWillLoad() {
        if (this.to)
            this._to = this.to.toLowerCase();
        if (this.to)
            this.to_readonly = true;
        this.service = new AionPayService(this.gqlUrl);
    }
    refreshAndShow() {
        this.handleResetData();
        this.handleShowPaymentDialog();
    }
    showWithData(refId, to, value, data) {
        this.handleResetData();
        this._to = to;
        this.value = value;
        this.message = data;
        this.readonly = true;
        this.refId = refId;
        this.handleShowPaymentDialog();
    }
    handleShowPaymentDialog() {
        this.visible = true;
    }
    handleHidePaymentDialog() {
        this.visible = false;
        this.inputDialogEnable = false;
        this.handleResetData();
    }
    handleShowInputDialog() {
        if (!this.from) {
            this.isError = true;
            this.errors.push("Please select a wallet provider and unlock it.");
            return;
        }
        this.visible = false;
        this.inputDialogEnable = true;
    }
    handleHideInputDialog() {
        this.inputDialogEnable = false;
    }
    handleHideTransactionInprogressDialog() {
        this.txnInProgress = false;
        this.txnDone = false;
        this.visible = false;
        this.handleResetData();
    }
    handleCloseConfirmDialog() {
        this.showConfirm = false;
        this.handleResetData();
    }
    handleHideError() {
        this.isError = false;
        this.errors.length = 0;
    }
    handleHideNotification() {
        this.isNotification = false;
        this.notification = null;
    }
    handleResetData() {
        this.txnInProgress = false;
        this.showConfirm = false;
        this.txnDone = false;
        this.visible = false;
        this.resetFromAddressData();
        if (!this.to_readonly) {
            this._to = '';
        }
        this.value = 0;
        this.message = '';
        this.gas = TransactionUtil.defaultNrgLimit;
        this.gasPrice = TransactionUtil.defaultNrgPrice;
        this.isError = false;
        this.errors.length = 0;
        this.isNotification = false;
        this.notification = '';
        this.resetTxnResponse();
    }
    resetFromAddressData() {
        this.from = '';
        this.fromBalance = null;
        this.privateKey = '';
        this.privateKey = '';
        this.keystore_password = '';
        this.keystore = null;
        this.keystoreLoadingPercentage = 0;
    }
    resetTxnResponse() {
        this.txnResponse.txHash = '';
        this.txnResponse.msgHash = '';
        this.txnResponse.error = '';
        this.txnResponse.txResult = '';
        this.txnResponse.status = '';
    }
    handleUnlockBy(event) {
        let oldValue = this.unlockBy;
        this.unlockBy = event.target.value;
        if (oldValue != this.unlockBy)
            this.resetFromAddressData();
    }
    handleToInput(event) {
        this._to = event.target.value;
        if (event.target.validity.typeMismatch) {
            console.log('this element is not valid');
        }
    }
    handleFromInput(event) {
        this.from = event.target.value;
        if (event.target.validity.typeMismatch) {
            console.log('this element is not valid');
        }
    }
    handleValueInput(event) {
        this.value = event.target.value;
        if (event.target.validity.typeMismatch) {
            console.log('this element is not valid');
        }
    }
    handleNrgInput(event) {
        this.gas = event.target.value;
    }
    handleNrgPriceInput(event) {
        this.gasPrice = event.target.value;
    }
    handleMessageInput(event) {
        this.message = event.target.value;
        if (this.unlockBy == 'ledger') {
            if (this.message.length > 50) {
                if (!this.isError) {
                    this.isError = true;
                    this.errors.length = 0;
                    this.errors.push("Please keep your message within 50 characters while using ledger. Or, your transaction may fail.");
                }
            }
            else {
                if (this.isError) {
                    this.isError = false;
                    this.errors.length = 0;
                }
            }
        }
    }
    handlePrivateKeyInput(event) {
        this.privateKey = event.target.value;
        if (event.target.validity.typeMismatch) {
            console.log('this element is not valid');
        }
    }
    async handleDerivePublicKey() {
        if (!this.privateKey || this.privateKey.trim().length == 0)
            return;
        try {
            this.handleHideError();
            this.provider = null;
            this.provider = new PrivateKeyWalletProvider(this.privateKey);
            let [address] = await this.provider.unlock(null);
            if (address)
                this.from = address;
            this.updateBalance();
        }
        catch (error) {
            console.log(error);
            this.from = '';
            this.fromBalance = null;
            this.isError = true;
            this.errors.push("Public Key derivation failed: " + error.toString());
            throw error;
        }
    }
    async updateBalance() {
        try {
            let [balance, nrgPrice] = await this.service.fetchBalance(this.from);
            if (balance)
                this.fromBalance = CryptoUtil.convertnAmpBalanceToAION(balance);
            if (nrgPrice)
                this.gasPrice = nrgPrice;
        }
        catch (error) {
            this.isError = true;
            this.errors.push("Error getting balance for the address");
            this.errors.push("[Reason] " + error);
            return;
        }
    }
    handleKeyStoreFileSelected(event) {
        this.resetFromAddressData();
        this.keystore = event.srcElement.files[0];
    }
    handleKeystorePasswordInput(event) {
        this.keystore_password = event.target.value;
    }
    async handleUnlockKeystore() {
        let reader = new FileReader();
        try {
            reader.readAsArrayBuffer(this.keystore);
        }
        catch (error) {
            console.error("Error loading keystore file" + error);
            this.isError = true;
            this.errors.push("Invalid keystore file. " + error.toString());
        }
        let me = this;
        reader.onload = async function () {
            let content = reader.result;
            me.handleHideError();
            me.provider = new KeystoreWalletProvider(content, me.keystore_password);
            try {
                let [address] = await me.provider.unlock((progress) => {
                    me.keystoreLoadingPercentage = Math.round(progress);
                });
                me.from = address;
                me.updateBalance();
            }
            catch (error) {
                console.log("Error in opening keystore fie. " + error);
                me.isError = true;
                me.errors.push("Could not open the keystore file. " + error.toString());
            }
        };
    }
    async handleLedgerConnect() {
        this.provider = new LedgerProvider();
        try {
            let [address] = await this.provider.unlock(null);
            this.from = address;
            this.updateBalance();
        }
        catch (e) {
            this.isError = true;
            this.errors.push(e.toString());
        }
    }
    validateInput() {
        this.handleHideError();
        if (isNaN(this.value)) {
            this.isError = true;
            this.errors.push("Amount is not valid");
        }
        if (this.unlockBy == 'private_key') {
            if (!this.privateKey || this.privateKey.trim().length == 0) {
                this.isError = true;
                this.errors.push("Private key can not be empty");
            }
        }
        if (!this._to || this._to.trim().length == 0) {
            this.isError = true;
            this.errors.push("To address can not be empty");
        }
        return !this.isError;
    }
    async signPayment(e) {
        e.preventDefault();
        if (!this.validateInput()) {
            console.log('not a valid input');
            return;
        }
        console.log("All valid input");
        if (!this._to) {
            this.handleDerivePublicKey();
        }
        console.log("lets do signing first..");
        this.amount = CryptoUtil.convertAIONTonAmpBalance(this.value);
        let txn = new Transaction();
        txn.to = this._to;
        txn.value = this.amount;
        if (this.message) {
            txn.data = this.message;
        }
        txn.gas = this.gas + '';
        txn.gasPrice = this.gasPrice + '';
        let retVal = null;
        try {
            retVal = await this.service.fetchNonceNrg(this.from, txn);
        }
        catch (e) {
            this.isError = true;
            this.errors.push("Error to get nonce for the address");
            this.errors.push("[Reason] " + e);
            return;
        }
        if (!retVal) {
            this.isError = true;
            this.errors.push("Unable to get nonce and nrgPrice from AION kernel");
            return;
        }
        txn.nonce = retVal[0];
        let estimatedNrg = retVal[1];
        if (estimatedNrg && estimatedNrg > 0) {
            if (Number(txn.gas) < estimatedNrg) {
                let r = confirm("Estimated Nrg     : " + estimatedNrg + "\nDefault Nrg Limit : " + txn.gas
                    + "\n\nDo you want to update the Nrg Limit to " + estimatedNrg + "?");
                if (r == true) {
                    this.gas = estimatedNrg;
                    return;
                }
            }
        }
        console.log("Fetching current nonce " + txn.nonce);
        if (this.unlockBy == 'ledger') {
            this.isNotification = true;
            this.notification = "Please check your ledger device to confirm the transaction.";
        }
        try {
            this.encodedTxn = await this.provider.sign(txn);
        }
        catch (error) {
            console.log(error);
            this.isError = true;
            this.errors.push("Error in signing transaction. Please refresh and try again");
            this.errors.push("[Reason] " + error);
            throw error;
        }
        this.encodedTxn.input.from = this.from;
        this.showConfirm = true;
        this.visible = false;
        this.inputDialogEnable = false;
        console.log(this.encodedTxn);
    }
    async confirmPayment() {
        this.showConfirm = false;
        this.submitRawTransansaction(this.encodedTxn.rawTransaction);
    }
    async submitRawTransansaction(encodedTx) {
        this.txnInProgress = true;
        this.txnDone = false;
        try {
            this.transactionInProgress.emit({ refId: this.refId, data: encodedTx });
            this.txnResponse = await this.service.sendRawTransaction(encodedTx);
            console.log(this.txnResponse);
            this.txnDone = true;
            this.transactionCompleted.emit({ refId: this.refId, data: this.txnResponse });
        }
        catch (error) {
            this.txnDone = true;
            this.isError = true;
            this.errors.push("Error sending the transaction");
            this.errors.push("[Reason] " + error);
            this.transactionFailed.emit({ refId: this.refId, data: error.toString() });
            throw error;
        }
        finally {
        }
    }
    renderError() {
        return (h("div", { class: "error-section" }, this.isError ?
            h("div", { class: "notification is-warning is-small" },
                h("button", { class: "delete", onClick: this.handleHideError }),
                h("ul", null, this.errors.map((msg) => h("li", null, msg)))) : null));
    }
    renderNotification() {
        return (h("div", null, this.isNotification ?
            h("div", { class: "notification is-info error-section" },
                h("button", { class: "delete", onClick: this.handleHideNotification }),
                this.notification) : null));
    }
    renderSelectProvider() {
        return (h("div", null,
            h("div", { class: "modal is-active" },
                h("div", { class: "modal-background" }),
                h("div", { class: "modal-card" },
                    h("header", { class: "modal-card-head" },
                        h("img", { src: Constant.aion_logo, class: "aion-image" }),
                        h("p", { class: "modal-card-title" }, "Choose your wallet provider"),
                        h("button", { class: "delete", "aria-label": "close", onClick: this.handleHidePaymentDialog }, "\u00D7")),
                    h("section", { class: "modal-card-body" },
                        this.renderError(),
                        h("div", { class: "field" },
                            h("div", { class: "control" },
                                h("label", { class: "label is-small" },
                                    h("input", { type: "radio", name: "unlock_by", value: "ledger", checked: this.unlockBy === 'ledger', onClick: (event) => this.handleUnlockBy(event) }),
                                    "\u00A0Ledger"),
                                h("label", { class: "label is-small" },
                                    h("input", { type: "radio", name: "unlock_by", value: "keystore", checked: this.unlockBy === 'keystore', onClick: (event) => this.handleUnlockBy(event) }),
                                    "\u00A0Keystore File"),
                                h("label", { class: "label is-small" },
                                    h("input", { type: "radio", name: "unlock_by", value: "private_key", checked: this.unlockBy === 'private_key', onClick: (event) => this.handleUnlockBy(event) }),
                                    "\u00A0Private Key"))),
                        h("hr", null),
                        h("div", { class: "form" },
                            this.renderUnlockOptions(),
                            h("div", { class: "field" },
                                h("label", { class: "label" }, "\u00A0\u00A0"),
                                h("div", { class: "control" },
                                    h("input", { id: "from", placeholder: "From Address", class: "input is-small", value: this.from, onInput: (e) => this.handleFromInput(e), readOnly: true, disabled: true }),
                                    this.fromBalance ?
                                        h("label", { class: "label is-small from-balance is-pulled-right" },
                                            "Balance: ",
                                            this.fromBalance,
                                            " AION") : null)))),
                    h("footer", { class: "modal-card-foot" },
                        h("button", { class: "button is-primary is-small is-rounded is-pulled-right", disabled: !this.from, onClick: this.handleShowInputDialog }, "Next"),
                        h("button", { class: "button  is-danger is-small is-rounded is-right", onClick: this.handleHidePaymentDialog }, "Cancel"))))));
    }
    renderUnlockOptions() {
        return (h("div", null,
            this.unlockBy == 'private_key' ?
                h("div", { class: "field" },
                    h("label", { class: "label is-small" }, "Private Key"),
                    h("div", { class: "control" },
                        h("input", { id: "private_key", placeholder: "Private Key", class: "input  is-small", value: this.privateKey, type: "password", onInput: (e) => this.handlePrivateKeyInput(e), onBlur: this.handleDerivePublicKey }))) : null,
            this.unlockBy == 'keystore' ?
                this._renderUnlockByKeystore() : null,
            this.unlockBy == 'ledger' ?
                h("div", { class: "field" },
                    h("div", { class: "control" },
                        h("button", { class: "button is-small is-danger is-focused is-rounded is-outlined", onClick: this.handleLedgerConnect }, "Connect To Ledger"))) : null));
    }
    _renderUnlockByKeystore() {
        return (h("div", null,
            h("div", { class: "field is-small" },
                h("label", { class: "label is-small", htmlFor: "private_key" }, "Key Store File"),
                h("div", { class: "control" },
                    h("input", { id: "file-upload", class: "is-small", type: "file", accept: "*", onChange: (e) => this.handleKeyStoreFileSelected(e) }))),
            h("div", { class: "field" },
                h("label", { class: "label is-small", htmlFor: "keystore_password" }, "Passowrd"),
                h("div", { class: "control" },
                    h("input", { id: "keystore_password", type: "password", class: "input is-small", value: this.keystore_password, onInput: this.handleKeystorePasswordInput }))),
            h("div", { class: "field is-grouped" },
                h("div", { class: "control is-pulled-right" },
                    h("button", { name: "unlock_button", class: "button is-small is-danger is-focused is-rounded is-outlined", onClick: this.handleUnlockKeystore }, "Unlock"))),
            this.keystoreLoadingPercentage && this.keystoreLoadingPercentage != 0 && this.keystoreLoadingPercentage != 100 ?
                h("div", { class: "modal is-active" },
                    h("div", { class: "modal-background " }),
                    h("div", { class: "modal-card" },
                        h("label", { class: "color-white" },
                            "Unlocking keystore ... ",
                            this.keystoreLoadingPercentage,
                            "%"),
                        h("progress", { class: "progress", value: this.keystoreLoadingPercentage, max: "100" },
                            this.keystoreLoadingPercentage,
                            "%")))
                : null));
    }
    renderInputForm() {
        return (h("div", null,
            h("div", { class: "modal is-active" },
                h("div", { class: "modal-background" }),
                h("div", { class: "modal-card" },
                    h("header", { class: "modal-card-head" },
                        h("img", { src: Constant.aion_logo, class: "aion-image" }),
                        h("p", { class: "modal-card-title" }, "Transfer AION"),
                        h("button", { class: "delete", "aria-label": "close", onClick: this.handleHidePaymentDialog }, "\u00D7")),
                    h("section", { class: "modal-card-body form" },
                        this.renderError(),
                        this.renderNotification(),
                        h("div", { class: "field" },
                            h("label", { class: "label is-small", htmlFor: "from" }, "From"),
                            h("div", { class: "control" },
                                h("input", { id: "from", placeholder: "From Address", class: "input is-small", value: this.from, onInput: (e) => this.handleFromInput(e), readOnly: true, disabled: true }),
                                this.fromBalance ?
                                    h("label", { class: "label is-small is-pulled-right from-balance" },
                                        "Balance: ",
                                        this.fromBalance,
                                        " AION") : null)),
                        h("div", { class: "field" },
                            h("label", { class: "label is-small", htmlFor: "to" }, "To"),
                            h("div", { class: "control" },
                                h("input", { id: "to", placeholder: "To Address", class: "input is-small", value: this._to, onInput: this.handleToInput, readOnly: this.to_readonly || this.readonly }))),
                        h("div", { class: "field" },
                            h("label", { class: "label is-small", htmlFor: "value" }, "Amount"),
                            h("div", { class: "control" },
                                h("input", { id: "value", placeholder: "Enter amount", class: "input is-small", value: this.value, type: "number", onInput: this.handleValueInput, readonly: this.readonly }))),
                        h("div", { class: "columns" },
                            h("div", { class: "column" },
                                h("div", { class: "field" },
                                    h("label", { class: "label is-small", htmlFor: "nrg" }, "Nrg Limit"),
                                    h("div", { class: "control" },
                                        h("input", { id: "nrg", placeholder: "Nrg Limit", class: "input is-small", value: this.gas, type: "number", onInput: this.handleNrgInput })))),
                            h("div", { class: "column" },
                                h("div", { class: "field" },
                                    h("label", { class: "label is-small", htmlFor: "nrgPrice" }, "Nrg Price"),
                                    h("div", { class: "control" },
                                        h("input", { id: "nrgPrice", placeholder: "Nrg Price", class: "input is-small", value: this.gasPrice, type: "number", onInput: this.handleNrgPriceInput }))))),
                        h("div", { class: "field" },
                            h("label", { class: "label is-small", htmlFor: "message" }, "Message"),
                            h("div", { class: "control" },
                                h("textarea", { id: "message", class: "textarea is-small", placeholder: "Optional message", onInput: this.handleMessageInput, readonly: this.readonly }, this.message)))),
                    h("footer", { class: "modal-card-foot" },
                        h("button", { class: "button is-primary is-small is-rounded", onClick: this.signPayment }, "Next"),
                        h("button", { class: "button  is-danger is-small is-rounded", onClick: this.handleHidePaymentDialog }, "Cancel"))))));
    }
    renderShowConfirmation() {
        return (h("div", { class: "modal is-active" },
            h("div", { class: "modal-background" }),
            h("div", { class: "modal-card" },
                h("header", { class: "modal-card-head" },
                    h("img", { src: Constant.aion_logo, class: "aion-image" }),
                    h("p", { class: "modal-card-title" }, "Confirm Transaction"),
                    h("button", { class: "delete", "aria-label": "close", onClick: this.handleHidePaymentDialog }, "\u00D7")),
                h("section", { class: "modal-card-body form" },
                    this.renderError(),
                    h("div", { class: "columns" },
                        h("div", { class: "column is-1" },
                            h("label", { class: "lable" }, "From")),
                        h("div", { class: "column field" }, this.encodedTxn.input.from)),
                    h("div", { class: "columns" },
                        h("div", { class: "column is-1" }, "To"),
                        h("div", { class: "column field" }, this.encodedTxn.input.to)),
                    h("div", { class: "columns" },
                        h("div", { class: "column is-1" }, "Value"),
                        h("div", { class: "column field" },
                            CryptoUtil.convertnAmpBalanceToAION(this.encodedTxn.input.value),
                            " AION")),
                    h("div", { class: "columns" },
                        h("div", { class: "column is-1" }, "Nrg"),
                        h("div", { class: "column field" }, this.encodedTxn.input.gas)),
                    h("div", { class: "columns" },
                        h("div", { class: "column is-1" }, "Nrg Price"),
                        h("div", { class: "column field" }, this.encodedTxn.input.gasPrice)),
                    h("div", { class: "columns" },
                        h("div", { class: "column is-1" }, "Raw Transaction"),
                        h("div", { class: "column field" },
                            h("textarea", { class: "input is-small", rows: 10, readOnly: true }, this.encodedTxn.rawTransaction)))),
                h("footer", { class: "modal-card-foot" },
                    h("button", { type: "button", class: "button is-primary is-small is-rounded", onClick: this.confirmPayment }, "Confirm"),
                    h("button", { type: "button", class: "button is-danger is-small is-rounded", onClick: this.handleHidePaymentDialog }, "Close")))));
    }
    renderTxnInProgress() {
        return (h("div", null,
            h("div", { class: "modal is-active" },
                h("div", { class: "modal-background" }),
                h("div", { class: "modal-card" },
                    h("header", { class: "modal-card-head" },
                        h("img", { src: Constant.aion_logo, class: "aion-image" }),
                        h("p", { class: "modal-card-title" }, "Sending AION"),
                        h("button", { class: "delete", "aria-label": "close", onClick: this.handleHidePaymentDialog }, "\u00D7")),
                    h("section", { class: "modal-card-body form" },
                        this.renderError(),
                        !this.txnDone ?
                            h("div", null,
                                h("div", { class: "spinner" }, "Loading ..."),
                                "\u00A0 ",
                                h("i", null, "Sending transaction and waiting for at least one block confirmation. Please wait ...")) :
                            h("div", null, this.txnResponse.txHash ?
                                h("span", null,
                                    "Transaction Hash: ",
                                    h("a", { href: Constant.explorer_base_url + "transaction/" + this.txnResponse.txHash, target: "_blank" }, this.txnResponse.txHash)) : h("span", null, "Transaction could not be completed")))))));
    }
    render() {
        return (h("div", { class: "aion-pay" },
            this.visible ?
                this.renderSelectProvider() : null,
            this.inputDialogEnable ?
                this.renderInputForm() : null,
            this.txnInProgress ?
                this.renderTxnInProgress() : h("div", null),
            this.showConfirm ?
                this.renderShowConfirmation() : null,
            h("div", { id: "pay", onClick: this.handleShowPaymentDialog },
                h("slot", null,
                    h("button", { type: "button", class: "button pay-button is-primary" },
                        h("span", { class: "pay-button-text" },
                            h("img", { src: Constant.aion_logo, class: "img-valign" }),
                            this.buttonText ? this.buttonText : this.default_button_text))))));
    }
    static get is() { return "aion-pay"; }
    static get encapsulation() { return "shadow"; }
    static get properties() { return {
        "_to": {
            "state": true
        },
        "buttonText": {
            "type": String,
            "attr": "button-text"
        },
        "encodedTxn": {
            "state": true
        },
        "errors": {
            "state": true
        },
        "from": {
            "state": true
        },
        "fromBalance": {
            "state": true
        },
        "gas": {
            "state": true
        },
        "gasPrice": {
            "state": true
        },
        "gqlUrl": {
            "type": String,
            "attr": "gql-url"
        },
        "inputDialogEnable": {
            "state": true
        },
        "isError": {
            "state": true
        },
        "isNotification": {
            "state": true
        },
        "keystore_password": {
            "state": true
        },
        "keystoreLoadingPercentage": {
            "state": true
        },
        "message": {
            "state": true
        },
        "notification": {
            "state": true
        },
        "privateKey": {
            "state": true
        },
        "refreshAndShow": {
            "method": true
        },
        "showConfirm": {
            "state": true
        },
        "showWithData": {
            "method": true
        },
        "to": {
            "type": String,
            "attr": "to"
        },
        "txnDone": {
            "state": true
        },
        "txnInProgress": {
            "state": true
        },
        "txnResponse": {
            "state": true
        },
        "unlockBy": {
            "state": true
        },
        "value": {
            "state": true
        },
        "visible": {
            "state": true
        }
    }; }
    static get events() { return [{
            "name": "TXN_COMPLETED",
            "method": "transactionCompleted",
            "bubbles": true,
            "cancelable": true,
            "composed": true
        }, {
            "name": "TXN_INPROGRESS",
            "method": "transactionInProgress",
            "bubbles": true,
            "cancelable": true,
            "composed": true
        }, {
            "name": "TXN_FAILED",
            "method": "transactionFailed",
            "bubbles": true,
            "cancelable": true,
            "composed": true
        }]; }
    static get style() { return "\@-webkit-keyframes spinAround{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.delete.sc-aion-pay, .modal-close.sc-aion-pay{-moz-appearance:none;-webkit-appearance:none;pointer-events:auto;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;max-height:20px;max-width:20px;min-height:20px;min-width:20px}\@media screen and (max-width:1087px){.navbar.sc-aion-pay > .container.sc-aion-pay{display:block}.navbar-brand.sc-aion-pay   .navbar-item.sc-aion-pay, .navbar-tabs.sc-aion-pay   .navbar-item.sc-aion-pay{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}.navbar-link.sc-aion-pay::after{display:none}.navbar-menu.sc-aion-pay{background-color:#fff;-webkit-box-shadow:0 8px 16px rgba(10,10,10,.1);box-shadow:0 8px 16px rgba(10,10,10,.1);padding:.5rem 0}.navbar-menu.is-active.sc-aion-pay{display:block}.navbar.is-fixed-bottom-touch.sc-aion-pay, .navbar.is-fixed-top-touch.sc-aion-pay{left:0;position:fixed;right:0;z-index:30}.navbar.is-fixed-bottom-touch.sc-aion-pay{bottom:0}.navbar.is-fixed-bottom-touch.has-shadow.sc-aion-pay{-webkit-box-shadow:0 -2px 3px rgba(10,10,10,.1);box-shadow:0 -2px 3px rgba(10,10,10,.1)}.navbar.is-fixed-top-touch.sc-aion-pay{top:0}.navbar.is-fixed-top.sc-aion-pay   .navbar-menu.sc-aion-pay, .navbar.is-fixed-top-touch.sc-aion-pay   .navbar-menu.sc-aion-pay{-webkit-overflow-scrolling:touch;max-height:calc(100vh - 3.25rem);overflow:auto}body.has-navbar-fixed-top-touch.sc-aion-pay, html.has-navbar-fixed-top-touch.sc-aion-pay{padding-top:3.25rem}body.has-navbar-fixed-bottom-touch.sc-aion-pay, html.has-navbar-fixed-bottom-touch.sc-aion-pay{padding-bottom:3.25rem}}\@media screen and (min-width:1088px){.navbar.sc-aion-pay, .navbar-end.sc-aion-pay, .navbar-menu.sc-aion-pay, .navbar-start.sc-aion-pay{-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;display:-webkit-box;display:-ms-flexbox;display:flex}.navbar.sc-aion-pay{min-height:3.25rem}.navbar.is-spaced.sc-aion-pay{padding:1rem 2rem}.navbar.is-spaced.sc-aion-pay   .navbar-end.sc-aion-pay, .navbar.is-spaced.sc-aion-pay   .navbar-start.sc-aion-pay{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.navbar.is-spaced.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-spaced.sc-aion-pay   a.navbar-item.sc-aion-pay{border-radius:4px}.navbar.is-transparent.sc-aion-pay   .navbar-item.has-dropdown.is-active.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-transparent.sc-aion-pay   .navbar-item.has-dropdown.is-hoverable.sc-aion-pay:hover   .navbar-link.sc-aion-pay, .navbar.is-transparent.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .navbar.is-transparent.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .navbar.is-transparent.sc-aion-pay   a.navbar-item.is-active.sc-aion-pay, .navbar.is-transparent.sc-aion-pay   a.navbar-item.sc-aion-pay:hover{background-color:transparent!important}.navbar.is-transparent.sc-aion-pay   .navbar-dropdown.sc-aion-pay   a.navbar-item.sc-aion-pay:hover{background-color:#f5f5f5;color:#0a0a0a}.navbar.is-transparent.sc-aion-pay   .navbar-dropdown.sc-aion-pay   a.navbar-item.is-active.sc-aion-pay{background-color:#f5f5f5;color:#3273dc}.navbar-burger.sc-aion-pay{display:none}.navbar-item.sc-aion-pay, .navbar-link.sc-aion-pay{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}.navbar-item.sc-aion-pay{display:-webkit-box;display:-ms-flexbox;display:flex}.navbar-item.has-dropdown.sc-aion-pay{-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}.navbar-item.has-dropdown-up.sc-aion-pay   .navbar-link.sc-aion-pay::after{-webkit-transform:rotate(135deg) translate(.25em,-.25em);transform:rotate(135deg) translate(.25em,-.25em)}.navbar-item.has-dropdown-up.sc-aion-pay   .navbar-dropdown.sc-aion-pay{border-bottom:2px solid #dbdbdb;border-radius:6px 6px 0 0;border-top:none;bottom:100%;-webkit-box-shadow:0 -8px 8px rgba(10,10,10,.1);box-shadow:0 -8px 8px rgba(10,10,10,.1);top:auto}.navbar-item.is-active.sc-aion-pay   .navbar-dropdown.sc-aion-pay, .navbar-item.is-hoverable.sc-aion-pay:hover   .navbar-dropdown.sc-aion-pay{display:block}.navbar-item.is-active.sc-aion-pay   .navbar-dropdown.is-boxed.sc-aion-pay, .navbar-item.is-hoverable.sc-aion-pay:hover   .navbar-dropdown.is-boxed.sc-aion-pay, .navbar.is-spaced.sc-aion-pay   .navbar-item.is-active.sc-aion-pay   .navbar-dropdown.sc-aion-pay, .navbar.is-spaced.sc-aion-pay   .navbar-item.is-hoverable.sc-aion-pay:hover   .navbar-dropdown.sc-aion-pay{opacity:1;pointer-events:auto;-webkit-transform:translateY(0);transform:translateY(0)}.navbar-menu.sc-aion-pay{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0}.navbar-start.sc-aion-pay{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;margin-right:auto}.navbar-end.sc-aion-pay{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;margin-left:auto}.navbar-dropdown.sc-aion-pay{background-color:#fff;border-bottom-left-radius:6px;border-bottom-right-radius:6px;border-top:2px solid #dbdbdb;-webkit-box-shadow:0 8px 8px rgba(10,10,10,.1);box-shadow:0 8px 8px rgba(10,10,10,.1);display:none;font-size:.875rem;left:0;min-width:100%;position:absolute;top:100%;z-index:20}.navbar-dropdown.sc-aion-pay   .navbar-item.sc-aion-pay{padding:.375rem 1rem;white-space:nowrap}.navbar-dropdown.sc-aion-pay   a.navbar-item.sc-aion-pay{padding-right:3rem}.navbar-dropdown.sc-aion-pay   a.navbar-item.sc-aion-pay:hover{background-color:#f5f5f5;color:#0a0a0a}.navbar-dropdown.sc-aion-pay   a.navbar-item.is-active.sc-aion-pay{background-color:#f5f5f5;color:#3273dc}.navbar-dropdown.is-boxed.sc-aion-pay, .navbar.is-spaced.sc-aion-pay   .navbar-dropdown.sc-aion-pay{border-radius:6px;border-top:none;-webkit-box-shadow:0 8px 8px rgba(10,10,10,.1),0 0 0 1px rgba(10,10,10,.1);box-shadow:0 8px 8px rgba(10,10,10,.1),0 0 0 1px rgba(10,10,10,.1);display:block;opacity:0;pointer-events:none;top:calc(100% + (-4px));-webkit-transform:translateY(-5px);transform:translateY(-5px);-webkit-transition-duration:86ms;transition-duration:86ms;-webkit-transition-property:opacity,-webkit-transform;transition-property:opacity,transform,-webkit-transform}.navbar-dropdown.is-right.sc-aion-pay{left:auto;right:0}.navbar-divider.sc-aion-pay{display:block}.container.sc-aion-pay > .navbar.sc-aion-pay   .navbar-brand.sc-aion-pay, .navbar.sc-aion-pay > .container.sc-aion-pay   .navbar-brand.sc-aion-pay{margin-left:-.75rem}.container.sc-aion-pay > .navbar.sc-aion-pay   .navbar-menu.sc-aion-pay, .navbar.sc-aion-pay > .container.sc-aion-pay   .navbar-menu.sc-aion-pay{margin-right:-.75rem}.navbar.is-fixed-bottom-desktop.sc-aion-pay, .navbar.is-fixed-top-desktop.sc-aion-pay{left:0;position:fixed;right:0;z-index:30}.navbar.is-fixed-bottom-desktop.sc-aion-pay{bottom:0}.navbar.is-fixed-bottom-desktop.has-shadow.sc-aion-pay{-webkit-box-shadow:0 -2px 3px rgba(10,10,10,.1);box-shadow:0 -2px 3px rgba(10,10,10,.1)}.navbar.is-fixed-top-desktop.sc-aion-pay{top:0}body.has-navbar-fixed-top-desktop.sc-aion-pay, html.has-navbar-fixed-top-desktop.sc-aion-pay{padding-top:3.25rem}body.has-navbar-fixed-bottom-desktop.sc-aion-pay, html.has-navbar-fixed-bottom-desktop.sc-aion-pay{padding-bottom:3.25rem}body.has-spaced-navbar-fixed-top.sc-aion-pay, html.has-spaced-navbar-fixed-top.sc-aion-pay{padding-top:5.25rem}body.has-spaced-navbar-fixed-bottom.sc-aion-pay, html.has-spaced-navbar-fixed-bottom.sc-aion-pay{padding-bottom:5.25rem}.navbar-link.is-active.sc-aion-pay, a.navbar-item.is-active.sc-aion-pay{color:#0a0a0a}.navbar-link.is-active.sc-aion-pay:not(:hover), a.navbar-item.is-active.sc-aion-pay:not(:hover){background-color:transparent}.navbar-item.has-dropdown.is-active.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar-item.has-dropdown.sc-aion-pay:hover   .navbar-link.sc-aion-pay{background-color:#fafafa}}.pagination-link.sc-aion-pay:active, .pagination-next.sc-aion-pay:active, .pagination-previous.sc-aion-pay:active{-webkit-box-shadow:inset 0 1px 2px rgba(10,10,10,.2);box-shadow:inset 0 1px 2px rgba(10,10,10,.2)}\@keyframes spinAround{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.breadcrumb.sc-aion-pay, .button.sc-aion-pay, .delete.sc-aion-pay, .file.sc-aion-pay, .is-unselectable.sc-aion-pay, .modal-close.sc-aion-pay, .pagination-ellipsis.sc-aion-pay, .pagination-link.sc-aion-pay, .pagination-next.sc-aion-pay, .pagination-previous.sc-aion-pay, .tabs.sc-aion-pay{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.navbar-link.sc-aion-pay:not(.is-arrowless)::after, .select.sc-aion-pay:not(.is-multiple):not(.is-loading)::after{border:3px solid transparent;border-radius:2px;border-right:0;border-top:0;content:\" \";display:block;height:.625em;margin-top:-.4375em;pointer-events:none;position:absolute;top:50%;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:center;transform-origin:center;width:.625em}.block.sc-aion-pay:not(:last-child), .box.sc-aion-pay:not(:last-child), .breadcrumb.sc-aion-pay:not(:last-child), .content.sc-aion-pay:not(:last-child), .highlight.sc-aion-pay:not(:last-child), .level.sc-aion-pay:not(:last-child), .list.sc-aion-pay:not(:last-child), .message.sc-aion-pay:not(:last-child), .notification.sc-aion-pay:not(:last-child), .progress.sc-aion-pay:not(:last-child), .subtitle.sc-aion-pay:not(:last-child), .table-container.sc-aion-pay:not(:last-child), .table.sc-aion-pay:not(:last-child), .tabs.sc-aion-pay:not(:last-child), .title.sc-aion-pay:not(:last-child){margin-bottom:1.5rem}.delete.sc-aion-pay, .modal-close.sc-aion-pay{-moz-appearance:none;-webkit-appearance:none;background-color:rgba(0,0,0,.2);border:none;border-radius:290486px;cursor:pointer;pointer-events:auto;display:inline-block;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;font-size:0;height:20px;max-height:20px;max-width:20px;min-height:20px;min-width:20px;outline:0;position:relative;vertical-align:top;width:20px}.delete.sc-aion-pay::after, .delete.sc-aion-pay::before, .modal-close.sc-aion-pay::after, .modal-close.sc-aion-pay::before{background-color:#fff;content:\"\";display:block;left:50%;position:absolute;top:50%;-webkit-transform:translateX(-50%) translateY(-50%) rotate(45deg);transform:translateX(-50%) translateY(-50%) rotate(45deg);-webkit-transform-origin:center center;transform-origin:center center}.delete.sc-aion-pay::before, .modal-close.sc-aion-pay::before{height:2px;width:50%}.delete.sc-aion-pay::after, .modal-close.sc-aion-pay::after{height:50%;width:2px}.delete.sc-aion-pay:focus, .delete.sc-aion-pay:hover, .modal-close.sc-aion-pay:focus, .modal-close.sc-aion-pay:hover{background-color:rgba(0,0,0,.3)}.delete.sc-aion-pay:active, .modal-close.sc-aion-pay:active{background-color:rgba(0,0,0,.4)}.is-small.delete.sc-aion-pay, .is-small.modal-close.sc-aion-pay{height:16px;max-height:16px;max-width:16px;min-height:16px;min-width:16px;width:16px}.is-medium.delete.sc-aion-pay, .is-medium.modal-close.sc-aion-pay{height:24px;max-height:24px;max-width:24px;min-height:24px;min-width:24px;width:24px}.is-large.delete.sc-aion-pay, .is-large.modal-close.sc-aion-pay{height:32px;max-height:32px;max-width:32px;min-height:32px;min-width:32px;width:32px}.button.is-loading.sc-aion-pay::after, .control.is-loading.sc-aion-pay::after, .loader.sc-aion-pay, .select.is-loading.sc-aion-pay::after{-webkit-animation:.5s linear infinite spinAround;animation:.5s linear infinite spinAround;border:2px solid #dbdbdb;border-radius:290486px;border-right-color:transparent;border-top-color:transparent;content:\"\";display:block;height:1em;position:relative;width:1em}.hero-video.sc-aion-pay, .image.is-16by9.sc-aion-pay   img.sc-aion-pay, .image.is-1by1.sc-aion-pay   img.sc-aion-pay, .image.is-1by2.sc-aion-pay   img.sc-aion-pay, .image.is-1by3.sc-aion-pay   img.sc-aion-pay, .image.is-2by1.sc-aion-pay   img.sc-aion-pay, .image.is-2by3.sc-aion-pay   img.sc-aion-pay, .image.is-3by1.sc-aion-pay   img.sc-aion-pay, .image.is-3by2.sc-aion-pay   img.sc-aion-pay, .image.is-3by4.sc-aion-pay   img.sc-aion-pay, .image.is-3by5.sc-aion-pay   img.sc-aion-pay, .image.is-4by3.sc-aion-pay   img.sc-aion-pay, .image.is-4by5.sc-aion-pay   img.sc-aion-pay, .image.is-5by3.sc-aion-pay   img.sc-aion-pay, .image.is-5by4.sc-aion-pay   img.sc-aion-pay, .image.is-9by16.sc-aion-pay   img.sc-aion-pay, .image.is-square.sc-aion-pay   img.sc-aion-pay, .is-overlay.sc-aion-pay, .modal.sc-aion-pay, .modal-background.sc-aion-pay{bottom:0;left:0;position:absolute;right:0;top:0}.button.sc-aion-pay, .file-cta.sc-aion-pay, .file-name.sc-aion-pay, .input.sc-aion-pay, .pagination-ellipsis.sc-aion-pay, .pagination-link.sc-aion-pay, .pagination-next.sc-aion-pay, .pagination-previous.sc-aion-pay, .select.sc-aion-pay   select.sc-aion-pay, .textarea.sc-aion-pay{-moz-appearance:none;-webkit-appearance:none;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:none;box-shadow:none;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;font-size:1rem;height:2.25em;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;line-height:1.5;padding-bottom:calc(.375em - 1px);padding-left:calc(.625em - 1px);padding-right:calc(.625em - 1px);padding-top:calc(.375em - 1px);position:relative;vertical-align:top}.button.sc-aion-pay:active, .button.sc-aion-pay:focus, .file-cta.sc-aion-pay:active, .file-cta.sc-aion-pay:focus, .file-name.sc-aion-pay:active, .file-name.sc-aion-pay:focus, .input.sc-aion-pay:active, .input.sc-aion-pay:focus, .is-active.button.sc-aion-pay, .is-active.file-cta.sc-aion-pay, .is-active.file-name.sc-aion-pay, .is-active.input.sc-aion-pay, .is-active.pagination-ellipsis.sc-aion-pay, .is-active.pagination-link.sc-aion-pay, .is-active.pagination-next.sc-aion-pay, .is-active.pagination-previous.sc-aion-pay, .is-active.textarea.sc-aion-pay, .is-focused.button.sc-aion-pay, .is-focused.file-cta.sc-aion-pay, .is-focused.file-name.sc-aion-pay, .is-focused.input.sc-aion-pay, .is-focused.pagination-ellipsis.sc-aion-pay, .is-focused.pagination-link.sc-aion-pay, .is-focused.pagination-next.sc-aion-pay, .is-focused.pagination-previous.sc-aion-pay, .is-focused.textarea.sc-aion-pay, .pagination-ellipsis.sc-aion-pay:active, .pagination-ellipsis.sc-aion-pay:focus, .pagination-link.sc-aion-pay:active, .pagination-link.sc-aion-pay:focus, .pagination-next.sc-aion-pay:active, .pagination-next.sc-aion-pay:focus, .pagination-previous.sc-aion-pay:active, .pagination-previous.sc-aion-pay:focus, .select.sc-aion-pay   select.is-active.sc-aion-pay, .select.sc-aion-pay   select.is-focused.sc-aion-pay, .select.sc-aion-pay   select.sc-aion-pay:active, .select.sc-aion-pay   select.sc-aion-pay:focus, .textarea.sc-aion-pay:active, .textarea.sc-aion-pay:focus{outline:0}.button[disabled].sc-aion-pay, .file-cta[disabled].sc-aion-pay, .file-name[disabled].sc-aion-pay, .input[disabled].sc-aion-pay, .pagination-ellipsis[disabled].sc-aion-pay, .pagination-link[disabled].sc-aion-pay, .pagination-next[disabled].sc-aion-pay, .pagination-previous[disabled].sc-aion-pay, .select.sc-aion-pay   select[disabled].sc-aion-pay, .textarea[disabled].sc-aion-pay{cursor:not-allowed}blockquote.sc-aion-pay, body.sc-aion-pay, dd.sc-aion-pay, dl.sc-aion-pay, dt.sc-aion-pay, fieldset.sc-aion-pay, figure.sc-aion-pay, h1.sc-aion-pay, h2.sc-aion-pay, h3.sc-aion-pay, h4.sc-aion-pay, h5.sc-aion-pay, h6.sc-aion-pay, hr.sc-aion-pay, html.sc-aion-pay, iframe.sc-aion-pay, legend.sc-aion-pay, li.sc-aion-pay, ol.sc-aion-pay, p.sc-aion-pay, pre.sc-aion-pay, textarea.sc-aion-pay, ul.sc-aion-pay{margin:0;padding:0}h1.sc-aion-pay, h2.sc-aion-pay, h3.sc-aion-pay, h4.sc-aion-pay, h5.sc-aion-pay, h6.sc-aion-pay{font-size:100%;font-weight:400}ul.sc-aion-pay{list-style:none}button.sc-aion-pay, input.sc-aion-pay, select.sc-aion-pay, textarea.sc-aion-pay{margin:0}html.sc-aion-pay{-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#fff;font-size:16px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;min-width:300px;overflow-x:hidden;overflow-y:scroll;text-rendering:optimizeLegibility;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;-ms-text-size-adjust:100%;text-size-adjust:100%}*.sc-aion-pay, .sc-aion-pay::after, .sc-aion-pay::before{-webkit-box-sizing:inherit;box-sizing:inherit}audio.sc-aion-pay, img.sc-aion-pay, video.sc-aion-pay{height:auto;max-width:100%}iframe.sc-aion-pay{border:0}table.sc-aion-pay{border-collapse:collapse;border-spacing:0}td.sc-aion-pay, th.sc-aion-pay{padding:0;text-align:left}article.sc-aion-pay, aside.sc-aion-pay, figure.sc-aion-pay, footer.sc-aion-pay, header.sc-aion-pay, hgroup.sc-aion-pay, section.sc-aion-pay{display:block}body.sc-aion-pay, button.sc-aion-pay, input.sc-aion-pay, select.sc-aion-pay, textarea.sc-aion-pay{font-family:BlinkMacSystemFont,-apple-system,\"Segoe UI\",Roboto,Oxygen,Ubuntu,Cantarell,\"Fira Sans\",\"Droid Sans\",\"Helvetica Neue\",Helvetica,Arial,sans-serif}code.sc-aion-pay, pre.sc-aion-pay{-moz-osx-font-smoothing:auto;-webkit-font-smoothing:auto;font-family:monospace}body.sc-aion-pay{color:#4a4a4a;font-size:1rem;font-weight:400;line-height:1.5}a.sc-aion-pay{color:#3273dc;cursor:pointer;text-decoration:none}a.sc-aion-pay   strong.sc-aion-pay{color:currentColor}a.sc-aion-pay:hover, table.sc-aion-pay   th.sc-aion-pay{color:#363636}code.sc-aion-pay{background-color:#f5f5f5;color:#ff3860;font-size:.875em;font-weight:400;padding:.25em .5em}hr.sc-aion-pay{background-color:#f5f5f5;border:none;display:block;height:2px;margin:1.5rem 0}input[type=checkbox].sc-aion-pay, input[type=radio].sc-aion-pay{vertical-align:baseline}small.sc-aion-pay{font-size:.875em}span.sc-aion-pay{font-style:inherit;font-weight:inherit}strong.sc-aion-pay{color:#363636;font-weight:700}pre.sc-aion-pay{-webkit-overflow-scrolling:touch;background-color:#f5f5f5;color:#4a4a4a;font-size:.875em;overflow-x:auto;padding:1.25rem 1.5rem;white-space:pre;word-wrap:normal}pre.sc-aion-pay   code.sc-aion-pay{background-color:transparent;color:currentColor;font-size:1em;padding:0}table.sc-aion-pay   td.sc-aion-pay, table.sc-aion-pay   th.sc-aion-pay{text-align:left;vertical-align:top}.is-clearfix.sc-aion-pay::after{clear:both;content:\" \";display:table}.is-pulled-left.sc-aion-pay{float:left!important}.is-pulled-right.sc-aion-pay{float:right!important}.is-clipped.sc-aion-pay{overflow:hidden!important}.is-size-1.sc-aion-pay{font-size:3rem!important}.is-size-2.sc-aion-pay{font-size:2.5rem!important}.is-size-3.sc-aion-pay{font-size:2rem!important}.is-size-4.sc-aion-pay{font-size:1.5rem!important}.is-size-5.sc-aion-pay{font-size:1.25rem!important}.is-size-6.sc-aion-pay{font-size:1rem!important}.is-size-7.sc-aion-pay{font-size:.75rem!important}\@media screen and (max-width:768px){.is-size-1-mobile.sc-aion-pay{font-size:3rem!important}.is-size-2-mobile.sc-aion-pay{font-size:2.5rem!important}.is-size-3-mobile.sc-aion-pay{font-size:2rem!important}.is-size-4-mobile.sc-aion-pay{font-size:1.5rem!important}.is-size-5-mobile.sc-aion-pay{font-size:1.25rem!important}.is-size-6-mobile.sc-aion-pay{font-size:1rem!important}.is-size-7-mobile.sc-aion-pay{font-size:.75rem!important}}\@media screen and (min-width:769px),print{.is-size-1-tablet.sc-aion-pay{font-size:3rem!important}.is-size-2-tablet.sc-aion-pay{font-size:2.5rem!important}.is-size-3-tablet.sc-aion-pay{font-size:2rem!important}.is-size-4-tablet.sc-aion-pay{font-size:1.5rem!important}.is-size-5-tablet.sc-aion-pay{font-size:1.25rem!important}.is-size-6-tablet.sc-aion-pay{font-size:1rem!important}.is-size-7-tablet.sc-aion-pay{font-size:.75rem!important}}\@media screen and (max-width:1087px){.is-size-1-touch.sc-aion-pay{font-size:3rem!important}.is-size-2-touch.sc-aion-pay{font-size:2.5rem!important}.is-size-3-touch.sc-aion-pay{font-size:2rem!important}.is-size-4-touch.sc-aion-pay{font-size:1.5rem!important}.is-size-5-touch.sc-aion-pay{font-size:1.25rem!important}.is-size-6-touch.sc-aion-pay{font-size:1rem!important}.is-size-7-touch.sc-aion-pay{font-size:.75rem!important}}\@media screen and (min-width:1088px){.is-size-1-desktop.sc-aion-pay{font-size:3rem!important}.is-size-2-desktop.sc-aion-pay{font-size:2.5rem!important}.is-size-3-desktop.sc-aion-pay{font-size:2rem!important}.is-size-4-desktop.sc-aion-pay{font-size:1.5rem!important}.is-size-5-desktop.sc-aion-pay{font-size:1.25rem!important}.is-size-6-desktop.sc-aion-pay{font-size:1rem!important}.is-size-7-desktop.sc-aion-pay{font-size:.75rem!important}}.has-text-centered.sc-aion-pay{text-align:center!important}.has-text-justified.sc-aion-pay{text-align:justify!important}.has-text-left.sc-aion-pay{text-align:left!important}.has-text-right.sc-aion-pay{text-align:right!important}\@media screen and (min-width:769px),print{.has-text-centered-tablet.sc-aion-pay{text-align:center!important}}\@media screen and (min-width:769px) and (max-width:1087px){.has-text-centered-tablet-only.sc-aion-pay{text-align:center!important}}\@media screen and (max-width:1087px){.has-text-centered-touch.sc-aion-pay{text-align:center!important}}\@media screen and (min-width:1088px){.has-text-centered-desktop.sc-aion-pay{text-align:center!important}}\@media screen and (min-width:1088px) and (max-width:1279px){.has-text-centered-desktop-only.sc-aion-pay{text-align:center!important}}\@media screen and (min-width:1280px){.is-size-1-widescreen.sc-aion-pay{font-size:3rem!important}.is-size-2-widescreen.sc-aion-pay{font-size:2.5rem!important}.is-size-3-widescreen.sc-aion-pay{font-size:2rem!important}.is-size-4-widescreen.sc-aion-pay{font-size:1.5rem!important}.is-size-5-widescreen.sc-aion-pay{font-size:1.25rem!important}.is-size-6-widescreen.sc-aion-pay{font-size:1rem!important}.is-size-7-widescreen.sc-aion-pay{font-size:.75rem!important}.has-text-centered-widescreen.sc-aion-pay{text-align:center!important}}\@media screen and (min-width:1280px) and (max-width:1471px){.has-text-centered-widescreen-only.sc-aion-pay{text-align:center!important}}\@media screen and (min-width:1472px){.is-size-1-fullhd.sc-aion-pay{font-size:3rem!important}.is-size-2-fullhd.sc-aion-pay{font-size:2.5rem!important}.is-size-3-fullhd.sc-aion-pay{font-size:2rem!important}.is-size-4-fullhd.sc-aion-pay{font-size:1.5rem!important}.is-size-5-fullhd.sc-aion-pay{font-size:1.25rem!important}.is-size-6-fullhd.sc-aion-pay{font-size:1rem!important}.is-size-7-fullhd.sc-aion-pay{font-size:.75rem!important}.has-text-centered-fullhd.sc-aion-pay{text-align:center!important}}\@media screen and (max-width:768px){.has-text-centered-mobile.sc-aion-pay{text-align:center!important}.has-text-justified-mobile.sc-aion-pay{text-align:justify!important}}\@media screen and (min-width:769px),print{.has-text-justified-tablet.sc-aion-pay{text-align:justify!important}}\@media screen and (min-width:769px) and (max-width:1087px){.has-text-justified-tablet-only.sc-aion-pay{text-align:justify!important}}\@media screen and (max-width:1087px){.has-text-justified-touch.sc-aion-pay{text-align:justify!important}}\@media screen and (min-width:1088px){.has-text-justified-desktop.sc-aion-pay{text-align:justify!important}}\@media screen and (min-width:1088px) and (max-width:1279px){.has-text-justified-desktop-only.sc-aion-pay{text-align:justify!important}}\@media screen and (min-width:1280px){.has-text-justified-widescreen.sc-aion-pay{text-align:justify!important}}\@media screen and (min-width:1280px) and (max-width:1471px){.has-text-justified-widescreen-only.sc-aion-pay{text-align:justify!important}}\@media screen and (min-width:1472px){.has-text-justified-fullhd.sc-aion-pay{text-align:justify!important}.has-text-left-fullhd.sc-aion-pay{text-align:left!important}}\@media screen and (min-width:769px),print{.has-text-left-tablet.sc-aion-pay{text-align:left!important}}\@media screen and (min-width:769px) and (max-width:1087px){.has-text-left-tablet-only.sc-aion-pay{text-align:left!important}}\@media screen and (max-width:1087px){.has-text-left-touch.sc-aion-pay{text-align:left!important}}\@media screen and (min-width:1088px){.has-text-left-desktop.sc-aion-pay{text-align:left!important}}\@media screen and (min-width:1088px) and (max-width:1279px){.has-text-left-desktop-only.sc-aion-pay{text-align:left!important}}\@media screen and (min-width:1280px){.has-text-left-widescreen.sc-aion-pay{text-align:left!important}}\@media screen and (min-width:1280px) and (max-width:1471px){.has-text-left-widescreen-only.sc-aion-pay{text-align:left!important}}\@media screen and (max-width:768px){.has-text-left-mobile.sc-aion-pay{text-align:left!important}.has-text-right-mobile.sc-aion-pay{text-align:right!important}.is-block-mobile.sc-aion-pay{display:block!important}}.is-capitalized.sc-aion-pay{text-transform:capitalize!important}.is-lowercase.sc-aion-pay{text-transform:lowercase!important}.is-uppercase.sc-aion-pay{text-transform:uppercase!important}.is-italic.sc-aion-pay{font-style:italic!important}.has-text-white.sc-aion-pay{color:#fff!important}a.has-text-white.sc-aion-pay:focus, a.has-text-white.sc-aion-pay:hover{color:#e6e6e6!important}.has-background-white.sc-aion-pay{background-color:#fff!important}.has-text-black.sc-aion-pay{color:#0a0a0a!important}a.has-text-black.sc-aion-pay:focus, a.has-text-black.sc-aion-pay:hover{color:#000!important}.has-background-black.sc-aion-pay{background-color:#0a0a0a!important}.has-text-light.sc-aion-pay{color:#f5f5f5!important}a.has-text-light.sc-aion-pay:focus, a.has-text-light.sc-aion-pay:hover{color:#dbdbdb!important}.has-background-light.sc-aion-pay{background-color:#f5f5f5!important}.has-text-dark.sc-aion-pay{color:#363636!important}a.has-text-dark.sc-aion-pay:focus, a.has-text-dark.sc-aion-pay:hover{color:#1c1c1c!important}.has-background-dark.sc-aion-pay{background-color:#363636!important}.has-text-primary.sc-aion-pay{color:#00d1b2!important}a.has-text-primary.sc-aion-pay:focus, a.has-text-primary.sc-aion-pay:hover{color:#009e86!important}.has-background-primary.sc-aion-pay{background-color:#00d1b2!important}.has-text-link.sc-aion-pay{color:#3273dc!important}a.has-text-link.sc-aion-pay:focus, a.has-text-link.sc-aion-pay:hover{color:#205bbc!important}.has-background-link.sc-aion-pay{background-color:#3273dc!important}.has-text-info.sc-aion-pay{color:#209cee!important}a.has-text-info.sc-aion-pay:focus, a.has-text-info.sc-aion-pay:hover{color:#0f81cc!important}.has-background-info.sc-aion-pay{background-color:#209cee!important}.has-text-success.sc-aion-pay{color:#23d160!important}a.has-text-success.sc-aion-pay:focus, a.has-text-success.sc-aion-pay:hover{color:#1ca64c!important}.has-background-success.sc-aion-pay{background-color:#23d160!important}.has-text-warning.sc-aion-pay{color:#ffdd57!important}a.has-text-warning.sc-aion-pay:focus, a.has-text-warning.sc-aion-pay:hover{color:#ffd324!important}.has-background-warning.sc-aion-pay{background-color:#ffdd57!important}.has-text-danger.sc-aion-pay{color:#ff3860!important}a.has-text-danger.sc-aion-pay:focus, a.has-text-danger.sc-aion-pay:hover{color:#ff0537!important}.has-background-danger.sc-aion-pay{background-color:#ff3860!important}.has-text-black-bis.sc-aion-pay{color:#121212!important}.has-background-black-bis.sc-aion-pay{background-color:#121212!important}.has-text-black-ter.sc-aion-pay{color:#242424!important}.has-background-black-ter.sc-aion-pay{background-color:#242424!important}.has-text-grey-darker.sc-aion-pay{color:#363636!important}.has-background-grey-darker.sc-aion-pay{background-color:#363636!important}.has-text-grey-dark.sc-aion-pay{color:#4a4a4a!important}.has-background-grey-dark.sc-aion-pay{background-color:#4a4a4a!important}.has-text-grey.sc-aion-pay{color:#7a7a7a!important}.has-background-grey.sc-aion-pay{background-color:#7a7a7a!important}.has-text-grey-light.sc-aion-pay{color:#b5b5b5!important}.has-background-grey-light.sc-aion-pay{background-color:#b5b5b5!important}.has-text-grey-lighter.sc-aion-pay{color:#dbdbdb!important}.has-background-grey-lighter.sc-aion-pay{background-color:#dbdbdb!important}.has-text-white-ter.sc-aion-pay{color:#f5f5f5!important}.has-background-white-ter.sc-aion-pay{background-color:#f5f5f5!important}.has-text-white-bis.sc-aion-pay{color:#fafafa!important}.has-background-white-bis.sc-aion-pay{background-color:#fafafa!important}.has-text-weight-light.sc-aion-pay{font-weight:300!important}.has-text-weight-normal.sc-aion-pay{font-weight:400!important}.has-text-weight-semibold.sc-aion-pay{font-weight:600!important}.has-text-weight-bold.sc-aion-pay{font-weight:700!important}.is-block.sc-aion-pay{display:block!important}\@media screen and (min-width:769px),print{.has-text-right-tablet.sc-aion-pay{text-align:right!important}.is-block-tablet.sc-aion-pay{display:block!important}}\@media screen and (min-width:769px) and (max-width:1087px){.has-text-right-tablet-only.sc-aion-pay{text-align:right!important}.is-block-tablet-only.sc-aion-pay{display:block!important}}\@media screen and (max-width:1087px){.has-text-right-touch.sc-aion-pay{text-align:right!important}.is-block-touch.sc-aion-pay{display:block!important}}\@media screen and (min-width:1088px){.has-text-right-desktop.sc-aion-pay{text-align:right!important}.is-block-desktop.sc-aion-pay{display:block!important}}\@media screen and (min-width:1088px) and (max-width:1279px){.has-text-right-desktop-only.sc-aion-pay{text-align:right!important}.is-block-desktop-only.sc-aion-pay{display:block!important}}\@media screen and (min-width:1280px){.has-text-right-widescreen.sc-aion-pay{text-align:right!important}.is-block-widescreen.sc-aion-pay{display:block!important}}\@media screen and (min-width:1280px) and (max-width:1471px){.has-text-right-widescreen-only.sc-aion-pay{text-align:right!important}.is-block-widescreen-only.sc-aion-pay{display:block!important}}\@media screen and (min-width:1472px){.has-text-right-fullhd.sc-aion-pay{text-align:right!important}.is-block-fullhd.sc-aion-pay{display:block!important}}.is-flex.sc-aion-pay{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}\@media screen and (max-width:768px){.is-flex-mobile.sc-aion-pay{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}}\@media screen and (min-width:769px),print{.is-flex-tablet.sc-aion-pay{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}}\@media screen and (min-width:769px) and (max-width:1087px){.is-flex-tablet-only.sc-aion-pay{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}}\@media screen and (max-width:1087px){.is-flex-touch.sc-aion-pay{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}}\@media screen and (min-width:1088px){.is-flex-desktop.sc-aion-pay{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}}\@media screen and (min-width:1088px) and (max-width:1279px){.is-flex-desktop-only.sc-aion-pay{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}}\@media screen and (min-width:1280px){.is-flex-widescreen.sc-aion-pay{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}}\@media screen and (min-width:1280px) and (max-width:1471px){.is-flex-widescreen-only.sc-aion-pay{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}}\@media screen and (min-width:1472px){.is-flex-fullhd.sc-aion-pay{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}.is-inline-fullhd.sc-aion-pay{display:inline!important}}.is-inline.sc-aion-pay{display:inline!important}\@media screen and (max-width:768px){.is-inline-mobile.sc-aion-pay{display:inline!important}}\@media screen and (min-width:769px),print{.is-inline-tablet.sc-aion-pay{display:inline!important}}\@media screen and (min-width:769px) and (max-width:1087px){.is-inline-tablet-only.sc-aion-pay{display:inline!important}}\@media screen and (max-width:1087px){.is-inline-touch.sc-aion-pay{display:inline!important}}\@media screen and (min-width:1088px){.is-inline-desktop.sc-aion-pay{display:inline!important}}\@media screen and (min-width:1088px) and (max-width:1279px){.is-inline-desktop-only.sc-aion-pay{display:inline!important}}\@media screen and (min-width:1280px){.is-inline-widescreen.sc-aion-pay{display:inline!important}}\@media screen and (min-width:1280px) and (max-width:1471px){.is-inline-widescreen-only.sc-aion-pay{display:inline!important}.is-inline-block-widescreen-only.sc-aion-pay{display:inline-block!important}}.is-inline-block.sc-aion-pay{display:inline-block!important}\@media screen and (max-width:768px){.is-inline-block-mobile.sc-aion-pay{display:inline-block!important}}\@media screen and (min-width:769px),print{.is-inline-block-tablet.sc-aion-pay{display:inline-block!important}}\@media screen and (min-width:769px) and (max-width:1087px){.is-inline-block-tablet-only.sc-aion-pay{display:inline-block!important}}\@media screen and (max-width:1087px){.is-inline-block-touch.sc-aion-pay{display:inline-block!important}}\@media screen and (min-width:1088px){.is-inline-block-desktop.sc-aion-pay{display:inline-block!important}}\@media screen and (min-width:1088px) and (max-width:1279px){.is-inline-block-desktop-only.sc-aion-pay{display:inline-block!important}}\@media screen and (min-width:1280px){.is-inline-block-widescreen.sc-aion-pay{display:inline-block!important}}\@media screen and (min-width:1472px){.is-inline-block-fullhd.sc-aion-pay{display:inline-block!important}}.is-inline-flex.sc-aion-pay{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important}\@media screen and (max-width:768px){.is-inline-flex-mobile.sc-aion-pay{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important}}\@media screen and (min-width:769px),print{.is-inline-flex-tablet.sc-aion-pay{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important}}\@media screen and (min-width:769px) and (max-width:1087px){.is-inline-flex-tablet-only.sc-aion-pay{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important}}\@media screen and (max-width:1087px){.is-inline-flex-touch.sc-aion-pay{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important}}\@media screen and (min-width:1088px){.is-inline-flex-desktop.sc-aion-pay{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important}}\@media screen and (min-width:1088px) and (max-width:1279px){.is-inline-flex-desktop-only.sc-aion-pay{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important}}\@media screen and (min-width:1280px){.is-inline-flex-widescreen.sc-aion-pay{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important}}\@media screen and (min-width:1280px) and (max-width:1471px){.is-inline-flex-widescreen-only.sc-aion-pay{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important}}\@media screen and (min-width:1472px){.is-inline-flex-fullhd.sc-aion-pay{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important}.is-hidden-fullhd.sc-aion-pay{display:none!important}}.is-hidden.sc-aion-pay{display:none!important}.is-sr-only.sc-aion-pay{border:none!important;clip:rect(0,0,0,0)!important;height:.01em!important;overflow:hidden!important;padding:0!important;position:absolute!important;white-space:nowrap!important;width:.01em!important}.is-invisible.sc-aion-pay{visibility:hidden!important}\@media screen and (max-width:768px){.is-hidden-mobile.sc-aion-pay{display:none!important}.is-invisible-mobile.sc-aion-pay{visibility:hidden!important}}\@media screen and (min-width:769px),print{.is-hidden-tablet.sc-aion-pay{display:none!important}.is-invisible-tablet.sc-aion-pay{visibility:hidden!important}}\@media screen and (min-width:769px) and (max-width:1087px){.is-hidden-tablet-only.sc-aion-pay{display:none!important}.is-invisible-tablet-only.sc-aion-pay{visibility:hidden!important}.columns.is-variable.is-0-tablet-only.sc-aion-pay{--columnGap:0rem}}\@media screen and (max-width:1087px){.is-hidden-touch.sc-aion-pay{display:none!important}.is-invisible-touch.sc-aion-pay{visibility:hidden!important}}\@media screen and (min-width:1088px){.is-hidden-desktop.sc-aion-pay{display:none!important}.is-invisible-desktop.sc-aion-pay{visibility:hidden!important}}\@media screen and (min-width:1088px) and (max-width:1279px){.is-hidden-desktop-only.sc-aion-pay{display:none!important}.is-invisible-desktop-only.sc-aion-pay{visibility:hidden!important}.columns.is-variable.is-0-desktop-only.sc-aion-pay{--columnGap:0rem}}\@media screen and (min-width:1280px){.is-hidden-widescreen.sc-aion-pay{display:none!important}.is-invisible-widescreen.sc-aion-pay{visibility:hidden!important}}\@media screen and (min-width:1280px) and (max-width:1471px){.is-hidden-widescreen-only.sc-aion-pay{display:none!important}.is-invisible-widescreen-only.sc-aion-pay{visibility:hidden!important}.columns.is-variable.is-0-widescreen-only.sc-aion-pay{--columnGap:0rem}}.is-marginless.sc-aion-pay{margin:0!important}.is-paddingless.sc-aion-pay{padding:0!important}.is-radiusless.sc-aion-pay{border-radius:0!important}.is-shadowless.sc-aion-pay{-webkit-box-shadow:none!important;box-shadow:none!important}.box.sc-aion-pay{background-color:#fff;border-radius:6px;-webkit-box-shadow:0 2px 3px rgba(10,10,10,.1),0 0 0 1px rgba(10,10,10,.1);box-shadow:0 2px 3px rgba(10,10,10,.1),0 0 0 1px rgba(10,10,10,.1);color:#4a4a4a;display:block;padding:1.25rem}a.box.sc-aion-pay:focus, a.box.sc-aion-pay:hover{-webkit-box-shadow:0 2px 3px rgba(10,10,10,.1),0 0 0 1px #3273dc;box-shadow:0 2px 3px rgba(10,10,10,.1),0 0 0 1px #3273dc}a.box.sc-aion-pay:active{-webkit-box-shadow:inset 0 1px 2px rgba(10,10,10,.2),0 0 0 1px #3273dc;box-shadow:inset 0 1px 2px rgba(10,10,10,.2),0 0 0 1px #3273dc}.button.sc-aion-pay{background-color:#fff;border-color:#dbdbdb;border-width:1px;color:#363636;cursor:pointer;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding-bottom:calc(.375em - 1px);padding-left:.75em;padding-right:.75em;padding-top:calc(.375em - 1px);text-align:center;white-space:nowrap}.button.sc-aion-pay   strong.sc-aion-pay{color:inherit}.button.sc-aion-pay   .icon.sc-aion-pay, .button.sc-aion-pay   .icon.is-large.sc-aion-pay, .button.sc-aion-pay   .icon.is-medium.sc-aion-pay, .button.sc-aion-pay   .icon.is-small.sc-aion-pay{height:1.5em;width:1.5em}.button.sc-aion-pay   .icon.sc-aion-pay:first-child:not(:last-child){margin-left:calc(-.375em - 1px);margin-right:.1875em}.button.sc-aion-pay   .icon.sc-aion-pay:last-child:not(:first-child){margin-left:.1875em;margin-right:calc(-.375em - 1px)}.button.sc-aion-pay   .icon.sc-aion-pay:first-child:last-child{margin-left:calc(-.375em - 1px);margin-right:calc(-.375em - 1px)}.button.is-hovered.sc-aion-pay, .button.sc-aion-pay:hover{border-color:#b5b5b5;color:#363636}.button.is-focused.sc-aion-pay, .button.sc-aion-pay:focus{border-color:#3273dc;color:#363636}.button.is-focused.sc-aion-pay:not(:active), .button.sc-aion-pay:focus:not(:active){-webkit-box-shadow:0 0 0 .125em rgba(50,115,220,.25);box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.button.is-active.sc-aion-pay, .button.sc-aion-pay:active{border-color:#4a4a4a;color:#363636}.button.is-text.sc-aion-pay{background-color:transparent;border-color:transparent;color:#4a4a4a;text-decoration:underline}.button.is-text.is-focused.sc-aion-pay, .button.is-text.is-hovered.sc-aion-pay, .button.is-text.sc-aion-pay:focus, .button.is-text.sc-aion-pay:hover{background-color:#f5f5f5;color:#363636}.button.is-text.is-active.sc-aion-pay, .button.is-text.sc-aion-pay:active{background-color:#e8e8e8;color:#363636}.button.is-text[disabled].sc-aion-pay{background-color:transparent;border-color:transparent;-webkit-box-shadow:none;box-shadow:none}.button.is-white.sc-aion-pay{background-color:#fff;border-color:transparent;color:#0a0a0a}.button.is-white.is-hovered.sc-aion-pay, .button.is-white.sc-aion-pay:hover{background-color:#f9f9f9;border-color:transparent;color:#0a0a0a}.button.is-white.is-focused.sc-aion-pay, .button.is-white.sc-aion-pay:focus{border-color:transparent;color:#0a0a0a}.button.is-white.is-focused.sc-aion-pay:not(:active), .button.is-white.sc-aion-pay:focus:not(:active){-webkit-box-shadow:0 0 0 .125em rgba(255,255,255,.25);box-shadow:0 0 0 .125em rgba(255,255,255,.25)}.button.is-white.is-active.sc-aion-pay, .button.is-white.sc-aion-pay:active{background-color:#f2f2f2;border-color:transparent;color:#0a0a0a}.button.is-white[disabled].sc-aion-pay{background-color:#fff;border-color:transparent;-webkit-box-shadow:none;box-shadow:none}.button.is-white.is-inverted.sc-aion-pay{background-color:#0a0a0a;color:#fff}.button.is-white.is-inverted.sc-aion-pay:hover{background-color:#000}.button.is-white.is-inverted[disabled].sc-aion-pay{background-color:#0a0a0a;border-color:transparent;-webkit-box-shadow:none;box-shadow:none;color:#fff}.button.is-white.is-loading.sc-aion-pay::after{border-color:transparent transparent #0a0a0a #0a0a0a!important}.button.is-white.is-outlined.sc-aion-pay{background-color:transparent;border-color:#fff;color:#fff}.button.is-white.is-outlined.sc-aion-pay:focus, .button.is-white.is-outlined.sc-aion-pay:hover{background-color:#fff;border-color:#fff;color:#0a0a0a}.button.is-white.is-outlined.is-loading.sc-aion-pay::after{border-color:transparent transparent #fff #fff!important}.button.is-white.is-outlined[disabled].sc-aion-pay{background-color:transparent;border-color:#fff;-webkit-box-shadow:none;box-shadow:none;color:#fff}.button.is-white.is-inverted.is-outlined.sc-aion-pay{background-color:transparent;border-color:#0a0a0a;color:#0a0a0a}.button.is-white.is-inverted.is-outlined.sc-aion-pay:focus, .button.is-white.is-inverted.is-outlined.sc-aion-pay:hover{background-color:#0a0a0a;color:#fff}.button.is-white.is-inverted.is-outlined[disabled].sc-aion-pay{background-color:transparent;border-color:#0a0a0a;-webkit-box-shadow:none;box-shadow:none;color:#0a0a0a}.button.is-black.sc-aion-pay{background-color:#0a0a0a;border-color:transparent;color:#fff}.button.is-black.is-hovered.sc-aion-pay, .button.is-black.sc-aion-pay:hover{background-color:#040404;border-color:transparent;color:#fff}.button.is-black.is-focused.sc-aion-pay, .button.is-black.sc-aion-pay:focus{border-color:transparent;color:#fff}.button.is-black.is-focused.sc-aion-pay:not(:active), .button.is-black.sc-aion-pay:focus:not(:active){-webkit-box-shadow:0 0 0 .125em rgba(10,10,10,.25);box-shadow:0 0 0 .125em rgba(10,10,10,.25)}.button.is-black.is-active.sc-aion-pay, .button.is-black.sc-aion-pay:active{background-color:#000;border-color:transparent;color:#fff}.button.is-black[disabled].sc-aion-pay{background-color:#0a0a0a;border-color:transparent;-webkit-box-shadow:none;box-shadow:none}.button.is-black.is-inverted.sc-aion-pay{background-color:#fff;color:#0a0a0a}.button.is-black.is-inverted.sc-aion-pay:hover{background-color:#f2f2f2}.button.is-black.is-inverted[disabled].sc-aion-pay{background-color:#fff;border-color:transparent;-webkit-box-shadow:none;box-shadow:none;color:#0a0a0a}.button.is-black.is-loading.sc-aion-pay::after{border-color:transparent transparent #fff #fff!important}.button.is-black.is-outlined.sc-aion-pay{background-color:transparent;border-color:#0a0a0a;color:#0a0a0a}.button.is-black.is-outlined.sc-aion-pay:focus, .button.is-black.is-outlined.sc-aion-pay:hover{background-color:#0a0a0a;border-color:#0a0a0a;color:#fff}.button.is-black.is-outlined.is-loading.sc-aion-pay::after{border-color:transparent transparent #0a0a0a #0a0a0a!important}.button.is-black.is-outlined[disabled].sc-aion-pay{background-color:transparent;border-color:#0a0a0a;-webkit-box-shadow:none;box-shadow:none;color:#0a0a0a}.button.is-black.is-inverted.is-outlined.sc-aion-pay{background-color:transparent;border-color:#fff;color:#fff}.button.is-black.is-inverted.is-outlined.sc-aion-pay:focus, .button.is-black.is-inverted.is-outlined.sc-aion-pay:hover{background-color:#fff;color:#0a0a0a}.button.is-black.is-inverted.is-outlined[disabled].sc-aion-pay{background-color:transparent;border-color:#fff;-webkit-box-shadow:none;box-shadow:none;color:#fff}.button.is-light.sc-aion-pay{background-color:#f5f5f5;border-color:transparent;color:#363636}.button.is-light.is-hovered.sc-aion-pay, .button.is-light.sc-aion-pay:hover{background-color:#eee;border-color:transparent;color:#363636}.button.is-light.is-focused.sc-aion-pay, .button.is-light.sc-aion-pay:focus{border-color:transparent;color:#363636}.button.is-light.is-focused.sc-aion-pay:not(:active), .button.is-light.sc-aion-pay:focus:not(:active){-webkit-box-shadow:0 0 0 .125em rgba(245,245,245,.25);box-shadow:0 0 0 .125em rgba(245,245,245,.25)}.button.is-light.is-active.sc-aion-pay, .button.is-light.sc-aion-pay:active{background-color:#e8e8e8;border-color:transparent;color:#363636}.button.is-light[disabled].sc-aion-pay{background-color:#f5f5f5;border-color:transparent;-webkit-box-shadow:none;box-shadow:none}.button.is-light.is-inverted.sc-aion-pay{background-color:#363636;color:#f5f5f5}.button.is-light.is-inverted.sc-aion-pay:hover{background-color:#292929}.button.is-light.is-inverted[disabled].sc-aion-pay{background-color:#363636;border-color:transparent;-webkit-box-shadow:none;box-shadow:none;color:#f5f5f5}.button.is-light.is-loading.sc-aion-pay::after{border-color:transparent transparent #363636 #363636!important}.button.is-light.is-outlined.sc-aion-pay{background-color:transparent;border-color:#f5f5f5;color:#f5f5f5}.button.is-light.is-outlined.sc-aion-pay:focus, .button.is-light.is-outlined.sc-aion-pay:hover{background-color:#f5f5f5;border-color:#f5f5f5;color:#363636}.button.is-light.is-outlined.is-loading.sc-aion-pay::after{border-color:transparent transparent #f5f5f5 #f5f5f5!important}.button.is-light.is-outlined[disabled].sc-aion-pay{background-color:transparent;border-color:#f5f5f5;-webkit-box-shadow:none;box-shadow:none;color:#f5f5f5}.button.is-light.is-inverted.is-outlined.sc-aion-pay{background-color:transparent;border-color:#363636;color:#363636}.button.is-light.is-inverted.is-outlined.sc-aion-pay:focus, .button.is-light.is-inverted.is-outlined.sc-aion-pay:hover{background-color:#363636;color:#f5f5f5}.button.is-light.is-inverted.is-outlined[disabled].sc-aion-pay{background-color:transparent;border-color:#363636;-webkit-box-shadow:none;box-shadow:none;color:#363636}.button.is-dark.sc-aion-pay{background-color:#363636;border-color:transparent;color:#f5f5f5}.button.is-dark.is-hovered.sc-aion-pay, .button.is-dark.sc-aion-pay:hover{background-color:#2f2f2f;border-color:transparent;color:#f5f5f5}.button.is-dark.is-focused.sc-aion-pay, .button.is-dark.sc-aion-pay:focus{border-color:transparent;color:#f5f5f5}.button.is-dark.is-focused.sc-aion-pay:not(:active), .button.is-dark.sc-aion-pay:focus:not(:active){-webkit-box-shadow:0 0 0 .125em rgba(54,54,54,.25);box-shadow:0 0 0 .125em rgba(54,54,54,.25)}.button.is-dark.is-active.sc-aion-pay, .button.is-dark.sc-aion-pay:active{background-color:#292929;border-color:transparent;color:#f5f5f5}.button.is-dark[disabled].sc-aion-pay{background-color:#363636;border-color:transparent;-webkit-box-shadow:none;box-shadow:none}.button.is-dark.is-inverted.sc-aion-pay{background-color:#f5f5f5;color:#363636}.button.is-dark.is-inverted.sc-aion-pay:hover{background-color:#e8e8e8}.button.is-dark.is-inverted[disabled].sc-aion-pay{background-color:#f5f5f5;border-color:transparent;-webkit-box-shadow:none;box-shadow:none;color:#363636}.button.is-dark.is-loading.sc-aion-pay::after{border-color:transparent transparent #f5f5f5 #f5f5f5!important}.button.is-dark.is-outlined.sc-aion-pay{background-color:transparent;border-color:#363636;color:#363636}.button.is-dark.is-outlined.sc-aion-pay:focus, .button.is-dark.is-outlined.sc-aion-pay:hover{background-color:#363636;border-color:#363636;color:#f5f5f5}.button.is-dark.is-outlined.is-loading.sc-aion-pay::after{border-color:transparent transparent #363636 #363636!important}.button.is-dark.is-outlined[disabled].sc-aion-pay{background-color:transparent;border-color:#363636;-webkit-box-shadow:none;box-shadow:none;color:#363636}.button.is-dark.is-inverted.is-outlined.sc-aion-pay{background-color:transparent;border-color:#f5f5f5;color:#f5f5f5}.button.is-dark.is-inverted.is-outlined.sc-aion-pay:focus, .button.is-dark.is-inverted.is-outlined.sc-aion-pay:hover{background-color:#f5f5f5;color:#363636}.button.is-dark.is-inverted.is-outlined[disabled].sc-aion-pay{background-color:transparent;border-color:#f5f5f5;-webkit-box-shadow:none;box-shadow:none;color:#f5f5f5}.button.is-primary.sc-aion-pay{background-color:#00d1b2;border-color:transparent;color:#fff}.button.is-primary.is-hovered.sc-aion-pay, .button.is-primary.sc-aion-pay:hover{background-color:#00c4a7;border-color:transparent;color:#fff}.button.is-primary.is-focused.sc-aion-pay, .button.is-primary.sc-aion-pay:focus{border-color:transparent;color:#fff}.button.is-primary.is-focused.sc-aion-pay:not(:active), .button.is-primary.sc-aion-pay:focus:not(:active){-webkit-box-shadow:0 0 0 .125em rgba(0,209,178,.25);box-shadow:0 0 0 .125em rgba(0,209,178,.25)}.button.is-primary.is-active.sc-aion-pay, .button.is-primary.sc-aion-pay:active{background-color:#00b89c;border-color:transparent;color:#fff}.button.is-primary[disabled].sc-aion-pay{background-color:#00d1b2;border-color:transparent;-webkit-box-shadow:none;box-shadow:none}.button.is-primary.is-inverted.sc-aion-pay{background-color:#fff;color:#00d1b2}.button.is-primary.is-inverted.sc-aion-pay:hover{background-color:#f2f2f2}.button.is-primary.is-inverted[disabled].sc-aion-pay{background-color:#fff;border-color:transparent;-webkit-box-shadow:none;box-shadow:none;color:#00d1b2}.button.is-primary.is-loading.sc-aion-pay::after{border-color:transparent transparent #fff #fff!important}.button.is-primary.is-outlined.sc-aion-pay{background-color:transparent;border-color:#00d1b2;color:#00d1b2}.button.is-primary.is-outlined.sc-aion-pay:focus, .button.is-primary.is-outlined.sc-aion-pay:hover{background-color:#00d1b2;border-color:#00d1b2;color:#fff}.button.is-primary.is-outlined.is-loading.sc-aion-pay::after{border-color:transparent transparent #00d1b2 #00d1b2!important}.button.is-primary.is-outlined[disabled].sc-aion-pay{background-color:transparent;border-color:#00d1b2;-webkit-box-shadow:none;box-shadow:none;color:#00d1b2}.button.is-primary.is-inverted.is-outlined.sc-aion-pay{background-color:transparent;border-color:#fff;color:#fff}.button.is-primary.is-inverted.is-outlined.sc-aion-pay:focus, .button.is-primary.is-inverted.is-outlined.sc-aion-pay:hover{background-color:#fff;color:#00d1b2}.button.is-primary.is-inverted.is-outlined[disabled].sc-aion-pay{background-color:transparent;border-color:#fff;-webkit-box-shadow:none;box-shadow:none;color:#fff}.button.is-link.sc-aion-pay{background-color:#3273dc;border-color:transparent;color:#fff}.button.is-link.is-hovered.sc-aion-pay, .button.is-link.sc-aion-pay:hover{background-color:#276cda;border-color:transparent;color:#fff}.button.is-link.is-focused.sc-aion-pay, .button.is-link.sc-aion-pay:focus{border-color:transparent;color:#fff}.button.is-link.is-focused.sc-aion-pay:not(:active), .button.is-link.sc-aion-pay:focus:not(:active){-webkit-box-shadow:0 0 0 .125em rgba(50,115,220,.25);box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.button.is-link.is-active.sc-aion-pay, .button.is-link.sc-aion-pay:active{background-color:#2366d1;border-color:transparent;color:#fff}.button.is-link[disabled].sc-aion-pay{background-color:#3273dc;border-color:transparent;-webkit-box-shadow:none;box-shadow:none}.button.is-link.is-inverted.sc-aion-pay{background-color:#fff;color:#3273dc}.button.is-link.is-inverted.sc-aion-pay:hover{background-color:#f2f2f2}.button.is-link.is-inverted[disabled].sc-aion-pay{background-color:#fff;border-color:transparent;-webkit-box-shadow:none;box-shadow:none;color:#3273dc}.button.is-link.is-loading.sc-aion-pay::after{border-color:transparent transparent #fff #fff!important}.button.is-link.is-outlined.sc-aion-pay{background-color:transparent;border-color:#3273dc;color:#3273dc}.button.is-link.is-outlined.sc-aion-pay:focus, .button.is-link.is-outlined.sc-aion-pay:hover{background-color:#3273dc;border-color:#3273dc;color:#fff}.button.is-link.is-outlined.is-loading.sc-aion-pay::after{border-color:transparent transparent #3273dc #3273dc!important}.button.is-link.is-outlined[disabled].sc-aion-pay{background-color:transparent;border-color:#3273dc;-webkit-box-shadow:none;box-shadow:none;color:#3273dc}.button.is-link.is-inverted.is-outlined.sc-aion-pay{background-color:transparent;border-color:#fff;color:#fff}.button.is-link.is-inverted.is-outlined.sc-aion-pay:focus, .button.is-link.is-inverted.is-outlined.sc-aion-pay:hover{background-color:#fff;color:#3273dc}.button.is-link.is-inverted.is-outlined[disabled].sc-aion-pay{background-color:transparent;border-color:#fff;-webkit-box-shadow:none;box-shadow:none;color:#fff}.button.is-info.sc-aion-pay{background-color:#209cee;border-color:transparent;color:#fff}.button.is-info.is-hovered.sc-aion-pay, .button.is-info.sc-aion-pay:hover{background-color:#1496ed;border-color:transparent;color:#fff}.button.is-info.is-focused.sc-aion-pay, .button.is-info.sc-aion-pay:focus{border-color:transparent;color:#fff}.button.is-info.is-focused.sc-aion-pay:not(:active), .button.is-info.sc-aion-pay:focus:not(:active){-webkit-box-shadow:0 0 0 .125em rgba(32,156,238,.25);box-shadow:0 0 0 .125em rgba(32,156,238,.25)}.button.is-info.is-active.sc-aion-pay, .button.is-info.sc-aion-pay:active{background-color:#118fe4;border-color:transparent;color:#fff}.button.is-info[disabled].sc-aion-pay{background-color:#209cee;border-color:transparent;-webkit-box-shadow:none;box-shadow:none}.button.is-info.is-inverted.sc-aion-pay{background-color:#fff;color:#209cee}.button.is-info.is-inverted.sc-aion-pay:hover{background-color:#f2f2f2}.button.is-info.is-inverted[disabled].sc-aion-pay{background-color:#fff;border-color:transparent;-webkit-box-shadow:none;box-shadow:none;color:#209cee}.button.is-info.is-loading.sc-aion-pay::after{border-color:transparent transparent #fff #fff!important}.button.is-info.is-outlined.sc-aion-pay{background-color:transparent;border-color:#209cee;color:#209cee}.button.is-info.is-outlined.sc-aion-pay:focus, .button.is-info.is-outlined.sc-aion-pay:hover{background-color:#209cee;border-color:#209cee;color:#fff}.button.is-info.is-outlined.is-loading.sc-aion-pay::after{border-color:transparent transparent #209cee #209cee!important}.button.is-info.is-outlined[disabled].sc-aion-pay{background-color:transparent;border-color:#209cee;-webkit-box-shadow:none;box-shadow:none;color:#209cee}.button.is-info.is-inverted.is-outlined.sc-aion-pay{background-color:transparent;border-color:#fff;color:#fff}.button.is-info.is-inverted.is-outlined.sc-aion-pay:focus, .button.is-info.is-inverted.is-outlined.sc-aion-pay:hover{background-color:#fff;color:#209cee}.button.is-info.is-inverted.is-outlined[disabled].sc-aion-pay{background-color:transparent;border-color:#fff;-webkit-box-shadow:none;box-shadow:none;color:#fff}.button.is-success.sc-aion-pay{background-color:#23d160;border-color:transparent;color:#fff}.button.is-success.is-hovered.sc-aion-pay, .button.is-success.sc-aion-pay:hover{background-color:#22c65b;border-color:transparent;color:#fff}.button.is-success.is-focused.sc-aion-pay, .button.is-success.sc-aion-pay:focus{border-color:transparent;color:#fff}.button.is-success.is-focused.sc-aion-pay:not(:active), .button.is-success.sc-aion-pay:focus:not(:active){-webkit-box-shadow:0 0 0 .125em rgba(35,209,96,.25);box-shadow:0 0 0 .125em rgba(35,209,96,.25)}.button.is-success.is-active.sc-aion-pay, .button.is-success.sc-aion-pay:active{background-color:#20bc56;border-color:transparent;color:#fff}.button.is-success[disabled].sc-aion-pay{background-color:#23d160;border-color:transparent;-webkit-box-shadow:none;box-shadow:none}.button.is-success.is-inverted.sc-aion-pay{background-color:#fff;color:#23d160}.button.is-success.is-inverted.sc-aion-pay:hover{background-color:#f2f2f2}.button.is-success.is-inverted[disabled].sc-aion-pay{background-color:#fff;border-color:transparent;-webkit-box-shadow:none;box-shadow:none;color:#23d160}.button.is-success.is-loading.sc-aion-pay::after{border-color:transparent transparent #fff #fff!important}.button.is-success.is-outlined.sc-aion-pay{background-color:transparent;border-color:#23d160;color:#23d160}.button.is-success.is-outlined.sc-aion-pay:focus, .button.is-success.is-outlined.sc-aion-pay:hover{background-color:#23d160;border-color:#23d160;color:#fff}.button.is-success.is-outlined.is-loading.sc-aion-pay::after{border-color:transparent transparent #23d160 #23d160!important}.button.is-success.is-outlined[disabled].sc-aion-pay{background-color:transparent;border-color:#23d160;-webkit-box-shadow:none;box-shadow:none;color:#23d160}.button.is-success.is-inverted.is-outlined.sc-aion-pay{background-color:transparent;border-color:#fff;color:#fff}.button.is-success.is-inverted.is-outlined.sc-aion-pay:focus, .button.is-success.is-inverted.is-outlined.sc-aion-pay:hover{background-color:#fff;color:#23d160}.button.is-success.is-inverted.is-outlined[disabled].sc-aion-pay{background-color:transparent;border-color:#fff;-webkit-box-shadow:none;box-shadow:none;color:#fff}.button.is-warning.sc-aion-pay{background-color:#ffdd57;border-color:transparent;color:rgba(0,0,0,.7)}.button.is-warning.is-hovered.sc-aion-pay, .button.is-warning.sc-aion-pay:hover{background-color:#ffdb4a;border-color:transparent;color:rgba(0,0,0,.7)}.button.is-warning.is-focused.sc-aion-pay, .button.is-warning.sc-aion-pay:focus{border-color:transparent;color:rgba(0,0,0,.7)}.button.is-warning.is-focused.sc-aion-pay:not(:active), .button.is-warning.sc-aion-pay:focus:not(:active){-webkit-box-shadow:0 0 0 .125em rgba(255,221,87,.25);box-shadow:0 0 0 .125em rgba(255,221,87,.25)}.button.is-warning.is-active.sc-aion-pay, .button.is-warning.sc-aion-pay:active{background-color:#ffd83d;border-color:transparent;color:rgba(0,0,0,.7)}.button.is-warning[disabled].sc-aion-pay{background-color:#ffdd57;border-color:transparent;-webkit-box-shadow:none;box-shadow:none}.button.is-warning.is-inverted.sc-aion-pay{background-color:rgba(0,0,0,.7);color:#ffdd57}.button.is-warning.is-inverted.sc-aion-pay:hover{background-color:rgba(0,0,0,.7)}.button.is-warning.is-inverted[disabled].sc-aion-pay{background-color:rgba(0,0,0,.7);border-color:transparent;-webkit-box-shadow:none;box-shadow:none;color:#ffdd57}.button.is-warning.is-loading.sc-aion-pay::after{border-color:transparent transparent rgba(0,0,0,.7) rgba(0,0,0,.7)!important}.button.is-warning.is-outlined.sc-aion-pay{background-color:transparent;border-color:#ffdd57;color:#ffdd57}.button.is-warning.is-outlined.sc-aion-pay:focus, .button.is-warning.is-outlined.sc-aion-pay:hover{background-color:#ffdd57;border-color:#ffdd57;color:rgba(0,0,0,.7)}.button.is-warning.is-outlined.is-loading.sc-aion-pay::after{border-color:transparent transparent #ffdd57 #ffdd57!important}.button.is-warning.is-outlined[disabled].sc-aion-pay{background-color:transparent;border-color:#ffdd57;-webkit-box-shadow:none;box-shadow:none;color:#ffdd57}.button.is-warning.is-inverted.is-outlined.sc-aion-pay{background-color:transparent;border-color:rgba(0,0,0,.7);color:rgba(0,0,0,.7)}.button.is-warning.is-inverted.is-outlined.sc-aion-pay:focus, .button.is-warning.is-inverted.is-outlined.sc-aion-pay:hover{background-color:rgba(0,0,0,.7);color:#ffdd57}.button.is-warning.is-inverted.is-outlined[disabled].sc-aion-pay{background-color:transparent;border-color:rgba(0,0,0,.7);-webkit-box-shadow:none;box-shadow:none;color:rgba(0,0,0,.7)}.button.is-danger.sc-aion-pay{background-color:#ff3860;border-color:transparent;color:#fff}.button.is-danger.is-hovered.sc-aion-pay, .button.is-danger.sc-aion-pay:hover{background-color:#ff2b56;border-color:transparent;color:#fff}.button.is-danger.is-focused.sc-aion-pay, .button.is-danger.sc-aion-pay:focus{border-color:transparent;color:#fff}.button.is-danger.is-focused.sc-aion-pay:not(:active), .button.is-danger.sc-aion-pay:focus:not(:active){-webkit-box-shadow:0 0 0 .125em rgba(255,56,96,.25);box-shadow:0 0 0 .125em rgba(255,56,96,.25)}.button.is-danger.is-active.sc-aion-pay, .button.is-danger.sc-aion-pay:active{background-color:#ff1f4b;border-color:transparent;color:#fff}.button.is-danger[disabled].sc-aion-pay{background-color:#ff3860;border-color:transparent;-webkit-box-shadow:none;box-shadow:none}.button.is-danger.is-inverted.sc-aion-pay{background-color:#fff;color:#ff3860}.button.is-danger.is-inverted.sc-aion-pay:hover{background-color:#f2f2f2}.button.is-danger.is-inverted[disabled].sc-aion-pay{background-color:#fff;border-color:transparent;-webkit-box-shadow:none;box-shadow:none;color:#ff3860}.button.is-danger.is-loading.sc-aion-pay::after{border-color:transparent transparent #fff #fff!important}.button.is-danger.is-outlined.sc-aion-pay{background-color:transparent;border-color:#ff3860;color:#ff3860}.button.is-danger.is-outlined.sc-aion-pay:focus, .button.is-danger.is-outlined.sc-aion-pay:hover{background-color:#ff3860;border-color:#ff3860;color:#fff}.button.is-danger.is-outlined.is-loading.sc-aion-pay::after{border-color:transparent transparent #ff3860 #ff3860!important}.button.is-danger.is-outlined[disabled].sc-aion-pay{background-color:transparent;border-color:#ff3860;-webkit-box-shadow:none;box-shadow:none;color:#ff3860}.button.is-danger.is-inverted.is-outlined.sc-aion-pay{background-color:transparent;border-color:#fff;color:#fff}.button.is-danger.is-inverted.is-outlined.sc-aion-pay:focus, .button.is-danger.is-inverted.is-outlined.sc-aion-pay:hover{background-color:#fff;color:#ff3860}.button.is-danger.is-inverted.is-outlined[disabled].sc-aion-pay{background-color:transparent;border-color:#fff;-webkit-box-shadow:none;box-shadow:none;color:#fff}.button.is-small.sc-aion-pay{border-radius:2px;font-size:.75rem}.button.is-medium.sc-aion-pay{font-size:1.25rem}.button.is-large.sc-aion-pay{font-size:1.5rem}.button[disabled].sc-aion-pay{background-color:#fff;border-color:#dbdbdb;-webkit-box-shadow:none;box-shadow:none;opacity:.5}.button.is-fullwidth.sc-aion-pay{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}.button.is-loading.sc-aion-pay{color:transparent!important;pointer-events:none}.button.is-loading.sc-aion-pay::after{left:calc(50% - (1em / 2));top:calc(50% - (1em / 2));position:absolute!important}.button.is-static.sc-aion-pay{background-color:#f5f5f5;border-color:#dbdbdb;color:#7a7a7a;-webkit-box-shadow:none;box-shadow:none;pointer-events:none}.button.is-rounded.sc-aion-pay{border-radius:290486px;padding-left:1em;padding-right:1em}.buttons.sc-aion-pay{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.buttons.sc-aion-pay   .button.sc-aion-pay{margin-bottom:.5rem}.buttons.sc-aion-pay   .button.sc-aion-pay:not(:last-child):not(.is-fullwidth){margin-right:.5rem}.buttons.sc-aion-pay:last-child{margin-bottom:-.5rem}.buttons.sc-aion-pay:not(:last-child){margin-bottom:1rem}.buttons.has-addons.sc-aion-pay   .button.sc-aion-pay:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.buttons.has-addons.sc-aion-pay   .button.sc-aion-pay:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.buttons.has-addons.sc-aion-pay   .button.sc-aion-pay:last-child{margin-right:0}.buttons.has-addons.sc-aion-pay   .button.is-hovered.sc-aion-pay, .buttons.has-addons.sc-aion-pay   .button.sc-aion-pay:hover{z-index:2}.buttons.has-addons.sc-aion-pay   .button.is-active.sc-aion-pay, .buttons.has-addons.sc-aion-pay   .button.is-focused.sc-aion-pay, .buttons.has-addons.sc-aion-pay   .button.is-selected.sc-aion-pay, .buttons.has-addons.sc-aion-pay   .button.sc-aion-pay:active, .buttons.has-addons.sc-aion-pay   .button.sc-aion-pay:focus{z-index:3}.buttons.has-addons.sc-aion-pay   .button.is-active.sc-aion-pay:hover, .buttons.has-addons.sc-aion-pay   .button.is-focused.sc-aion-pay:hover, .buttons.has-addons.sc-aion-pay   .button.is-selected.sc-aion-pay:hover, .buttons.has-addons.sc-aion-pay   .button.sc-aion-pay:active:hover, .buttons.has-addons.sc-aion-pay   .button.sc-aion-pay:focus:hover{z-index:4}.buttons.has-addons.sc-aion-pay   .button.is-expanded.sc-aion-pay{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.buttons.is-centered.sc-aion-pay{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.buttons.is-right.sc-aion-pay{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.container.sc-aion-pay{margin:0 auto;position:relative}\@media screen and (min-width:1088px){.container.sc-aion-pay{max-width:960px;width:960px}.container.is-fluid.sc-aion-pay{margin-left:64px;margin-right:64px;max-width:none;width:auto}}\@media screen and (max-width:1279px){.container.is-widescreen.sc-aion-pay{max-width:1152px;width:auto}}\@media screen and (max-width:1471px){.container.is-fullhd.sc-aion-pay{max-width:1344px;width:auto}}\@media screen and (min-width:1280px){.container.sc-aion-pay{max-width:1152px;width:1152px}}\@media screen and (min-width:1472px){.is-invisible-fullhd.sc-aion-pay{visibility:hidden!important}.container.sc-aion-pay{max-width:1344px;width:1344px}}.content.sc-aion-pay   li.sc-aion-pay + li.sc-aion-pay{margin-top:.25em}.content.sc-aion-pay   blockquote.sc-aion-pay:not(:last-child), .content.sc-aion-pay   dl.sc-aion-pay:not(:last-child), .content.sc-aion-pay   ol.sc-aion-pay:not(:last-child), .content.sc-aion-pay   p.sc-aion-pay:not(:last-child), .content.sc-aion-pay   pre.sc-aion-pay:not(:last-child), .content.sc-aion-pay   table.sc-aion-pay:not(:last-child), .content.sc-aion-pay   ul.sc-aion-pay:not(:last-child){margin-bottom:1em}.content.sc-aion-pay   h1.sc-aion-pay, .content.sc-aion-pay   h2.sc-aion-pay, .content.sc-aion-pay   h3.sc-aion-pay, .content.sc-aion-pay   h4.sc-aion-pay, .content.sc-aion-pay   h5.sc-aion-pay, .content.sc-aion-pay   h6.sc-aion-pay{color:#363636;font-weight:600;line-height:1.125}.content.sc-aion-pay   h1.sc-aion-pay{font-size:2em;margin-bottom:.5em}.content.sc-aion-pay   h1.sc-aion-pay:not(:first-child){margin-top:1em}.content.sc-aion-pay   h2.sc-aion-pay{font-size:1.75em;margin-bottom:.5714em}.content.sc-aion-pay   h2.sc-aion-pay:not(:first-child){margin-top:1.1428em}.content.sc-aion-pay   h3.sc-aion-pay{font-size:1.5em;margin-bottom:.6666em}.content.sc-aion-pay   h3.sc-aion-pay:not(:first-child){margin-top:1.3333em}.content.sc-aion-pay   h4.sc-aion-pay{font-size:1.25em;margin-bottom:.8em}.content.sc-aion-pay   h5.sc-aion-pay{font-size:1.125em;margin-bottom:.8888em}.content.sc-aion-pay   h6.sc-aion-pay{font-size:1em;margin-bottom:1em}.content.sc-aion-pay   blockquote.sc-aion-pay{background-color:#f5f5f5;border-left:5px solid #dbdbdb;padding:1.25em 1.5em}.content.sc-aion-pay   ol.sc-aion-pay{list-style-position:outside;margin-left:2em;margin-top:1em}.content.sc-aion-pay   ol.sc-aion-pay:not([type]){list-style-type:decimal}.content.sc-aion-pay   ol.sc-aion-pay:not([type]).is-lower-alpha{list-style-type:lower-alpha}.content.sc-aion-pay   ol.sc-aion-pay:not([type]).is-lower-roman{list-style-type:lower-roman}.content.sc-aion-pay   ol.sc-aion-pay:not([type]).is-upper-alpha{list-style-type:upper-alpha}.content.sc-aion-pay   ol.sc-aion-pay:not([type]).is-upper-roman{list-style-type:upper-roman}.content.sc-aion-pay   ul.sc-aion-pay{list-style:disc;margin-left:2em;margin-top:1em}.content.sc-aion-pay   ul.sc-aion-pay   ul.sc-aion-pay{list-style-type:circle;margin-top:.5em}.content.sc-aion-pay   ul.sc-aion-pay   ul.sc-aion-pay   ul.sc-aion-pay{list-style-type:square}.content.sc-aion-pay   dd.sc-aion-pay{margin-left:2em}.content.sc-aion-pay   figure.sc-aion-pay{margin-left:2em;margin-right:2em;text-align:center}.content.sc-aion-pay   figure.sc-aion-pay:not(:first-child){margin-top:2em}.content.sc-aion-pay   figure.sc-aion-pay:not(:last-child){margin-bottom:2em}.content.sc-aion-pay   figure.sc-aion-pay   img.sc-aion-pay{display:inline-block}.content.sc-aion-pay   figure.sc-aion-pay   figcaption.sc-aion-pay{font-style:italic}.content.sc-aion-pay   pre.sc-aion-pay{-webkit-overflow-scrolling:touch;overflow-x:auto;padding:1.25em 1.5em;white-space:pre;word-wrap:normal}.content.sc-aion-pay   sub.sc-aion-pay, .content.sc-aion-pay   sup.sc-aion-pay{font-size:75%}.content.sc-aion-pay   table.sc-aion-pay{width:100%}.content.sc-aion-pay   table.sc-aion-pay   td.sc-aion-pay, .content.sc-aion-pay   table.sc-aion-pay   th.sc-aion-pay{border:1px solid #dbdbdb;border-width:0 0 1px;padding:.5em .75em;vertical-align:top}.content.sc-aion-pay   table.sc-aion-pay   th.sc-aion-pay{color:#363636;text-align:left}.content.sc-aion-pay   table.sc-aion-pay   thead.sc-aion-pay   td.sc-aion-pay, .content.sc-aion-pay   table.sc-aion-pay   thead.sc-aion-pay   th.sc-aion-pay{border-width:0 0 2px;color:#363636}.content.sc-aion-pay   table.sc-aion-pay   tfoot.sc-aion-pay   td.sc-aion-pay, .content.sc-aion-pay   table.sc-aion-pay   tfoot.sc-aion-pay   th.sc-aion-pay{border-width:2px 0 0;color:#363636}.content.sc-aion-pay   table.sc-aion-pay   tbody.sc-aion-pay   tr.sc-aion-pay:last-child   td.sc-aion-pay, .content.sc-aion-pay   table.sc-aion-pay   tbody.sc-aion-pay   tr.sc-aion-pay:last-child   th.sc-aion-pay{border-bottom-width:0}.content.is-small.sc-aion-pay{font-size:.75rem}.content.is-medium.sc-aion-pay{font-size:1.25rem}.content.is-large.sc-aion-pay{font-size:1.5rem}.input.sc-aion-pay, .textarea.sc-aion-pay{background-color:#fff;border-color:#dbdbdb;color:#363636;-webkit-box-shadow:inset 0 1px 2px rgba(10,10,10,.1);box-shadow:inset 0 1px 2px rgba(10,10,10,.1);max-width:100%;width:100%}.input.sc-aion-pay::-moz-placeholder, .textarea.sc-aion-pay::-moz-placeholder{color:rgba(54,54,54,.3)}.input.sc-aion-pay::-webkit-input-placeholder, .textarea.sc-aion-pay::-webkit-input-placeholder{color:rgba(54,54,54,.3)}.input.sc-aion-pay:-moz-placeholder, .textarea.sc-aion-pay:-moz-placeholder{color:rgba(54,54,54,.3)}.input.sc-aion-pay:-ms-input-placeholder, .textarea.sc-aion-pay:-ms-input-placeholder{color:rgba(54,54,54,.3)}.input.is-hovered.sc-aion-pay, .input.sc-aion-pay:hover, .textarea.is-hovered.sc-aion-pay, .textarea.sc-aion-pay:hover{border-color:#b5b5b5}.input.is-active.sc-aion-pay, .input.is-focused.sc-aion-pay, .input.sc-aion-pay:active, .input.sc-aion-pay:focus, .textarea.is-active.sc-aion-pay, .textarea.is-focused.sc-aion-pay, .textarea.sc-aion-pay:active, .textarea.sc-aion-pay:focus{border-color:#3273dc;-webkit-box-shadow:0 0 0 .125em rgba(50,115,220,.25);box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.input[disabled].sc-aion-pay, .textarea[disabled].sc-aion-pay{background-color:#f5f5f5;border-color:#f5f5f5;-webkit-box-shadow:none;box-shadow:none;color:#7a7a7a}.input[disabled].sc-aion-pay::-moz-placeholder, .textarea[disabled].sc-aion-pay::-moz-placeholder{color:rgba(122,122,122,.3)}.input[disabled].sc-aion-pay::-webkit-input-placeholder, .textarea[disabled].sc-aion-pay::-webkit-input-placeholder{color:rgba(122,122,122,.3)}.input[disabled].sc-aion-pay:-moz-placeholder, .textarea[disabled].sc-aion-pay:-moz-placeholder{color:rgba(122,122,122,.3)}.input[disabled].sc-aion-pay:-ms-input-placeholder, .textarea[disabled].sc-aion-pay:-ms-input-placeholder{color:rgba(122,122,122,.3)}.input[readonly].sc-aion-pay, .textarea[readonly].sc-aion-pay{-webkit-box-shadow:none;box-shadow:none}.input.is-white.sc-aion-pay, .textarea.is-white.sc-aion-pay{border-color:#fff}.input.is-white.is-active.sc-aion-pay, .input.is-white.is-focused.sc-aion-pay, .input.is-white.sc-aion-pay:active, .input.is-white.sc-aion-pay:focus, .textarea.is-white.is-active.sc-aion-pay, .textarea.is-white.is-focused.sc-aion-pay, .textarea.is-white.sc-aion-pay:active, .textarea.is-white.sc-aion-pay:focus{-webkit-box-shadow:0 0 0 .125em rgba(255,255,255,.25);box-shadow:0 0 0 .125em rgba(255,255,255,.25)}.input.is-black.sc-aion-pay, .textarea.is-black.sc-aion-pay{border-color:#0a0a0a}.input.is-black.is-active.sc-aion-pay, .input.is-black.is-focused.sc-aion-pay, .input.is-black.sc-aion-pay:active, .input.is-black.sc-aion-pay:focus, .textarea.is-black.is-active.sc-aion-pay, .textarea.is-black.is-focused.sc-aion-pay, .textarea.is-black.sc-aion-pay:active, .textarea.is-black.sc-aion-pay:focus{-webkit-box-shadow:0 0 0 .125em rgba(10,10,10,.25);box-shadow:0 0 0 .125em rgba(10,10,10,.25)}.input.is-light.sc-aion-pay, .textarea.is-light.sc-aion-pay{border-color:#f5f5f5}.input.is-light.is-active.sc-aion-pay, .input.is-light.is-focused.sc-aion-pay, .input.is-light.sc-aion-pay:active, .input.is-light.sc-aion-pay:focus, .textarea.is-light.is-active.sc-aion-pay, .textarea.is-light.is-focused.sc-aion-pay, .textarea.is-light.sc-aion-pay:active, .textarea.is-light.sc-aion-pay:focus{-webkit-box-shadow:0 0 0 .125em rgba(245,245,245,.25);box-shadow:0 0 0 .125em rgba(245,245,245,.25)}.input.is-dark.sc-aion-pay, .textarea.is-dark.sc-aion-pay{border-color:#363636}.input.is-dark.is-active.sc-aion-pay, .input.is-dark.is-focused.sc-aion-pay, .input.is-dark.sc-aion-pay:active, .input.is-dark.sc-aion-pay:focus, .textarea.is-dark.is-active.sc-aion-pay, .textarea.is-dark.is-focused.sc-aion-pay, .textarea.is-dark.sc-aion-pay:active, .textarea.is-dark.sc-aion-pay:focus{-webkit-box-shadow:0 0 0 .125em rgba(54,54,54,.25);box-shadow:0 0 0 .125em rgba(54,54,54,.25)}.input.is-primary.sc-aion-pay, .textarea.is-primary.sc-aion-pay{border-color:#00d1b2}.input.is-primary.is-active.sc-aion-pay, .input.is-primary.is-focused.sc-aion-pay, .input.is-primary.sc-aion-pay:active, .input.is-primary.sc-aion-pay:focus, .textarea.is-primary.is-active.sc-aion-pay, .textarea.is-primary.is-focused.sc-aion-pay, .textarea.is-primary.sc-aion-pay:active, .textarea.is-primary.sc-aion-pay:focus{-webkit-box-shadow:0 0 0 .125em rgba(0,209,178,.25);box-shadow:0 0 0 .125em rgba(0,209,178,.25)}.input.is-link.sc-aion-pay, .textarea.is-link.sc-aion-pay{border-color:#3273dc}.input.is-link.is-active.sc-aion-pay, .input.is-link.is-focused.sc-aion-pay, .input.is-link.sc-aion-pay:active, .input.is-link.sc-aion-pay:focus, .textarea.is-link.is-active.sc-aion-pay, .textarea.is-link.is-focused.sc-aion-pay, .textarea.is-link.sc-aion-pay:active, .textarea.is-link.sc-aion-pay:focus{-webkit-box-shadow:0 0 0 .125em rgba(50,115,220,.25);box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.input.is-info.sc-aion-pay, .textarea.is-info.sc-aion-pay{border-color:#209cee}.input.is-info.is-active.sc-aion-pay, .input.is-info.is-focused.sc-aion-pay, .input.is-info.sc-aion-pay:active, .input.is-info.sc-aion-pay:focus, .textarea.is-info.is-active.sc-aion-pay, .textarea.is-info.is-focused.sc-aion-pay, .textarea.is-info.sc-aion-pay:active, .textarea.is-info.sc-aion-pay:focus{-webkit-box-shadow:0 0 0 .125em rgba(32,156,238,.25);box-shadow:0 0 0 .125em rgba(32,156,238,.25)}.input.is-success.sc-aion-pay, .textarea.is-success.sc-aion-pay{border-color:#23d160}.input.is-success.is-active.sc-aion-pay, .input.is-success.is-focused.sc-aion-pay, .input.is-success.sc-aion-pay:active, .input.is-success.sc-aion-pay:focus, .textarea.is-success.is-active.sc-aion-pay, .textarea.is-success.is-focused.sc-aion-pay, .textarea.is-success.sc-aion-pay:active, .textarea.is-success.sc-aion-pay:focus{-webkit-box-shadow:0 0 0 .125em rgba(35,209,96,.25);box-shadow:0 0 0 .125em rgba(35,209,96,.25)}.input.is-warning.sc-aion-pay, .textarea.is-warning.sc-aion-pay{border-color:#ffdd57}.input.is-warning.is-active.sc-aion-pay, .input.is-warning.is-focused.sc-aion-pay, .input.is-warning.sc-aion-pay:active, .input.is-warning.sc-aion-pay:focus, .textarea.is-warning.is-active.sc-aion-pay, .textarea.is-warning.is-focused.sc-aion-pay, .textarea.is-warning.sc-aion-pay:active, .textarea.is-warning.sc-aion-pay:focus{-webkit-box-shadow:0 0 0 .125em rgba(255,221,87,.25);box-shadow:0 0 0 .125em rgba(255,221,87,.25)}.input.is-danger.sc-aion-pay, .textarea.is-danger.sc-aion-pay{border-color:#ff3860}.input.is-danger.is-active.sc-aion-pay, .input.is-danger.is-focused.sc-aion-pay, .input.is-danger.sc-aion-pay:active, .input.is-danger.sc-aion-pay:focus, .textarea.is-danger.is-active.sc-aion-pay, .textarea.is-danger.is-focused.sc-aion-pay, .textarea.is-danger.sc-aion-pay:active, .textarea.is-danger.sc-aion-pay:focus{-webkit-box-shadow:0 0 0 .125em rgba(255,56,96,.25);box-shadow:0 0 0 .125em rgba(255,56,96,.25)}.input.is-small.sc-aion-pay, .textarea.is-small.sc-aion-pay{border-radius:2px;font-size:.75rem}.input.is-medium.sc-aion-pay, .textarea.is-medium.sc-aion-pay{font-size:1.25rem}.input.is-large.sc-aion-pay, .textarea.is-large.sc-aion-pay{font-size:1.5rem}.input.is-fullwidth.sc-aion-pay, .textarea.is-fullwidth.sc-aion-pay{display:block;width:100%}.input.is-inline.sc-aion-pay, .textarea.is-inline.sc-aion-pay{display:inline;width:auto}.input.is-rounded.sc-aion-pay{border-radius:290486px;padding-left:1em;padding-right:1em}.input.is-static.sc-aion-pay{background-color:transparent;border-color:transparent;-webkit-box-shadow:none;box-shadow:none;padding-left:0;padding-right:0}.textarea.sc-aion-pay{display:block;max-width:100%;min-width:100%;padding:.625em;resize:vertical}.textarea.sc-aion-pay:not([rows]){max-height:600px;min-height:120px}.textarea[rows].sc-aion-pay{height:initial}.textarea.has-fixed-size.sc-aion-pay{resize:none}.checkbox.sc-aion-pay, .radio.sc-aion-pay{cursor:pointer;display:inline-block;line-height:1.25;position:relative}.checkbox.sc-aion-pay   input.sc-aion-pay, .radio.sc-aion-pay   input.sc-aion-pay{cursor:pointer}.checkbox.sc-aion-pay:hover, .radio.sc-aion-pay:hover{color:#363636}.checkbox[disabled].sc-aion-pay, .radio[disabled].sc-aion-pay{color:#7a7a7a;cursor:not-allowed}.radio.sc-aion-pay + .radio.sc-aion-pay{margin-left:.5em}.select.sc-aion-pay{display:inline-block;max-width:100%;position:relative;vertical-align:top}.select.sc-aion-pay:not(.is-multiple){height:2.25em}.select.sc-aion-pay:not(.is-multiple):not(.is-loading)::after{border-color:#3273dc;right:1.125em;z-index:4}.select.is-rounded.sc-aion-pay   select.sc-aion-pay{border-radius:290486px;padding-left:1em}.select.sc-aion-pay   select.sc-aion-pay{background-color:#fff;border-color:#dbdbdb;color:#363636;cursor:pointer;display:block;font-size:1em;max-width:100%;outline:0}.select.sc-aion-pay   select.sc-aion-pay::-moz-placeholder{color:rgba(54,54,54,.3)}.select.sc-aion-pay   select.sc-aion-pay::-webkit-input-placeholder{color:rgba(54,54,54,.3)}.select.sc-aion-pay   select.sc-aion-pay:-moz-placeholder{color:rgba(54,54,54,.3)}.select.sc-aion-pay   select.sc-aion-pay:-ms-input-placeholder{color:rgba(54,54,54,.3)}.select.sc-aion-pay   select.is-hovered.sc-aion-pay, .select.sc-aion-pay   select.sc-aion-pay:hover{border-color:#b5b5b5}.select.sc-aion-pay   select.is-active.sc-aion-pay, .select.sc-aion-pay   select.is-focused.sc-aion-pay, .select.sc-aion-pay   select.sc-aion-pay:active, .select.sc-aion-pay   select.sc-aion-pay:focus{border-color:#3273dc;-webkit-box-shadow:0 0 0 .125em rgba(50,115,220,.25);box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.select.sc-aion-pay   select[disabled].sc-aion-pay{background-color:#f5f5f5;border-color:#f5f5f5;-webkit-box-shadow:none;box-shadow:none;color:#7a7a7a}.select.sc-aion-pay   select[disabled].sc-aion-pay::-moz-placeholder{color:rgba(122,122,122,.3)}.select.sc-aion-pay   select[disabled].sc-aion-pay::-webkit-input-placeholder{color:rgba(122,122,122,.3)}.select.sc-aion-pay   select[disabled].sc-aion-pay:-moz-placeholder{color:rgba(122,122,122,.3)}.select.sc-aion-pay   select[disabled].sc-aion-pay:-ms-input-placeholder{color:rgba(122,122,122,.3)}.select.sc-aion-pay   select.sc-aion-pay::-ms-expand{display:none}.select.sc-aion-pay   select[disabled].sc-aion-pay:hover{border-color:#f5f5f5}.select.sc-aion-pay   select.sc-aion-pay:not([multiple]){padding-right:2.5em}.select.sc-aion-pay   select[multiple].sc-aion-pay{height:auto;padding:0}.select.sc-aion-pay   select[multiple].sc-aion-pay   option.sc-aion-pay{padding:.5em 1em}.select.sc-aion-pay:not(.is-multiple):not(.is-loading):hover::after{border-color:#363636}.select.is-white.sc-aion-pay   select.sc-aion-pay, .select.is-white.sc-aion-pay:not(:hover)::after{border-color:#fff}.select.is-white.sc-aion-pay   select.is-hovered.sc-aion-pay, .select.is-white.sc-aion-pay   select.sc-aion-pay:hover{border-color:#f2f2f2}.select.is-white.sc-aion-pay   select.is-active.sc-aion-pay, .select.is-white.sc-aion-pay   select.is-focused.sc-aion-pay, .select.is-white.sc-aion-pay   select.sc-aion-pay:active, .select.is-white.sc-aion-pay   select.sc-aion-pay:focus{-webkit-box-shadow:0 0 0 .125em rgba(255,255,255,.25);box-shadow:0 0 0 .125em rgba(255,255,255,.25)}.select.is-black.sc-aion-pay   select.sc-aion-pay, .select.is-black.sc-aion-pay:not(:hover)::after{border-color:#0a0a0a}.select.is-black.sc-aion-pay   select.is-hovered.sc-aion-pay, .select.is-black.sc-aion-pay   select.sc-aion-pay:hover{border-color:#000}.select.is-black.sc-aion-pay   select.is-active.sc-aion-pay, .select.is-black.sc-aion-pay   select.is-focused.sc-aion-pay, .select.is-black.sc-aion-pay   select.sc-aion-pay:active, .select.is-black.sc-aion-pay   select.sc-aion-pay:focus{-webkit-box-shadow:0 0 0 .125em rgba(10,10,10,.25);box-shadow:0 0 0 .125em rgba(10,10,10,.25)}.select.is-light.sc-aion-pay   select.sc-aion-pay, .select.is-light.sc-aion-pay:not(:hover)::after{border-color:#f5f5f5}.select.is-light.sc-aion-pay   select.is-hovered.sc-aion-pay, .select.is-light.sc-aion-pay   select.sc-aion-pay:hover{border-color:#e8e8e8}.select.is-light.sc-aion-pay   select.is-active.sc-aion-pay, .select.is-light.sc-aion-pay   select.is-focused.sc-aion-pay, .select.is-light.sc-aion-pay   select.sc-aion-pay:active, .select.is-light.sc-aion-pay   select.sc-aion-pay:focus{-webkit-box-shadow:0 0 0 .125em rgba(245,245,245,.25);box-shadow:0 0 0 .125em rgba(245,245,245,.25)}.select.is-dark.sc-aion-pay   select.sc-aion-pay, .select.is-dark.sc-aion-pay:not(:hover)::after{border-color:#363636}.select.is-dark.sc-aion-pay   select.is-hovered.sc-aion-pay, .select.is-dark.sc-aion-pay   select.sc-aion-pay:hover{border-color:#292929}.select.is-dark.sc-aion-pay   select.is-active.sc-aion-pay, .select.is-dark.sc-aion-pay   select.is-focused.sc-aion-pay, .select.is-dark.sc-aion-pay   select.sc-aion-pay:active, .select.is-dark.sc-aion-pay   select.sc-aion-pay:focus{-webkit-box-shadow:0 0 0 .125em rgba(54,54,54,.25);box-shadow:0 0 0 .125em rgba(54,54,54,.25)}.select.is-primary.sc-aion-pay   select.sc-aion-pay, .select.is-primary.sc-aion-pay:not(:hover)::after{border-color:#00d1b2}.select.is-primary.sc-aion-pay   select.is-hovered.sc-aion-pay, .select.is-primary.sc-aion-pay   select.sc-aion-pay:hover{border-color:#00b89c}.select.is-primary.sc-aion-pay   select.is-active.sc-aion-pay, .select.is-primary.sc-aion-pay   select.is-focused.sc-aion-pay, .select.is-primary.sc-aion-pay   select.sc-aion-pay:active, .select.is-primary.sc-aion-pay   select.sc-aion-pay:focus{-webkit-box-shadow:0 0 0 .125em rgba(0,209,178,.25);box-shadow:0 0 0 .125em rgba(0,209,178,.25)}.select.is-link.sc-aion-pay   select.sc-aion-pay, .select.is-link.sc-aion-pay:not(:hover)::after{border-color:#3273dc}.select.is-link.sc-aion-pay   select.is-hovered.sc-aion-pay, .select.is-link.sc-aion-pay   select.sc-aion-pay:hover{border-color:#2366d1}.select.is-link.sc-aion-pay   select.is-active.sc-aion-pay, .select.is-link.sc-aion-pay   select.is-focused.sc-aion-pay, .select.is-link.sc-aion-pay   select.sc-aion-pay:active, .select.is-link.sc-aion-pay   select.sc-aion-pay:focus{-webkit-box-shadow:0 0 0 .125em rgba(50,115,220,.25);box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.select.is-info.sc-aion-pay   select.sc-aion-pay, .select.is-info.sc-aion-pay:not(:hover)::after{border-color:#209cee}.select.is-info.sc-aion-pay   select.is-hovered.sc-aion-pay, .select.is-info.sc-aion-pay   select.sc-aion-pay:hover{border-color:#118fe4}.select.is-info.sc-aion-pay   select.is-active.sc-aion-pay, .select.is-info.sc-aion-pay   select.is-focused.sc-aion-pay, .select.is-info.sc-aion-pay   select.sc-aion-pay:active, .select.is-info.sc-aion-pay   select.sc-aion-pay:focus{-webkit-box-shadow:0 0 0 .125em rgba(32,156,238,.25);box-shadow:0 0 0 .125em rgba(32,156,238,.25)}.select.is-success.sc-aion-pay   select.sc-aion-pay, .select.is-success.sc-aion-pay:not(:hover)::after{border-color:#23d160}.select.is-success.sc-aion-pay   select.is-hovered.sc-aion-pay, .select.is-success.sc-aion-pay   select.sc-aion-pay:hover{border-color:#20bc56}.select.is-success.sc-aion-pay   select.is-active.sc-aion-pay, .select.is-success.sc-aion-pay   select.is-focused.sc-aion-pay, .select.is-success.sc-aion-pay   select.sc-aion-pay:active, .select.is-success.sc-aion-pay   select.sc-aion-pay:focus{-webkit-box-shadow:0 0 0 .125em rgba(35,209,96,.25);box-shadow:0 0 0 .125em rgba(35,209,96,.25)}.select.is-warning.sc-aion-pay   select.sc-aion-pay, .select.is-warning.sc-aion-pay:not(:hover)::after{border-color:#ffdd57}.select.is-warning.sc-aion-pay   select.is-hovered.sc-aion-pay, .select.is-warning.sc-aion-pay   select.sc-aion-pay:hover{border-color:#ffd83d}.select.is-warning.sc-aion-pay   select.is-active.sc-aion-pay, .select.is-warning.sc-aion-pay   select.is-focused.sc-aion-pay, .select.is-warning.sc-aion-pay   select.sc-aion-pay:active, .select.is-warning.sc-aion-pay   select.sc-aion-pay:focus{-webkit-box-shadow:0 0 0 .125em rgba(255,221,87,.25);box-shadow:0 0 0 .125em rgba(255,221,87,.25)}.select.is-danger.sc-aion-pay   select.sc-aion-pay, .select.is-danger.sc-aion-pay:not(:hover)::after{border-color:#ff3860}.select.is-danger.sc-aion-pay   select.is-hovered.sc-aion-pay, .select.is-danger.sc-aion-pay   select.sc-aion-pay:hover{border-color:#ff1f4b}.select.is-danger.sc-aion-pay   select.is-active.sc-aion-pay, .select.is-danger.sc-aion-pay   select.is-focused.sc-aion-pay, .select.is-danger.sc-aion-pay   select.sc-aion-pay:active, .select.is-danger.sc-aion-pay   select.sc-aion-pay:focus{-webkit-box-shadow:0 0 0 .125em rgba(255,56,96,.25);box-shadow:0 0 0 .125em rgba(255,56,96,.25)}.select.is-small.sc-aion-pay{border-radius:2px;font-size:.75rem}.select.is-medium.sc-aion-pay{font-size:1.25rem}.select.is-large.sc-aion-pay{font-size:1.5rem}.select.is-disabled.sc-aion-pay::after{border-color:#7a7a7a}.select.is-fullwidth.sc-aion-pay, .select.is-fullwidth.sc-aion-pay   select.sc-aion-pay{width:100%}.select.is-loading.sc-aion-pay::after{margin-top:0;position:absolute;right:.625em;top:.625em;-webkit-transform:none;transform:none}.select.is-loading.is-small.sc-aion-pay:after{font-size:.75rem}.select.is-loading.is-medium.sc-aion-pay:after{font-size:1.25rem}.select.is-loading.is-large.sc-aion-pay:after{font-size:1.5rem}.file.sc-aion-pay{-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;position:relative}.file.is-white.sc-aion-pay   .file-cta.sc-aion-pay{background-color:#fff;border-color:transparent;color:#0a0a0a}.file.is-white.is-hovered.sc-aion-pay   .file-cta.sc-aion-pay, .file.is-white.sc-aion-pay:hover   .file-cta.sc-aion-pay{background-color:#f9f9f9;border-color:transparent;color:#0a0a0a}.file.is-white.is-focused.sc-aion-pay   .file-cta.sc-aion-pay, .file.is-white.sc-aion-pay:focus   .file-cta.sc-aion-pay{border-color:transparent;-webkit-box-shadow:0 0 .5em rgba(255,255,255,.25);box-shadow:0 0 .5em rgba(255,255,255,.25);color:#0a0a0a}.file.is-white.is-active.sc-aion-pay   .file-cta.sc-aion-pay, .file.is-white.sc-aion-pay:active   .file-cta.sc-aion-pay{background-color:#f2f2f2;border-color:transparent;color:#0a0a0a}.file.is-black.sc-aion-pay   .file-cta.sc-aion-pay{background-color:#0a0a0a;border-color:transparent;color:#fff}.file.is-black.is-hovered.sc-aion-pay   .file-cta.sc-aion-pay, .file.is-black.sc-aion-pay:hover   .file-cta.sc-aion-pay{background-color:#040404;border-color:transparent;color:#fff}.file.is-black.is-focused.sc-aion-pay   .file-cta.sc-aion-pay, .file.is-black.sc-aion-pay:focus   .file-cta.sc-aion-pay{border-color:transparent;-webkit-box-shadow:0 0 .5em rgba(10,10,10,.25);box-shadow:0 0 .5em rgba(10,10,10,.25);color:#fff}.file.is-black.is-active.sc-aion-pay   .file-cta.sc-aion-pay, .file.is-black.sc-aion-pay:active   .file-cta.sc-aion-pay{background-color:#000;border-color:transparent;color:#fff}.file.is-light.sc-aion-pay   .file-cta.sc-aion-pay{background-color:#f5f5f5;border-color:transparent;color:#363636}.file.is-light.is-hovered.sc-aion-pay   .file-cta.sc-aion-pay, .file.is-light.sc-aion-pay:hover   .file-cta.sc-aion-pay{background-color:#eee;border-color:transparent;color:#363636}.file.is-light.is-focused.sc-aion-pay   .file-cta.sc-aion-pay, .file.is-light.sc-aion-pay:focus   .file-cta.sc-aion-pay{border-color:transparent;-webkit-box-shadow:0 0 .5em rgba(245,245,245,.25);box-shadow:0 0 .5em rgba(245,245,245,.25);color:#363636}.file.is-light.is-active.sc-aion-pay   .file-cta.sc-aion-pay, .file.is-light.sc-aion-pay:active   .file-cta.sc-aion-pay{background-color:#e8e8e8;border-color:transparent;color:#363636}.file.is-dark.sc-aion-pay   .file-cta.sc-aion-pay{background-color:#363636;border-color:transparent;color:#f5f5f5}.file.is-dark.is-hovered.sc-aion-pay   .file-cta.sc-aion-pay, .file.is-dark.sc-aion-pay:hover   .file-cta.sc-aion-pay{background-color:#2f2f2f;border-color:transparent;color:#f5f5f5}.file.is-dark.is-focused.sc-aion-pay   .file-cta.sc-aion-pay, .file.is-dark.sc-aion-pay:focus   .file-cta.sc-aion-pay{border-color:transparent;-webkit-box-shadow:0 0 .5em rgba(54,54,54,.25);box-shadow:0 0 .5em rgba(54,54,54,.25);color:#f5f5f5}.file.is-dark.is-active.sc-aion-pay   .file-cta.sc-aion-pay, .file.is-dark.sc-aion-pay:active   .file-cta.sc-aion-pay{background-color:#292929;border-color:transparent;color:#f5f5f5}.file.is-primary.sc-aion-pay   .file-cta.sc-aion-pay{background-color:#00d1b2;border-color:transparent;color:#fff}.file.is-primary.is-hovered.sc-aion-pay   .file-cta.sc-aion-pay, .file.is-primary.sc-aion-pay:hover   .file-cta.sc-aion-pay{background-color:#00c4a7;border-color:transparent;color:#fff}.file.is-primary.is-focused.sc-aion-pay   .file-cta.sc-aion-pay, .file.is-primary.sc-aion-pay:focus   .file-cta.sc-aion-pay{border-color:transparent;-webkit-box-shadow:0 0 .5em rgba(0,209,178,.25);box-shadow:0 0 .5em rgba(0,209,178,.25);color:#fff}.file.is-primary.is-active.sc-aion-pay   .file-cta.sc-aion-pay, .file.is-primary.sc-aion-pay:active   .file-cta.sc-aion-pay{background-color:#00b89c;border-color:transparent;color:#fff}.file.is-link.sc-aion-pay   .file-cta.sc-aion-pay{background-color:#3273dc;border-color:transparent;color:#fff}.file.is-link.is-hovered.sc-aion-pay   .file-cta.sc-aion-pay, .file.is-link.sc-aion-pay:hover   .file-cta.sc-aion-pay{background-color:#276cda;border-color:transparent;color:#fff}.file.is-link.is-focused.sc-aion-pay   .file-cta.sc-aion-pay, .file.is-link.sc-aion-pay:focus   .file-cta.sc-aion-pay{border-color:transparent;-webkit-box-shadow:0 0 .5em rgba(50,115,220,.25);box-shadow:0 0 .5em rgba(50,115,220,.25);color:#fff}.file.is-link.is-active.sc-aion-pay   .file-cta.sc-aion-pay, .file.is-link.sc-aion-pay:active   .file-cta.sc-aion-pay{background-color:#2366d1;border-color:transparent;color:#fff}.file.is-info.sc-aion-pay   .file-cta.sc-aion-pay{background-color:#209cee;border-color:transparent;color:#fff}.file.is-info.is-hovered.sc-aion-pay   .file-cta.sc-aion-pay, .file.is-info.sc-aion-pay:hover   .file-cta.sc-aion-pay{background-color:#1496ed;border-color:transparent;color:#fff}.file.is-info.is-focused.sc-aion-pay   .file-cta.sc-aion-pay, .file.is-info.sc-aion-pay:focus   .file-cta.sc-aion-pay{border-color:transparent;-webkit-box-shadow:0 0 .5em rgba(32,156,238,.25);box-shadow:0 0 .5em rgba(32,156,238,.25);color:#fff}.file.is-info.is-active.sc-aion-pay   .file-cta.sc-aion-pay, .file.is-info.sc-aion-pay:active   .file-cta.sc-aion-pay{background-color:#118fe4;border-color:transparent;color:#fff}.file.is-success.sc-aion-pay   .file-cta.sc-aion-pay{background-color:#23d160;border-color:transparent;color:#fff}.file.is-success.is-hovered.sc-aion-pay   .file-cta.sc-aion-pay, .file.is-success.sc-aion-pay:hover   .file-cta.sc-aion-pay{background-color:#22c65b;border-color:transparent;color:#fff}.file.is-success.is-focused.sc-aion-pay   .file-cta.sc-aion-pay, .file.is-success.sc-aion-pay:focus   .file-cta.sc-aion-pay{border-color:transparent;-webkit-box-shadow:0 0 .5em rgba(35,209,96,.25);box-shadow:0 0 .5em rgba(35,209,96,.25);color:#fff}.file.is-success.is-active.sc-aion-pay   .file-cta.sc-aion-pay, .file.is-success.sc-aion-pay:active   .file-cta.sc-aion-pay{background-color:#20bc56;border-color:transparent;color:#fff}.file.is-warning.sc-aion-pay   .file-cta.sc-aion-pay{background-color:#ffdd57;border-color:transparent;color:rgba(0,0,0,.7)}.file.is-warning.is-hovered.sc-aion-pay   .file-cta.sc-aion-pay, .file.is-warning.sc-aion-pay:hover   .file-cta.sc-aion-pay{background-color:#ffdb4a;border-color:transparent;color:rgba(0,0,0,.7)}.file.is-warning.is-focused.sc-aion-pay   .file-cta.sc-aion-pay, .file.is-warning.sc-aion-pay:focus   .file-cta.sc-aion-pay{border-color:transparent;-webkit-box-shadow:0 0 .5em rgba(255,221,87,.25);box-shadow:0 0 .5em rgba(255,221,87,.25);color:rgba(0,0,0,.7)}.file.is-warning.is-active.sc-aion-pay   .file-cta.sc-aion-pay, .file.is-warning.sc-aion-pay:active   .file-cta.sc-aion-pay{background-color:#ffd83d;border-color:transparent;color:rgba(0,0,0,.7)}.file.is-danger.sc-aion-pay   .file-cta.sc-aion-pay{background-color:#ff3860;border-color:transparent;color:#fff}.file.is-danger.is-hovered.sc-aion-pay   .file-cta.sc-aion-pay, .file.is-danger.sc-aion-pay:hover   .file-cta.sc-aion-pay{background-color:#ff2b56;border-color:transparent;color:#fff}.file.is-danger.is-focused.sc-aion-pay   .file-cta.sc-aion-pay, .file.is-danger.sc-aion-pay:focus   .file-cta.sc-aion-pay{border-color:transparent;-webkit-box-shadow:0 0 .5em rgba(255,56,96,.25);box-shadow:0 0 .5em rgba(255,56,96,.25);color:#fff}.file.is-danger.is-active.sc-aion-pay   .file-cta.sc-aion-pay, .file.is-danger.sc-aion-pay:active   .file-cta.sc-aion-pay{background-color:#ff1f4b;border-color:transparent;color:#fff}.file.is-small.sc-aion-pay{font-size:.75rem}.file.is-medium.sc-aion-pay{font-size:1.25rem}.file.is-medium.sc-aion-pay   .file-icon.sc-aion-pay   .fa.sc-aion-pay{font-size:21px}.file.is-large.sc-aion-pay{font-size:1.5rem}.file.is-large.sc-aion-pay   .file-icon.sc-aion-pay   .fa.sc-aion-pay{font-size:28px}.file.has-name.sc-aion-pay   .file-cta.sc-aion-pay{border-bottom-right-radius:0;border-top-right-radius:0}.file.has-name.sc-aion-pay   .file-name.sc-aion-pay{border-bottom-left-radius:0;border-top-left-radius:0}.file.has-name.is-empty.sc-aion-pay   .file-cta.sc-aion-pay{border-radius:4px}.file.has-name.is-empty.sc-aion-pay   .file-name.sc-aion-pay{display:none}.file.is-boxed.sc-aion-pay   .file-label.sc-aion-pay{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.file.is-boxed.sc-aion-pay   .file-cta.sc-aion-pay{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:auto;padding:1em 3em}.file.is-boxed.sc-aion-pay   .file-name.sc-aion-pay{border-width:0 1px 1px}.file.is-boxed.sc-aion-pay   .file-icon.sc-aion-pay{height:1.5em;width:1.5em}.file.is-boxed.sc-aion-pay   .file-icon.sc-aion-pay   .fa.sc-aion-pay{font-size:21px}.file.is-boxed.is-small.sc-aion-pay   .file-icon.sc-aion-pay   .fa.sc-aion-pay{font-size:14px}.file.is-boxed.is-medium.sc-aion-pay   .file-icon.sc-aion-pay   .fa.sc-aion-pay{font-size:28px}.file.is-boxed.is-large.sc-aion-pay   .file-icon.sc-aion-pay   .fa.sc-aion-pay{font-size:35px}.file.is-boxed.has-name.sc-aion-pay   .file-cta.sc-aion-pay{border-radius:4px 4px 0 0}.file.is-boxed.has-name.sc-aion-pay   .file-name.sc-aion-pay{border-radius:0 0 4px 4px;border-width:0 1px 1px}.file.is-centered.sc-aion-pay{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.file.is-fullwidth.sc-aion-pay   .file-label.sc-aion-pay{width:100%}.file.is-fullwidth.sc-aion-pay   .file-name.sc-aion-pay{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;max-width:none}.file.is-right.sc-aion-pay{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.file.is-right.sc-aion-pay   .file-cta.sc-aion-pay{border-radius:0 4px 4px 0}.file.is-right.sc-aion-pay   .file-name.sc-aion-pay{border-radius:4px 0 0 4px;border-width:1px 0 1px 1px;-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.file-label.sc-aion-pay{-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;display:-webkit-box;display:-ms-flexbox;display:flex;cursor:pointer;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;overflow:hidden;position:relative}.file-label.sc-aion-pay:hover   .file-cta.sc-aion-pay{background-color:#eee;color:#363636}.file-label.sc-aion-pay:hover   .file-name.sc-aion-pay{border-color:#d5d5d5}.file-label.sc-aion-pay:active   .file-cta.sc-aion-pay{background-color:#e8e8e8;color:#363636}.file-label.sc-aion-pay:active   .file-name.sc-aion-pay{border-color:#cfcfcf}.file-input.sc-aion-pay{height:100%;left:0;opacity:0;outline:0;position:absolute;top:0;width:100%}.file-cta.sc-aion-pay, .file-name.sc-aion-pay{border-color:#dbdbdb;border-radius:4px;font-size:1em;padding-left:1em;padding-right:1em;white-space:nowrap}.file-cta.sc-aion-pay{background-color:#f5f5f5;color:#4a4a4a}.file-name.sc-aion-pay{border-color:#dbdbdb;border-style:solid;border-width:1px 1px 1px 0;display:block;max-width:16em;overflow:hidden;text-align:left;text-overflow:ellipsis}.file-icon.sc-aion-pay{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;height:1em;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-right:.5em;width:1em}.file-icon.sc-aion-pay   .fa.sc-aion-pay{font-size:14px}.label.sc-aion-pay{color:#363636;display:block;font-size:1rem;font-weight:700}.label.sc-aion-pay:not(:last-child){margin-bottom:.5em}.label.is-small.sc-aion-pay{font-size:.75rem}.label.is-medium.sc-aion-pay{font-size:1.25rem}.label.is-large.sc-aion-pay{font-size:1.5rem}.help.sc-aion-pay{display:block;font-size:.75rem;margin-top:.25rem}.help.is-white.sc-aion-pay{color:#fff}.help.is-black.sc-aion-pay{color:#0a0a0a}.help.is-light.sc-aion-pay{color:#f5f5f5}.help.is-dark.sc-aion-pay{color:#363636}.help.is-primary.sc-aion-pay{color:#00d1b2}.help.is-link.sc-aion-pay{color:#3273dc}.help.is-info.sc-aion-pay{color:#209cee}.help.is-success.sc-aion-pay{color:#23d160}.help.is-warning.sc-aion-pay{color:#ffdd57}.help.is-danger.sc-aion-pay{color:#ff3860}.field.sc-aion-pay:not(:last-child){margin-bottom:.75rem}.field.has-addons.sc-aion-pay{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.field.has-addons.sc-aion-pay   .control.sc-aion-pay:not(:last-child){margin-right:-1px}.field.has-addons.sc-aion-pay   .control.sc-aion-pay:not(:first-child):not(:last-child)   .button.sc-aion-pay, .field.has-addons.sc-aion-pay   .control.sc-aion-pay:not(:first-child):not(:last-child)   .input.sc-aion-pay, .field.has-addons.sc-aion-pay   .control.sc-aion-pay:not(:first-child):not(:last-child)   .select.sc-aion-pay   select.sc-aion-pay{border-radius:0}.field.has-addons.sc-aion-pay   .control.sc-aion-pay:first-child   .button.sc-aion-pay, .field.has-addons.sc-aion-pay   .control.sc-aion-pay:first-child   .input.sc-aion-pay, .field.has-addons.sc-aion-pay   .control.sc-aion-pay:first-child   .select.sc-aion-pay   select.sc-aion-pay{border-bottom-right-radius:0;border-top-right-radius:0}.field.has-addons.sc-aion-pay   .control.sc-aion-pay:last-child   .button.sc-aion-pay, .field.has-addons.sc-aion-pay   .control.sc-aion-pay:last-child   .input.sc-aion-pay, .field.has-addons.sc-aion-pay   .control.sc-aion-pay:last-child   .select.sc-aion-pay   select.sc-aion-pay{border-bottom-left-radius:0;border-top-left-radius:0}.field.has-addons.sc-aion-pay   .control.sc-aion-pay   .button.sc-aion-pay:not([disabled]).is-hovered, .field.has-addons.sc-aion-pay   .control.sc-aion-pay   .button.sc-aion-pay:not([disabled]):hover, .field.has-addons.sc-aion-pay   .control.sc-aion-pay   .input.sc-aion-pay:not([disabled]).is-hovered, .field.has-addons.sc-aion-pay   .control.sc-aion-pay   .input.sc-aion-pay:not([disabled]):hover, .field.has-addons.sc-aion-pay   .control.sc-aion-pay   .select.sc-aion-pay   select.sc-aion-pay:not([disabled]).is-hovered, .field.has-addons.sc-aion-pay   .control.sc-aion-pay   .select.sc-aion-pay   select.sc-aion-pay:not([disabled]):hover{z-index:2}.field.has-addons.sc-aion-pay   .control.sc-aion-pay   .button.sc-aion-pay:not([disabled]).is-active, .field.has-addons.sc-aion-pay   .control.sc-aion-pay   .button.sc-aion-pay:not([disabled]).is-focused, .field.has-addons.sc-aion-pay   .control.sc-aion-pay   .button.sc-aion-pay:not([disabled]):active, .field.has-addons.sc-aion-pay   .control.sc-aion-pay   .button.sc-aion-pay:not([disabled]):focus, .field.has-addons.sc-aion-pay   .control.sc-aion-pay   .input.sc-aion-pay:not([disabled]).is-active, .field.has-addons.sc-aion-pay   .control.sc-aion-pay   .input.sc-aion-pay:not([disabled]).is-focused, .field.has-addons.sc-aion-pay   .control.sc-aion-pay   .input.sc-aion-pay:not([disabled]):active, .field.has-addons.sc-aion-pay   .control.sc-aion-pay   .input.sc-aion-pay:not([disabled]):focus, .field.has-addons.sc-aion-pay   .control.sc-aion-pay   .select.sc-aion-pay   select.sc-aion-pay:not([disabled]).is-active, .field.has-addons.sc-aion-pay   .control.sc-aion-pay   .select.sc-aion-pay   select.sc-aion-pay:not([disabled]).is-focused, .field.has-addons.sc-aion-pay   .control.sc-aion-pay   .select.sc-aion-pay   select.sc-aion-pay:not([disabled]):active, .field.has-addons.sc-aion-pay   .control.sc-aion-pay   .select.sc-aion-pay   select.sc-aion-pay:not([disabled]):focus{z-index:3}.field.has-addons.sc-aion-pay   .control.sc-aion-pay   .button.sc-aion-pay:not([disabled]).is-active:hover, .field.has-addons.sc-aion-pay   .control.sc-aion-pay   .button.sc-aion-pay:not([disabled]).is-focused:hover, .field.has-addons.sc-aion-pay   .control.sc-aion-pay   .button.sc-aion-pay:not([disabled]):active:hover, .field.has-addons.sc-aion-pay   .control.sc-aion-pay   .button.sc-aion-pay:not([disabled]):focus:hover, .field.has-addons.sc-aion-pay   .control.sc-aion-pay   .input.sc-aion-pay:not([disabled]).is-active:hover, .field.has-addons.sc-aion-pay   .control.sc-aion-pay   .input.sc-aion-pay:not([disabled]).is-focused:hover, .field.has-addons.sc-aion-pay   .control.sc-aion-pay   .input.sc-aion-pay:not([disabled]):active:hover, .field.has-addons.sc-aion-pay   .control.sc-aion-pay   .input.sc-aion-pay:not([disabled]):focus:hover, .field.has-addons.sc-aion-pay   .control.sc-aion-pay   .select.sc-aion-pay   select.sc-aion-pay:not([disabled]).is-active:hover, .field.has-addons.sc-aion-pay   .control.sc-aion-pay   .select.sc-aion-pay   select.sc-aion-pay:not([disabled]).is-focused:hover, .field.has-addons.sc-aion-pay   .control.sc-aion-pay   .select.sc-aion-pay   select.sc-aion-pay:not([disabled]):active:hover, .field.has-addons.sc-aion-pay   .control.sc-aion-pay   .select.sc-aion-pay   select.sc-aion-pay:not([disabled]):focus:hover{z-index:4}.field.has-addons.sc-aion-pay   .control.is-expanded.sc-aion-pay{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.field.has-addons.has-addons-centered.sc-aion-pay{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.field.has-addons.has-addons-right.sc-aion-pay{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.field.has-addons.has-addons-fullwidth.sc-aion-pay   .control.sc-aion-pay{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0}.field.is-grouped.sc-aion-pay{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.field.is-grouped.sc-aion-pay > .control.sc-aion-pay{-ms-flex-negative:0;flex-shrink:0}.field.is-grouped.sc-aion-pay > .control.sc-aion-pay:not(:last-child){margin-bottom:0;margin-right:.75rem}.field.is-grouped.sc-aion-pay > .control.is-expanded.sc-aion-pay{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:1;flex-shrink:1}.field.is-grouped.is-grouped-centered.sc-aion-pay{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.field.is-grouped.is-grouped-right.sc-aion-pay{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.field.is-grouped.is-grouped-multiline.sc-aion-pay{-ms-flex-wrap:wrap;flex-wrap:wrap}.field.is-grouped.is-grouped-multiline.sc-aion-pay > .control.sc-aion-pay:last-child, .field.is-grouped.is-grouped-multiline.sc-aion-pay > .control.sc-aion-pay:not(:last-child){margin-bottom:.75rem}.field.is-grouped.is-grouped-multiline.sc-aion-pay:last-child{margin-bottom:-.75rem}.field.is-grouped.is-grouped-multiline.sc-aion-pay:not(:last-child){margin-bottom:0}.field-label.sc-aion-pay   .label.sc-aion-pay{font-size:inherit}\@media screen and (max-width:768px){.field-label.sc-aion-pay{margin-bottom:.5rem}}.field-body.sc-aion-pay   .field.sc-aion-pay   .field.sc-aion-pay{margin-bottom:0}\@media screen and (min-width:769px),print{.field.is-horizontal.sc-aion-pay{display:-webkit-box;display:-ms-flexbox;display:flex}.field-label.sc-aion-pay{-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;margin-right:1.5rem;text-align:right}.field-label.is-small.sc-aion-pay{font-size:.75rem;padding-top:.375em}.field-label.is-normal.sc-aion-pay{padding-top:.375em}.field-label.is-medium.sc-aion-pay{font-size:1.25rem;padding-top:.375em}.field-label.is-large.sc-aion-pay{font-size:1.5rem;padding-top:.375em}.field-body.sc-aion-pay{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:5;-ms-flex-positive:5;flex-grow:5;-ms-flex-negative:1;flex-shrink:1}.field-body.sc-aion-pay   .field.sc-aion-pay{margin-bottom:0}.field-body.sc-aion-pay > .field.sc-aion-pay{-ms-flex-negative:1;flex-shrink:1}.field-body.sc-aion-pay > .field.sc-aion-pay:not(.is-narrow){-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.field-body.sc-aion-pay > .field.sc-aion-pay:not(:last-child){margin-right:.75rem}}.control.sc-aion-pay{clear:both;font-size:1rem;position:relative;text-align:left}.control.has-icon.sc-aion-pay   .icon.sc-aion-pay{color:#dbdbdb;height:2.25em;pointer-events:none;position:absolute;top:0;width:2.25em;z-index:4}.control.has-icon.sc-aion-pay   .input.sc-aion-pay:focus + .icon.sc-aion-pay{color:#7a7a7a}.control.has-icon.sc-aion-pay   .input.is-small.sc-aion-pay + .icon.sc-aion-pay{font-size:.75rem}.control.has-icon.sc-aion-pay   .input.is-medium.sc-aion-pay + .icon.sc-aion-pay{font-size:1.25rem}.control.has-icon.sc-aion-pay   .input.is-large.sc-aion-pay + .icon.sc-aion-pay{font-size:1.5rem}.control.has-icon.sc-aion-pay:not(.has-icon-right)   .icon.sc-aion-pay{left:0}.control.has-icon.sc-aion-pay:not(.has-icon-right)   .input.sc-aion-pay{padding-left:2.25em}.control.has-icon.has-icon-right.sc-aion-pay   .icon.sc-aion-pay{right:0}.control.has-icon.has-icon-right.sc-aion-pay   .input.sc-aion-pay{padding-right:2.25em}.control.has-icons-left.sc-aion-pay   .input.sc-aion-pay:focus ~ .icon.sc-aion-pay, .control.has-icons-left.sc-aion-pay   .select.sc-aion-pay:focus ~ .icon.sc-aion-pay, .control.has-icons-right.sc-aion-pay   .input.sc-aion-pay:focus ~ .icon.sc-aion-pay, .control.has-icons-right.sc-aion-pay   .select.sc-aion-pay:focus ~ .icon.sc-aion-pay{color:#7a7a7a}.control.has-icons-left.sc-aion-pay   .input.is-small.sc-aion-pay ~ .icon.sc-aion-pay, .control.has-icons-left.sc-aion-pay   .select.is-small.sc-aion-pay ~ .icon.sc-aion-pay, .control.has-icons-right.sc-aion-pay   .input.is-small.sc-aion-pay ~ .icon.sc-aion-pay, .control.has-icons-right.sc-aion-pay   .select.is-small.sc-aion-pay ~ .icon.sc-aion-pay{font-size:.75rem}.control.has-icons-left.sc-aion-pay   .input.is-medium.sc-aion-pay ~ .icon.sc-aion-pay, .control.has-icons-left.sc-aion-pay   .select.is-medium.sc-aion-pay ~ .icon.sc-aion-pay, .control.has-icons-right.sc-aion-pay   .input.is-medium.sc-aion-pay ~ .icon.sc-aion-pay, .control.has-icons-right.sc-aion-pay   .select.is-medium.sc-aion-pay ~ .icon.sc-aion-pay{font-size:1.25rem}.control.has-icons-left.sc-aion-pay   .input.is-large.sc-aion-pay ~ .icon.sc-aion-pay, .control.has-icons-left.sc-aion-pay   .select.is-large.sc-aion-pay ~ .icon.sc-aion-pay, .control.has-icons-right.sc-aion-pay   .input.is-large.sc-aion-pay ~ .icon.sc-aion-pay, .control.has-icons-right.sc-aion-pay   .select.is-large.sc-aion-pay ~ .icon.sc-aion-pay{font-size:1.5rem}.control.has-icons-left.sc-aion-pay   .icon.sc-aion-pay, .control.has-icons-right.sc-aion-pay   .icon.sc-aion-pay{color:#dbdbdb;height:2.25em;pointer-events:none;position:absolute;top:0;width:2.25em;z-index:4}.control.has-icons-left.sc-aion-pay   .input.sc-aion-pay, .control.has-icons-left.sc-aion-pay   .select.sc-aion-pay   select.sc-aion-pay{padding-left:2.25em}.control.has-icons-left.sc-aion-pay   .icon.is-left.sc-aion-pay{left:0}.control.has-icons-right.sc-aion-pay   .input.sc-aion-pay, .control.has-icons-right.sc-aion-pay   .select.sc-aion-pay   select.sc-aion-pay{padding-right:2.25em}.control.has-icons-right.sc-aion-pay   .icon.is-right.sc-aion-pay{right:0}.control.is-loading.sc-aion-pay::after{position:absolute!important;right:.625em;top:.625em;z-index:4}.control.is-loading.is-small.sc-aion-pay:after{font-size:.75rem}.control.is-loading.is-medium.sc-aion-pay:after{font-size:1.25rem}.control.is-loading.is-large.sc-aion-pay:after{font-size:1.5rem}.icon.sc-aion-pay{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;height:1.5rem;width:1.5rem}.icon.is-small.sc-aion-pay{height:1rem;width:1rem}.icon.is-medium.sc-aion-pay{height:2rem;width:2rem}.icon.is-large.sc-aion-pay{height:3rem;width:3rem}.image.sc-aion-pay{display:block;position:relative}.image.sc-aion-pay   img.sc-aion-pay{display:block;height:auto;width:100%}.image.sc-aion-pay   img.is-rounded.sc-aion-pay{border-radius:290486px}.image.is-16by9.sc-aion-pay   img.sc-aion-pay, .image.is-1by1.sc-aion-pay   img.sc-aion-pay, .image.is-1by2.sc-aion-pay   img.sc-aion-pay, .image.is-1by3.sc-aion-pay   img.sc-aion-pay, .image.is-2by1.sc-aion-pay   img.sc-aion-pay, .image.is-2by3.sc-aion-pay   img.sc-aion-pay, .image.is-3by1.sc-aion-pay   img.sc-aion-pay, .image.is-3by2.sc-aion-pay   img.sc-aion-pay, .image.is-3by4.sc-aion-pay   img.sc-aion-pay, .image.is-3by5.sc-aion-pay   img.sc-aion-pay, .image.is-4by3.sc-aion-pay   img.sc-aion-pay, .image.is-4by5.sc-aion-pay   img.sc-aion-pay, .image.is-5by3.sc-aion-pay   img.sc-aion-pay, .image.is-5by4.sc-aion-pay   img.sc-aion-pay, .image.is-9by16.sc-aion-pay   img.sc-aion-pay, .image.is-square.sc-aion-pay   img.sc-aion-pay{height:100%;width:100%}.image.is-1by1.sc-aion-pay, .image.is-square.sc-aion-pay{padding-top:100%}.image.is-5by4.sc-aion-pay{padding-top:80%}.image.is-4by3.sc-aion-pay{padding-top:75%}.image.is-3by2.sc-aion-pay{padding-top:66.6666%}.image.is-5by3.sc-aion-pay{padding-top:60%}.image.is-16by9.sc-aion-pay{padding-top:56.25%}.image.is-2by1.sc-aion-pay{padding-top:50%}.image.is-3by1.sc-aion-pay{padding-top:33.3333%}.image.is-4by5.sc-aion-pay{padding-top:125%}.image.is-3by4.sc-aion-pay{padding-top:133.3333%}.image.is-2by3.sc-aion-pay{padding-top:150%}.image.is-3by5.sc-aion-pay{padding-top:166.6666%}.image.is-9by16.sc-aion-pay{padding-top:177.7777%}.image.is-1by2.sc-aion-pay{padding-top:200%}.image.is-1by3.sc-aion-pay{padding-top:300%}.image.is-16x16.sc-aion-pay{height:16px;width:16px}.image.is-24x24.sc-aion-pay{height:24px;width:24px}.image.is-32x32.sc-aion-pay{height:32px;width:32px}.image.is-48x48.sc-aion-pay{height:48px;width:48px}.image.is-64x64.sc-aion-pay{height:64px;width:64px}.image.is-96x96.sc-aion-pay{height:96px;width:96px}.image.is-128x128.sc-aion-pay{height:128px;width:128px}.notification.sc-aion-pay{background-color:#f5f5f5;border-radius:4px;padding:1.25rem 2.5rem 1.25rem 1.5rem;position:relative}.notification.sc-aion-pay   a.sc-aion-pay:not(.button):not(.dropdown-item){color:currentColor;text-decoration:underline}.notification.sc-aion-pay   strong.sc-aion-pay{color:currentColor}.notification.sc-aion-pay   code.sc-aion-pay, .notification.sc-aion-pay   pre.sc-aion-pay{background:#fff}.notification.sc-aion-pay   pre.sc-aion-pay   code.sc-aion-pay{background:0 0}.notification.sc-aion-pay > .delete.sc-aion-pay{position:absolute;right:.5rem;top:.5rem}.notification.sc-aion-pay   .content.sc-aion-pay, .notification.sc-aion-pay   .subtitle.sc-aion-pay, .notification.sc-aion-pay   .title.sc-aion-pay{color:currentColor}.notification.is-white.sc-aion-pay{background-color:#fff;color:#0a0a0a}.notification.is-black.sc-aion-pay{background-color:#0a0a0a;color:#fff}.notification.is-light.sc-aion-pay{background-color:#f5f5f5;color:#363636}.notification.is-dark.sc-aion-pay{background-color:#363636;color:#f5f5f5}.notification.is-primary.sc-aion-pay{background-color:#00d1b2;color:#fff}.notification.is-link.sc-aion-pay{background-color:#3273dc;color:#fff}.notification.is-info.sc-aion-pay{background-color:#209cee;color:#fff}.notification.is-success.sc-aion-pay{background-color:#23d160;color:#fff}.notification.is-warning.sc-aion-pay{background-color:#ffdd57;color:rgba(0,0,0,.7)}.notification.is-danger.sc-aion-pay{background-color:#ff3860;color:#fff}.progress.sc-aion-pay{-moz-appearance:none;-webkit-appearance:none;border:none;border-radius:290486px;display:block;height:1rem;overflow:hidden;padding:0;width:100%}.progress.sc-aion-pay::-webkit-progress-bar{background-color:#dbdbdb}.progress.sc-aion-pay::-webkit-progress-value{background-color:#4a4a4a}.progress.sc-aion-pay::-moz-progress-bar{background-color:#4a4a4a}.progress.sc-aion-pay::-ms-fill{background-color:#4a4a4a;border:none}.progress.is-white.sc-aion-pay::-webkit-progress-value{background-color:#fff}.progress.is-white.sc-aion-pay::-moz-progress-bar{background-color:#fff}.progress.is-white.sc-aion-pay::-ms-fill{background-color:#fff}.progress.is-black.sc-aion-pay::-webkit-progress-value{background-color:#0a0a0a}.progress.is-black.sc-aion-pay::-moz-progress-bar{background-color:#0a0a0a}.progress.is-black.sc-aion-pay::-ms-fill{background-color:#0a0a0a}.progress.is-light.sc-aion-pay::-webkit-progress-value{background-color:#f5f5f5}.progress.is-light.sc-aion-pay::-moz-progress-bar{background-color:#f5f5f5}.progress.is-light.sc-aion-pay::-ms-fill{background-color:#f5f5f5}.progress.is-dark.sc-aion-pay::-webkit-progress-value{background-color:#363636}.progress.is-dark.sc-aion-pay::-moz-progress-bar{background-color:#363636}.progress.is-dark.sc-aion-pay::-ms-fill{background-color:#363636}.progress.is-primary.sc-aion-pay::-webkit-progress-value{background-color:#00d1b2}.progress.is-primary.sc-aion-pay::-moz-progress-bar{background-color:#00d1b2}.progress.is-primary.sc-aion-pay::-ms-fill{background-color:#00d1b2}.progress.is-link.sc-aion-pay::-webkit-progress-value{background-color:#3273dc}.progress.is-link.sc-aion-pay::-moz-progress-bar{background-color:#3273dc}.progress.is-link.sc-aion-pay::-ms-fill{background-color:#3273dc}.progress.is-info.sc-aion-pay::-webkit-progress-value{background-color:#209cee}.progress.is-info.sc-aion-pay::-moz-progress-bar{background-color:#209cee}.progress.is-info.sc-aion-pay::-ms-fill{background-color:#209cee}.progress.is-success.sc-aion-pay::-webkit-progress-value{background-color:#23d160}.progress.is-success.sc-aion-pay::-moz-progress-bar{background-color:#23d160}.progress.is-success.sc-aion-pay::-ms-fill{background-color:#23d160}.progress.is-warning.sc-aion-pay::-webkit-progress-value{background-color:#ffdd57}.progress.is-warning.sc-aion-pay::-moz-progress-bar{background-color:#ffdd57}.progress.is-warning.sc-aion-pay::-ms-fill{background-color:#ffdd57}.progress.is-danger.sc-aion-pay::-webkit-progress-value{background-color:#ff3860}.progress.is-danger.sc-aion-pay::-moz-progress-bar{background-color:#ff3860}.progress.is-danger.sc-aion-pay::-ms-fill{background-color:#ff3860}.progress.is-small.sc-aion-pay{height:.75rem}.progress.is-medium.sc-aion-pay{height:1.25rem}.progress.is-large.sc-aion-pay{height:1.5rem}.table.sc-aion-pay{background-color:#fff;color:#363636}.table.sc-aion-pay   td.sc-aion-pay, .table.sc-aion-pay   th.sc-aion-pay{border:1px solid #dbdbdb;border-width:0 0 1px;padding:.5em .75em;vertical-align:top}.table.sc-aion-pay   td.is-white.sc-aion-pay, .table.sc-aion-pay   th.is-white.sc-aion-pay{background-color:#fff;border-color:#fff;color:#0a0a0a}.table.sc-aion-pay   td.is-black.sc-aion-pay, .table.sc-aion-pay   th.is-black.sc-aion-pay{background-color:#0a0a0a;border-color:#0a0a0a;color:#fff}.table.sc-aion-pay   td.is-light.sc-aion-pay, .table.sc-aion-pay   th.is-light.sc-aion-pay{background-color:#f5f5f5;border-color:#f5f5f5;color:#363636}.table.sc-aion-pay   td.is-dark.sc-aion-pay, .table.sc-aion-pay   th.is-dark.sc-aion-pay{background-color:#363636;border-color:#363636;color:#f5f5f5}.table.sc-aion-pay   td.is-primary.sc-aion-pay, .table.sc-aion-pay   th.is-primary.sc-aion-pay{background-color:#00d1b2;border-color:#00d1b2;color:#fff}.table.sc-aion-pay   td.is-link.sc-aion-pay, .table.sc-aion-pay   th.is-link.sc-aion-pay{background-color:#3273dc;border-color:#3273dc;color:#fff}.table.sc-aion-pay   td.is-info.sc-aion-pay, .table.sc-aion-pay   th.is-info.sc-aion-pay{background-color:#209cee;border-color:#209cee;color:#fff}.table.sc-aion-pay   td.is-success.sc-aion-pay, .table.sc-aion-pay   th.is-success.sc-aion-pay{background-color:#23d160;border-color:#23d160;color:#fff}.table.sc-aion-pay   td.is-warning.sc-aion-pay, .table.sc-aion-pay   th.is-warning.sc-aion-pay{background-color:#ffdd57;border-color:#ffdd57;color:rgba(0,0,0,.7)}.table.sc-aion-pay   td.is-danger.sc-aion-pay, .table.sc-aion-pay   th.is-danger.sc-aion-pay{background-color:#ff3860;border-color:#ff3860;color:#fff}.table.sc-aion-pay   td.is-narrow.sc-aion-pay, .table.sc-aion-pay   th.is-narrow.sc-aion-pay{white-space:nowrap;width:1%}.table.sc-aion-pay   td.is-selected.sc-aion-pay, .table.sc-aion-pay   th.is-selected.sc-aion-pay{background-color:#00d1b2;color:#fff}.table.sc-aion-pay   td.is-selected.sc-aion-pay   a.sc-aion-pay, .table.sc-aion-pay   td.is-selected.sc-aion-pay   strong.sc-aion-pay, .table.sc-aion-pay   th.is-selected.sc-aion-pay   a.sc-aion-pay, .table.sc-aion-pay   th.is-selected.sc-aion-pay   strong.sc-aion-pay{color:currentColor}.table.sc-aion-pay   th.sc-aion-pay{color:#363636;text-align:left}.table.sc-aion-pay   tr.is-selected.sc-aion-pay{background-color:#00d1b2;color:#fff}.table.sc-aion-pay   tr.is-selected.sc-aion-pay   a.sc-aion-pay, .table.sc-aion-pay   tr.is-selected.sc-aion-pay   strong.sc-aion-pay{color:currentColor}.table.sc-aion-pay   tr.is-selected.sc-aion-pay   td.sc-aion-pay, .table.sc-aion-pay   tr.is-selected.sc-aion-pay   th.sc-aion-pay{border-color:#fff;color:currentColor}.table.sc-aion-pay   thead.sc-aion-pay   td.sc-aion-pay, .table.sc-aion-pay   thead.sc-aion-pay   th.sc-aion-pay{border-width:0 0 2px;color:#363636}.table.sc-aion-pay   tfoot.sc-aion-pay   td.sc-aion-pay, .table.sc-aion-pay   tfoot.sc-aion-pay   th.sc-aion-pay{border-width:2px 0 0;color:#363636}.table.sc-aion-pay   tbody.sc-aion-pay   tr.sc-aion-pay:last-child   td.sc-aion-pay, .table.sc-aion-pay   tbody.sc-aion-pay   tr.sc-aion-pay:last-child   th.sc-aion-pay{border-bottom-width:0}.table.is-bordered.sc-aion-pay   td.sc-aion-pay, .table.is-bordered.sc-aion-pay   th.sc-aion-pay{border-width:1px}.table.is-bordered.sc-aion-pay   tr.sc-aion-pay:last-child   td.sc-aion-pay, .table.is-bordered.sc-aion-pay   tr.sc-aion-pay:last-child   th.sc-aion-pay{border-bottom-width:1px}.table.is-fullwidth.sc-aion-pay{width:100%}.table.is-hoverable.sc-aion-pay   tbody.sc-aion-pay   tr.sc-aion-pay:not(.is-selected):hover, .table.is-hoverable.is-striped.sc-aion-pay   tbody.sc-aion-pay   tr.sc-aion-pay:not(.is-selected):hover{background-color:#fafafa}.table.is-hoverable.is-striped.sc-aion-pay   tbody.sc-aion-pay   tr.sc-aion-pay:not(.is-selected):hover:nth-child(even){background-color:#f5f5f5}.table.is-narrow.sc-aion-pay   td.sc-aion-pay, .table.is-narrow.sc-aion-pay   th.sc-aion-pay{padding:.25em .5em}.table.is-striped.sc-aion-pay   tbody.sc-aion-pay   tr.sc-aion-pay:not(.is-selected):nth-child(even){background-color:#fafafa}.table-container.sc-aion-pay{-webkit-overflow-scrolling:touch;overflow:auto;overflow-y:hidden;max-width:100%}.tags.sc-aion-pay{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.tags.sc-aion-pay   .tag.sc-aion-pay{margin-bottom:.5rem}.tags.sc-aion-pay   .tag.sc-aion-pay:not(:last-child){margin-right:.5rem}.tags.sc-aion-pay:last-child{margin-bottom:-.5rem}.tags.sc-aion-pay:not(:last-child){margin-bottom:1rem}.tags.has-addons.sc-aion-pay   .tag.sc-aion-pay{margin-right:0}.tags.has-addons.sc-aion-pay   .tag.sc-aion-pay:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.tags.has-addons.sc-aion-pay   .tag.sc-aion-pay:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.tags.is-centered.sc-aion-pay{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.tags.is-centered.sc-aion-pay   .tag.sc-aion-pay{margin-right:.25rem;margin-left:.25rem}.tags.is-right.sc-aion-pay{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.tags.is-right.sc-aion-pay   .tag.sc-aion-pay:not(:first-child){margin-left:.5rem}.tags.is-right.sc-aion-pay   .tag.sc-aion-pay:not(:last-child){margin-right:0}.tag.sc-aion-pay:not(body){-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:#f5f5f5;border-radius:4px;color:#4a4a4a;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;font-size:.75rem;height:2em;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;line-height:1.5;padding-left:.75em;padding-right:.75em;white-space:nowrap}.tag.sc-aion-pay:not(body)   .delete.sc-aion-pay{margin-left:.25rem;margin-right:-.375rem}.tag.sc-aion-pay:not(body).is-white{background-color:#fff;color:#0a0a0a}.tag.sc-aion-pay:not(body).is-black{background-color:#0a0a0a;color:#fff}.tag.sc-aion-pay:not(body).is-light{background-color:#f5f5f5;color:#363636}.tag.sc-aion-pay:not(body).is-dark{background-color:#363636;color:#f5f5f5}.tag.sc-aion-pay:not(body).is-primary{background-color:#00d1b2;color:#fff}.tag.sc-aion-pay:not(body).is-link{background-color:#3273dc;color:#fff}.tag.sc-aion-pay:not(body).is-info{background-color:#209cee;color:#fff}.tag.sc-aion-pay:not(body).is-success{background-color:#23d160;color:#fff}.tag.sc-aion-pay:not(body).is-warning{background-color:#ffdd57;color:rgba(0,0,0,.7)}.tag.sc-aion-pay:not(body).is-danger{background-color:#ff3860;color:#fff}.tag.sc-aion-pay:not(body).is-medium{font-size:1rem}.tag.sc-aion-pay:not(body).is-large{font-size:1.25rem}.tag.sc-aion-pay:not(body)   .icon.sc-aion-pay:first-child:not(:last-child){margin-left:-.375em;margin-right:.1875em}.tag.sc-aion-pay:not(body)   .icon.sc-aion-pay:last-child:not(:first-child){margin-left:.1875em;margin-right:-.375em}.tag.sc-aion-pay:not(body)   .icon.sc-aion-pay:first-child:last-child{margin-left:-.375em;margin-right:-.375em}.tag.sc-aion-pay:not(body).is-delete{margin-left:1px;padding:0;position:relative;width:2em}.tag.sc-aion-pay:not(body).is-delete::after, .tag.sc-aion-pay:not(body).is-delete::before{background-color:currentColor;content:\"\";display:block;left:50%;position:absolute;top:50%;-webkit-transform:translateX(-50%) translateY(-50%) rotate(45deg);transform:translateX(-50%) translateY(-50%) rotate(45deg);-webkit-transform-origin:center center;transform-origin:center center}.tag.sc-aion-pay:not(body).is-delete::before{height:1px;width:50%}.tag.sc-aion-pay:not(body).is-delete::after{height:50%;width:1px}.tag.sc-aion-pay:not(body).is-delete:focus, .tag.sc-aion-pay:not(body).is-delete:hover{background-color:#e8e8e8}.tag.sc-aion-pay:not(body).is-delete:active{background-color:#dbdbdb}.tag.sc-aion-pay:not(body).is-rounded{border-radius:290486px}a.tag.sc-aion-pay:hover{text-decoration:underline}.subtitle.sc-aion-pay, .title.sc-aion-pay{word-break:break-word}.subtitle.sc-aion-pay   em.sc-aion-pay, .subtitle.sc-aion-pay   span.sc-aion-pay, .title.sc-aion-pay   em.sc-aion-pay, .title.sc-aion-pay   span.sc-aion-pay{font-weight:inherit}.subtitle.sc-aion-pay   sub.sc-aion-pay, .subtitle.sc-aion-pay   sup.sc-aion-pay, .title.sc-aion-pay   sub.sc-aion-pay, .title.sc-aion-pay   sup.sc-aion-pay{font-size:.75em}.subtitle.sc-aion-pay   .tag.sc-aion-pay, .title.sc-aion-pay   .tag.sc-aion-pay{vertical-align:middle}.title.sc-aion-pay{color:#363636;font-size:2rem;font-weight:600;line-height:1.125}.title.sc-aion-pay   strong.sc-aion-pay{color:inherit;font-weight:inherit}.title.sc-aion-pay + .highlight.sc-aion-pay{margin-top:-.75rem}.title.sc-aion-pay:not(.is-spaced) + .subtitle.sc-aion-pay{margin-top:-1.25rem}.title.is-1.sc-aion-pay{font-size:3rem}.title.is-2.sc-aion-pay{font-size:2.5rem}.title.is-3.sc-aion-pay{font-size:2rem}.title.is-4.sc-aion-pay{font-size:1.5rem}.title.is-5.sc-aion-pay{font-size:1.25rem}.title.is-6.sc-aion-pay{font-size:1rem}.title.is-7.sc-aion-pay{font-size:.75rem}.subtitle.sc-aion-pay{color:#4a4a4a;font-size:1.25rem;font-weight:400;line-height:1.25}.subtitle.sc-aion-pay   strong.sc-aion-pay{color:#363636;font-weight:600}.subtitle.sc-aion-pay:not(.is-spaced) + .title.sc-aion-pay{margin-top:-1.25rem}.subtitle.is-1.sc-aion-pay{font-size:3rem}.subtitle.is-2.sc-aion-pay{font-size:2.5rem}.subtitle.is-3.sc-aion-pay{font-size:2rem}.subtitle.is-4.sc-aion-pay{font-size:1.5rem}.subtitle.is-5.sc-aion-pay{font-size:1.25rem}.subtitle.is-6.sc-aion-pay{font-size:1rem}.subtitle.is-7.sc-aion-pay{font-size:.75rem}.heading.sc-aion-pay{display:block;font-size:11px;letter-spacing:1px;margin-bottom:5px;text-transform:uppercase}.highlight.sc-aion-pay{font-weight:400;max-width:100%;overflow:hidden;padding:0}.highlight.sc-aion-pay   pre.sc-aion-pay{overflow:auto;max-width:100%}.number.sc-aion-pay{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:#f5f5f5;border-radius:290486px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;font-size:1.25rem;height:2em;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-right:1.5rem;min-width:2.5em;padding:.25rem .5rem;text-align:center;vertical-align:top}.breadcrumb.sc-aion-pay{font-size:1rem;white-space:nowrap}.breadcrumb.sc-aion-pay   a.sc-aion-pay{-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#3273dc;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding:0 .75em}.breadcrumb.sc-aion-pay   a.sc-aion-pay:hover{color:#363636}.breadcrumb.sc-aion-pay   li.sc-aion-pay{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}.breadcrumb.sc-aion-pay   li.sc-aion-pay:first-child   a.sc-aion-pay{padding-left:0}.breadcrumb.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay{color:#363636;cursor:default;pointer-events:none}.breadcrumb.sc-aion-pay   li.sc-aion-pay + li.sc-aion-pay::before{color:#b5b5b5;content:\"\\0002f\"}.breadcrumb.sc-aion-pay   ol.sc-aion-pay, .breadcrumb.sc-aion-pay   ul.sc-aion-pay{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.breadcrumb.sc-aion-pay   .icon.sc-aion-pay:first-child{margin-right:.5em}.breadcrumb.sc-aion-pay   .icon.sc-aion-pay:last-child{margin-left:.5em}.breadcrumb.is-centered.sc-aion-pay   ol.sc-aion-pay, .breadcrumb.is-centered.sc-aion-pay   ul.sc-aion-pay{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.breadcrumb.is-right.sc-aion-pay   ol.sc-aion-pay, .breadcrumb.is-right.sc-aion-pay   ul.sc-aion-pay{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.breadcrumb.is-small.sc-aion-pay{font-size:.75rem}.breadcrumb.is-medium.sc-aion-pay{font-size:1.25rem}.breadcrumb.is-large.sc-aion-pay{font-size:1.5rem}.breadcrumb.has-arrow-separator.sc-aion-pay   li.sc-aion-pay + li.sc-aion-pay::before{content:\"\\02192\"}.breadcrumb.has-bullet-separator.sc-aion-pay   li.sc-aion-pay + li.sc-aion-pay::before{content:\"\\02022\"}.breadcrumb.has-dot-separator.sc-aion-pay   li.sc-aion-pay + li.sc-aion-pay::before{content:\"\\000b7\"}.breadcrumb.has-succeeds-separator.sc-aion-pay   li.sc-aion-pay + li.sc-aion-pay::before{content:\"\\0227B\"}.card.sc-aion-pay{background-color:#fff;-webkit-box-shadow:0 2px 3px rgba(10,10,10,.1),0 0 0 1px rgba(10,10,10,.1);box-shadow:0 2px 3px rgba(10,10,10,.1),0 0 0 1px rgba(10,10,10,.1);color:#4a4a4a;max-width:100%;position:relative}.card-header.sc-aion-pay{background-color:transparent;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;-webkit-box-shadow:0 1px 2px rgba(10,10,10,.1);box-shadow:0 1px 2px rgba(10,10,10,.1);display:-webkit-box;display:-ms-flexbox;display:flex}.card-header-title.sc-aion-pay{-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#363636;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;font-weight:700;padding:.75rem}.card-header-title.is-centered.sc-aion-pay{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.card-header-icon.sc-aion-pay{-webkit-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding:.75rem}.card-image.sc-aion-pay{display:block;position:relative}.card-content.sc-aion-pay{background-color:transparent;padding:1.5rem}.card-footer.sc-aion-pay{background-color:transparent;border-top:1px solid #dbdbdb;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;display:-webkit-box;display:-ms-flexbox;display:flex}.card-footer-item.sc-aion-pay{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding:.75rem}.card-footer-item.sc-aion-pay:not(:last-child){border-right:1px solid #dbdbdb}.card.sc-aion-pay   .media.sc-aion-pay:not(:last-child){margin-bottom:.75rem}.dropdown.sc-aion-pay{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;position:relative;vertical-align:top}.dropdown.is-active.sc-aion-pay   .dropdown-menu.sc-aion-pay, .dropdown.is-hoverable.sc-aion-pay:hover   .dropdown-menu.sc-aion-pay{display:block}.dropdown.is-right.sc-aion-pay   .dropdown-menu.sc-aion-pay{left:auto;right:0}.dropdown.is-up.sc-aion-pay   .dropdown-menu.sc-aion-pay{bottom:100%;padding-bottom:4px;padding-top:initial;top:auto}.dropdown-menu.sc-aion-pay{display:none;left:0;min-width:12rem;padding-top:4px;position:absolute;top:100%;z-index:20}.dropdown-content.sc-aion-pay{background-color:#fff;border-radius:4px;-webkit-box-shadow:0 2px 3px rgba(10,10,10,.1),0 0 0 1px rgba(10,10,10,.1);box-shadow:0 2px 3px rgba(10,10,10,.1),0 0 0 1px rgba(10,10,10,.1);padding-bottom:.5rem;padding-top:.5rem}.dropdown-item.sc-aion-pay{color:#4a4a4a;display:block;font-size:.875rem;line-height:1.5;padding:.375rem 1rem;position:relative}a.dropdown-item.sc-aion-pay, button.dropdown-item.sc-aion-pay{padding-right:3rem;text-align:left;white-space:nowrap;width:100%}a.dropdown-item.sc-aion-pay:hover, button.dropdown-item.sc-aion-pay:hover{background-color:#f5f5f5;color:#0a0a0a}a.dropdown-item.is-active.sc-aion-pay, button.dropdown-item.is-active.sc-aion-pay{background-color:#3273dc;color:#fff}.dropdown-divider.sc-aion-pay{background-color:#dbdbdb;border:none;display:block;height:1px;margin:.5rem 0}.level.sc-aion-pay{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.level.sc-aion-pay   code.sc-aion-pay{border-radius:4px}.level.sc-aion-pay   img.sc-aion-pay{display:inline-block;vertical-align:top}.level.is-mobile.sc-aion-pay, .level.is-mobile.sc-aion-pay   .level-left.sc-aion-pay, .level.is-mobile.sc-aion-pay   .level-right.sc-aion-pay{display:-webkit-box;display:-ms-flexbox;display:flex}.level.is-mobile.sc-aion-pay   .level-left.sc-aion-pay + .level-right.sc-aion-pay{margin-top:0}.level.is-mobile.sc-aion-pay   .level-item.sc-aion-pay:not(:last-child){margin-bottom:0;margin-right:.75rem}.level.is-mobile.sc-aion-pay   .level-item.sc-aion-pay:not(.is-narrow){-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}\@media screen and (min-width:769px),print{.level.sc-aion-pay{display:-webkit-box;display:-ms-flexbox;display:flex}.level.sc-aion-pay > .level-item.sc-aion-pay:not(.is-narrow){-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.level-left.sc-aion-pay   .level-item.sc-aion-pay:not(:last-child), .level-right.sc-aion-pay   .level-item.sc-aion-pay:not(:last-child){margin-right:.75rem}}.level-item.sc-aion-pay{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-preferred-size:auto;flex-basis:auto;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.level-item.sc-aion-pay   .subtitle.sc-aion-pay, .level-item.sc-aion-pay   .title.sc-aion-pay{margin-bottom:0}.level-left.sc-aion-pay, .level-right.sc-aion-pay{-ms-flex-preferred-size:auto;flex-basis:auto;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0}.level-left.sc-aion-pay   .level-item.is-flexible.sc-aion-pay, .level-right.sc-aion-pay   .level-item.is-flexible.sc-aion-pay{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.level-left.sc-aion-pay{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}\@media screen and (max-width:768px){.level-item.sc-aion-pay:not(:last-child){margin-bottom:.75rem}.level-left.sc-aion-pay + .level-right.sc-aion-pay{margin-top:1.5rem}.media-content.sc-aion-pay{overflow-x:auto}}.level-right.sc-aion-pay{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}\@media screen and (min-width:769px),print{.level-left.sc-aion-pay, .level-right.sc-aion-pay{display:-webkit-box;display:-ms-flexbox;display:flex}}.list.sc-aion-pay{background-color:#fff;border-radius:4px;-webkit-box-shadow:0 2px 3px rgba(10,10,10,.1),0 0 0 1px rgba(10,10,10,.1);box-shadow:0 2px 3px rgba(10,10,10,.1),0 0 0 1px rgba(10,10,10,.1)}.list-item.sc-aion-pay{display:block;padding:.5em 1em}.list-item.sc-aion-pay:not(a){color:#4a4a4a}.list-item.sc-aion-pay:first-child, .list-item.sc-aion-pay:last-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-item.sc-aion-pay:not(:last-child){border-bottom:1px solid #dbdbdb}.list-item.is-active.sc-aion-pay{background-color:#3273dc;color:#fff}a.list-item.sc-aion-pay{background-color:#f5f5f5;cursor:pointer}.media.sc-aion-pay{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;display:-webkit-box;display:-ms-flexbox;display:flex;text-align:left}.media.sc-aion-pay   .content.sc-aion-pay:not(:last-child){margin-bottom:.75rem}.media.sc-aion-pay   .media.sc-aion-pay{border-top:1px solid rgba(219,219,219,.5);display:-webkit-box;display:-ms-flexbox;display:flex;padding-top:.75rem}.media.sc-aion-pay   .media.sc-aion-pay   .content.sc-aion-pay:not(:last-child), .media.sc-aion-pay   .media.sc-aion-pay   .control.sc-aion-pay:not(:last-child){margin-bottom:.5rem}.media.sc-aion-pay   .media.sc-aion-pay   .media.sc-aion-pay{padding-top:.5rem}.media.sc-aion-pay   .media.sc-aion-pay   .media.sc-aion-pay + .media.sc-aion-pay{margin-top:.5rem}.media.sc-aion-pay + .media.sc-aion-pay{border-top:1px solid rgba(219,219,219,.5);margin-top:1rem;padding-top:1rem}.media.is-large.sc-aion-pay + .media.sc-aion-pay{margin-top:1.5rem;padding-top:1.5rem}.media-left.sc-aion-pay, .media-right.sc-aion-pay{-ms-flex-preferred-size:auto;flex-basis:auto;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0}.media-left.sc-aion-pay{margin-right:1rem}.media-right.sc-aion-pay{margin-left:1rem}.media-content.sc-aion-pay{-ms-flex-preferred-size:auto;flex-basis:auto;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:1;flex-shrink:1;text-align:left}.menu.sc-aion-pay{font-size:1rem}.menu.is-small.sc-aion-pay{font-size:.75rem}.menu.is-medium.sc-aion-pay{font-size:1.25rem}.menu.is-large.sc-aion-pay{font-size:1.5rem}.menu-list.sc-aion-pay{line-height:1.25}.menu-list.sc-aion-pay   a.sc-aion-pay{border-radius:2px;color:#4a4a4a;display:block;padding:.5em .75em}.menu-list.sc-aion-pay   a.sc-aion-pay:hover{background-color:#f5f5f5;color:#363636}.menu-list.sc-aion-pay   a.is-active.sc-aion-pay{background-color:#3273dc;color:#fff}.menu-list.sc-aion-pay   li.sc-aion-pay   ul.sc-aion-pay{border-left:1px solid #dbdbdb;margin:.75em;padding-left:.75em}.menu-label.sc-aion-pay{color:#7a7a7a;font-size:.75em;letter-spacing:.1em;text-transform:uppercase}.menu-label.sc-aion-pay:not(:first-child){margin-top:1em}.menu-label.sc-aion-pay:not(:last-child){margin-bottom:1em}.message.sc-aion-pay{background-color:#f5f5f5;border-radius:4px;font-size:1rem}.message.sc-aion-pay   strong.sc-aion-pay{color:currentColor}.message.sc-aion-pay   a.sc-aion-pay:not(.button):not(.tag){color:currentColor;text-decoration:underline}.message.is-small.sc-aion-pay{font-size:.75rem}.message.is-medium.sc-aion-pay{font-size:1.25rem}.message.is-large.sc-aion-pay{font-size:1.5rem}.message.is-white.sc-aion-pay{background-color:#fff}.message.is-white.sc-aion-pay   .message-header.sc-aion-pay{background-color:#fff;color:#0a0a0a}.message.is-white.sc-aion-pay   .message-body.sc-aion-pay{border-color:#fff;color:#4d4d4d}.message.is-black.sc-aion-pay{background-color:#fafafa}.message.is-black.sc-aion-pay   .message-header.sc-aion-pay{background-color:#0a0a0a;color:#fff}.message.is-black.sc-aion-pay   .message-body.sc-aion-pay{border-color:#0a0a0a;color:#090909}.message.is-light.sc-aion-pay{background-color:#fafafa}.message.is-light.sc-aion-pay   .message-header.sc-aion-pay{background-color:#f5f5f5;color:#363636}.message.is-light.sc-aion-pay   .message-body.sc-aion-pay{border-color:#f5f5f5;color:#505050}.message.is-dark.sc-aion-pay{background-color:#fafafa}.message.is-dark.sc-aion-pay   .message-header.sc-aion-pay{background-color:#363636;color:#f5f5f5}.message.is-dark.sc-aion-pay   .message-body.sc-aion-pay{border-color:#363636;color:#2a2a2a}.message.is-primary.sc-aion-pay{background-color:#f5fffd}.message.is-primary.sc-aion-pay   .message-header.sc-aion-pay{background-color:#00d1b2;color:#fff}.message.is-primary.sc-aion-pay   .message-body.sc-aion-pay{border-color:#00d1b2;color:#021310}.message.is-link.sc-aion-pay{background-color:#f6f9fe}.message.is-link.sc-aion-pay   .message-header.sc-aion-pay{background-color:#3273dc;color:#fff}.message.is-link.sc-aion-pay   .message-body.sc-aion-pay{border-color:#3273dc;color:#22509a}.message.is-info.sc-aion-pay{background-color:#f6fbfe}.message.is-info.sc-aion-pay   .message-header.sc-aion-pay{background-color:#209cee;color:#fff}.message.is-info.sc-aion-pay   .message-body.sc-aion-pay{border-color:#209cee;color:#12537e}.message.is-success.sc-aion-pay{background-color:#f6fef9}.message.is-success.sc-aion-pay   .message-header.sc-aion-pay{background-color:#23d160;color:#fff}.message.is-success.sc-aion-pay   .message-body.sc-aion-pay{border-color:#23d160;color:#0e301a}.message.is-warning.sc-aion-pay{background-color:#fffdf5}.message.is-warning.sc-aion-pay   .message-header.sc-aion-pay{background-color:#ffdd57;color:rgba(0,0,0,.7)}.message.is-warning.sc-aion-pay   .message-body.sc-aion-pay{border-color:#ffdd57;color:#3b3108}.message.is-danger.sc-aion-pay{background-color:#fff5f7}.message.is-danger.sc-aion-pay   .message-header.sc-aion-pay{background-color:#ff3860;color:#fff}.message.is-danger.sc-aion-pay   .message-body.sc-aion-pay{border-color:#ff3860;color:#cd0930}.message-header.sc-aion-pay{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:#4a4a4a;border-radius:4px 4px 0 0;color:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;font-weight:700;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;line-height:1.25;padding:.75em 1em;position:relative}.message-header.sc-aion-pay   .delete.sc-aion-pay{-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;margin-left:.75em}.message-header.sc-aion-pay + .message-body.sc-aion-pay{border-width:0;border-top-left-radius:0;border-top-right-radius:0}.message-body.sc-aion-pay{border-color:#dbdbdb;border-radius:4px;border-style:solid;border-width:0 0 0 4px;color:#4a4a4a;padding:1.25em 1.5em}.message-body.sc-aion-pay   code.sc-aion-pay, .message-body.sc-aion-pay   pre.sc-aion-pay{background-color:#fff}.message-body.sc-aion-pay   pre.sc-aion-pay   code.sc-aion-pay{background-color:transparent}.modal.sc-aion-pay{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:none;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;overflow:hidden;position:fixed;z-index:40}.modal.is-active.sc-aion-pay{display:-webkit-box;display:-ms-flexbox;display:flex}.modal-background.sc-aion-pay{background-color:rgba(10,10,10,.86)}.modal-card.sc-aion-pay, .modal-content.sc-aion-pay{margin:0 20px;max-height:calc(100vh - 160px);overflow:auto;position:relative;width:100%}\@media screen and (min-width:769px),print{.modal-card.sc-aion-pay, .modal-content.sc-aion-pay{margin:0 auto;max-height:calc(100vh - 40px);width:640px}}.modal-close.sc-aion-pay{background:0 0;height:40px;position:fixed;right:20px;top:20px;width:40px}.modal-card.sc-aion-pay{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;max-height:calc(100vh - 40px);overflow:hidden;-ms-overflow-y:visible}.modal-card-foot.sc-aion-pay, .modal-card-head.sc-aion-pay{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:#f5f5f5;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;padding:20px;position:relative}.modal-card-head.sc-aion-pay{border-bottom:1px solid #dbdbdb;border-top-left-radius:6px;border-top-right-radius:6px}.modal-card-title.sc-aion-pay{color:#363636;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;font-size:1.5rem;line-height:1}.modal-card-foot.sc-aion-pay{border-bottom-left-radius:6px;border-bottom-right-radius:6px;border-top:1px solid #dbdbdb}.modal-card-foot.sc-aion-pay   .button.sc-aion-pay:not(:last-child){margin-right:10px}.modal-card-body.sc-aion-pay{-webkit-overflow-scrolling:touch;background-color:#fff;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:1;flex-shrink:1;overflow:auto;padding:20px}.navbar.sc-aion-pay{background-color:#fff;min-height:3.25rem;position:relative;z-index:30}.navbar.is-white.sc-aion-pay{background-color:#fff;color:#0a0a0a}.navbar.is-white.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-white.sc-aion-pay   .navbar-brand.sc-aion-pay > .navbar-item.sc-aion-pay{color:#0a0a0a}.navbar.is-white.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .navbar.is-white.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .navbar.is-white.sc-aion-pay   .navbar-brand.sc-aion-pay > a.navbar-item.is-active.sc-aion-pay, .navbar.is-white.sc-aion-pay   .navbar-brand.sc-aion-pay > a.navbar-item.sc-aion-pay:hover{background-color:#f2f2f2;color:#0a0a0a}.navbar.is-white.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.sc-aion-pay::after{border-color:#0a0a0a}.navbar.is-white.sc-aion-pay   .navbar-burger.sc-aion-pay{color:#0a0a0a}\@media screen and (min-width:1088px){.navbar.is-white.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-white.sc-aion-pay   .navbar-end.sc-aion-pay > .navbar-item.sc-aion-pay, .navbar.is-white.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-white.sc-aion-pay   .navbar-start.sc-aion-pay > .navbar-item.sc-aion-pay{color:#0a0a0a}.navbar.is-white.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .navbar.is-white.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .navbar.is-white.sc-aion-pay   .navbar-end.sc-aion-pay > a.navbar-item.is-active.sc-aion-pay, .navbar.is-white.sc-aion-pay   .navbar-end.sc-aion-pay > a.navbar-item.sc-aion-pay:hover, .navbar.is-white.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .navbar.is-white.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .navbar.is-white.sc-aion-pay   .navbar-start.sc-aion-pay > a.navbar-item.is-active.sc-aion-pay, .navbar.is-white.sc-aion-pay   .navbar-start.sc-aion-pay > a.navbar-item.sc-aion-pay:hover{background-color:#f2f2f2;color:#0a0a0a}.navbar.is-white.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.sc-aion-pay::after, .navbar.is-white.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.sc-aion-pay::after{border-color:#0a0a0a}.navbar.is-white.sc-aion-pay   .navbar-item.has-dropdown.is-active.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-white.sc-aion-pay   .navbar-item.has-dropdown.sc-aion-pay:hover   .navbar-link.sc-aion-pay{background-color:#f2f2f2;color:#0a0a0a}.navbar.is-white.sc-aion-pay   .navbar-dropdown.sc-aion-pay   a.navbar-item.is-active.sc-aion-pay{background-color:#fff;color:#0a0a0a}}.navbar.is-black.sc-aion-pay{background-color:#0a0a0a;color:#fff}.navbar.is-black.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-black.sc-aion-pay   .navbar-brand.sc-aion-pay > .navbar-item.sc-aion-pay{color:#fff}.navbar.is-black.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .navbar.is-black.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .navbar.is-black.sc-aion-pay   .navbar-brand.sc-aion-pay > a.navbar-item.is-active.sc-aion-pay, .navbar.is-black.sc-aion-pay   .navbar-brand.sc-aion-pay > a.navbar-item.sc-aion-pay:hover{background-color:#000;color:#fff}.navbar.is-black.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.sc-aion-pay::after{border-color:#fff}.navbar.is-black.sc-aion-pay   .navbar-burger.sc-aion-pay{color:#fff}\@media screen and (min-width:1088px){.navbar.is-black.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-black.sc-aion-pay   .navbar-end.sc-aion-pay > .navbar-item.sc-aion-pay, .navbar.is-black.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-black.sc-aion-pay   .navbar-start.sc-aion-pay > .navbar-item.sc-aion-pay{color:#fff}.navbar.is-black.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .navbar.is-black.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .navbar.is-black.sc-aion-pay   .navbar-end.sc-aion-pay > a.navbar-item.is-active.sc-aion-pay, .navbar.is-black.sc-aion-pay   .navbar-end.sc-aion-pay > a.navbar-item.sc-aion-pay:hover, .navbar.is-black.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .navbar.is-black.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .navbar.is-black.sc-aion-pay   .navbar-start.sc-aion-pay > a.navbar-item.is-active.sc-aion-pay, .navbar.is-black.sc-aion-pay   .navbar-start.sc-aion-pay > a.navbar-item.sc-aion-pay:hover{background-color:#000;color:#fff}.navbar.is-black.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.sc-aion-pay::after, .navbar.is-black.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.sc-aion-pay::after{border-color:#fff}.navbar.is-black.sc-aion-pay   .navbar-item.has-dropdown.is-active.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-black.sc-aion-pay   .navbar-item.has-dropdown.sc-aion-pay:hover   .navbar-link.sc-aion-pay{background-color:#000;color:#fff}.navbar.is-black.sc-aion-pay   .navbar-dropdown.sc-aion-pay   a.navbar-item.is-active.sc-aion-pay{background-color:#0a0a0a;color:#fff}}.navbar.is-light.sc-aion-pay{background-color:#f5f5f5;color:#363636}.navbar.is-light.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-light.sc-aion-pay   .navbar-brand.sc-aion-pay > .navbar-item.sc-aion-pay{color:#363636}.navbar.is-light.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .navbar.is-light.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .navbar.is-light.sc-aion-pay   .navbar-brand.sc-aion-pay > a.navbar-item.is-active.sc-aion-pay, .navbar.is-light.sc-aion-pay   .navbar-brand.sc-aion-pay > a.navbar-item.sc-aion-pay:hover{background-color:#e8e8e8;color:#363636}.navbar.is-light.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.sc-aion-pay::after{border-color:#363636}.navbar.is-light.sc-aion-pay   .navbar-burger.sc-aion-pay{color:#363636}\@media screen and (min-width:1088px){.navbar.is-light.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-light.sc-aion-pay   .navbar-end.sc-aion-pay > .navbar-item.sc-aion-pay, .navbar.is-light.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-light.sc-aion-pay   .navbar-start.sc-aion-pay > .navbar-item.sc-aion-pay{color:#363636}.navbar.is-light.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .navbar.is-light.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .navbar.is-light.sc-aion-pay   .navbar-end.sc-aion-pay > a.navbar-item.is-active.sc-aion-pay, .navbar.is-light.sc-aion-pay   .navbar-end.sc-aion-pay > a.navbar-item.sc-aion-pay:hover, .navbar.is-light.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .navbar.is-light.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .navbar.is-light.sc-aion-pay   .navbar-start.sc-aion-pay > a.navbar-item.is-active.sc-aion-pay, .navbar.is-light.sc-aion-pay   .navbar-start.sc-aion-pay > a.navbar-item.sc-aion-pay:hover{background-color:#e8e8e8;color:#363636}.navbar.is-light.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.sc-aion-pay::after, .navbar.is-light.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.sc-aion-pay::after{border-color:#363636}.navbar.is-light.sc-aion-pay   .navbar-item.has-dropdown.is-active.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-light.sc-aion-pay   .navbar-item.has-dropdown.sc-aion-pay:hover   .navbar-link.sc-aion-pay{background-color:#e8e8e8;color:#363636}.navbar.is-light.sc-aion-pay   .navbar-dropdown.sc-aion-pay   a.navbar-item.is-active.sc-aion-pay{background-color:#f5f5f5;color:#363636}}.navbar.is-dark.sc-aion-pay{background-color:#363636;color:#f5f5f5}.navbar.is-dark.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-dark.sc-aion-pay   .navbar-brand.sc-aion-pay > .navbar-item.sc-aion-pay{color:#f5f5f5}.navbar.is-dark.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .navbar.is-dark.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .navbar.is-dark.sc-aion-pay   .navbar-brand.sc-aion-pay > a.navbar-item.is-active.sc-aion-pay, .navbar.is-dark.sc-aion-pay   .navbar-brand.sc-aion-pay > a.navbar-item.sc-aion-pay:hover{background-color:#292929;color:#f5f5f5}.navbar.is-dark.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.sc-aion-pay::after{border-color:#f5f5f5}.navbar.is-dark.sc-aion-pay   .navbar-burger.sc-aion-pay{color:#f5f5f5}\@media screen and (min-width:1088px){.navbar.is-dark.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-dark.sc-aion-pay   .navbar-end.sc-aion-pay > .navbar-item.sc-aion-pay, .navbar.is-dark.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-dark.sc-aion-pay   .navbar-start.sc-aion-pay > .navbar-item.sc-aion-pay{color:#f5f5f5}.navbar.is-dark.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .navbar.is-dark.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .navbar.is-dark.sc-aion-pay   .navbar-end.sc-aion-pay > a.navbar-item.is-active.sc-aion-pay, .navbar.is-dark.sc-aion-pay   .navbar-end.sc-aion-pay > a.navbar-item.sc-aion-pay:hover, .navbar.is-dark.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .navbar.is-dark.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .navbar.is-dark.sc-aion-pay   .navbar-start.sc-aion-pay > a.navbar-item.is-active.sc-aion-pay, .navbar.is-dark.sc-aion-pay   .navbar-start.sc-aion-pay > a.navbar-item.sc-aion-pay:hover{background-color:#292929;color:#f5f5f5}.navbar.is-dark.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.sc-aion-pay::after, .navbar.is-dark.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.sc-aion-pay::after{border-color:#f5f5f5}.navbar.is-dark.sc-aion-pay   .navbar-item.has-dropdown.is-active.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-dark.sc-aion-pay   .navbar-item.has-dropdown.sc-aion-pay:hover   .navbar-link.sc-aion-pay{background-color:#292929;color:#f5f5f5}.navbar.is-dark.sc-aion-pay   .navbar-dropdown.sc-aion-pay   a.navbar-item.is-active.sc-aion-pay{background-color:#363636;color:#f5f5f5}}.navbar.is-primary.sc-aion-pay{background-color:#00d1b2;color:#fff}.navbar.is-primary.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-primary.sc-aion-pay   .navbar-brand.sc-aion-pay > .navbar-item.sc-aion-pay{color:#fff}.navbar.is-primary.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .navbar.is-primary.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .navbar.is-primary.sc-aion-pay   .navbar-brand.sc-aion-pay > a.navbar-item.is-active.sc-aion-pay, .navbar.is-primary.sc-aion-pay   .navbar-brand.sc-aion-pay > a.navbar-item.sc-aion-pay:hover{background-color:#00b89c;color:#fff}.navbar.is-primary.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.sc-aion-pay::after{border-color:#fff}.navbar.is-primary.sc-aion-pay   .navbar-burger.sc-aion-pay{color:#fff}\@media screen and (min-width:1088px){.navbar.is-primary.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-primary.sc-aion-pay   .navbar-end.sc-aion-pay > .navbar-item.sc-aion-pay, .navbar.is-primary.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-primary.sc-aion-pay   .navbar-start.sc-aion-pay > .navbar-item.sc-aion-pay{color:#fff}.navbar.is-primary.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .navbar.is-primary.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .navbar.is-primary.sc-aion-pay   .navbar-end.sc-aion-pay > a.navbar-item.is-active.sc-aion-pay, .navbar.is-primary.sc-aion-pay   .navbar-end.sc-aion-pay > a.navbar-item.sc-aion-pay:hover, .navbar.is-primary.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .navbar.is-primary.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .navbar.is-primary.sc-aion-pay   .navbar-start.sc-aion-pay > a.navbar-item.is-active.sc-aion-pay, .navbar.is-primary.sc-aion-pay   .navbar-start.sc-aion-pay > a.navbar-item.sc-aion-pay:hover{background-color:#00b89c;color:#fff}.navbar.is-primary.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.sc-aion-pay::after, .navbar.is-primary.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.sc-aion-pay::after{border-color:#fff}.navbar.is-primary.sc-aion-pay   .navbar-item.has-dropdown.is-active.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-primary.sc-aion-pay   .navbar-item.has-dropdown.sc-aion-pay:hover   .navbar-link.sc-aion-pay{background-color:#00b89c;color:#fff}.navbar.is-primary.sc-aion-pay   .navbar-dropdown.sc-aion-pay   a.navbar-item.is-active.sc-aion-pay{background-color:#00d1b2;color:#fff}}.navbar.is-link.sc-aion-pay{background-color:#3273dc;color:#fff}.navbar.is-link.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-link.sc-aion-pay   .navbar-brand.sc-aion-pay > .navbar-item.sc-aion-pay{color:#fff}.navbar.is-link.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .navbar.is-link.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .navbar.is-link.sc-aion-pay   .navbar-brand.sc-aion-pay > a.navbar-item.is-active.sc-aion-pay, .navbar.is-link.sc-aion-pay   .navbar-brand.sc-aion-pay > a.navbar-item.sc-aion-pay:hover{background-color:#2366d1;color:#fff}.navbar.is-link.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.sc-aion-pay::after{border-color:#fff}.navbar.is-link.sc-aion-pay   .navbar-burger.sc-aion-pay{color:#fff}\@media screen and (min-width:1088px){.navbar.is-link.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-link.sc-aion-pay   .navbar-end.sc-aion-pay > .navbar-item.sc-aion-pay, .navbar.is-link.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-link.sc-aion-pay   .navbar-start.sc-aion-pay > .navbar-item.sc-aion-pay{color:#fff}.navbar.is-link.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .navbar.is-link.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .navbar.is-link.sc-aion-pay   .navbar-end.sc-aion-pay > a.navbar-item.is-active.sc-aion-pay, .navbar.is-link.sc-aion-pay   .navbar-end.sc-aion-pay > a.navbar-item.sc-aion-pay:hover, .navbar.is-link.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .navbar.is-link.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .navbar.is-link.sc-aion-pay   .navbar-start.sc-aion-pay > a.navbar-item.is-active.sc-aion-pay, .navbar.is-link.sc-aion-pay   .navbar-start.sc-aion-pay > a.navbar-item.sc-aion-pay:hover{background-color:#2366d1;color:#fff}.navbar.is-link.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.sc-aion-pay::after, .navbar.is-link.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.sc-aion-pay::after{border-color:#fff}.navbar.is-link.sc-aion-pay   .navbar-item.has-dropdown.is-active.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-link.sc-aion-pay   .navbar-item.has-dropdown.sc-aion-pay:hover   .navbar-link.sc-aion-pay{background-color:#2366d1;color:#fff}.navbar.is-link.sc-aion-pay   .navbar-dropdown.sc-aion-pay   a.navbar-item.is-active.sc-aion-pay{background-color:#3273dc;color:#fff}}.navbar.is-info.sc-aion-pay{background-color:#209cee;color:#fff}.navbar.is-info.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-info.sc-aion-pay   .navbar-brand.sc-aion-pay > .navbar-item.sc-aion-pay{color:#fff}.navbar.is-info.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .navbar.is-info.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .navbar.is-info.sc-aion-pay   .navbar-brand.sc-aion-pay > a.navbar-item.is-active.sc-aion-pay, .navbar.is-info.sc-aion-pay   .navbar-brand.sc-aion-pay > a.navbar-item.sc-aion-pay:hover{background-color:#118fe4;color:#fff}.navbar.is-info.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.sc-aion-pay::after{border-color:#fff}.navbar.is-info.sc-aion-pay   .navbar-burger.sc-aion-pay{color:#fff}\@media screen and (min-width:1088px){.navbar.is-info.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-info.sc-aion-pay   .navbar-end.sc-aion-pay > .navbar-item.sc-aion-pay, .navbar.is-info.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-info.sc-aion-pay   .navbar-start.sc-aion-pay > .navbar-item.sc-aion-pay{color:#fff}.navbar.is-info.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .navbar.is-info.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .navbar.is-info.sc-aion-pay   .navbar-end.sc-aion-pay > a.navbar-item.is-active.sc-aion-pay, .navbar.is-info.sc-aion-pay   .navbar-end.sc-aion-pay > a.navbar-item.sc-aion-pay:hover, .navbar.is-info.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .navbar.is-info.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .navbar.is-info.sc-aion-pay   .navbar-start.sc-aion-pay > a.navbar-item.is-active.sc-aion-pay, .navbar.is-info.sc-aion-pay   .navbar-start.sc-aion-pay > a.navbar-item.sc-aion-pay:hover{background-color:#118fe4;color:#fff}.navbar.is-info.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.sc-aion-pay::after, .navbar.is-info.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.sc-aion-pay::after{border-color:#fff}.navbar.is-info.sc-aion-pay   .navbar-item.has-dropdown.is-active.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-info.sc-aion-pay   .navbar-item.has-dropdown.sc-aion-pay:hover   .navbar-link.sc-aion-pay{background-color:#118fe4;color:#fff}.navbar.is-info.sc-aion-pay   .navbar-dropdown.sc-aion-pay   a.navbar-item.is-active.sc-aion-pay{background-color:#209cee;color:#fff}}.navbar.is-success.sc-aion-pay{background-color:#23d160;color:#fff}.navbar.is-success.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-success.sc-aion-pay   .navbar-brand.sc-aion-pay > .navbar-item.sc-aion-pay{color:#fff}.navbar.is-success.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .navbar.is-success.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .navbar.is-success.sc-aion-pay   .navbar-brand.sc-aion-pay > a.navbar-item.is-active.sc-aion-pay, .navbar.is-success.sc-aion-pay   .navbar-brand.sc-aion-pay > a.navbar-item.sc-aion-pay:hover{background-color:#20bc56;color:#fff}.navbar.is-success.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.sc-aion-pay::after{border-color:#fff}.navbar.is-success.sc-aion-pay   .navbar-burger.sc-aion-pay{color:#fff}\@media screen and (min-width:1088px){.navbar.is-success.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-success.sc-aion-pay   .navbar-end.sc-aion-pay > .navbar-item.sc-aion-pay, .navbar.is-success.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-success.sc-aion-pay   .navbar-start.sc-aion-pay > .navbar-item.sc-aion-pay{color:#fff}.navbar.is-success.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .navbar.is-success.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .navbar.is-success.sc-aion-pay   .navbar-end.sc-aion-pay > a.navbar-item.is-active.sc-aion-pay, .navbar.is-success.sc-aion-pay   .navbar-end.sc-aion-pay > a.navbar-item.sc-aion-pay:hover, .navbar.is-success.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .navbar.is-success.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .navbar.is-success.sc-aion-pay   .navbar-start.sc-aion-pay > a.navbar-item.is-active.sc-aion-pay, .navbar.is-success.sc-aion-pay   .navbar-start.sc-aion-pay > a.navbar-item.sc-aion-pay:hover{background-color:#20bc56;color:#fff}.navbar.is-success.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.sc-aion-pay::after, .navbar.is-success.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.sc-aion-pay::after{border-color:#fff}.navbar.is-success.sc-aion-pay   .navbar-item.has-dropdown.is-active.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-success.sc-aion-pay   .navbar-item.has-dropdown.sc-aion-pay:hover   .navbar-link.sc-aion-pay{background-color:#20bc56;color:#fff}.navbar.is-success.sc-aion-pay   .navbar-dropdown.sc-aion-pay   a.navbar-item.is-active.sc-aion-pay{background-color:#23d160;color:#fff}}.navbar.is-warning.sc-aion-pay{background-color:#ffdd57;color:rgba(0,0,0,.7)}.navbar.is-warning.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-warning.sc-aion-pay   .navbar-brand.sc-aion-pay > .navbar-item.sc-aion-pay{color:rgba(0,0,0,.7)}.navbar.is-warning.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .navbar.is-warning.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .navbar.is-warning.sc-aion-pay   .navbar-brand.sc-aion-pay > a.navbar-item.is-active.sc-aion-pay, .navbar.is-warning.sc-aion-pay   .navbar-brand.sc-aion-pay > a.navbar-item.sc-aion-pay:hover{background-color:#ffd83d;color:rgba(0,0,0,.7)}.navbar.is-warning.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.sc-aion-pay::after{border-color:rgba(0,0,0,.7)}.navbar.is-warning.sc-aion-pay   .navbar-burger.sc-aion-pay{color:rgba(0,0,0,.7)}\@media screen and (min-width:1088px){.navbar.is-warning.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-warning.sc-aion-pay   .navbar-end.sc-aion-pay > .navbar-item.sc-aion-pay, .navbar.is-warning.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-warning.sc-aion-pay   .navbar-start.sc-aion-pay > .navbar-item.sc-aion-pay{color:rgba(0,0,0,.7)}.navbar.is-warning.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .navbar.is-warning.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .navbar.is-warning.sc-aion-pay   .navbar-end.sc-aion-pay > a.navbar-item.is-active.sc-aion-pay, .navbar.is-warning.sc-aion-pay   .navbar-end.sc-aion-pay > a.navbar-item.sc-aion-pay:hover, .navbar.is-warning.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .navbar.is-warning.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .navbar.is-warning.sc-aion-pay   .navbar-start.sc-aion-pay > a.navbar-item.is-active.sc-aion-pay, .navbar.is-warning.sc-aion-pay   .navbar-start.sc-aion-pay > a.navbar-item.sc-aion-pay:hover{background-color:#ffd83d;color:rgba(0,0,0,.7)}.navbar.is-warning.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.sc-aion-pay::after, .navbar.is-warning.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.sc-aion-pay::after{border-color:rgba(0,0,0,.7)}.navbar.is-warning.sc-aion-pay   .navbar-item.has-dropdown.is-active.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-warning.sc-aion-pay   .navbar-item.has-dropdown.sc-aion-pay:hover   .navbar-link.sc-aion-pay{background-color:#ffd83d;color:rgba(0,0,0,.7)}.navbar.is-warning.sc-aion-pay   .navbar-dropdown.sc-aion-pay   a.navbar-item.is-active.sc-aion-pay{background-color:#ffdd57;color:rgba(0,0,0,.7)}}.navbar.is-danger.sc-aion-pay{background-color:#ff3860;color:#fff}.navbar.is-danger.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-danger.sc-aion-pay   .navbar-brand.sc-aion-pay > .navbar-item.sc-aion-pay{color:#fff}.navbar.is-danger.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .navbar.is-danger.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .navbar.is-danger.sc-aion-pay   .navbar-brand.sc-aion-pay > a.navbar-item.is-active.sc-aion-pay, .navbar.is-danger.sc-aion-pay   .navbar-brand.sc-aion-pay > a.navbar-item.sc-aion-pay:hover{background-color:#ff1f4b;color:#fff}.navbar.is-danger.sc-aion-pay   .navbar-brand.sc-aion-pay   .navbar-link.sc-aion-pay::after{border-color:#fff}.navbar.is-danger.sc-aion-pay   .navbar-burger.sc-aion-pay{color:#fff}\@media screen and (min-width:1088px){.navbar.is-danger.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-danger.sc-aion-pay   .navbar-end.sc-aion-pay > .navbar-item.sc-aion-pay, .navbar.is-danger.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-danger.sc-aion-pay   .navbar-start.sc-aion-pay > .navbar-item.sc-aion-pay{color:#fff}.navbar.is-danger.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .navbar.is-danger.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .navbar.is-danger.sc-aion-pay   .navbar-end.sc-aion-pay > a.navbar-item.is-active.sc-aion-pay, .navbar.is-danger.sc-aion-pay   .navbar-end.sc-aion-pay > a.navbar-item.sc-aion-pay:hover, .navbar.is-danger.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .navbar.is-danger.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .navbar.is-danger.sc-aion-pay   .navbar-start.sc-aion-pay > a.navbar-item.is-active.sc-aion-pay, .navbar.is-danger.sc-aion-pay   .navbar-start.sc-aion-pay > a.navbar-item.sc-aion-pay:hover{background-color:#ff1f4b;color:#fff}.navbar.is-danger.sc-aion-pay   .navbar-end.sc-aion-pay   .navbar-link.sc-aion-pay::after, .navbar.is-danger.sc-aion-pay   .navbar-start.sc-aion-pay   .navbar-link.sc-aion-pay::after{border-color:#fff}.navbar.is-danger.sc-aion-pay   .navbar-item.has-dropdown.is-active.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-danger.sc-aion-pay   .navbar-item.has-dropdown.sc-aion-pay:hover   .navbar-link.sc-aion-pay{background-color:#ff1f4b;color:#fff}.navbar.is-danger.sc-aion-pay   .navbar-dropdown.sc-aion-pay   a.navbar-item.is-active.sc-aion-pay{background-color:#ff3860;color:#fff}}.navbar.sc-aion-pay > .container.sc-aion-pay{-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;display:-webkit-box;display:-ms-flexbox;display:flex;min-height:3.25rem;width:100%}.navbar.has-shadow.sc-aion-pay{-webkit-box-shadow:0 2px 0 0 #f5f5f5;box-shadow:0 2px 0 0 #f5f5f5}.navbar.is-fixed-bottom.sc-aion-pay, .navbar.is-fixed-top.sc-aion-pay{left:0;position:fixed;right:0;z-index:30}.navbar.is-fixed-bottom.sc-aion-pay{bottom:0}.navbar.is-fixed-bottom.has-shadow.sc-aion-pay{-webkit-box-shadow:0 -2px 0 0 #f5f5f5;box-shadow:0 -2px 0 0 #f5f5f5}.navbar.is-fixed-top.sc-aion-pay{top:0}body.has-navbar-fixed-top.sc-aion-pay, html.has-navbar-fixed-top.sc-aion-pay{padding-top:3.25rem}body.has-navbar-fixed-bottom.sc-aion-pay, html.has-navbar-fixed-bottom.sc-aion-pay{padding-bottom:3.25rem}.navbar-brand.sc-aion-pay, .navbar-tabs.sc-aion-pay{-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;min-height:3.25rem}.navbar-brand.sc-aion-pay   a.navbar-item.sc-aion-pay:hover{background-color:transparent}.navbar-tabs.sc-aion-pay{-webkit-overflow-scrolling:touch;max-width:100vw;overflow-x:auto;overflow-y:hidden}.navbar-burger.sc-aion-pay{color:#4a4a4a;cursor:pointer;display:block;height:3.25rem;position:relative;width:3.25rem;margin-left:auto}.navbar-burger.sc-aion-pay   span.sc-aion-pay{background-color:currentColor;display:block;height:1px;left:calc(50% - 8px);position:absolute;-webkit-transform-origin:center;transform-origin:center;-webkit-transition-duration:86ms;transition-duration:86ms;-webkit-transition-property:background-color,opacity,-webkit-transform;transition-property:background-color,opacity,transform,-webkit-transform;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out;width:16px}.navbar-burger.sc-aion-pay   span.sc-aion-pay:nth-child(1){top:calc(50% - 6px)}.navbar-burger.sc-aion-pay   span.sc-aion-pay:nth-child(2){top:calc(50% - 1px)}.navbar-burger.sc-aion-pay   span.sc-aion-pay:nth-child(3){top:calc(50% + 4px)}.navbar-burger.sc-aion-pay:hover{background-color:rgba(0,0,0,.05)}.navbar-burger.is-active.sc-aion-pay   span.sc-aion-pay:nth-child(1){-webkit-transform:translateY(5px) rotate(45deg);transform:translateY(5px) rotate(45deg)}.navbar-burger.is-active.sc-aion-pay   span.sc-aion-pay:nth-child(2){opacity:0}.navbar-burger.is-active.sc-aion-pay   span.sc-aion-pay:nth-child(3){-webkit-transform:translateY(-5px) rotate(-45deg);transform:translateY(-5px) rotate(-45deg)}.navbar-menu.sc-aion-pay{display:none}.navbar-item.sc-aion-pay, .navbar-link.sc-aion-pay{color:#4a4a4a;display:block;line-height:1.5;padding:.5rem .75rem;position:relative}.navbar-item.sc-aion-pay   .icon.sc-aion-pay:only-child, .navbar-link.sc-aion-pay   .icon.sc-aion-pay:only-child{margin-left:-.25rem;margin-right:-.25rem}.navbar-link.sc-aion-pay, a.navbar-item.sc-aion-pay{cursor:pointer}.navbar-link.is-active.sc-aion-pay, .navbar-link.sc-aion-pay:hover, a.navbar-item.is-active.sc-aion-pay, a.navbar-item.sc-aion-pay:hover{background-color:#fafafa;color:#3273dc}.navbar-item.sc-aion-pay{display:block;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0}.navbar-item.sc-aion-pay   img.sc-aion-pay{max-height:1.75rem}.navbar-item.has-dropdown.sc-aion-pay{padding:0}.navbar-item.is-expanded.sc-aion-pay{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:1;flex-shrink:1}.navbar-item.is-tab.sc-aion-pay{border-bottom:1px solid transparent;min-height:3.25rem;padding-bottom:calc(.5rem - 1px)}.navbar-item.is-tab.sc-aion-pay:hover{background-color:transparent;border-bottom-color:#3273dc}.navbar-item.is-tab.is-active.sc-aion-pay{background-color:transparent;color:#3273dc;padding-bottom:calc(.5rem - 3px);border-bottom:3px solid #3273dc}.navbar-content.sc-aion-pay{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:1;flex-shrink:1}.navbar-link.sc-aion-pay:not(.is-arrowless){padding-right:2.5em}.navbar-link.sc-aion-pay:not(.is-arrowless)::after{border-color:#3273dc;margin-top:-.375em;right:1.125em}.navbar-dropdown.sc-aion-pay{font-size:.875rem;padding-bottom:.5rem;padding-top:.5rem}.navbar-dropdown.sc-aion-pay   .navbar-item.sc-aion-pay{padding-left:1.5rem;padding-right:1.5rem}.navbar-divider.sc-aion-pay{background-color:#f5f5f5;border:none;display:none;height:2px;margin:.5rem 0}\@media screen and (max-width:1087px){.navbar.sc-aion-pay > .container.sc-aion-pay{display:block}.navbar-brand.sc-aion-pay   .navbar-item.sc-aion-pay, .navbar-tabs.sc-aion-pay   .navbar-item.sc-aion-pay{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}.navbar-link.sc-aion-pay::after{display:none}.navbar-menu.sc-aion-pay{background-color:#fff;-webkit-box-shadow:0 8px 16px rgba(0,0,0,.1);box-shadow:0 8px 16px rgba(0,0,0,.1);padding:.5rem 0}.navbar-menu.is-active.sc-aion-pay{display:block}.navbar.is-fixed-bottom-touch.sc-aion-pay, .navbar.is-fixed-top-touch.sc-aion-pay{left:0;position:fixed;right:0;z-index:30}.navbar.is-fixed-bottom-touch.sc-aion-pay{bottom:0}.navbar.is-fixed-bottom-touch.has-shadow.sc-aion-pay{-webkit-box-shadow:0 -2px 3px rgba(0,0,0,.1);box-shadow:0 -2px 3px rgba(0,0,0,.1)}.navbar.is-fixed-top-touch.sc-aion-pay{top:0}.navbar.is-fixed-top.sc-aion-pay   .navbar-menu.sc-aion-pay, .navbar.is-fixed-top-touch.sc-aion-pay   .navbar-menu.sc-aion-pay{-webkit-overflow-scrolling:touch;max-height:calc(100vh - 3.25rem);overflow:auto}body.has-navbar-fixed-top-touch.sc-aion-pay, html.has-navbar-fixed-top-touch.sc-aion-pay{padding-top:3.25rem}body.has-navbar-fixed-bottom-touch.sc-aion-pay, html.has-navbar-fixed-bottom-touch.sc-aion-pay{padding-bottom:3.25rem}}\@media screen and (min-width:1088px){.navbar.sc-aion-pay, .navbar-end.sc-aion-pay, .navbar-menu.sc-aion-pay, .navbar-start.sc-aion-pay{-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;display:-webkit-box;display:-ms-flexbox;display:flex}.navbar.sc-aion-pay{min-height:3.25rem}.navbar.is-spaced.sc-aion-pay{padding:1rem 2rem}.navbar.is-spaced.sc-aion-pay   .navbar-end.sc-aion-pay, .navbar.is-spaced.sc-aion-pay   .navbar-start.sc-aion-pay{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.navbar.is-spaced.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-spaced.sc-aion-pay   a.navbar-item.sc-aion-pay{border-radius:4px}.navbar.is-transparent.sc-aion-pay   .navbar-item.has-dropdown.is-active.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar.is-transparent.sc-aion-pay   .navbar-item.has-dropdown.is-hoverable.sc-aion-pay:hover   .navbar-link.sc-aion-pay, .navbar.is-transparent.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .navbar.is-transparent.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .navbar.is-transparent.sc-aion-pay   a.navbar-item.is-active.sc-aion-pay, .navbar.is-transparent.sc-aion-pay   a.navbar-item.sc-aion-pay:hover{background-color:transparent!important}.navbar.is-transparent.sc-aion-pay   .navbar-dropdown.sc-aion-pay   a.navbar-item.sc-aion-pay:hover{background-color:#f5f5f5;color:#0a0a0a}.navbar.is-transparent.sc-aion-pay   .navbar-dropdown.sc-aion-pay   a.navbar-item.is-active.sc-aion-pay{background-color:#f5f5f5;color:#3273dc}.navbar-burger.sc-aion-pay{display:none}.navbar-item.sc-aion-pay, .navbar-link.sc-aion-pay{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}.navbar-item.sc-aion-pay{display:-webkit-box;display:-ms-flexbox;display:flex}.navbar-item.has-dropdown.sc-aion-pay{-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}.navbar-item.has-dropdown-up.sc-aion-pay   .navbar-link.sc-aion-pay::after{-webkit-transform:rotate(135deg) translate(.25em,-.25em);transform:rotate(135deg) translate(.25em,-.25em)}.navbar-item.has-dropdown-up.sc-aion-pay   .navbar-dropdown.sc-aion-pay{border-bottom:2px solid #dbdbdb;border-radius:6px 6px 0 0;border-top:none;bottom:100%;-webkit-box-shadow:0 -8px 8px rgba(0,0,0,.1);box-shadow:0 -8px 8px rgba(0,0,0,.1);top:auto}.navbar-item.is-active.sc-aion-pay   .navbar-dropdown.sc-aion-pay, .navbar-item.is-hoverable.sc-aion-pay:hover   .navbar-dropdown.sc-aion-pay{display:block}.navbar-item.is-active.sc-aion-pay   .navbar-dropdown.is-boxed.sc-aion-pay, .navbar-item.is-hoverable.sc-aion-pay:hover   .navbar-dropdown.is-boxed.sc-aion-pay, .navbar.is-spaced.sc-aion-pay   .navbar-item.is-active.sc-aion-pay   .navbar-dropdown.sc-aion-pay, .navbar.is-spaced.sc-aion-pay   .navbar-item.is-hoverable.sc-aion-pay:hover   .navbar-dropdown.sc-aion-pay{opacity:1;pointer-events:auto;-webkit-transform:translateY(0);transform:translateY(0)}.navbar-menu.sc-aion-pay{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0}.navbar-start.sc-aion-pay{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;margin-right:auto}.navbar-end.sc-aion-pay{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;margin-left:auto}.navbar-dropdown.sc-aion-pay{background-color:#fff;border-bottom-left-radius:6px;border-bottom-right-radius:6px;border-top:2px solid #dbdbdb;-webkit-box-shadow:0 8px 8px rgba(0,0,0,.1);box-shadow:0 8px 8px rgba(0,0,0,.1);display:none;font-size:.875rem;left:0;min-width:100%;position:absolute;top:100%;z-index:20}.navbar-dropdown.sc-aion-pay   .navbar-item.sc-aion-pay{padding:.375rem 1rem;white-space:nowrap}.navbar-dropdown.sc-aion-pay   a.navbar-item.sc-aion-pay{padding-right:3rem}.navbar-dropdown.sc-aion-pay   a.navbar-item.sc-aion-pay:hover{background-color:#f5f5f5;color:#0a0a0a}.navbar-dropdown.sc-aion-pay   a.navbar-item.is-active.sc-aion-pay{background-color:#f5f5f5;color:#3273dc}.navbar-dropdown.is-boxed.sc-aion-pay, .navbar.is-spaced.sc-aion-pay   .navbar-dropdown.sc-aion-pay{border-radius:6px;border-top:none;-webkit-box-shadow:0 8px 8px rgba(10,10,10,.1),0 0 0 1px rgba(10,10,10,.1);box-shadow:0 8px 8px rgba(10,10,10,.1),0 0 0 1px rgba(10,10,10,.1);display:block;opacity:0;pointer-events:none;top:calc(100% + (-4px));-webkit-transform:translateY(-5px);transform:translateY(-5px);-webkit-transition-duration:86ms;transition-duration:86ms;-webkit-transition-property:opacity,-webkit-transform;transition-property:opacity,transform,-webkit-transform}.navbar-dropdown.is-right.sc-aion-pay{left:auto;right:0}.navbar-divider.sc-aion-pay{display:block}.container.sc-aion-pay > .navbar.sc-aion-pay   .navbar-brand.sc-aion-pay, .navbar.sc-aion-pay > .container.sc-aion-pay   .navbar-brand.sc-aion-pay{margin-left:-.75rem}.container.sc-aion-pay > .navbar.sc-aion-pay   .navbar-menu.sc-aion-pay, .navbar.sc-aion-pay > .container.sc-aion-pay   .navbar-menu.sc-aion-pay{margin-right:-.75rem}.navbar.is-fixed-bottom-desktop.sc-aion-pay, .navbar.is-fixed-top-desktop.sc-aion-pay{left:0;position:fixed;right:0;z-index:30}.navbar.is-fixed-bottom-desktop.sc-aion-pay{bottom:0}.navbar.is-fixed-bottom-desktop.has-shadow.sc-aion-pay{-webkit-box-shadow:0 -2px 3px rgba(0,0,0,.1);box-shadow:0 -2px 3px rgba(0,0,0,.1)}.navbar.is-fixed-top-desktop.sc-aion-pay{top:0}body.has-navbar-fixed-top-desktop.sc-aion-pay, html.has-navbar-fixed-top-desktop.sc-aion-pay{padding-top:3.25rem}body.has-navbar-fixed-bottom-desktop.sc-aion-pay, html.has-navbar-fixed-bottom-desktop.sc-aion-pay{padding-bottom:3.25rem}body.has-spaced-navbar-fixed-top.sc-aion-pay, html.has-spaced-navbar-fixed-top.sc-aion-pay{padding-top:5.25rem}body.has-spaced-navbar-fixed-bottom.sc-aion-pay, html.has-spaced-navbar-fixed-bottom.sc-aion-pay{padding-bottom:5.25rem}.navbar-link.is-active.sc-aion-pay, a.navbar-item.is-active.sc-aion-pay{color:#0a0a0a}.navbar-link.is-active.sc-aion-pay:not(:hover), a.navbar-item.is-active.sc-aion-pay:not(:hover){background-color:transparent}.navbar-item.has-dropdown.is-active.sc-aion-pay   .navbar-link.sc-aion-pay, .navbar-item.has-dropdown.sc-aion-pay:hover   .navbar-link.sc-aion-pay{background-color:#fafafa}}.pagination.sc-aion-pay{font-size:1rem;margin:-.25rem}.pagination.is-small.sc-aion-pay{font-size:.75rem}.pagination.is-medium.sc-aion-pay{font-size:1.25rem}.pagination.is-large.sc-aion-pay{font-size:1.5rem}.pagination.is-rounded.sc-aion-pay   .pagination-next.sc-aion-pay, .pagination.is-rounded.sc-aion-pay   .pagination-previous.sc-aion-pay{padding-left:1em;padding-right:1em;border-radius:290486px}.pagination.is-rounded.sc-aion-pay   .pagination-link.sc-aion-pay{border-radius:290486px}.pagination.sc-aion-pay, .pagination-list.sc-aion-pay{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.pagination-ellipsis.sc-aion-pay, .pagination-link.sc-aion-pay, .pagination-next.sc-aion-pay, .pagination-previous.sc-aion-pay{font-size:1em;padding-left:.5em;padding-right:.5em;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin:.25rem;text-align:center}.pagination-link.sc-aion-pay, .pagination-next.sc-aion-pay, .pagination-previous.sc-aion-pay{border-color:#dbdbdb;color:#363636;min-width:2.25em}.pagination-link.sc-aion-pay:hover, .pagination-next.sc-aion-pay:hover, .pagination-previous.sc-aion-pay:hover{border-color:#b5b5b5;color:#363636}.pagination-link.sc-aion-pay:focus, .pagination-next.sc-aion-pay:focus, .pagination-previous.sc-aion-pay:focus{border-color:#3273dc}.pagination-link.sc-aion-pay:active, .pagination-next.sc-aion-pay:active, .pagination-previous.sc-aion-pay:active{-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.2);box-shadow:inset 0 1px 2px rgba(0,0,0,.2)}.pagination-link[disabled].sc-aion-pay, .pagination-next[disabled].sc-aion-pay, .pagination-previous[disabled].sc-aion-pay{background-color:#dbdbdb;border-color:#dbdbdb;-webkit-box-shadow:none;box-shadow:none;color:#7a7a7a;opacity:.5}.pagination-next.sc-aion-pay, .pagination-previous.sc-aion-pay{padding-left:.75em;padding-right:.75em;white-space:nowrap}.pagination-link.is-current.sc-aion-pay{background-color:#3273dc;border-color:#3273dc;color:#fff}.pagination-ellipsis.sc-aion-pay{color:#b5b5b5;pointer-events:none}.pagination-list.sc-aion-pay{-ms-flex-wrap:wrap;flex-wrap:wrap}\@media screen and (max-width:768px){.pagination.sc-aion-pay{-ms-flex-wrap:wrap;flex-wrap:wrap}.pagination-list.sc-aion-pay   li.sc-aion-pay, .pagination-next.sc-aion-pay, .pagination-previous.sc-aion-pay{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:1;flex-shrink:1}}\@media screen and (min-width:769px),print{.pagination-list.sc-aion-pay{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:1;flex-shrink:1;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.pagination-previous.sc-aion-pay{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}.pagination-next.sc-aion-pay{-webkit-box-ordinal-group:4;-ms-flex-order:3;order:3}.pagination.sc-aion-pay{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.pagination.is-centered.sc-aion-pay   .pagination-previous.sc-aion-pay{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.pagination.is-centered.sc-aion-pay   .pagination-list.sc-aion-pay{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}.pagination.is-centered.sc-aion-pay   .pagination-next.sc-aion-pay{-webkit-box-ordinal-group:4;-ms-flex-order:3;order:3}.pagination.is-right.sc-aion-pay   .pagination-previous.sc-aion-pay{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.pagination.is-right.sc-aion-pay   .pagination-next.sc-aion-pay{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}.pagination.is-right.sc-aion-pay   .pagination-list.sc-aion-pay{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;-webkit-box-ordinal-group:4;-ms-flex-order:3;order:3}}.panel.sc-aion-pay{font-size:1rem}.panel.sc-aion-pay:not(:last-child){margin-bottom:1.5rem}.panel-block.sc-aion-pay, .panel-heading.sc-aion-pay, .panel-tabs.sc-aion-pay{border-bottom:1px solid #dbdbdb;border-left:1px solid #dbdbdb;border-right:1px solid #dbdbdb}.panel-block.sc-aion-pay:first-child, .panel-heading.sc-aion-pay:first-child, .panel-tabs.sc-aion-pay:first-child{border-top:1px solid #dbdbdb}.panel-heading.sc-aion-pay{background-color:#f5f5f5;border-radius:4px 4px 0 0;color:#363636;font-size:1.25em;font-weight:300;line-height:1.25;padding:.5em .75em}.panel-tabs.sc-aion-pay{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:.875em;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.panel-tabs.sc-aion-pay   a.sc-aion-pay{border-bottom:1px solid #dbdbdb;margin-bottom:-1px;padding:.5em}.panel-tabs.sc-aion-pay   a.is-active.sc-aion-pay{border-bottom-color:#4a4a4a;color:#363636}.panel-list.sc-aion-pay   a.sc-aion-pay{color:#4a4a4a}.panel-list.sc-aion-pay   a.sc-aion-pay:hover{color:#3273dc}.panel-block.sc-aion-pay{-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#363636;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;padding:.5em .75em}.panel-block.sc-aion-pay   input[type=checkbox].sc-aion-pay{margin-right:.75em}.panel-block.sc-aion-pay > .control.sc-aion-pay{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:1;flex-shrink:1;width:100%}.panel-block.is-wrapped.sc-aion-pay{-ms-flex-wrap:wrap;flex-wrap:wrap}.panel-block.is-active.sc-aion-pay{border-left-color:#3273dc;color:#363636}.panel-block.is-active.sc-aion-pay   .panel-icon.sc-aion-pay{color:#3273dc}a.panel-block.sc-aion-pay, label.panel-block.sc-aion-pay{cursor:pointer}a.panel-block.sc-aion-pay:hover, label.panel-block.sc-aion-pay:hover{background-color:#f5f5f5}.panel-icon.sc-aion-pay{display:inline-block;font-size:14px;height:1em;line-height:1em;text-align:center;vertical-align:top;width:1em;color:#7a7a7a;margin-right:.75em}.panel-icon.sc-aion-pay   .fa.sc-aion-pay{font-size:inherit;line-height:inherit}.tabs.sc-aion-pay{-webkit-overflow-scrolling:touch;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:1rem;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;overflow:hidden;overflow-x:auto;white-space:nowrap}.tabs.sc-aion-pay   a.sc-aion-pay{-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#4a4a4a;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-bottom:-1px;padding:.5em 1em;vertical-align:top;border-bottom:1px solid #dbdbdb}.tabs.sc-aion-pay   a.sc-aion-pay:hover{border-bottom-color:#363636;color:#363636}.tabs.sc-aion-pay   li.sc-aion-pay{display:block}.tabs.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay{border-bottom-color:#3273dc;color:#3273dc}.tabs.sc-aion-pay   ul.sc-aion-pay{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;border-bottom:1px solid #dbdbdb}.tabs.sc-aion-pay   ul.is-left.sc-aion-pay{padding-right:.75em}.tabs.sc-aion-pay   ul.is-center.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding-left:.75em;padding-right:.75em}.tabs.sc-aion-pay   ul.is-right.sc-aion-pay{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;padding-left:.75em}.tabs.sc-aion-pay   .icon.sc-aion-pay:first-child{margin-right:.5em}.tabs.sc-aion-pay   .icon.sc-aion-pay:last-child{margin-left:.5em}.tabs.is-centered.sc-aion-pay   ul.sc-aion-pay{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.tabs.is-right.sc-aion-pay   ul.sc-aion-pay{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.tabs.is-boxed.sc-aion-pay   a.sc-aion-pay{border:1px solid transparent;border-radius:4px 4px 0 0}.tabs.is-boxed.sc-aion-pay   a.sc-aion-pay:hover{background-color:#f5f5f5;border-bottom-color:#dbdbdb}.tabs.is-boxed.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay{background-color:#fff;border-color:#dbdbdb;border-bottom-color:transparent!important}.tabs.is-fullwidth.sc-aion-pay   li.sc-aion-pay{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0}.tabs.is-toggle.sc-aion-pay   a.sc-aion-pay{margin-bottom:0;position:relative;border:1px solid #dbdbdb}.tabs.is-toggle.sc-aion-pay   a.sc-aion-pay:hover{background-color:#f5f5f5;border-color:#b5b5b5;z-index:2}.tabs.is-toggle.sc-aion-pay   li.sc-aion-pay + li.sc-aion-pay{margin-left:-1px}.tabs.is-toggle.sc-aion-pay   li.sc-aion-pay:first-child   a.sc-aion-pay{border-radius:4px 0 0 4px}.tabs.is-toggle.sc-aion-pay   li.sc-aion-pay:last-child   a.sc-aion-pay{border-radius:0 4px 4px 0}.tabs.is-toggle.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay{background-color:#3273dc;border-color:#3273dc;color:#fff;z-index:1}.tabs.is-toggle.sc-aion-pay   ul.sc-aion-pay{border-bottom:none}.tabs.is-toggle.is-toggle-rounded.sc-aion-pay   li.sc-aion-pay:first-child   a.sc-aion-pay{border-bottom-left-radius:290486px;border-top-left-radius:290486px;padding-left:1.25em}.tabs.is-toggle.is-toggle-rounded.sc-aion-pay   li.sc-aion-pay:last-child   a.sc-aion-pay{border-bottom-right-radius:290486px;border-top-right-radius:290486px;padding-right:1.25em}.tabs.is-small.sc-aion-pay{font-size:.75rem}.tabs.is-medium.sc-aion-pay{font-size:1.25rem}.tabs.is-large.sc-aion-pay{font-size:1.5rem}.column.sc-aion-pay{display:block;-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:1;flex-shrink:1;padding:.75rem}.columns.is-mobile.sc-aion-pay > .column.is-narrow.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none}.columns.is-mobile.sc-aion-pay > .column.is-full.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:100%}.columns.is-mobile.sc-aion-pay > .column.is-three-quarters.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:75%}.columns.is-mobile.sc-aion-pay > .column.is-two-thirds.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:66.6666%}.columns.is-mobile.sc-aion-pay > .column.is-half.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:50%}.columns.is-mobile.sc-aion-pay > .column.is-one-third.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:33.3333%}.columns.is-mobile.sc-aion-pay > .column.is-one-quarter.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:25%}.columns.is-mobile.sc-aion-pay > .column.is-one-fifth.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:20%}.columns.is-mobile.sc-aion-pay > .column.is-two-fifths.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:40%}.columns.is-mobile.sc-aion-pay > .column.is-three-fifths.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:60%}.columns.is-mobile.sc-aion-pay > .column.is-four-fifths.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:80%}.columns.is-mobile.sc-aion-pay > .column.is-offset-three-quarters.sc-aion-pay{margin-left:75%}.columns.is-mobile.sc-aion-pay > .column.is-offset-two-thirds.sc-aion-pay{margin-left:66.6666%}.columns.is-mobile.sc-aion-pay > .column.is-offset-half.sc-aion-pay{margin-left:50%}.columns.is-mobile.sc-aion-pay > .column.is-offset-one-third.sc-aion-pay{margin-left:33.3333%}.columns.is-mobile.sc-aion-pay > .column.is-offset-one-quarter.sc-aion-pay{margin-left:25%}.columns.is-mobile.sc-aion-pay > .column.is-offset-one-fifth.sc-aion-pay{margin-left:20%}.columns.is-mobile.sc-aion-pay > .column.is-offset-two-fifths.sc-aion-pay{margin-left:40%}.columns.is-mobile.sc-aion-pay > .column.is-offset-three-fifths.sc-aion-pay{margin-left:60%}.columns.is-mobile.sc-aion-pay > .column.is-offset-four-fifths.sc-aion-pay{margin-left:80%}.columns.is-mobile.sc-aion-pay > .column.is-1.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:8.33333%}.columns.is-mobile.sc-aion-pay > .column.is-offset-1.sc-aion-pay{margin-left:8.33333%}.columns.is-mobile.sc-aion-pay > .column.is-2.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:16.66667%}.columns.is-mobile.sc-aion-pay > .column.is-offset-2.sc-aion-pay{margin-left:16.66667%}.columns.is-mobile.sc-aion-pay > .column.is-3.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:25%}.columns.is-mobile.sc-aion-pay > .column.is-offset-3.sc-aion-pay{margin-left:25%}.columns.is-mobile.sc-aion-pay > .column.is-4.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:33.33333%}.columns.is-mobile.sc-aion-pay > .column.is-offset-4.sc-aion-pay{margin-left:33.33333%}.columns.is-mobile.sc-aion-pay > .column.is-5.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:41.66667%}.columns.is-mobile.sc-aion-pay > .column.is-offset-5.sc-aion-pay{margin-left:41.66667%}.columns.is-mobile.sc-aion-pay > .column.is-6.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:50%}.columns.is-mobile.sc-aion-pay > .column.is-offset-6.sc-aion-pay{margin-left:50%}.columns.is-mobile.sc-aion-pay > .column.is-7.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:58.33333%}.columns.is-mobile.sc-aion-pay > .column.is-offset-7.sc-aion-pay{margin-left:58.33333%}.columns.is-mobile.sc-aion-pay > .column.is-8.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:66.66667%}.columns.is-mobile.sc-aion-pay > .column.is-offset-8.sc-aion-pay{margin-left:66.66667%}.columns.is-mobile.sc-aion-pay > .column.is-9.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:75%}.columns.is-mobile.sc-aion-pay > .column.is-offset-9.sc-aion-pay{margin-left:75%}.columns.is-mobile.sc-aion-pay > .column.is-10.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:83.33333%}.columns.is-mobile.sc-aion-pay > .column.is-offset-10.sc-aion-pay{margin-left:83.33333%}.columns.is-mobile.sc-aion-pay > .column.is-11.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:91.66667%}.columns.is-mobile.sc-aion-pay > .column.is-offset-11.sc-aion-pay{margin-left:91.66667%}.columns.is-mobile.sc-aion-pay > .column.is-12.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:100%}.columns.is-mobile.sc-aion-pay > .column.is-offset-12.sc-aion-pay{margin-left:100%}\@media screen and (max-width:768px){.column.is-narrow-mobile.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none}.column.is-full-mobile.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:100%}.column.is-three-quarters-mobile.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:75%}.column.is-two-thirds-mobile.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:66.6666%}.column.is-half-mobile.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:50%}.column.is-one-third-mobile.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:33.3333%}.column.is-one-quarter-mobile.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:25%}.column.is-one-fifth-mobile.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:20%}.column.is-two-fifths-mobile.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:40%}.column.is-three-fifths-mobile.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:60%}.column.is-four-fifths-mobile.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:80%}.column.is-offset-three-quarters-mobile.sc-aion-pay{margin-left:75%}.column.is-offset-two-thirds-mobile.sc-aion-pay{margin-left:66.6666%}.column.is-offset-half-mobile.sc-aion-pay{margin-left:50%}.column.is-offset-one-third-mobile.sc-aion-pay{margin-left:33.3333%}.column.is-offset-one-quarter-mobile.sc-aion-pay{margin-left:25%}.column.is-offset-one-fifth-mobile.sc-aion-pay{margin-left:20%}.column.is-offset-two-fifths-mobile.sc-aion-pay{margin-left:40%}.column.is-offset-three-fifths-mobile.sc-aion-pay{margin-left:60%}.column.is-offset-four-fifths-mobile.sc-aion-pay{margin-left:80%}.column.is-1-mobile.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:8.33333%}.column.is-offset-1-mobile.sc-aion-pay{margin-left:8.33333%}.column.is-2-mobile.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:16.66667%}.column.is-offset-2-mobile.sc-aion-pay{margin-left:16.66667%}.column.is-3-mobile.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:25%}.column.is-offset-3-mobile.sc-aion-pay{margin-left:25%}.column.is-4-mobile.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:33.33333%}.column.is-offset-4-mobile.sc-aion-pay{margin-left:33.33333%}.column.is-5-mobile.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:41.66667%}.column.is-offset-5-mobile.sc-aion-pay{margin-left:41.66667%}.column.is-6-mobile.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:50%}.column.is-offset-6-mobile.sc-aion-pay{margin-left:50%}.column.is-7-mobile.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:58.33333%}.column.is-offset-7-mobile.sc-aion-pay{margin-left:58.33333%}.column.is-8-mobile.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:66.66667%}.column.is-offset-8-mobile.sc-aion-pay{margin-left:66.66667%}.column.is-9-mobile.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:75%}.column.is-offset-9-mobile.sc-aion-pay{margin-left:75%}.column.is-10-mobile.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:83.33333%}.column.is-offset-10-mobile.sc-aion-pay{margin-left:83.33333%}.column.is-11-mobile.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:91.66667%}.column.is-offset-11-mobile.sc-aion-pay{margin-left:91.66667%}.column.is-12-mobile.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:100%}.column.is-offset-12-mobile.sc-aion-pay{margin-left:100%}.columns.is-variable.is-0-mobile.sc-aion-pay{--columnGap:0rem}}\@media screen and (min-width:769px),print{.column.is-narrow.sc-aion-pay, .column.is-narrow-tablet.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none}.column.is-full.sc-aion-pay, .column.is-full-tablet.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:100%}.column.is-three-quarters.sc-aion-pay, .column.is-three-quarters-tablet.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:75%}.column.is-two-thirds.sc-aion-pay, .column.is-two-thirds-tablet.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:66.6666%}.column.is-half.sc-aion-pay, .column.is-half-tablet.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:50%}.column.is-one-third.sc-aion-pay, .column.is-one-third-tablet.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:33.3333%}.column.is-one-quarter.sc-aion-pay, .column.is-one-quarter-tablet.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:25%}.column.is-one-fifth.sc-aion-pay, .column.is-one-fifth-tablet.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:20%}.column.is-two-fifths.sc-aion-pay, .column.is-two-fifths-tablet.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:40%}.column.is-three-fifths.sc-aion-pay, .column.is-three-fifths-tablet.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:60%}.column.is-four-fifths.sc-aion-pay, .column.is-four-fifths-tablet.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:80%}.column.is-offset-three-quarters.sc-aion-pay, .column.is-offset-three-quarters-tablet.sc-aion-pay{margin-left:75%}.column.is-offset-two-thirds.sc-aion-pay, .column.is-offset-two-thirds-tablet.sc-aion-pay{margin-left:66.6666%}.column.is-offset-half.sc-aion-pay, .column.is-offset-half-tablet.sc-aion-pay{margin-left:50%}.column.is-offset-one-third.sc-aion-pay, .column.is-offset-one-third-tablet.sc-aion-pay{margin-left:33.3333%}.column.is-offset-one-quarter.sc-aion-pay, .column.is-offset-one-quarter-tablet.sc-aion-pay{margin-left:25%}.column.is-offset-one-fifth.sc-aion-pay, .column.is-offset-one-fifth-tablet.sc-aion-pay{margin-left:20%}.column.is-offset-two-fifths.sc-aion-pay, .column.is-offset-two-fifths-tablet.sc-aion-pay{margin-left:40%}.column.is-offset-three-fifths.sc-aion-pay, .column.is-offset-three-fifths-tablet.sc-aion-pay{margin-left:60%}.column.is-offset-four-fifths.sc-aion-pay, .column.is-offset-four-fifths-tablet.sc-aion-pay{margin-left:80%}.column.is-1.sc-aion-pay, .column.is-1-tablet.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:8.33333%}.column.is-offset-1.sc-aion-pay, .column.is-offset-1-tablet.sc-aion-pay{margin-left:8.33333%}.column.is-2.sc-aion-pay, .column.is-2-tablet.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:16.66667%}.column.is-offset-2.sc-aion-pay, .column.is-offset-2-tablet.sc-aion-pay{margin-left:16.66667%}.column.is-3.sc-aion-pay, .column.is-3-tablet.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:25%}.column.is-offset-3.sc-aion-pay, .column.is-offset-3-tablet.sc-aion-pay{margin-left:25%}.column.is-4.sc-aion-pay, .column.is-4-tablet.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:33.33333%}.column.is-offset-4.sc-aion-pay, .column.is-offset-4-tablet.sc-aion-pay{margin-left:33.33333%}.column.is-5.sc-aion-pay, .column.is-5-tablet.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:41.66667%}.column.is-offset-5.sc-aion-pay, .column.is-offset-5-tablet.sc-aion-pay{margin-left:41.66667%}.column.is-6.sc-aion-pay, .column.is-6-tablet.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:50%}.column.is-offset-6.sc-aion-pay, .column.is-offset-6-tablet.sc-aion-pay{margin-left:50%}.column.is-7.sc-aion-pay, .column.is-7-tablet.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:58.33333%}.column.is-offset-7.sc-aion-pay, .column.is-offset-7-tablet.sc-aion-pay{margin-left:58.33333%}.column.is-8.sc-aion-pay, .column.is-8-tablet.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:66.66667%}.column.is-offset-8.sc-aion-pay, .column.is-offset-8-tablet.sc-aion-pay{margin-left:66.66667%}.column.is-9.sc-aion-pay, .column.is-9-tablet.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:75%}.column.is-offset-9.sc-aion-pay, .column.is-offset-9-tablet.sc-aion-pay{margin-left:75%}.column.is-10.sc-aion-pay, .column.is-10-tablet.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:83.33333%}.column.is-offset-10.sc-aion-pay, .column.is-offset-10-tablet.sc-aion-pay{margin-left:83.33333%}.column.is-11.sc-aion-pay, .column.is-11-tablet.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:91.66667%}.column.is-offset-11.sc-aion-pay, .column.is-offset-11-tablet.sc-aion-pay{margin-left:91.66667%}.column.is-12.sc-aion-pay, .column.is-12-tablet.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:100%}.column.is-offset-12.sc-aion-pay, .column.is-offset-12-tablet.sc-aion-pay{margin-left:100%}}\@media screen and (max-width:1087px){.column.is-narrow-touch.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none}.column.is-full-touch.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:100%}.column.is-three-quarters-touch.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:75%}.column.is-two-thirds-touch.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:66.6666%}.column.is-half-touch.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:50%}.column.is-one-third-touch.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:33.3333%}.column.is-one-quarter-touch.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:25%}.column.is-one-fifth-touch.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:20%}.column.is-two-fifths-touch.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:40%}.column.is-three-fifths-touch.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:60%}.column.is-four-fifths-touch.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:80%}.column.is-offset-three-quarters-touch.sc-aion-pay{margin-left:75%}.column.is-offset-two-thirds-touch.sc-aion-pay{margin-left:66.6666%}.column.is-offset-half-touch.sc-aion-pay{margin-left:50%}.column.is-offset-one-third-touch.sc-aion-pay{margin-left:33.3333%}.column.is-offset-one-quarter-touch.sc-aion-pay{margin-left:25%}.column.is-offset-one-fifth-touch.sc-aion-pay{margin-left:20%}.column.is-offset-two-fifths-touch.sc-aion-pay{margin-left:40%}.column.is-offset-three-fifths-touch.sc-aion-pay{margin-left:60%}.column.is-offset-four-fifths-touch.sc-aion-pay{margin-left:80%}.column.is-1-touch.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:8.33333%}.column.is-offset-1-touch.sc-aion-pay{margin-left:8.33333%}.column.is-2-touch.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:16.66667%}.column.is-offset-2-touch.sc-aion-pay{margin-left:16.66667%}.column.is-3-touch.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:25%}.column.is-offset-3-touch.sc-aion-pay{margin-left:25%}.column.is-4-touch.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:33.33333%}.column.is-offset-4-touch.sc-aion-pay{margin-left:33.33333%}.column.is-5-touch.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:41.66667%}.column.is-offset-5-touch.sc-aion-pay{margin-left:41.66667%}.column.is-6-touch.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:50%}.column.is-offset-6-touch.sc-aion-pay{margin-left:50%}.column.is-7-touch.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:58.33333%}.column.is-offset-7-touch.sc-aion-pay{margin-left:58.33333%}.column.is-8-touch.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:66.66667%}.column.is-offset-8-touch.sc-aion-pay{margin-left:66.66667%}.column.is-9-touch.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:75%}.column.is-offset-9-touch.sc-aion-pay{margin-left:75%}.column.is-10-touch.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:83.33333%}.column.is-offset-10-touch.sc-aion-pay{margin-left:83.33333%}.column.is-11-touch.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:91.66667%}.column.is-offset-11-touch.sc-aion-pay{margin-left:91.66667%}.column.is-12-touch.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:100%}.column.is-offset-12-touch.sc-aion-pay{margin-left:100%}.columns.is-variable.is-0-touch.sc-aion-pay{--columnGap:0rem}}\@media screen and (min-width:1088px){.column.is-narrow-desktop.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none}.column.is-full-desktop.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:100%}.column.is-three-quarters-desktop.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:75%}.column.is-two-thirds-desktop.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:66.6666%}.column.is-half-desktop.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:50%}.column.is-one-third-desktop.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:33.3333%}.column.is-one-quarter-desktop.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:25%}.column.is-one-fifth-desktop.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:20%}.column.is-two-fifths-desktop.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:40%}.column.is-three-fifths-desktop.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:60%}.column.is-four-fifths-desktop.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:80%}.column.is-offset-three-quarters-desktop.sc-aion-pay{margin-left:75%}.column.is-offset-two-thirds-desktop.sc-aion-pay{margin-left:66.6666%}.column.is-offset-half-desktop.sc-aion-pay{margin-left:50%}.column.is-offset-one-third-desktop.sc-aion-pay{margin-left:33.3333%}.column.is-offset-one-quarter-desktop.sc-aion-pay{margin-left:25%}.column.is-offset-one-fifth-desktop.sc-aion-pay{margin-left:20%}.column.is-offset-two-fifths-desktop.sc-aion-pay{margin-left:40%}.column.is-offset-three-fifths-desktop.sc-aion-pay{margin-left:60%}.column.is-offset-four-fifths-desktop.sc-aion-pay{margin-left:80%}.column.is-1-desktop.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:8.33333%}.column.is-offset-1-desktop.sc-aion-pay{margin-left:8.33333%}.column.is-2-desktop.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:16.66667%}.column.is-offset-2-desktop.sc-aion-pay{margin-left:16.66667%}.column.is-3-desktop.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:25%}.column.is-offset-3-desktop.sc-aion-pay{margin-left:25%}.column.is-4-desktop.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:33.33333%}.column.is-offset-4-desktop.sc-aion-pay{margin-left:33.33333%}.column.is-5-desktop.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:41.66667%}.column.is-offset-5-desktop.sc-aion-pay{margin-left:41.66667%}.column.is-6-desktop.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:50%}.column.is-offset-6-desktop.sc-aion-pay{margin-left:50%}.column.is-7-desktop.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:58.33333%}.column.is-offset-7-desktop.sc-aion-pay{margin-left:58.33333%}.column.is-8-desktop.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:66.66667%}.column.is-offset-8-desktop.sc-aion-pay{margin-left:66.66667%}.column.is-9-desktop.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:75%}.column.is-offset-9-desktop.sc-aion-pay{margin-left:75%}.column.is-10-desktop.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:83.33333%}.column.is-offset-10-desktop.sc-aion-pay{margin-left:83.33333%}.column.is-11-desktop.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:91.66667%}.column.is-offset-11-desktop.sc-aion-pay{margin-left:91.66667%}.column.is-12-desktop.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:100%}.column.is-offset-12-desktop.sc-aion-pay{margin-left:100%}}\@media screen and (min-width:1280px){.column.is-narrow-widescreen.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none}.column.is-full-widescreen.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:100%}.column.is-three-quarters-widescreen.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:75%}.column.is-two-thirds-widescreen.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:66.6666%}.column.is-half-widescreen.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:50%}.column.is-one-third-widescreen.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:33.3333%}.column.is-one-quarter-widescreen.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:25%}.column.is-one-fifth-widescreen.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:20%}.column.is-two-fifths-widescreen.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:40%}.column.is-three-fifths-widescreen.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:60%}.column.is-four-fifths-widescreen.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:80%}.column.is-offset-three-quarters-widescreen.sc-aion-pay{margin-left:75%}.column.is-offset-two-thirds-widescreen.sc-aion-pay{margin-left:66.6666%}.column.is-offset-half-widescreen.sc-aion-pay{margin-left:50%}.column.is-offset-one-third-widescreen.sc-aion-pay{margin-left:33.3333%}.column.is-offset-one-quarter-widescreen.sc-aion-pay{margin-left:25%}.column.is-offset-one-fifth-widescreen.sc-aion-pay{margin-left:20%}.column.is-offset-two-fifths-widescreen.sc-aion-pay{margin-left:40%}.column.is-offset-three-fifths-widescreen.sc-aion-pay{margin-left:60%}.column.is-offset-four-fifths-widescreen.sc-aion-pay{margin-left:80%}.column.is-1-widescreen.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:8.33333%}.column.is-offset-1-widescreen.sc-aion-pay{margin-left:8.33333%}.column.is-2-widescreen.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:16.66667%}.column.is-offset-2-widescreen.sc-aion-pay{margin-left:16.66667%}.column.is-3-widescreen.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:25%}.column.is-offset-3-widescreen.sc-aion-pay{margin-left:25%}.column.is-4-widescreen.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:33.33333%}.column.is-offset-4-widescreen.sc-aion-pay{margin-left:33.33333%}.column.is-5-widescreen.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:41.66667%}.column.is-offset-5-widescreen.sc-aion-pay{margin-left:41.66667%}.column.is-6-widescreen.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:50%}.column.is-offset-6-widescreen.sc-aion-pay{margin-left:50%}.column.is-7-widescreen.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:58.33333%}.column.is-offset-7-widescreen.sc-aion-pay{margin-left:58.33333%}.column.is-8-widescreen.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:66.66667%}.column.is-offset-8-widescreen.sc-aion-pay{margin-left:66.66667%}.column.is-9-widescreen.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:75%}.column.is-offset-9-widescreen.sc-aion-pay{margin-left:75%}.column.is-10-widescreen.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:83.33333%}.column.is-offset-10-widescreen.sc-aion-pay{margin-left:83.33333%}.column.is-11-widescreen.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:91.66667%}.column.is-offset-11-widescreen.sc-aion-pay{margin-left:91.66667%}.column.is-12-widescreen.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:100%}.column.is-offset-12-widescreen.sc-aion-pay{margin-left:100%}.columns.is-variable.is-0-widescreen.sc-aion-pay{--columnGap:0rem}}\@media screen and (min-width:1472px){.column.is-narrow-fullhd.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none}.column.is-full-fullhd.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:100%}.column.is-three-quarters-fullhd.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:75%}.column.is-two-thirds-fullhd.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:66.6666%}.column.is-half-fullhd.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:50%}.column.is-one-third-fullhd.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:33.3333%}.column.is-one-quarter-fullhd.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:25%}.column.is-one-fifth-fullhd.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:20%}.column.is-two-fifths-fullhd.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:40%}.column.is-three-fifths-fullhd.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:60%}.column.is-four-fifths-fullhd.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:80%}.column.is-offset-three-quarters-fullhd.sc-aion-pay{margin-left:75%}.column.is-offset-two-thirds-fullhd.sc-aion-pay{margin-left:66.6666%}.column.is-offset-half-fullhd.sc-aion-pay{margin-left:50%}.column.is-offset-one-third-fullhd.sc-aion-pay{margin-left:33.3333%}.column.is-offset-one-quarter-fullhd.sc-aion-pay{margin-left:25%}.column.is-offset-one-fifth-fullhd.sc-aion-pay{margin-left:20%}.column.is-offset-two-fifths-fullhd.sc-aion-pay{margin-left:40%}.column.is-offset-three-fifths-fullhd.sc-aion-pay{margin-left:60%}.column.is-offset-four-fifths-fullhd.sc-aion-pay{margin-left:80%}.column.is-1-fullhd.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:8.33333%}.column.is-offset-1-fullhd.sc-aion-pay{margin-left:8.33333%}.column.is-2-fullhd.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:16.66667%}.column.is-offset-2-fullhd.sc-aion-pay{margin-left:16.66667%}.column.is-3-fullhd.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:25%}.column.is-offset-3-fullhd.sc-aion-pay{margin-left:25%}.column.is-4-fullhd.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:33.33333%}.column.is-offset-4-fullhd.sc-aion-pay{margin-left:33.33333%}.column.is-5-fullhd.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:41.66667%}.column.is-offset-5-fullhd.sc-aion-pay{margin-left:41.66667%}.column.is-6-fullhd.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:50%}.column.is-offset-6-fullhd.sc-aion-pay{margin-left:50%}.column.is-7-fullhd.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:58.33333%}.column.is-offset-7-fullhd.sc-aion-pay{margin-left:58.33333%}.column.is-8-fullhd.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:66.66667%}.column.is-offset-8-fullhd.sc-aion-pay{margin-left:66.66667%}.column.is-9-fullhd.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:75%}.column.is-offset-9-fullhd.sc-aion-pay{margin-left:75%}.column.is-10-fullhd.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:83.33333%}.column.is-offset-10-fullhd.sc-aion-pay{margin-left:83.33333%}.column.is-11-fullhd.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:91.66667%}.column.is-offset-11-fullhd.sc-aion-pay{margin-left:91.66667%}.column.is-12-fullhd.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:100%}.column.is-offset-12-fullhd.sc-aion-pay{margin-left:100%}.columns.is-variable.is-0-fullhd.sc-aion-pay{--columnGap:0rem}}.columns.sc-aion-pay{margin-left:-.75rem;margin-right:-.75rem;margin-top:-.75rem}.columns.sc-aion-pay:last-child{margin-bottom:-.75rem}.columns.sc-aion-pay:not(:last-child){margin-bottom:calc(1.5rem - .75rem)}.columns.is-centered.sc-aion-pay{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.columns.is-gapless.sc-aion-pay{margin-left:0;margin-right:0;margin-top:0}.columns.is-gapless.sc-aion-pay > .column.sc-aion-pay{margin:0;padding:0!important}.columns.is-gapless.sc-aion-pay:not(:last-child){margin-bottom:1.5rem}.columns.is-gapless.sc-aion-pay:last-child{margin-bottom:0}.columns.is-mobile.sc-aion-pay{display:-webkit-box;display:-ms-flexbox;display:flex}.columns.is-multiline.sc-aion-pay{-ms-flex-wrap:wrap;flex-wrap:wrap}.columns.is-vcentered.sc-aion-pay{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.columns.is-variable.sc-aion-pay{--columnGap:0.75rem;margin-left:calc(-1 * var(--columnGap));margin-right:calc(-1 * var(--columnGap))}.columns.is-variable.sc-aion-pay   .column.sc-aion-pay{padding-left:var(--columnGap);padding-right:var(--columnGap)}.columns.is-variable.is-0.sc-aion-pay{--columnGap:0rem}.columns.is-variable.is-1.sc-aion-pay{--columnGap:0.25rem}.columns.is-variable.is-2.sc-aion-pay{--columnGap:0.5rem}.columns.is-variable.is-3.sc-aion-pay{--columnGap:0.75rem}.columns.is-variable.is-4.sc-aion-pay{--columnGap:1rem}.columns.is-variable.is-5.sc-aion-pay{--columnGap:1.25rem}.columns.is-variable.is-6.sc-aion-pay{--columnGap:1.5rem}.columns.is-variable.is-7.sc-aion-pay{--columnGap:1.75rem}.columns.is-variable.is-8.sc-aion-pay{--columnGap:2rem}\@media screen and (min-width:769px),print{.columns.sc-aion-pay:not(.is-desktop){display:-webkit-box;display:-ms-flexbox;display:flex}.columns.is-variable.is-0-tablet.sc-aion-pay{--columnGap:0rem}.columns.is-variable.is-1-tablet.sc-aion-pay{--columnGap:0.25rem}.columns.is-variable.is-2-tablet.sc-aion-pay{--columnGap:0.5rem}.columns.is-variable.is-3-tablet.sc-aion-pay{--columnGap:0.75rem}.columns.is-variable.is-4-tablet.sc-aion-pay{--columnGap:1rem}.columns.is-variable.is-5-tablet.sc-aion-pay{--columnGap:1.25rem}.columns.is-variable.is-6-tablet.sc-aion-pay{--columnGap:1.5rem}.columns.is-variable.is-7-tablet.sc-aion-pay{--columnGap:1.75rem}.columns.is-variable.is-8-tablet.sc-aion-pay{--columnGap:2rem}}\@media screen and (min-width:769px) and (max-width:1087px){.columns.is-variable.is-1-tablet-only.sc-aion-pay{--columnGap:0.25rem}.columns.is-variable.is-2-tablet-only.sc-aion-pay{--columnGap:0.5rem}.columns.is-variable.is-3-tablet-only.sc-aion-pay{--columnGap:0.75rem}.columns.is-variable.is-4-tablet-only.sc-aion-pay{--columnGap:1rem}.columns.is-variable.is-5-tablet-only.sc-aion-pay{--columnGap:1.25rem}.columns.is-variable.is-6-tablet-only.sc-aion-pay{--columnGap:1.5rem}.columns.is-variable.is-7-tablet-only.sc-aion-pay{--columnGap:1.75rem}.columns.is-variable.is-8-tablet-only.sc-aion-pay{--columnGap:2rem}}\@media screen and (min-width:1088px){.columns.is-desktop.sc-aion-pay{display:-webkit-box;display:-ms-flexbox;display:flex}.columns.is-variable.is-0-desktop.sc-aion-pay{--columnGap:0rem}.columns.is-variable.is-1-desktop.sc-aion-pay{--columnGap:0.25rem}.columns.is-variable.is-2-desktop.sc-aion-pay{--columnGap:0.5rem}.columns.is-variable.is-3-desktop.sc-aion-pay{--columnGap:0.75rem}.columns.is-variable.is-4-desktop.sc-aion-pay{--columnGap:1rem}.columns.is-variable.is-5-desktop.sc-aion-pay{--columnGap:1.25rem}.columns.is-variable.is-6-desktop.sc-aion-pay{--columnGap:1.5rem}.columns.is-variable.is-7-desktop.sc-aion-pay{--columnGap:1.75rem}.columns.is-variable.is-8-desktop.sc-aion-pay{--columnGap:2rem}}\@media screen and (min-width:1088px) and (max-width:1279px){.columns.is-variable.is-1-desktop-only.sc-aion-pay{--columnGap:0.25rem}.columns.is-variable.is-2-desktop-only.sc-aion-pay{--columnGap:0.5rem}.columns.is-variable.is-3-desktop-only.sc-aion-pay{--columnGap:0.75rem}.columns.is-variable.is-4-desktop-only.sc-aion-pay{--columnGap:1rem}.columns.is-variable.is-5-desktop-only.sc-aion-pay{--columnGap:1.25rem}.columns.is-variable.is-6-desktop-only.sc-aion-pay{--columnGap:1.5rem}.columns.is-variable.is-7-desktop-only.sc-aion-pay{--columnGap:1.75rem}.columns.is-variable.is-8-desktop-only.sc-aion-pay{--columnGap:2rem}}\@media screen and (min-width:1280px){.columns.is-variable.is-1-widescreen.sc-aion-pay{--columnGap:0.25rem}.columns.is-variable.is-2-widescreen.sc-aion-pay{--columnGap:0.5rem}.columns.is-variable.is-3-widescreen.sc-aion-pay{--columnGap:0.75rem}.columns.is-variable.is-4-widescreen.sc-aion-pay{--columnGap:1rem}.columns.is-variable.is-5-widescreen.sc-aion-pay{--columnGap:1.25rem}.columns.is-variable.is-6-widescreen.sc-aion-pay{--columnGap:1.5rem}.columns.is-variable.is-7-widescreen.sc-aion-pay{--columnGap:1.75rem}.columns.is-variable.is-8-widescreen.sc-aion-pay{--columnGap:2rem}}\@media screen and (min-width:1280px) and (max-width:1471px){.columns.is-variable.is-1-widescreen-only.sc-aion-pay{--columnGap:0.25rem}.columns.is-variable.is-2-widescreen-only.sc-aion-pay{--columnGap:0.5rem}.columns.is-variable.is-3-widescreen-only.sc-aion-pay{--columnGap:0.75rem}.columns.is-variable.is-4-widescreen-only.sc-aion-pay{--columnGap:1rem}.columns.is-variable.is-5-widescreen-only.sc-aion-pay{--columnGap:1.25rem}.columns.is-variable.is-6-widescreen-only.sc-aion-pay{--columnGap:1.5rem}.columns.is-variable.is-7-widescreen-only.sc-aion-pay{--columnGap:1.75rem}.columns.is-variable.is-8-widescreen-only.sc-aion-pay{--columnGap:2rem}}\@media screen and (min-width:1472px){.columns.is-variable.is-1-fullhd.sc-aion-pay{--columnGap:0.25rem}.columns.is-variable.is-2-fullhd.sc-aion-pay{--columnGap:0.5rem}.columns.is-variable.is-3-fullhd.sc-aion-pay{--columnGap:0.75rem}.columns.is-variable.is-4-fullhd.sc-aion-pay{--columnGap:1rem}.columns.is-variable.is-5-fullhd.sc-aion-pay{--columnGap:1.25rem}.columns.is-variable.is-6-fullhd.sc-aion-pay{--columnGap:1.5rem}.columns.is-variable.is-7-fullhd.sc-aion-pay{--columnGap:1.75rem}.columns.is-variable.is-8-fullhd.sc-aion-pay{--columnGap:2rem}}.tile.sc-aion-pay{-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;display:block;-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:1;flex-shrink:1;min-height:-webkit-min-content;min-height:-moz-min-content;min-height:min-content}.tile.is-ancestor.sc-aion-pay{margin-left:-.75rem;margin-right:-.75rem;margin-top:-.75rem}.tile.is-ancestor.sc-aion-pay:last-child{margin-bottom:-.75rem}.tile.is-ancestor.sc-aion-pay:not(:last-child){margin-bottom:.75rem}.tile.is-child.sc-aion-pay{margin:0!important}.tile.is-parent.sc-aion-pay{padding:.75rem}.tile.is-vertical.sc-aion-pay{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.tile.is-vertical.sc-aion-pay > .tile.is-child.sc-aion-pay:not(:last-child){margin-bottom:1.5rem!important}\@media screen and (min-width:769px),print{.tile.sc-aion-pay:not(.is-child){display:-webkit-box;display:-ms-flexbox;display:flex}.tile.is-1.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:8.33333%}.tile.is-2.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:16.66667%}.tile.is-3.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:25%}.tile.is-4.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:33.33333%}.tile.is-5.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:41.66667%}.tile.is-6.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:50%}.tile.is-7.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:58.33333%}.tile.is-8.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:66.66667%}.tile.is-9.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:75%}.tile.is-10.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:83.33333%}.tile.is-11.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:91.66667%}.tile.is-12.sc-aion-pay{-webkit-box-flex:0;-ms-flex:none;flex:none;width:100%}}.hero.sc-aion-pay{-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.hero.sc-aion-pay   .navbar.sc-aion-pay{background:0 0}.hero.sc-aion-pay   .tabs.sc-aion-pay   ul.sc-aion-pay{border-bottom:none}.hero.is-white.sc-aion-pay{background-color:#fff;color:#0a0a0a}.hero.is-white.sc-aion-pay   a.sc-aion-pay:not(.button):not(.dropdown-item):not(.tag), .hero.is-white.sc-aion-pay   strong.sc-aion-pay{color:inherit}.hero.is-white.sc-aion-pay   .title.sc-aion-pay{color:#0a0a0a}.hero.is-white.sc-aion-pay   .subtitle.sc-aion-pay{color:rgba(10,10,10,.9)}.hero.is-white.sc-aion-pay   .subtitle.sc-aion-pay   a.sc-aion-pay:not(.button), .hero.is-white.sc-aion-pay   .subtitle.sc-aion-pay   strong.sc-aion-pay{color:#0a0a0a}.hero.is-white.sc-aion-pay   .navbar-item.sc-aion-pay, .hero.is-white.sc-aion-pay   .navbar-link.sc-aion-pay{color:rgba(10,10,10,.7)}.hero.is-white.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .hero.is-white.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .hero.is-white.sc-aion-pay   a.navbar-item.is-active.sc-aion-pay, .hero.is-white.sc-aion-pay   a.navbar-item.sc-aion-pay:hover{background-color:#f2f2f2;color:#0a0a0a}.hero.is-white.sc-aion-pay   .tabs.sc-aion-pay   a.sc-aion-pay{color:#0a0a0a;opacity:.9}.hero.is-white.sc-aion-pay   .tabs.sc-aion-pay   a.sc-aion-pay:hover, .hero.is-white.sc-aion-pay   .tabs.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay{opacity:1}.hero.is-white.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   a.sc-aion-pay, .hero.is-white.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   a.sc-aion-pay{color:#0a0a0a}.hero.is-white.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   a.sc-aion-pay:hover, .hero.is-white.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   a.sc-aion-pay:hover{background-color:rgba(0,0,0,.1)}.hero.is-white.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay, .hero.is-white.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay:hover, .hero.is-white.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay, .hero.is-white.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay:hover{background-color:#0a0a0a;border-color:#0a0a0a;color:#fff}.hero.is-white.is-bold.sc-aion-pay{background-image:linear-gradient(141deg,#e6e6e6 0,#fff 71%,#fff 100%)}.hero.is-black.sc-aion-pay{background-color:#0a0a0a;color:#fff}.hero.is-black.sc-aion-pay   a.sc-aion-pay:not(.button):not(.dropdown-item):not(.tag), .hero.is-black.sc-aion-pay   strong.sc-aion-pay{color:inherit}.hero.is-black.sc-aion-pay   .title.sc-aion-pay{color:#fff}.hero.is-black.sc-aion-pay   .subtitle.sc-aion-pay{color:rgba(255,255,255,.9)}.hero.is-black.sc-aion-pay   .subtitle.sc-aion-pay   a.sc-aion-pay:not(.button), .hero.is-black.sc-aion-pay   .subtitle.sc-aion-pay   strong.sc-aion-pay{color:#fff}.hero.is-black.sc-aion-pay   .navbar-item.sc-aion-pay, .hero.is-black.sc-aion-pay   .navbar-link.sc-aion-pay{color:rgba(255,255,255,.7)}.hero.is-black.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .hero.is-black.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .hero.is-black.sc-aion-pay   a.navbar-item.is-active.sc-aion-pay, .hero.is-black.sc-aion-pay   a.navbar-item.sc-aion-pay:hover{background-color:#000;color:#fff}.hero.is-black.sc-aion-pay   .tabs.sc-aion-pay   a.sc-aion-pay{color:#fff;opacity:.9}.hero.is-black.sc-aion-pay   .tabs.sc-aion-pay   a.sc-aion-pay:hover, .hero.is-black.sc-aion-pay   .tabs.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay{opacity:1}.hero.is-black.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   a.sc-aion-pay, .hero.is-black.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   a.sc-aion-pay{color:#fff}.hero.is-black.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   a.sc-aion-pay:hover, .hero.is-black.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   a.sc-aion-pay:hover{background-color:rgba(0,0,0,.1)}.hero.is-black.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay, .hero.is-black.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay:hover, .hero.is-black.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay, .hero.is-black.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay:hover{background-color:#fff;border-color:#fff;color:#0a0a0a}.hero.is-black.is-bold.sc-aion-pay{background-image:linear-gradient(141deg,#000 0,#0a0a0a 71%,#181616 100%)}.hero.is-light.sc-aion-pay{background-color:#f5f5f5;color:#363636}.hero.is-light.sc-aion-pay   a.sc-aion-pay:not(.button):not(.dropdown-item):not(.tag), .hero.is-light.sc-aion-pay   strong.sc-aion-pay{color:inherit}.hero.is-light.sc-aion-pay   .title.sc-aion-pay{color:#363636}.hero.is-light.sc-aion-pay   .subtitle.sc-aion-pay{color:rgba(54,54,54,.9)}.hero.is-light.sc-aion-pay   .subtitle.sc-aion-pay   a.sc-aion-pay:not(.button), .hero.is-light.sc-aion-pay   .subtitle.sc-aion-pay   strong.sc-aion-pay{color:#363636}.hero.is-light.sc-aion-pay   .navbar-item.sc-aion-pay, .hero.is-light.sc-aion-pay   .navbar-link.sc-aion-pay{color:rgba(54,54,54,.7)}.hero.is-light.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .hero.is-light.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .hero.is-light.sc-aion-pay   a.navbar-item.is-active.sc-aion-pay, .hero.is-light.sc-aion-pay   a.navbar-item.sc-aion-pay:hover{background-color:#e8e8e8;color:#363636}.hero.is-light.sc-aion-pay   .tabs.sc-aion-pay   a.sc-aion-pay{color:#363636;opacity:.9}.hero.is-light.sc-aion-pay   .tabs.sc-aion-pay   a.sc-aion-pay:hover, .hero.is-light.sc-aion-pay   .tabs.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay{opacity:1}.hero.is-light.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   a.sc-aion-pay, .hero.is-light.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   a.sc-aion-pay{color:#363636}.hero.is-light.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   a.sc-aion-pay:hover, .hero.is-light.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   a.sc-aion-pay:hover{background-color:rgba(0,0,0,.1)}.hero.is-light.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay, .hero.is-light.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay:hover, .hero.is-light.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay, .hero.is-light.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay:hover{background-color:#363636;border-color:#363636;color:#f5f5f5}.hero.is-light.is-bold.sc-aion-pay{background-image:linear-gradient(141deg,#dfd8d9 0,#f5f5f5 71%,#fff 100%)}.hero.is-dark.sc-aion-pay{background-color:#363636;color:#f5f5f5}.hero.is-dark.sc-aion-pay   a.sc-aion-pay:not(.button):not(.dropdown-item):not(.tag), .hero.is-dark.sc-aion-pay   strong.sc-aion-pay{color:inherit}.hero.is-dark.sc-aion-pay   .title.sc-aion-pay{color:#f5f5f5}.hero.is-dark.sc-aion-pay   .subtitle.sc-aion-pay{color:rgba(245,245,245,.9)}.hero.is-dark.sc-aion-pay   .subtitle.sc-aion-pay   a.sc-aion-pay:not(.button), .hero.is-dark.sc-aion-pay   .subtitle.sc-aion-pay   strong.sc-aion-pay{color:#f5f5f5}.hero.is-dark.sc-aion-pay   .navbar-item.sc-aion-pay, .hero.is-dark.sc-aion-pay   .navbar-link.sc-aion-pay{color:rgba(245,245,245,.7)}.hero.is-dark.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .hero.is-dark.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .hero.is-dark.sc-aion-pay   a.navbar-item.is-active.sc-aion-pay, .hero.is-dark.sc-aion-pay   a.navbar-item.sc-aion-pay:hover{background-color:#292929;color:#f5f5f5}.hero.is-dark.sc-aion-pay   .tabs.sc-aion-pay   a.sc-aion-pay{color:#f5f5f5;opacity:.9}.hero.is-dark.sc-aion-pay   .tabs.sc-aion-pay   a.sc-aion-pay:hover, .hero.is-dark.sc-aion-pay   .tabs.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay{opacity:1}.hero.is-dark.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   a.sc-aion-pay, .hero.is-dark.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   a.sc-aion-pay{color:#f5f5f5}.hero.is-dark.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   a.sc-aion-pay:hover, .hero.is-dark.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   a.sc-aion-pay:hover{background-color:rgba(0,0,0,.1)}.hero.is-dark.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay, .hero.is-dark.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay:hover, .hero.is-dark.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay, .hero.is-dark.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay:hover{background-color:#f5f5f5;border-color:#f5f5f5;color:#363636}.hero.is-dark.is-bold.sc-aion-pay{background-image:linear-gradient(141deg,#1f191a 0,#363636 71%,#46403f 100%)}.hero.is-primary.sc-aion-pay{background-color:#00d1b2;color:#fff}.hero.is-primary.sc-aion-pay   a.sc-aion-pay:not(.button):not(.dropdown-item):not(.tag), .hero.is-primary.sc-aion-pay   strong.sc-aion-pay{color:inherit}.hero.is-primary.sc-aion-pay   .title.sc-aion-pay{color:#fff}.hero.is-primary.sc-aion-pay   .subtitle.sc-aion-pay{color:rgba(255,255,255,.9)}.hero.is-primary.sc-aion-pay   .subtitle.sc-aion-pay   a.sc-aion-pay:not(.button), .hero.is-primary.sc-aion-pay   .subtitle.sc-aion-pay   strong.sc-aion-pay{color:#fff}.hero.is-primary.sc-aion-pay   .navbar-item.sc-aion-pay, .hero.is-primary.sc-aion-pay   .navbar-link.sc-aion-pay{color:rgba(255,255,255,.7)}.hero.is-primary.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .hero.is-primary.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .hero.is-primary.sc-aion-pay   a.navbar-item.is-active.sc-aion-pay, .hero.is-primary.sc-aion-pay   a.navbar-item.sc-aion-pay:hover{background-color:#00b89c;color:#fff}.hero.is-primary.sc-aion-pay   .tabs.sc-aion-pay   a.sc-aion-pay{color:#fff;opacity:.9}.hero.is-primary.sc-aion-pay   .tabs.sc-aion-pay   a.sc-aion-pay:hover, .hero.is-primary.sc-aion-pay   .tabs.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay{opacity:1}.hero.is-primary.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   a.sc-aion-pay, .hero.is-primary.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   a.sc-aion-pay{color:#fff}.hero.is-primary.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   a.sc-aion-pay:hover, .hero.is-primary.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   a.sc-aion-pay:hover{background-color:rgba(0,0,0,.1)}.hero.is-primary.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay, .hero.is-primary.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay:hover, .hero.is-primary.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay, .hero.is-primary.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay:hover{background-color:#fff;border-color:#fff;color:#00d1b2}.hero.is-primary.is-bold.sc-aion-pay{background-image:linear-gradient(141deg,#009e6c 0,#00d1b2 71%,#00e7eb 100%)}.hero.is-link.sc-aion-pay{background-color:#3273dc;color:#fff}.hero.is-link.sc-aion-pay   a.sc-aion-pay:not(.button):not(.dropdown-item):not(.tag), .hero.is-link.sc-aion-pay   strong.sc-aion-pay{color:inherit}.hero.is-link.sc-aion-pay   .title.sc-aion-pay{color:#fff}.hero.is-link.sc-aion-pay   .subtitle.sc-aion-pay{color:rgba(255,255,255,.9)}.hero.is-link.sc-aion-pay   .subtitle.sc-aion-pay   a.sc-aion-pay:not(.button), .hero.is-link.sc-aion-pay   .subtitle.sc-aion-pay   strong.sc-aion-pay{color:#fff}.hero.is-link.sc-aion-pay   .navbar-item.sc-aion-pay, .hero.is-link.sc-aion-pay   .navbar-link.sc-aion-pay{color:rgba(255,255,255,.7)}.hero.is-link.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .hero.is-link.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .hero.is-link.sc-aion-pay   a.navbar-item.is-active.sc-aion-pay, .hero.is-link.sc-aion-pay   a.navbar-item.sc-aion-pay:hover{background-color:#2366d1;color:#fff}.hero.is-link.sc-aion-pay   .tabs.sc-aion-pay   a.sc-aion-pay{color:#fff;opacity:.9}.hero.is-link.sc-aion-pay   .tabs.sc-aion-pay   a.sc-aion-pay:hover, .hero.is-link.sc-aion-pay   .tabs.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay{opacity:1}.hero.is-link.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   a.sc-aion-pay, .hero.is-link.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   a.sc-aion-pay{color:#fff}.hero.is-link.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   a.sc-aion-pay:hover, .hero.is-link.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   a.sc-aion-pay:hover{background-color:rgba(0,0,0,.1)}.hero.is-link.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay, .hero.is-link.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay:hover, .hero.is-link.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay, .hero.is-link.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay:hover{background-color:#fff;border-color:#fff;color:#3273dc}.hero.is-link.is-bold.sc-aion-pay{background-image:linear-gradient(141deg,#1577c6 0,#3273dc 71%,#4366e5 100%)}.hero.is-info.sc-aion-pay{background-color:#209cee;color:#fff}.hero.is-info.sc-aion-pay   a.sc-aion-pay:not(.button):not(.dropdown-item):not(.tag), .hero.is-info.sc-aion-pay   strong.sc-aion-pay{color:inherit}.hero.is-info.sc-aion-pay   .title.sc-aion-pay{color:#fff}.hero.is-info.sc-aion-pay   .subtitle.sc-aion-pay{color:rgba(255,255,255,.9)}.hero.is-info.sc-aion-pay   .subtitle.sc-aion-pay   a.sc-aion-pay:not(.button), .hero.is-info.sc-aion-pay   .subtitle.sc-aion-pay   strong.sc-aion-pay{color:#fff}.hero.is-info.sc-aion-pay   .navbar-item.sc-aion-pay, .hero.is-info.sc-aion-pay   .navbar-link.sc-aion-pay{color:rgba(255,255,255,.7)}.hero.is-info.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .hero.is-info.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .hero.is-info.sc-aion-pay   a.navbar-item.is-active.sc-aion-pay, .hero.is-info.sc-aion-pay   a.navbar-item.sc-aion-pay:hover{background-color:#118fe4;color:#fff}.hero.is-info.sc-aion-pay   .tabs.sc-aion-pay   a.sc-aion-pay{color:#fff;opacity:.9}.hero.is-info.sc-aion-pay   .tabs.sc-aion-pay   a.sc-aion-pay:hover, .hero.is-info.sc-aion-pay   .tabs.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay{opacity:1}.hero.is-info.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   a.sc-aion-pay, .hero.is-info.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   a.sc-aion-pay{color:#fff}.hero.is-info.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   a.sc-aion-pay:hover, .hero.is-info.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   a.sc-aion-pay:hover{background-color:rgba(0,0,0,.1)}.hero.is-info.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay, .hero.is-info.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay:hover, .hero.is-info.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay, .hero.is-info.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay:hover{background-color:#fff;border-color:#fff;color:#209cee}.hero.is-info.is-bold.sc-aion-pay{background-image:linear-gradient(141deg,#04a6d7 0,#209cee 71%,#3287f5 100%)}.hero.is-success.sc-aion-pay{background-color:#23d160;color:#fff}.hero.is-success.sc-aion-pay   a.sc-aion-pay:not(.button):not(.dropdown-item):not(.tag), .hero.is-success.sc-aion-pay   strong.sc-aion-pay{color:inherit}.hero.is-success.sc-aion-pay   .title.sc-aion-pay{color:#fff}.hero.is-success.sc-aion-pay   .subtitle.sc-aion-pay{color:rgba(255,255,255,.9)}.hero.is-success.sc-aion-pay   .subtitle.sc-aion-pay   a.sc-aion-pay:not(.button), .hero.is-success.sc-aion-pay   .subtitle.sc-aion-pay   strong.sc-aion-pay{color:#fff}.hero.is-success.sc-aion-pay   .navbar-item.sc-aion-pay, .hero.is-success.sc-aion-pay   .navbar-link.sc-aion-pay{color:rgba(255,255,255,.7)}.hero.is-success.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .hero.is-success.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .hero.is-success.sc-aion-pay   a.navbar-item.is-active.sc-aion-pay, .hero.is-success.sc-aion-pay   a.navbar-item.sc-aion-pay:hover{background-color:#20bc56;color:#fff}.hero.is-success.sc-aion-pay   .tabs.sc-aion-pay   a.sc-aion-pay{color:#fff;opacity:.9}.hero.is-success.sc-aion-pay   .tabs.sc-aion-pay   a.sc-aion-pay:hover, .hero.is-success.sc-aion-pay   .tabs.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay{opacity:1}.hero.is-success.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   a.sc-aion-pay, .hero.is-success.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   a.sc-aion-pay{color:#fff}.hero.is-success.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   a.sc-aion-pay:hover, .hero.is-success.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   a.sc-aion-pay:hover{background-color:rgba(0,0,0,.1)}.hero.is-success.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay, .hero.is-success.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay:hover, .hero.is-success.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay, .hero.is-success.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay:hover{background-color:#fff;border-color:#fff;color:#23d160}.hero.is-success.is-bold.sc-aion-pay{background-image:linear-gradient(141deg,#12af2f 0,#23d160 71%,#2ce28a 100%)}.hero.is-warning.sc-aion-pay{background-color:#ffdd57;color:rgba(0,0,0,.7)}.hero.is-warning.sc-aion-pay   a.sc-aion-pay:not(.button):not(.dropdown-item):not(.tag), .hero.is-warning.sc-aion-pay   strong.sc-aion-pay{color:inherit}.hero.is-warning.sc-aion-pay   .title.sc-aion-pay{color:rgba(0,0,0,.7)}.hero.is-warning.sc-aion-pay   .subtitle.sc-aion-pay{color:rgba(0,0,0,.9)}.hero.is-warning.sc-aion-pay   .subtitle.sc-aion-pay   a.sc-aion-pay:not(.button), .hero.is-warning.sc-aion-pay   .subtitle.sc-aion-pay   strong.sc-aion-pay{color:rgba(0,0,0,.7)}.hero.is-warning.sc-aion-pay   .navbar-item.sc-aion-pay, .hero.is-warning.sc-aion-pay   .navbar-link.sc-aion-pay{color:rgba(0,0,0,.7)}.hero.is-warning.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .hero.is-warning.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .hero.is-warning.sc-aion-pay   a.navbar-item.is-active.sc-aion-pay, .hero.is-warning.sc-aion-pay   a.navbar-item.sc-aion-pay:hover{background-color:#ffd83d;color:rgba(0,0,0,.7)}.hero.is-warning.sc-aion-pay   .tabs.sc-aion-pay   a.sc-aion-pay{color:rgba(0,0,0,.7);opacity:.9}.hero.is-warning.sc-aion-pay   .tabs.sc-aion-pay   a.sc-aion-pay:hover, .hero.is-warning.sc-aion-pay   .tabs.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay{opacity:1}.hero.is-warning.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   a.sc-aion-pay, .hero.is-warning.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   a.sc-aion-pay{color:rgba(0,0,0,.7)}.hero.is-warning.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   a.sc-aion-pay:hover, .hero.is-warning.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   a.sc-aion-pay:hover{background-color:rgba(0,0,0,.1)}.hero.is-warning.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay, .hero.is-warning.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay:hover, .hero.is-warning.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay, .hero.is-warning.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay:hover{background-color:rgba(0,0,0,.7);border-color:rgba(0,0,0,.7);color:#ffdd57}.hero.is-warning.is-bold.sc-aion-pay{background-image:linear-gradient(141deg,#ffaf24 0,#ffdd57 71%,#fffa70 100%)}.hero.is-danger.sc-aion-pay{background-color:#ff3860;color:#fff}.hero.is-danger.sc-aion-pay   a.sc-aion-pay:not(.button):not(.dropdown-item):not(.tag), .hero.is-danger.sc-aion-pay   strong.sc-aion-pay{color:inherit}.hero.is-danger.sc-aion-pay   .title.sc-aion-pay{color:#fff}.hero.is-danger.sc-aion-pay   .subtitle.sc-aion-pay{color:rgba(255,255,255,.9)}.hero.is-danger.sc-aion-pay   .subtitle.sc-aion-pay   a.sc-aion-pay:not(.button), .hero.is-danger.sc-aion-pay   .subtitle.sc-aion-pay   strong.sc-aion-pay{color:#fff}\@media screen and (max-width:1087px){.columns.is-variable.is-1-touch.sc-aion-pay{--columnGap:0.25rem}.columns.is-variable.is-2-touch.sc-aion-pay{--columnGap:0.5rem}.columns.is-variable.is-3-touch.sc-aion-pay{--columnGap:0.75rem}.columns.is-variable.is-4-touch.sc-aion-pay{--columnGap:1rem}.columns.is-variable.is-5-touch.sc-aion-pay{--columnGap:1.25rem}.columns.is-variable.is-6-touch.sc-aion-pay{--columnGap:1.5rem}.columns.is-variable.is-7-touch.sc-aion-pay{--columnGap:1.75rem}.columns.is-variable.is-8-touch.sc-aion-pay{--columnGap:2rem}.hero.is-white.sc-aion-pay   .navbar-menu.sc-aion-pay{background-color:#fff}.hero.is-black.sc-aion-pay   .navbar-menu.sc-aion-pay{background-color:#0a0a0a}.hero.is-light.sc-aion-pay   .navbar-menu.sc-aion-pay{background-color:#f5f5f5}.hero.is-dark.sc-aion-pay   .navbar-menu.sc-aion-pay{background-color:#363636}.hero.is-primary.sc-aion-pay   .navbar-menu.sc-aion-pay{background-color:#00d1b2}.hero.is-link.sc-aion-pay   .navbar-menu.sc-aion-pay{background-color:#3273dc}.hero.is-info.sc-aion-pay   .navbar-menu.sc-aion-pay{background-color:#209cee}.hero.is-success.sc-aion-pay   .navbar-menu.sc-aion-pay{background-color:#23d160}.hero.is-warning.sc-aion-pay   .navbar-menu.sc-aion-pay{background-color:#ffdd57}.hero.is-danger.sc-aion-pay   .navbar-menu.sc-aion-pay{background-color:#ff3860}}.hero.is-danger.sc-aion-pay   .navbar-item.sc-aion-pay, .hero.is-danger.sc-aion-pay   .navbar-link.sc-aion-pay{color:rgba(255,255,255,.7)}.hero.is-danger.sc-aion-pay   .navbar-link.is-active.sc-aion-pay, .hero.is-danger.sc-aion-pay   .navbar-link.sc-aion-pay:hover, .hero.is-danger.sc-aion-pay   a.navbar-item.is-active.sc-aion-pay, .hero.is-danger.sc-aion-pay   a.navbar-item.sc-aion-pay:hover{background-color:#ff1f4b;color:#fff}.hero.is-danger.sc-aion-pay   .tabs.sc-aion-pay   a.sc-aion-pay{color:#fff;opacity:.9}.hero.is-danger.sc-aion-pay   .tabs.sc-aion-pay   a.sc-aion-pay:hover, .hero.is-danger.sc-aion-pay   .tabs.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay{opacity:1}.hero.is-danger.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   a.sc-aion-pay, .hero.is-danger.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   a.sc-aion-pay{color:#fff}.hero.is-danger.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   a.sc-aion-pay:hover, .hero.is-danger.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   a.sc-aion-pay:hover{background-color:rgba(0,0,0,.1)}.hero.is-danger.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay, .hero.is-danger.sc-aion-pay   .tabs.is-boxed.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay:hover, .hero.is-danger.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay, .hero.is-danger.sc-aion-pay   .tabs.is-toggle.sc-aion-pay   li.is-active.sc-aion-pay   a.sc-aion-pay:hover{background-color:#fff;border-color:#fff;color:#ff3860}.hero.is-danger.is-bold.sc-aion-pay{background-image:linear-gradient(141deg,#ff0561 0,#ff3860 71%,#ff5257 100%)}.hero.is-small.sc-aion-pay   .hero-body.sc-aion-pay{padding-bottom:1.5rem;padding-top:1.5rem}.hero.is-fullheight.sc-aion-pay   .hero-body.sc-aion-pay, .hero.is-fullheight-with-navbar.sc-aion-pay   .hero-body.sc-aion-pay, .hero.is-halfheight.sc-aion-pay   .hero-body.sc-aion-pay{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}.hero.is-fullheight.sc-aion-pay   .hero-body.sc-aion-pay > .container.sc-aion-pay, .hero.is-fullheight-with-navbar.sc-aion-pay   .hero-body.sc-aion-pay > .container.sc-aion-pay, .hero.is-halfheight.sc-aion-pay   .hero-body.sc-aion-pay > .container.sc-aion-pay{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:1;flex-shrink:1}.hero.is-halfheight.sc-aion-pay{min-height:50vh}.hero.is-fullheight.sc-aion-pay{min-height:100vh}.hero.is-fullheight-with-navbar.sc-aion-pay{min-height:calc(100vh - 3.25rem)}.hero-video.sc-aion-pay{overflow:hidden}.hero-video.sc-aion-pay   video.sc-aion-pay{left:50%;min-height:100%;min-width:100%;position:absolute;top:50%;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0)}.hero-video.is-transparent.sc-aion-pay{opacity:.3}.hero-buttons.sc-aion-pay{margin-top:1.5rem}\@media screen and (max-width:768px){.columns.is-variable.is-1-mobile.sc-aion-pay{--columnGap:0.25rem}.columns.is-variable.is-2-mobile.sc-aion-pay{--columnGap:0.5rem}.columns.is-variable.is-3-mobile.sc-aion-pay{--columnGap:0.75rem}.columns.is-variable.is-4-mobile.sc-aion-pay{--columnGap:1rem}.columns.is-variable.is-5-mobile.sc-aion-pay{--columnGap:1.25rem}.columns.is-variable.is-6-mobile.sc-aion-pay{--columnGap:1.5rem}.columns.is-variable.is-7-mobile.sc-aion-pay{--columnGap:1.75rem}.columns.is-variable.is-8-mobile.sc-aion-pay{--columnGap:2rem}.hero.is-white.is-bold.sc-aion-pay   .navbar-menu.sc-aion-pay{background-image:linear-gradient(141deg,#e6e6e6 0,#fff 71%,#fff 100%)}.hero.is-black.is-bold.sc-aion-pay   .navbar-menu.sc-aion-pay{background-image:linear-gradient(141deg,#000 0,#0a0a0a 71%,#181616 100%)}.hero.is-light.is-bold.sc-aion-pay   .navbar-menu.sc-aion-pay{background-image:linear-gradient(141deg,#dfd8d9 0,#f5f5f5 71%,#fff 100%)}.hero.is-dark.is-bold.sc-aion-pay   .navbar-menu.sc-aion-pay{background-image:linear-gradient(141deg,#1f191a 0,#363636 71%,#46403f 100%)}.hero.is-primary.is-bold.sc-aion-pay   .navbar-menu.sc-aion-pay{background-image:linear-gradient(141deg,#009e6c 0,#00d1b2 71%,#00e7eb 100%)}.hero.is-link.is-bold.sc-aion-pay   .navbar-menu.sc-aion-pay{background-image:linear-gradient(141deg,#1577c6 0,#3273dc 71%,#4366e5 100%)}.hero.is-info.is-bold.sc-aion-pay   .navbar-menu.sc-aion-pay{background-image:linear-gradient(141deg,#04a6d7 0,#209cee 71%,#3287f5 100%)}.hero.is-success.is-bold.sc-aion-pay   .navbar-menu.sc-aion-pay{background-image:linear-gradient(141deg,#12af2f 0,#23d160 71%,#2ce28a 100%)}.hero.is-warning.is-bold.sc-aion-pay   .navbar-menu.sc-aion-pay{background-image:linear-gradient(141deg,#ffaf24 0,#ffdd57 71%,#fffa70 100%)}.hero.is-danger.is-bold.sc-aion-pay   .navbar-menu.sc-aion-pay{background-image:linear-gradient(141deg,#ff0561 0,#ff3860 71%,#ff5257 100%)}.hero-video.sc-aion-pay{display:none}.hero-buttons.sc-aion-pay   .button.sc-aion-pay{display:-webkit-box;display:-ms-flexbox;display:flex}.hero-buttons.sc-aion-pay   .button.sc-aion-pay:not(:last-child){margin-bottom:.75rem}}\@media screen and (min-width:769px),print{.hero.is-medium.sc-aion-pay   .hero-body.sc-aion-pay{padding-bottom:9rem;padding-top:9rem}.hero.is-large.sc-aion-pay   .hero-body.sc-aion-pay{padding-bottom:18rem;padding-top:18rem}.hero-buttons.sc-aion-pay{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.hero-buttons.sc-aion-pay   .button.sc-aion-pay:not(:last-child){margin-right:1.5rem}}.hero-foot.sc-aion-pay, .hero-head.sc-aion-pay{-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0}.hero-body.sc-aion-pay{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;padding:3rem 1.5rem}.section.sc-aion-pay{padding:3rem 1.5rem}\@media screen and (min-width:1088px){.section.is-medium.sc-aion-pay{padding:9rem 1.5rem}.section.is-large.sc-aion-pay{padding:18rem 1.5rem}}.footer.sc-aion-pay{background-color:#fafafa;padding:3rem 1.5rem 6rem}.aion-pay.sc-aion-pay{font-family:BlinkMacSystemFont,-apple-system,\"Segoe UI\",Roboto,Oxygen,Ubuntu,Cantarell,\"Fira Sans\",\"Droid Sans\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-size:small}#pay.sc-aion-pay, button.sc-aion-pay{cursor:var(--pay-button-cursor,pointer)}.aion-image.sc-aion-pay{width:40px;height:40px}.aion-heading.sc-aion-pay{display:inline-block}.aion-heading.sc-aion-pay   h2.sc-aion-pay{float:right;text-align:center}.form.sc-aion-pay{padding-right:10px}.form.sc-aion-pay   .field.sc-aion-pay{margin-right:10px}.color-white.sc-aion-pay{color:#fff}.error-section.sc-aion-pay{padding-bottom:10px}.pay-button.sc-aion-pay{display:inline-block;text-align:center;background-color:var(--pay-button-color,#00d1b2)}.pay-button.sc-aion-pay   .img-valign.sc-aion-pay{vertical-align:middle;width:20px;height:20px}.pay-button.sc-aion-pay   .pay-button-text.sc-aion-pay{font-weight:var(--pay-button-font-weight,normal);font-style:var(--pay-button-font-style,normal);font-family:var(--pay-button-font-family, BlinkMacSystemFont, -apple-system, \"Segoe UI\", \"Roboto\", \"Oxygen\", \"Ubuntu\", \"Cantarell\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", \"Helvetica\", \"Arial\", sans-serif)}.aion-unlock.sc-aion-pay{display:inline}.error.sc-aion-pay{padding-left:20px;padding-right:20px}.scrolling-container.sc-aion-pay{height:400px}.from-balance.sc-aion-pay{font-weight:700;color:#304ffe}textarea.sc-aion-pay{min-height:inherit;height:auto!important}.spinner.sc-aion-pay, .spinner.sc-aion-pay:after, .spinner.sc-aion-pay:before{border-radius:50%;width:2.5em;height:2.5em;-webkit-animation:1.8s ease-in-out infinite load7;animation:1.8s ease-in-out infinite load7}.spinner.sc-aion-pay{color:#3057ff;font-size:10px;margin:80px auto;position:relative;text-indent:-9999em;-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0);-webkit-animation-delay:-.16s;animation-delay:-.16s}.spinner.sc-aion-pay:after, .spinner.sc-aion-pay:before{content:'';position:absolute;top:0}.spinner.sc-aion-pay:before{left:-3.5em;-webkit-animation-delay:-.32s;animation-delay:-.32s}.spinner.sc-aion-pay:after{left:3.5em}\@-webkit-keyframes load7{0%,100%,80%{-webkit-box-shadow:0 2.5em 0 -1.3em;box-shadow:0 2.5em 0 -1.3em}40%{-webkit-box-shadow:0 2.5em 0 0;box-shadow:0 2.5em 0 0}}\@keyframes load7{0%,100%,80%{-webkit-box-shadow:0 2.5em 0 -1.3em;box-shadow:0 2.5em 0 -1.3em}40%{-webkit-box-shadow:0 2.5em 0 0;box-shadow:0 2.5em 0 0}}"; }
}

export { AionPay };