<commit_before>;(function (root) {
	'use strict';

	root.OTR = {}

	var imports = [
		'../lib/crypto-js/core.js',
		'../lib/crypto-js/enc-base64.js',
		'../lib/crypto-js/cipher-core.js',
		'../lib/crypto-js/x64-core.js',
		'../lib/crypto-js/aes.js',
		'../lib/crypto-js/sha1.js',
		'../lib/crypto-js/sha256.js',
		'../lib/crypto-js/sha512.js',
		'../lib/crypto-js/hmac.js',
		'../lib/crypto-js/pad-nopadding.js',
		'../lib/crypto-js/mode-ctr.js',
		'../lib/salsa20.js',
		'../etc/random.js',
		'../lib/bigint.js',
		'../lib/eventemitter.js',
		'../lib/otr.js'
	]

	var wrapPostMessage = function(method) {
		return function () {
			postMessage({
				method: method,
				args: Array.prototype.slice.call(arguments, 0)
			})
		}
	}

	var sm
	var onmessage = function(e) {
		var data = e.data
		switch (data.type) {
			case 'seed':
				importScripts.apply(root, imports)
				Cryptocat.random.setSeed(data.seed)
				break
			case 'init':
				sm = new root.OTR.SM(data.reqs)
				;['trust','question', 'send', 'abort'].forEach(function (m) {
					sm.on(m, wrapPostMessage(m));
				})
				break
			case 'method':<commit_msg>Fix broken smp<commit_after>;(function (root) {
	'use strict';

	root.OTR = {}

	var imports = [
		'../lib/crypto-js/core.js',
		'../lib/crypto-js/enc-base64.js',
		'../lib/crypto-js/cipher-core.js',
		'../lib/crypto-js/x64-core.js',
		'../lib/crypto-js/aes.js',
		'../lib/crypto-js/sha1.js',
		'../lib/crypto-js/sha256.js',
		'../lib/crypto-js/sha512.js',
		'../lib/crypto-js/hmac.js',
		'../lib/crypto-js/pad-nopadding.js',
		'../lib/crypto-js/mode-ctr.js',
		'../lib/salsa20.js',
		'../etc/random.js',
		'../lib/bigint.js',
		'../lib/eventemitter.js',
		'../lib/otr.js'
	]

	var wrapPostMessage = function(method) {
		return function () {
			postMessage({
				method: method,
				args: Array.prototype.slice.call(arguments, 0)
			})
		}
	}

	var sm
	onmessage = function(e) {
		var data = e.data
		switch (data.type) {
			case 'seed':
				importScripts.apply(root, imports)
				Cryptocat.random.setSeed(data.seed)
				break
			case 'init':
				sm = new root.OTR.SM(data.reqs)
				;['trust','question', 'send', 'abort'].forEach(function (m) {
					sm.on(m, wrapPostMessage(m));
				})
				break
			case 'method':
{'fraction_non_alphanumeric': 0.22949350067234425, 'fraction_numerical': 0.012550425818018825, 'mean_word_length': 2.554140127388535, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7218461', 'n_tokens_mistral': 1075, 'n_tokens_neox': 918, 'n_words': 128}