/*
* Adapted from:
*
* FileSaver.js
* A saveAs() FileSaver implementation.
* 1.3.8
* 2018-03-22 14:03:47
*
* By Eli Grey, https://eligrey.com
* License: MIT
*   See https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md
*
* @source http://purl.eligrey.com/github/FileSaver.js/blob/master/src/FileSaver.js
*/

/* WEBPACK VAR INJECTION */

/* eslint-disable jsx-a11y/no-static-element-interactions */

/* eslint-disable max-lines */

/* harmony default export */

/* harmony export (binding) */

/* harmony import */

/* import() */

/*#__PURE__*/

/**
	* Constant function.
	*
	* @private
	* @returns {*} constant value
	*/

/**
	* Returns a pseudorandom number drawn from a discrete uniform distribution with minimum support `a` and maximum support `b`.
	*
	* @private
	* @param {integer} a - minimum support
	* @param {integer} b - maximum support
	* @returns {integer} pseudorandom number
	*
	* @example
	* var v = discreteUniform2( 1, 10 );
	* // returns <number>
	*
	* @example
	* var v = discreteUniform2( 1, 0 );
	* // returns NaN
	*/

/**
	* Returns a pseudorandom number drawn from a discrete uniform distribution with minimum support `a` and maximum support `b`.
	*
	* @private
	* @returns {integer} pseudorandom number
	*
	* @example
	* var v = discreteUniform1();
	* // returns <number>
	*/

/**
	* Returns the PRNG seed length.
	*
	* @private
	* @returns {PositiveInteger} seed length
	*/

/**
	* Returns the PRNG seed.
	*
	* @private
	* @returns {PRNGSeedMT19937} seed
	*/

/**
	* Returns the PRNG state length.
	*
	* @private
	* @returns {PositiveInteger} state length
	*/

/**
	* Returns the PRNG state size (in bytes).
	*
	* @private
	* @returns {PositiveInteger} state size (in bytes)
	*/

/**
	* Returns the current pseudorandom number generator state.
	*
	* @private
	* @returns {PRNGStateMT19937} current state
	*/

/**
	* Serializes the pseudorandom number generator as a JSON object.
	*
	* ## Notes
	*
	* -   `JSON.stringify()` implicitly calls this method when stringifying a PRNG.
	*
	* @private
	* @returns {Object} JSON representation
	*/

/**
	* Sets the pseudorandom number generator state.
	*
	* @private
	* @param {PRNGStateMT19937} s - generator state
	* @throws {Error} must provide a valid state
	*/

/**
   * A Callback fired by the Overlay when it wishes to be hidden.
   *
   * __required__ when `rootClose` is `true`.
   *
   * @type func
   */

/**
   * A DOM Element, Ref to an element, or function that returns either. The `container` will have the Portal children
   * appended to it.
   */

/**
   * A DOM Element, Ref to an element, or function that returns either. The `target` element is where
   * the overlay is positioned relative to.
   */

/**
   * A `react-transition-group@2.0.0` `<Transition/>` component
   * used to animate the overlay as it changes visibility.
   */

/**
   * A render prop that returns an element to overlay and position. See
   * the [react-popper documentation](https://github.com/FezVrasta/react-popper#children) for more info.
   *
   * @type {Function ({
   *   show: boolean,
   *   placement: Placement,
   *   update: () => void,
   *   forceUpdate: () => void,
   *   props: {
   *     ref: (?HTMLElement) => void,
   *     style: { [string]: string | number },
   *     aria-labelledby: ?string
   *     [string]: string | number,
   *   },
   *   arrowProps: {
   *     ref: (?HTMLElement) => void,
   *     style: { [string]: string | number },
   *     [string]: string | number,
   *   },
   * }) => React.Element}
   */

/**
   * A set of popper options and props passed directly to react-popper's Popper component.
   */

/**
   * Callback fired after the Overlay finishes transitioning in
   */

