@mjhls/mjh-framework 1.0.12 → 1.0.14

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.
package/dist/index.es.js CHANGED
@@ -12,12 +12,7 @@ import NavDropdown from 'react-bootstrap/NavDropdown';
12
12
  import Form from 'react-bootstrap/Form';
13
13
  import FormControl from 'react-bootstrap/FormControl';
14
14
  import Button from 'react-bootstrap/Button';
15
- import events from 'events';
16
15
  import PropTypes from 'prop-types';
17
- import tty from 'tty';
18
- import util from 'util';
19
- import fs from 'fs';
20
- import net from 'net';
21
16
 
22
17
  /*! *****************************************************************************
23
18
  Copyright (c) Microsoft Corporation. All rights reserved.
@@ -897,6 +892,27 @@ var DeckQueue = function (_React$Component) {
897
892
  return DeckQueue;
898
893
  }(React__default.Component);
899
894
 
895
+ var Column1 = function Column1(props) {
896
+ return React__default.createElement(
897
+ 'section',
898
+ null,
899
+ React__default.createElement(
900
+ Row,
901
+ { className: 'justify-content-md-center' },
902
+ React__default.createElement(
903
+ Col,
904
+ { className: 'middleCol' },
905
+ React__default.createElement(
906
+ 'h1',
907
+ null,
908
+ props.title
909
+ ),
910
+ props.children
911
+ )
912
+ )
913
+ );
914
+ };
915
+
900
916
  var Column2 = function Column2(props) {
901
917
  var rightItems = props.rightItems;
902
918
 
@@ -1443,6 +1459,472 @@ function createCommonjsModule(fn, module) {
1443
1459
  return module = { exports: {} }, fn(module, module.exports), module.exports;
1444
1460
  }
1445
1461
 
1462
+ var domain;
1463
+
1464
+ // This constructor is used to store event handlers. Instantiating this is
1465
+ // faster than explicitly calling `Object.create(null)` to get a "clean" empty
1466
+ // object (tested with v8 v4.9).
1467
+ function EventHandlers() {}
1468
+ EventHandlers.prototype = Object.create(null);
1469
+
1470
+ function EventEmitter() {
1471
+ EventEmitter.init.call(this);
1472
+ }
1473
+
1474
+ // nodejs oddity
1475
+ // require('events') === require('events').EventEmitter
1476
+ EventEmitter.EventEmitter = EventEmitter;
1477
+
1478
+ EventEmitter.usingDomains = false;
1479
+
1480
+ EventEmitter.prototype.domain = undefined;
1481
+ EventEmitter.prototype._events = undefined;
1482
+ EventEmitter.prototype._maxListeners = undefined;
1483
+
1484
+ // By default EventEmitters will print a warning if more than 10 listeners are
1485
+ // added to it. This is a useful default which helps finding memory leaks.
1486
+ EventEmitter.defaultMaxListeners = 10;
1487
+
1488
+ EventEmitter.init = function() {
1489
+ this.domain = null;
1490
+ if (EventEmitter.usingDomains) {
1491
+ // if there is an active domain, then attach to it.
1492
+ if (domain.active && !(this instanceof domain.Domain)) ;
1493
+ }
1494
+
1495
+ if (!this._events || this._events === Object.getPrototypeOf(this)._events) {
1496
+ this._events = new EventHandlers();
1497
+ this._eventsCount = 0;
1498
+ }
1499
+
1500
+ this._maxListeners = this._maxListeners || undefined;
1501
+ };
1502
+
1503
+ // Obviously not all Emitters should be limited to 10. This function allows
1504
+ // that to be increased. Set to zero for unlimited.
1505
+ EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
1506
+ if (typeof n !== 'number' || n < 0 || isNaN(n))
1507
+ throw new TypeError('"n" argument must be a positive number');
1508
+ this._maxListeners = n;
1509
+ return this;
1510
+ };
1511
+
1512
+ function $getMaxListeners(that) {
1513
+ if (that._maxListeners === undefined)
1514
+ return EventEmitter.defaultMaxListeners;
1515
+ return that._maxListeners;
1516
+ }
1517
+
1518
+ EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
1519
+ return $getMaxListeners(this);
1520
+ };
1521
+
1522
+ // These standalone emit* functions are used to optimize calling of event
1523
+ // handlers for fast cases because emit() itself often has a variable number of
1524
+ // arguments and can be deoptimized because of that. These functions always have
1525
+ // the same number of arguments and thus do not get deoptimized, so the code
1526
+ // inside them can execute faster.
1527
+ function emitNone(handler, isFn, self) {
1528
+ if (isFn)
1529
+ handler.call(self);
1530
+ else {
1531
+ var len = handler.length;
1532
+ var listeners = arrayClone(handler, len);
1533
+ for (var i = 0; i < len; ++i)
1534
+ listeners[i].call(self);
1535
+ }
1536
+ }
1537
+ function emitOne(handler, isFn, self, arg1) {
1538
+ if (isFn)
1539
+ handler.call(self, arg1);
1540
+ else {
1541
+ var len = handler.length;
1542
+ var listeners = arrayClone(handler, len);
1543
+ for (var i = 0; i < len; ++i)
1544
+ listeners[i].call(self, arg1);
1545
+ }
1546
+ }
1547
+ function emitTwo(handler, isFn, self, arg1, arg2) {
1548
+ if (isFn)
1549
+ handler.call(self, arg1, arg2);
1550
+ else {
1551
+ var len = handler.length;
1552
+ var listeners = arrayClone(handler, len);
1553
+ for (var i = 0; i < len; ++i)
1554
+ listeners[i].call(self, arg1, arg2);
1555
+ }
1556
+ }
1557
+ function emitThree(handler, isFn, self, arg1, arg2, arg3) {
1558
+ if (isFn)
1559
+ handler.call(self, arg1, arg2, arg3);
1560
+ else {
1561
+ var len = handler.length;
1562
+ var listeners = arrayClone(handler, len);
1563
+ for (var i = 0; i < len; ++i)
1564
+ listeners[i].call(self, arg1, arg2, arg3);
1565
+ }
1566
+ }
1567
+
1568
+ function emitMany(handler, isFn, self, args) {
1569
+ if (isFn)
1570
+ handler.apply(self, args);
1571
+ else {
1572
+ var len = handler.length;
1573
+ var listeners = arrayClone(handler, len);
1574
+ for (var i = 0; i < len; ++i)
1575
+ listeners[i].apply(self, args);
1576
+ }
1577
+ }
1578
+
1579
+ EventEmitter.prototype.emit = function emit(type) {
1580
+ var er, handler, len, args, i, events, domain;
1581
+ var doError = (type === 'error');
1582
+
1583
+ events = this._events;
1584
+ if (events)
1585
+ doError = (doError && events.error == null);
1586
+ else if (!doError)
1587
+ return false;
1588
+
1589
+ domain = this.domain;
1590
+
1591
+ // If there is no 'error' event listener then throw.
1592
+ if (doError) {
1593
+ er = arguments[1];
1594
+ if (domain) {
1595
+ if (!er)
1596
+ er = new Error('Uncaught, unspecified "error" event');
1597
+ er.domainEmitter = this;
1598
+ er.domain = domain;
1599
+ er.domainThrown = false;
1600
+ domain.emit('error', er);
1601
+ } else if (er instanceof Error) {
1602
+ throw er; // Unhandled 'error' event
1603
+ } else {
1604
+ // At least give some kind of context to the user
1605
+ var err = new Error('Uncaught, unspecified "error" event. (' + er + ')');
1606
+ err.context = er;
1607
+ throw err;
1608
+ }
1609
+ return false;
1610
+ }
1611
+
1612
+ handler = events[type];
1613
+
1614
+ if (!handler)
1615
+ return false;
1616
+
1617
+ var isFn = typeof handler === 'function';
1618
+ len = arguments.length;
1619
+ switch (len) {
1620
+ // fast cases
1621
+ case 1:
1622
+ emitNone(handler, isFn, this);
1623
+ break;
1624
+ case 2:
1625
+ emitOne(handler, isFn, this, arguments[1]);
1626
+ break;
1627
+ case 3:
1628
+ emitTwo(handler, isFn, this, arguments[1], arguments[2]);
1629
+ break;
1630
+ case 4:
1631
+ emitThree(handler, isFn, this, arguments[1], arguments[2], arguments[3]);
1632
+ break;
1633
+ // slower
1634
+ default:
1635
+ args = new Array(len - 1);
1636
+ for (i = 1; i < len; i++)
1637
+ args[i - 1] = arguments[i];
1638
+ emitMany(handler, isFn, this, args);
1639
+ }
1640
+
1641
+ return true;
1642
+ };
1643
+
1644
+ function _addListener(target, type, listener, prepend) {
1645
+ var m;
1646
+ var events;
1647
+ var existing;
1648
+
1649
+ if (typeof listener !== 'function')
1650
+ throw new TypeError('"listener" argument must be a function');
1651
+
1652
+ events = target._events;
1653
+ if (!events) {
1654
+ events = target._events = new EventHandlers();
1655
+ target._eventsCount = 0;
1656
+ } else {
1657
+ // To avoid recursion in the case that type === "newListener"! Before
1658
+ // adding it to the listeners, first emit "newListener".
1659
+ if (events.newListener) {
1660
+ target.emit('newListener', type,
1661
+ listener.listener ? listener.listener : listener);
1662
+
1663
+ // Re-assign `events` because a newListener handler could have caused the
1664
+ // this._events to be assigned to a new object
1665
+ events = target._events;
1666
+ }
1667
+ existing = events[type];
1668
+ }
1669
+
1670
+ if (!existing) {
1671
+ // Optimize the case of one listener. Don't need the extra array object.
1672
+ existing = events[type] = listener;
1673
+ ++target._eventsCount;
1674
+ } else {
1675
+ if (typeof existing === 'function') {
1676
+ // Adding the second element, need to change to array.
1677
+ existing = events[type] = prepend ? [listener, existing] :
1678
+ [existing, listener];
1679
+ } else {
1680
+ // If we've already got an array, just append.
1681
+ if (prepend) {
1682
+ existing.unshift(listener);
1683
+ } else {
1684
+ existing.push(listener);
1685
+ }
1686
+ }
1687
+
1688
+ // Check for listener leak
1689
+ if (!existing.warned) {
1690
+ m = $getMaxListeners(target);
1691
+ if (m && m > 0 && existing.length > m) {
1692
+ existing.warned = true;
1693
+ var w = new Error('Possible EventEmitter memory leak detected. ' +
1694
+ existing.length + ' ' + type + ' listeners added. ' +
1695
+ 'Use emitter.setMaxListeners() to increase limit');
1696
+ w.name = 'MaxListenersExceededWarning';
1697
+ w.emitter = target;
1698
+ w.type = type;
1699
+ w.count = existing.length;
1700
+ emitWarning(w);
1701
+ }
1702
+ }
1703
+ }
1704
+
1705
+ return target;
1706
+ }
1707
+ function emitWarning(e) {
1708
+ typeof console.warn === 'function' ? console.warn(e) : console.log(e);
1709
+ }
1710
+ EventEmitter.prototype.addListener = function addListener(type, listener) {
1711
+ return _addListener(this, type, listener, false);
1712
+ };
1713
+
1714
+ EventEmitter.prototype.on = EventEmitter.prototype.addListener;
1715
+
1716
+ EventEmitter.prototype.prependListener =
1717
+ function prependListener(type, listener) {
1718
+ return _addListener(this, type, listener, true);
1719
+ };
1720
+
1721
+ function _onceWrap(target, type, listener) {
1722
+ var fired = false;
1723
+ function g() {
1724
+ target.removeListener(type, g);
1725
+ if (!fired) {
1726
+ fired = true;
1727
+ listener.apply(target, arguments);
1728
+ }
1729
+ }
1730
+ g.listener = listener;
1731
+ return g;
1732
+ }
1733
+
1734
+ EventEmitter.prototype.once = function once(type, listener) {
1735
+ if (typeof listener !== 'function')
1736
+ throw new TypeError('"listener" argument must be a function');
1737
+ this.on(type, _onceWrap(this, type, listener));
1738
+ return this;
1739
+ };
1740
+
1741
+ EventEmitter.prototype.prependOnceListener =
1742
+ function prependOnceListener(type, listener) {
1743
+ if (typeof listener !== 'function')
1744
+ throw new TypeError('"listener" argument must be a function');
1745
+ this.prependListener(type, _onceWrap(this, type, listener));
1746
+ return this;
1747
+ };
1748
+
1749
+ // emits a 'removeListener' event iff the listener was removed
1750
+ EventEmitter.prototype.removeListener =
1751
+ function removeListener(type, listener) {
1752
+ var list, events, position, i, originalListener;
1753
+
1754
+ if (typeof listener !== 'function')
1755
+ throw new TypeError('"listener" argument must be a function');
1756
+
1757
+ events = this._events;
1758
+ if (!events)
1759
+ return this;
1760
+
1761
+ list = events[type];
1762
+ if (!list)
1763
+ return this;
1764
+
1765
+ if (list === listener || (list.listener && list.listener === listener)) {
1766
+ if (--this._eventsCount === 0)
1767
+ this._events = new EventHandlers();
1768
+ else {
1769
+ delete events[type];
1770
+ if (events.removeListener)
1771
+ this.emit('removeListener', type, list.listener || listener);
1772
+ }
1773
+ } else if (typeof list !== 'function') {
1774
+ position = -1;
1775
+
1776
+ for (i = list.length; i-- > 0;) {
1777
+ if (list[i] === listener ||
1778
+ (list[i].listener && list[i].listener === listener)) {
1779
+ originalListener = list[i].listener;
1780
+ position = i;
1781
+ break;
1782
+ }
1783
+ }
1784
+
1785
+ if (position < 0)
1786
+ return this;
1787
+
1788
+ if (list.length === 1) {
1789
+ list[0] = undefined;
1790
+ if (--this._eventsCount === 0) {
1791
+ this._events = new EventHandlers();
1792
+ return this;
1793
+ } else {
1794
+ delete events[type];
1795
+ }
1796
+ } else {
1797
+ spliceOne(list, position);
1798
+ }
1799
+
1800
+ if (events.removeListener)
1801
+ this.emit('removeListener', type, originalListener || listener);
1802
+ }
1803
+
1804
+ return this;
1805
+ };
1806
+
1807
+ EventEmitter.prototype.removeAllListeners =
1808
+ function removeAllListeners(type) {
1809
+ var listeners, events;
1810
+
1811
+ events = this._events;
1812
+ if (!events)
1813
+ return this;
1814
+
1815
+ // not listening for removeListener, no need to emit
1816
+ if (!events.removeListener) {
1817
+ if (arguments.length === 0) {
1818
+ this._events = new EventHandlers();
1819
+ this._eventsCount = 0;
1820
+ } else if (events[type]) {
1821
+ if (--this._eventsCount === 0)
1822
+ this._events = new EventHandlers();
1823
+ else
1824
+ delete events[type];
1825
+ }
1826
+ return this;
1827
+ }
1828
+
1829
+ // emit removeListener for all listeners on all events
1830
+ if (arguments.length === 0) {
1831
+ var keys = Object.keys(events);
1832
+ for (var i = 0, key; i < keys.length; ++i) {
1833
+ key = keys[i];
1834
+ if (key === 'removeListener') continue;
1835
+ this.removeAllListeners(key);
1836
+ }
1837
+ this.removeAllListeners('removeListener');
1838
+ this._events = new EventHandlers();
1839
+ this._eventsCount = 0;
1840
+ return this;
1841
+ }
1842
+
1843
+ listeners = events[type];
1844
+
1845
+ if (typeof listeners === 'function') {
1846
+ this.removeListener(type, listeners);
1847
+ } else if (listeners) {
1848
+ // LIFO order
1849
+ do {
1850
+ this.removeListener(type, listeners[listeners.length - 1]);
1851
+ } while (listeners[0]);
1852
+ }
1853
+
1854
+ return this;
1855
+ };
1856
+
1857
+ EventEmitter.prototype.listeners = function listeners(type) {
1858
+ var evlistener;
1859
+ var ret;
1860
+ var events = this._events;
1861
+
1862
+ if (!events)
1863
+ ret = [];
1864
+ else {
1865
+ evlistener = events[type];
1866
+ if (!evlistener)
1867
+ ret = [];
1868
+ else if (typeof evlistener === 'function')
1869
+ ret = [evlistener.listener || evlistener];
1870
+ else
1871
+ ret = unwrapListeners(evlistener);
1872
+ }
1873
+
1874
+ return ret;
1875
+ };
1876
+
1877
+ EventEmitter.listenerCount = function(emitter, type) {
1878
+ if (typeof emitter.listenerCount === 'function') {
1879
+ return emitter.listenerCount(type);
1880
+ } else {
1881
+ return listenerCount.call(emitter, type);
1882
+ }
1883
+ };
1884
+
1885
+ EventEmitter.prototype.listenerCount = listenerCount;
1886
+ function listenerCount(type) {
1887
+ var events = this._events;
1888
+
1889
+ if (events) {
1890
+ var evlistener = events[type];
1891
+
1892
+ if (typeof evlistener === 'function') {
1893
+ return 1;
1894
+ } else if (evlistener) {
1895
+ return evlistener.length;
1896
+ }
1897
+ }
1898
+
1899
+ return 0;
1900
+ }
1901
+
1902
+ EventEmitter.prototype.eventNames = function eventNames() {
1903
+ return this._eventsCount > 0 ? Reflect.ownKeys(this._events) : [];
1904
+ };
1905
+
1906
+ // About 1.5x faster than the two-arg version of Array#splice().
1907
+ function spliceOne(list, index) {
1908
+ for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1)
1909
+ list[i] = list[k];
1910
+ list.pop();
1911
+ }
1912
+
1913
+ function arrayClone(arr, i) {
1914
+ var copy = new Array(i);
1915
+ while (i--)
1916
+ copy[i] = arr[i];
1917
+ return copy;
1918
+ }
1919
+
1920
+ function unwrapListeners(arr) {
1921
+ var ret = new Array(arr.length);
1922
+ for (var i = 0; i < ret.length; ++i) {
1923
+ ret[i] = arr[i].listener || arr[i];
1924
+ }
1925
+ return ret;
1926
+ }
1927
+
1446
1928
  var utils = createCommonjsModule(function (module, exports) {
1447
1929
 
1448
1930
  Object.defineProperty(exports, "__esModule", {
@@ -1509,7 +1991,7 @@ var registeredSlots = {};
1509
1991
  var managerAlreadyInitialized = false;
1510
1992
  var globalTargetingArguments = {};
1511
1993
  var globalAdSenseAttributes = {};
1512
- var DFPManager = Object.assign(new events.EventEmitter().setMaxListeners(0), {
1994
+ var DFPManager = Object.assign(new EventEmitter.EventEmitter().setMaxListeners(0), {
1513
1995
  singleRequestIsEnabled: function singleRequestIsEnabled() {
1514
1996
  return singleRequestEnabled;
1515
1997
  },
@@ -2620,52 +3102,63 @@ var lib_1 = lib.DFPSlotsProvider;
2620
3102
  var lib_2 = lib.AdSlot;
2621
3103
  var lib_3 = lib.DFPManager;
2622
3104
 
2623
- var AD728x90 = function (_Component) {
2624
- inherits(AD728x90, _Component);
3105
+ var AD = function AD(_ref) {
3106
+ var networkID = _ref.networkID,
3107
+ adUnit = _ref.adUnit,
3108
+ sizeMapping = _ref.sizeMapping,
3109
+ className = _ref.className,
3110
+ _ref$slotId = _ref.slotId,
3111
+ slotId = _ref$slotId === undefined ? 'test' : _ref$slotId,
3112
+ sizes = _ref.sizes,
3113
+ minInViewPercent = _ref.minInViewPercent;
2625
3114
 
2626
- function AD728x90(props) {
2627
- classCallCheck(this, AD728x90);
2628
-
2629
- var _this = possibleConstructorReturn(this, (AD728x90.__proto__ || Object.getPrototypeOf(AD728x90)).call(this, props));
3115
+ return React__default.createElement(
3116
+ lib_1,
3117
+ { dfpNetworkId: networkID, sizeMapping: sizeMapping },
3118
+ React__default.createElement(
3119
+ 'div',
3120
+ { className: className },
3121
+ React__default.createElement(lib_2, {
3122
+ slotId: slotId,
3123
+ sizes: sizes,
3124
+ adUnit: adUnit,
3125
+ sizeMapping: sizeMapping,
3126
+ onSlotVisibilityChanged: function onSlotVisibilityChanged(dfpEventData) {
3127
+ if (minInViewPercent && dfpEventData.event.inViewPercentage < minInViewPercent) {
3128
+ lib_3.refresh(slotId);
3129
+ }
3130
+ },
3131
+ onSlotIsViewable: function onSlotIsViewable(dfpEventData) {
3132
+ return console.log(slotId + ' viewable!.', dfpEventData);
3133
+ }
3134
+ })
3135
+ )
3136
+ );
3137
+ };
2630
3138
 
2631
- _this.option = {
2632
- networkID: props.networkID,
2633
- adUnit: props.adUnit
2634
- };
2635
- return _this;
2636
- }
3139
+ AD.propTypes = {
3140
+ networkID: PropTypes.number.isRequired,
3141
+ adUnit: PropTypes.string.isRequired,
3142
+ slotId: PropTypes.string.isRequired,
3143
+ className: PropTypes.string,
3144
+ sizeMapping: PropTypes.array,
3145
+ sizes: PropTypes.array,
3146
+ minInViewPercent: PropTypes.number
3147
+ };
2637
3148
 
2638
- createClass(AD728x90, [{
2639
- key: 'render',
2640
- value: function render() {
2641
- return React__default.createElement(
2642
- lib_1,
2643
- {
2644
- dfpNetworkId: this.option.networkID,
2645
- sizeMapping: [{ viewport: [768, 1], sizes: [[728, 90]] }, { viewport: [1, 1], sizes: [[320, 50]] }] },
2646
- React__default.createElement(
2647
- 'div',
2648
- { className: 'AD728x90' },
2649
- React__default.createElement(lib_2, {
2650
- slotId: 'test',
2651
- sizes: [[728, 90], [320, 50]],
2652
- adUnit: this.option.adUnit,
2653
- sizeMapping: [{ viewport: [768, 1], sizes: [[728, 90]] }, { viewport: [1, 1], sizes: [[320, 50]] }],
2654
- onSlotVisibilityChanged: function onSlotVisibilityChanged(dfpEventData) {
2655
- if (dfpEventData.event.inViewPercentage < '70') {
2656
- lib_3.refresh('test');
2657
- }
2658
- },
2659
- onSlotIsViewable: function onSlotIsViewable(dfpEventData) {
2660
- return console.log('slot 1 viewable!.', dfpEventData);
2661
- }
2662
- })
2663
- )
2664
- );
2665
- }
2666
- }]);
2667
- return AD728x90;
2668
- }(Component);
3149
+ var AD728x90 = function AD728x90(_ref) {
3150
+ var networkID = _ref.networkID,
3151
+ adUnit = _ref.adUnit;
3152
+
3153
+ return React__default.createElement(AD, {
3154
+ networkID: networkID,
3155
+ adUnit: adUnit,
3156
+ className: 'AD728x90',
3157
+ sizes: [[300, 250], [300, 600]],
3158
+ sizeMapping: [{ viewport: [768, 1], sizes: [[728, 90]] }, { viewport: [1, 1], sizes: [[320, 50]] }],
3159
+ minInViewPercent: 70
3160
+ });
3161
+ };
2669
3162
 
2670
3163
  // Main
2671
3164
  var TemplateNormal = function TemplateNormal(props) {
@@ -2691,6 +3184,12 @@ var TemplateNormal = function TemplateNormal(props) {
2691
3184
 
2692
3185
  function layout() {
2693
3186
  switch (config.columns) {
3187
+ case '1':
3188
+ return React__default.createElement(
3189
+ Column1,
3190
+ null,
3191
+ props.children
3192
+ );
2694
3193
  case '2':
2695
3194
  return React__default.createElement(
2696
3195
  Column2,
@@ -2726,72 +3225,24 @@ var TemplateNormal = function TemplateNormal(props) {
2726
3225
  );
2727
3226
  };
2728
3227
 
2729
- var AD300x250 = function (_Component) {
2730
- inherits(AD300x250, _Component);
2731
-
2732
- function AD300x250(props) {
2733
- classCallCheck(this, AD300x250);
2734
-
2735
- var _this = possibleConstructorReturn(this, (AD300x250.__proto__ || Object.getPrototypeOf(AD300x250)).call(this, props));
2736
-
2737
- _this.option = {
2738
- networkID: props.networkID,
2739
- adUnit: props.adUnit
2740
- };
2741
- return _this;
2742
- }
2743
-
2744
- createClass(AD300x250, [{
2745
- key: 'render',
2746
- value: function render() {
2747
- return React__default.createElement(
2748
- lib_1,
2749
- { dfpNetworkId: this.option.networkID },
2750
- React__default.createElement(
2751
- 'div',
2752
- { className: 'AD300x250' },
2753
- React__default.createElement(lib_2, { sizes: [[300, 250]], adUnit: this.option.adUnit })
2754
- )
2755
- );
2756
- }
2757
- }]);
2758
- return AD300x250;
2759
- }(Component);
2760
-
2761
- var AD300x250x600 = function (_Component) {
2762
- inherits(AD300x250x600, _Component);
3228
+ var AD300x250 = function AD300x250(_ref) {
3229
+ var networkID = _ref.networkID,
3230
+ adUnit = _ref.adUnit;
2763
3231
 
2764
- function AD300x250x600(props) {
2765
- classCallCheck(this, AD300x250x600);
3232
+ return React__default.createElement(AD, { networkID: networkID, adUnit: adUnit, className: 'AD300x250', sizes: [[300, 250]] });
3233
+ };
2766
3234
 
2767
- var _this = possibleConstructorReturn(this, (AD300x250x600.__proto__ || Object.getPrototypeOf(AD300x250x600)).call(this, props));
3235
+ var AD300x250x600 = function AD300x250x600(_ref) {
3236
+ var networkID = _ref.networkID,
3237
+ adUnit = _ref.adUnit;
2768
3238
 
2769
- _this.option = {
2770
- networkID: props.networkID,
2771
- adUnit: props.adUnit
2772
- };
2773
- return _this;
2774
- }
2775
-
2776
- createClass(AD300x250x600, [{
2777
- key: 'render',
2778
- value: function render() {
2779
- return React__default.createElement(
2780
- lib_1,
2781
- { dfpNetworkId: this.option.networkID },
2782
- React__default.createElement(
2783
- 'div',
2784
- { className: 'AD300x250' },
2785
- React__default.createElement(lib_2, {
2786
- sizes: [[300, 250], [300, 600]],
2787
- adUnit: this.option.adUnit
2788
- })
2789
- )
2790
- );
2791
- }
2792
- }]);
2793
- return AD300x250x600;
2794
- }(Component);
3239
+ return React__default.createElement(AD, {
3240
+ networkID: networkID,
3241
+ adUnit: adUnit,
3242
+ className: 'AD300x250',
3243
+ sizes: [[300, 250], [300, 600]]
3244
+ });
3245
+ };
2795
3246
 
2796
3247
  var getYoutubeId = createCommonjsModule(function (module, exports) {
2797
3248
  (function (root, factory) {
@@ -2904,7 +3355,7 @@ var Sister;
2904
3355
  */
