<commit_before>(function(jQuery) {
"use strict";

var $ = jQuery;

if (Echo.AppServer.Dashboard.isDefined("Echo.Apps.Conversations.Dashboard")) return;

var dashboard = Echo.AppServer.Dashboard.manifest("Echo.Apps.Conversations.Dashboard");

dashboard.inherits = Echo.Utils.getComponent("Echo.AppServer.Dashboards.AppSettings");

dashboard.mappings = {
	"dependencies.appkey": {
		"key": "dependencies.StreamServer.appkey"
	},
	"dependencies.janrainapp": {
		"key": "dependencies.Janrain.appId"
	},
	"postComposer.confirmationMessage": {
		"key": "postComposer.confirmation.message"
	},
	"replyComposer.confirmationMessage": {
		"key": "replyComposer.confirmation.message"
	},
	"postComposer.contentTypes.comments.prompt": {
		"key": "postComposer.contentTypes.comments.labels.prompt"
	},
	"replyComposer.contentTypes.comments.prompt": {
		"key": "replyComposer.contentTypes.comments.labels.prompt"
	}
};

var sourcesValidator = function(value) {
	var availableSources = ["BOX", "COMPUTER", "DROPBOX", "EVERNOTE", "FACEBOOK", "FLICKR", "FTP", "GITHUB", "GOOGLE_DRIVE", "SKYDRIVE", "PICASA", "WEBDAV", "GMAIL", "IMAGE_SEARCH", "INSTAGRAM", "URL", "VIDEO", "WEBCAM"];
	var sources = $.map(value.split(","), function(source) { return source ? $.trim(source) : undefined; });
	var unknownSources = $.grep(sources, function(source) {
		return !~$.inArray(source, availableSources);
	});
	return unknownSources.length === 0
		? {"valid": true}
		: {
			"valid:": false,
			"message": "Unknown sources: " + unknownSources.join(", ")
		};
};

var plainTextValidator = function(value) {
	var same = value === Echo.Utils.sanitize(value, "plainText");
	return same
		? {"valid": true}
		: {
			"valid": false,
			"message": "Only plain text is allowed"
		};
};

dashboard.vars = {
	"baseStreamECL": [{
		"component": "Checkbox",
		"name": "visible",
		"type": "boolean",
		"default": true,
		"config": {
			"title": "Visible",
			"desc": "If enabled, the {data:title} stream is displayed"
		}
	}, {
		"component": "Input",
		"name": "label",
		"type": "string",
		"default": "{data:title}",
		"config": {
			"title": "Label",
			"desc": "Specifies a label to display above the {data:title} stream"
		}
	}, {
		"component": "Textarea",
		"name": "queryOverride",
		"type": "string",
		"config": {
			"title": "Query Override",
			"desc": "Specifies an Echo StreamServer Search Query to replace the the Query generated by the App for {data:title}. Typically used by advanced users/developers at run-time",
			"data": {"sample": "childrenof:{config:targetURL} type:comment state:Untouched,ModeratorApproved children:2"}<commit_msg>Enclose targetURL in quotes in queryOverride sample<commit_after>(function(jQuery) {
"use strict";

var $ = jQuery;

if (Echo.AppServer.Dashboard.isDefined("Echo.Apps.Conversations.Dashboard")) return;

var dashboard = Echo.AppServer.Dashboard.manifest("Echo.Apps.Conversations.Dashboard");

dashboard.inherits = Echo.Utils.getComponent("Echo.AppServer.Dashboards.AppSettings");

dashboard.mappings = {
	"dependencies.appkey": {
		"key": "dependencies.StreamServer.appkey"
	},
	"dependencies.janrainapp": {
		"key": "dependencies.Janrain.appId"
	},
	"postComposer.confirmationMessage": {
		"key": "postComposer.confirmation.message"
	},
	"replyComposer.confirmationMessage": {
		"key": "replyComposer.confirmation.message"
	},
	"postComposer.contentTypes.comments.prompt": {
		"key": "postComposer.contentTypes.comments.labels.prompt"
	},
	"replyComposer.contentTypes.comments.prompt": {
		"key": "replyComposer.contentTypes.comments.labels.prompt"
	}
};

var sourcesValidator = function(value) {
	var availableSources = ["BOX", "COMPUTER", "DROPBOX", "EVERNOTE", "FACEBOOK", "FLICKR", "FTP", "GITHUB", "GOOGLE_DRIVE", "SKYDRIVE", "PICASA", "WEBDAV", "GMAIL", "IMAGE_SEARCH", "INSTAGRAM", "URL", "VIDEO", "WEBCAM"];
	var sources = $.map(value.split(","), function(source) { return source ? $.trim(source) : undefined; });
	var unknownSources = $.grep(sources, function(source) {
		return !~$.inArray(source, availableSources);
	});
	return unknownSources.length === 0
		? {"valid": true}
		: {
			"valid:": false,
			"message": "Unknown sources: " + unknownSources.join(", ")
		};
};

var plainTextValidator = function(value) {
	var same = value === Echo.Utils.sanitize(value, "plainText");
	return same
		? {"valid": true}
		: {
			"valid": false,
			"message": "Only plain text is allowed"
		};
};

dashboard.vars = {
	"baseStreamECL": [{
		"component": "Checkbox",
		"name": "visible",
		"type": "boolean",
		"default": true,
		"config": {
			"title": "Visible",
			"desc": "If enabled, the {data:title} stream is displayed"
		}
	}, {
		"component": "Input",
		"name": "label",
		"type": "string",
		"default": "{data:title}",
		"config": {
			"title": "Label",
			"desc": "Specifies a label to display above the {data:title} stream"
		}
	}, {
		"component": "Textarea",
		"name": "queryOverride",
		"type": "string",
		"config": {
			"title": "Query Override",
			"desc": "Specifies an Echo StreamServer Search Query to replace the the Query generated by the App for {data:title}. Typically used by advanced users/developers at run-time",
			"data": {"sample": "childrenof:'{config:targetURL}' type:comment state:Untouched,ModeratorApproved children:2"}
{'fraction_non_alphanumeric': 0.18278346605991658, 'fraction_numerical': 0.0007584376185058779, 'mean_word_length': 5.184056271981243, 'pattern_counts': {'":': 82, '<': 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': '4179144', 'n_tokens_mistral': 1925, 'n_tokens_neox': 1800, 'n_words': 373}