<commit_before>"use strict";

class gsuiTrack extends HTMLElement {
	constructor() {
		const children = GSUI.getTemplate( "gsui-track" );

		super();
		this.rowElement = GSUI.getTemplate( "gsui-track-row" );
		this._children = children;
		this._inpName = children[ 1 ].firstChild;
		Object.seal( this );
	}

	// .........................................................................
	connectedCallback() {
		if ( !this.firstChild ) {
			this.classList.add( "gsui-mute" );
			this.append( ...this._children );
			this._children = null;
		}
	}
	static get observedAttributes() {
		return [ "toggle", "name", "order" ];
	}
	attributeChangedCallback( prop, prev, val ) {
		if ( prev !== val ) {
			switch ( prop ) {
				case "toggle":
					this.classList.toggle( "gsui-mute", val === null );
					this.rowElement.classList.toggle( "gsui-mute", val === null );
					break;
				case "name":
					this._inpName.value = val;
					break;
				case "order":
					this.dataset.order = val;
					this._inpName.placeholder = `track ${ +val + 1 }`;
					break;
			}
		}
	}
}

customElements.define( "gsui-track", gsuiTrack );<commit_msg>gsuiTrack: private fields<commit_after>"use strict";

class gsuiTrack extends HTMLElement {
	rowElement = GSUI.getTemplate( "gsui-track-row" )
	#children = GSUI.getTemplate( "gsui-track" )
	#inpName = this.#children[ 1 ].firstChild

	constructor() {
		super();
		Object.seal( this );
	}

	// .........................................................................
	connectedCallback() {
		if ( !this.firstChild ) {
			this.classList.add( "gsui-mute" );
			this.append( ...this.#children );
			this.#children = null;
		}
	}
	static get observedAttributes() {
		return [ "toggle", "name", "order" ];
	}
	attributeChangedCallback( prop, prev, val ) {
		if ( prev !== val ) {
			switch ( prop ) {
				case "toggle":
					this.classList.toggle( "gsui-mute", val === null );
					this.rowElement.classList.toggle( "gsui-mute", val === null );
					break;
				case "name":
					this.#inpName.value = val;
					break;
				case "order":
					this.dataset.order = val;
					this.#inpName.placeholder = `track ${ +val + 1 }`;
					break;
			}
		}
	}
}

Object.freeze( gsuiTrack );

customElements.define( "gsui-track", gsuiTrack );
{'fraction_non_alphanumeric': 0.22118380062305296, 'fraction_numerical': 0.0017801513128615932, 'mean_word_length': 2.3602391629297457, 'pattern_counts': {'":': 6, '<': 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': '732948', 'n_tokens_mistral': 877, 'n_tokens_neox': 769, 'n_words': 153}