2905
3356
  Sister = function () {
2906
3357
  var sister = {},
2907
- events$$1 = {};
3358
+ events = {};
2908
3359
 
2909
3360
  /**
2910
3361
  * @name handler
@@ -2919,8 +3370,8 @@ Sister = function () {
2919
3370
  */
2920
3371
  sister.on = function (name, handler) {
2921
3372
  var listener = {name: name, handler: handler};
2922
- events$$1[name] = events$$1[name] || [];
2923
- events$$1[name].unshift(listener);
3373
+ events[name] = events[name] || [];
3374
+ events[name].unshift(listener);
2924
3375
  return listener;
2925
3376
  };
2926
3377
 
@@ -2928,10 +3379,10 @@ Sister = function () {
2928
3379
  * @param {listener}
2929
3380
  */
2930
3381
  sister.off = function (listener) {
2931
- var index = events$$1[listener.name].indexOf(listener);
3382
+ var index = events[listener.name].indexOf(listener);
2932
3383
 
2933
3384
  if (index !== -1) {
2934
- events$$1[listener.name].splice(index, 1);
3385
+ events[listener.name].splice(index, 1);
2935
3386
  }
2936
3387
  };
2937
3388
 
@@ -2940,7 +3391,7 @@ Sister = function () {
2940
3391
  * @param {Object} data Event data.
2941
3392
  */
2942
3393
  sister.trigger = function (name, data) {
2943
- var listeners = events$$1[name],
3394
+ var listeners = events[name],
2944
3395
  i;
2945
3396
 
2946
3397
  if (listeners) {
@@ -3634,6 +4085,824 @@ var browser_5 = browser.useColors;
3634
4085
  var browser_6 = browser.storage;
3635
4086
  var browser_7 = browser.colors;
3636
4087
 
4088
+ // MIT lisence
4089
+ // from https://github.com/substack/tty-browserify/blob/1ba769a6429d242f36226538835b4034bf6b7886/index.js
4090
+
4091
+ function isatty() {
4092
+ return false;
4093
+ }
4094
+
4095
+ function ReadStream() {
4096
+ throw new Error('tty.ReadStream is not implemented');
4097
+ }
4098
+
4099
+ function WriteStream() {
4100
+ throw new Error('tty.ReadStream is not implemented');
4101
+ }
4102
+
4103
+ var tty = {
4104
+ isatty: isatty,
4105
+ ReadStream: ReadStream,
4106
+ WriteStream: WriteStream
4107
+ };
4108
+
4109
+ // shim for using process in browser
4110
+ // based off https://github.com/defunctzombie/node-process/blob/master/browser.js
4111
+
4112
+ function defaultSetTimout() {
4113
+ throw new Error('setTimeout has not been defined');
4114
+ }
4115
+ function defaultClearTimeout () {
4116
+ throw new Error('clearTimeout has not been defined');
4117
+ }
4118
+ var cachedSetTimeout = defaultSetTimout;
4119
+ var cachedClearTimeout = defaultClearTimeout;
4120
+ if (typeof global.setTimeout === 'function') {
4121
+ cachedSetTimeout = setTimeout;
4122
+ }
4123
+ if (typeof global.clearTimeout === 'function') {
4124
+ cachedClearTimeout = clearTimeout;
4125
+ }
4126
+
4127
+ function runTimeout(fun) {
4128
+ if (cachedSetTimeout === setTimeout) {
4129
+ //normal enviroments in sane situations
4130
+ return setTimeout(fun, 0);
4131
+ }
4132
+ // if setTimeout wasn't available but was latter defined
4133
+ if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
4134
+ cachedSetTimeout = setTimeout;
4135
+ return setTimeout(fun, 0);
4136
+ }
4137
+ try {
4138
+ // when when somebody has screwed with setTimeout but no I.E. maddness
4139
+ return cachedSetTimeout(fun, 0);
4140
+ } catch(e){
4141
+ try {
4142
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
4143
+ return cachedSetTimeout.call(null, fun, 0);
4144
+ } catch(e){
4145
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
4146
+ return cachedSetTimeout.call(this, fun, 0);
4147
+ }
4148
+ }
4149
+
4150
+
4151
+ }
4152
+ function runClearTimeout(marker) {
4153
+ if (cachedClearTimeout === clearTimeout) {
4154
+ //normal enviroments in sane situations
4155
+ return clearTimeout(marker);
4156
+ }
4157
+ // if clearTimeout wasn't available but was latter defined
4158
+ if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
4159
+ cachedClearTimeout = clearTimeout;
4160
+ return clearTimeout(marker);
4161
+ }
4162
+ try {
4163
+ // when when somebody has screwed with setTimeout but no I.E. maddness
4164
+ return cachedClearTimeout(marker);
4165
+ } catch (e){
4166
+ try {
4167
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
4168
+ return cachedClearTimeout.call(null, marker);
4169
+ } catch (e){
4170
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
4171
+ // Some versions of I.E. have different rules for clearTimeout vs setTimeout
4172
+ return cachedClearTimeout.call(this, marker);
4173
+ }
4174
+ }
4175
+
4176
+
4177
+
4178
+ }
4179
+ var queue = [];
4180
+ var draining = false;
4181
+ var currentQueue;
4182
+ var queueIndex = -1;
4183
+
4184
+ function cleanUpNextTick() {
4185
+ if (!draining || !currentQueue) {
4186
+ return;
4187
+ }
4188
+ draining = false;
4189
+ if (currentQueue.length) {
4190
+ queue = currentQueue.concat(queue);
4191
+ } else {
4192
+ queueIndex = -1;
4193
+ }
4194
+ if (queue.length) {
4195
+ drainQueue();
4196
+ }
4197
+ }
4198
+
4199
+ function drainQueue() {
4200
+ if (draining) {
4201
+ return;
4202
+ }
4203
+ var timeout = runTimeout(cleanUpNextTick);
4204
+ draining = true;
4205
+
4206
+ var len = queue.length;
4207
+ while(len) {
4208
+ currentQueue = queue;
4209
+ queue = [];
4210
+ while (++queueIndex < len) {
4211
+ if (currentQueue) {
4212
+ currentQueue[queueIndex].run();
4213
+ }
4214
+ }
4215
+ queueIndex = -1;
4216
+ len = queue.length;
4217
+ }
4218
+ currentQueue = null;
4219
+ draining = false;
4220
+ runClearTimeout(timeout);
4221
+ }
4222
+ function nextTick(fun) {
4223
+ var args = new Array(arguments.length - 1);
4224
+ if (arguments.length > 1) {
4225
+ for (var i = 1; i < arguments.length; i++) {
4226
+ args[i - 1] = arguments[i];
4227
+ }
4228
+ }
4229
+ queue.push(new Item(fun, args));
4230
+ if (queue.length === 1 && !draining) {
4231
+ runTimeout(drainQueue);
4232
+ }
4233
+ }
4234
+ // v8 likes predictible objects
4235
+ function Item(fun, array) {
4236
+ this.fun = fun;
4237
+ this.array = array;
4238
+ }
4239
+ Item.prototype.run = function () {
4240
+ this.fun.apply(null, this.array);
4241
+ };
4242
+ var title = 'browser';
4243
+ var platform = 'browser';
4244
+ var browser$1 = true;
4245
+ var env = {};
4246
+ var argv = [];
4247
+ var version = ''; // empty string to avoid regexp issues
4248
+ var versions = {};
4249
+ var release = {};
4250
+ var config = {};
4251
+
4252
+ function noop() {}
4253
+
4254
+ var on = noop;
4255
+ var addListener = noop;
4256
+ var once = noop;
4257
+ var off = noop;
4258
+ var removeListener = noop;
4259
+ var removeAllListeners = noop;
4260
+ var emit = noop;
4261
+
4262
+ function binding(name) {
4263
+ throw new Error('process.binding is not supported');
4264
+ }
4265
+
4266
+ function cwd () { return '/' }
4267
+ function chdir (dir) {
4268
+ throw new Error('process.chdir is not supported');
4269
+ }function umask() { return 0; }
4270
+
4271
+ // from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js
4272
+ var performance = global.performance || {};
4273
+ var performanceNow =
4274
+ performance.now ||
4275
+ performance.mozNow ||
4276
+ performance.msNow ||
4277
+ performance.oNow ||
4278
+ performance.webkitNow ||
4279
+ function(){ return (new Date()).getTime() };
4280
+
4281
+ // generate timestamp or delta
4282
+ // see http://nodejs.org/api/process.html#process_process_hrtime
4283
+ function hrtime(previousTimestamp){
4284
+ var clocktime = performanceNow.call(performance)*1e-3;
4285
+ var seconds = Math.floor(clocktime);
4286
+ var nanoseconds = Math.floor((clocktime%1)*1e9);
4287
+ if (previousTimestamp) {
4288
+ seconds = seconds - previousTimestamp[0];
4289
+ nanoseconds = nanoseconds - previousTimestamp[1];
4290
+ if (nanoseconds<0) {
4291
+ seconds--;
4292
+ nanoseconds += 1e9;
4293
+ }
4294
+ }
4295
+ return [seconds,nanoseconds]
4296
+ }
4297
+
4298
+ var startTime = new Date();
4299
+ function uptime() {
4300
+ var currentTime = new Date();
4301
+ var dif = currentTime - startTime;
4302
+ return dif / 1000;
4303
+ }
4304
+
4305
+ var process$1 = {
4306
+ nextTick: nextTick,
4307
+ title: title,
4308
+ browser: browser$1,
4309
+ env: env,
4310
+ argv: argv,
4311
+ version: version,
4312
+ versions: versions,
4313
+ on: on,
4314
+ addListener: addListener,
4315
+ once: once,
4316
+ off: off,
4317
+ removeListener: removeListener,
4318
+ removeAllListeners: removeAllListeners,
4319
+ emit: emit,
4320
+ binding: binding,
4321
+ cwd: cwd,
4322
+ chdir: chdir,
4323
+ umask: umask,
4324
+ hrtime: hrtime,
4325
+ platform: platform,
4326
+ release: release,
4327
+ config: config,
4328
+ uptime: uptime
4329
+ };
4330
+
4331
+ var inherits$1;
4332
+ if (typeof Object.create === 'function'){
4333
+ inherits$1 = function inherits(ctor, superCtor) {
4334
+ // implementation from standard node.js 'util' module
4335
+ ctor.super_ = superCtor;
4336
+ ctor.prototype = Object.create(superCtor.prototype, {
4337
+ constructor: {
4338
+ value: ctor,
4339
+ enumerable: false,
4340
+ writable: true,
4341
+ configurable: true
4342
+ }
4343
+ });
4344
+ };
4345
+ } else {
4346
+ inherits$1 = function inherits(ctor, superCtor) {
4347
+ ctor.super_ = superCtor;
4348
+ var TempCtor = function () {};
4349
+ TempCtor.prototype = superCtor.prototype;
4350
+ ctor.prototype = new TempCtor();
4351
+ ctor.prototype.constructor = ctor;
4352
+ };
4353
+ }
4354
+ var inherits$2 = inherits$1;
4355
+
4356
+ // Copyright Joyent, Inc. and other Node contributors.
4357
+ var formatRegExp = /%[sdj%]/g;
4358
+ function format(f) {
4359
+ if (!isString(f)) {
4360
+ var objects = [];
4361
+ for (var i = 0; i < arguments.length; i++) {
4362
+ objects.push(inspect(arguments[i]));
4363
+ }
4364
+ return objects.join(' ');
4365
+ }
4366
+
4367
+ var i = 1;
4368
+ var args = arguments;
4369
+ var len = args.length;
4370
+ var str = String(f).replace(formatRegExp, function(x) {
4371
+ if (x === '%%') return '%';
4372
+ if (i >= len) return x;
4373
+ switch (x) {
4374
+ case '%s': return String(args[i++]);
4375
+ case '%d': return Number(args[i++]);
4376
+ case '%j':
4377
+ try {
4378
+ return JSON.stringify(args[i++]);
4379
+ } catch (_) {
4380
+ return '[Circular]';
4381
+ }
4382
+ default:
4383
+ return x;
4384
+ }
4385
+ });
4386
+ for (var x = args[i]; i < len; x = args[++i]) {
4387
+ if (isNull(x) || !isObject(x)) {
4388
+ str += ' ' + x;
4389
+ } else {
4390
+ str += ' ' + inspect(x);
4391
+ }
4392
+ }
4393
+ return str;
4394
+ }
4395
+
4396
+ // Mark that a method should not be used.
4397
+ // Returns a modified function which warns once by default.
4398
+ // If --no-deprecation is set, then it is a no-op.
4399
+ function deprecate(fn, msg) {
4400
+ // Allow for deprecating things in the process of starting up.
4401
+ if (isUndefined(global.process)) {
4402
+ return function() {
4403
+ return deprecate(fn, msg).apply(this, arguments);
4404
+ };
4405
+ }
4406
+
4407
+ var warned = false;
4408
+ function deprecated() {
4409
+ if (!warned) {
4410
+ {
4411
+ console.error(msg);
4412
+ }
4413
+ warned = true;
4414
+ }
4415
+ return fn.apply(this, arguments);
4416
+ }
4417
+
4418
+ return deprecated;
4419
+ }
4420
+
4421
+ var debugs = {};
4422
+ var debugEnviron;
4423
+ function debuglog(set) {
4424
+ if (isUndefined(debugEnviron))
4425
+ debugEnviron = process$1.env.NODE_DEBUG || '';
4426
+ set = set.toUpperCase();
4427
+ if (!debugs[set]) {
4428
+ if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
4429
+ var pid = 0;
4430
+ debugs[set] = function() {
4431
+ var msg = format.apply(null, arguments);
4432
+ console.error('%s %d: %s', set, pid, msg);
4433
+ };
4434
+ } else {
4435
+ debugs[set] = function() {};
4436
+ }
4437
+ }
4438
+ return debugs[set];
4439
+ }
4440
+
4441
+ /**
4442
+ * Echos the value of a value. Trys to print the value out
4443
+ * in the best way possible given the different types.
4444
+ *
4445
+ * @param {Object} obj The object to print out.
4446
+ * @param {Object} opts Optional options object that alters the output.
4447
+ */
4448
+ /* legacy: obj, showHidden, depth, colors*/
4449
+ function inspect(obj, opts) {
4450
+ // default options
4451
+ var ctx = {
4452
+ seen: [],
4453
+ stylize: stylizeNoColor
4454
+ };
4455
+ // legacy...
4456
+ if (arguments.length >= 3) ctx.depth = arguments[2];
4457
+ if (arguments.length >= 4) ctx.colors = arguments[3];
4458
+ if (isBoolean(opts)) {
4459
+ // legacy...
4460
+ ctx.showHidden = opts;
4461
+ } else if (opts) {
4462
+ // got an "options" object
4463
+ _extend(ctx, opts);
4464
+ }
4465
+ // set default options
4466
+ if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
4467
+ if (isUndefined(ctx.depth)) ctx.depth = 2;
4468
+ if (isUndefined(ctx.colors)) ctx.colors = false;
4469
+ if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
4470
+ if (ctx.colors) ctx.stylize = stylizeWithColor;
4471
+ return formatValue(ctx, obj, ctx.depth);
4472
+ }
4473
+
4474
+ // http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
4475
+ inspect.colors = {
4476
+ 'bold' : [1, 22],
4477
+ 'italic' : [3, 23],
4478
+ 'underline' : [4, 24],
4479
+ 'inverse' : [7, 27],
4480
+ 'white' : [37, 39],
4481
+ 'grey' : [90, 39],
4482
+ 'black' : [30, 39],
4483
+ 'blue' : [34, 39],
4484
+ 'cyan' : [36, 39],
4485
+ 'green' : [32, 39],
4486
+ 'magenta' : [35, 39],
4487
+ 'red' : [31, 39],
4488
+ 'yellow' : [33, 39]
4489
+ };
4490
+
4491
+ // Don't use 'blue' not visible on cmd.exe
4492
+ inspect.styles = {
4493
+ 'special': 'cyan',
4494
+ 'number': 'yellow',
4495
+ 'boolean': 'yellow',
4496
+ 'undefined': 'grey',
4497
+ 'null': 'bold',
4498
+ 'string': 'green',
4499
+ 'date': 'magenta',
4500
+ // "name": intentionally not styling
4501
+ 'regexp': 'red'
4502
+ };
4503
+
4504
+
4505
+ function stylizeWithColor(str, styleType) {
4506
+ var style = inspect.styles[styleType];
4507
+
4508
+ if (style) {
4509
+ return '\u001b[' + inspect.colors[style][0] + 'm' + str +
4510
+ '\u001b[' + inspect.colors[style][1] + 'm';
4511
+ } else {
4512
+ return str;
4513
+ }
4514
+ }
4515
+
4516
+
4517
+ function stylizeNoColor(str, styleType) {
4518
+ return str;
4519
+ }
4520
+
4521
+
4522
+ function arrayToHash(array) {
4523
+ var hash = {};
4524
+
4525
+ array.forEach(function(val, idx) {
4526
+ hash[val] = true;
4527
+ });
4528
+
4529
+ return hash;
4530
+ }
4531
+
4532
+
4533
+ function formatValue(ctx, value, recurseTimes) {
4534
+ // Provide a hook for user-specified inspect functions.
4535
+ // Check that value is an object with an inspect function on it
4536
+ if (ctx.customInspect &&
4537
+ value &&
4538
+ isFunction(value.inspect) &&
4539
+ // Filter out the util module, it's inspect function is special
4540
+ value.inspect !== inspect &&
4541
+ // Also filter out any prototype objects using the circular check.
4542
+ !(value.constructor && value.constructor.prototype === value)) {
4543
+ var ret = value.inspect(recurseTimes, ctx);
4544
+ if (!isString(ret)) {
4545
+ ret = formatValue(ctx, ret, recurseTimes);
4546
+ }
4547
+ return ret;
4548
+ }
4549
+
4550
+ // Primitive types cannot have properties
4551
+ var primitive = formatPrimitive(ctx, value);
4552
+ if (primitive) {
4553
+ return primitive;
4554
+ }
4555
+
4556
+ // Look up the keys of the object.
4557
+ var keys = Object.keys(value);
4558
+ var visibleKeys = arrayToHash(keys);
4559
+
4560
+ if (ctx.showHidden) {
4561
+ keys = Object.getOwnPropertyNames(value);
4562
+ }
4563
+
4564
+ // IE doesn't make error fields non-enumerable
4565
+ // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
4566
+ if (isError(value)
4567
+ && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
4568
+ return formatError(value);
4569
+ }
4570
+
4571
+ // Some type of object without properties can be shortcutted.
4572
+ if (keys.length === 0) {
4573
+ if (isFunction(value)) {
4574
+ var name = value.name ? ': ' + value.name : '';
4575
+ return ctx.stylize('[Function' + name + ']', 'special');
4576
+ }
4577
+ if (isRegExp(value)) {
4578
+ return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
4579
+ }
4580
+ if (isDate(value)) {
4581
+ return ctx.stylize(Date.prototype.toString.call(value), 'date');
4582
+ }
4583
+ if (isError(value)) {
4584
+ return formatError(value);
4585
+ }
4586
+ }
4587
+
4588
+ var base = '', array = false, braces = ['{', '}'];
4589
+
4590
+ // Make Array say that they are Array
4591
+ if (isArray$1(value)) {
4592
+ array = true;
4593
+ braces = ['[', ']'];
4594
+ }
4595
+
4596
+ // Make functions say that they are functions
4597
+ if (isFunction(value)) {
4598
+ var n = value.name ? ': ' + value.name : '';
4599
+ base = ' [Function' + n + ']';
4600
+ }
4601
+
4602
+ // Make RegExps say that they are RegExps
4603
+ if (isRegExp(value)) {
4604
+ base = ' ' + RegExp.prototype.toString.call(value);
4605
+ }
4606
+
4607
+ // Make dates with properties first say the date
4608
+ if (isDate(value)) {
4609
+ base = ' ' + Date.prototype.toUTCString.call(value);
4610
+ }
4611
+
4612
+ // Make error with message first say the error
4613
+ if (isError(value)) {
4614
+ base = ' ' + formatError(value);
4615
+ }
4616
+
4617
+ if (keys.length === 0 && (!array || value.length == 0)) {
4618
+ return braces[0] + base + braces[1];
4619
+ }
4620
+
4621
+ if (recurseTimes < 0) {
4622
+ if (isRegExp(value)) {
4623
+ return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
4624
+ } else {
4625
+ return ctx.stylize('[Object]', 'special');
4626
+ }
4627
+ }
4628
+
4629
+ ctx.seen.push(value);
4630
+
4631
+ var output;
4632
+ if (array) {
4633
+ output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
4634
+ } else {
4635
+ output = keys.map(function(key) {
4636
+ return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
4637
+ });
4638
+ }
4639
+
4640
+ ctx.seen.pop();
4641
+
4642
+ return reduceToSingleString(output, base, braces);
4643
+ }
4644
+
4645
+
4646
+ function formatPrimitive(ctx, value) {
4647
+ if (isUndefined(value))
4648
+ return ctx.stylize('undefined', 'undefined');
4649
+ if (isString(value)) {
4650
+ var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
4651
+ .replace(/'/g, "\\'")
4652
+ .replace(/\\"/g, '"') + '\'';
4653
+ return ctx.stylize(simple, 'string');
4654
+ }
4655
+ if (isNumber(value))
4656
+ return ctx.stylize('' + value, 'number');
4657
+ if (isBoolean(value))
4658
+ return ctx.stylize('' + value, 'boolean');
4659
+ // For some reason typeof null is "object", so special case here.
4660
+ if (isNull(value))
4661
+ return ctx.stylize('null', 'null');
4662
+ }
4663
+
4664
+
4665
+ function formatError(value) {
4666
+ return '[' + Error.prototype.toString.call(value) + ']';
4667
+ }
4668
+
4669
+
4670
+ function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
4671
+ var output = [];
4672
+ for (var i = 0, l = value.length; i < l; ++i) {
4673
+ if (hasOwnProperty(value, String(i))) {
4674
+ output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
4675
+ String(i), true));
4676
+ } else {
4677
+ output.push('');
4678
+ }
4679
+ }
4680
+ keys.forEach(function(key) {
4681
+ if (!key.match(/^\d+$/)) {
4682
+ output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
4683
+ key, true));
4684
+ }
4685
+ });
4686
+ return output;
4687
+ }
4688
+
4689
+
4690
+ function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
4691
+ var name, str, desc;
4692
+ desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
4693
+ if (desc.get) {
4694
+ if (desc.set) {
4695
+ str = ctx.stylize('[Getter/Setter]', 'special');
4696
+ } else {
4697
+ str = ctx.stylize('[Getter]', 'special');
4698
+ }
4699
+ } else {
4700
+ if (desc.set) {
4701
+ str = ctx.stylize('[Setter]', 'special');
4702
+ }
4703
+ }
4704
+ if (!hasOwnProperty(visibleKeys, key)) {
4705
+ name = '[' + key + ']';
4706
+ }
4707
+ if (!str) {
4708
+ if (ctx.seen.indexOf(desc.value) < 0) {
4709
+ if (isNull(recurseTimes)) {
4710
+ str = formatValue(ctx, desc.value, null);
4711
+ } else {
4712
+ str = formatValue(ctx, desc.value, recurseTimes - 1);
4713
+ }
4714
+ if (str.indexOf('\n') > -1) {
4715
+ if (array) {
4716
+ str = str.split('\n').map(function(line) {
4717
+ return ' ' + line;
4718
+ }).join('\n').substr(2);
4719
+ } else {
4720
+ str = '\n' + str.split('\n').map(function(line) {
4721
+ return ' ' + line;
4722
+ }).join('\n');
4723
+ }
4724
+ }
4725
+ } else {
4726
+ str = ctx.stylize('[Circular]', 'special');
4727
+ }
4728
+ }
4729
+ if (isUndefined(name)) {
4730
+ if (array && key.match(/^\d+$/)) {
4731
+ return str;
4732
+ }
4733
+ name = JSON.stringify('' + key);
4734
+ if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
4735
+ name = name.substr(1, name.length - 2);
4736
+ name = ctx.stylize(name, 'name');
4737
+ } else {
4738
+ name = name.replace(/'/g, "\\'")
4739
+ .replace(/\\"/g, '"')
4740
+ .replace(/(^"|"$)/g, "'");
4741
+ name = ctx.stylize(name, 'string');
4742
+ }
4743
+ }
4744
+
4745
+ return name + ': ' + str;
4746
+ }
4747
+
4748
+
4749
+ function reduceToSingleString(output, base, braces) {
4750
+ var length = output.reduce(function(prev, cur) {
4751
+ if (cur.indexOf('\n') >= 0) ;
4752
+ return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
4753
+ }, 0);
4754
+
4755
+ if (length > 60) {
4756
+ return braces[0] +
4757
+ (base === '' ? '' : base + '\n ') +
4758
+ ' ' +
4759
+ output.join(',\n ') +
4760
+ ' ' +
4761
+ braces[1];
4762
+ }
4763
+
4764
+ return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
4765
+ }
4766
+
4767
+
4768
+ // NOTE: These type checking functions intentionally don't use `instanceof`
4769
+ // because it is fragile and can be easily faked with `Object.create()`.
4770
+ function isArray$1(ar) {
4771
+ return Array.isArray(ar);
4772
+ }
4773
+
4774
+ function isBoolean(arg) {
4775
+ return typeof arg === 'boolean';
4776
+ }
4777
+
4778
+ function isNull(arg) {
4779
+ return arg === null;
4780
+ }
4781
+
4782
+ function isNullOrUndefined(arg) {
4783
+ return arg == null;
4784
+ }
4785
+
4786
+ function isNumber(arg) {
4787
+ return typeof arg === 'number';
4788
+ }
4789
+
4790
+ function isString(arg) {
4791
+ return typeof arg === 'string';
4792
+ }
4793
+
4794
+ function isSymbol(arg) {
4795
+ return typeof arg === 'symbol';
4796
+ }
4797
+
4798
+ function isUndefined(arg) {
4799
+ return arg === void 0;
4800
+ }
4801
+
4802
+ function isRegExp(re) {
4803
+ return isObject(re) && objectToString(re) === '[object RegExp]';
4804
+ }
4805
+
4806
+ function isObject(arg) {
4807
+ return typeof arg === 'object' && arg !== null;
4808
+ }
4809
+
4810
+ function isDate(d) {
4811
+ return isObject(d) && objectToString(d) === '[object Date]';
4812
+ }
4813
+
4814
+ function isError(e) {
4815
+ return isObject(e) &&
4816
+ (objectToString(e) === '[object Error]' || e instanceof Error);
4817
+ }
4818
+
4819
+ function isFunction(arg) {
4820
+ return typeof arg === 'function';
4821
+ }
4822
+
4823
+ function isPrimitive(arg) {
4824
+ return arg === null ||
4825
+ typeof arg === 'boolean' ||
4826
+ typeof arg === 'number' ||
4827
+ typeof arg === 'string' ||
4828
+ typeof arg === 'symbol' || // ES6 symbol
4829
+ typeof arg === 'undefined';
4830
+ }
4831
+
4832
+ function isBuffer(maybeBuf) {
4833
+ return Buffer.isBuffer(maybeBuf);
4834
+ }
4835
+
4836
+ function objectToString(o) {
4837
+ return Object.prototype.toString.call(o);
4838
+ }
4839
+
4840
+
4841
+ function pad(n) {
4842
+ return n < 10 ? '0' + n.toString(10) : n.toString(10);
4843
+ }
4844
+
4845
+
4846
+ var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
4847
+ 'Oct', 'Nov', 'Dec'];
4848
+
4849
+ // 26 Feb 16:19:34
4850
+ function timestamp() {
4851
+ var d = new Date();
4852
+ var time = [pad(d.getHours()),
4853
+ pad(d.getMinutes()),
4854
+ pad(d.getSeconds())].join(':');
4855
+ return [d.getDate(), months[d.getMonth()], time].join(' ');
4856
+ }
4857
+
4858
+
4859
+ // log is just a thin wrapper to console.log that prepends a timestamp
4860
+ function log() {
4861
+ console.log('%s - %s', timestamp(), format.apply(null, arguments));
4862
+ }
4863
+
4864
+ function _extend(origin, add) {
4865
+ // Don't do anything if add isn't an object
4866
+ if (!add || !isObject(add)) return origin;
4867
+
4868
+ var keys = Object.keys(add);
4869
+ var i = keys.length;
4870
+ while (i--) {
4871
+ origin[keys[i]] = add[keys[i]];
4872
+ }
4873
+ return origin;
4874
+ }
4875
+ function hasOwnProperty(obj, prop) {
4876
+ return Object.prototype.hasOwnProperty.call(obj, prop);
4877
+ }
4878
+
4879
+ var util = {
4880
+ inherits: inherits$2,
4881
+ _extend: _extend,
4882
+ log: log,
4883
+ isBuffer: isBuffer,
4884
+ isPrimitive: isPrimitive,
4885
+ isFunction: isFunction,
4886
+ isError: isError,
4887
+ isDate: isDate,
4888
+ isObject: isObject,
4889
+ isRegExp: isRegExp,
4890
+ isUndefined: isUndefined,
4891
+ isSymbol: isSymbol,
4892
+ isString: isString,
4893
+ isNumber: isNumber,
4894
+ isNullOrUndefined: isNullOrUndefined,
4895
+ isNull: isNull,
4896
+ isBoolean: isBoolean,
4897
+ isArray: isArray$1,
4898
+ inspect: inspect,
4899
+ deprecate: deprecate,
4900
+ format: format,
4901
+ debuglog: debuglog
4902
+ };
4903
+
4904
+ var require$$2 = {};
4905
+
3637
4906
  var node = createCommonjsModule(function (module, exports) {
3638
4907
  /**
3639
4908
  * Module dependencies.
@@ -3820,15 +5089,15 @@ function createWritableStdioStream (fd) {
3820
5089
  break;
3821
5090
 
3822
5091
  case 'FILE':
3823
- var fs$$1 = fs;
3824
- stream = new fs$$1.SyncWriteStream(fd, { autoClose: false });
5092
+ var fs = require$$2;
5093
+ stream = new fs.SyncWriteStream(fd, { autoClose: false });
3825
5094
  stream._type = 'fs';
3826
5095
  break;
3827
5096
 
3828
5097
  case 'PIPE':
3829
5098
  case 'TCP':
3830
- var net$$1 = net;
3831
- stream = new net$$1.Socket({
5099
+ var net = require$$2;
5100
+ stream = new net.Socket({
3832
5101
  fd: fd,
3833
5102
  readable: false,
3834
5103
  writable: true
@@ -4031,12 +5300,12 @@ var YouTubePlayer = {};
4031
5300
  * @see https://developers.google.com/youtube/iframe_api_reference#Events
4032
5301
  */
4033
5302
  YouTubePlayer.proxyEvents = function (emitter) {
4034
- var events$$1 = {};
5303
+ var events = {};
4035
5304
 
4036
5305
  var _loop = function _loop(eventName) {
4037
5306
  var onEventName = 'on' + eventName.slice(0, 1).toUpperCase() + eventName.slice(1);
4038
5307
 
4039
- events$$1[onEventName] = function (event) {
5308
+ events[onEventName] = function (event) {
4040
5309
  debug('event "%s"', onEventName, event);
4041
5310
 
4042
5311
  emitter.trigger(eventName, event);
@@ -4068,7 +5337,7 @@ YouTubePlayer.proxyEvents = function (emitter) {
4068
5337
  }
4069
5338
  }
4070
5339
 
4071
- return events$$1;
5340
+ return events;
4072
5341
  };
4073
5342
 
4074
5343
  /**
@@ -4654,5 +5923,5 @@ var getSerializers = function getSerializers() {
4654
5923
  };
4655
5924
  };
4656
5925
 
4657
- export { DeckContent, DeckQueue, Column2, Column3, Header, LeftNav, NavMagazine, NavNative, NavNormal, TemplateNormal, AD300x250, AD300x250x600, AD728x90, getSerializers };
5926
+ export { DeckContent, DeckQueue, Column1, Column2, Column3, Header, LeftNav, NavMagazine, NavNative, NavNormal, TemplateNormal, AD300x250, AD300x250x600, AD728x90, getSerializers };
4658
5927
  //# sourceMappingURL=index.es.js.map