/**
   * Callback fired after the Overlay finishes transitioning out
   */

/**
   * Callback fired as the Overlay begins to transition in
   */

/**
   * Callback fired as the Overlay begins to transition out
   */

/**
   * Callback fired before the Overlay transitions in
   */

/**
   * Callback fired right before the Overlay transitions out
   */

/**
   * Control how much space there is between the edge of the boundary element and overlay.
   * A convenience shortcut to setting `popperConfig.modfiers.preventOverflow.padding`
   */

/**
   * Enables the Popper.js `flip` modifier, allowing the Overlay to
   * automatically adjust it's placement in case of overlap with the viewport or toggle.
   * Refer to the [flip docs](https://popper.js.org/popper-documentation.html#modifiers..flip.enabled) for more info
   */

/**
   * Set the visibility of the Overlay
   */

/**
   * Specify disabled for disable RootCloseWrapper
   */

/**
   * Specify event for toggling overlay
   */

/**
   * Specify whether the overlay should trigger `onHide` when the user clicks outside the overlay
   */

/**
 * Copyright 2013-2014, Facebook, Inc.
 * All rights reserved.
 * https://github.com/facebook/react/blob/2aeb8a2a6beb00617a4217f7f8284924fa2ad819/src/vendor/core/hyphenateStyleName.js
 */

/**
 * Returns a controller object for setting a timeout that is properly cleaned up
 * once the component unmounts. New timeouts cancel and replace existing ones.
 */

/**
* @license Apache-2.0
*
* Copyright (c) 2018 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*    http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*
* ## Notice
*
* The original C++ code and copyright notice are from the [Boost library]{http://www.boost.org/doc/libs/1_65_1/doc/html/boost/random/uniform_int_distribution.html}. The implementation has been modified for JavaScript.
*
* ```text
* (C) Copyright John Maddock 2006.
* (C) Copyright Steven Watanabe 2011.
*
* Use, modification and distribution are subject to the
* Boost Software License, Version 1.0. (See accompanying file
* LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt)
* ```
*/

/**
* @license Apache-2.0
*
* Copyright (c) 2018 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*    http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
* A drawing sketchpad for note taking on lecture slides or empty pages.
*
* @property {boolean} autoSave - controls whether the editor should save the current text to the local storage of the browser at a given time interval
* @property {boolean} feedbackButtons - controls whether to display feedback buttons on each slide
* @property {number} intervalTime - time between auto saves
* @property {boolean} hideInputButtons - controls whether to hide drawing and text input buttons
* @property {boolean} hideNavigationButtons - controls whether to hide buttons for navigating between pages
* @property {boolean} hideSaveButtons - controls whether to hide the save buttons
* @property {boolean} hideTransmitButtons - controls whether to hide buttons for transmitting user actions
* @property {number} brushSize - size of the brush to paint with
* @property {string} color - color of the brush and texts
* @property {number} canvasWidth - width of the canvas element (in px)
* @property {number} canvasHeight - height of the canvas element (in px)
* @property {boolean} dynamicallyHideButtons - controls whether to start hiding buttons when toolbar width is not sufficient (otherwise a new line will be started)
* @property {boolean} fullscreen - controls whether to automatically resize the canvas to the width and height of the browser window
* @property {string} fill - if `horizontal`, fill all available horizontal space when drawing a PDF; if `vertical`, all vertical space is used to prevent y-axis overflow
* @property {boolean} disabled - whether to make the component read-only and forbid drawing on the sketchpad
* @property {string} fontFamily - font family
* @property {number} fontSize - font size
* @property {Object} nodes - components to be rendered on top of specified slides; `keys` should correspond to page numbers, `values` to the components
* @property {number} noPages - initial number of pages
* @property {string} pdf - link to PDF file for baked-in page backgrounds
* @property {boolean} showTutorial - show a tutorial for the sketchpad
* @property {boolean} transmitOwner - whether owner actions should be transmitted to other users in real-time
* @property {boolean} groupMode - controls whether all user's actions are transmitted to everyone else
* @property {strings} voiceID - voice control identifier
* @property {Object} style - CSS inline styles
* @property {Function} onChange - callback invoked whenever a new line element is drawn
*/

