<commit_before>
import { choose, get, id, isDefined, nothing, noop, overload, set, toType, Observable as ObservableStream } from '../../fn/fn.js';
import { attribute, classes, tag } from '../../dom/dom.js';
import { default as Struct, ReadableStruct } from './struct.js';
import { cue, uncue } from './frame.js';

const DEBUG      = false;

const A          = Array.prototype;
const assign     = Object.assign;
const observe    = window.Observable.observe;

// Matches tags plus any directly adjacent text
//var rclasstagstemplate = /[^\s]*{{0}}[^\}]+{{1}}[^\s]*/g;
//var rclasstags;

// Matches filter string, capturing (filter name, filter parameter string)
//var rfilter = /\s*([a-zA-Z0-9_\-]+)\s*(?::(.+))?/;

// Matches anything with a space
const rspaces = /\s+/;

// Matches empty or spaces-only string
const rempty  = /^\s*$/;

// Matches anything that contains a non-space character
const rtext = /\S/;

// Matches the arguments list in the result of a fn.toString()
const rarguments = /function(?:\s+\w+)?\s*(\([\w,\s]*\))/;

const settings = {
	attributePrefix: 'sparky-',
	mount:           noop,
	parse:           noop,
	transforms:      {},
	transformers:    {},
	rtoken:          /(\{\[)\s*(.*?)(?:\s*(\|.*?))?\s*(\]\})/g
};

const bindings = {
	// All
	default:  { booleans:   ['hidden'], attributes: ['id', 'title', 'style'] },

	// HTML
	a:        { attributes: ['href'] },
	button:   { booleans:   ['disabled'] },
	form:     { attributes: ['method', 'action'] },
	fieldset: { booleans:   ['disabled'] },
	img:      { attributes: ['alt']	},
	input:    {
		booleans:   ['disabled', 'required'],
		attributes: ['name'],
		types: {
			button:   { attributes: ['value'] },
			checkbox: { booleans:   ['checked'], value: 'checkbox' },
			date:     { attributes: ['min', 'max', 'step'], value: 'string' },
			hidden:   { attributes: ['value'] },
			image:    { attributes: ['src'] },
			number:   { attributes: ['min', 'max', 'step'], value: 'number' },
			radio:    { booleans:   ['checked'], value: 'radio' },
			range:    { attributes: ['min', 'max', 'step'], value: 'number' },
			reset:    { attributes: ['value'] },
			submit:   { attributes: ['value'] },
			time:     { attributes: ['min', 'max', 'step'], value: 'string' },
			default:  { value: 'string' }
		}
	},
	label:    { attributes: ['for'] },
	meta:     { attributes: ['content'] },
	meter:    { attributes: ['min', 'max', 'low', 'high', 'value'] },
	option:   { booleans:   ['disabled'], attributes: ['value'] },
	output:   { attributes: ['for'] },
	progress: { attributes: ['max', 'value'] },
	select:   { booleans:   ['disabled', 'required'], attributes: ['name'], value: 'string' },
	textarea: { booleans:   ['disabled', 'required'], attributes: ['name'], value: 'string' },
	time:     { attributes: ['datetime'] },<commit_msg>Adds empty default arrays to mount settings<commit_after>
import { choose, get, id, isDefined, nothing, noop, overload, set, toType, Observable as ObservableStream } from '../../fn/fn.js';
import { attribute, classes, tag } from '../../dom/dom.js';
import { default as Struct, ReadableStruct } from './struct.js';
import { cue, uncue } from './frame.js';

const DEBUG      = false;

const A          = Array.prototype;
const assign     = Object.assign;
const observe    = window.Observable.observe;

// Matches tags plus any directly adjacent text
//var rclasstagstemplate = /[^\s]*{{0}}[^\}]+{{1}}[^\s]*/g;
//var rclasstags;

// Matches filter string, capturing (filter name, filter parameter string)
//var rfilter = /\s*([a-zA-Z0-9_\-]+)\s*(?::(.+))?/;

// Matches anything with a space
const rspaces = /\s+/;

// Matches empty or spaces-only string
const rempty  = /^\s*$/;

// Matches anything that contains a non-space character
const rtext = /\S/;

// Matches the arguments list in the result of a fn.toString()
const rarguments = /function(?:\s+\w+)?\s*(\([\w,\s]*\))/;

const settings = {
	attributePrefix: 'sparky-',
	mount:           noop,
	parse:           noop,
	transforms:      {},
	transformers:    {},
	rtoken:          /(\{\[)\s*(.*?)(?:\s*(\|.*?))?\s*(\]\})/g
};

const bindings = {
	// All
	default:  { booleans:   ['hidden'], attributes: ['id', 'title', 'style'] },

	// HTML
	a:        { attributes: ['href'] },
	button:   { booleans:   ['disabled'] },
	form:     { attributes: ['method', 'action'] },
	fieldset: { booleans:   ['disabled'] },
	img:      { attributes: ['alt']	},
	input:    {
		booleans:   ['disabled', 'required'],
		attributes: ['name'],
		types: {
			button:   { attributes: ['value'] },
			checkbox: { attributes: [], booleans: ['checked'], value: 'checkbox' },
			date:     { attributes: ['min', 'max', 'step'], value: 'string' },
			hidden:   { attributes: ['value'] },
			image:    { attributes: ['src'] },
			number:   { attributes: ['min', 'max', 'step'], value: 'number' },
			radio:    { attributes: [], booleans: ['checked'], value: 'radio' },
			range:    { attributes: ['min', 'max', 'step'], value: 'number' },
			reset:    { attributes: ['value'] },
			submit:   { attributes: ['value'] },
			time:     { attributes: ['min', 'max', 'step'], value: 'string' },
			default:  { value: 'string' }
		}
	},
	label:    { attributes: ['for'] },
	meta:     { attributes: ['content'] },
	meter:    { attributes: ['min', 'max', 'low', 'high', 'value'] },
	option:   { attributes: ['value'], booleans: ['disabled'] },
	output:   { attributes: ['for'] },
	progress: { attributes: ['max', 'value'] },
	select:   { attributes: ['name'], booleans: ['disabled', 'required'], value: 'string' },
	textarea: { attributes: ['name'], booleans: ['disabled', 'required'], value: 'string' },
	time:     { attributes: ['datetime'] },
{'fraction_non_alphanumeric': 0.22618207480592803, 'fraction_numerical': 0.0014114326040931546, 'mean_word_length': 3.227442207307979, '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': '285398', 'n_tokens_mistral': 1971, 'n_tokens_neox': 1872, 'n_words': 518}