ende 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,10 +26,14 @@ function require(path, parent, orig) {
26
26
  // perform real require()
27
27
  // by invoking the module's
28
28
  // registered function
29
- if (!module.exports) {
30
- module.exports = {};
31
- module.client = module.component = true;
32
- module.call(this, module.exports, require.relative(resolved), module);
29
+ if (!module._resolving && !module.exports) {
30
+ var mod = {};
31
+ mod.exports = {};
32
+ mod.client = mod.component = true;
33
+ module._resolving = true;
34
+ module.call(this, mod.exports, require.relative(resolved), mod);
35
+ delete module._resolving;
36
+ module.exports = mod.exports;
33
37
  }
34
38
 
35
39
  return module.exports;
@@ -30475,7 +30479,1387 @@ Optional extensions on the jquery.inputmask base
30475
30479
  });
30476
30480
  })(jQuery);
30477
30481
  });
30478
- require.register("ened/vendor/assets/javascripts/shims/es6-map-shim.js", function(exports, require, module){
30482
+ require.register("ened/vendor/assets/javascripts/polyfills/es5-shim.js", function(exports, require, module){
30483
+ /*!
30484
+ * https://github.com/es-shims/es5-shim
30485
+ * @license es5-shim Copyright 2009-2014 by contributors, MIT License
30486
+ * see https://github.com/es-shims/es5-shim/blob/master/LICENSE
30487
+ */
30488
+
30489
+ // vim: ts=4 sts=4 sw=4 expandtab
30490
+
30491
+ //Add semicolon to prevent IIFE from being passed as argument to concated code.
30492
+ ;
30493
+
30494
+ // UMD (Universal Module Definition)
30495
+ // see https://github.com/umdjs/umd/blob/master/returnExports.js
30496
+ (function (root, factory) {
30497
+ if (typeof define === 'function' && define.amd) {
30498
+ // AMD. Register as an anonymous module.
30499
+ define(factory);
30500
+ } else if (typeof exports === 'object') {
30501
+ // Node. Does not work with strict CommonJS, but
30502
+ // only CommonJS-like enviroments that support module.exports,
30503
+ // like Node.
30504
+ module.exports = factory();
30505
+ } else {
30506
+ // Browser globals (root is window)
30507
+ root.returnExports = factory();
30508
+ }
30509
+ }(this, function () {
30510
+
30511
+ /**
30512
+ * Brings an environment as close to ECMAScript 5 compliance
30513
+ * as is possible with the facilities of erstwhile engines.
30514
+ *
30515
+ * Annotated ES5: http://es5.github.com/ (specific links below)
30516
+ * ES5 Spec: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf
30517
+ * Required reading: http://javascriptweblog.wordpress.com/2011/12/05/extending-javascript-natives/
30518
+ */
30519
+
30520
+ //
30521
+ // Function
30522
+ // ========
30523
+ //
30524
+
30525
+ // ES-5 15.3.4.5
30526
+ // http://es5.github.com/#x15.3.4.5
30527
+
30528
+ function Empty() {}
30529
+
30530
+ if (!Function.prototype.bind) {
30531
+ Function.prototype.bind = function bind(that) { // .length is 1
30532
+ // 1. Let Target be the this value.
30533
+ var target = this;
30534
+ // 2. If IsCallable(Target) is false, throw a TypeError exception.
30535
+ if (typeof target != "function") {
30536
+ throw new TypeError("Function.prototype.bind called on incompatible " + target);
30537
+ }
30538
+ // 3. Let A be a new (possibly empty) internal list of all of the
30539
+ // argument values provided after thisArg (arg1, arg2 etc), in order.
30540
+ // XXX slicedArgs will stand in for "A" if used
30541
+ var args = _Array_slice_.call(arguments, 1); // for normal call
30542
+ // 4. Let F be a new native ECMAScript object.
30543
+ // 11. Set the [[Prototype]] internal property of F to the standard
30544
+ // built-in Function prototype object as specified in 15.3.3.1.
30545
+ // 12. Set the [[Call]] internal property of F as described in
30546
+ // 15.3.4.5.1.
30547
+ // 13. Set the [[Construct]] internal property of F as described in
30548
+ // 15.3.4.5.2.
30549
+ // 14. Set the [[HasInstance]] internal property of F as described in
30550
+ // 15.3.4.5.3.
30551
+ var binder = function () {
30552
+
30553
+ if (this instanceof bound) {
30554
+ // 15.3.4.5.2 [[Construct]]
30555
+ // When the [[Construct]] internal method of a function object,
30556
+ // F that was created using the bind function is called with a
30557
+ // list of arguments ExtraArgs, the following steps are taken:
30558
+ // 1. Let target be the value of F's [[TargetFunction]]
30559
+ // internal property.
30560
+ // 2. If target has no [[Construct]] internal method, a
30561
+ // TypeError exception is thrown.
30562
+ // 3. Let boundArgs be the value of F's [[BoundArgs]] internal
30563
+ // property.
30564
+ // 4. Let args be a new list containing the same values as the
30565
+ // list boundArgs in the same order followed by the same
30566
+ // values as the list ExtraArgs in the same order.
30567
+ // 5. Return the result of calling the [[Construct]] internal
30568
+ // method of target providing args as the arguments.
30569
+
30570
+ var result = target.apply(
30571
+ this,
30572
+ args.concat(_Array_slice_.call(arguments))
30573
+ );
30574
+ if (Object(result) === result) {
30575
+ return result;
30576
+ }
30577
+ return this;
30578
+
30579
+ } else {
30580
+ // 15.3.4.5.1 [[Call]]
30581
+ // When the [[Call]] internal method of a function object, F,
30582
+ // which was created using the bind function is called with a
30583
+ // this value and a list of arguments ExtraArgs, the following
30584
+ // steps are taken:
30585
+ // 1. Let boundArgs be the value of F's [[BoundArgs]] internal
30586
+ // property.
30587
+ // 2. Let boundThis be the value of F's [[BoundThis]] internal
30588
+ // property.
30589
+ // 3. Let target be the value of F's [[TargetFunction]] internal
30590
+ // property.
30591
+ // 4. Let args be a new list containing the same values as the
30592
+ // list boundArgs in the same order followed by the same
30593
+ // values as the list ExtraArgs in the same order.
30594
+ // 5. Return the result of calling the [[Call]] internal method
30595
+ // of target providing boundThis as the this value and
30596
+ // providing args as the arguments.
30597
+
30598
+ // equiv: target.call(this, ...boundArgs, ...args)
30599
+ return target.apply(
30600
+ that,
30601
+ args.concat(_Array_slice_.call(arguments))
30602
+ );
30603
+
30604
+ }
30605
+
30606
+ };
30607
+
30608
+ // 15. If the [[Class]] internal property of Target is "Function", then
30609
+ // a. Let L be the length property of Target minus the length of A.
30610
+ // b. Set the length own property of F to either 0 or L, whichever is
30611
+ // larger.
30612
+ // 16. Else set the length own property of F to 0.
30613
+
30614
+ var boundLength = Math.max(0, target.length - args.length);
30615
+
30616
+ // 17. Set the attributes of the length own property of F to the values
30617
+ // specified in 15.3.5.1.
30618
+ var boundArgs = [];
30619
+ for (var i = 0; i < boundLength; i++) {
30620
+ boundArgs.push("$" + i);
30621
+ }
30622
+
30623
+ // XXX Build a dynamic function with desired amount of arguments is the only
30624
+ // way to set the length property of a function.
30625
+ // In environments where Content Security Policies enabled (Chrome extensions,
30626
+ // for ex.) all use of eval or Function costructor throws an exception.
30627
+ // However in all of these environments Function.prototype.bind exists
30628
+ // and so this code will never be executed.
30629
+ var bound = Function("binder", "return function(" + boundArgs.join(",") + "){return binder.apply(this,arguments)}")(binder);
30630
+
30631
+ if (target.prototype) {
30632
+ Empty.prototype = target.prototype;
30633
+ bound.prototype = new Empty();
30634
+ // Clean up dangling references.
30635
+ Empty.prototype = null;
30636
+ }
30637
+
30638
+ // TODO
30639
+ // 18. Set the [[Extensible]] internal property of F to true.
30640
+
30641
+ // TODO
30642
+ // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3).
30643
+ // 20. Call the [[DefineOwnProperty]] internal method of F with
30644
+ // arguments "caller", PropertyDescriptor {[[Get]]: thrower, [[Set]]:
30645
+ // thrower, [[Enumerable]]: false, [[Configurable]]: false}, and
30646
+ // false.
30647
+ // 21. Call the [[DefineOwnProperty]] internal method of F with
30648
+ // arguments "arguments", PropertyDescriptor {[[Get]]: thrower,
30649
+ // [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false},
30650
+ // and false.
30651
+
30652
+ // TODO
30653
+ // NOTE Function objects created using Function.prototype.bind do not
30654
+ // have a prototype property or the [[Code]], [[FormalParameters]], and
30655
+ // [[Scope]] internal properties.
30656
+ // XXX can't delete prototype in pure-js.
30657
+
30658
+ // 22. Return F.
30659
+ return bound;
30660
+ };
30661
+ }
30662
+
30663
+ // Shortcut to an often accessed properties, in order to avoid multiple
30664
+ // dereference that costs universally.
30665
+ // _Please note: Shortcuts are defined after `Function.prototype.bind` as we
30666
+ // us it in defining shortcuts.
30667
+ var call = Function.prototype.call;
30668
+ var prototypeOfArray = Array.prototype;
30669
+ var prototypeOfObject = Object.prototype;
30670
+ var _Array_slice_ = prototypeOfArray.slice;
30671
+ // Having a toString local variable name breaks in Opera so use _toString.
30672
+ var _toString = call.bind(prototypeOfObject.toString);
30673
+ var owns = call.bind(prototypeOfObject.hasOwnProperty);
30674
+
30675
+ // If JS engine supports accessors creating shortcuts.
30676
+ var defineGetter;
30677
+ var defineSetter;
30678
+ var lookupGetter;
30679
+ var lookupSetter;
30680
+ var supportsAccessors;
30681
+ if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
30682
+ defineGetter = call.bind(prototypeOfObject.__defineGetter__);
30683
+ defineSetter = call.bind(prototypeOfObject.__defineSetter__);
30684
+ lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
30685
+ lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
30686
+ }
30687
+
30688
+ //
30689
+ // Array
30690
+ // =====
30691
+ //
30692
+
30693
+ // ES5 15.4.4.12
30694
+ // http://es5.github.com/#x15.4.4.12
30695
+ // Default value for second param
30696
+ // [bugfix, ielt9, old browsers]
30697
+ // IE < 9 bug: [1,2].splice(0).join("") == "" but should be "12"
30698
+ if ([1,2].splice(0).length != 2) {
30699
+ var array_splice = Array.prototype.splice;
30700
+ var array_push = Array.prototype.push;
30701
+ var array_unshift = Array.prototype.unshift;
30702
+
30703
+ if (function() { // test IE < 9 to splice bug - see issue #138
30704
+ function makeArray(l) {
30705
+ var a = [];
30706
+ while (l--) {
30707
+ a.unshift(l)
30708
+ }
30709
+ return a
30710
+ }
30711
+
30712
+ var array = []
30713
+ , lengthBefore
30714
+ ;
30715
+
30716
+ array.splice.bind(array, 0, 0).apply(null, makeArray(20));
30717
+ array.splice.bind(array, 0, 0).apply(null, makeArray(26));
30718
+
30719
+ lengthBefore = array.length; //20
30720
+ array.splice(5, 0, "XXX"); // add one element
30721
+
30722
+ if (lengthBefore + 1 == array.length) {
30723
+ return true;// has right splice implementation without bugs
30724
+ }
30725
+ // else {
30726
+ // IE8 bug
30727
+ // }
30728
+ }()) {//IE 6/7
30729
+ Array.prototype.splice = function(start, deleteCount) {
30730
+ if (!arguments.length) {
30731
+ return [];
30732
+ } else {
30733
+ return array_splice.apply(this, [
30734
+ start === void 0 ? 0 : start,
30735
+ deleteCount === void 0 ? (this.length - start) : deleteCount
30736
+ ].concat(_Array_slice_.call(arguments, 2)))
30737
+ }
30738
+ };
30739
+ }
30740
+ else {//IE8
30741
+ Array.prototype.splice = function(start, deleteCount) {
30742
+ var result
30743
+ , args = _Array_slice_.call(arguments, 2)
30744
+ , addElementsCount = args.length
30745
+ ;
30746
+
30747
+ if (!arguments.length) {
30748
+ return [];
30749
+ }
30750
+
30751
+ if (start === void 0) { // default
30752
+ start = 0;
30753
+ }
30754
+ if (deleteCount === void 0) { // default
30755
+ deleteCount = this.length - start;
30756
+ }
30757
+
30758
+ if (addElementsCount > 0) {
30759
+ if (deleteCount <= 0) {
30760
+ if (start == this.length) { // tiny optimisation #1
30761
+ array_push.apply(this, args);
30762
+ return [];
30763
+ }
30764
+
30765
+ if (start == 0) { // tiny optimisation #2
30766
+ array_unshift.apply(this, args);
30767
+ return [];
30768
+ }
30769
+ }
30770
+
30771
+ // Array.prototype.splice implementation
30772
+ result = _Array_slice_.call(this, start, start + deleteCount);// delete part
30773
+ args.push.apply(args, _Array_slice_.call(this, start + deleteCount, this.length));// right part
30774
+ args.unshift.apply(args, _Array_slice_.call(this, 0, start));// left part
30775
+
30776
+ // delete all items from this array and replace it to 'left part' + _Array_slice_.call(arguments, 2) + 'right part'
30777
+ args.unshift(0, this.length);
30778
+
30779
+ array_splice.apply(this, args);
30780
+
30781
+ return result;
30782
+ }
30783
+
30784
+ return array_splice.call(this, start, deleteCount);
30785
+ }
30786
+
30787
+ }
30788
+ }
30789
+
30790
+ // ES5 15.4.4.12
30791
+ // http://es5.github.com/#x15.4.4.13
30792
+ // Return len+argCount.
30793
+ // [bugfix, ielt8]
30794
+ // IE < 8 bug: [].unshift(0) == undefined but should be "1"
30795
+ if ([].unshift(0) != 1) {
30796
+ var array_unshift = Array.prototype.unshift;
30797
+ Array.prototype.unshift = function() {
30798
+ array_unshift.apply(this, arguments);
30799
+ return this.length;
30800
+ };
30801
+ }
30802
+
30803
+ // ES5 15.4.3.2
30804
+ // http://es5.github.com/#x15.4.3.2
30805
+ // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray
30806
+ if (!Array.isArray) {
30807
+ Array.isArray = function isArray(obj) {
30808
+ return _toString(obj) == "[object Array]";
30809
+ };
30810
+ }
30811
+
30812
+ // The IsCallable() check in the Array functions
30813
+ // has been replaced with a strict check on the
30814
+ // internal class of the object to trap cases where
30815
+ // the provided function was actually a regular
30816
+ // expression literal, which in V8 and
30817
+ // JavaScriptCore is a typeof "function". Only in
30818
+ // V8 are regular expression literals permitted as
30819
+ // reduce parameters, so it is desirable in the
30820
+ // general case for the shim to match the more
30821
+ // strict and common behavior of rejecting regular
30822
+ // expressions.
30823
+
30824
+ // ES5 15.4.4.18
30825
+ // http://es5.github.com/#x15.4.4.18
30826
+ // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/array/forEach
30827
+
30828
+
30829
+ // Check failure of by-index access of string characters (IE < 9)
30830
+ // and failure of `0 in boxedString` (Rhino)
30831
+ var boxedString = Object("a");
30832
+ var splitString = boxedString[0] != "a" || !(0 in boxedString);
30833
+
30834
+ var properlyBoxesContext = function properlyBoxed(method) {
30835
+ // Check node 0.6.21 bug where third parameter is not boxed
30836
+ var properlyBoxes = true;
30837
+ if (method) {
30838
+ method.call('foo', function (item, index, context) {
30839
+ if (typeof context !== 'object') { properlyBoxes = false; }
30840
+ });
30841
+ }
30842
+ return !!method && properlyBoxes;
30843
+ };
30844
+
30845
+ if (!Array.prototype.forEach || !properlyBoxesContext(Array.prototype.forEach)) {
30846
+ Array.prototype.forEach = function forEach(fun /*, thisp*/) {
30847
+ var object = toObject(this),
30848
+ self = splitString && _toString(this) == "[object String]" ?
30849
+ this.split("") :
30850
+ object,
30851
+ thisp = arguments[1],
30852
+ i = -1,
30853
+ length = self.length >>> 0;
30854
+
30855
+ // If no callback function or if callback is not a callable function
30856
+ if (_toString(fun) != "[object Function]") {
30857
+ throw new TypeError(); // TODO message
30858
+ }
30859
+
30860
+ while (++i < length) {
30861
+ if (i in self) {
30862
+ // Invoke the callback function with call, passing arguments:
30863
+ // context, property value, property key, thisArg object
30864
+ // context
30865
+ fun.call(thisp, self[i], i, object);
30866
+ }
30867
+ }
30868
+ };
30869
+ }
30870
+
30871
+ // ES5 15.4.4.19
30872
+ // http://es5.github.com/#x15.4.4.19
30873
+ // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map
30874
+ if (!Array.prototype.map || !properlyBoxesContext(Array.prototype.map)) {
30875
+ Array.prototype.map = function map(fun /*, thisp*/) {
30876
+ var object = toObject(this),
30877
+ self = splitString && _toString(this) == "[object String]" ?
30878
+ this.split("") :
30879
+ object,
30880
+ length = self.length >>> 0,
30881
+ result = Array(length),
30882
+ thisp = arguments[1];
30883
+
30884
+ // If no callback function or if callback is not a callable function
30885
+ if (_toString(fun) != "[object Function]") {
30886
+ throw new TypeError(fun + " is not a function");
30887
+ }
30888
+
30889
+ for (var i = 0; i < length; i++) {
30890
+ if (i in self)
30891
+ result[i] = fun.call(thisp, self[i], i, object);
30892
+ }
30893
+ return result;
30894
+ };
30895
+ }
30896
+
30897
+ // ES5 15.4.4.20
30898
+ // http://es5.github.com/#x15.4.4.20
30899
+ // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/filter
30900
+ if (!Array.prototype.filter || !properlyBoxesContext(Array.prototype.filter)) {
30901
+ Array.prototype.filter = function filter(fun /*, thisp */) {
30902
+ var object = toObject(this),
30903
+ self = splitString && _toString(this) == "[object String]" ?
30904
+ this.split("") :
30905
+ object,
30906
+ length = self.length >>> 0,
30907
+ result = [],
30908
+ value,
30909
+ thisp = arguments[1];
30910
+
30911
+ // If no callback function or if callback is not a callable function
30912
+ if (_toString(fun) != "[object Function]") {
30913
+ throw new TypeError(fun + " is not a function");
30914
+ }
30915
+
30916
+ for (var i = 0; i < length; i++) {
30917
+ if (i in self) {
30918
+ value = self[i];
30919
+ if (fun.call(thisp, value, i, object)) {
30920
+ result.push(value);
30921
+ }
30922
+ }
30923
+ }
30924
+ return result;
30925
+ };
30926
+ }
30927
+
30928
+ // ES5 15.4.4.16
30929
+ // http://es5.github.com/#x15.4.4.16
30930
+ // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/every
30931
+ if (!Array.prototype.every || !properlyBoxesContext(Array.prototype.every)) {
30932
+ Array.prototype.every = function every(fun /*, thisp */) {
30933
+ var object = toObject(this),
30934
+ self = splitString && _toString(this) == "[object String]" ?
30935
+ this.split("") :
30936
+ object,
30937
+ length = self.length >>> 0,
30938
+ thisp = arguments[1];
30939
+
30940
+ // If no callback function or if callback is not a callable function
30941
+ if (_toString(fun) != "[object Function]") {
30942
+ throw new TypeError(fun + " is not a function");
30943
+ }
30944
+
30945
+ for (var i = 0; i < length; i++) {
30946
+ if (i in self && !fun.call(thisp, self[i], i, object)) {
30947
+ return false;
30948
+ }
30949
+ }
30950
+ return true;
30951
+ };
30952
+ }
30953
+
30954
+ // ES5 15.4.4.17
30955
+ // http://es5.github.com/#x15.4.4.17
30956
+ // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/some
30957
+ if (!Array.prototype.some || !properlyBoxesContext(Array.prototype.some)) {
30958
+ Array.prototype.some = function some(fun /*, thisp */) {
30959
+ var object = toObject(this),
30960
+ self = splitString && _toString(this) == "[object String]" ?
30961
+ this.split("") :
30962
+ object,
30963
+ length = self.length >>> 0,
30964
+ thisp = arguments[1];
30965
+
30966
+ // If no callback function or if callback is not a callable function
30967
+ if (_toString(fun) != "[object Function]") {
30968
+ throw new TypeError(fun + " is not a function");
30969
+ }
30970
+
30971
+ for (var i = 0; i < length; i++) {
30972
+ if (i in self && fun.call(thisp, self[i], i, object)) {
30973
+ return true;
30974
+ }
30975
+ }
30976
+ return false;
30977
+ };
30978
+ }
30979
+
30980
+ // ES5 15.4.4.21
30981
+ // http://es5.github.com/#x15.4.4.21
30982
+ // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduce
30983
+ if (!Array.prototype.reduce) {
30984
+ Array.prototype.reduce = function reduce(fun /*, initial*/) {
30985
+ var object = toObject(this),
30986
+ self = splitString && _toString(this) == "[object String]" ?
30987
+ this.split("") :
30988
+ object,
30989
+ length = self.length >>> 0;
30990
+
30991
+ // If no callback function or if callback is not a callable function
30992
+ if (_toString(fun) != "[object Function]") {
30993
+ throw new TypeError(fun + " is not a function");
30994
+ }
30995
+
30996
+ // no value to return if no initial value and an empty array
30997
+ if (!length && arguments.length == 1) {
30998
+ throw new TypeError("reduce of empty array with no initial value");
30999
+ }
31000
+
31001
+ var i = 0;
31002
+ var result;
31003
+ if (arguments.length >= 2) {
31004
+ result = arguments[1];
31005
+ } else {
31006
+ do {
31007
+ if (i in self) {
31008
+ result = self[i++];
31009
+ break;
31010
+ }
31011
+
31012
+ // if array contains no values, no initial value to return
31013
+ if (++i >= length) {
31014
+ throw new TypeError("reduce of empty array with no initial value");
31015
+ }
31016
+ } while (true);
31017
+ }
31018
+
31019
+ for (; i < length; i++) {
31020
+ if (i in self) {
31021
+ result = fun.call(void 0, result, self[i], i, object);
31022
+ }
31023
+ }
31024
+
31025
+ return result;
31026
+ };
31027
+ }
31028
+
31029
+ // ES5 15.4.4.22
31030
+ // http://es5.github.com/#x15.4.4.22
31031
+ // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduceRight
31032
+ if (!Array.prototype.reduceRight) {
31033
+ Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
31034
+ var object = toObject(this),
31035
+ self = splitString && _toString(this) == "[object String]" ?
31036
+ this.split("") :
31037
+ object,
31038
+ length = self.length >>> 0;
31039
+
31040
+ // If no callback function or if callback is not a callable function
31041
+ if (_toString(fun) != "[object Function]") {
31042
+ throw new TypeError(fun + " is not a function");
31043
+ }
31044
+
31045
+ // no value to return if no initial value, empty array
31046
+ if (!length && arguments.length == 1) {
31047
+ throw new TypeError("reduceRight of empty array with no initial value");
31048
+ }
31049
+
31050
+ var result, i = length - 1;
31051
+ if (arguments.length >= 2) {
31052
+ result = arguments[1];
31053
+ } else {
31054
+ do {
31055
+ if (i in self) {
31056
+ result = self[i--];
31057
+ break;
31058
+ }
31059
+
31060
+ // if array contains no values, no initial value to return
31061
+ if (--i < 0) {
31062
+ throw new TypeError("reduceRight of empty array with no initial value");
31063
+ }
31064
+ } while (true);
31065
+ }
31066
+
31067
+ if (i < 0) {
31068
+ return result;
31069
+ }
31070
+
31071
+ do {
31072
+ if (i in this) {
31073
+ result = fun.call(void 0, result, self[i], i, object);
31074
+ }
31075
+ } while (i--);
31076
+
31077
+ return result;
31078
+ };
31079
+ }
31080
+
31081
+ // ES5 15.4.4.14
31082
+ // http://es5.github.com/#x15.4.4.14
31083
+ // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf
31084
+ if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
31085
+ Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
31086
+ var self = splitString && _toString(this) == "[object String]" ?
31087
+ this.split("") :
31088
+ toObject(this),
31089
+ length = self.length >>> 0;
31090
+
31091
+ if (!length) {
31092
+ return -1;
31093
+ }
31094
+
31095
+ var i = 0;
31096
+ if (arguments.length > 1) {
31097
+ i = toInteger(arguments[1]);
31098
+ }
31099
+
31100
+ // handle negative indices
31101
+ i = i >= 0 ? i : Math.max(0, length + i);
31102
+ for (; i < length; i++) {
31103
+ if (i in self && self[i] === sought) {
31104
+ return i;
31105
+ }
31106
+ }
31107
+ return -1;
31108
+ };
31109
+ }
31110
+
31111
+ // ES5 15.4.4.15
31112
+ // http://es5.github.com/#x15.4.4.15
31113
+ // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/lastIndexOf
31114
+ if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) {
31115
+ Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
31116
+ var self = splitString && _toString(this) == "[object String]" ?
31117
+ this.split("") :
31118
+ toObject(this),
31119
+ length = self.length >>> 0;
31120
+
31121
+ if (!length) {
31122
+ return -1;
31123
+ }
31124
+ var i = length - 1;
31125
+ if (arguments.length > 1) {
31126
+ i = Math.min(i, toInteger(arguments[1]));
31127
+ }
31128
+ // handle negative indices
31129
+ i = i >= 0 ? i : length - Math.abs(i);
31130
+ for (; i >= 0; i--) {
31131
+ if (i in self && sought === self[i]) {
31132
+ return i;
31133
+ }
31134
+ }
31135
+ return -1;
31136
+ };
31137
+ }
31138
+
31139
+ //
31140
+ // Object
31141
+ // ======
31142
+ //
31143
+
31144
+ // ES5 15.2.3.14
31145
+ // http://es5.github.com/#x15.2.3.14
31146
+ if (!Object.keys) {
31147
+ // http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation
31148
+ var hasDontEnumBug = true,
31149
+ hasProtoEnumBug = (function () {}).propertyIsEnumerable('prototype'),
31150
+ dontEnums = [
31151
+ "toString",
31152
+ "toLocaleString",
31153
+ "valueOf",
31154
+ "hasOwnProperty",
31155
+ "isPrototypeOf",
31156
+ "propertyIsEnumerable",
31157
+ "constructor"
31158
+ ],
31159
+ dontEnumsLength = dontEnums.length;
31160
+
31161
+ for (var key in {"toString": null}) {
31162
+ hasDontEnumBug = false;
31163
+ }
31164
+
31165
+ Object.keys = function keys(object) {
31166
+ var isFunction = _toString(object) === '[object Function]',
31167
+ isObject = object !== null && typeof object === 'object';
31168
+
31169
+ if (!isObject && !isFunction) {
31170
+ throw new TypeError("Object.keys called on a non-object");
31171
+ }
31172
+
31173
+ var keys = [],
31174
+ skipProto = hasProtoEnumBug && isFunction;
31175
+ for (var name in object) {
31176
+ if (!(skipProto && name === 'prototype') && owns(object, name)) {
31177
+ keys.push(name);
31178
+ }
31179
+ }
31180
+
31181
+ if (hasDontEnumBug) {
31182
+ var ctor = object.constructor,
31183
+ skipConstructor = ctor && ctor.prototype === object;
31184
+ for (var i = 0; i < dontEnumsLength; i++) {
31185
+ var dontEnum = dontEnums[i];
31186
+ if (!(skipConstructor && dontEnum === 'constructor') && owns(object, dontEnum)) {
31187
+ keys.push(dontEnum);
31188
+ }
31189
+ }
31190
+ }
31191
+ return keys;
31192
+ };
31193
+
31194
+ }
31195
+
31196
+ //
31197
+ // Date
31198
+ // ====
31199
+ //
31200
+
31201
+ // ES5 15.9.5.43
31202
+ // http://es5.github.com/#x15.9.5.43
31203
+ // This function returns a String value represent the instance in time
31204
+ // represented by this Date object. The format of the String is the Date Time
31205
+ // string format defined in 15.9.1.15. All fields are present in the String.
31206
+ // The time zone is always UTC, denoted by the suffix Z. If the time value of
31207
+ // this object is not a finite Number a RangeError exception is thrown.
31208
+ var negativeDate = -62198755200000,
31209
+ negativeYearString = "-000001";
31210
+ if (
31211
+ !Date.prototype.toISOString ||
31212
+ (new Date(negativeDate).toISOString().indexOf(negativeYearString) === -1)
31213
+ ) {
31214
+ Date.prototype.toISOString = function toISOString() {
31215
+ var result, length, value, year, month;
31216
+ if (!isFinite(this)) {
31217
+ throw new RangeError("Date.prototype.toISOString called on non-finite value.");
31218
+ }
31219
+
31220
+ year = this.getUTCFullYear();
31221
+
31222
+ month = this.getUTCMonth();
31223
+ // see https://github.com/es-shims/es5-shim/issues/111
31224
+ year += Math.floor(month / 12);
31225
+ month = (month % 12 + 12) % 12;
31226
+
31227
+ // the date time string format is specified in 15.9.1.15.
31228
+ result = [month + 1, this.getUTCDate(),
31229
+ this.getUTCHours(), this.getUTCMinutes(), this.getUTCSeconds()];
31230
+ year = (
31231
+ (year < 0 ? "-" : (year > 9999 ? "+" : "")) +
31232
+ ("00000" + Math.abs(year))
31233
+ .slice(0 <= year && year <= 9999 ? -4 : -6)
31234
+ );
31235
+
31236
+ length = result.length;
31237
+ while (length--) {
31238
+ value = result[length];
31239
+ // pad months, days, hours, minutes, and seconds to have two
31240
+ // digits.
31241
+ if (value < 10) {
31242
+ result[length] = "0" + value;
31243
+ }
31244
+ }
31245
+ // pad milliseconds to have three digits.
31246
+ return (
31247
+ year + "-" + result.slice(0, 2).join("-") +
31248
+ "T" + result.slice(2).join(":") + "." +
31249
+ ("000" + this.getUTCMilliseconds()).slice(-3) + "Z"
31250
+ );
31251
+ };
31252
+ }
31253
+
31254
+
31255
+ // ES5 15.9.5.44
31256
+ // http://es5.github.com/#x15.9.5.44
31257
+ // This function provides a String representation of a Date object for use by
31258
+ // JSON.stringify (15.12.3).
31259
+ var dateToJSONIsSupported = false;
31260
+ try {
31261
+ dateToJSONIsSupported = (
31262
+ Date.prototype.toJSON &&
31263
+ new Date(NaN).toJSON() === null &&
31264
+ new Date(negativeDate).toJSON().indexOf(negativeYearString) !== -1 &&
31265
+ Date.prototype.toJSON.call({ // generic
31266
+ toISOString: function () {
31267
+ return true;
31268
+ }
31269
+ })
31270
+ );
31271
+ } catch (e) {
31272
+ }
31273
+ if (!dateToJSONIsSupported) {
31274
+ Date.prototype.toJSON = function toJSON(key) {
31275
+ // When the toJSON method is called with argument key, the following
31276
+ // steps are taken:
31277
+
31278
+ // 1. Let O be the result of calling ToObject, giving it the this
31279
+ // value as its argument.
31280
+ // 2. Let tv be toPrimitive(O, hint Number).
31281
+ var o = Object(this),
31282
+ tv = toPrimitive(o),
31283
+ toISO;
31284
+ // 3. If tv is a Number and is not finite, return null.
31285
+ if (typeof tv === "number" && !isFinite(tv)) {
31286
+ return null;
31287
+ }
31288
+ // 4. Let toISO be the result of calling the [[Get]] internal method of
31289
+ // O with argument "toISOString".
31290
+ toISO = o.toISOString;
31291
+ // 5. If IsCallable(toISO) is false, throw a TypeError exception.
31292
+ if (typeof toISO != "function") {
31293
+ throw new TypeError("toISOString property is not callable");
31294
+ }
31295
+ // 6. Return the result of calling the [[Call]] internal method of
31296
+ // toISO with O as the this value and an empty argument list.
31297
+ return toISO.call(o);
31298
+
31299
+ // NOTE 1 The argument is ignored.
31300
+
31301
+ // NOTE 2 The toJSON function is intentionally generic; it does not
31302
+ // require that its this value be a Date object. Therefore, it can be
31303
+ // transferred to other kinds of objects for use as a method. However,
31304
+ // it does require that any such object have a toISOString method. An
31305
+ // object is free to use the argument key to filter its
31306
+ // stringification.
31307
+ };
31308
+ }
31309
+
31310
+ // ES5 15.9.4.2
31311
+ // http://es5.github.com/#x15.9.4.2
31312
+ // based on work shared by Daniel Friesen (dantman)
31313
+ // http://gist.github.com/303249
31314
+ if (!Date.parse || "Date.parse is buggy") {
31315
+ // XXX global assignment won't work in embeddings that use
31316
+ // an alternate object for the context.
31317
+ Date = (function(NativeDate) {
31318
+
31319
+ // Date.length === 7
31320
+ function Date(Y, M, D, h, m, s, ms) {
31321
+ var length = arguments.length;
31322
+ if (this instanceof NativeDate) {
31323
+ var date = length == 1 && String(Y) === Y ? // isString(Y)
31324
+ // We explicitly pass it through parse:
31325
+ new NativeDate(Date.parse(Y)) :
31326
+ // We have to manually make calls depending on argument
31327
+ // length here
31328
+ length >= 7 ? new NativeDate(Y, M, D, h, m, s, ms) :
31329
+ length >= 6 ? new NativeDate(Y, M, D, h, m, s) :
31330
+ length >= 5 ? new NativeDate(Y, M, D, h, m) :
31331
+ length >= 4 ? new NativeDate(Y, M, D, h) :
31332
+ length >= 3 ? new NativeDate(Y, M, D) :
31333
+ length >= 2 ? new NativeDate(Y, M) :
31334
+ length >= 1 ? new NativeDate(Y) :
31335
+ new NativeDate();
31336
+ // Prevent mixups with unfixed Date object
31337
+ date.constructor = Date;
31338
+ return date;
31339
+ }
31340
+ return NativeDate.apply(this, arguments);
31341
+ };
31342
+
31343
+ // 15.9.1.15 Date Time String Format.
31344
+ var isoDateExpression = new RegExp("^" +
31345
+ "(\\d{4}|[\+\-]\\d{6})" + // four-digit year capture or sign +
31346
+ // 6-digit extended year
31347
+ "(?:-(\\d{2})" + // optional month capture
31348
+ "(?:-(\\d{2})" + // optional day capture
31349
+ "(?:" + // capture hours:minutes:seconds.milliseconds
31350
+ "T(\\d{2})" + // hours capture
31351
+ ":(\\d{2})" + // minutes capture
31352
+ "(?:" + // optional :seconds.milliseconds
31353
+ ":(\\d{2})" + // seconds capture
31354
+ "(?:(\\.\\d{1,}))?" + // milliseconds capture
31355
+ ")?" +
31356
+ "(" + // capture UTC offset component
31357
+ "Z|" + // UTC capture
31358
+ "(?:" + // offset specifier +/-hours:minutes
31359
+ "([-+])" + // sign capture
31360
+ "(\\d{2})" + // hours offset capture
31361
+ ":(\\d{2})" + // minutes offset capture
31362
+ ")" +
31363
+ ")?)?)?)?" +
31364
+ "$");
31365
+
31366
+ var months = [
31367
+ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365
31368
+ ];
31369
+
31370
+ function dayFromMonth(year, month) {
31371
+ var t = month > 1 ? 1 : 0;
31372
+ return (
31373
+ months[month] +
31374
+ Math.floor((year - 1969 + t) / 4) -
31375
+ Math.floor((year - 1901 + t) / 100) +
31376
+ Math.floor((year - 1601 + t) / 400) +
31377
+ 365 * (year - 1970)
31378
+ );
31379
+ }
31380
+
31381
+ function toUTC(t) {
31382
+ return Number(new NativeDate(1970, 0, 1, 0, 0, 0, t));
31383
+ }
31384
+
31385
+ // Copy any custom methods a 3rd party library may have added
31386
+ for (var key in NativeDate) {
31387
+ Date[key] = NativeDate[key];
31388
+ }
31389
+
31390
+ // Copy "native" methods explicitly; they may be non-enumerable
31391
+ Date.now = NativeDate.now;
31392
+ Date.UTC = NativeDate.UTC;
31393
+ Date.prototype = NativeDate.prototype;
31394
+ Date.prototype.constructor = Date;
31395
+
31396
+ // Upgrade Date.parse to handle simplified ISO 8601 strings
31397
+ Date.parse = function parse(string) {
31398
+ var match = isoDateExpression.exec(string);
31399
+ if (match) {
31400
+ // parse months, days, hours, minutes, seconds, and milliseconds
31401
+ // provide default values if necessary
31402
+ // parse the UTC offset component
31403
+ var year = Number(match[1]),
31404
+ month = Number(match[2] || 1) - 1,
31405
+ day = Number(match[3] || 1) - 1,
31406
+ hour = Number(match[4] || 0),
31407
+ minute = Number(match[5] || 0),
31408
+ second = Number(match[6] || 0),
31409
+ millisecond = Math.floor(Number(match[7] || 0) * 1000),
31410
+ // When time zone is missed, local offset should be used
31411
+ // (ES 5.1 bug)
31412
+ // see https://bugs.ecmascript.org/show_bug.cgi?id=112
31413
+ isLocalTime = Boolean(match[4] && !match[8]),
31414
+ signOffset = match[9] === "-" ? 1 : -1,
31415
+ hourOffset = Number(match[10] || 0),
31416
+ minuteOffset = Number(match[11] || 0),
31417
+ result;
31418
+ if (
31419
+ hour < (
31420
+ minute > 0 || second > 0 || millisecond > 0 ?
31421
+ 24 : 25
31422
+ ) &&
31423
+ minute < 60 && second < 60 && millisecond < 1000 &&
31424
+ month > -1 && month < 12 && hourOffset < 24 &&
31425
+ minuteOffset < 60 && // detect invalid offsets
31426
+ day > -1 &&
31427
+ day < (
31428
+ dayFromMonth(year, month + 1) -
31429
+ dayFromMonth(year, month)
31430
+ )
31431
+ ) {
31432
+ result = (
31433
+ (dayFromMonth(year, month) + day) * 24 +
31434
+ hour +
31435
+ hourOffset * signOffset
31436
+ ) * 60;
31437
+ result = (
31438
+ (result + minute + minuteOffset * signOffset) * 60 +
31439
+ second
31440
+ ) * 1000 + millisecond;
31441
+ if (isLocalTime) {
31442
+ result = toUTC(result);
31443
+ }
31444
+ if (-8.64e15 <= result && result <= 8.64e15) {
31445
+ return result;
31446
+ }
31447
+ }
31448
+ return NaN;
31449
+ }
31450
+ return NativeDate.parse.apply(this, arguments);
31451
+ };
31452
+
31453
+ return Date;
31454
+ })(Date);
31455
+ }
31456
+
31457
+ // ES5 15.9.4.4
31458
+ // http://es5.github.com/#x15.9.4.4
31459
+ if (!Date.now) {
31460
+ Date.now = function now() {
31461
+ return new Date().getTime();
31462
+ };
31463
+ }
31464
+
31465
+
31466
+ //
31467
+ // Number
31468
+ // ======
31469
+ //
31470
+
31471
+ // ES5.1 15.7.4.5
31472
+ // http://es5.github.com/#x15.7.4.5
31473
+ if (!Number.prototype.toFixed || (0.00008).toFixed(3) !== '0.000' || (0.9).toFixed(0) === '0' || (1.255).toFixed(2) !== '1.25' || (1000000000000000128).toFixed(0) !== "1000000000000000128") {
31474
+ // Hide these variables and functions
31475
+ (function () {
31476
+ var base, size, data, i;
31477
+
31478
+ base = 1e7;
31479
+ size = 6;
31480
+ data = [0, 0, 0, 0, 0, 0];
31481
+
31482
+ function multiply(n, c) {
31483
+ var i = -1;
31484
+ while (++i < size) {
31485
+ c += n * data[i];
31486
+ data[i] = c % base;
31487
+ c = Math.floor(c / base);
31488
+ }
31489
+ }
31490
+
31491
+ function divide(n) {
31492
+ var i = size, c = 0;
31493
+ while (--i >= 0) {
31494
+ c += data[i];
31495
+ data[i] = Math.floor(c / n);
31496
+ c = (c % n) * base;
31497
+ }
31498
+ }
31499
+
31500
+ function toString() {
31501
+ var i = size;
31502
+ var s = '';
31503
+ while (--i >= 0) {
31504
+ if (s !== '' || i === 0 || data[i] !== 0) {
31505
+ var t = String(data[i]);
31506
+ if (s === '') {
31507
+ s = t;
31508
+ } else {
31509
+ s += '0000000'.slice(0, 7 - t.length) + t;
31510
+ }
31511
+ }
31512
+ }
31513
+ return s;
31514
+ }
31515
+
31516
+ function pow(x, n, acc) {
31517
+ return (n === 0 ? acc : (n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc)));
31518
+ }
31519
+
31520
+ function log(x) {
31521
+ var n = 0;
31522
+ while (x >= 4096) {
31523
+ n += 12;
31524
+ x /= 4096;
31525
+ }
31526
+ while (x >= 2) {
31527
+ n += 1;
31528
+ x /= 2;
31529
+ }
31530
+ return n;
31531
+ }
31532
+
31533
+ Number.prototype.toFixed = function (fractionDigits) {
31534
+ var f, x, s, m, e, z, j, k;
31535
+
31536
+ // Test for NaN and round fractionDigits down
31537
+ f = Number(fractionDigits);
31538
+ f = f !== f ? 0 : Math.floor(f);
31539
+
31540
+ if (f < 0 || f > 20) {
31541
+ throw new RangeError("Number.toFixed called with invalid number of decimals");
31542
+ }
31543
+
31544
+ x = Number(this);
31545
+
31546
+ // Test for NaN
31547
+ if (x !== x) {
31548
+ return "NaN";
31549
+ }
31550
+
31551
+ // If it is too big or small, return the string value of the number
31552
+ if (x <= -1e21 || x >= 1e21) {
31553
+ return String(x);
31554
+ }
31555
+
31556
+ s = "";
31557
+
31558
+ if (x < 0) {
31559
+ s = "-";
31560
+ x = -x;
31561
+ }
31562
+
31563
+ m = "0";
31564
+
31565
+ if (x > 1e-21) {
31566
+ // 1e-21 < x < 1e21
31567
+ // -70 < log2(x) < 70
31568
+ e = log(x * pow(2, 69, 1)) - 69;
31569
+ z = (e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1));
31570
+ z *= 0x10000000000000; // Math.pow(2, 52);
31571
+ e = 52 - e;
31572
+
31573
+ // -18 < e < 122
31574
+ // x = z / 2 ^ e
31575
+ if (e > 0) {
31576
+ multiply(0, z);
31577
+ j = f;
31578
+
31579
+ while (j >= 7) {
31580
+ multiply(1e7, 0);
31581
+ j -= 7;
31582
+ }
31583
+
31584
+ multiply(pow(10, j, 1), 0);
31585
+ j = e - 1;
31586
+
31587
+ while (j >= 23) {
31588
+ divide(1 << 23);
31589
+ j -= 23;
31590
+ }
31591
+
31592
+ divide(1 << j);
31593
+ multiply(1, 1);
31594
+ divide(2);
31595
+ m = toString();
31596
+ } else {
31597
+ multiply(0, z);
31598
+ multiply(1 << (-e), 0);
31599
+ m = toString() + '0.00000000000000000000'.slice(2, 2 + f);
31600
+ }
31601
+ }
31602
+
31603
+ if (f > 0) {
31604
+ k = m.length;
31605
+
31606
+ if (k <= f) {
31607
+ m = s + '0.0000000000000000000'.slice(0, f - k + 2) + m;
31608
+ } else {
31609
+ m = s + m.slice(0, k - f) + '.' + m.slice(k - f);
31610
+ }
31611
+ } else {
31612
+ m = s + m;
31613
+ }
31614
+
31615
+ return m;
31616
+ }
31617
+ }());
31618
+ }
31619
+
31620
+
31621
+ //
31622
+ // String
31623
+ // ======
31624
+ //
31625
+
31626
+
31627
+ // ES5 15.5.4.14
31628
+ // http://es5.github.com/#x15.5.4.14
31629
+
31630
+ // [bugfix, IE lt 9, firefox 4, Konqueror, Opera, obscure browsers]
31631
+ // Many browsers do not split properly with regular expressions or they
31632
+ // do not perform the split correctly under obscure conditions.
31633
+ // See http://blog.stevenlevithan.com/archives/cross-browser-split
31634
+ // I've tested in many browsers and this seems to cover the deviant ones:
31635
+ // 'ab'.split(/(?:ab)*/) should be ["", ""], not [""]
31636
+ // '.'.split(/(.?)(.?)/) should be ["", ".", "", ""], not ["", ""]
31637
+ // 'tesst'.split(/(s)*/) should be ["t", undefined, "e", "s", "t"], not
31638
+ // [undefined, "t", undefined, "e", ...]
31639
+ // ''.split(/.?/) should be [], not [""]
31640
+ // '.'.split(/()()/) should be ["."], not ["", "", "."]
31641
+
31642
+ var string_split = String.prototype.split;
31643
+ if (
31644
+ 'ab'.split(/(?:ab)*/).length !== 2 ||
31645
+ '.'.split(/(.?)(.?)/).length !== 4 ||
31646
+ 'tesst'.split(/(s)*/)[1] === "t" ||
31647
+ ''.split(/.?/).length ||
31648
+ '.'.split(/()()/).length > 1
31649
+ ) {
31650
+ (function () {
31651
+ var compliantExecNpcg = /()??/.exec("")[1] === void 0; // NPCG: nonparticipating capturing group
31652
+
31653
+ String.prototype.split = function (separator, limit) {
31654
+ var string = this;
31655
+ if (separator === void 0 && limit === 0)
31656
+ return [];
31657
+
31658
+ // If `separator` is not a regex, use native split
31659
+ if (Object.prototype.toString.call(separator) !== "[object RegExp]") {
31660
+ return string_split.apply(this, arguments);
31661
+ }
31662
+
31663
+ var output = [],
31664
+ flags = (separator.ignoreCase ? "i" : "") +
31665
+ (separator.multiline ? "m" : "") +
31666
+ (separator.extended ? "x" : "") + // Proposed for ES6
31667
+ (separator.sticky ? "y" : ""), // Firefox 3+
31668
+ lastLastIndex = 0,
31669
+ // Make `global` and avoid `lastIndex` issues by working with a copy
31670
+ separator = new RegExp(separator.source, flags + "g"),
31671
+ separator2, match, lastIndex, lastLength;
31672
+ string += ""; // Type-convert
31673
+ if (!compliantExecNpcg) {
31674
+ // Doesn't need flags gy, but they don't hurt
31675
+ separator2 = new RegExp("^" + separator.source + "$(?!\\s)", flags);
31676
+ }
31677
+ /* Values for `limit`, per the spec:
31678
+ * If undefined: 4294967295 // Math.pow(2, 32) - 1
31679
+ * If 0, Infinity, or NaN: 0
31680
+ * If positive number: limit = Math.floor(limit); if (limit > 4294967295) limit -= 4294967296;
31681
+ * If negative number: 4294967296 - Math.floor(Math.abs(limit))
31682
+ * If other: Type-convert, then use the above rules
31683
+ */
31684
+ limit = limit === void 0 ?
31685
+ -1 >>> 0 : // Math.pow(2, 32) - 1
31686
+ limit >>> 0; // ToUint32(limit)
31687
+ while (match = separator.exec(string)) {
31688
+ // `separator.lastIndex` is not reliable cross-browser
31689
+ lastIndex = match.index + match[0].length;
31690
+ if (lastIndex > lastLastIndex) {
31691
+ output.push(string.slice(lastLastIndex, match.index));
31692
+ // Fix browsers whose `exec` methods don't consistently return `undefined` for
31693
+ // nonparticipating capturing groups
31694
+ if (!compliantExecNpcg && match.length > 1) {
31695
+ match[0].replace(separator2, function () {
31696
+ for (var i = 1; i < arguments.length - 2; i++) {
31697
+ if (arguments[i] === void 0) {
31698
+ match[i] = void 0;
31699
+ }
31700
+ }
31701
+ });
31702
+ }
31703
+ if (match.length > 1 && match.index < string.length) {
31704
+ Array.prototype.push.apply(output, match.slice(1));
31705
+ }
31706
+ lastLength = match[0].length;
31707
+ lastLastIndex = lastIndex;
31708
+ if (output.length >= limit) {
31709
+ break;
31710
+ }
31711
+ }
31712
+ if (separator.lastIndex === match.index) {
31713
+ separator.lastIndex++; // Avoid an infinite loop
31714
+ }
31715
+ }
31716
+ if (lastLastIndex === string.length) {
31717
+ if (lastLength || !separator.test("")) {
31718
+ output.push("");
31719
+ }
31720
+ } else {
31721
+ output.push(string.slice(lastLastIndex));
31722
+ }
31723
+ return output.length > limit ? output.slice(0, limit) : output;
31724
+ };
31725
+ }());
31726
+
31727
+ // [bugfix, chrome]
31728
+ // If separator is undefined, then the result array contains just one String,
31729
+ // which is the this value (converted to a String). If limit is not undefined,
31730
+ // then the output array is truncated so that it contains no more than limit
31731
+ // elements.
31732
+ // "0".split(undefined, 0) -> []
31733
+ } else if ("0".split(void 0, 0).length) {
31734
+ String.prototype.split = function(separator, limit) {
31735
+ if (separator === void 0 && limit === 0) return [];
31736
+ return string_split.apply(this, arguments);
31737
+ }
31738
+ }
31739
+
31740
+
31741
+ // ECMA-262, 3rd B.2.3
31742
+ // Note an ECMAScript standart, although ECMAScript 3rd Edition has a
31743
+ // non-normative section suggesting uniform semantics and it should be
31744
+ // normalized across all browsers
31745
+ // [bugfix, IE lt 9] IE < 9 substr() with negative value not working in IE
31746
+ if ("".substr && "0b".substr(-1) !== "b") {
31747
+ var string_substr = String.prototype.substr;
31748
+ /**
31749
+ * Get the substring of a string
31750
+ * @param {integer} start where to start the substring
31751
+ * @param {integer} length how many characters to return
31752
+ * @return {string}
31753
+ */
31754
+ String.prototype.substr = function(start, length) {
31755
+ return string_substr.call(
31756
+ this,
31757
+ start < 0 ? ((start = this.length + start) < 0 ? 0 : start) : start,
31758
+ length
31759
+ );
31760
+ }
31761
+ }
31762
+
31763
+ // ES5 15.5.4.20
31764
+ // whitespace from: http://es5.github.io/#x15.5.4.20
31765
+ var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
31766
+ "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
31767
+ "\u2029\uFEFF";
31768
+ if (!String.prototype.trim || ws.trim()) {
31769
+ // http://blog.stevenlevithan.com/archives/faster-trim-javascript
31770
+ // http://perfectionkills.com/whitespace-deviations/
31771
+ ws = "[" + ws + "]";
31772
+ var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
31773
+ trimEndRegexp = new RegExp(ws + ws + "*$");
31774
+ String.prototype.trim = function trim() {
31775
+ if (this === void 0 || this === null) {
31776
+ throw new TypeError("can't convert "+this+" to object");
31777
+ }
31778
+ return String(this)
31779
+ .replace(trimBeginRegexp, "")
31780
+ .replace(trimEndRegexp, "");
31781
+ };
31782
+ }
31783
+
31784
+ // ES-5 15.1.2.2
31785
+ if (parseInt(ws + '08') !== 8 || parseInt(ws + '0x16') !== 22) {
31786
+ parseInt = (function (origParseInt) {
31787
+ var hexRegex = /^0[xX]/;
31788
+ return function parseIntES5(str, radix) {
31789
+ str = String(str).trim();
31790
+ if (!+radix) {
31791
+ radix = hexRegex.test(str) ? 16 : 10;
31792
+ }
31793
+ return origParseInt(str, radix);
31794
+ };
31795
+ }(parseInt));
31796
+ }
31797
+
31798
+ //
31799
+ // Util
31800
+ // ======
31801
+ //
31802
+
31803
+ // ES5 9.4
31804
+ // http://es5.github.com/#x9.4
31805
+ // http://jsperf.com/to-integer
31806
+
31807
+ function toInteger(n) {
31808
+ n = +n;
31809
+ if (n !== n) { // isNaN
31810
+ n = 0;
31811
+ } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) {
31812
+ n = (n > 0 || -1) * Math.floor(Math.abs(n));
31813
+ }
31814
+ return n;
31815
+ }
31816
+
31817
+ function isPrimitive(input) {
31818
+ var type = typeof input;
31819
+ return (
31820
+ input === null ||
31821
+ type === "undefined" ||
31822
+ type === "boolean" ||
31823
+ type === "number" ||
31824
+ type === "string"
31825
+ );
31826
+ }
31827
+
31828
+ function toPrimitive(input) {
31829
+ var val, valueOf, toString;
31830
+ if (isPrimitive(input)) {
31831
+ return input;
31832
+ }
31833
+ valueOf = input.valueOf;
31834
+ if (typeof valueOf === "function") {
31835
+ val = valueOf.call(input);
31836
+ if (isPrimitive(val)) {
31837
+ return val;
31838
+ }
31839
+ }
31840
+ toString = input.toString;
31841
+ if (typeof toString === "function") {
31842
+ val = toString.call(input);
31843
+ if (isPrimitive(val)) {
31844
+ return val;
31845
+ }
31846
+ }
31847
+ throw new TypeError();
31848
+ }
31849
+
31850
+ // ES5 9.9
31851
+ // http://es5.github.com/#x9.9
31852
+ var toObject = function (o) {
31853
+ if (o == null) { // this matches both null and undefined
31854
+ throw new TypeError("can't convert "+o+" to object");
31855
+ }
31856
+ return Object(o);
31857
+ };
31858
+
31859
+ }));
31860
+
31861
+ });
31862
+ require.register("ened/vendor/assets/javascripts/polyfills/es6-map-shim.js", function(exports, require, module){
30479
31863
  /**
30480
31864
  * Copyright 2012 Eric Wendelin - MIT License
30481
31865
  *
@@ -30733,11 +32117,54 @@ require.register("ened/vendor/assets/javascripts/shims/es6-map-shim.js", functio
30733
32117
  }.call(this, window));
30734
32118
 
30735
32119
  });
32120
+
32121
+
32122
+
32123
+
32124
+
32125
+
32126
+
32127
+
32128
+
32129
+
32130
+
32131
+
32132
+
32133
+
32134
+
32135
+
32136
+
32137
+
32138
+
32139
+
32140
+
32141
+
32142
+
32143
+
32144
+
32145
+
32146
+
32147
+
32148
+
32149
+
32150
+
32151
+
32152
+
32153
+
32154
+
32155
+
32156
+
32157
+
32158
+
32159
+
32160
+
32161
+
32162
+
32163
+
30736
32164
  require.alias("mikeric-rivets/dist/rivets.js", "ened/deps/rivets/dist/rivets.js");
30737
32165
  require.alias("mikeric-rivets/dist/rivets.js", "ened/deps/rivets/index.js");
30738
32166
  require.alias("mikeric-rivets/dist/rivets.js", "rivets/index.js");
30739
32167
  require.alias("mikeric-rivets/dist/rivets.js", "mikeric-rivets/index.js");
30740
-
30741
32168
  require.alias("segmentio-extend/index.js", "ened/deps/extend/index.js");
30742
32169
  require.alias("segmentio-extend/index.js", "extend/index.js");
30743
32170
 
@@ -30745,12 +32172,10 @@ require.alias("pluma-assimilate/dist/assimilate.js", "ened/deps/assimilate/dist/
30745
32172
  require.alias("pluma-assimilate/dist/assimilate.js", "ened/deps/assimilate/index.js");
30746
32173
  require.alias("pluma-assimilate/dist/assimilate.js", "assimilate/index.js");
30747
32174
  require.alias("pluma-assimilate/dist/assimilate.js", "pluma-assimilate/index.js");
30748
-
30749
32175
  require.alias("paulmillr-es6-shim/es6-shim.js", "ened/deps/es6-shim/es6-shim.js");
30750
32176
  require.alias("paulmillr-es6-shim/es6-shim.js", "ened/deps/es6-shim/index.js");
30751
32177
  require.alias("paulmillr-es6-shim/es6-shim.js", "es6-shim/index.js");
30752
32178
  require.alias("paulmillr-es6-shim/es6-shim.js", "paulmillr-es6-shim/index.js");
30753
-
30754
32179
  require.alias("component-type/index.js", "ened/deps/type/index.js");
30755
32180
  require.alias("component-type/index.js", "type/index.js");
30756
32181
 
@@ -30768,7 +32193,6 @@ require.alias("components-modernizr/modernizr.js", "ened/deps/modernizr/moderniz
30768
32193
  require.alias("components-modernizr/modernizr.js", "ened/deps/modernizr/index.js");
30769
32194
  require.alias("components-modernizr/modernizr.js", "modernizr/index.js");
30770
32195
  require.alias("components-modernizr/modernizr.js", "components-modernizr/index.js");
30771
-
30772
32196
  require.alias("indefinido-indemma/index.js", "ened/deps/indemma/index.js");
30773
32197
  require.alias("indefinido-indemma/vendor/stampit.js", "ened/deps/indemma/vendor/stampit.js");
30774
32198
  require.alias("indefinido-indemma/vendor/sinon.js", "ened/deps/indemma/vendor/sinon.js");
@@ -30797,7 +32221,6 @@ require.alias("indefinido-indemma/index.js", "indemma/index.js");
30797
32221
  require.alias("pluma-assimilate/dist/assimilate.js", "indefinido-indemma/deps/assimilate/dist/assimilate.js");
30798
32222
  require.alias("pluma-assimilate/dist/assimilate.js", "indefinido-indemma/deps/assimilate/index.js");
30799
32223
  require.alias("pluma-assimilate/dist/assimilate.js", "pluma-assimilate/index.js");
30800
-
30801
32224
  require.alias("component-type/index.js", "indefinido-indemma/deps/type/index.js");
30802
32225
 
30803
32226
  require.alias("component-bind/index.js", "indefinido-indemma/deps/bind/index.js");
@@ -30872,6 +32295,4 @@ require.alias("component-value/index.js", "component-dom/deps/value/index.js");
30872
32295
  require.alias("component-type/index.js", "component-value/deps/type/index.js");
30873
32296
 
30874
32297
  require.alias("component-value/index.js", "component-value/index.js");
30875
-
30876
32298
  require.alias("component-query/index.js", "component-dom/deps/query/index.js");
30877
-