/**
* Converts a base-64 encoded string to a blob.
*
* @param {string} b64Data - base-64 encoded string
* @param {string} [contentType=''] - content type
* @param {integer} [sliceSize=512] - slice size
* @returns {Blob} created blob
*/

/**
* Create a constant function.
*
* @module @stdlib/utils/constant-function
*
* @example
* var constantFunction = require( '@stdlib/utils/constant-function' );
*
* var fcn = constantFunction( 3.14 );
*
* var v = fcn();
* // returns 3.14
*
* v = fcn();
* // returns 3.14
*
* v = fcn();
* // returns 3.14
*/

/**
* Create a string from a sequence of Unicode code points.
*
* @module @stdlib/string/from-code-point
*
* @example
* var fromCodePoint = require( '@stdlib/string/from-code-point' );
*
* var str = fromCodePoint( 9731 );
* // returns '☃'
*/

/**
* Creates a function which always returns the same value.
*
* @param {*} [value] - value to always return
* @returns {Function} constant function
*
* @example
* var fcn = wrap( 3.14 );
*
* var v = fcn();
* // returns 3.14
*
* v = fcn();
* // returns 3.14
*
* v = fcn();
* // returns 3.14
*/

/**
* Creates a string from a sequence of Unicode code points.
*
* ## Notes
*
* -   UTF-16 encoding uses one 16-bit unit for non-surrogates (U+0000 to U+D7FF and U+E000 to U+FFFF).
* -   UTF-16 encoding uses two 16-bit units (surrogate pairs) for U+10000 to U+10FFFF and encodes U+10000-U+10FFFF by subtracting 0x10000 from the code point, expressing the result as a 20-bit binary, and splitting the 20 bits of 0x0-0xFFFFF as upper and lower 10-bits. The respective 10-bits are stored in two 16-bit words: a high and a low surrogate.
*
*
* @param {...NonNegativeInteger} args - sequence of code points
* @throws {Error} must provide either an array-like object of code points or one or more code points as separate arguments
* @throws {TypeError} a code point must be a nonnegative integer
* @throws {RangeError} must provide a valid Unicode code point
* @returns {string} created string
*
* @example
* var str = fromCodePoint( 9731 );
* // returns '☃'
*/

/**
* Discrete uniform distribution pseudorandom numbers.
*
* @module @stdlib/random/base/discrete-uniform
*
* @example
* var discreteUniform = require( '@stdlib/random/base/discrete-uniform' );
*
* var v = discreteUniform( 1, 10 );
* // returns <number>
*
* @example
* var factory = require( '@stdlib/random/base/discrete-uniform' ).factory;
* var discreteUniform = factory( -5, 5, {
*     'seed': 297
* });
*
* var v = discreteUniform();
* // returns <number>
*
* @example
* var factory = require( '@stdlib/random/base/discrete-uniform' ).factory;
* var discreteUniform = factory({
*     'seed': 297
* });
*
* var v = discreteUniform( -5, 5 );
* // returns <number>
*/

/**
* Draws a cardinal spline through given point array. Points must be arranged
* as: [x1, y1, x2, y2, ..., xn, yn]. It adds the points to the current path.
*
* There must be a minimum of two points in the input array but the function
* is only useful where there are three points or more.
*
* The method continues previous path of the context. If you don't want that
* then you need to use moveTo() with the first point from the input array.
*
* The points for the cardinal spline are returned as a new array.
*
* @param {CanvasRenderingContext2D} ctx - context to use
* @param {Array} points - point array
* @param {integer} width - canvas width
* @param {integer} height - canvas height
* @param {number} [tension=0.9] - tension. Typically between [0.0, 1.0] but can be exceeded
* @param {number} [numOfSeg=30] - number of segments between two points (line resolution)
* @param {boolean} [close=false] - Close the ends making the line continuous
* @returns {Float32Array} New array with the calculated points that was added to the path
*/

