<commit_before>/**
 * @license
 * Copyright (c) 2019 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */

import {
  LitElement,
  html,
  customElement,
  css,
  property,
  internalProperty,
  query,
  PropertyValues,
} from 'lit-element';
import '@material/mwc-tab-bar';
import {TabBar} from '@material/mwc-tab-bar';
import '@material/mwc-tab';
import {SampleFile} from '../shared/worker-api.js';
import {CodeSampleProjectElement} from './code-sample-project';
import './codemirror-editor.js';
import {CodeMirrorEditorElement} from './codemirror-editor.js';
import {nothing} from 'lit-html';

// Hack to workaround Safari crashing and reloading the entire browser tab
// whenever an <mwc-tab> is clicked to switch files, because of a bug relating
// to delegatesFocus and shadow roots.
//
// https://bugs.webkit.org/show_bug.cgi?id=215732
// https://github.com/material-components/material-components-web-components/issues/1720
import {Tab} from '@material/mwc-tab';
((Tab.prototype as unknown) as {
  createRenderRoot: Tab['createRenderRoot'];
  attachShadow: Tab['attachShadow'];
}).createRenderRoot = function () {
  return this.attachShadow({mode: 'open', delegatesFocus: false});
};

/**
 * A text editor associated with a <code-sample-project>.
 */<commit_msg>Show add file button (though it still doesn't work)<commit_after>/**
 * @license
 * Copyright (c) 2019 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */

import {
  LitElement,
  html,
  customElement,
  css,
  property,
  internalProperty,
  query,
  PropertyValues,
} from 'lit-element';
import '@material/mwc-tab-bar';
import {TabBar} from '@material/mwc-tab-bar';
import '@material/mwc-tab';
import {SampleFile} from '../shared/worker-api.js';
import {CodeSampleProjectElement} from './code-sample-project';
import './codemirror-editor.js';
import {CodeMirrorEditorElement} from './codemirror-editor.js';
import {nothing} from 'lit-html';
import '@material/mwc-icon-button';

// Hack to workaround Safari crashing and reloading the entire browser tab
// whenever an <mwc-tab> is clicked to switch files, because of a bug relating
// to delegatesFocus and shadow roots.
//
// https://bugs.webkit.org/show_bug.cgi?id=215732
// https://github.com/material-components/material-components-web-components/issues/1720
import {Tab} from '@material/mwc-tab';
((Tab.prototype as unknown) as {
  createRenderRoot: Tab['createRenderRoot'];
  attachShadow: Tab['attachShadow'];
}).createRenderRoot = function () {
  return this.attachShadow({mode: 'open', delegatesFocus: false});
};

/**
 * A text editor associated with a <code-sample-project>.
 */
{'fraction_non_alphanumeric': 0.13003975014196478, 'fraction_numerical': 0.007950028392958546, 'mean_word_length': 4.305722891566265, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 4, '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': '5691787', 'n_tokens_mistral': 1077, 'n_tokens_neox': 1016, 'n_words': 334}