<commit_before>import React from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import styles from './img.module.scss';

if (typeof window !== 'undefined') {
  require('lazysizes/plugins/rias/ls.rias.min');
  require('lazysizes/lazysizes.min');
}

const strParams = '?fit=max&auto=format&ch=Width,DPR&w={width}';

const imgixSrcStr = src => `https://policygenius-images.imgix.net/${src}${strParams}`;

const imgixSrcset = src => `
  https://policygenius-images.imgix.net/${src}${strParams}&dpr=1 1x,
  https://policygenius-images.imgix.net/${src}${strParams}&dpr=2 2x,
  https://policygenius-images.imgix.net/${src}${strParams}&dpr=3 3x,<commit_msg>Add preloader to Img component<commit_after>import React from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import styles from './img.module.scss';

if (typeof window !== 'undefined') {
  window.lazySizesConfig = window.lazySizesConfig || {};
  window.lazySizesConfig.preloadAfterLoad = true;

  require('lazysizes/plugins/rias/ls.rias.min');
  require('lazysizes/lazysizes.min');
}

const strParams = '?fit=max&auto=format&ch=Width,DPR&w={width}';

const imgixSrcStr = src => `https://policygenius-images.imgix.net/${src}${strParams}`;

const imgixSrcset = src => `
  https://policygenius-images.imgix.net/${src}${strParams}&dpr=1 1x,
  https://policygenius-images.imgix.net/${src}${strParams}&dpr=2 2x,
  https://policygenius-images.imgix.net/${src}${strParams}&dpr=3 3x,
{'fraction_non_alphanumeric': 0.18686526743398782, 'fraction_numerical': 0.008124576844955992, 'mean_word_length': 5.906542056074766, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 8, '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': '3705961', 'n_tokens_mistral': 537, 'n_tokens_neox': 544, 'n_words': 83}