/**
* Generates a random string with the specified length.
*
* @param {integer} [len=32] - length of string
* @param {integer} [lower=48] - lower ASCII char point
* @param {integer} [upper=126] - upper ASCII char point
* @returns {string} random string with `len` characters
*/

/**
* Maximum Unicode code point in the Basic Multilingual Plane (BMP).
*
* @constant
* @type {integer32}
* @default 65535
* @see [Unicode]{@link https://en.wikipedia.org/wiki/Unicode}
*/

/**
* Maximum Unicode code point in the Basic Multilingual Plane (BMP).
*
* @module @stdlib/constants/string/unicode-max-bmp
* @type {integer32}
*
* @example
* var UNICODE_MAX_BMP = require( '@stdlib/constants/string/unicode-max-bmp' );
* // returns 65535
*/

/**
* Maximum Unicode code point.
*
* @constant
* @type {integer32}
* @default 1114111
* @see [Unicode]{@link https://en.wikipedia.org/wiki/Unicode}
*/

/**
* Maximum Unicode code point.
*
* @module @stdlib/constants/string/unicode-max
* @type {integer32}
*
* @example
* var UNICODE_MAX = require( '@stdlib/constants/string/unicode-max' );
* // returns 1114111
*/

/**
* Return a partial object copy excluding specified keys.
*
* @module @stdlib/utils/omit
*
* @example
* var omit = require( '@stdlib/utils/omit' );
*
* var obj1 = {
*     'a': 1,
*     'b': 2
* };
*
* var obj2 = omit( obj1, 'b' );
* // returns { 'a': 1 }
*/

/**
* Returns a partial object copy excluding specified keys.
*
* @param {Object} obj - source object
* @param {(string|StringArray)} keys - keys to exclude
* @throws {TypeError} first argument must be an object
* @throws {TypeError} second argument must be either a string or an array of strings
* @returns {Object} new object
*
* @example
* var obj1 = {
*     'a': 1,
*     'b': 2
* };
*
* var obj2 = omit( obj1, 'b' );
* // returns { 'a': 1 }
*/

