[
  {
    "path": ".editorconfig",
    "content": "# EditorConfig is awesome: http://EditorConfig.org\n\n# top-most EditorConfig file\nroot = true\n\n# Unix-style newlines with a newline ending every file\n[*]\nend_of_line = lf\ninsert_final_newline = true\n\n# Tab indentation (no size specified)\n[{*.js, *.css, *.scss}]\nindent_style = space\nindent_size = 4\n\n# Matches the exact files package.json and .travis.yml\n[{*.json,.travis.yml,Gruntfile.js}]\nindent_style = space\nindent_size = 2\n\n[Makefile]\nindent_style = tab\nindent_size = 4\n"
  },
  {
    "path": ".eslintrc",
    "content": "{\n    \"env\": {\n        \"browser\":    true,\n        \"amd\":        true,\n        \"node\":       true\n    },\n\n    \"globals\": {\n        \"define\":     false,\n        \"require\":    true,\n\n        \"alert\":      true,\n        \"console\":    true,\n        \"module\":     true,\n\n        \"describe\":   true,\n        \"it\":         true,\n        \"before\":     true,\n        \"beforeEach\": true,\n        \"after\":      true,\n        \"afterEach\":  true,\n        \"expect\":     true,\n        \"should\":     true,\n\n        \"Promise\":    true, // allow possibly overwriting Promise\n    },\n\n    \"rules\": {\n        \"dot-notation\":         0, // allow obj['somePropertyName']\n        \"new-cap\":              0, // do not require 'new' keyword, allows i.e. \"var promise = $.Deferred()\"\n        \"no-alert\":             0, // disencourage alert() and confirm()\n        \"no-console\":           0,\n        \"no-mixed-spaces-and-tabs\": 1,\n        \"semi-spacing\": [2, {\"before\": false, \"after\": true}],\n        \"no-spaced-func\":       1,\n        \"no-undef\":             1,\n        \"no-shadow\":            1,\n        \"no-trailing-spaces\":   1,\n        \"no-extra-parens\":      1,\n        \"no-underscore-dangle\": 0, // allow _variableName\n        \"no-new\":               0,\n        \"no-nested-ternary\":    1,\n        \"no-process-exit\":      0,\n\n        // requires local variable names to be used, but allows unused arguments\n        \"no-unused-vars\":       [2, { \"vars\": \"all\", \"args\": \"none\" }],\n        \"no-use-before-define\": 0,\n\n        // disable requirements for strict spacing rules in object properties or assignments\n        \"key-spacing\":          0,\n        \"no-multi-spaces\":      0,\n\n        \"quotes\":               0, // allow both single and double quotes\n        \"space-after-keywords\": 1,\n        \"space-infix-ops\":      1,\n        \"space-return-throw-case\": 1,\n        \"strict\":               0\n    }\n}\n"
  },
  {
    "path": ".gitignore",
    "content": "# Logs\nlogs\n# Node\n\n*.log\n\n# Runtime data\npids\n*.pid\n*.seed\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Compiled binary addons (http://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directory\n# Commenting this out is preferred by some people, see\n# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-\nnode_modules\n\n# Users Environment Variables\n.lock-wscript\n\n# SASS\n.sass-cache\n*.css.map\n\n\n# OS X\n.DS_Store\n\n# IDEA editor\n.idea\n\n# Secrets as environment variables\nsecrets.sh\n\n# Local dev bundle\nlocal-dev/bundle.js\n.env\n"
  },
  {
    "path": ".jscs.json",
    "content": "{\n    \"disallowImplicitTypeConversion\": [\"string\"],\n    \"disallowMixedSpacesAndTabs\": true,\n    \"disallowMultipleLineBreaks\": true,\n    \"disallowNewlineBeforeBlockStatements\": true,\n    \"disallowMultipleLineStrings\": true,\n    \"disallowMultipleVarDecl\": null,\n    \"disallowSpaceAfterPrefixUnaryOperators\": true,\n    \"disallowSpacesInAnonymousFunctionExpression\": {\n        \"beforeOpeningRoundBrace\": true\n    },\n    \"disallowSpacesInsideObjectBrackets\": null,\n    \"disallowSpacesInsideArrayBrackets\": \"all\",\n    \"disallowSpacesInsideParentheses\": true,\n    \"disallowTrailingWhitespace\": true,\n\n    \"maximumLineLength\": {\n        \"value\": 100,\n        \"allowComments\": true,\n        \"allowRegex\": true\n    },\n\n    \"fileExtensions\": [\".js\", \".jsx\"],\n\n    \"requireCamelCaseOrUpperCaseIdentifiers\": true,\n    \"requireCommaBeforeLineBreak\": true,\n    \"requireCurlyBraces\": [\n        \"if\",\n        \"else\",\n        \"for\",\n        \"while\",\n        \"do\",\n        \"try\",\n        \"catch\"\n    ],\n    \"requireSpaceAfterBinaryOperators\": true,\n    \"requireSpaceAfterKeywords\": [\n        \"do\",\n        \"for\",\n        \"if\",\n        \"else\",\n        \"switch\",\n        \"case\",\n        \"try\",\n        \"catch\",\n        \"void\",\n        \"while\",\n        \"with\",\n        \"return\",\n        \"typeof\"\n    ],\n    \"requireSpaceBeforeBinaryOperators\": [\n        \"=\", \"+=\", \"-=\", \"*=\", \"/=\", \"%=\", \"<<=\", \">>=\", \">>>=\",\n        \"&=\", \"|=\", \"^=\", \"+=\",\n\n        \"+\", \"-\", \"*\", \"/\", \"%\", \"<<\", \">>\", \">>>\", \"&\",\n        \"|\", \"^\", \"&&\", \"||\", \"===\", \"==\", \">=\",\n        \"<=\", \"<\", \">\", \"!=\", \"!==\"\n    ],\n    \"requireSpacesInConditionalExpression\": true,\n    \"requireSpaceBeforeBlockStatements\": true,\n    \"requireSpacesInForStatement\": true,\n    \"requireLineFeedAtFileEnd\": true,\n    \"requireSpacesInFunctionExpression\": {\n        \"beforeOpeningCurlyBrace\": true\n    },\n\n    \"validateLineBreaks\": \"LF\",\n    \"validateIndentation\": 4,\n    \"validateQuoteMarks\": {\n        \"mark\": \"'\", \"escape\": true\n    }\n}\n"
  },
  {
    "path": ".travis.yml",
    "content": "language: node_js\nnode_js:\n- '12'\nbefore_install:\n- npm install -g npm\nbefore_script:\n- npm install\n- npm install -g mocha grunt-cli testem\nscript:\n- if [[ $TRAVIS_PULL_REQUEST != 'false' ]]; then testem ci -l phantomjs; fi\n- if [[ $TRAVIS_PULL_REQUEST == 'false' ]]; then grunt sauce; fi\nnotifications:\n  email:\n  - kimmobrunfeldt+progressbar@gmail.com\nenv:\n  global:\n  - secure: I/NAJpZ+wySjPYYLAqsHfMrueU0HbvOZx1FAJgxHtm3Nkz6/mzL+8ZW/FSi9/XaxkqJLaWAmCqvbVZsrw4qAfb2KKq/Ymf6eEhdTHfCJs+hLf32qM2FENS3LGPu7uJ8y1/7WKhV0VotBttB6AhaH/SNuZ4d8yBDGbriZtvnBT5c=\n  - secure: SLhd3YYQXk5jD+ubnDatUAfeTGjSu6H3y30g7n0TryueNx5qBsBLAbeqAJ92JqZx3QEBAJ0vTJyhr66gJu9dG+G7US3O/KPjYXBHcDbVv0PEXibnWhxI8BLK8PIDQvGm2dwf4/6j0gDqNoWCnjBrhdgj481iR2z2cpR07A8Koew=\n"
  },
  {
    "path": "Gruntfile.js",
    "content": "var _ = require('lodash');\n\n// Split array to smaller arrays containing n elements at max\nfunction groupToElements(array, n) {\n  var lists = _.groupBy(array, function(element, index){\n    return Math.floor(index / n);\n  });\n\n  return _.toArray(lists);\n}\n\n// Setup karma configuration dynamically to run browsers sequentially\n// https://github.com/karma-runner/karma-sauce-launcher/issues/8\nvar MAXIMUM_CONCURRENT_SAUCE = 3;\nvar sauceBrowsers = require('./saucelabs-browsers');\nvar browserGroups = groupToElements(Object.keys(sauceBrowsers), MAXIMUM_CONCURRENT_SAUCE);\n\nvar karmaConfig = {\n  options: {\n    configFile: 'karma.conf.js'\n  }\n};\n\n_.each(browserGroups, function(group, index) {\n  karmaConfig['sauce' + index] = {\n    browsers: group\n  }\n});\n\n\nmodule.exports = function(grunt) {\n  grunt.initConfig({\n    pkg: grunt.file.readJSON('package.json'),\n    shell: {\n      stageMinified: {\n        options: {\n            stdout: true,\n            // If minified files do not change on release,\n            // git command fails\n            failOnError: false\n        },\n        command: 'git add dist/progressbar.js dist/progressbar.min.js dist/progressbar.min.js.map'\n      },\n      browserifyDevelopment: {\n        options: {\n          stdout: true\n        },\n        command: 'browserify src/main.js -o dist/progressbar.js --standalone ProgressBar'\n      },\n      browserifyMinified: {\n        options: {\n          stdout: true\n        },\n        // The output file is minified by uglifyjs later.\n        command: 'browserify src/main.js -o dist/progressbar.min.js --standalone ProgressBar'\n      },\n      watchifyLocalDev: {\n        options: {\n          stdout: true\n        },\n        command: 'watchify local-dev/main.js -o local-dev/bundle.js --debug --verbose'\n      },\n      release: {\n        options: {\n          stdout: true\n        },\n        command: function(bump) {\n          bump = bump || 'patch';\n          return './tools/release.js ' + bump;\n        }\n      },\n      karma: {\n        options: {\n          stdout: true\n        },\n        // This will run tests in Sauce Lab\n        command: './node_modules/karma/bin/karma start'\n      },\n    },\n    // Uglify must be run after browserify\n    uglify: {\n      progressbar: {\n        options: {\n          sourceMap: true\n        },\n        files: {\n          'dist/progressbar.min.js': ['dist/progressbar.min.js']\n        }\n      }\n    },\n    // Calculated dynamically above\n    karma: karmaConfig\n  });\n\n  grunt.loadNpmTasks('grunt-contrib-jshint');\n  grunt.loadNpmTasks('grunt-contrib-uglify');\n  grunt.loadNpmTasks('grunt-shell');\n  grunt.loadNpmTasks('grunt-karma');\n\n  grunt.registerTask('watch', function() {\n    grunt.task.run(['shell:watchifyLocalDev']);\n  });\n\n  grunt.registerTask('stageMinified', function() {\n    grunt.task.run(['shell:stageMinified']);\n  });\n\n  // Build distributables to dist folder\n  grunt.registerTask('build', [\n    'shell:browserifyDevelopment',\n    'shell:browserifyMinified',\n    'uglify:progressbar'\n  ]);\n\n  // Run multiple tests serially, but continue if one of them fails.\n  // Adapted from http://stackoverflow.com/questions/16487681/gruntfile-getting-error-codes-from-programs-serially\n  grunt.registerTask('sauce', function() {\n      var done = this.async();\n      var tasks = {};\n      _.each(browserGroups, function(group, index) {\n        tasks['karma:sauce' + index] = 0;\n      });\n\n      var success = true;\n      grunt.util.async.forEachSeries(Object.keys(tasks), function(task, next) {\n          grunt.util.spawn({\n              // Use grunt to spawn\n              grunt: true,\n              args: [task],\n              // Print to the same stdout\n              opts: { stdio: 'inherit' }\n          }, function(err, result, code) {\n              tasks[task] = code;\n              if (code !== 0) {\n                  success = false;\n              }\n              next();\n          });\n      }, function() {\n          done(success);\n      });\n  });\n\n  // Test, build, and release library to public\n  grunt.registerTask('release', function(bump) {\n    bump = bump || 'patch';\n\n    grunt.task.run([\n      'build',\n      'stageMinified',\n      'shell:release:' + bump\n    ]);\n  });\n};\n"
  },
  {
    "path": "LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2015 Kimmo Brunfeldt\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# ProgressBar.js\n\n<br>\n\n![Demo animation](docs/img/animation.gif)\n\n<br>\n\nResponsive and slick progress bars with animated SVG paths.\nUse built-in shapes or [create your own paths](http://progressbarjs.readthedocs.org/en/latest/api/path/).\n[Customize](http://progressbarjs.readthedocs.org/en/latest/api/parameters/#custom-animations) the animations as you wish.\n\nDocumentation is [hosted at readthedocs.org](http://progressbarjs.readthedocs.org/en/latest/).\n\n**Shortcuts**\n\n- [Get started](http://progressbarjs.readthedocs.org/en/latest/)\n- [Demo & Examples](https://kimmobrunfeldt.github.io/progressbar.js)\n- [**Try** in JSFiddle](http://jsfiddle.net/kimmobrunfeldt/8xa87k31/392/)\n- [API documentation](http://progressbarjs.readthedocs.org/en/latest/api/shape/)\n- [Migration between versions](http://progressbarjs.readthedocs.org/en/latest/#migrations)\n- [react-progressbar.js](https://github.com/kimmobrunfeldt/react-progressbar.js) progress bars in React.\n\n## Contributing\n\nSee [documentation for contributors](http://progressbarjs.readthedocs.org/en/latest/contributing/).\n\n## Thanks\n\nThis project is a grateful recipient of the [Futurice Open Source sponsorship program](http://futurice.com/blog/sponsoring-free-time-open-source-activities?utm_source=github&utm_medium=spice&utm_campaign=progressbar).\n"
  },
  {
    "path": "bower.json",
    "content": "{\n  \"name\": \"progressbar.js\",\n  \"main\": \"dist/progressbar.js\",\n  \"homepage\": \"https://github.com/kimmobrunfeldt/progressbar.js\",\n  \"authors\": [\n    \"Kimmo Brunfeldt <kimmobrunfeldt@gmail.com>\"\n  ],\n  \"description\": \"Responsive and slick progress bars with animated SVG paths\",\n  \"moduleType\": [\n    \"amd\",\n    \"globals\"\n  ],\n  \"keywords\": [\n    \"progress\",\n    \"bar\",\n    \"js\",\n    \"svg\",\n    \"circular\",\n    \"circle\",\n    \"pace\",\n    \"radial\",\n    \"line\",\n    \"loading\",\n    \"loader\"\n  ],\n  \"license\": \"MIT\",\n  \"ignore\": [\n    \"**/.*\",\n    \"node_modules\",\n    \"bower_components\",\n    \"test\",\n    \"tests\"\n  ]\n}\n"
  },
  {
    "path": "dist/progressbar.js",
    "content": "// ProgressBar.js 1.1.1\n// https://kimmobrunfeldt.github.io/progressbar.js\n// License: MIT\n\n(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.ProgressBar = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){\n(function (global){(function (){\n/**\n * Lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n    HOT_SPAN = 16;\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n    arrayTag = '[object Array]',\n    asyncTag = '[object AsyncFunction]',\n    boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    errorTag = '[object Error]',\n    funcTag = '[object Function]',\n    genTag = '[object GeneratorFunction]',\n    mapTag = '[object Map]',\n    numberTag = '[object Number]',\n    nullTag = '[object Null]',\n    objectTag = '[object Object]',\n    proxyTag = '[object Proxy]',\n    regexpTag = '[object RegExp]',\n    setTag = '[object Set]',\n    stringTag = '[object String]',\n    undefinedTag = '[object Undefined]',\n    weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n    dataViewTag = '[object DataView]',\n    float32Tag = '[object Float32Array]',\n    float64Tag = '[object Float64Array]',\n    int8Tag = '[object Int8Array]',\n    int16Tag = '[object Int16Array]',\n    int32Tag = '[object Int32Array]',\n    uint8Tag = '[object Uint8Array]',\n    uint8ClampedTag = '[object Uint8ClampedArray]',\n    uint16Tag = '[object Uint16Array]',\n    uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n  try {\n    // Use `util.types` for Node.js 10+.\n    var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n    if (types) {\n      return types;\n    }\n\n    // Legacy `process.binding('util')` for Node.js < 10.\n    return freeProcess && freeProcess.binding && freeProcess.binding('util');\n  } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n  switch (args.length) {\n    case 0: return func.call(thisArg);\n    case 1: return func.call(thisArg, args[0]);\n    case 2: return func.call(thisArg, args[0], args[1]);\n    case 3: return func.call(thisArg, args[0], args[1], args[2]);\n  }\n  return func.apply(thisArg, args);\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n  var index = -1,\n      result = Array(n);\n\n  while (++index < n) {\n    result[index] = iteratee(index);\n  }\n  return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n  return function(value) {\n    return func(value);\n  };\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n  return object == null ? undefined : object[key];\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n  return function(arg) {\n    return func(transform(arg));\n  };\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n    funcProto = Function.prototype,\n    objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n  return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n  funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n  .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n    Symbol = root.Symbol,\n    Uint8Array = root.Uint8Array,\n    allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n    getPrototype = overArg(Object.getPrototypeOf, Object),\n    objectCreate = Object.create,\n    propertyIsEnumerable = objectProto.propertyIsEnumerable,\n    splice = arrayProto.splice,\n    symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\nvar defineProperty = (function() {\n  try {\n    var func = getNative(Object, 'defineProperty');\n    func({}, '', {});\n    return func;\n  } catch (e) {}\n}());\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n    nativeMax = Math.max,\n    nativeNow = Date.now;\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map'),\n    nativeCreate = getNative(Object, 'create');\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n  function object() {}\n  return function(proto) {\n    if (!isObject(proto)) {\n      return {};\n    }\n    if (objectCreate) {\n      return objectCreate(proto);\n    }\n    object.prototype = proto;\n    var result = new object;\n    object.prototype = undefined;\n    return result;\n  };\n}());\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n  this.__data__ = nativeCreate ? nativeCreate(null) : {};\n  this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n  var result = this.has(key) && delete this.__data__[key];\n  this.size -= result ? 1 : 0;\n  return result;\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n  var data = this.__data__;\n  if (nativeCreate) {\n    var result = data[key];\n    return result === HASH_UNDEFINED ? undefined : result;\n  }\n  return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n  var data = this.__data__;\n  return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n  var data = this.__data__;\n  this.size += this.has(key) ? 0 : 1;\n  data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n  return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n  this.__data__ = [];\n  this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    return false;\n  }\n  var lastIndex = data.length - 1;\n  if (index == lastIndex) {\n    data.pop();\n  } else {\n    splice.call(data, index, 1);\n  }\n  --this.size;\n  return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n  return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    ++this.size;\n    data.push([key, value]);\n  } else {\n    data[index][1] = value;\n  }\n  return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n  this.size = 0;\n  this.__data__ = {\n    'hash': new Hash,\n    'map': new (Map || ListCache),\n    'string': new Hash\n  };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n  var result = getMapData(this, key)['delete'](key);\n  this.size -= result ? 1 : 0;\n  return result;\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n  return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n  return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n  var data = getMapData(this, key),\n      size = data.size;\n\n  data.set(key, value);\n  this.size += data.size == size ? 0 : 1;\n  return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n  var data = this.__data__ = new ListCache(entries);\n  this.size = data.size;\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n  this.__data__ = new ListCache;\n  this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n  var data = this.__data__,\n      result = data['delete'](key);\n\n  this.size = data.size;\n  return result;\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n  return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n  return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n  var data = this.__data__;\n  if (data instanceof ListCache) {\n    var pairs = data.__data__;\n    if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n      pairs.push([key, value]);\n      this.size = ++data.size;\n      return this;\n    }\n    data = this.__data__ = new MapCache(pairs);\n  }\n  data.set(key, value);\n  this.size = data.size;\n  return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n  var isArr = isArray(value),\n      isArg = !isArr && isArguments(value),\n      isBuff = !isArr && !isArg && isBuffer(value),\n      isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n      skipIndexes = isArr || isArg || isBuff || isType,\n      result = skipIndexes ? baseTimes(value.length, String) : [],\n      length = result.length;\n\n  for (var key in value) {\n    if ((inherited || hasOwnProperty.call(value, key)) &&\n        !(skipIndexes && (\n           // Safari 9 has enumerable `arguments.length` in strict mode.\n           key == 'length' ||\n           // Node.js 0.10 has enumerable non-index properties on buffers.\n           (isBuff && (key == 'offset' || key == 'parent')) ||\n           // PhantomJS 2 has enumerable non-index properties on typed arrays.\n           (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n           // Skip index properties.\n           isIndex(key, length)\n        ))) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n  if ((value !== undefined && !eq(object[key], value)) ||\n      (value === undefined && !(key in object))) {\n    baseAssignValue(object, key, value);\n  }\n}\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n  var objValue = object[key];\n  if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n      (value === undefined && !(key in object))) {\n    baseAssignValue(object, key, value);\n  }\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n  var length = array.length;\n  while (length--) {\n    if (eq(array[length][0], key)) {\n      return length;\n    }\n  }\n  return -1;\n}\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n  if (key == '__proto__' && defineProperty) {\n    defineProperty(object, key, {\n      'configurable': true,\n      'enumerable': true,\n      'value': value,\n      'writable': true\n    });\n  } else {\n    object[key] = value;\n  }\n}\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n  if (value == null) {\n    return value === undefined ? undefinedTag : nullTag;\n  }\n  return (symToStringTag && symToStringTag in Object(value))\n    ? getRawTag(value)\n    : objectToString(value);\n}\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n  return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n *  else `false`.\n */\nfunction baseIsNative(value) {\n  if (!isObject(value) || isMasked(value)) {\n    return false;\n  }\n  var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n  return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n  return isObjectLike(value) &&\n    isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n  if (!isObject(object)) {\n    return nativeKeysIn(object);\n  }\n  var isProto = isPrototype(object),\n      result = [];\n\n  for (var key in object) {\n    if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n *  counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n  if (object === source) {\n    return;\n  }\n  baseFor(source, function(srcValue, key) {\n    stack || (stack = new Stack);\n    if (isObject(srcValue)) {\n      baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n    }\n    else {\n      var newValue = customizer\n        ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n        : undefined;\n\n      if (newValue === undefined) {\n        newValue = srcValue;\n      }\n      assignMergeValue(object, key, newValue);\n    }\n  }, keysIn);\n}\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n *  counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n  var objValue = safeGet(object, key),\n      srcValue = safeGet(source, key),\n      stacked = stack.get(srcValue);\n\n  if (stacked) {\n    assignMergeValue(object, key, stacked);\n    return;\n  }\n  var newValue = customizer\n    ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n    : undefined;\n\n  var isCommon = newValue === undefined;\n\n  if (isCommon) {\n    var isArr = isArray(srcValue),\n        isBuff = !isArr && isBuffer(srcValue),\n        isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n    newValue = srcValue;\n    if (isArr || isBuff || isTyped) {\n      if (isArray(objValue)) {\n        newValue = objValue;\n      }\n      else if (isArrayLikeObject(objValue)) {\n        newValue = copyArray(objValue);\n      }\n      else if (isBuff) {\n        isCommon = false;\n        newValue = cloneBuffer(srcValue, true);\n      }\n      else if (isTyped) {\n        isCommon = false;\n        newValue = cloneTypedArray(srcValue, true);\n      }\n      else {\n        newValue = [];\n      }\n    }\n    else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n      newValue = objValue;\n      if (isArguments(objValue)) {\n        newValue = toPlainObject(objValue);\n      }\n      else if (!isObject(objValue) || isFunction(objValue)) {\n        newValue = initCloneObject(srcValue);\n      }\n    }\n    else {\n      isCommon = false;\n    }\n  }\n  if (isCommon) {\n    // Recursively merge objects and arrays (susceptible to call stack limits).\n    stack.set(srcValue, newValue);\n    mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n    stack['delete'](srcValue);\n  }\n  assignMergeValue(object, key, newValue);\n}\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n  return setToString(overRest(func, start, identity), func + '');\n}\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n  return defineProperty(func, 'toString', {\n    'configurable': true,\n    'enumerable': false,\n    'value': constant(string),\n    'writable': true\n  });\n};\n\n/**\n * Creates a clone of  `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n  if (isDeep) {\n    return buffer.slice();\n  }\n  var length = buffer.length,\n      result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n  buffer.copy(result);\n  return result;\n}\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n  var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n  new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n  return result;\n}\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n  var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n  return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\n/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n  var index = -1,\n      length = source.length;\n\n  array || (array = Array(length));\n  while (++index < length) {\n    array[index] = source[index];\n  }\n  return array;\n}\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n  var isNew = !object;\n  object || (object = {});\n\n  var index = -1,\n      length = props.length;\n\n  while (++index < length) {\n    var key = props[index];\n\n    var newValue = customizer\n      ? customizer(object[key], source[key], key, object, source)\n      : undefined;\n\n    if (newValue === undefined) {\n      newValue = source[key];\n    }\n    if (isNew) {\n      baseAssignValue(object, key, newValue);\n    } else {\n      assignValue(object, key, newValue);\n    }\n  }\n  return object;\n}\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n  return baseRest(function(object, sources) {\n    var index = -1,\n        length = sources.length,\n        customizer = length > 1 ? sources[length - 1] : undefined,\n        guard = length > 2 ? sources[2] : undefined;\n\n    customizer = (assigner.length > 3 && typeof customizer == 'function')\n      ? (length--, customizer)\n      : undefined;\n\n    if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n      customizer = length < 3 ? undefined : customizer;\n      length = 1;\n    }\n    object = Object(object);\n    while (++index < length) {\n      var source = sources[index];\n      if (source) {\n        assigner(object, source, index, customizer);\n      }\n    }\n    return object;\n  });\n}\n\n/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n  return function(object, iteratee, keysFunc) {\n    var index = -1,\n        iterable = Object(object),\n        props = keysFunc(object),\n        length = props.length;\n\n    while (length--) {\n      var key = props[fromRight ? length : ++index];\n      if (iteratee(iterable[key], key, iterable) === false) {\n        break;\n      }\n    }\n    return object;\n  };\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n  var data = map.__data__;\n  return isKeyable(key)\n    ? data[typeof key == 'string' ? 'string' : 'hash']\n    : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n  var value = getValue(object, key);\n  return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n  var isOwn = hasOwnProperty.call(value, symToStringTag),\n      tag = value[symToStringTag];\n\n  try {\n    value[symToStringTag] = undefined;\n    var unmasked = true;\n  } catch (e) {}\n\n  var result = nativeObjectToString.call(value);\n  if (unmasked) {\n    if (isOwn) {\n      value[symToStringTag] = tag;\n    } else {\n      delete value[symToStringTag];\n    }\n  }\n  return result;\n}\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n  return (typeof object.constructor == 'function' && !isPrototype(object))\n    ? baseCreate(getPrototype(object))\n    : {};\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n  var type = typeof value;\n  length = length == null ? MAX_SAFE_INTEGER : length;\n\n  return !!length &&\n    (type == 'number' ||\n      (type != 'symbol' && reIsUint.test(value))) &&\n        (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n *  else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n  if (!isObject(object)) {\n    return false;\n  }\n  var type = typeof index;\n  if (type == 'number'\n        ? (isArrayLike(object) && isIndex(index, object.length))\n        : (type == 'string' && index in object)\n      ) {\n    return eq(object[index], value);\n  }\n  return false;\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n  var type = typeof value;\n  return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n    ? (value !== '__proto__')\n    : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n  return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n  var Ctor = value && value.constructor,\n      proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n  return value === proto;\n}\n\n/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n  var result = [];\n  if (object != null) {\n    for (var key in Object(object)) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n  return nativeObjectToString.call(value);\n}\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n  start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n  return function() {\n    var args = arguments,\n        index = -1,\n        length = nativeMax(args.length - start, 0),\n        array = Array(length);\n\n    while (++index < length) {\n      array[index] = args[start + index];\n    }\n    index = -1;\n    var otherArgs = Array(start + 1);\n    while (++index < start) {\n      otherArgs[index] = args[index];\n    }\n    otherArgs[start] = transform(array);\n    return apply(func, this, otherArgs);\n  };\n}\n\n/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n  if (key === 'constructor' && typeof object[key] === 'function') {\n    return;\n  }\n\n  if (key == '__proto__') {\n    return;\n  }\n\n  return object[key];\n}\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n  var count = 0,\n      lastCalled = 0;\n\n  return function() {\n    var stamp = nativeNow(),\n        remaining = HOT_SPAN - (stamp - lastCalled);\n\n    lastCalled = stamp;\n    if (remaining > 0) {\n      if (++count >= HOT_COUNT) {\n        return arguments[0];\n      }\n    } else {\n      count = 0;\n    }\n    return func.apply(undefined, arguments);\n  };\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n  if (func != null) {\n    try {\n      return funcToString.call(func);\n    } catch (e) {}\n    try {\n      return (func + '');\n    } catch (e) {}\n  }\n  return '';\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n  return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n *  else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n  return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n    !propertyIsEnumerable.call(value, 'callee');\n};\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n  return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n *  else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n  return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n  if (!isObject(value)) {\n    return false;\n  }\n  // The use of `Object#toString` avoids issues with the `typeof` operator\n  // in Safari 9 which returns 'object' for typed arrays and other constructors.\n  var tag = baseGetTag(value);\n  return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n  return typeof value == 'number' &&\n    value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n  var type = typeof value;\n  return value != null && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return value != null && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n  if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n    return false;\n  }\n  var proto = getPrototype(value);\n  if (proto === null) {\n    return true;\n  }\n  var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n  return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n    funcToString.call(Ctor) == objectCtorString;\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n  return copyObject(value, keysIn(value));\n}\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n  return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\n/**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n *   'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n *   'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\nvar merge = createAssigner(function(object, source, srcIndex) {\n  baseMerge(object, source, srcIndex);\n});\n\n/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n  return function() {\n    return value;\n  };\n}\n\n/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n  return value;\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n  return false;\n}\n\nmodule.exports = merge;\n\n}).call(this)}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{}],2:[function(require,module,exports){\n/*! For license information please see shifty.js.LICENSE.txt */\n!function(t,n){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=n():\"function\"==typeof define&&define.amd?define(\"shifty\",[],n):\"object\"==typeof exports?exports.shifty=n():t.shifty=n()}(self,(function(){return function(){\"use strict\";var t={720:function(t,n,e){e.r(n),e.d(n,{Scene:function(){return sn},Tweenable:function(){return kt},interpolate:function(){return nn},processTweens:function(){return dt},setBezierFunction:function(){return $},shouldScheduleUpdate:function(){return bt},tween:function(){return Pt},unsetBezierFunction:function(){return L}});var r={};e.r(r),e.d(r,{bounce:function(){return D},bouncePast:function(){return q},easeFrom:function(){return B},easeFromTo:function(){return Q},easeInBack:function(){return E},easeInCirc:function(){return j},easeInCubic:function(){return c},easeInExpo:function(){return w},easeInOutBack:function(){return T},easeInOutCirc:function(){return P},easeInOutCubic:function(){return l},easeInOutExpo:function(){return S},easeInOutQuad:function(){return s},easeInOutQuart:function(){return v},easeInOutQuint:function(){return d},easeInOutSine:function(){return b},easeInQuad:function(){return u},easeInQuart:function(){return h},easeInQuint:function(){return y},easeInSine:function(){return g},easeOutBack:function(){return A},easeOutBounce:function(){return M},easeOutCirc:function(){return k},easeOutCubic:function(){return f},easeOutExpo:function(){return O},easeOutQuad:function(){return a},easeOutQuart:function(){return p},easeOutQuint:function(){return _},easeOutSine:function(){return m},easeTo:function(){return N},elastic:function(){return I},linear:function(){return o},swingFrom:function(){return x},swingFromTo:function(){return F},swingTo:function(){return C}});var i={};e.r(i),e.d(i,{afterTween:function(){return Jt},beforeTween:function(){return Ht},doesApply:function(){return Wt},tweenCreated:function(){return Gt}});var o=function(t){return t},u=function(t){return Math.pow(t,2)},a=function(t){return-(Math.pow(t-1,2)-1)},s=function(t){return(t/=.5)<1?.5*Math.pow(t,2):-.5*((t-=2)*t-2)},c=function(t){return Math.pow(t,3)},f=function(t){return Math.pow(t-1,3)+1},l=function(t){return(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2)},h=function(t){return Math.pow(t,4)},p=function(t){return-(Math.pow(t-1,4)-1)},v=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},y=function(t){return Math.pow(t,5)},_=function(t){return Math.pow(t-1,5)+1},d=function(t){return(t/=.5)<1?.5*Math.pow(t,5):.5*(Math.pow(t-2,5)+2)},g=function(t){return 1-Math.cos(t*(Math.PI/2))},m=function(t){return Math.sin(t*(Math.PI/2))},b=function(t){return-.5*(Math.cos(Math.PI*t)-1)},w=function(t){return 0===t?0:Math.pow(2,10*(t-1))},O=function(t){return 1===t?1:1-Math.pow(2,-10*t)},S=function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},j=function(t){return-(Math.sqrt(1-t*t)-1)},k=function(t){return Math.sqrt(1-Math.pow(t-1,2))},P=function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},M=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},E=function(t){var n=1.70158;return t*t*((n+1)*t-n)},A=function(t){var n=1.70158;return(t-=1)*t*((n+1)*t+n)+1},T=function(t){var n=1.70158;return(t/=.5)<1?t*t*((1+(n*=1.525))*t-n)*.5:.5*((t-=2)*t*((1+(n*=1.525))*t+n)+2)},I=function(t){return-1*Math.pow(4,-8*t)*Math.sin((6*t-1)*(2*Math.PI)/2)+1},F=function(t){var n=1.70158;return(t/=.5)<1?t*t*((1+(n*=1.525))*t-n)*.5:.5*((t-=2)*t*((1+(n*=1.525))*t+n)+2)},x=function(t){var n=1.70158;return t*t*((n+1)*t-n)},C=function(t){var n=1.70158;return(t-=1)*t*((n+1)*t+n)+1},D=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},q=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?2-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?2-(7.5625*(t-=2.25/2.75)*t+.9375):2-(7.5625*(t-=2.625/2.75)*t+.984375)},Q=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},B=function(t){return Math.pow(t,4)},N=function(t){return Math.pow(t,.25)};function R(t,n,e,r,i,o){var u,a,s,c,f,l=0,h=0,p=0,v=function(t){return((l*t+h)*t+p)*t},y=function(t){return(3*l*t+2*h)*t+p},_=function(t){return t>=0?t:0-t};return l=1-(p=3*n)-(h=3*(r-n)-p),s=1-(f=3*e)-(c=3*(i-e)-f),u=t,a=function(t){return 1/(200*t)}(o),function(t){return((s*t+c)*t+f)*t}(function(t,n){var e,r,i,o,u,a;for(i=t,a=0;a<8;a++){if(o=v(i)-t,_(o)<n)return i;if(u=y(i),_(u)<1e-6)break;i-=o/u}if((i=t)<(e=0))return e;if(i>(r=1))return r;for(;e<r;){if(o=v(i),_(o-t)<n)return i;t>o?e=i:r=i,i=.5*(r-e)+e}return i}(u,a))}var z,U=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.25,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.25,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.75,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.75;return function(i){return R(i,t,n,e,r,1)}},$=function(t,n,e,r,i){var o=U(n,e,r,i);return o.displayName=t,o.x1=n,o.y1=e,o.x2=r,o.y2=i,kt.formulas[t]=o},L=function(t){return delete kt.formulas[t]};function V(t,n){if(!(t instanceof n))throw new TypeError(\"Cannot call a class as a function\")}function W(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function G(t){return G=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},G(t)}function H(t){return function(t){if(Array.isArray(t))return J(t)}(t)||function(t){if(\"undefined\"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,n){if(t){if(\"string\"==typeof t)return J(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return\"Object\"===e&&t.constructor&&(e=t.constructor.name),\"Map\"===e||\"Set\"===e?Array.from(t):\"Arguments\"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?J(t,n):void 0}}(t)||function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function J(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function K(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function X(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?K(Object(e),!0).forEach((function(n){Y(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):K(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}function Y(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var Z,tt,nt,et=\"linear\",rt=\"undefined\"!=typeof window?window:e.g,it=\"afterTween\",ot=\"afterTweenEnd\",ut=\"beforeTween\",at=\"tweenCreated\",st=\"function\",ct=\"string\",ft=rt.requestAnimationFrame||rt.webkitRequestAnimationFrame||rt.oRequestAnimationFrame||rt.msRequestAnimationFrame||rt.mozCancelRequestAnimationFrame&&rt.mozRequestAnimationFrame||setTimeout,lt=function(){},ht=null,pt=null,vt=X({},r),yt=function(t,n,e,r,i,o,u){var a,s,c,f=t<o?0:(t-o)/i,l=!1;for(var h in u&&u.call&&(l=!0,a=u(f)),n)l||(a=((s=u[h]).call?s:vt[s])(f)),c=e[h],n[h]=c+(r[h]-c)*a;return n},_t=function(t,n){var e=t._timestamp,r=t._currentState,i=t._delay;if(!(n<e+i)){var o=t._duration,u=t._targetState,a=e+i+o,s=n>a?a:n;t._hasEnded=s>=a;var c=o-(a-s),f=t._filters.length>0;if(t._hasEnded)return t._render(u,t._data,c),t.stop(!0);f&&t._applyFilter(ut),s<e+i?e=o=s=1:e+=i,yt(s,r,t._originalState,u,o,e,t._easing),f&&t._applyFilter(it),t._render(r,t._data,c)}},dt=function(){for(var t,n=kt.now(),e=ht;e;)t=e._next,_t(e,n),e=t},gt=Date.now||function(){return+new Date},mt=!1,bt=function(t){t&&mt||(mt=t,t&&wt())},wt=function t(){Z=gt(),mt&&ft.call(rt,t,16.666666666666668),dt()},Ot=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:et,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Array.isArray(n)){var r=U.apply(void 0,H(n));return r}var i=G(n);if(vt[n])return vt[n];if(i===ct||i===st)for(var o in t)e[o]=n;else for(var u in t)e[u]=n[u]||et;return e},St=function(t){t===ht?(ht=t._next)?ht._previous=null:pt=null:t===pt?(pt=t._previous)?pt._next=null:ht=null:(tt=t._previous,nt=t._next,tt._next=nt,nt._previous=tt),t._previous=t._next=null},jt=\"function\"==typeof Promise?Promise:null;z=Symbol.toStringTag;var kt=function(){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;V(this,t),Y(this,z,\"Promise\"),this._config={},this._data={},this._delay=0,this._filters=[],this._next=null,this._previous=null,this._timestamp=null,this._hasEnded=!1,this._resolve=null,this._reject=null,this._currentState=n||{},this._originalState={},this._targetState={},this._start=lt,this._render=lt,this._promiseCtor=jt,e&&this.setConfig(e)}var n,e;return n=t,e=[{key:\"_applyFilter\",value:function(t){for(var n=this._filters.length;n>0;n--){var e=this._filters[n-n][t];e&&e(this)}}},{key:\"tween\",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return this._isPlaying&&this.stop(),!n&&this._config||this.setConfig(n),this._pausedAtTime=null,this._timestamp=t.now(),this._start(this.get(),this._data),this._delay&&this._render(this._currentState,this._data,0),this._resume(this._timestamp)}},{key:\"setConfig\",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this._config;for(var r in n)e[r]=n[r];var i=e.promise,o=void 0===i?this._promiseCtor:i,u=e.start,a=void 0===u?lt:u,s=e.finish,c=e.render,f=void 0===c?this._config.step||lt:c,l=e.step,h=void 0===l?lt:l;this._data=e.data||e.attachment||this._data,this._isPlaying=!1,this._pausedAtTime=null,this._scheduleId=null,this._delay=n.delay||0,this._start=a,this._render=f||h,this._duration=e.duration||500,this._promiseCtor=o,s&&(this._resolve=s);var p=n.from,v=n.to,y=void 0===v?{}:v,_=this._currentState,d=this._originalState,g=this._targetState;for(var m in p)_[m]=p[m];var b=!1;for(var w in _){var O=_[w];b||G(O)!==ct||(b=!0),d[w]=O,g[w]=y.hasOwnProperty(w)?y[w]:O}if(this._easing=Ot(this._currentState,e.easing,this._easing),this._filters.length=0,b){for(var S in t.filters)t.filters[S].doesApply(this)&&this._filters.push(t.filters[S]);this._applyFilter(at)}return this}},{key:\"then\",value:function(t,n){var e=this;return this._promise=new this._promiseCtor((function(t,n){e._resolve=t,e._reject=n})),this._promise.then(t,n)}},{key:\"catch\",value:function(t){return this.then().catch(t)}},{key:\"finally\",value:function(t){return this.then().finally(t)}},{key:\"get\",value:function(){return X({},this._currentState)}},{key:\"set\",value:function(t){this._currentState=t}},{key:\"pause\",value:function(){if(this._isPlaying)return this._pausedAtTime=t.now(),this._isPlaying=!1,St(this),this}},{key:\"resume\",value:function(){return this._resume()}},{key:\"_resume\",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.now();return null===this._timestamp?this.tween():this._isPlaying?this._promise:(this._pausedAtTime&&(this._timestamp+=n-this._pausedAtTime,this._pausedAtTime=null),this._isPlaying=!0,null===ht?(ht=this,pt=this):(this._previous=pt,pt._next=this,pt=this),this)}},{key:\"seek\",value:function(n){n=Math.max(n,0);var e=t.now();return this._timestamp+n===0||(this._timestamp=e-n,_t(this,e)),this}},{key:\"stop\",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this._isPlaying)return this;this._isPlaying=!1,St(this);var n=this._filters.length>0;return t&&(n&&this._applyFilter(ut),yt(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),n&&(this._applyFilter(it),this._applyFilter(ot))),this._resolve&&this._resolve({data:this._data,state:this._currentState,tweenable:this}),this._resolve=null,this._reject=null,this}},{key:\"cancel\",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this._currentState,e=this._data,r=this._isPlaying;return r?(this._reject&&this._reject({data:e,state:n,tweenable:this}),this._resolve=null,this._reject=null,this.stop(t)):this}},{key:\"isPlaying\",value:function(){return this._isPlaying}},{key:\"hasEnded\",value:function(){return this._hasEnded}},{key:\"setScheduleFunction\",value:function(n){t.setScheduleFunction(n)}},{key:\"data\",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t&&(this._data=X({},t)),this._data}},{key:\"dispose\",value:function(){for(var t in this)delete this[t]}}],e&&W(n.prototype,e),t}();function Pt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=new kt;return n.tween(t),n.tweenable=n,n}Y(kt,\"now\",(function(){return Z})),Y(kt,\"setScheduleFunction\",(function(t){return ft=t})),Y(kt,\"filters\",{}),Y(kt,\"formulas\",vt),bt(!0);var Mt,Et,At=/(\\d|-|\\.)/,Tt=/([^\\-0-9.]+)/g,It=/[0-9.-]+/g,Ft=(Mt=It.source,Et=/,\\s*/.source,new RegExp(\"rgba?\\\\(\".concat(Mt).concat(Et).concat(Mt).concat(Et).concat(Mt,\"(\").concat(Et).concat(Mt,\")?\\\\)\"),\"g\")),xt=/^.*\\(/,Ct=/#([0-9]|[a-f]){3,6}/gi,Dt=\"VAL\",qt=function(t,n){return t.map((function(t,e){return\"_\".concat(n,\"_\").concat(e)}))};function Qt(t){return parseInt(t,16)}var Bt=function(t){return\"rgb(\".concat((n=t,3===(n=n.replace(/#/,\"\")).length&&(n=(n=n.split(\"\"))[0]+n[0]+n[1]+n[1]+n[2]+n[2]),[Qt(n.substr(0,2)),Qt(n.substr(2,2)),Qt(n.substr(4,2))]).join(\",\"),\")\");var n},Nt=function(t,n,e){var r=n.match(t),i=n.replace(t,Dt);return r&&r.forEach((function(t){return i=i.replace(Dt,e(t))})),i},Rt=function(t){for(var n in t){var e=t[n];\"string\"==typeof e&&e.match(Ct)&&(t[n]=Nt(Ct,e,Bt))}},zt=function(t){var n=t.match(It),e=n.slice(0,3).map(Math.floor),r=t.match(xt)[0];if(3===n.length)return\"\".concat(r).concat(e.join(\",\"),\")\");if(4===n.length)return\"\".concat(r).concat(e.join(\",\"),\",\").concat(n[3],\")\");throw new Error(\"Invalid rgbChunk: \".concat(t))},Ut=function(t){return t.match(It)},$t=function(t,n){var e={};return n.forEach((function(n){e[n]=t[n],delete t[n]})),e},Lt=function(t,n){return n.map((function(n){return t[n]}))},Vt=function(t,n){return n.forEach((function(n){return t=t.replace(Dt,+n.toFixed(4))})),t},Wt=function(t){for(var n in t._currentState)if(\"string\"==typeof t._currentState[n])return!0;return!1};function Gt(t){var n=t._currentState;[n,t._originalState,t._targetState].forEach(Rt),t._tokenData=function(t){var n,e,r={};for(var i in t){var o=t[i];\"string\"==typeof o&&(r[i]={formatString:(n=o,e=void 0,e=n.match(Tt),e?(1===e.length||n.charAt(0).match(At))&&e.unshift(\"\"):e=[\"\",\"\"],e.join(Dt)),chunkNames:qt(Ut(o),i)})}return r}(n)}function Ht(t){var n=t._currentState,e=t._originalState,r=t._targetState,i=t._easing,o=t._tokenData;!function(t,n){var e=function(e){var r=n[e].chunkNames,i=t[e];if(\"string\"==typeof i){var o=i.split(\" \"),u=o[o.length-1];r.forEach((function(n,e){return t[n]=o[e]||u}))}else r.forEach((function(n){return t[n]=i}));delete t[e]};for(var r in n)e(r)}(i,o),[n,e,r].forEach((function(t){return function(t,n){var e=function(e){Ut(t[e]).forEach((function(r,i){return t[n[e].chunkNames[i]]=+r})),delete t[e]};for(var r in n)e(r)}(t,o)}))}function Jt(t){var n=t._currentState,e=t._originalState,r=t._targetState,i=t._easing,o=t._tokenData;[n,e,r].forEach((function(t){return function(t,n){for(var e in n){var r=n[e],i=r.chunkNames,o=r.formatString,u=Vt(o,Lt($t(t,i),i));t[e]=Nt(Ft,u,zt)}}(t,o)})),function(t,n){for(var e in n){var r=n[e].chunkNames,i=t[r[0]];t[e]=\"string\"==typeof i?r.map((function(n){var e=t[n];return delete t[n],e})).join(\" \"):i}}(i,o)}function Kt(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function Xt(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?Kt(Object(e),!0).forEach((function(n){Yt(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Kt(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}function Yt(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var Zt=new kt,tn=kt.filters,nn=function(t,n,e,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=Xt({},t),u=Ot(t,r);for(var a in Zt._filters.length=0,Zt.set({}),Zt._currentState=o,Zt._originalState=t,Zt._targetState=n,Zt._easing=u,tn)tn[a].doesApply(Zt)&&Zt._filters.push(tn[a]);Zt._applyFilter(\"tweenCreated\"),Zt._applyFilter(\"beforeTween\");var s=yt(e,o,t,n,1,i,u);return Zt._applyFilter(\"afterTween\"),s};function en(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function rn(t,n){if(!(t instanceof n))throw new TypeError(\"Cannot call a class as a function\")}function on(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function un(t,n){var e=n.get(t);if(!e)throw new TypeError(\"attempted to get private field on non-instance\");return e.get?e.get.call(t):e.value}var an=new WeakMap,sn=function(){function t(){rn(this,t),an.set(this,{writable:!0,value:[]});for(var n=arguments.length,e=new Array(n),r=0;r<n;r++)e[r]=arguments[r];e.forEach(this.add.bind(this))}var n,e;return n=t,(e=[{key:\"add\",value:function(t){return un(this,an).push(t),t}},{key:\"remove\",value:function(t){var n=un(this,an).indexOf(t);return~n&&un(this,an).splice(n,1),t}},{key:\"empty\",value:function(){return this.tweenables.map(this.remove.bind(this))}},{key:\"isPlaying\",value:function(){return un(this,an).some((function(t){return t.isPlaying()}))}},{key:\"play\",value:function(){return un(this,an).forEach((function(t){return t.tween()})),this}},{key:\"pause\",value:function(){return un(this,an).forEach((function(t){return t.pause()})),this}},{key:\"resume\",value:function(){return this.playingTweenables.forEach((function(t){return t.resume()})),this}},{key:\"stop\",value:function(t){return un(this,an).forEach((function(n){return n.stop(t)})),this}},{key:\"tweenables\",get:function(){return function(t){if(Array.isArray(t))return en(t)}(t=un(this,an))||function(t){if(\"undefined\"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,n){if(t){if(\"string\"==typeof t)return en(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return\"Object\"===e&&t.constructor&&(e=t.constructor.name),\"Map\"===e||\"Set\"===e?Array.from(t):\"Arguments\"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?en(t,n):void 0}}(t)||function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}();var t}},{key:\"playingTweenables\",get:function(){return un(this,an).filter((function(t){return!t.hasEnded()}))}},{key:\"promises\",get:function(){return un(this,an).map((function(t){return t.then()}))}}])&&on(n.prototype,e),t}();kt.filters.token=i}},n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{}};return t[r](i,i.exports,e),i.exports}return e.d=function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},e.g=function(){if(\"object\"==typeof globalThis)return globalThis;try{return this||new Function(\"return this\")()}catch(t){if(\"object\"==typeof window)return window}}(),e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.r=function(t){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0})},e(720)}()}));\n\n},{}],3:[function(require,module,exports){\n// Circle shaped progress bar\n\nvar Shape = require('./shape');\nvar utils = require('./utils');\n\nvar Circle = function Circle(container, options) {\n    // Use two arcs to form a circle\n    // See this answer http://stackoverflow.com/a/10477334/1446092\n    this._pathTemplate =\n        'M 50,50 m 0,-{radius}' +\n        ' a {radius},{radius} 0 1 1 0,{2radius}' +\n        ' a {radius},{radius} 0 1 1 0,-{2radius}';\n\n    this.containerAspectRatio = 1;\n\n    Shape.apply(this, arguments);\n};\n\nCircle.prototype = new Shape();\nCircle.prototype.constructor = Circle;\n\nCircle.prototype._pathString = function _pathString(opts) {\n    var widthOfWider = opts.strokeWidth;\n    if (opts.trailWidth && opts.trailWidth > opts.strokeWidth) {\n        widthOfWider = opts.trailWidth;\n    }\n\n    var r = 50 - widthOfWider / 2;\n\n    return utils.render(this._pathTemplate, {\n        radius: r,\n        '2radius': r * 2\n    });\n};\n\nCircle.prototype._trailString = function _trailString(opts) {\n    return this._pathString(opts);\n};\n\nmodule.exports = Circle;\n\n},{\"./shape\":8,\"./utils\":10}],4:[function(require,module,exports){\n// Line shaped progress bar\n\nvar Shape = require('./shape');\nvar utils = require('./utils');\n\nvar Line = function Line(container, options) {\n    this._pathTemplate = options.vertical\n        ? 'M {center},100 L {center},0'\n        : 'M 0,{center} L 100,{center}';\n    Shape.apply(this, arguments);\n};\n\nLine.prototype = new Shape();\nLine.prototype.constructor = Line;\n\nLine.prototype._initializeSvg = function _initializeSvg(svg, opts) {\n    var viewBoxStr = opts.vertical\n        ? '0 0 ' + opts.strokeWidth + ' 100'\n        : '0 0 100 ' + opts.strokeWidth;\n    svg.setAttribute('viewBox', viewBoxStr);\n    svg.setAttribute('preserveAspectRatio', 'none');\n};\n\nLine.prototype._pathString = function _pathString(opts) {\n    return utils.render(this._pathTemplate, {\n        center: opts.strokeWidth / 2\n    });\n};\n\nLine.prototype._trailString = function _trailString(opts) {\n    return this._pathString(opts);\n};\n\nmodule.exports = Line;\n\n},{\"./shape\":8,\"./utils\":10}],5:[function(require,module,exports){\nmodule.exports = {\n    // Higher level API, different shaped progress bars\n    Line: require('./line'),\n    Circle: require('./circle'),\n    SemiCircle: require('./semicircle'),\n    Square: require('./square'),\n\n    // Lower level API to use any SVG path\n    Path: require('./path'),\n\n    // Base-class for creating new custom shapes\n    // to be in line with the API of built-in shapes\n    // Undocumented.\n    Shape: require('./shape'),\n\n    // Internal utils, undocumented.\n    utils: require('./utils')\n};\n\n},{\"./circle\":3,\"./line\":4,\"./path\":6,\"./semicircle\":7,\"./shape\":8,\"./square\":9,\"./utils\":10}],6:[function(require,module,exports){\n// Lower level API to animate any kind of svg path\n\nvar shifty = require('shifty');\nvar utils = require('./utils');\n\nvar Tweenable = shifty.Tweenable;\n\nvar EASING_ALIASES = {\n    easeIn: 'easeInCubic',\n    easeOut: 'easeOutCubic',\n    easeInOut: 'easeInOutCubic'\n};\n\nvar Path = function Path(path, opts) {\n    // Throw a better error if not initialized with `new` keyword\n    if (!(this instanceof Path)) {\n        throw new Error('Constructor was called without new keyword');\n    }\n\n    // Default parameters for animation\n    opts = utils.extend({\n        delay: 0,\n        duration: 800,\n        easing: 'linear',\n        from: {},\n        to: {},\n        step: function() {}\n    }, opts);\n\n    var element;\n    if (utils.isString(path)) {\n        element = document.querySelector(path);\n    } else {\n        element = path;\n    }\n\n    // Reveal .path as public attribute\n    this.path = element;\n    this._opts = opts;\n    this._tweenable = null;\n\n    // Set up the starting positions\n    var length = this.path.getTotalLength();\n    this.path.style.strokeDasharray = length + ' ' + length;\n    this.set(0);\n};\n\nPath.prototype.value = function value() {\n    var offset = this._getComputedDashOffset();\n    var length = this.path.getTotalLength();\n\n    var progress = 1 - offset / length;\n    // Round number to prevent returning very small number like 1e-30, which\n    // is practically 0\n    return parseFloat(progress.toFixed(6), 10);\n};\n\nPath.prototype.set = function set(progress) {\n    this.stop();\n\n    this.path.style.strokeDashoffset = this._progressToOffset(progress);\n\n    var step = this._opts.step;\n    if (utils.isFunction(step)) {\n        var easing = this._easing(this._opts.easing);\n        var values = this._calculateTo(progress, easing);\n        var reference = this._opts.shape || this;\n        step(values, reference, this._opts.attachment);\n    }\n};\n\nPath.prototype.stop = function stop() {\n    this._stopTween();\n    this.path.style.strokeDashoffset = this._getComputedDashOffset();\n};\n\n// Method introduced here:\n// http://jakearchibald.com/2013/animated-line-drawing-svg/\nPath.prototype.animate = function animate(progress, opts, cb) {\n    opts = opts || {};\n\n    if (utils.isFunction(opts)) {\n        cb = opts;\n        opts = {};\n    }\n\n    var passedOpts = utils.extend({}, opts);\n\n    // Copy default opts to new object so defaults are not modified\n    var defaultOpts = utils.extend({}, this._opts);\n    opts = utils.extend(defaultOpts, opts);\n\n    var shiftyEasing = this._easing(opts.easing);\n    var values = this._resolveFromAndTo(progress, shiftyEasing, passedOpts);\n\n    this.stop();\n\n    // Trigger a layout so styles are calculated & the browser\n    // picks up the starting position before animating\n    this.path.getBoundingClientRect();\n\n    var offset = this._getComputedDashOffset();\n    var newOffset = this._progressToOffset(progress);\n\n    var self = this;\n    this._tweenable = new Tweenable();\n    this._tweenable.tween({\n        from: utils.extend({ offset: offset }, values.from),\n        to: utils.extend({ offset: newOffset }, values.to),\n        duration: opts.duration,\n        delay: opts.delay,\n        easing: shiftyEasing,\n        step: function(state) {\n            self.path.style.strokeDashoffset = state.offset;\n            var reference = opts.shape || self;\n            opts.step(state, reference, opts.attachment);\n        }\n    }).then(function(state) {\n        if (utils.isFunction(cb)) {\n            cb();\n        }\n    }).catch(function(err) {\n        console.error('Error in tweening:', err);\n        throw err;\n    });\n};\n\nPath.prototype._getComputedDashOffset = function _getComputedDashOffset() {\n    var computedStyle = window.getComputedStyle(this.path, null);\n    return parseFloat(computedStyle.getPropertyValue('stroke-dashoffset'), 10);\n};\n\nPath.prototype._progressToOffset = function _progressToOffset(progress) {\n    var length = this.path.getTotalLength();\n    return length - progress * length;\n};\n\n// Resolves from and to values for animation.\nPath.prototype._resolveFromAndTo = function _resolveFromAndTo(progress, easing, opts) {\n    if (opts.from && opts.to) {\n        return {\n            from: opts.from,\n            to: opts.to\n        };\n    }\n\n    return {\n        from: this._calculateFrom(easing),\n        to: this._calculateTo(progress, easing)\n    };\n};\n\n// Calculate `from` values from options passed at initialization\nPath.prototype._calculateFrom = function _calculateFrom(easing) {\n    return shifty.interpolate(this._opts.from, this._opts.to, this.value(), easing);\n};\n\n// Calculate `to` values from options passed at initialization\nPath.prototype._calculateTo = function _calculateTo(progress, easing) {\n    return shifty.interpolate(this._opts.from, this._opts.to, progress, easing);\n};\n\nPath.prototype._stopTween = function _stopTween() {\n    if (this._tweenable !== null) {\n        this._tweenable.stop(true);\n        this._tweenable = null;\n    }\n};\n\nPath.prototype._easing = function _easing(easing) {\n    if (EASING_ALIASES.hasOwnProperty(easing)) {\n        return EASING_ALIASES[easing];\n    }\n\n    return easing;\n};\n\nmodule.exports = Path;\n\n},{\"./utils\":10,\"shifty\":2}],7:[function(require,module,exports){\n// Semi-SemiCircle shaped progress bar\n\nvar Shape = require('./shape');\nvar Circle = require('./circle');\nvar utils = require('./utils');\n\nvar SemiCircle = function SemiCircle(container, options) {\n    // Use one arc to form a SemiCircle\n    // See this answer http://stackoverflow.com/a/10477334/1446092\n    this._pathTemplate =\n        'M 50,50 m -{radius},0' +\n        ' a {radius},{radius} 0 1 1 {2radius},0';\n\n    this.containerAspectRatio = 2;\n\n    Shape.apply(this, arguments);\n};\n\nSemiCircle.prototype = new Shape();\nSemiCircle.prototype.constructor = SemiCircle;\n\nSemiCircle.prototype._initializeSvg = function _initializeSvg(svg, opts) {\n    svg.setAttribute('viewBox', '0 0 100 50');\n};\n\nSemiCircle.prototype._initializeTextContainer = function _initializeTextContainer(\n    opts,\n    container,\n    textContainer\n) {\n    if (opts.text.style) {\n        // Reset top style\n        textContainer.style.top = 'auto';\n        textContainer.style.bottom = '0';\n\n        if (opts.text.alignToBottom) {\n            utils.setStyle(textContainer, 'transform', 'translate(-50%, 0)');\n        } else {\n            utils.setStyle(textContainer, 'transform', 'translate(-50%, 50%)');\n        }\n    }\n};\n\n// Share functionality with Circle, just have different path\nSemiCircle.prototype._pathString = Circle.prototype._pathString;\nSemiCircle.prototype._trailString = Circle.prototype._trailString;\n\nmodule.exports = SemiCircle;\n\n},{\"./circle\":3,\"./shape\":8,\"./utils\":10}],8:[function(require,module,exports){\n// Base object for different progress bar shapes\n\nvar Path = require('./path');\nvar utils = require('./utils');\n\nvar DESTROYED_ERROR = 'Object is destroyed';\n\nvar Shape = function Shape(container, opts) {\n    // Throw a better error if progress bars are not initialized with `new`\n    // keyword\n    if (!(this instanceof Shape)) {\n        throw new Error('Constructor was called without new keyword');\n    }\n\n    // Prevent calling constructor without parameters so inheritance\n    // works correctly. To understand, this is how Shape is inherited:\n    //\n    //   Line.prototype = new Shape();\n    //\n    // We just want to set the prototype for Line.\n    if (arguments.length === 0) {\n        return;\n    }\n\n    // Default parameters for progress bar creation\n    this._opts = utils.extend({\n        color: '#555',\n        strokeWidth: 1.0,\n        trailColor: null,\n        trailWidth: null,\n        fill: null,\n        text: {\n            style: {\n                color: null,\n                position: 'absolute',\n                left: '50%',\n                top: '50%',\n                padding: 0,\n                margin: 0,\n                transform: {\n                    prefix: true,\n                    value: 'translate(-50%, -50%)'\n                }\n            },\n            autoStyleContainer: true,\n            alignToBottom: true,\n            value: null,\n            className: 'progressbar-text'\n        },\n        svgStyle: {\n            display: 'block',\n            width: '100%'\n        },\n        warnings: false\n    }, opts, true);  // Use recursive extend\n\n    // If user specifies e.g. svgStyle or text style, the whole object\n    // should replace the defaults to make working with styles easier\n    if (utils.isObject(opts) && opts.svgStyle !== undefined) {\n        this._opts.svgStyle = opts.svgStyle;\n    }\n    if (utils.isObject(opts) && utils.isObject(opts.text) && opts.text.style !== undefined) {\n        this._opts.text.style = opts.text.style;\n    }\n\n    var svgView = this._createSvgView(this._opts);\n\n    var element;\n    if (utils.isString(container)) {\n        element = document.querySelector(container);\n    } else {\n        element = container;\n    }\n\n    if (!element) {\n        throw new Error('Container does not exist: ' + container);\n    }\n\n    this._container = element;\n    this._container.appendChild(svgView.svg);\n    if (this._opts.warnings) {\n        this._warnContainerAspectRatio(this._container);\n    }\n\n    if (this._opts.svgStyle) {\n        utils.setStyles(svgView.svg, this._opts.svgStyle);\n    }\n\n    // Expose public attributes before Path initialization\n    this.svg = svgView.svg;\n    this.path = svgView.path;\n    this.trail = svgView.trail;\n    this.text = null;\n\n    var newOpts = utils.extend({\n        attachment: undefined,\n        shape: this\n    }, this._opts);\n    this._progressPath = new Path(svgView.path, newOpts);\n\n    if (utils.isObject(this._opts.text) && this._opts.text.value !== null) {\n        this.setText(this._opts.text.value);\n    }\n};\n\nShape.prototype.animate = function animate(progress, opts, cb) {\n    if (this._progressPath === null) {\n        throw new Error(DESTROYED_ERROR);\n    }\n\n    this._progressPath.animate(progress, opts, cb);\n};\n\nShape.prototype.stop = function stop() {\n    if (this._progressPath === null) {\n        throw new Error(DESTROYED_ERROR);\n    }\n\n    // Don't crash if stop is called inside step function\n    if (this._progressPath === undefined) {\n        return;\n    }\n\n    this._progressPath.stop();\n};\n\nShape.prototype.pause = function pause() {\n    if (this._progressPath === null) {\n        throw new Error(DESTROYED_ERROR);\n    }\n\n    if (this._progressPath === undefined) {\n        return;\n    }\n\n    if (!this._progressPath._tweenable) {\n        // It seems that we can't pause this\n        return;\n    }\n\n    this._progressPath._tweenable.pause();\n};\n\nShape.prototype.resume = function resume() {\n    if (this._progressPath === null) {\n        throw new Error(DESTROYED_ERROR);\n    }\n\n    if (this._progressPath === undefined) {\n        return;\n    }\n\n    if (!this._progressPath._tweenable) {\n        // It seems that we can't resume this\n        return;\n    }\n\n    this._progressPath._tweenable.resume();\n};\n\nShape.prototype.destroy = function destroy() {\n    if (this._progressPath === null) {\n        throw new Error(DESTROYED_ERROR);\n    }\n\n    this.stop();\n    this.svg.parentNode.removeChild(this.svg);\n    this.svg = null;\n    this.path = null;\n    this.trail = null;\n    this._progressPath = null;\n\n    if (this.text !== null) {\n        this.text.parentNode.removeChild(this.text);\n        this.text = null;\n    }\n};\n\nShape.prototype.set = function set(progress) {\n    if (this._progressPath === null) {\n        throw new Error(DESTROYED_ERROR);\n    }\n\n    this._progressPath.set(progress);\n};\n\nShape.prototype.value = function value() {\n    if (this._progressPath === null) {\n        throw new Error(DESTROYED_ERROR);\n    }\n\n    if (this._progressPath === undefined) {\n        return 0;\n    }\n\n    return this._progressPath.value();\n};\n\nShape.prototype.setText = function setText(newText) {\n    if (this._progressPath === null) {\n        throw new Error(DESTROYED_ERROR);\n    }\n\n    if (this.text === null) {\n        // Create new text node\n        this.text = this._createTextContainer(this._opts, this._container);\n        this._container.appendChild(this.text);\n    }\n\n    // Remove previous text and add new\n    if (utils.isObject(newText)) {\n        utils.removeChildren(this.text);\n        this.text.appendChild(newText);\n    } else {\n        this.text.innerHTML = newText;\n    }\n};\n\nShape.prototype._createSvgView = function _createSvgView(opts) {\n    var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n    this._initializeSvg(svg, opts);\n\n    var trailPath = null;\n    // Each option listed in the if condition are 'triggers' for creating\n    // the trail path\n    if (opts.trailColor || opts.trailWidth) {\n        trailPath = this._createTrail(opts);\n        svg.appendChild(trailPath);\n    }\n\n    var path = this._createPath(opts);\n    svg.appendChild(path);\n\n    return {\n        svg: svg,\n        path: path,\n        trail: trailPath\n    };\n};\n\nShape.prototype._initializeSvg = function _initializeSvg(svg, opts) {\n    svg.setAttribute('viewBox', '0 0 100 100');\n};\n\nShape.prototype._createPath = function _createPath(opts) {\n    var pathString = this._pathString(opts);\n    return this._createPathElement(pathString, opts);\n};\n\nShape.prototype._createTrail = function _createTrail(opts) {\n    // Create path string with original passed options\n    var pathString = this._trailString(opts);\n\n    // Prevent modifying original\n    var newOpts = utils.extend({}, opts);\n\n    // Defaults for parameters which modify trail path\n    if (!newOpts.trailColor) {\n        newOpts.trailColor = '#eee';\n    }\n    if (!newOpts.trailWidth) {\n        newOpts.trailWidth = newOpts.strokeWidth;\n    }\n\n    newOpts.color = newOpts.trailColor;\n    newOpts.strokeWidth = newOpts.trailWidth;\n\n    // When trail path is set, fill must be set for it instead of the\n    // actual path to prevent trail stroke from clipping\n    newOpts.fill = null;\n\n    return this._createPathElement(pathString, newOpts);\n};\n\nShape.prototype._createPathElement = function _createPathElement(pathString, opts) {\n    var path = document.createElementNS('http://www.w3.org/2000/svg', 'path');\n    path.setAttribute('d', pathString);\n    path.setAttribute('stroke', opts.color);\n    path.setAttribute('stroke-width', opts.strokeWidth);\n\n    if (opts.fill) {\n        path.setAttribute('fill', opts.fill);\n    } else {\n        path.setAttribute('fill-opacity', '0');\n    }\n\n    return path;\n};\n\nShape.prototype._createTextContainer = function _createTextContainer(opts, container) {\n    var textContainer = document.createElement('div');\n    textContainer.className = opts.text.className;\n\n    var textStyle = opts.text.style;\n    if (textStyle) {\n        if (opts.text.autoStyleContainer) {\n            container.style.position = 'relative';\n        }\n\n        utils.setStyles(textContainer, textStyle);\n        // Default text color to progress bar's color\n        if (!textStyle.color) {\n            textContainer.style.color = opts.color;\n        }\n    }\n\n    this._initializeTextContainer(opts, container, textContainer);\n    return textContainer;\n};\n\n// Give custom shapes possibility to modify text element\nShape.prototype._initializeTextContainer = function(opts, container, element) {\n    // By default, no-op\n    // Custom shapes should respect API options, such as text.style\n};\n\nShape.prototype._pathString = function _pathString(opts) {\n    throw new Error('Override this function for each progress bar');\n};\n\nShape.prototype._trailString = function _trailString(opts) {\n    throw new Error('Override this function for each progress bar');\n};\n\nShape.prototype._warnContainerAspectRatio = function _warnContainerAspectRatio(container) {\n    if (!this.containerAspectRatio) {\n        return;\n    }\n\n    var computedStyle = window.getComputedStyle(container, null);\n    var width = parseFloat(computedStyle.getPropertyValue('width'), 10);\n    var height = parseFloat(computedStyle.getPropertyValue('height'), 10);\n    if (!utils.floatEquals(this.containerAspectRatio, width / height)) {\n        console.warn(\n            'Incorrect aspect ratio of container',\n            '#' + container.id,\n            'detected:',\n            computedStyle.getPropertyValue('width') + '(width)',\n            '/',\n            computedStyle.getPropertyValue('height') + '(height)',\n            '=',\n            width / height\n        );\n\n        console.warn(\n            'Aspect ratio of should be',\n            this.containerAspectRatio\n        );\n    }\n};\n\nmodule.exports = Shape;\n\n},{\"./path\":6,\"./utils\":10}],9:[function(require,module,exports){\n// Square shaped progress bar\n// Note: Square is not core part of API anymore. It's left here\n//       for reference. square is not included to the progressbar\n//       build anymore\n\nvar Shape = require('./shape');\nvar utils = require('./utils');\n\nvar Square = function Square(container, options) {\n    this._pathTemplate =\n        'M 0,{halfOfStrokeWidth}' +\n        ' L {width},{halfOfStrokeWidth}' +\n        ' L {width},{width}' +\n        ' L {halfOfStrokeWidth},{width}' +\n        ' L {halfOfStrokeWidth},{strokeWidth}';\n\n    this._trailTemplate =\n        'M {startMargin},{halfOfStrokeWidth}' +\n        ' L {width},{halfOfStrokeWidth}' +\n        ' L {width},{width}' +\n        ' L {halfOfStrokeWidth},{width}' +\n        ' L {halfOfStrokeWidth},{halfOfStrokeWidth}';\n\n    Shape.apply(this, arguments);\n};\n\nSquare.prototype = new Shape();\nSquare.prototype.constructor = Square;\n\nSquare.prototype._pathString = function _pathString(opts) {\n    var w = 100 - opts.strokeWidth / 2;\n\n    return utils.render(this._pathTemplate, {\n        width: w,\n        strokeWidth: opts.strokeWidth,\n        halfOfStrokeWidth: opts.strokeWidth / 2\n    });\n};\n\nSquare.prototype._trailString = function _trailString(opts) {\n    var w = 100 - opts.strokeWidth / 2;\n\n    return utils.render(this._trailTemplate, {\n        width: w,\n        strokeWidth: opts.strokeWidth,\n        halfOfStrokeWidth: opts.strokeWidth / 2,\n        startMargin: opts.strokeWidth / 2 - opts.trailWidth / 2\n    });\n};\n\nmodule.exports = Square;\n\n},{\"./shape\":8,\"./utils\":10}],10:[function(require,module,exports){\n// Utility functions\n\nvar merge = require('lodash.merge');\n\nvar PREFIXES = 'Webkit Moz O ms'.split(' ');\nvar FLOAT_COMPARISON_EPSILON = 0.001;\n\n// Renders templates with given variables. Variables must be surrounded with\n// braces without any spaces, e.g. {variable}\n// All instances of variable placeholders will be replaced with given content\n// Example:\n// render('Hello, {message}!', {message: 'world'})\nfunction render(template, vars) {\n    var rendered = template;\n\n    for (var key in vars) {\n        if (vars.hasOwnProperty(key)) {\n            var val = vars[key];\n            var regExpString = '\\\\{' + key + '\\\\}';\n            var regExp = new RegExp(regExpString, 'g');\n\n            rendered = rendered.replace(regExp, val);\n        }\n    }\n\n    return rendered;\n}\n\nfunction setStyle(element, style, value) {\n    var elStyle = element.style;  // cache for performance\n\n    for (var i = 0; i < PREFIXES.length; ++i) {\n        var prefix = PREFIXES[i];\n        elStyle[prefix + capitalize(style)] = value;\n    }\n\n    elStyle[style] = value;\n}\n\nfunction setStyles(element, styles) {\n    forEachObject(styles, function(styleValue, styleName) {\n        // Allow disabling some individual styles by setting them\n        // to null or undefined\n        if (styleValue === null || styleValue === undefined) {\n            return;\n        }\n\n        // If style's value is {prefix: true, value: '50%'},\n        // Set also browser prefixed styles\n        if (isObject(styleValue) && styleValue.prefix === true) {\n            setStyle(element, styleName, styleValue.value);\n        } else {\n            element.style[styleName] = styleValue;\n        }\n    });\n}\n\nfunction capitalize(text) {\n    return text.charAt(0).toUpperCase() + text.slice(1);\n}\n\nfunction isString(obj) {\n    return typeof obj === 'string' || obj instanceof String;\n}\n\nfunction isFunction(obj) {\n    return typeof obj === 'function';\n}\n\nfunction isArray(obj) {\n    return Object.prototype.toString.call(obj) === '[object Array]';\n}\n\n// Returns true if `obj` is object as in {a: 1, b: 2}, not if it's function or\n// array\nfunction isObject(obj) {\n    if (isArray(obj)) {\n        return false;\n    }\n\n    var type = typeof obj;\n    return type === 'object' && !!obj;\n}\n\nfunction forEachObject(object, callback) {\n    for (var key in object) {\n        if (object.hasOwnProperty(key)) {\n            var val = object[key];\n            callback(val, key);\n        }\n    }\n}\n\nfunction floatEquals(a, b) {\n    return Math.abs(a - b) < FLOAT_COMPARISON_EPSILON;\n}\n\n// https://coderwall.com/p/nygghw/don-t-use-innerhtml-to-empty-dom-elements\nfunction removeChildren(el) {\n    while (el.firstChild) {\n        el.removeChild(el.firstChild);\n    }\n}\n\nmodule.exports = {\n    extend: merge,\n    render: render,\n    setStyle: setStyle,\n    setStyles: setStyles,\n    capitalize: capitalize,\n    isString: isString,\n    isFunction: isFunction,\n    isObject: isObject,\n    forEachObject: forEachObject,\n    floatEquals: floatEquals,\n    removeChildren: removeChildren\n};\n\n},{\"lodash.merge\":1}]},{},[5])(5)\n});\n"
  },
  {
    "path": "docs/api/general.md",
    "content": "Functions use node-style callback convention. Callback function is always the last given parameter.\n\nShapes have different SVG canvas sizes:\n\nShape      | Canvas size\n-----------|------------------------\nCircle     | `100x100`\nSemiCircle | `100x50`\nLine       | `100x{opts.strokeWidth}`\n\nAll shapes are fitted exactly to their canvases.\n\n**Important:** make sure that your container has same aspect ratio\nas the SVG canvas. For example: if you are using SemiCircle,\nset e.g.\n\n```css\n#container {\n    width: 300px;\n    height: 150px;\n}\n```\n\n## HTML structure\n\nAs an example, we'll use these options:\n\n```js\nvar circle = new ProgressBar.Circle('#example-percent-container', {\n    color: '#FCB03C',\n    strokeWidth: 3,\n    trailWidth: 1,\n    text: {\n        value: '0'\n    }\n});\n```\n\nThey would produce the following HTML.\n\n```html\n<!-- If text is set, position: relative will be applied for the container -->\n<div id=\"container\" style=\"position: relative;\">\n\n    <!-- The actual progress bar SVG -->\n    <svg viewBox=\"0 0 100 100\">\n        <!-- Trail path -->\n        <path d=\"M 50,50 m 0,-48.5 a 48.5,48.5 0 1 1 0,97 a 48.5,48.5 0 1 1 0,-97\" stroke=\"#eee\" stroke-width=\"1\" fill-opacity=\"0\"></path>\n\n        <!-- Actual progress bar path -->\n        <path d=\"M 50,50 m 0,-48.5 a 48.5,48.5 0 1 1 0,97 a 48.5,48.5 0 1 1 0,-97\" stroke=\"#FCB03C\" stroke-width=\"3\" fill-opacity=\"0\" style=\"stroke-dasharray: 304.844360351563px, 304.844360351563px; stroke-dashoffset: 304.844360351563px;\"></path>\n    </svg>\n\n    <!-- Text element created when text option is set -->\n    <p class=\"progressbar-text\" style=\"position: absolute; top: 50%; left: 50%; padding: 0px; margin: 0px; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); color: rgb(252, 176, 60);\">0</p>\n</div>\n```\n"
  },
  {
    "path": "docs/api/parameters.md",
    "content": "\n# Easing\n\nEasing functions [provided with *shifty* are supported](https://github.com/jeremyckahn/shifty/blob/master/src/shifty.formulas.js).\n\nA few basic easing options:\n\n* `'linear'`\n* `'easeIn'`\n* `'easeOut'`\n* `'easeInOut'`\n\nYou can also provide an custom easing function.\n\n# {custom-animations} Custom animations\n\nSee [example in demo page](https://kimmobrunfeldt.github.io/progressbar.js#example-custom-animation).\n\nCustomizing animations is possible with the help of `from`, `to` and `step` parameters.\nTweening engine changes defined values over time and calls step function for each animation's frame.\n\n!!! note\n    There's a big difference between passing the `from` and `to` parameters in initialization\n    of progress bar compared to passing in `.animate()` call. Here's example code and illustrations to explain the difference:\n\n**Pass in initialization**\n\n```javascript\nvar bar = new ProgressBar.Line('#container', {\n    from: { color: '#000 '},\n    to: { color: '#888 '},\n    step: function(state, bar, attachment) {\n        bar.path.setAttribute('stroke', state.color);\n    }\n});\n```\n\n![](../img/animate-init.png)\n\n\n**Pass in `.animate()` call**\n\n```javascript\nvar bar = new ProgressBar.Line('#container', {\n    step: function(state, bar, attachment) {\n        bar.path.setAttribute('stroke', state.color);\n    }\n});\n\nvar opts = {\n    from: { color: '#000 '},\n    to: { color: '#888'}\n};\nbar.animate(0.5, opts);\n```\n\n![](../img/animate-call.png)\n\n\n## `from` parameter\n\nObject containing values which should be tweened.\n\nThese values represent the starting values of the animation. Default: `{}`.\n\nFor example\n\n```javascript\n{\n    // Start from thin gray line\n    width: 0.1,\n    color: '#eee'\n}\n```\n\nThanks to shifty, you can tween values in formats like `translateX(45px)`, `rgb(0,255,0)` and `#fff`.\nSee all supported string formats from [shifty's documentation](http://jeremyckahn.github.io/shifty/dist/doc/modules/Tweenable.token.html)\n\nEasing defined as option for animation applies to all of the specified values.\n\n\n## `to` parameter\n\nObject containing values which should be tweened. These represent the final values after animation is done. Default: `{}`.\n\nFor example\n\n```javascript\n{\n    // Finish to thick black line\n    width: 1,\n    color: '#000'\n}\n```\n\n*Signature must match `from`*\n\n\n## `step` parameter\n\nFunction called for each animation step. Tweened values, a reference to the path or shape, and an attachment are passed as parameters. Attachment can be reference to any object you need to modify within step function. Default: `function() {}`.\n\n!!! warning\n    This function is called multiple times per second.\n    To make sure animations run smoothly, keep it minimal.\n\nFor example\n\n```javascript\nfunction(state, shape, attachment) {\n    shape.path.setAttribute('stroke-width', state.width);\n    shape.path.setAttribute('stroke', state.color);\n    attachment.text.innerHTML = shape.value() * 100;\n}\n```\n"
  },
  {
    "path": "docs/api/path.md",
    "content": "# new Path(path, [*options*])\n\nCustom shaped progress bar. You can create arbitrary shaped progress bars by\npassing a SVG path created with e.g. Adobe Illustrator. It's on caller's responsibility to append SVG to DOM.\n\n!!! note\n\n    Remember to add e.g. `stroke=\"1\"` and `fill-opacity=\"0\"` attributes for the SVG path.\n    They will reveal the true shape of the path.\n\n**Example**\n\nAssuming there was SVG object with heart shaped path in HTML\n\n```html\n<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" x=\"0px\" y=\"0px\" viewBox=\"0 0 100 100\">\n    <path fill-opacity=\"0\" stroke-width=\"0.5\" stroke=\"#f4f4f4\" d=\"M81.495,13.923c-11.368-5.261-26.234-0.311-31.489,11.032C44.74,13.612,29.879,8.657,18.511,13.923  C6.402,19.539,0.613,33.883,10.175,50.804c6.792,12.04,18.826,21.111,39.831,37.379c20.993-16.268,33.033-25.344,39.819-37.379  C99.387,33.883,93.598,19.539,81.495,13.923z\"/>\n    <path id=\"heart-path\" fill-opacity=\"0\" stroke-width=\"0.6\" stroke=\"#555\" d=\"M81.495,13.923c-11.368-5.261-26.234-0.311-31.489,11.032C44.74,13.612,29.879,8.657,18.511,13.923  C6.402,19.539,0.613,33.883,10.175,50.804c6.792,12.04,18.826,21.111,39.831,37.379c20.993-16.268,33.033-25.344,39.819-37.379  C99.387,33.883,93.598,19.539,81.495,13.923z\"/>\n</svg>\n```\n\nInitialization would be this easy\n\n```javascript\nvar svgPath = document.getElementById('heart-path');\nvar path = new ProgressBar.Path(svgPath, {\n    duration: 300\n});\n```\n\n**Working with embedded SVG**\n\nIf the SVG was not inline in the HTML but instead in, say,\nan `<object>` tag, we'd have to take extra steps to wait until it has loaded\nand then access it differently since it's in a separate DOM tree.\nGiven e.g.:\n\n```html\n<object id=\"heart\" type=\"image/svg+xml\" data=\"heart.svg\">No SVG support :(</object>\n```\n\nwe could do\n\n```javascript\nvar heart = document.getElementById('heart');\nheart.addEventListener('load', function() {\nvar path = new ProgressBar.Path(heartObject.contentDocument.querySelector('#heart-path'), {\n    duration: 300\n});\n```\n\n**Parameters**\n\n* `path` [SVG Path](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) object or plain selector string. For example `$('svg > path:first-child')[0]`.\n* `options` Animation options.\n\n    ```javascript\n    {\n        // Duration for animation in milliseconds\n        // Default: 800\n        duration: 1200,\n\n        // Delay for animation in milliseconds\n        // Default: 0\n        delay: 100,\n\n        // Easing for animation. See #easing section.\n        // Default: 'linear'\n        easing: 'easeIn',\n\n        // Attachment which can be any object\n        // you need to modify within the step function.\n        // Passed as a parameter to step function.\n        // Default: undefined\n        attachment: document.querySelector('#container > svg'),\n\n        // See #custom-animations section\n        from: { color: '#eee' },\n        to: { color: '#000' },\n        step: function(state, path, attachment) {\n            // Do any modifications to attachment and/or path attributes\n        }\n    }\n    ```\n\n## .path\n\nReference to [SVG path](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/path) which presents the actual progress bar.\n\n## .animate(progress, [*options*], [*cb*])\n\nAnimates drawing of path.\n\n**Example**\n\n```javascript\npath.animate(0.3, {\n    duration: 800\n}, function() {\n    console.log('Animation has finished');\n});\n```\n\n**Parameters**\n\n* `progress` progress from 0 to 1.\n* `options` Animation options. These options override the defaults given in initialization.\n\n    ```javascript\n    {\n        // Duration for animation in milliseconds\n        // Default: 800\n        duration: 1200,\n\n        // Delay for animation in milliseconds\n        // Default: 0\n        delay: 100,\n\n        // Easing for animation. See #easing section.\n        // Default: 'linear'\n        easing: 'easeOut',\n\n        // Attachment which can be any object\n        // you need to modify within the step function.\n        // Passed as a parameter to step function.\n        // Default: undefined\n        attachment: document.querySelector('#container > svg'),\n\n        // See #custom-animations section\n        from: { color: '#eee' },\n        to: { color: '#000' },\n        step: function(state, path, attachment) {\n            // Do any modifications to attachment and/or path attributes\n        }\n    }\n    ```\n\n* `cb` Callback function which is called after transition ends.\n\n## .pause()\n\nSuspends animation at its current position.\n\n## .resume()\n\nResumes animation from a previously paused position.\n\n## .set(progress)\n\nSet progress instantly without animation. Clears all transitions\nfor path.\n\n## .stop()\n\nStops animation to its current position.\n\n## .value()\n\nReturns current shown progress from 0 to 1. This value changes when animation is running.\n"
  },
  {
    "path": "docs/api/shape.md",
    "content": "!!! note\n\n    Line, Circle and SemiCircle all point to the same\n    documentation which is named Shape. You should\n    replace it(Shape) with Line, Circle or SemiCircle.\n\n    **Example:** if documentation states `Shape.animate()`, replace it with\n    `Circle.animate()`, simple. Shape is the base object for all\n    progress bars.\n\n# new Shape(container, [*options*])\n\nLine, Circle or SemiCircle shaped progress bar. Appends SVG to container.\n\n**Example**\n\n```javascript\nvar progressBar = new ProgressBar.Circle('#container', {\n    strokeWidth: 2\n});\n```\n\nWith Line shape, you can control the width of the line by specifying e.g. `height: 5px`\nwith CSS.\n\n**Parameters**\n\n* `container` Element where SVG is added. Query string or element.\n\n    For example `'#container'` or `document.getElementById('#container')`\n\n* `options` Options for path drawing.\n\n    ```js\n    {\n        // Stroke color.\n        // Default: '#555'\n        color: '#3a3a3a',\n\n        // Width of the stroke.\n        // Unit is percentage of SVG canvas' size.\n        // Default: 1.0\n        // NOTE: In Line shape, you should control\n        // the stroke width by setting container's height.\n        // WARNING: IE doesn't support values over 6, see this bug:\n        //          https://github.com/kimmobrunfeldt/progressbar.js/issues/79\n        strokeWidth: 2.1,\n\n        // If trail options are not defined, trail won't be drawn\n\n        // Color for lighter trail stroke\n        // underneath the actual progress path.\n        // Default: '#eee'\n        trailColor: '#f4f4f4',\n\n        // Width of the trail stroke. Trail is always centered relative to\n        // actual progress path.\n        // Default: same as strokeWidth\n        trailWidth: 0.8,\n\n        // Inline CSS styles for the created SVG element\n        // Set null to disable all default styles.\n        // You can disable individual defaults by setting them to `null`\n        // If you specify anything in this object, none of the default styles\n        // apply\n        svgStyle: {\n            display: 'block',\n\n            // Important: make sure that your container has same\n            // aspect ratio as the SVG canvas. See SVG canvas sizes above.\n            width: '100%'\n        },\n\n        // Text options. Text element is a <p> element appended to container\n        // You can add CSS rules for the text element with the className\n        // NOTE: When text is set, 'position: relative' will be set to the\n        // container for centering. You can also prevent all default inline\n        // styles with 'text.style: null'\n        // Default: null\n        text: {\n            // Initial value for text.\n            // Default: null\n            value: 'Text',\n\n            // Class name for text element.\n            // Default: 'progressbar-text'\n            className: 'progressbar__label',\n\n            // Inline CSS styles for the text element.\n            // If you want to modify all CSS your self, set null to disable\n            // all default styles.\n            // If the style option contains values, container is automatically\n            // set to position: relative. You can disable behavior this with\n            // autoStyleContainer: false\n            // If you specify anything in this object, none of the default styles\n            // apply\n            // Default: object speficied below\n            style: {\n                // Text color.\n                // Default: same as stroke color (options.color)\n                color: '#f00',\n                position: 'absolute',\n                left: '50%',\n                top: '50%',\n                padding: 0,\n                margin: 0,\n                // You can specify styles which will be browser prefixed\n                transform: {\n                    prefix: true,\n                    value: 'translate(-50%, -50%)'\n                }\n            },\n\n            // Only effective if the text.style is not null\n            // By default position: relative is applied to container if text\n            // is set. Setting this to false disables that feature.\n            autoStyleContainer: true,\n\n            // Only effective if the shape is SemiCircle.\n            // If true, baseline for text is aligned with bottom of\n            // the SVG canvas. If false, bottom line of SVG canvas\n            // is in the center of text.\n            // Default: true\n            alignToBottom: true\n        },\n\n        // Fill color for the shape. If null, no fill.\n        // Default: null\n        fill: 'rgba(0, 0, 0, 0.5)',\n\n        // Duration for animation in milliseconds\n        // Default: 800\n        duration: 1200,\n\n        // Delay for animation in milliseconds\n        // Default: 0\n        delay: 100,\n\n        // Easing for animation. See #easing section.\n        // Default: 'linear'\n        easing: 'easeOut',\n\n        // See #custom-animations section\n        // Built-in shape passes reference to itself and a custom attachment\n        // object to step function\n        from: { color: '#eee' },\n        to: { color: '#000' },\n        step: function(state, circle, attachment) {\n            circle.path.setAttribute('stroke', state.color);\n        },\n\n        // If true, some useful console.warn calls will be done if it seems\n        // that progressbar is used incorrectly\n        // Default: false\n        warnings: false\n    }\n    ```\n\n## .svg\n\nReference to [SVG](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/svg) element where progress bar is drawn.\n\n## .path\n\nReference to [SVG path](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/path) which presents the actual progress bar.\n\n## .trail\n\nReference to [SVG path](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/path) which presents the trail of the progress bar.\nReturns `null` if trail is not defined.\n\n## {text} .text\n\nReference to [p element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/p) which presents the text label for progress bar.\nReturns `null` if text is not defined.\n\n## .animate(progress, [*options*], [*cb*])\n\nAnimates drawing of a shape.\n\n**Example**\n\n```javascript\nprogressBar.animate(0.3, {\n    duration: 800\n}, function() {\n    console.log('Animation has finished');\n});\n```\n\n**Parameters**\n\n* `progress` progress from 0 to 1.\n* `options` Animation options. These options override the defaults given in initialization.\n\n    ```javascript\n    {\n        // Duration for animation in milliseconds\n        // Default: 800\n        duration: 1200,\n\n        // Delay for animation in milliseconds\n        // Default: 0\n        delay: 100,\n\n        // Easing for animation. See #easing section.\n        // Default: 'linear'\n        easing: 'easeInOut',\n\n        // See #custom-animations section\n        // Built-in shape passes reference to itself and a custom attachment\n        // object to step function\n        from: { color: '#eee' },\n        to: { color: '#000' },\n        step: function(state, circle, attachment) {\n            circle.path.setAttribute('stroke', state.color);\n        }\n    }\n    ```\n\n* `cb` Callback function which is called after animation ends.\n\n## .set(progress)\n\nSets progress instantly without animation. Clears all animations\nfor path.\n\n## .stop()\n\nStops animation to its current position.\n\n## .value()\n\nReturns current shown progress from 0 to 1. This value changes when animation is running.\n\n## .setText(text)\n\nSets text to given a string. If you need to dynamically modify the text element,\nsee [.text](#text) attribute.\n\n## .destroy()\n\nRemoves SVG element from container and removes all references to DOM elements. Destroying is irreversible.\n"
  },
  {
    "path": "docs/contributing.md",
    "content": "# Contribution documentation\n\nPull requests and contributions are warmly welcome.\nPlease follow existing code style and commit message conventions. Also remember to keep documentation\nupdated.\n\n**Pull requests:** You don't need to bump version numbers or modify anything related to releasing. That stuff is fully automated, just write the functionality.\n\n## Get started with documentation\n\nDocumentation is written in markdown and [mkdocs](https://github.com/mkdocs/mkdocs) is used\nto build documentation site. [ReadTheDocs](https://readthedocs.org/projects/progressbarjs/)\nprovides hosting for the documentation site and builds the documentation on each\ncommit.\n\nTo locally develop documentation, you need to install mkdocs and requirements specified\nin pip-requirements.txt. After that you can run `mkdocs serve`.\n\n## Get started with development\n\n* [Install local environment](#install-environment).\n* `cd local-dev` and serve folder to browser\n* Open another terminal to project root and run `grunt watch`.\n\nThen you can edit `src/progressbar.js` and changes can be tested in browser.\nEdit `local-dev/main.js` to your testing needs.\n\nShorter way to do local development is running: ```npm run dev```.\n\n## General project stuff\n\nThis package uses npm/node tools just in the developer environment. Grunt is used as a task runner\nbut there's no reason it couldn't be replaced with e.g. Makefile\n\n*ProgressBar.js* depends on tweening library called [shifty](https://github.com/jeremyckahn/shifty).\n*Shifty* is bundled inside the scripts in [dist/](https://github.com/kimmobrunfeldt/progressbar.js/blob/master/dist) directory.\nDependency is bundled in to ease using the library.\n\n#### Versioning\n\nVersioning follows [Semantic Versioning 2.0.0](http://semver.org/). The release script makes sure\nthat for each release, there exists only one commit in history where version number in *bower.json*\nmatches the release's version. That commit is tagged as the release, for example `0.4.1`. Commits after that have -dev suffix(*0.4.1-dev*) in the version number to avoid any possible confusion.\n\nIn other words, if you look into *bower.json*, you can tell if the code base is a released version or not.\n\n\n## {install-environment} Install environment\n\nInstall tools needed for development:\n\n    npm install\n    npm install -g watchify\n    npm install -g browserify\n\nFor testing:\n\n    npm install -g mocha\n    npm install -g testem\n\n\n## Test\n\nTests are written with [Mocha](http://mochajs.org/) + [expect.js](https://github.com/LearnBoost/expect.js/).\nSometimes the tests fail even though they actually work on the browser. That might be cause of setTimeouts used\nin tests.\n\nQuickly run tests:\n\n    grunt test\n\nThis will use testem to run tests with Chrome. Other options specified below.\n\n#### Testem\n\n[Testem](https://github.com/airportyh/testem) is used for running tests locally. It is fast and easy to use.\nList of example commands:\n\n* `testem` Serves testing page so that you can connect any browser to it.\n* `testem ci` Runs tests an all available/detected local browsers.\n* `testem ci -R dot -l chrome` Runs tests with Chrome using dot reported.\n\n#### Karma\n\n[Karma](http://karma-runner.github.io/) is used for running tests to be executed in Sauce Labs.\nKarma was used because integrating it to Sauce Labs is easier than with Testem.\n\nYou must setup `SAUCE_USERNAME` and `SAUCE_ACCESS_KEY` environment variables.\nSee [karma-sauce-launcher project documentation](https://github.com/karma-runner/karma-sauce-launcher#username). Browsers used to test are specified in [karma.conf.js](karma.conf.js).\n\nYou can run tests with all browsers:\n\n    grunt karma\n\nTests are run sequentially in batches of browsers to prevent timeouts in Sauce Labs.\nYou can also run single set of browsers to see test results faster:\n\n    grunt karma:sauce0\n\n\n## Release\n\n**Before releasing, make sure there are no uncommitted files,\ntests pass and jshint gives no errors.**\n\nCreating a new release of the package is simple:\n\n1. Commit and push all changes\n2. Run local tests and linters with `npm test`\n3. Make sure Sauce Labs tests pass\n4. Run `grunt release`, which will create new tag and publish code to GitHub\n\n    Bower detects your new version of git tag.\n\n5. Edit GitHub release notes\n\nBy default, patch release is done. You can specify the version bump as a parameter:\n\n    grunt release:major\n\nValid version bump values: `major`, `minor`, `patch`.\n\n\n## Decision log\n\n* Animate SVG paths with CSS3 transitions to make animations smooth.\n* API must provide built-in shapes and a way to use totally custom SVG.\n* Document manually. More overhead and risk of out dated information but easier to get started and contribute with pull requests.\n* Animate paths with JS because IE does not support CSS transitions for SVG properties. This also allows\nanimation customizations and possible even using different easings per animation(in future).\n* Expose ProgressBar so it can be used with basic module loaders or as a global.\n* Bundle shifty inside the final distributable instead of requiring users to install both libs. If someone has already included shifty, then a custom build should be made.\n* Ship distributables to Bower. Fully automate releasing.\n* Ship distributables also to NPM to ease life of Browserify users.\n* Delegate shifty dependency handling to NPM instead of keeping it in repository but still bundle it inside the final distributable.\n* Automate tests so that testing is locally fast and CI runs tests with more browsers in Sauce Labs\n* Because of introducing text attribute, the library must modify CSS also. Provide user an option to make CSS them selves.\n* Keep **master** branch as a release branch so that new users can see the documentation for latest release instead of development version.\n* Add some tasks to package.json aside with grunt tasks. I would want to move from Grunt to npm scripts totally but Sauce Labs tests are run with grunt.\n"
  },
  {
    "path": "docs/index.md",
    "content": "# Get started\n\n*ProgressBar.js* is lightweight, MIT licensed and supports all major browsers including **IE11+** when using a polyfill.\nSee complete examples in [full examples](#full-examples) section.\n\n### IE 11 compatibility\n\nYou can include ES6 polyfills by adding to your index.html:\n\n```\n<script crossorigin=\"anonymous\" src=\"https://polyfill.io/v3/polyfill.min.js?features=es6\"></script>\n```\n\nSee https://github.com/jeremyckahn/shifty#ie-compatibility and https://polyfill.io/v3/url-builder/.\n\n#### {install} Installing\n\n* Using bower `bower install progressbar.js`\n* Using npm `npm install progressbar.js`\n* Including [*dist/progressbar.js*](https://github.com/kimmobrunfeldt/progressbar.js/blob/master/dist/progressbar.js) or [dist/progressbar.min.js](https://github.com/kimmobrunfeldt/progressbar.js/blob/master/dist/progressbar.min.js) from latest tag to your project.\n\n#### Loading module\n\nCommonJS\n\n```javascript\nconst ProgressBar = require('progressbar.js')\nconst line = new ProgressBar.Line('#container');\n```\n\nAMD\n\n```javascript\nrequire.config({\n    paths: {'progressbar': '../bower_components/progressbar.js/dist/progressbar'}\n});\n\ndefine(['progressbar'], function(ProgressBar) {\n    var line = new ProgressBar.Line('#container');\n});\n```\n\nGlobal variable\n\n```javascript\n// If you aren't using any module loader, progressbar.js exposes\n// global variable: window.ProgressBar\nvar line = new ProgressBar.Line('#container');\n```\n\nFiles in `dist/` folder are UMD modules built with Browserify's `--standalone` switch. Read more about [standalone Browserify builds](http://www.forbeslindesay.co.uk/post/46324645400/standalone-browserify-builds).\n\n\n# How it works\n\nProgress bars are just regular SVG paths.\nRead [Jake Archibald's blog post](http://jakearchibald.com/2013/animated-line-drawing-svg/) to see how the path drawing works under the hood.\n\n*ProgressBar.js* uses [shifty](https://jeremyckahn.github.io/shifty/) tweening library to animate path drawing.\nSo in other words, animation is done with JavaScript using [requestAnimationFrame](https://developer.mozilla.org/en-US/docs/Web/API/window.requestAnimationFrame).\nAnimating with JS gives more control over the animation and is supported across major browsers. For example IE [does not support](https://connect.microsoft.com/IE/feedbackdetail/view/920928/ie-11-css-transition-property-not-working-for-svg-elements)\nanimating SVG properties with CSS transitions.\n\n\n## {migrations} Migration guide\n\nTo upgrade from version x to y:\n\n* Go to [releases page](https://github.com/kimmobrunfeldt/progressbar.js/releases)\n* Find the version x you are using\n* Browse through release notes from x to y. API breaking releases are marked with `#breaking`.\n* Fix your current code to use new API\n\n*If you find this very tedious, please open a new issue.*\n\n## {full-examples} Full examples\n\n* [**Minimal**](http://kimmobrunfeldt.github.io/progressbar.js/examples/minimal/) [*see code*](https://github.com/kimmobrunfeldt/progressbar.js/tree/gh-pages/examples/minimal)\n* [**File upload**](http://kimmobrunfeldt.github.io/progressbar.js/examples/upload/) [*see code*](https://github.com/kimmobrunfeldt/progressbar.js/tree/gh-pages/examples/upload)\n* [**Telegram**](http://kimmobrunfeldt.github.io/progressbar.js/examples/telegram/) [*see code*](https://github.com/kimmobrunfeldt/progressbar.js/tree/gh-pages/examples/telegram)\n* [**Password strength**](http://kimmobrunfeldt.github.io/progressbar.js/examples/password-strength/) [*see code*](https://github.com/kimmobrunfeldt/progressbar.js/tree/gh-pages/examples/password-strength)\n\n# Contributing\n\nSee [documentation for contributors](contributing/).\n"
  },
  {
    "path": "docs/pip-requirements.txt",
    "content": "backports-abc==0.4\nbackports.ssl-match-hostname==3.5.0.1\ncertifi==2015.11.20.1\nclick==6.2\nJinja2==2.8\nlivereload==2.4.1\nMarkdown==2.6.5\nMarkupSafe==0.23\nmdx-sections==0.1\nmkdocs==0.15.3\nmkdocs-bootstrap==0.1.1\nmkdocs-bootswatch==0.2.0\npymdown-extensions==1.0.1\nPyYAML==3.11\nsingledispatch==3.4.0.3\nsix==1.10.0\ntornado==4.3\nwheel==0.24.0\n"
  },
  {
    "path": "karma.conf.js",
    "content": "var customLaunchers = require('./saucelabs-browsers');\n\nmodule.exports = function(config) {\n    config.set({\n        frameworks: ['polyfill', 'mocha', 'browserify'],\n        polyfill: ['es6'],\n        files: [\n          'test/*.js'\n        ],\n\n        preprocessors: {\n            'test/*.js': ['browserify']\n        },\n\n        browserify: {\n            debug: true\n        },\n\n        port: 9876,\n\n        colors: false,\n\n        // Possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG\n        logLevel: config.LOG_INFO,\n\n        autoWatch: false,\n\n        singleRun: true,\n\n        sauceLabs: {\n            startConnect: true,\n            testName: 'ProgressBar.js',\n            build: process.env.TRAVIS_BUILD_NUMBER || 'manual',\n            tunnelIdentifier: process.env.TRAVIS_BUILD_NUMBER,\n            recordVideo: true\n        },\n\n        customLaunchers: customLaunchers,\n\n        browsers: Object.keys(customLaunchers),\n\n        reporters: ['dots', 'saucelabs'],\n\n        // Timeouts\n        browserDisconnectTimeout: 30 * 1000,\n        browserDisconnectTolerance: 3,\n        browserNoActivityTimeout: 30 * 1000,\n        captureTimeout: 120 * 1000\n    });\n};\n"
  },
  {
    "path": "local-dev/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n    <head>\n        <meta charset=\"utf-8\">\n        <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n        <title>ProgressBar.js - Local dev</title>\n        <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n        <link rel=\"stylesheet\" href=\"main.css\">\n    </head>\n    <body>\n        <div id=\"progress\"></div>\n\n        <script src=\"bundle.js\"></script>\n    </body>\n</html>\n"
  },
  {
    "path": "local-dev/main.css",
    "content": "html, body {\n    height: 100%;\n    width: 100%;\n}\n\nsvg {\n    display: block;\n    height: 100%;\n}\n\n#progress {\n    width: 300px;\n    height: 300px;\n}\n"
  },
  {
    "path": "local-dev/main.js",
    "content": "var ProgressBar = require('../src/main.js');\n\n\nfunction onLoad() {\n    var bar = new ProgressBar.Circle('#progress', {\n        duration: 4000,\n        from: {\n            color: '#f00'\n        },\n        to: {\n            color: '#0f0'\n        },\n        step: function(state, bar) {\n            bar.path.setAttribute('stroke', state.color);\n        },\n    });\n\n    bar.animate(1);\n\n    // Expose the bar to global so it is easy to test from console\n    window.bar = bar;\n}\n\nwindow.onload = onLoad;\n"
  },
  {
    "path": "mkdocs.yml",
    "content": "site_name: ProgressBar.js\nrepo_url: https://github.com/kimmobrunfeldt/progressbar.js\n\npages:\n  - Home: index.md\n  - API References:\n    - General information: api/general.md\n    - ProgressBar.Line, Circle, SemiCircle: api/shape.md\n    - ProgressBar.Path: api/path.md\n    - Parameters in detail: api/parameters.md\n  - Developers:\n    - Contributing: contributing.md\n\ntheme: readthedocs\n\nstrict: true\n\nmarkdown_extensions:\n  - admonition\n  - toc:\n      permalink: True\n  - mdx_sections\n  - pymdownx.superfences\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"progressbar.js\",\n  \"version\": \"1.1.1\",\n  \"description\": \"Responsive and slick progress bars with animated SVG paths\",\n  \"main\": \"dist/progressbar.js\",\n  \"dependencies\": {\n    \"lodash.merge\": \"^4.6.2\",\n    \"shifty\": \"^2.8.3\"\n  },\n  \"devDependencies\": {\n    \"bluebird\": \"^2.3.6\",\n    \"browserify\": \"^13.0.0\",\n    \"commander\": \"^2.4.0\",\n    \"concurrently\": \"^2.0.0\",\n    \"eslint\": \"^1.0.0\",\n    \"grunt\": \"^0.4.5\",\n    \"grunt-cli\": \"^0.1.13\",\n    \"grunt-contrib-jshint\": \"^0.10.0\",\n    \"grunt-contrib-uglify\": \"^0.6.0\",\n    \"grunt-karma\": \"^2.0.0\",\n    \"grunt-shell\": \"^1.1.1\",\n    \"jscs\": \"^2.0.0\",\n    \"karma\": \"^2.0.2\",\n    \"karma-browserify\": \"^5.2.0\",\n    \"karma-mocha\": \"^1.3.0\",\n    \"karma-polyfill\": \"^1.1.0\",\n    \"karma-sauce-launcher\": \"^1.2.0\",\n    \"lodash\": \"^2.4.1\",\n    \"mocha\": \"^2.0.1\",\n    \"mustache\": \"^2.3.0\",\n    \"node-static\": \"^0.7.7\",\n    \"np\": \"^5.1.2\",\n    \"semver\": \"^4.1.0\",\n    \"shelljs\": \"^0.3.0\",\n    \"sinon\": \"~1.14.1\",\n    \"string\": \"^2.2.0\",\n    \"testem\": \"^1.6.0\",\n    \"watchify\": \"^3.9.0\"\n  },\n  \"scripts\": {\n    \"test\": \"./tools/test.sh\",\n    \"start\": \"npm run dev\",\n    \"dev\": \"concurrently 'npm run serve' 'grunt watch' 'open http://localhost:8080'\",\n    \"serve\": \"static ./local-dev -c 0\",\n    \"lint\": \"./tools/lint.sh\",\n    \"jscs\": \"jscs ./src ./test\",\n    \"eslint\": \"eslint --ext .js ./src ./test\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git://github.com/kimmobrunfeldt/progressbar.js.git\"\n  },\n  \"author\": \"Kimmo Brunfeldt <kimmobrunfeldt@gmail.com> (http://kimmobrunfeldt.github.io/)\",\n  \"license\": \"MIT\",\n  \"bugs\": {\n    \"url\": \"https://github.com/kimmobrunfeldt/progressbar.js/issues\"\n  },\n  \"homepage\": \"https://kimmobrunfeldt.github.io/progressbar.js/\",\n  \"keywords\": [\n    \"progress\",\n    \"bar\",\n    \"js\",\n    \"svg\",\n    \"circular\",\n    \"circle\",\n    \"pace\",\n    \"radial\",\n    \"line\",\n    \"loading\",\n    \"loader\",\n    \"semi-circle\",\n    \"indicator\"\n  ]\n}"
  },
  {
    "path": "saucelabs-browsers.js",
    "content": "// Browsers on Sauce Labs\n// Check out https://saucelabs.com/platforms for all browser/platform combos\n// and https://wiki.saucelabs.com/display/DOCS/Platform+Configurator#/\nmodule.exports = {\n\n    // Chrome\n    sauce_chrome: {\n        base: 'SauceLabs',\n        browserName: 'chrome',\n        platform: 'macOS 10.15',\n        version: 'latest'\n    },\n\n    // Safari\n    sauce_safari: {\n        base: 'SauceLabs',\n        browserName: 'safari',\n        platform: 'macOS 10.15',\n        version: 'latest'\n    },\n\n    // Firefox\n    sauce_firefox: {\n        base: 'SauceLabs',\n        browserName: 'firefox',\n        platform: 'Windows 10',\n        version: 'latest'\n    },\n\n    // Internet explorer\n    sauce_windows_ie_11: {\n        base: 'SauceLabs',\n        browserName: 'internet explorer',\n        platform: 'Windows 10',\n        version: '11'\n    },\n    sauce_windows_ie_10: {\n        base: 'SauceLabs',\n        browserName: 'internet explorer',\n        platform: 'Windows 8',\n        version: '10'\n    },\n\n    // MS Edge\n    sauce_windows_edge: {\n        base: 'SauceLabs',\n        browserName: 'MicrosoftEdge',\n        platform: 'Windows 10',\n        version: 'latest'\n    },\n};\n"
  },
  {
    "path": "src/circle.js",
    "content": "// Circle shaped progress bar\n\nvar Shape = require('./shape');\nvar utils = require('./utils');\n\nvar Circle = function Circle(container, options) {\n    // Use two arcs to form a circle\n    // See this answer http://stackoverflow.com/a/10477334/1446092\n    this._pathTemplate =\n        'M 50,50 m 0,-{radius}' +\n        ' a {radius},{radius} 0 1 1 0,{2radius}' +\n        ' a {radius},{radius} 0 1 1 0,-{2radius}';\n\n    this.containerAspectRatio = 1;\n\n    Shape.apply(this, arguments);\n};\n\nCircle.prototype = new Shape();\nCircle.prototype.constructor = Circle;\n\nCircle.prototype._pathString = function _pathString(opts) {\n    var widthOfWider = opts.strokeWidth;\n    if (opts.trailWidth && opts.trailWidth > opts.strokeWidth) {\n        widthOfWider = opts.trailWidth;\n    }\n\n    var r = 50 - widthOfWider / 2;\n\n    return utils.render(this._pathTemplate, {\n        radius: r,\n        '2radius': r * 2\n    });\n};\n\nCircle.prototype._trailString = function _trailString(opts) {\n    return this._pathString(opts);\n};\n\nmodule.exports = Circle;\n"
  },
  {
    "path": "src/line.js",
    "content": "// Line shaped progress bar\n\nvar Shape = require('./shape');\nvar utils = require('./utils');\n\nvar Line = function Line(container, options) {\n    this._pathTemplate = options.vertical\n        ? 'M {center},100 L {center},0'\n        : 'M 0,{center} L 100,{center}';\n    Shape.apply(this, arguments);\n};\n\nLine.prototype = new Shape();\nLine.prototype.constructor = Line;\n\nLine.prototype._initializeSvg = function _initializeSvg(svg, opts) {\n    var viewBoxStr = opts.vertical\n        ? '0 0 ' + opts.strokeWidth + ' 100'\n        : '0 0 100 ' + opts.strokeWidth;\n    svg.setAttribute('viewBox', viewBoxStr);\n    svg.setAttribute('preserveAspectRatio', 'none');\n};\n\nLine.prototype._pathString = function _pathString(opts) {\n    return utils.render(this._pathTemplate, {\n        center: opts.strokeWidth / 2\n    });\n};\n\nLine.prototype._trailString = function _trailString(opts) {\n    return this._pathString(opts);\n};\n\nmodule.exports = Line;\n"
  },
  {
    "path": "src/main.js",
    "content": "module.exports = {\n    // Higher level API, different shaped progress bars\n    Line: require('./line'),\n    Circle: require('./circle'),\n    SemiCircle: require('./semicircle'),\n    Square: require('./square'),\n\n    // Lower level API to use any SVG path\n    Path: require('./path'),\n\n    // Base-class for creating new custom shapes\n    // to be in line with the API of built-in shapes\n    // Undocumented.\n    Shape: require('./shape'),\n\n    // Internal utils, undocumented.\n    utils: require('./utils')\n};\n"
  },
  {
    "path": "src/path.js",
    "content": "// Lower level API to animate any kind of svg path\n\nvar shifty = require('shifty');\nvar utils = require('./utils');\n\nvar Tweenable = shifty.Tweenable;\n\nvar EASING_ALIASES = {\n    easeIn: 'easeInCubic',\n    easeOut: 'easeOutCubic',\n    easeInOut: 'easeInOutCubic'\n};\n\nvar Path = function Path(path, opts) {\n    // Throw a better error if not initialized with `new` keyword\n    if (!(this instanceof Path)) {\n        throw new Error('Constructor was called without new keyword');\n    }\n\n    // Default parameters for animation\n    opts = utils.extend({\n        delay: 0,\n        duration: 800,\n        easing: 'linear',\n        from: {},\n        to: {},\n        step: function() {}\n    }, opts);\n\n    var element;\n    if (utils.isString(path)) {\n        element = document.querySelector(path);\n    } else {\n        element = path;\n    }\n\n    // Reveal .path as public attribute\n    this.path = element;\n    this._opts = opts;\n    this._tweenable = null;\n\n    // Set up the starting positions\n    var length = this.path.getTotalLength();\n    this.path.style.strokeDasharray = length + ' ' + length;\n    this.set(0);\n};\n\nPath.prototype.value = function value() {\n    var offset = this._getComputedDashOffset();\n    var length = this.path.getTotalLength();\n\n    var progress = 1 - offset / length;\n    // Round number to prevent returning very small number like 1e-30, which\n    // is practically 0\n    return parseFloat(progress.toFixed(6), 10);\n};\n\nPath.prototype.set = function set(progress) {\n    this.stop();\n\n    this.path.style.strokeDashoffset = this._progressToOffset(progress);\n\n    var step = this._opts.step;\n    if (utils.isFunction(step)) {\n        var easing = this._easing(this._opts.easing);\n        var values = this._calculateTo(progress, easing);\n        var reference = this._opts.shape || this;\n        step(values, reference, this._opts.attachment);\n    }\n};\n\nPath.prototype.stop = function stop() {\n    this._stopTween();\n    this.path.style.strokeDashoffset = this._getComputedDashOffset();\n};\n\n// Method introduced here:\n// http://jakearchibald.com/2013/animated-line-drawing-svg/\nPath.prototype.animate = function animate(progress, opts, cb) {\n    opts = opts || {};\n\n    if (utils.isFunction(opts)) {\n        cb = opts;\n        opts = {};\n    }\n\n    var passedOpts = utils.extend({}, opts);\n\n    // Copy default opts to new object so defaults are not modified\n    var defaultOpts = utils.extend({}, this._opts);\n    opts = utils.extend(defaultOpts, opts);\n\n    var shiftyEasing = this._easing(opts.easing);\n    var values = this._resolveFromAndTo(progress, shiftyEasing, passedOpts);\n\n    this.stop();\n\n    // Trigger a layout so styles are calculated & the browser\n    // picks up the starting position before animating\n    this.path.getBoundingClientRect();\n\n    var offset = this._getComputedDashOffset();\n    var newOffset = this._progressToOffset(progress);\n\n    var self = this;\n    this._tweenable = new Tweenable();\n    this._tweenable.tween({\n        from: utils.extend({ offset: offset }, values.from),\n        to: utils.extend({ offset: newOffset }, values.to),\n        duration: opts.duration,\n        delay: opts.delay,\n        easing: shiftyEasing,\n        step: function(state) {\n            self.path.style.strokeDashoffset = state.offset;\n            var reference = opts.shape || self;\n            opts.step(state, reference, opts.attachment);\n        }\n    }).then(function(state) {\n        if (utils.isFunction(cb)) {\n            cb();\n        }\n    }).catch(function(err) {\n        console.error('Error in tweening:', err);\n        throw err;\n    });\n};\n\nPath.prototype._getComputedDashOffset = function _getComputedDashOffset() {\n    var computedStyle = window.getComputedStyle(this.path, null);\n    return parseFloat(computedStyle.getPropertyValue('stroke-dashoffset'), 10);\n};\n\nPath.prototype._progressToOffset = function _progressToOffset(progress) {\n    var length = this.path.getTotalLength();\n    return length - progress * length;\n};\n\n// Resolves from and to values for animation.\nPath.prototype._resolveFromAndTo = function _resolveFromAndTo(progress, easing, opts) {\n    if (opts.from && opts.to) {\n        return {\n            from: opts.from,\n            to: opts.to\n        };\n    }\n\n    return {\n        from: this._calculateFrom(easing),\n        to: this._calculateTo(progress, easing)\n    };\n};\n\n// Calculate `from` values from options passed at initialization\nPath.prototype._calculateFrom = function _calculateFrom(easing) {\n    return shifty.interpolate(this._opts.from, this._opts.to, this.value(), easing);\n};\n\n// Calculate `to` values from options passed at initialization\nPath.prototype._calculateTo = function _calculateTo(progress, easing) {\n    return shifty.interpolate(this._opts.from, this._opts.to, progress, easing);\n};\n\nPath.prototype._stopTween = function _stopTween() {\n    if (this._tweenable !== null) {\n        this._tweenable.stop(true);\n        this._tweenable = null;\n    }\n};\n\nPath.prototype._easing = function _easing(easing) {\n    if (EASING_ALIASES.hasOwnProperty(easing)) {\n        return EASING_ALIASES[easing];\n    }\n\n    return easing;\n};\n\nmodule.exports = Path;\n"
  },
  {
    "path": "src/semicircle.js",
    "content": "// Semi-SemiCircle shaped progress bar\n\nvar Shape = require('./shape');\nvar Circle = require('./circle');\nvar utils = require('./utils');\n\nvar SemiCircle = function SemiCircle(container, options) {\n    // Use one arc to form a SemiCircle\n    // See this answer http://stackoverflow.com/a/10477334/1446092\n    this._pathTemplate =\n        'M 50,50 m -{radius},0' +\n        ' a {radius},{radius} 0 1 1 {2radius},0';\n\n    this.containerAspectRatio = 2;\n\n    Shape.apply(this, arguments);\n};\n\nSemiCircle.prototype = new Shape();\nSemiCircle.prototype.constructor = SemiCircle;\n\nSemiCircle.prototype._initializeSvg = function _initializeSvg(svg, opts) {\n    svg.setAttribute('viewBox', '0 0 100 50');\n};\n\nSemiCircle.prototype._initializeTextContainer = function _initializeTextContainer(\n    opts,\n    container,\n    textContainer\n) {\n    if (opts.text.style) {\n        // Reset top style\n        textContainer.style.top = 'auto';\n        textContainer.style.bottom = '0';\n\n        if (opts.text.alignToBottom) {\n            utils.setStyle(textContainer, 'transform', 'translate(-50%, 0)');\n        } else {\n            utils.setStyle(textContainer, 'transform', 'translate(-50%, 50%)');\n        }\n    }\n};\n\n// Share functionality with Circle, just have different path\nSemiCircle.prototype._pathString = Circle.prototype._pathString;\nSemiCircle.prototype._trailString = Circle.prototype._trailString;\n\nmodule.exports = SemiCircle;\n"
  },
  {
    "path": "src/shape.js",
    "content": "// Base object for different progress bar shapes\n\nvar Path = require('./path');\nvar utils = require('./utils');\n\nvar DESTROYED_ERROR = 'Object is destroyed';\n\nvar Shape = function Shape(container, opts) {\n    // Throw a better error if progress bars are not initialized with `new`\n    // keyword\n    if (!(this instanceof Shape)) {\n        throw new Error('Constructor was called without new keyword');\n    }\n\n    // Prevent calling constructor without parameters so inheritance\n    // works correctly. To understand, this is how Shape is inherited:\n    //\n    //   Line.prototype = new Shape();\n    //\n    // We just want to set the prototype for Line.\n    if (arguments.length === 0) {\n        return;\n    }\n\n    // Default parameters for progress bar creation\n    this._opts = utils.extend({\n        color: '#555',\n        strokeWidth: 1.0,\n        trailColor: null,\n        trailWidth: null,\n        fill: null,\n        text: {\n            style: {\n                color: null,\n                position: 'absolute',\n                left: '50%',\n                top: '50%',\n                padding: 0,\n                margin: 0,\n                transform: {\n                    prefix: true,\n                    value: 'translate(-50%, -50%)'\n                }\n            },\n            autoStyleContainer: true,\n            alignToBottom: true,\n            value: null,\n            className: 'progressbar-text'\n        },\n        svgStyle: {\n            display: 'block',\n            width: '100%'\n        },\n        warnings: false\n    }, opts, true);  // Use recursive extend\n\n    // If user specifies e.g. svgStyle or text style, the whole object\n    // should replace the defaults to make working with styles easier\n    if (utils.isObject(opts) && opts.svgStyle !== undefined) {\n        this._opts.svgStyle = opts.svgStyle;\n    }\n    if (utils.isObject(opts) && utils.isObject(opts.text) && opts.text.style !== undefined) {\n        this._opts.text.style = opts.text.style;\n    }\n\n    var svgView = this._createSvgView(this._opts);\n\n    var element;\n    if (utils.isString(container)) {\n        element = document.querySelector(container);\n    } else {\n        element = container;\n    }\n\n    if (!element) {\n        throw new Error('Container does not exist: ' + container);\n    }\n\n    this._container = element;\n    this._container.appendChild(svgView.svg);\n    if (this._opts.warnings) {\n        this._warnContainerAspectRatio(this._container);\n    }\n\n    if (this._opts.svgStyle) {\n        utils.setStyles(svgView.svg, this._opts.svgStyle);\n    }\n\n    // Expose public attributes before Path initialization\n    this.svg = svgView.svg;\n    this.path = svgView.path;\n    this.trail = svgView.trail;\n    this.text = null;\n\n    var newOpts = utils.extend({\n        attachment: undefined,\n        shape: this\n    }, this._opts);\n    this._progressPath = new Path(svgView.path, newOpts);\n\n    if (utils.isObject(this._opts.text) && this._opts.text.value !== null) {\n        this.setText(this._opts.text.value);\n    }\n};\n\nShape.prototype.animate = function animate(progress, opts, cb) {\n    if (this._progressPath === null) {\n        throw new Error(DESTROYED_ERROR);\n    }\n\n    this._progressPath.animate(progress, opts, cb);\n};\n\nShape.prototype.stop = function stop() {\n    if (this._progressPath === null) {\n        throw new Error(DESTROYED_ERROR);\n    }\n\n    // Don't crash if stop is called inside step function\n    if (this._progressPath === undefined) {\n        return;\n    }\n\n    this._progressPath.stop();\n};\n\nShape.prototype.pause = function pause() {\n    if (this._progressPath === null) {\n        throw new Error(DESTROYED_ERROR);\n    }\n\n    if (this._progressPath === undefined) {\n        return;\n    }\n\n    if (!this._progressPath._tweenable) {\n        // It seems that we can't pause this\n        return;\n    }\n\n    this._progressPath._tweenable.pause();\n};\n\nShape.prototype.resume = function resume() {\n    if (this._progressPath === null) {\n        throw new Error(DESTROYED_ERROR);\n    }\n\n    if (this._progressPath === undefined) {\n        return;\n    }\n\n    if (!this._progressPath._tweenable) {\n        // It seems that we can't resume this\n        return;\n    }\n\n    this._progressPath._tweenable.resume();\n};\n\nShape.prototype.destroy = function destroy() {\n    if (this._progressPath === null) {\n        throw new Error(DESTROYED_ERROR);\n    }\n\n    this.stop();\n    this.svg.parentNode.removeChild(this.svg);\n    this.svg = null;\n    this.path = null;\n    this.trail = null;\n    this._progressPath = null;\n\n    if (this.text !== null) {\n        this.text.parentNode.removeChild(this.text);\n        this.text = null;\n    }\n};\n\nShape.prototype.set = function set(progress) {\n    if (this._progressPath === null) {\n        throw new Error(DESTROYED_ERROR);\n    }\n\n    this._progressPath.set(progress);\n};\n\nShape.prototype.value = function value() {\n    if (this._progressPath === null) {\n        throw new Error(DESTROYED_ERROR);\n    }\n\n    if (this._progressPath === undefined) {\n        return 0;\n    }\n\n    return this._progressPath.value();\n};\n\nShape.prototype.setText = function setText(newText) {\n    if (this._progressPath === null) {\n        throw new Error(DESTROYED_ERROR);\n    }\n\n    if (this.text === null) {\n        // Create new text node\n        this.text = this._createTextContainer(this._opts, this._container);\n        this._container.appendChild(this.text);\n    }\n\n    // Remove previous text and add new\n    if (utils.isObject(newText)) {\n        utils.removeChildren(this.text);\n        this.text.appendChild(newText);\n    } else {\n        this.text.innerHTML = newText;\n    }\n};\n\nShape.prototype._createSvgView = function _createSvgView(opts) {\n    var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n    this._initializeSvg(svg, opts);\n\n    var trailPath = null;\n    // Each option listed in the if condition are 'triggers' for creating\n    // the trail path\n    if (opts.trailColor || opts.trailWidth) {\n        trailPath = this._createTrail(opts);\n        svg.appendChild(trailPath);\n    }\n\n    var path = this._createPath(opts);\n    svg.appendChild(path);\n\n    return {\n        svg: svg,\n        path: path,\n        trail: trailPath\n    };\n};\n\nShape.prototype._initializeSvg = function _initializeSvg(svg, opts) {\n    svg.setAttribute('viewBox', '0 0 100 100');\n};\n\nShape.prototype._createPath = function _createPath(opts) {\n    var pathString = this._pathString(opts);\n    return this._createPathElement(pathString, opts);\n};\n\nShape.prototype._createTrail = function _createTrail(opts) {\n    // Create path string with original passed options\n    var pathString = this._trailString(opts);\n\n    // Prevent modifying original\n    var newOpts = utils.extend({}, opts);\n\n    // Defaults for parameters which modify trail path\n    if (!newOpts.trailColor) {\n        newOpts.trailColor = '#eee';\n    }\n    if (!newOpts.trailWidth) {\n        newOpts.trailWidth = newOpts.strokeWidth;\n    }\n\n    newOpts.color = newOpts.trailColor;\n    newOpts.strokeWidth = newOpts.trailWidth;\n\n    // When trail path is set, fill must be set for it instead of the\n    // actual path to prevent trail stroke from clipping\n    newOpts.fill = null;\n\n    return this._createPathElement(pathString, newOpts);\n};\n\nShape.prototype._createPathElement = function _createPathElement(pathString, opts) {\n    var path = document.createElementNS('http://www.w3.org/2000/svg', 'path');\n    path.setAttribute('d', pathString);\n    path.setAttribute('stroke', opts.color);\n    path.setAttribute('stroke-width', opts.strokeWidth);\n\n    if (opts.fill) {\n        path.setAttribute('fill', opts.fill);\n    } else {\n        path.setAttribute('fill-opacity', '0');\n    }\n\n    return path;\n};\n\nShape.prototype._createTextContainer = function _createTextContainer(opts, container) {\n    var textContainer = document.createElement('div');\n    textContainer.className = opts.text.className;\n\n    var textStyle = opts.text.style;\n    if (textStyle) {\n        if (opts.text.autoStyleContainer) {\n            container.style.position = 'relative';\n        }\n\n        utils.setStyles(textContainer, textStyle);\n        // Default text color to progress bar's color\n        if (!textStyle.color) {\n            textContainer.style.color = opts.color;\n        }\n    }\n\n    this._initializeTextContainer(opts, container, textContainer);\n    return textContainer;\n};\n\n// Give custom shapes possibility to modify text element\nShape.prototype._initializeTextContainer = function(opts, container, element) {\n    // By default, no-op\n    // Custom shapes should respect API options, such as text.style\n};\n\nShape.prototype._pathString = function _pathString(opts) {\n    throw new Error('Override this function for each progress bar');\n};\n\nShape.prototype._trailString = function _trailString(opts) {\n    throw new Error('Override this function for each progress bar');\n};\n\nShape.prototype._warnContainerAspectRatio = function _warnContainerAspectRatio(container) {\n    if (!this.containerAspectRatio) {\n        return;\n    }\n\n    var computedStyle = window.getComputedStyle(container, null);\n    var width = parseFloat(computedStyle.getPropertyValue('width'), 10);\n    var height = parseFloat(computedStyle.getPropertyValue('height'), 10);\n    if (!utils.floatEquals(this.containerAspectRatio, width / height)) {\n        console.warn(\n            'Incorrect aspect ratio of container',\n            '#' + container.id,\n            'detected:',\n            computedStyle.getPropertyValue('width') + '(width)',\n            '/',\n            computedStyle.getPropertyValue('height') + '(height)',\n            '=',\n            width / height\n        );\n\n        console.warn(\n            'Aspect ratio of should be',\n            this.containerAspectRatio\n        );\n    }\n};\n\nmodule.exports = Shape;\n"
  },
  {
    "path": "src/square.js",
    "content": "// Square shaped progress bar\n// Note: Square is not core part of API anymore. It's left here\n//       for reference. square is not included to the progressbar\n//       build anymore\n\nvar Shape = require('./shape');\nvar utils = require('./utils');\n\nvar Square = function Square(container, options) {\n    this._pathTemplate =\n        'M 0,{halfOfStrokeWidth}' +\n        ' L {width},{halfOfStrokeWidth}' +\n        ' L {width},{width}' +\n        ' L {halfOfStrokeWidth},{width}' +\n        ' L {halfOfStrokeWidth},{strokeWidth}';\n\n    this._trailTemplate =\n        'M {startMargin},{halfOfStrokeWidth}' +\n        ' L {width},{halfOfStrokeWidth}' +\n        ' L {width},{width}' +\n        ' L {halfOfStrokeWidth},{width}' +\n        ' L {halfOfStrokeWidth},{halfOfStrokeWidth}';\n\n    Shape.apply(this, arguments);\n};\n\nSquare.prototype = new Shape();\nSquare.prototype.constructor = Square;\n\nSquare.prototype._pathString = function _pathString(opts) {\n    var w = 100 - opts.strokeWidth / 2;\n\n    return utils.render(this._pathTemplate, {\n        width: w,\n        strokeWidth: opts.strokeWidth,\n        halfOfStrokeWidth: opts.strokeWidth / 2\n    });\n};\n\nSquare.prototype._trailString = function _trailString(opts) {\n    var w = 100 - opts.strokeWidth / 2;\n\n    return utils.render(this._trailTemplate, {\n        width: w,\n        strokeWidth: opts.strokeWidth,\n        halfOfStrokeWidth: opts.strokeWidth / 2,\n        startMargin: opts.strokeWidth / 2 - opts.trailWidth / 2\n    });\n};\n\nmodule.exports = Square;\n"
  },
  {
    "path": "src/utils.js",
    "content": "// Utility functions\n\nvar merge = require('lodash.merge');\n\nvar PREFIXES = 'Webkit Moz O ms'.split(' ');\nvar FLOAT_COMPARISON_EPSILON = 0.001;\n\n// Renders templates with given variables. Variables must be surrounded with\n// braces without any spaces, e.g. {variable}\n// All instances of variable placeholders will be replaced with given content\n// Example:\n// render('Hello, {message}!', {message: 'world'})\nfunction render(template, vars) {\n    var rendered = template;\n\n    for (var key in vars) {\n        if (vars.hasOwnProperty(key)) {\n            var val = vars[key];\n            var regExpString = '\\\\{' + key + '\\\\}';\n            var regExp = new RegExp(regExpString, 'g');\n\n            rendered = rendered.replace(regExp, val);\n        }\n    }\n\n    return rendered;\n}\n\nfunction setStyle(element, style, value) {\n    var elStyle = element.style;  // cache for performance\n\n    for (var i = 0; i < PREFIXES.length; ++i) {\n        var prefix = PREFIXES[i];\n        elStyle[prefix + capitalize(style)] = value;\n    }\n\n    elStyle[style] = value;\n}\n\nfunction setStyles(element, styles) {\n    forEachObject(styles, function(styleValue, styleName) {\n        // Allow disabling some individual styles by setting them\n        // to null or undefined\n        if (styleValue === null || styleValue === undefined) {\n            return;\n        }\n\n        // If style's value is {prefix: true, value: '50%'},\n        // Set also browser prefixed styles\n        if (isObject(styleValue) && styleValue.prefix === true) {\n            setStyle(element, styleName, styleValue.value);\n        } else {\n            element.style[styleName] = styleValue;\n        }\n    });\n}\n\nfunction capitalize(text) {\n    return text.charAt(0).toUpperCase() + text.slice(1);\n}\n\nfunction isString(obj) {\n    return typeof obj === 'string' || obj instanceof String;\n}\n\nfunction isFunction(obj) {\n    return typeof obj === 'function';\n}\n\nfunction isArray(obj) {\n    return Object.prototype.toString.call(obj) === '[object Array]';\n}\n\n// Returns true if `obj` is object as in {a: 1, b: 2}, not if it's function or\n// array\nfunction isObject(obj) {\n    if (isArray(obj)) {\n        return false;\n    }\n\n    var type = typeof obj;\n    return type === 'object' && !!obj;\n}\n\nfunction forEachObject(object, callback) {\n    for (var key in object) {\n        if (object.hasOwnProperty(key)) {\n            var val = object[key];\n            callback(val, key);\n        }\n    }\n}\n\nfunction floatEquals(a, b) {\n    return Math.abs(a - b) < FLOAT_COMPARISON_EPSILON;\n}\n\n// https://coderwall.com/p/nygghw/don-t-use-innerhtml-to-empty-dom-elements\nfunction removeChildren(el) {\n    while (el.firstChild) {\n        el.removeChild(el.firstChild);\n    }\n}\n\nmodule.exports = {\n    extend: merge,\n    render: render,\n    setStyle: setStyle,\n    setStyles: setStyles,\n    capitalize: capitalize,\n    isString: isString,\n    isFunction: isFunction,\n    isObject: isObject,\n    forEachObject: forEachObject,\n    floatEquals: floatEquals,\n    removeChildren: removeChildren\n};\n"
  },
  {
    "path": "tools/lint.sh",
    "content": "#!/bin/bash\n# NOTE: Run this only from project root!\n\n# Run all lint commands and if one fails, exit non-zero return code\n\nEXIT_STATUS=0\nnpm run jscs || EXIT_STATUS=$?\nnpm run eslint || EXIT_STATUS=$?\n\nexit $EXIT_STATUS\n"
  },
  {
    "path": "tools/release.js",
    "content": "#!/usr/bin/env node\n\n// Release automation script inspired by\n// https://github.com/geddski/grunt-release\n\nvar fs = require('fs');\nvar path = require('path');\n\nvar _ = require('lodash');\nvar S = require('string');\nvar shell = require('shelljs');\nvar Mustache = require('mustache');\nvar semver = require('semver');\nvar program = require('commander');\nvar Promise = require('bluebird');\n\n\n// Message templates use https://github.com/janl/mustache.js\nvar config = {\n    indentation: 2,\n    releaseMessage: 'Release {{ version }}',\n    backToDevMessage: 'Bump to dev version',\n    bumpType: 'patch',\n    files: ['package.json'],\n    readmeFile: 'README.md',\n\n    // Banner to insert in beginning of distributables\n    bannerFiles: ['dist/progressbar.js', 'dist/progressbar.min.js'],\n    banner: '// ProgressBar.js {{ version }}\\n// https://kimmobrunfeldt.github.io/progressbar.js\\n// License: MIT\\n\\n',\n\n    // If true, don't execute anything, just tell what would have been done\n    dryRun: false,\n\n    // If true, don't push commits/tags or release to npm\n    noPush: false,\n    consolePrefix: '->',\n    devSuffix: '-dev'\n}\n\nvar projectRoot = path.join(__dirname, '..');\nprocess.chdir(projectRoot);\n\nfunction main() {\n    parseArgs();\n    config = mergeArgsToDefaults(config);\n\n    if (config.dryRun) status('Dry run\\n');\n\n    var newVersion = bumpVersion(config.files, config.bumpType);\n\n    var banner = Mustache.render(config.banner, {\n        version: newVersion\n    });\n    insertBanner(config.bannerFiles, banner);\n\n    _gitBranchName()\n    .then(function(stdout) {\n        if (stdout.trim().toLowerCase() !== 'master') {\n            throw new Error('You should be in master branch before running the script!');\n        }\n\n        return gitAdd(config.bannerFiles);\n    })\n    .then(function() {\n        return gitAdd([config.readmeFile]);\n    })\n    .then(function() {\n        return gitAdd(config.files);\n    })\n    .then(function() {\n        var message = Mustache.render(config.releaseMessage, {\n            version: newVersion\n        });\n\n        return gitCommit(message);\n    })\n    .then(function() {\n        return gitTag(newVersion);\n    })\n    .then(function() {\n        return gitPushTag(newVersion);\n    })\n    .then(npmPublish)\n    .then(function() {\n        bumpVersion(config.files, 'dev');\n        return gitAdd(config.files.concat(config.readmeFile));\n    })\n    .then(function() {\n        return gitCommit(config.backToDevMessage);\n    })\n    .then(function() {\n        gitPush();\n    })\n    .then(function() {\n        console.log('');\n        status('Release successfully done!');\n    })\n    .catch(function(err) {\n        console.error('\\n!! Releasing failed')\n        console.trace(err);\n        process.exit(2);\n    });\n}\n\nfunction parseArgs() {\n    program\n        .usage('bump')\n\n    program.on('--help', function() {\n        console.log('  Example usage:');\n        console.log('');\n        console.log('  $ ./release.js minor');\n    });\n\n    program.parse(process.argv);\n}\n\nfunction mergeArgsToDefaults(config) {\n    if (program.args[0]) {\n        config.bumpType = program.args[0];\n\n        if (!_.contains(['major', 'minor', 'patch'], config.bumpType)) {\n            console.error('Error:', config.bumpType, 'is not a valid bump type');\n            process.exit(1);\n        }\n    }\n\n    return config;\n}\n\nfunction status( /* arguments */ ) {\n    var args = Array.prototype.slice.call(arguments);\n    console.log(config.consolePrefix, args.join(' '));\n}\n\nfunction run(cmd, msg) {\n    // All calls are actually synchronous but eventually some task\n    // will need async stuff, so keep them promises\n    return new Promise(function(resolve, reject) {\n        if (msg) {\n            status(msg);\n        }\n\n        if (config.dryRun) {\n            return resolve();\n        }\n\n        var exec = shell.exec(cmd);\n        var success = exec.code === 0;\n\n        if (success) {\n            resolve(exec.output);\n        } else {\n            var errMsg = 'Error executing: `' + cmd + '`\\nOutput:\\n' + exec.output;\n            var err = new Error(errMsg);\n            reject(err);\n        }\n    });\n}\n\n// Task functions\n// All functions should return promise\n\n// Bumps version in specified files.\n// Files are assumed to contain JSON data which has \"version\" key following\n// semantic versioning\nfunction bumpVersion(files, bumpType) {\n    status('Bump', bumpType, 'version to files:', files.join(' '));\n    if (config.dryRun) return '[not available in dry run]';\n\n    var newVersion;\n    var originalVersion;\n    files.forEach(function(fileName) {\n        var filePath = path.join(projectRoot, fileName);\n\n        var data = JSON.parse(fs.readFileSync(filePath));\n        originalVersion = data.version;\n        var currentVersion = data.version;\n        if (!semver.valid(currentVersion)) {\n            var msg = 'Invalid version ' + currentVersion +\n                ' in file ' + fileName;;\n            var err = new Error(msg);\n            throw err;\n        }\n\n        if (S(currentVersion).endsWith(config.devSuffix)) {\n            currentVersion = S(currentVersion).chompRight(config.devSuffix).s;\n        }\n\n        if (bumpType === 'dev') {\n            newVersion = currentVersion + config.devSuffix;\n        } else {\n            newVersion = semver.inc(currentVersion, bumpType);\n        }\n        data.version = newVersion;\n\n        var content = JSON.stringify(data, null, config.indentation);\n        fs.writeFileSync(filePath, content);\n\n        status('Bump', originalVersion, '->', newVersion, 'in',\n            fileName);\n    });\n\n    bumpReadmeVersion(originalVersion, newVersion, bumpType);\n\n    return newVersion;\n}\n\nfunction insertBanner(files, banner) {\n    status('Insert banner to', files.length, 'files');\n    if (config.dryRun) return;\n\n    _.each(files, function(fileName) {\n        var filePath = path.join(projectRoot, fileName);\n        var content = fs.readFileSync(filePath);\n        var newContent = banner + content;\n\n        fs.writeFileSync(filePath, newContent);\n    });\n}\n\nfunction bumpReadmeVersion(oldVersion, newVersion, bumpType) {\n    if (bumpType === 'dev') {\n        // Don't bump readme version in to dev version\n        return;\n    }\n\n    var oldReleaseVersion = oldVersion;\n    if (S(oldReleaseVersion).endsWith(config.devSuffix)) {\n        oldReleaseVersion = S(oldReleaseVersion).chompRight(config.devSuffix).s;\n    }\n\n    status('Replace readme version', oldReleaseVersion, '->', newVersion);\n    if (config.dryRun) return;\n\n    var filePath = path.join(projectRoot, config.readmeFile);\n    var content = fs.readFileSync(filePath, {encoding: 'utf-8'});\n\n    // Update visible version\n    var re = new RegExp('Version: ' + oldReleaseVersion, 'g');\n    var newContent = content.replace(re, 'Version: ' + newVersion);\n\n    // Replace link to previous stable\n    re = new RegExp('tree/[0-9]\\\\.[0-9]\\\\.[0-9]');\n    newContent = newContent.replace(re, 'tree/' + oldReleaseVersion);\n\n    fs.writeFileSync(filePath, newContent);\n}\n\nfunction gitAdd(files) {\n    var cmd = 'git add ' + files.join(' ');\n    var msg = 'Staged ' + files.length + ' files';\n    return run(cmd, msg);\n}\n\nfunction gitCommit(message) {\n    var cmd = 'git commit -m \"' + message + '\"';\n    var msg = 'Commit files'\n    return run(cmd, msg);\n}\n\nfunction gitTag(name) {\n    var cmd = 'git tag ' + name;\n    var msg = 'Created a new git tag: ' + name;\n    return run(cmd, msg);\n}\n\nfunction gitPush() {\n    if (config.noPush) return;\n\n    var cmd = 'git push';\n    var msg = 'Push to remote';\n    return run(cmd, msg);\n}\n\nfunction gitPushTag(tagName) {\n    if (config.noPush) return;\n\n    var cmd = 'git push origin ' + tagName;\n    var msg = 'Push created git tag to remote'\n    return run(cmd, msg);\n}\n\nfunction gitCheckout(branch) {\n    var cmd = 'git checkout ' + branch;\n    var msg = 'Checkout branch ' + branch;\n    return run(cmd, msg);\n}\n\nfunction npmPublish() {\n    if (config.noPush) return;\n\n    var cmd = 'npm publish';\n    var msg = 'Publish to npm';\n    return run(cmd, msg);\n}\n\nfunction _gitBranchName() {\n    var cmd = 'git rev-parse --abbrev-ref HEAD'\n    return run(cmd, false);\n}\n\n\nmain();\n"
  },
  {
    "path": "tools/test.sh",
    "content": "#!/bin/bash\n# NOTE: Run this only from project root!\n\n# Run all commands and if one fails, exit non-zero return code\n\nEXIT_STATUS=0\n\necho -e \"\\n---- Linting code..\\n\"\nnpm run lint || EXIT_STATUS=$?\n\nexit $EXIT_STATUS\n"
  }
]