{"ast":null,"code":"/* eslint-disable */\n\n/* jscs: disable */\n'use strict'; // pulled specific shims from https://github.com/es-shims/es5-shim\n\nvar ArrayPrototype = Array.prototype;\nvar ObjectPrototype = Object.prototype;\nvar FunctionPrototype = Function.prototype;\nvar StringPrototype = String.prototype;\nvar array_slice = ArrayPrototype.slice;\nvar _toString = ObjectPrototype.toString;\n\nvar isFunction = function (val) {\n  return ObjectPrototype.toString.call(val) === '[object Function]';\n};\n\nvar isArray = function isArray(obj) {\n  return _toString.call(obj) === '[object Array]';\n};\n\nvar isString = function isString(obj) {\n  return _toString.call(obj) === '[object String]';\n};\n\nvar supportsDescriptors = Object.defineProperty && function () {\n  try {\n    Object.defineProperty({}, 'x', {});\n    return true;\n  } catch (e) {\n    /* this is ES3 */\n    return false;\n  }\n}(); // Define configurable, writable and non-enumerable props\n// if they don't exist.\n\n\nvar defineProperty;\n\nif (supportsDescriptors) {\n  defineProperty = function (object, name, method, forceAssign) {\n    if (!forceAssign && name in object) {\n      return;\n    }\n\n    Object.defineProperty(object, name, {\n      configurable: true,\n      enumerable: false,\n      writable: true,\n      value: method\n    });\n  };\n} else {\n  defineProperty = function (object, name, method, forceAssign) {\n    if (!forceAssign && name in object) {\n      return;\n    }\n\n    object[name] = method;\n  };\n}\n\nvar defineProperties = function (object, map, forceAssign) {\n  for (var name in map) {\n    if (ObjectPrototype.hasOwnProperty.call(map, name)) {\n      defineProperty(object, name, map[name], forceAssign);\n    }\n  }\n};\n\nvar toObject = function (o) {\n  if (o == null) {\n    // this matches both null and undefined\n    throw new TypeError(\"can't convert \" + o + ' to object');\n  }\n\n  return Object(o);\n}; //\n// Util\n// ======\n//\n// ES5 9.4\n// http://es5.github.com/#x9.4\n// http://jsperf.com/to-integer\n\n\nfunction toInteger(num) {\n  var n = +num;\n\n  if (n !== n) {\n    // isNaN\n    n = 0;\n  } else if (n !== 0 && n !== 1 / 0 && n !== -(1 / 0)) {\n    n = (n > 0 || -1) * Math.floor(Math.abs(n));\n  }\n\n  return n;\n}\n\nfunction ToUint32(x) {\n  return x >>> 0;\n} //\n// Function\n// ========\n//\n// ES-5 15.3.4.5\n// http://es5.github.com/#x15.3.4.5\n\n\nfunction Empty() {}\n\ndefineProperties(FunctionPrototype, {\n  bind: function bind(that) {\n    // .length is 1\n    // 1. Let Target be the this value.\n    var target = this; // 2. If IsCallable(Target) is false, throw a TypeError exception.\n\n    if (!isFunction(target)) {\n      throw new TypeError('Function.prototype.bind called on incompatible ' + target);\n    } // 3. Let A be a new (possibly empty) internal list of all of the\n    //   argument values provided after thisArg (arg1, arg2 etc), in order.\n    // XXX slicedArgs will stand in for \"A\" if used\n\n\n    var args = array_slice.call(arguments, 1); // for normal call\n    // 4. Let F be a new native ECMAScript object.\n    // 11. Set the [[Prototype]] internal property of F to the standard\n    //   built-in Function prototype object as specified in 15.3.3.1.\n    // 12. Set the [[Call]] internal property of F as described in\n    //   15.3.4.5.1.\n    // 13. Set the [[Construct]] internal property of F as described in\n    //   15.3.4.5.2.\n    // 14. Set the [[HasInstance]] internal property of F as described in\n    //   15.3.4.5.3.\n\n    var binder = function () {\n      if (this instanceof bound) {\n        // 15.3.4.5.2 [[Construct]]\n        // When the [[Construct]] internal method of a function object,\n        // F that was created using the bind function is called with a\n        // list of arguments ExtraArgs, the following steps are taken:\n        // 1. Let target be the value of F's [[TargetFunction]]\n        //   internal property.\n        // 2. If target has no [[Construct]] internal method, a\n        //   TypeError exception is thrown.\n        // 3. Let boundArgs be the value of F's [[BoundArgs]] internal\n        //   property.\n        // 4. Let args be a new list containing the same values as the\n        //   list boundArgs in the same order followed by the same\n        //   values as the list ExtraArgs in the same order.\n        // 5. Return the result of calling the [[Construct]] internal\n        //   method of target providing args as the arguments.\n        var result = target.apply(this, args.concat(array_slice.call(arguments)));\n\n        if (Object(result) === result) {\n          return result;\n        }\n\n        return this;\n      } else {\n        // 15.3.4.5.1 [[Call]]\n        // When the [[Call]] internal method of a function object, F,\n        // which was created using the bind function is called with a\n        // this value and a list of arguments ExtraArgs, the following\n        // steps are taken:\n        // 1. Let boundArgs be the value of F's [[BoundArgs]] internal\n        //   property.\n        // 2. Let boundThis be the value of F's [[BoundThis]] internal\n        //   property.\n        // 3. Let target be the value of F's [[TargetFunction]] internal\n        //   property.\n        // 4. Let args be a new list containing the same values as the\n        //   list boundArgs in the same order followed by the same\n        //   values as the list ExtraArgs in the same order.\n        // 5. Return the result of calling the [[Call]] internal method\n        //   of target providing boundThis as the this value and\n        //   providing args as the arguments.\n        // equiv: target.call(this, ...boundArgs, ...args)\n        return target.apply(that, args.concat(array_slice.call(arguments)));\n      }\n    }; // 15. If the [[Class]] internal property of Target is \"Function\", then\n    //     a. Let L be the length property of Target minus the length of A.\n    //     b. Set the length own property of F to either 0 or L, whichever is\n    //       larger.\n    // 16. Else set the length own property of F to 0.\n\n\n    var boundLength = Math.max(0, target.length - args.length); // 17. Set the attributes of the length own property of F to the values\n    //   specified in 15.3.5.1.\n\n    var boundArgs = [];\n\n    for (var i = 0; i < boundLength; i++) {\n      boundArgs.push('$' + i);\n    } // XXX Build a dynamic function with desired amount of arguments is the only\n    // way to set the length property of a function.\n    // In environments where Content Security Policies enabled (Chrome extensions,\n    // for ex.) all use of eval or Function costructor throws an exception.\n    // However in all of these environments Function.prototype.bind exists\n    // and so this code will never be executed.\n\n\n    var bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this, arguments); }')(binder);\n\n    if (target.prototype) {\n      Empty.prototype = target.prototype;\n      bound.prototype = new Empty(); // Clean up dangling references.\n\n      Empty.prototype = null;\n    } // TODO\n    // 18. Set the [[Extensible]] internal property of F to true.\n    // TODO\n    // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3).\n    // 20. Call the [[DefineOwnProperty]] internal method of F with\n    //   arguments \"caller\", PropertyDescriptor {[[Get]]: thrower, [[Set]]:\n    //   thrower, [[Enumerable]]: false, [[Configurable]]: false}, and\n    //   false.\n    // 21. Call the [[DefineOwnProperty]] internal method of F with\n    //   arguments \"arguments\", PropertyDescriptor {[[Get]]: thrower,\n    //   [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false},\n    //   and false.\n    // TODO\n    // NOTE Function objects created using Function.prototype.bind do not\n    // have a prototype property or the [[Code]], [[FormalParameters]], and\n    // [[Scope]] internal properties.\n    // XXX can't delete prototype in pure-js.\n    // 22. Return F.\n\n\n    return bound;\n  }\n}); //\n// Array\n// =====\n//\n// ES5 15.4.3.2\n// http://es5.github.com/#x15.4.3.2\n// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray\n\ndefineProperties(Array, {\n  isArray: isArray\n});\nvar boxedString = Object('a');\nvar splitString = boxedString[0] !== 'a' || !(0 in boxedString);\n\nvar properlyBoxesContext = function properlyBoxed(method) {\n  // Check node 0.6.21 bug where third parameter is not boxed\n  var properlyBoxesNonStrict = true;\n  var properlyBoxesStrict = true;\n\n  if (method) {\n    method.call('foo', function (_, __, context) {\n      if (typeof context !== 'object') {\n        properlyBoxesNonStrict = false;\n      }\n    });\n    method.call([1], function () {\n      'use strict';\n\n      properlyBoxesStrict = typeof this === 'string';\n    }, 'x');\n  }\n\n  return !!method && properlyBoxesNonStrict && properlyBoxesStrict;\n};\n\ndefineProperties(ArrayPrototype, {\n  forEach: function forEach(fun\n  /*, thisp*/\n  ) {\n    var object = toObject(this),\n        self = splitString && isString(this) ? this.split('') : object,\n        thisp = arguments[1],\n        i = -1,\n        length = self.length >>> 0; // If no callback function or if callback is not a callable function\n\n    if (!isFunction(fun)) {\n      throw new TypeError(); // TODO message\n    }\n\n    while (++i < length) {\n      if (i in self) {\n        // Invoke the callback function with call, passing arguments:\n        // context, property value, property key, thisArg object\n        // context\n        fun.call(thisp, self[i], i, object);\n      }\n    }\n  }\n}, !properlyBoxesContext(ArrayPrototype.forEach)); // ES5 15.4.4.14\n// http://es5.github.com/#x15.4.4.14\n// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf\n\nvar hasFirefox2IndexOfBug = Array.prototype.indexOf && [0, 1].indexOf(1, 2) !== -1;\ndefineProperties(ArrayPrototype, {\n  indexOf: function indexOf(sought\n  /*, fromIndex */\n  ) {\n    var self = splitString && isString(this) ? this.split('') : toObject(this),\n        length = self.length >>> 0;\n\n    if (!length) {\n      return -1;\n    }\n\n    var i = 0;\n\n    if (arguments.length > 1) {\n      i = toInteger(arguments[1]);\n    } // handle negative indices\n\n\n    i = i >= 0 ? i : Math.max(0, length + i);\n\n    for (; i < length; i++) {\n      if (i in self && self[i] === sought) {\n        return i;\n      }\n    }\n\n    return -1;\n  }\n}, hasFirefox2IndexOfBug); //\n// String\n// ======\n//\n// ES5 15.5.4.14\n// http://es5.github.com/#x15.5.4.14\n// [bugfix, IE lt 9, firefox 4, Konqueror, Opera, obscure browsers]\n// Many browsers do not split properly with regular expressions or they\n// do not perform the split correctly under obscure conditions.\n// See http://blog.stevenlevithan.com/archives/cross-browser-split\n// I've tested in many browsers and this seems to cover the deviant ones:\n//    'ab'.split(/(?:ab)*/) should be [\"\", \"\"], not [\"\"]\n//    '.'.split(/(.?)(.?)/) should be [\"\", \".\", \"\", \"\"], not [\"\", \"\"]\n//    'tesst'.split(/(s)*/) should be [\"t\", undefined, \"e\", \"s\", \"t\"], not\n//       [undefined, \"t\", undefined, \"e\", ...]\n//    ''.split(/.?/) should be [], not [\"\"]\n//    '.'.split(/()()/) should be [\".\"], not [\"\", \"\", \".\"]\n\nvar string_split = StringPrototype.split;\n\nif ('ab'.split(/(?:ab)*/).length !== 2 || '.'.split(/(.?)(.?)/).length !== 4 || 'tesst'.split(/(s)*/)[1] === 't' || 'test'.split(/(?:)/, -1).length !== 4 || ''.split(/.?/).length || '.'.split(/()()/).length > 1) {\n  (function () {\n    var compliantExecNpcg = /()??/.exec('')[1] === void 0; // NPCG: nonparticipating capturing group\n\n    StringPrototype.split = function (separator, limit) {\n      var string = this;\n\n      if (separator === void 0 && limit === 0) {\n        return [];\n      } // If `separator` is not a regex, use native split\n\n\n      if (_toString.call(separator) !== '[object RegExp]') {\n        return string_split.call(this, separator, limit);\n      }\n\n      var output = [],\n          flags = (separator.ignoreCase ? 'i' : '') + (separator.multiline ? 'm' : '') + (separator.extended ? 'x' : '') + ( // Proposed for ES6\n      separator.sticky ? 'y' : ''),\n          // Firefox 3+\n      lastLastIndex = 0,\n          // Make `global` and avoid `lastIndex` issues by working with a copy\n      separator2,\n          match,\n          lastIndex,\n          lastLength;\n      separator = new RegExp(separator.source, flags + 'g');\n      string += ''; // Type-convert\n\n      if (!compliantExecNpcg) {\n        // Doesn't need flags gy, but they don't hurt\n        separator2 = new RegExp('^' + separator.source + '$(?!\\\\s)', flags);\n      }\n      /* Values for `limit`, per the spec:\n       * If undefined: 4294967295 // Math.pow(2, 32) - 1\n       * If 0, Infinity, or NaN: 0\n       * If positive number: limit = Math.floor(limit); if (limit > 4294967295) limit -= 4294967296;\n       * If negative number: 4294967296 - Math.floor(Math.abs(limit))\n       * If other: Type-convert, then use the above rules\n       */\n\n\n      limit = limit === void 0 ? -1 >>> 0 : // Math.pow(2, 32) - 1\n      ToUint32(limit);\n\n      while (match = separator.exec(string)) {\n        // `separator.lastIndex` is not reliable cross-browser\n        lastIndex = match.index + match[0].length;\n\n        if (lastIndex > lastLastIndex) {\n          output.push(string.slice(lastLastIndex, match.index)); // Fix browsers whose `exec` methods don't consistently return `undefined` for\n          // nonparticipating capturing groups\n\n          if (!compliantExecNpcg && match.length > 1) {\n            match[0].replace(separator2, function () {\n              for (var i = 1; i < arguments.length - 2; i++) {\n                if (arguments[i] === void 0) {\n                  match[i] = void 0;\n                }\n              }\n            });\n          }\n\n          if (match.length > 1 && match.index < string.length) {\n            ArrayPrototype.push.apply(output, match.slice(1));\n          }\n\n          lastLength = match[0].length;\n          lastLastIndex = lastIndex;\n\n          if (output.length >= limit) {\n            break;\n          }\n        }\n\n        if (separator.lastIndex === match.index) {\n          separator.lastIndex++; // Avoid an infinite loop\n        }\n      }\n\n      if (lastLastIndex === string.length) {\n        if (lastLength || !separator.test('')) {\n          output.push('');\n        }\n      } else {\n        output.push(string.slice(lastLastIndex));\n      }\n\n      return output.length > limit ? output.slice(0, limit) : output;\n    };\n  })(); // [bugfix, chrome]\n  // If separator is undefined, then the result array contains just one String,\n  // which is the this value (converted to a String). If limit is not undefined,\n  // then the output array is truncated so that it contains no more than limit\n  // elements.\n  // \"0\".split(undefined, 0) -> []\n\n} else if ('0'.split(void 0, 0).length) {\n  StringPrototype.split = function split(separator, limit) {\n    if (separator === void 0 && limit === 0) {\n      return [];\n    }\n\n    return string_split.call(this, separator, limit);\n  };\n} // ECMA-262, 3rd B.2.3\n// Not an ECMAScript standard, although ECMAScript 3rd Edition has a\n// non-normative section suggesting uniform semantics and it should be\n// normalized across all browsers\n// [bugfix, IE lt 9] IE < 9 substr() with negative value not working in IE\n\n\nvar string_substr = StringPrototype.substr;\nvar hasNegativeSubstrBug = ''.substr && '0b'.substr(-1) !== 'b';\ndefineProperties(StringPrototype, {\n  substr: function substr(start, length) {\n    return string_substr.call(this, start < 0 ? (start = this.length + start) < 0 ? 0 : start : start, length);\n  }\n}, hasNegativeSubstrBug);","map":null,"metadata":{},"sourceType":"script"}