/**
* Returns a pseudorandom number drawn from a discrete uniform distribution with minimum support `a` and maximum support `b`.
*
* ## Method
*
* -   Let \\( R \\) be a pseudorandom generator (PRNG) which yields integers on the interval \\( \[ A, B ] \\).
*
* -   If \\( a = b \\), then \\( rv = a \\).
*
* -   Let \\( r1 = b - a \\) and \\( r2 = B - A \\). If \\( r2 = r1 \\) (likely a rare occurrence), then
*
*     ```tex
*     rv = ( R() - B ) + a
*     ```
*
*     where, for real integer types, operation order is important in order to avoid overflow.
*
* -   If \\( r2 < r1 \\), use rejection sampling to map random variates from \\( R \\) to a larger domain (e.g., \\( {0,1,2,3} \rightarrow {0,1,2,3,4} \\)). For real integer types (and floating-point integer values), we must take extra care to avoid overflow. During sampling, the following conditions will hold:
*
*     -   First, consider the post-condition: \\( \textrm{result} \leq r2 \\), thus avoiding overflow.
*
*     -   Begin with definition of \\( \textrm{limit} \\)
*
*         ```tex
*         \textrm{limit} = \lfloor{\frac{r2+1}{r1+1}\rfloor
*         ```
*
*         thus,
*
*         ```tex
*         \textrm{limit}\ \cdot (r1+1) \leq r2+1
*         ```
*
*     -   Let \\( m \\) be a random factor where the loop condition is defined as
*
*         ```tex
*         m \leq \textrm{limit}
*         ```
*
*     -   Let \\( \textrm{result} \\) be the generator output, which is expressed base \\( r2+1 \\) and obeys the loop invariant \\( \textrm{result} < m \\).
*
*     -   Let \\( rv \\) be a realization of the PRNG. Then,
*
*         ```tex
*         rv-A \leq r1
*         ```
*
*         and, by the loop condition, \\( m \leq \textrm{limit} \\).
*
*     -   Therefore,
*
*         ```tex
*         m \cdot (rv - A + 1) \leq r2+1
*         ```
*
*     -   Rearranging terms,
*
*         ```tex
*         m + m \cdot (rv - A) \leq r2+1
*         ```
*
*     -   Since \\( \textrm{result} < m \\),
*
*         ```tex
*         \textrm{result} + m \cdot (rv - A) < r2+1
*         ```
*
*     -   Next, consider the post-condition: \\( \textrm{result} < m \cdot (r2+1) \\).
*
*     -   Since \\( \textrm{result} < m \\) and \\( rv - A \leq r1 \\),
*
*         ```tex
*         \textrm{result} + m \cdot (rv - A) < m + m \cdot (rv - A)
*         ```
*
*     -   Therefore,
*
*         ```tex
*         \textrm{result} + m \cdot (rv - A) < m + m \cdot r1
*         ```
*
*     -   Therefore,
*
*         ```tex
*         \textrm{result} + m \cdot (rv - A) < m \cdot (r1+1)
*         ```
*
*     -   Next, consider the post-condition: \\( m \leq r2 \\).
*
*     -   According to the definition of \\( \textrm{limit} \\) and the loop condition \\( m \leq \textrm{limit} \\),
*
*         ```tex
*         m \cdot (r1+1) \leq r2+1
*         ```
*
*     -   If \\( r2 \\) is **not** an integer power of the generator range \\( r1 \\), i.e.,
*
*         ```tex
*         m \cdot (r1+1) \neq r2+1
*         ```
*
*         then
*
*         ```tex
*         m \cdot (r1+1) < r2+1
*         ```
*
*     -   Thus, \\( \textrm{result} < m \\).
*
*     -   Next, consider the post-condition: \\( r2/m < r1+1 \\).
*
*     -   To show this is true, let us try to prove its opposite. Given the loop condition \\( m > \textrm{limit} \\), assume
*
*         ```tex
*         r2/m > r1+1
*         ```
*
*     -   Accordingly,
*
*         ```tex
*         r2 \geq m \cdot (r1+1)
*         ```
*
*     -   Hence,
*
*         ```tex
*         r2+1 > m \cdot (r1+1)
*         ```
*
*     -   Using the loop condition,
*
*         ```tex
*         r2+1 > (\textrm{limit}+1) \cdot (r1+1)
*         ```
*
*     -   Rearranging terms,
*
*         ```tex
*         \frac{r2+1}{r1+1} > \textrm{limit} + 1
*         ```
*
*     -   Hence,
*
*         ```tex
*         \textrm{limit} < \lfloor{\frac{r2+1}{r1+1}} \rfloor
*         ```
*
*     -   But the definition of \\( \textrm{limit} \\) is
*
*         ```tex
*         \textrm{limit} = \lfloor{\frac{r2+1}{r1+1}}
*         ```
*
*     -   Thus, our assumption cannot be true, providing the post-condition by reductio ad absurdum.
*
*     -   Next, consider the post-condition
*
*         ```tex
*         r2 \leq \frac{r2}{m} \cdot m + (m - 1)
*         ```
*
*     -   Recall the identity
*
*         ```tex
*         r2 = \frac{r2}{m} \cdot m + r2 \mod m
*         ```
*
*     -   By the definition of the modulus
*
*         ```tex
*         r2 \mod m < m
*         ```
*
*     -   Therefore,
*
*         ```tex
*         r2 < \frac{r2}{m} \cdot m + m
*         ```
*
*     -   Hence,
*
*         ```tex
*         r2 \leq \frac{r2}{m} \cdot m + (m - 1)
*         ```
*
*     At this point, the maximum value \\( \textrm{result} \\) is \\( m-1 \\). Hence, we can generate numbers that can be at least as large as \\( r2 \\), but we must be careful to avoid overflow during addition and in the sampling rejection. Anything which overflows is larger than \\( r2 \\) and can thus be rejected.
*
* -   If \\( r1 > r2 \\), use rejection sampling to map random variates from \\( R \\) to a smaller domain (e.g., \\( {0,1,2,3,4} \rightarrow {0,1,2,3} \\)) by defining "buckets" in which multiple random variates in \\( R \\) map to a single random variate in the smaller domain. We are safe in adding 1 to \\( r2 \\); however, we need to be careful to not cause overflow when adding 1 to \\( r1 \\).
*
* @name discreteUniform
* @type {PRNG}
* @param {integer} a - minimum support
* @param {integer} b - maximum support
* @returns {integer} pseudorandom number
*
* @example
* var v = discreteUniform( 1, 10 );
* // returns <number>
*/

