hunk.code_window: // Returns the width, height and offsets of the provided element relative to the
   // offsetParent
   export default (
     element: Element | VirtualElement,
     isFixed: boolean = false
   ): Rect => {
  
hunk.labels: keep keep keep keep keep replace keep
hunk.after_edit:   isFixed: boolean = false,
     // For the popper and arrow, we need to use their layout measurements before
     // any transforms. For the reference, we need to use composite measurements
     // after any transforms
     isLayout: boolean = true
  
hunk.file_path: src/dom-utils/getRectRelativeToOffsetParent.js
hunk.type: replace
file: import babel from 'rollup-plugin-babel';
  import replace from 'rollup-plugin-replace';
  import bundleSize from 'rollup-plugin-bundle-size';
  import { terser } from 'rollup-plugin-terser';
  import visualizer from 'rollup-plugin-visualizer';
  import license from 'rollup-plugin-license';
  import flowEntry from 'rollup-plugin-flow-entry';
  import compiler from '@ampproject/rollup-plugin-closure-compiler';
  import pkg from '../package.json';
  
  const getFileName = input => input.split('/')[1].split('.')[0];
  
  const inputs = ['src/popper.js', 'src/popper-lite.js', 'src/popper-base.js'];
  const bundles = [
    { inputs, format: 'umd', dir: 'dist', minify: true, flow: true },
    { inputs, format: 'umd', dir: 'dist', flow: true },
    { inputs, format: 'cjs', dir: 'dist' },
  ];
  
  const configs = bundles
    .map(({ inputs, dir, format, minify, flow }) =>
      inputs.map(input => ({
        input,
        plugins: [
          replace({
            __DEV__: minify ? 'false' : 'true',
          }),
          babel(),
          // The two minifiers together seem to procude a smaller bundle 🤷‍♂️
          minify && compiler(),
          minify && terser(),
          license({ banner: `@popperjs/core v${pkg.version}` }),
          flow && flowEntry(),
          bundleSize(),
          visualizer({
            sourcemap: true,
            filename: `stats/${getFileName(input)}${minify ? '-min' : ''}.html`,
          }),
        ].filter(Boolean),
        output: {
          name: 'Popper',
          file: `${dir}/${format}/${getFileName(input)}${
            minify ? '.min' : ''
          }.js`,
          format,
          sourcemap: true,
        },
      }))
    )
    .flat();
  
  export default configs;
  