'use strict';

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

require('../../../../../../../../_virtual/_commonjsHelpers.js');
var checksums = require('../../../../../../../../_virtual/checksums2.js');

"use strict";

Object.defineProperty(checksums.__exports, "__esModule", {
	value: true
});
var mod10_1 = checksums.__exports.mod10 = mod10;
var mod11_1 = checksums.__exports.mod11 = mod11;
function mod10(number) {
	var sum = 0;
	for (var i = 0; i < number.length; i++) {
		var n = parseInt(number[i]);
		if ((i + number.length) % 2 === 0) {
			sum += n;
		} else {
			sum += n * 2 % 10 + Math.floor(n * 2 / 10);
		}
	}
	return (10 - sum % 10) % 10;
}

function mod11(number) {
	var sum = 0;
	var weights = [2, 3, 4, 5, 6, 7];
	for (var i = 0; i < number.length; i++) {
		var n = parseInt(number[number.length - 1 - i]);
		sum += weights[i % weights.length] * n;
	}
	return (11 - sum % 11) % 11;
}

exports.default = checksums.__exports;
exports.mod10 = mod10_1;
exports.mod11 = mod11_1;
//# sourceMappingURL=checksums.js.map