/**
* Returns a pseudorandom number drawn from a discrete uniform distribution with minimum support `a` and maximum support `b`.
*
* @private
* @param {PRNG} rand - pseudorandom number generator which outputs integer values
* @param {integer} a - minimum support
* @param {integer} b - maximum support
* @returns {integer} pseudorandom number
*/

/**
* Returns a pseudorandom number generator for generating random numbers draw from a discrete uniform distribution.
*
* @param {integer} [a] - minimum support
* @param {integer} [b] - maximum support
* @param {Options} [options] - function options
* @param {PRNG} [options.prng] - pseudorandom number generator which generates uniformly distributed pseudorandom integers
* @param {PRNGSeedMT19937} [options.seed] - pseudorandom number generator seed
* @param {PRNGStateMT19937} [options.state] - pseudorandom number generator state
* @param {boolean} [options.copy=true] - boolean indicating whether to copy a provided pseudorandom number generator state
* @throws {TypeError} `a` must be an integer
* @throws {TypeError} `b` must be an integer
* @throws {RangeError} `a` must be less than `b`
* @throws {TypeError} options argument must be an object
* @throws {TypeError} must provide valid options
* @throws {TypeError} provided PRNG must have a valid `MIN` property
* @throws {TypeError} provided PRNG must have a valid `MAX` property
* @throws {Error} must provide a valid state
* @returns {PRNG} pseudorandom number generator
*
* @example
* var discreteUniform = factory( 1, 10 );
* var v = discreteUniform();
* // returns <number>
*
* @example
* var discreteUniform = factory( -30, -1, {
*     'seed': 297
* });
* var v = discreteUniform();
* // returns <number>
*/

/**
* Test if a string starts with the characters of another string.
*
* @module @stdlib/string/starts-with
*
* @example
* var startsWith = require( '@stdlib/string/starts-with' );
*
* var str = 'Fair is foul, and foul is fair, hover through fog and filthy air';
* var bool = startsWith( str, 'Fair' );
* // returns true
*
* bool = startsWith( str, 'fair' );
* // returns false
*
* bool = startsWith( str, 'foul', 8 );
* // returns true
*
* bool = startsWith( str, 'filthy', -10 );
* // returns true
*/

