<commit_before>/* global document, fetch, navigator, MutationObserver */

import { DOMLocalization } from 'fluent-dom';
import negotiateLanguages from 'fluent-langneg';
import { MessageContext, CachedIterable } from 'fluent';

function documentReady() {
  const rs = document.readyState;
  if (rs === 'interactive' || rs === 'completed') {
    return Promise.resolve();
  }

  return new Promise(
    resolve => document.addEventListener(
      'readystatechange', resolve, { once: true }<commit_msg>Locally import CachedIterable since its not yet in a released fluent<commit_after>/* global document, fetch, navigator, MutationObserver */

import { DOMLocalization } from 'fluent-dom';
import negotiateLanguages from 'fluent-langneg';
import { MessageContext } from 'fluent';
import CachedIterable from '../../fluent/src/cached_iterable';

function documentReady() {
  const rs = document.readyState;
  if (rs === 'interactive' || rs === 'completed') {
    return Promise.resolve();
  }

  return new Promise(
    resolve => document.addEventListener(
      'readystatechange', resolve, { once: true }
{'fraction_non_alphanumeric': 0.12522686025408347, 'fraction_numerical': 0.0, 'mean_word_length': 4.685567010309279, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1169044', 'n_tokens_mistral': 311, 'n_tokens_neox': 303, 'n_words': 93}