<commit_before>
var ScanOverlay = cordova.require("com.mirasense.scanditsdk.plugin.ScanOverlay");
var ScanSettings = cordova.require("com.mirasense.scanditsdk.plugin.ScanSettings");
var ScanSession = cordova.require("com.mirasense.scanditsdk.plugin.ScanSession");
var MatrixScanSession = cordova.require("com.mirasense.scanditsdk.plugin.MatrixScanSession");
var Barcode = cordova.require("com.mirasense.scanditsdk.plugin.Barcode");
var RecognizedText = cordova.require("com.mirasense.scanditsdk.plugin.RecognizedText");
var Constraints = cordova.require("com.mirasense.scanditsdk.plugin.Constraints");

function BarcodePicker(scanSettings) {
	if (scanSettings instanceof ScanSettings) {
		this.scanSettings = scanSettings;
	} else {
		this.scanSettings = new ScanSettings();
	}

	// Keep the overlay private.
	var overlay = new ScanOverlay();
	this.getOverlayView = function() {
		return overlay;
	}

    this.isShown = false;
    
    this.executingCallback = false;
    this.pausedDuringCallback = false;
    this.stoppedDuringCallback = false;
    
	this.continuousMode = false;
	this.portraitMargins = null;
	this.landscapeMargins = null;
	this.orientations = [];
}

BarcodePicker.Orientation = {
	PORTRAIT: "portrait",
	PORTRAIT_UPSIDE_DOWN: "portraitUpsideDown",
	LANDSCAPE_RIGHT: "landscapeLeft",
	LANDSCAPE_LEFT: "landscapeRight"
}

BarcodePicker.State = {
    PAUSED : 1,
    STOPPED : 2,
    ACTIVE : 3
};

BarcodePicker.prototype.show = function () {
    var callbacks = {};<commit_msg>add torch mode enum<commit_after>
var ScanOverlay = cordova.require("com.mirasense.scanditsdk.plugin.ScanOverlay");
var ScanSettings = cordova.require("com.mirasense.scanditsdk.plugin.ScanSettings");
var ScanSession = cordova.require("com.mirasense.scanditsdk.plugin.ScanSession");
var MatrixScanSession = cordova.require("com.mirasense.scanditsdk.plugin.MatrixScanSession");
var Barcode = cordova.require("com.mirasense.scanditsdk.plugin.Barcode");
var RecognizedText = cordova.require("com.mirasense.scanditsdk.plugin.RecognizedText");
var Constraints = cordova.require("com.mirasense.scanditsdk.plugin.Constraints");

function BarcodePicker(scanSettings) {
	if (scanSettings instanceof ScanSettings) {
		this.scanSettings = scanSettings;
	} else {
		this.scanSettings = new ScanSettings();
	}

	// Keep the overlay private.
	var overlay = new ScanOverlay();
	this.getOverlayView = function() {
		return overlay;
	}

    this.isShown = false;
    
    this.executingCallback = false;
    this.pausedDuringCallback = false;
    this.stoppedDuringCallback = false;
    
	this.continuousMode = false;
	this.portraitMargins = null;
	this.landscapeMargins = null;
	this.orientations = [];
}

BarcodePicker.Orientation = {
	PORTRAIT: "portrait",
	PORTRAIT_UPSIDE_DOWN: "portraitUpsideDown",
	LANDSCAPE_RIGHT: "landscapeLeft",
	LANDSCAPE_LEFT: "landscapeRight"
}

BarcodePicker.State = {
    PAUSED : 1,
    STOPPED : 2,
    ACTIVE : 3
};

BarcodePicker.TorchMode = {
    NONE : 0,
    ON : 1,
    OFF : 2
};

BarcodePicker.prototype.show = function () {
    var callbacks = {};
{'fraction_non_alphanumeric': 0.11856677524429968, 'fraction_numerical': 0.0029315960912052116, 'mean_word_length': 4.89443378119002, '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': '1264821', 'n_tokens_mistral': 1076, 'n_tokens_neox': 1026, 'n_words': 172}