/**
* Test if a value is an array of strings.
*
* @module @stdlib/assert/is-string-array
*
* @example
* var isStringArray = require( '@stdlib/assert/is-string-array' );
*
* var bool = isStringArray( [ 'abc', 'def' ] );
* // returns true
*
* bool = isStringArray( [ 'abc', 123 ] );
* // returns false
*
* @example
* var isStringArray = require( '@stdlib/assert/is-string-array' ).primitives;
*
* var bool = isStringArray( [ 'abc', 'def' ] );
* // returns true
*
* bool = isStringArray( [ 'abc', new String( 'def' ) ] );
* // returns false
*
* @example
* var isStringArray = require( '@stdlib/assert/is-string-array' ).objects;
*
* var bool = isStringArray( [ new String( 'abc' ), new String( 'def' ) ] );
* // returns true
*
* bool = isStringArray( [ new String( 'abc' ), 'def' ] );
* // returns false
*/

/**
* Tests if a string starts with the characters of another string.
*
* @param {string} str - input string
* @param {string} search - search string
* @param {integer} [position=0] - position at which to start searching
* @throws {TypeError} first argument must be a string primitive
* @throws {TypeError} second argument must be a string primitive
* @throws {TypeError} third argument must be an integer
* @returns {boolean} boolean indicating if the input string starts with the search string
*
* @example
* var bool = startsWith( 'Remember the story I used to tell you when you were a boy?', 'Remember' );
* // returns true
*
* @example
* var bool = startsWith( 'Remember the story I used to tell you when you were a boy?', 'Remember, remember' );
* // returns false
*
* @example
* var bool = startsWith( 'To be, or not to be, that is the question.', 'To be' );
* // returns true
*
* @example
* var bool = startsWith( 'To be, or not to be, that is the question.', 'to be' );
* // returns false
*
* @example
* var bool = startsWith( 'To be, or not to be, that is the question.', 'to be', 14 );
* // returns true
*
* @example
* var bool = startsWith( 'To be, or not to be, that is the question.', 'quest', -9 );
* // returns true
*/

/**
* Validates values provided for minimum and maximum support.
*
* @private
* @param {integer} a - minimum support
* @param {integer} b - maximum support
* @returns {(Error|null)} error or null
*
* @example
* var err = validate( 1, 20 );
* if ( err ) {
*     throw err;
* }
*/

/** Specify where the overlay element is positioned in relation to the target element */

/***/

//         nextStatus = ENTERING

//         nextStatus = EXITING

//       if (status !== ENTERING && status !== ENTERED) {

//       if (status === ENTERING || status === ENTERED) {

//       }

//     const { status } = this.state

//     if (this.props.in) {

//     }

//     } else {

//   if (prevProps !== this.props) {

//   let nextStatus = null

//   return { nextStatus }

//   }

// "too much recursion" error.

// 0,1,0,0

// 1,0,0,0

// @ts-ignore

// Add last point:

// Add lines to path:

// Apple does not allow window.open, see https://developer.apple.com/library/safari/documentation/Tools/Conceptual/SafariExtensionGuide/WorkingwithWindowsandTabs/WorkingwithWindowsandTabs.html

// Avoid overflow...

// Callback can either be a function or a string

// Canvas to temporarily store data:

// Case: Harmonization not already done on server for anonymous users

// Case: RANGE > range

// Code point from a supplementary plane. Split into two 16-bit code units (surrogate pair).

// Copy function arguments

// Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted

// DOM APIs, for completeness

// Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a

// Deselect elements when clicked outside selection path:

// Does not start the time, just sets up the members needed.

// Don't bother showing anything if we don't have to.

// Don't create more object URLs than needed:

// Don't get fooled by e.g. browserify environments.

// Don't un-render the overlay while it's transitioning out.

// EXPORTS //

// Equivalent to (mult * (RANGE+1)) == range+1, but avoids overflow...

// Exports

// FUNCTIONS //

// First try a download, then web filesystem, then object URLs:

// For IE 6–8

// For every power of `(RANGE+1)`, we determine a random factor:

// For non-IE10 modern browsers

// For simplicity, if the timeout is short, just set a normal timeout.

// For web workers, where supported

// From the spec: "Wait until any invocations of this algorithm started before this one have completed."

// Height of sub-rectangle of source image in the destination context

// IE 10+ (native saveAs)

// If we are provided an "external" PRNG, we don't support getting or setting PRNG state, as we'd need to check for compatible state value types, etc, entailing considerable complexity.

// In the context of a TransitionGroup all enters are really appears

// Insert empty pages at the correct locations:

// Loop invariants: result < mult && mult <= range

// MAIN //

// MODULES //

// Module

// Mouse is not clicked anymore...

// Name the function so it is clearer in the documentation

// Note: see first and second post-conditions.

// Note: see third post-condition.

// On any filesystem errors, revert to saving with object URLs:

// On some exotic environments, it's not clear which object `setimmediate` was

// Only remove all elements from the sending user on the page:

// Own action, clear page:

// Owners should only process actions from selected users:

// PROPERTIES //

// Prepend BOM for UTF-8 XML and text/* types (including HTML). Note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF

// Pressure v2.2.0 | Created By Stuart Yamartino | MIT License | 2015 - 2020

// Prevent future logging when redrawing element:

// Prevent scrolling when touching the canvas on iOS:

// React's built version is broken: https://github.com/facebook/react/issues/4251

// Render PDF page into canvas context

// Reset background data for inserted slides:

// Restore image before line and redraw smoothed version:

// Return position inside of the canvas element:

// Return promise that immediately resolves as no background needs to be drawn:

// Safari doesn't allow downloading of blob URLs:

// Scale all drawing operations by the DPR when no background is present:

// Scale all drawing operations by the DPR:

// Scale the magnifying glass:

// Set to current coordinates:

// Set white background if none present:

// Simple implementation of mouseEnter and mouseLeave.

// So if we're currently running a task, we'll need to delay this invocation.

// Spec says greater than zero

// Start rendering pages one by one:

// Store and register the task

// TODO: remove fallback for next major

// The destination range is an integer power of the generator's range...

// The test against `importScripts` prevents this implementation from being installed inside a web worker,

// This shouldn't be necessary, but there are weird race conditions with

// Update hash of URL:

// Use a minimum line width to make selecting easier:

// Use first touch if available:

// VARIABLES //

// We consider `result` as expressed base `(RANGE+1)`:

// When determining the bucket size, avoid overflow...

// Width of image in destination canvas

// `setimmediate` library.

// able to install onto.  Search each possibility in the same order as the

// account for vertical scrollbar

// allows for nested Transitions

// asm type annotation

// c1

// c2

// c3

// cache inner-loop calculations as they are based on t alone

// calc. points

// copy 1. point and insert at beginning

// e.g., 5%(2+1) == 2

// eslint-disable-next-line @typescript-eslint/no-unused-expressions

// eslint-disable-next-line max-depth

// file is a File

// file is an object URL

// for cases when the trigger is disabled and mouseOut/Over can cause flicker

// for cloning point array

// getSnapshotBeforeUpdate(prevProps) {

// if we are mounting and running this it means appear _must_ be set

// in JavaScript, we only explicitly have doubles

// in ms

// insert end point as first point

// into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.

// moving from one child element to another.

// nextStatus will always be ENTERING or EXITING.

// no enter animation skip right to ENTERED

// no exit animation skip right to EXITED

// only get URL when necessary in case Blob.js hasn't overridden it yet

// options or defaults

// peek at first page and assume it's consistent over all pages

// range/mult < RANGE+1 (no endless loop)

// reading a dimension prop will cause the browser to recalculate,

// release reference before dispatching

// second last and last

// setState callbacks and unmounting in testing, so always make sure that

// setimmediate attaches itself to the global object

// types are confused between node and web here IDK

// we can cancel any pending setState callbacks after we unmount.

// where `global.postMessage` means something completely different and can't be used for this purpose.

// which will let our animations work

// y-axis coordinate in destination canvas at which to place top-left corner of source image

// }
