@mjhls/mjh-framework 1.0.697 → 1.0.699-beta.0
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/README.md +1 -1
- package/dist/cjs/AD.js +1 -1
- package/dist/cjs/AD300x250.js +3 -3
- package/dist/cjs/AD300x250x600.js +3 -3
- package/dist/cjs/AD728x90.js +4 -4
- package/dist/cjs/ADFloatingFooter.js +2 -2
- package/dist/cjs/ADGutter.js +8 -5
- package/dist/cjs/{ADInfeed-3410ab3c.js → ADInfeed-3aa2f5dd.js} +6 -3
- package/dist/cjs/ADSkyscraper.js +8 -5
- package/dist/cjs/ADSponsoredResources.js +8 -5
- package/dist/cjs/ADWebcast.js +8 -5
- package/dist/cjs/ADWelcome.js +2 -2
- package/dist/cjs/{ADlgInfeed-845aac15.js → ADlgInfeed-86daec1c.js} +6 -3
- package/dist/cjs/AdSlot.js +3 -3
- package/dist/cjs/AdSlotsProvider.js +23 -2
- package/dist/cjs/ArticleCarousel.js +1 -1
- package/dist/cjs/ArticleSeriesListing.js +4 -4
- package/dist/cjs/Auth.js +250 -301
- package/dist/cjs/{BlockContent-88f69acd.js → BlockContent-091a991f.js} +1 -1
- package/dist/cjs/BrowseVideosListing.js +1 -1
- package/dist/cjs/CMEDeck.js +5 -5
- package/dist/cjs/Column3.js +4 -4
- package/dist/cjs/ConferenceArticleCard.js +2 -2
- package/dist/cjs/DeckContent.js +10 -8
- package/dist/cjs/DeckQueue.js +6 -6
- package/dist/cjs/{Dfp-b2bc3b97.js → Dfp-f6a18ed2.js} +1 -1
- package/dist/cjs/EventsDeck.js +4 -4
- package/dist/cjs/ExternalResources.js +7 -7
- package/dist/cjs/Feature.js +3 -3
- package/dist/cjs/ForbesHero.js +2 -2
- package/dist/cjs/GridContent.js +16 -12
- package/dist/cjs/GridHero.js +2 -2
- package/dist/cjs/GroupDeck.js +1 -1
- package/dist/cjs/HamMagazine.js +4 -4
- package/dist/cjs/Hero.js +1 -1
- package/dist/cjs/HorizontalHero.js +2 -2
- package/dist/cjs/IssueContentDeck.js +2 -2
- package/dist/cjs/IssueDeck.js +2 -2
- package/dist/cjs/IssueLanding.js +7 -7
- package/dist/cjs/LeftNav.js +3 -3
- package/dist/cjs/MasterDeck.js +13 -9
- package/dist/cjs/NavMagazine.js +4 -4
- package/dist/cjs/NavNative.js +27 -7
- package/dist/cjs/OncliveHero.js +2 -2
- package/dist/cjs/OncliveLargeHero.js +2 -2
- package/dist/cjs/PartnerDetailListing.js +16 -16
- package/dist/cjs/PublicationDeck.js +1 -1
- package/dist/cjs/QueueDeckExpanded.js +15 -11
- package/dist/cjs/RecentNews.js +2 -2
- package/dist/cjs/RelatedContent.js +2 -2
- package/dist/cjs/{SocialSearchComponent-6b5e5b47.js → SocialSearchComponent-56d49a1a.js} +5 -5
- package/dist/cjs/TaxonomyCard.js +2 -2
- package/dist/cjs/TemplateNormal.js +3 -3
- package/dist/cjs/ThumbnailCard.js +1 -1
- package/dist/cjs/Ustream.js +2 -2
- package/dist/cjs/VerticalHero.js +2 -2
- package/dist/cjs/VideoSeriesCard.js +2 -2
- package/dist/cjs/VideoSeriesListing.js +24 -22
- package/dist/cjs/View.js +181 -214
- package/dist/cjs/YahooHero.js +2 -2
- package/dist/cjs/YoutubeGroup.js +2 -2
- package/dist/cjs/getQuery.js +2 -2
- package/dist/cjs/getRelatedArticle.js +122 -155
- package/dist/cjs/getSerializers.js +6 -6
- package/dist/cjs/{getTargeting-fee8c429.js → getTargeting-9af0ef69.js} +2 -2
- package/dist/cjs/getTargeting.js +1 -1
- package/dist/cjs/{index-5be2866f.js → index-3294d3bc.js} +1 -1
- package/dist/cjs/{index-b5eb3ff8.js → index-be0c82be.js} +19 -20
- package/dist/cjs/{index-a9422f8a.js → index-e05857f8.js} +563 -519
- package/dist/cjs/{index-2d0a4911.js → index-fa8ed292.js} +27 -34
- package/dist/cjs/{index.es-ab3f2690.js → index.es-9110add6.js} +1 -3
- package/dist/cjs/index.js +12 -12
- package/dist/cjs/{main-b6c96c8d.js → main-03ffa84c.js} +37 -67
- package/dist/cjs/{moment-66a6a284.js → moment-575fe24c.js} +1 -1
- package/dist/cjs/timeDifferenceCalc.js +1 -1
- package/dist/cjs/urlFor.js +1 -1
- package/dist/esm/AD.js +1 -1
- package/dist/esm/AD300x250.js +3 -3
- package/dist/esm/AD300x250x600.js +3 -3
- package/dist/esm/AD728x90.js +4 -4
- package/dist/esm/ADFloatingFooter.js +2 -2
- package/dist/esm/ADGutter.js +8 -5
- package/dist/esm/{ADInfeed-205cb7a9.js → ADInfeed-cc79bcc2.js} +6 -3
- package/dist/esm/ADSkyscraper.js +8 -5
- package/dist/esm/ADSponsoredResources.js +8 -5
- package/dist/esm/ADWebcast.js +8 -5
- package/dist/esm/ADWelcome.js +2 -2
- package/dist/esm/{ADlgInfeed-e538f17a.js → ADlgInfeed-501cbfca.js} +6 -3
- package/dist/esm/AdSlot.js +3 -3
- package/dist/esm/AdSlotsProvider.js +24 -3
- package/dist/esm/ArticleCarousel.js +1 -1
- package/dist/esm/ArticleSeriesListing.js +4 -4
- package/dist/esm/Auth.js +247 -298
- package/dist/esm/{BlockContent-a614acdf.js → BlockContent-e9b4ddcf.js} +1 -1
- package/dist/esm/BrowseVideosListing.js +1 -1
- package/dist/esm/CMEDeck.js +5 -5
- package/dist/esm/Column3.js +4 -4
- package/dist/esm/ConferenceArticleCard.js +2 -2
- package/dist/esm/DeckContent.js +10 -8
- package/dist/esm/DeckQueue.js +6 -6
- package/dist/esm/{Dfp-8a8fca18.js → Dfp-96b49def.js} +1 -1
- package/dist/esm/EventsDeck.js +4 -4
- package/dist/esm/ExternalResources.js +7 -7
- package/dist/esm/Feature.js +3 -3
- package/dist/esm/ForbesHero.js +2 -2
- package/dist/esm/GridContent.js +16 -12
- package/dist/esm/GridHero.js +2 -2
- package/dist/esm/GroupDeck.js +1 -1
- package/dist/esm/HamMagazine.js +4 -4
- package/dist/esm/Hero.js +1 -1
- package/dist/esm/HorizontalHero.js +2 -2
- package/dist/esm/IssueContentDeck.js +2 -2
- package/dist/esm/IssueDeck.js +2 -2
- package/dist/esm/IssueLanding.js +7 -7
- package/dist/esm/LeftNav.js +3 -3
- package/dist/esm/MasterDeck.js +13 -9
- package/dist/esm/NavMagazine.js +4 -4
- package/dist/esm/NavNative.js +27 -7
- package/dist/esm/OncliveHero.js +2 -2
- package/dist/esm/OncliveLargeHero.js +2 -2
- package/dist/esm/PartnerDetailListing.js +14 -14
- package/dist/esm/PublicationDeck.js +1 -1
- package/dist/esm/QueueDeckExpanded.js +15 -11
- package/dist/esm/RecentNews.js +2 -2
- package/dist/esm/RelatedContent.js +2 -2
- package/dist/esm/{SocialSearchComponent-7f14e0f3.js → SocialSearchComponent-677ed3bd.js} +5 -5
- package/dist/esm/TaxonomyCard.js +2 -2
- package/dist/esm/TemplateNormal.js +3 -3
- package/dist/esm/ThumbnailCard.js +1 -1
- package/dist/esm/Ustream.js +2 -2
- package/dist/esm/VerticalHero.js +2 -2
- package/dist/esm/VideoSeriesCard.js +2 -2
- package/dist/esm/VideoSeriesListing.js +24 -22
- package/dist/esm/View.js +160 -193
- package/dist/esm/YahooHero.js +2 -2
- package/dist/esm/YoutubeGroup.js +2 -2
- package/dist/esm/getQuery.js +2 -2
- package/dist/esm/getRelatedArticle.js +122 -155
- package/dist/esm/getSerializers.js +6 -6
- package/dist/esm/{index-93ec3c59.js → index-0e45a0b2.js} +27 -34
- package/dist/esm/{index-ea6b6891.js → index-13927b74.js} +563 -519
- package/dist/esm/{index-51a80699.js → index-73819142.js} +19 -20
- package/dist/esm/{index-d2f90501.js → index-ef6d5dcf.js} +1 -1
- package/dist/esm/{index.es-938a3a58.js → index.es-29c1cef5.js} +1 -3
- package/dist/esm/index.js +11 -11
- package/dist/esm/{main-0465b2a0.js → main-35ff7b4f.js} +34 -65
- package/dist/esm/{moment-12415288.js → moment-e2f9b20c.js} +1 -1
- package/dist/esm/timeDifferenceCalc.js +1 -1
- package/dist/esm/urlFor.js +1 -1
- package/package.json +1 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { c as createCommonjsModule, u as unwrapExports } from './_commonjsHelpers-0c4b6f40.js';
|
|
2
2
|
import { a as _Array$from, _ as _toConsumableArray } from './toConsumableArray-725434a0.js';
|
|
3
|
-
import { _ as _extends } from './extends-cc5da797.js';
|
|
3
|
+
import { _ as _extends$1 } from './extends-cc5da797.js';
|
|
4
4
|
import { _ as _inherits$1, a as _classCallCheck$1, b as _possibleConstructorReturn$1, c as _Object$getPrototypeOf, d as _createClass$1 } from './inherits-7ee3e0c1.js';
|
|
5
|
-
import { _ as _typeof
|
|
5
|
+
import { _ as _typeof } from './typeof-08f2c380.js';
|
|
6
6
|
import React__default, { useState, useEffect, useRef, useLayoutEffect, useCallback } from 'react';
|
|
7
|
-
import { l as lib_3 } from './index-
|
|
7
|
+
import { l as lib_3 } from './index-0e45a0b2.js';
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
9
9
|
import Row from 'react-bootstrap/Row';
|
|
10
10
|
import Col from 'react-bootstrap/Col';
|
|
11
|
-
import { m as moment } from './moment-
|
|
11
|
+
import { m as moment } from './moment-e2f9b20c.js';
|
|
12
12
|
import Router, { useRouter } from 'next/router';
|
|
13
|
-
import { i as imageUrlBuilder } from './index-
|
|
13
|
+
import { i as imageUrlBuilder } from './index-73819142.js';
|
|
14
14
|
import { L as LazyLoad } from './index-5f9f807a.js';
|
|
15
|
-
import { b as main_16,
|
|
15
|
+
import { b as main_16, d as main_35, m as main_36 } from './main-35ff7b4f.js';
|
|
16
16
|
import { h as html_decode_1 } from './entities-7cc3bf45.js';
|
|
17
17
|
import { _ as _slicedToArray } from './slicedToArray-7021e5df.js';
|
|
18
18
|
import Segment from './Segment.js';
|
|
19
19
|
import Beam from './Beam.js';
|
|
20
20
|
import DFPAdSlot from './AdSlot.js';
|
|
21
|
-
import { B as BlockContent } from './BlockContent-
|
|
21
|
+
import { B as BlockContent } from './BlockContent-e9b4ddcf.js';
|
|
22
22
|
import { g as getYoutubeId } from './smoothscroll-4b699764.js';
|
|
23
23
|
import GroupDeck from './GroupDeck.js';
|
|
24
24
|
import { Carousel, Table, Figure as Figure$1, Button, ProgressBar, Card, Row as Row$1, Col as Col$1 } from 'react-bootstrap';
|
|
@@ -93,18 +93,21 @@ var Slideshow = function Slideshow(_ref) {
|
|
|
93
93
|
);
|
|
94
94
|
};
|
|
95
95
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
var isArray = Array.isArray;
|
|
97
|
+
var keyList = Object.keys;
|
|
98
|
+
var hasProp = Object.prototype.hasOwnProperty;
|
|
99
99
|
|
|
100
100
|
var fastDeepEqual = function equal(a, b) {
|
|
101
101
|
if (a === b) return true;
|
|
102
102
|
|
|
103
103
|
if (a && b && typeof a == 'object' && typeof b == 'object') {
|
|
104
|
-
|
|
104
|
+
var arrA = isArray(a)
|
|
105
|
+
, arrB = isArray(b)
|
|
106
|
+
, i
|
|
107
|
+
, length
|
|
108
|
+
, key;
|
|
105
109
|
|
|
106
|
-
|
|
107
|
-
if (Array.isArray(a)) {
|
|
110
|
+
if (arrA && arrB) {
|
|
108
111
|
length = a.length;
|
|
109
112
|
if (length != b.length) return false;
|
|
110
113
|
for (i = length; i-- !== 0;)
|
|
@@ -112,29 +115,35 @@ var fastDeepEqual = function equal(a, b) {
|
|
|
112
115
|
return true;
|
|
113
116
|
}
|
|
114
117
|
|
|
118
|
+
if (arrA != arrB) return false;
|
|
115
119
|
|
|
120
|
+
var dateA = a instanceof Date
|
|
121
|
+
, dateB = b instanceof Date;
|
|
122
|
+
if (dateA != dateB) return false;
|
|
123
|
+
if (dateA && dateB) return a.getTime() == b.getTime();
|
|
116
124
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
if (
|
|
125
|
+
var regexpA = a instanceof RegExp
|
|
126
|
+
, regexpB = b instanceof RegExp;
|
|
127
|
+
if (regexpA != regexpB) return false;
|
|
128
|
+
if (regexpA && regexpB) return a.toString() == b.toString();
|
|
120
129
|
|
|
121
|
-
keys =
|
|
130
|
+
var keys = keyList(a);
|
|
122
131
|
length = keys.length;
|
|
123
|
-
|
|
132
|
+
|
|
133
|
+
if (length !== keyList(b).length)
|
|
134
|
+
return false;
|
|
124
135
|
|
|
125
136
|
for (i = length; i-- !== 0;)
|
|
126
|
-
if (!
|
|
137
|
+
if (!hasProp.call(b, keys[i])) return false;
|
|
127
138
|
|
|
128
139
|
for (i = length; i-- !== 0;) {
|
|
129
|
-
|
|
130
|
-
|
|
140
|
+
key = keys[i];
|
|
131
141
|
if (!equal(a[key], b[key])) return false;
|
|
132
142
|
}
|
|
133
143
|
|
|
134
144
|
return true;
|
|
135
145
|
}
|
|
136
146
|
|
|
137
|
-
// true if both NaN, false otherwise
|
|
138
147
|
return a!==a && b!==b;
|
|
139
148
|
};
|
|
140
149
|
|
|
@@ -1557,235 +1566,199 @@ module.exports = exports['default'];
|
|
|
1557
1566
|
|
|
1558
1567
|
var youTubePlayer = unwrapExports(dist);
|
|
1559
1568
|
|
|
1560
|
-
function
|
|
1561
|
-
|
|
1562
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1563
|
-
|
|
1564
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
1565
|
-
|
|
1566
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
1567
|
-
|
|
1568
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
1569
|
-
|
|
1570
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
1571
|
-
|
|
1572
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
1573
|
-
|
|
1574
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
1569
|
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
1575
1570
|
|
|
1576
|
-
function
|
|
1577
|
-
|
|
1578
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
1571
|
+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
1579
1572
|
|
|
1580
|
-
function
|
|
1573
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1581
1574
|
|
|
1582
|
-
function
|
|
1575
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
1583
1576
|
|
|
1584
|
-
function
|
|
1577
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
1585
1578
|
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
*
|
|
1589
|
-
*
|
|
1590
|
-
* @param {Object}
|
|
1591
|
-
* @param {Object} props
|
|
1579
|
+
/**
|
|
1580
|
+
* Check whether a `props` change should result in the video being updated.
|
|
1581
|
+
*
|
|
1582
|
+
* @param {Object} prevProps
|
|
1583
|
+
* @param {Object} props
|
|
1592
1584
|
*/
|
|
1593
|
-
|
|
1594
1585
|
function shouldUpdateVideo(prevProps, props) {
|
|
1595
1586
|
// A changing video should always trigger an update
|
|
1596
1587
|
if (prevProps.videoId !== props.videoId) {
|
|
1597
1588
|
return true;
|
|
1598
|
-
}
|
|
1599
|
-
// update.
|
|
1600
|
-
|
|
1589
|
+
}
|
|
1601
1590
|
|
|
1591
|
+
// Otherwise, a change in the start/end time playerVars also requires a player
|
|
1592
|
+
// update.
|
|
1602
1593
|
var prevVars = prevProps.opts.playerVars || {};
|
|
1603
1594
|
var vars = props.opts.playerVars || {};
|
|
1595
|
+
|
|
1604
1596
|
return prevVars.start !== vars.start || prevVars.end !== vars.end;
|
|
1605
1597
|
}
|
|
1606
|
-
/**
|
|
1607
|
-
* Neutralize API options that only require a video update, leaving only options
|
|
1608
|
-
* that require a player reset. The results can then be compared to see if a
|
|
1609
|
-
* player reset is necessary.
|
|
1610
|
-
*
|
|
1611
|
-
* @param {Object} opts
|
|
1612
|
-
*/
|
|
1613
|
-
|
|
1614
1598
|
|
|
1599
|
+
/**
|
|
1600
|
+
* Neutralise API options that only require a video update, leaving only options
|
|
1601
|
+
* that require a player reset. The results can then be compared to see if a
|
|
1602
|
+
* player reset is necessary.
|
|
1603
|
+
*
|
|
1604
|
+
* @param {Object} opts
|
|
1605
|
+
*/
|
|
1615
1606
|
function filterResetOptions(opts) {
|
|
1616
|
-
return
|
|
1617
|
-
playerVars:
|
|
1607
|
+
return _extends({}, opts, {
|
|
1608
|
+
playerVars: _extends({}, opts.playerVars, {
|
|
1618
1609
|
autoplay: 0,
|
|
1619
1610
|
start: 0,
|
|
1620
1611
|
end: 0
|
|
1621
1612
|
})
|
|
1622
1613
|
});
|
|
1623
1614
|
}
|
|
1624
|
-
/**
|
|
1625
|
-
* Check whether a `props` change should result in the player being reset.
|
|
1626
|
-
* The player is reset when the `props.opts` change, except if the only change
|
|
1627
|
-
* is in the `start` and `end` playerVars, because a video update can deal with
|
|
1628
|
-
* those.
|
|
1629
|
-
*
|
|
1630
|
-
* @param {Object} prevProps
|
|
1631
|
-
* @param {Object} props
|
|
1632
|
-
*/
|
|
1633
|
-
|
|
1634
1615
|
|
|
1616
|
+
/**
|
|
1617
|
+
* Check whether a `props` change should result in the player being reset.
|
|
1618
|
+
* The player is reset when the `props.opts` change, except if the only change
|
|
1619
|
+
* is in the `start` and `end` playerVars, because a video update can deal with
|
|
1620
|
+
* those.
|
|
1621
|
+
*
|
|
1622
|
+
* @param {Object} prevProps
|
|
1623
|
+
* @param {Object} props
|
|
1624
|
+
*/
|
|
1635
1625
|
function shouldResetPlayer(prevProps, props) {
|
|
1636
1626
|
return !fastDeepEqual(filterResetOptions(prevProps.opts), filterResetOptions(props.opts));
|
|
1637
1627
|
}
|
|
1638
|
-
/**
|
|
1639
|
-
* Check whether a props change should result in an id or className update.
|
|
1640
|
-
*
|
|
1641
|
-
* @param {Object} prevProps
|
|
1642
|
-
* @param {Object} props
|
|
1643
|
-
*/
|
|
1644
|
-
|
|
1645
1628
|
|
|
1629
|
+
/**
|
|
1630
|
+
* Check whether a props change should result in an id or className update.
|
|
1631
|
+
*
|
|
1632
|
+
* @param {Object} prevProps
|
|
1633
|
+
* @param {Object} props
|
|
1634
|
+
*/
|
|
1646
1635
|
function shouldUpdatePlayer(prevProps, props) {
|
|
1647
1636
|
return prevProps.id !== props.id || prevProps.className !== props.className;
|
|
1648
1637
|
}
|
|
1649
1638
|
|
|
1650
|
-
var YouTube =
|
|
1639
|
+
var YouTube = function (_React$Component) {
|
|
1651
1640
|
_inherits(YouTube, _React$Component);
|
|
1652
1641
|
|
|
1653
|
-
var _super = _createSuper(YouTube);
|
|
1654
|
-
|
|
1655
|
-
/**
|
|
1656
|
-
* Expose PlayerState constants for convenience. These constants can also be
|
|
1657
|
-
* accessed through the global YT object after the YouTube IFrame API is instantiated.
|
|
1658
|
-
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
1659
|
-
*/
|
|
1660
1642
|
function YouTube(props) {
|
|
1661
|
-
var _this;
|
|
1662
|
-
|
|
1663
1643
|
_classCallCheck(this, YouTube);
|
|
1664
1644
|
|
|
1665
|
-
_this =
|
|
1645
|
+
var _this = _possibleConstructorReturn(this, (YouTube.__proto__ || Object.getPrototypeOf(YouTube)).call(this, props));
|
|
1666
1646
|
|
|
1667
|
-
|
|
1647
|
+
_this.onPlayerReady = function (event) {
|
|
1668
1648
|
return _this.props.onReady(event);
|
|
1669
|
-
}
|
|
1649
|
+
};
|
|
1670
1650
|
|
|
1671
|
-
|
|
1651
|
+
_this.onPlayerError = function (event) {
|
|
1672
1652
|
return _this.props.onError(event);
|
|
1673
|
-
}
|
|
1653
|
+
};
|
|
1674
1654
|
|
|
1675
|
-
|
|
1655
|
+
_this.onPlayerStateChange = function (event) {
|
|
1676
1656
|
_this.props.onStateChange(event);
|
|
1677
|
-
|
|
1678
1657
|
switch (event.data) {
|
|
1658
|
+
|
|
1679
1659
|
case YouTube.PlayerState.ENDED:
|
|
1680
1660
|
_this.props.onEnd(event);
|
|
1681
|
-
|
|
1682
1661
|
break;
|
|
1683
1662
|
|
|
1684
1663
|
case YouTube.PlayerState.PLAYING:
|
|
1685
1664
|
_this.props.onPlay(event);
|
|
1686
|
-
|
|
1687
1665
|
break;
|
|
1688
1666
|
|
|
1689
1667
|
case YouTube.PlayerState.PAUSED:
|
|
1690
1668
|
_this.props.onPause(event);
|
|
1691
|
-
|
|
1692
1669
|
break;
|
|
1693
1670
|
}
|
|
1694
|
-
}
|
|
1671
|
+
};
|
|
1695
1672
|
|
|
1696
|
-
|
|
1673
|
+
_this.onPlayerPlaybackRateChange = function (event) {
|
|
1697
1674
|
return _this.props.onPlaybackRateChange(event);
|
|
1698
|
-
}
|
|
1675
|
+
};
|
|
1699
1676
|
|
|
1700
|
-
|
|
1677
|
+
_this.onPlayerPlaybackQualityChange = function (event) {
|
|
1701
1678
|
return _this.props.onPlaybackQualityChange(event);
|
|
1702
|
-
}
|
|
1679
|
+
};
|
|
1703
1680
|
|
|
1704
|
-
|
|
1681
|
+
_this.createPlayer = function () {
|
|
1705
1682
|
// do not attempt to create a player server-side, it won't work
|
|
1706
|
-
if (typeof document === 'undefined') return;
|
|
1707
|
-
|
|
1708
|
-
var playerOpts =
|
|
1683
|
+
if (typeof document === 'undefined') return;
|
|
1684
|
+
// create player
|
|
1685
|
+
var playerOpts = _extends({}, _this.props.opts, {
|
|
1709
1686
|
// preload the `videoId` video if one is already given
|
|
1710
1687
|
videoId: _this.props.videoId
|
|
1711
1688
|
});
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1689
|
+
_this.internalPlayer = youTubePlayer(_this.container, playerOpts);
|
|
1690
|
+
// attach event handlers
|
|
1715
1691
|
_this.internalPlayer.on('ready', _this.onPlayerReady);
|
|
1716
|
-
|
|
1717
1692
|
_this.internalPlayer.on('error', _this.onPlayerError);
|
|
1718
|
-
|
|
1719
1693
|
_this.internalPlayer.on('stateChange', _this.onPlayerStateChange);
|
|
1720
|
-
|
|
1721
1694
|
_this.internalPlayer.on('playbackRateChange', _this.onPlayerPlaybackRateChange);
|
|
1722
|
-
|
|
1723
1695
|
_this.internalPlayer.on('playbackQualityChange', _this.onPlayerPlaybackQualityChange);
|
|
1724
|
-
}
|
|
1696
|
+
};
|
|
1725
1697
|
|
|
1726
|
-
|
|
1698
|
+
_this.resetPlayer = function () {
|
|
1727
1699
|
return _this.internalPlayer.destroy().then(_this.createPlayer);
|
|
1728
|
-
}
|
|
1700
|
+
};
|
|
1729
1701
|
|
|
1730
|
-
|
|
1702
|
+
_this.updatePlayer = function () {
|
|
1731
1703
|
_this.internalPlayer.getIframe().then(function (iframe) {
|
|
1732
1704
|
if (_this.props.id) iframe.setAttribute('id', _this.props.id);else iframe.removeAttribute('id');
|
|
1733
1705
|
if (_this.props.className) iframe.setAttribute('class', _this.props.className);else iframe.removeAttribute('class');
|
|
1734
1706
|
});
|
|
1735
|
-
}
|
|
1707
|
+
};
|
|
1736
1708
|
|
|
1737
|
-
|
|
1709
|
+
_this.updateVideo = function () {
|
|
1738
1710
|
if (typeof _this.props.videoId === 'undefined' || _this.props.videoId === null) {
|
|
1739
1711
|
_this.internalPlayer.stopVideo();
|
|
1740
|
-
|
|
1741
1712
|
return;
|
|
1742
|
-
}
|
|
1743
|
-
|
|
1713
|
+
}
|
|
1744
1714
|
|
|
1715
|
+
// set queueing options
|
|
1745
1716
|
var autoplay = false;
|
|
1746
1717
|
var opts = {
|
|
1747
1718
|
videoId: _this.props.videoId
|
|
1748
1719
|
};
|
|
1749
|
-
|
|
1750
1720
|
if ('playerVars' in _this.props.opts) {
|
|
1751
1721
|
autoplay = _this.props.opts.playerVars.autoplay === 1;
|
|
1752
|
-
|
|
1753
1722
|
if ('start' in _this.props.opts.playerVars) {
|
|
1754
1723
|
opts.startSeconds = _this.props.opts.playerVars.start;
|
|
1755
1724
|
}
|
|
1756
|
-
|
|
1757
1725
|
if ('end' in _this.props.opts.playerVars) {
|
|
1758
1726
|
opts.endSeconds = _this.props.opts.playerVars.end;
|
|
1759
1727
|
}
|
|
1760
|
-
}
|
|
1761
|
-
|
|
1728
|
+
}
|
|
1762
1729
|
|
|
1730
|
+
// if autoplay is enabled loadVideoById
|
|
1763
1731
|
if (autoplay) {
|
|
1764
1732
|
_this.internalPlayer.loadVideoById(opts);
|
|
1765
|
-
|
|
1766
1733
|
return;
|
|
1767
|
-
}
|
|
1768
|
-
|
|
1769
|
-
|
|
1734
|
+
}
|
|
1735
|
+
// default behaviour just cues the video
|
|
1770
1736
|
_this.internalPlayer.cueVideoById(opts);
|
|
1771
|
-
}
|
|
1737
|
+
};
|
|
1772
1738
|
|
|
1773
|
-
|
|
1739
|
+
_this.refContainer = function (container) {
|
|
1774
1740
|
_this.container = container;
|
|
1775
|
-
}
|
|
1741
|
+
};
|
|
1776
1742
|
|
|
1777
1743
|
_this.container = null;
|
|
1778
1744
|
_this.internalPlayer = null;
|
|
1779
1745
|
return _this;
|
|
1780
1746
|
}
|
|
1781
1747
|
|
|
1748
|
+
/**
|
|
1749
|
+
* Expose PlayerState constants for convenience. These constants can also be
|
|
1750
|
+
* accessed through the global YT object after the YouTube IFrame API is instantiated.
|
|
1751
|
+
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
1752
|
+
*/
|
|
1753
|
+
|
|
1754
|
+
|
|
1782
1755
|
_createClass(YouTube, [{
|
|
1783
|
-
key:
|
|
1756
|
+
key: 'componentDidMount',
|
|
1784
1757
|
value: function componentDidMount() {
|
|
1785
1758
|
this.createPlayer();
|
|
1786
1759
|
}
|
|
1787
1760
|
}, {
|
|
1788
|
-
key:
|
|
1761
|
+
key: 'componentDidUpdate',
|
|
1789
1762
|
value: function componentDidUpdate(prevProps) {
|
|
1790
1763
|
if (shouldUpdatePlayer(prevProps, this.props)) {
|
|
1791
1764
|
this.updatePlayer();
|
|
@@ -1800,58 +1773,112 @@ var YouTube = /*#__PURE__*/function (_React$Component) {
|
|
|
1800
1773
|
}
|
|
1801
1774
|
}
|
|
1802
1775
|
}, {
|
|
1803
|
-
key:
|
|
1776
|
+
key: 'componentWillUnmount',
|
|
1804
1777
|
value: function componentWillUnmount() {
|
|
1805
|
-
/**
|
|
1806
|
-
* Note: The `youtube-player` package that is used promisifies all
|
|
1807
|
-
* Player API calls, which introduces a delay of a tick before it actually
|
|
1808
|
-
* gets destroyed. Since React attempts to remove the element instantly
|
|
1809
|
-
* this method isn't quick enough to reset the container element.
|
|
1778
|
+
/**
|
|
1779
|
+
* Note: The `youtube-player` package that is used promisifies all Youtube
|
|
1780
|
+
* Player API calls, which introduces a delay of a tick before it actually
|
|
1781
|
+
* gets destroyed. Since React attempts to remove the element instantly
|
|
1782
|
+
* this method isn't quick enough to reset the container element.
|
|
1810
1783
|
*/
|
|
1811
1784
|
this.internalPlayer.destroy();
|
|
1812
1785
|
}
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
*
|
|
1816
|
-
*
|
|
1817
|
-
*
|
|
1786
|
+
|
|
1787
|
+
/**
|
|
1788
|
+
* https://developers.google.com/youtube/iframe_api_reference#onReady
|
|
1789
|
+
*
|
|
1790
|
+
* @param {Object} event
|
|
1791
|
+
* @param {Object} target - player object
|
|
1792
|
+
*/
|
|
1793
|
+
|
|
1794
|
+
|
|
1795
|
+
/**
|
|
1796
|
+
* https://developers.google.com/youtube/iframe_api_reference#onError
|
|
1797
|
+
*
|
|
1798
|
+
* @param {Object} event
|
|
1799
|
+
* @param {Integer} data - error type
|
|
1800
|
+
* @param {Object} target - player object
|
|
1801
|
+
*/
|
|
1802
|
+
|
|
1803
|
+
|
|
1804
|
+
/**
|
|
1805
|
+
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
1806
|
+
*
|
|
1807
|
+
* @param {Object} event
|
|
1808
|
+
* @param {Integer} data - status change type
|
|
1809
|
+
* @param {Object} target - actual YT player
|
|
1810
|
+
*/
|
|
1811
|
+
|
|
1812
|
+
|
|
1813
|
+
/**
|
|
1814
|
+
* https://developers.google.com/youtube/iframe_api_reference#onPlaybackRateChange
|
|
1815
|
+
*
|
|
1816
|
+
* @param {Object} event
|
|
1817
|
+
* @param {Float} data - playback rate
|
|
1818
|
+
* @param {Object} target - actual YT player
|
|
1819
|
+
*/
|
|
1820
|
+
|
|
1821
|
+
|
|
1822
|
+
/**
|
|
1823
|
+
* https://developers.google.com/youtube/iframe_api_reference#onPlaybackQualityChange
|
|
1824
|
+
*
|
|
1825
|
+
* @param {Object} event
|
|
1826
|
+
* @param {String} data - playback quality
|
|
1827
|
+
* @param {Object} target - actual YT player
|
|
1828
|
+
*/
|
|
1829
|
+
|
|
1830
|
+
|
|
1831
|
+
/**
|
|
1832
|
+
* Initialize the Youtube Player API on the container and attach event handlers
|
|
1833
|
+
*/
|
|
1834
|
+
|
|
1835
|
+
|
|
1836
|
+
/**
|
|
1837
|
+
* Shorthand for destroying and then re-creating the Youtube Player
|
|
1838
|
+
*/
|
|
1839
|
+
|
|
1840
|
+
|
|
1841
|
+
/**
|
|
1842
|
+
* Method to update the id and class of the Youtube Player iframe.
|
|
1843
|
+
* React should update this automatically but since the Youtube Player API
|
|
1844
|
+
* replaced the DIV that is mounted by React we need to do this manually.
|
|
1845
|
+
*/
|
|
1846
|
+
|
|
1847
|
+
|
|
1848
|
+
/**
|
|
1849
|
+
* Call Youtube Player API methods to update the currently playing video.
|
|
1850
|
+
* Depeding on the `opts.playerVars.autoplay` this function uses one of two
|
|
1851
|
+
* Youtube Player API methods to update the video.
|
|
1818
1852
|
*/
|
|
1819
1853
|
|
|
1820
1854
|
}, {
|
|
1821
|
-
key:
|
|
1855
|
+
key: 'render',
|
|
1822
1856
|
value: function render() {
|
|
1823
|
-
return
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
id: this.props.id,
|
|
1827
|
-
|
|
1828
|
-
ref: this.refContainer
|
|
1829
|
-
}));
|
|
1857
|
+
return React__default.createElement(
|
|
1858
|
+
'div',
|
|
1859
|
+
{ className: this.props.containerClassName },
|
|
1860
|
+
React__default.createElement('div', { id: this.props.id, className: this.props.className, ref: this.refContainer })
|
|
1861
|
+
);
|
|
1830
1862
|
}
|
|
1831
1863
|
}]);
|
|
1832
1864
|
|
|
1833
1865
|
return YouTube;
|
|
1834
1866
|
}(React__default.Component);
|
|
1835
1867
|
|
|
1836
|
-
_defineProperty(YouTube, "PlayerState", {
|
|
1837
|
-
UNSTARTED: -1,
|
|
1838
|
-
ENDED: 0,
|
|
1839
|
-
PLAYING: 1,
|
|
1840
|
-
PAUSED: 2,
|
|
1841
|
-
BUFFERING: 3,
|
|
1842
|
-
CUED: 5
|
|
1843
|
-
});
|
|
1844
|
-
|
|
1845
1868
|
YouTube.propTypes = {
|
|
1846
1869
|
videoId: PropTypes.string,
|
|
1870
|
+
|
|
1847
1871
|
// custom ID for player element
|
|
1848
1872
|
id: PropTypes.string,
|
|
1873
|
+
|
|
1849
1874
|
// custom class name for player element
|
|
1850
1875
|
className: PropTypes.string,
|
|
1851
1876
|
// custom class name for player container element
|
|
1852
1877
|
containerClassName: PropTypes.string,
|
|
1878
|
+
|
|
1853
1879
|
// https://developers.google.com/youtube/iframe_api_reference#Loading_a_Video_Player
|
|
1854
1880
|
opts: PropTypes.objectOf(PropTypes.any),
|
|
1881
|
+
|
|
1855
1882
|
// event subscriptions
|
|
1856
1883
|
onReady: PropTypes.func,
|
|
1857
1884
|
onError: PropTypes.func,
|
|
@@ -1863,7 +1890,6 @@ YouTube.propTypes = {
|
|
|
1863
1890
|
onPlaybackQualityChange: PropTypes.func
|
|
1864
1891
|
};
|
|
1865
1892
|
YouTube.defaultProps = {
|
|
1866
|
-
videoId: null,
|
|
1867
1893
|
id: null,
|
|
1868
1894
|
className: null,
|
|
1869
1895
|
opts: {},
|
|
@@ -1877,6 +1903,14 @@ YouTube.defaultProps = {
|
|
|
1877
1903
|
onPlaybackRateChange: function onPlaybackRateChange() {},
|
|
1878
1904
|
onPlaybackQualityChange: function onPlaybackQualityChange() {}
|
|
1879
1905
|
};
|
|
1906
|
+
YouTube.PlayerState = {
|
|
1907
|
+
UNSTARTED: -1,
|
|
1908
|
+
ENDED: 0,
|
|
1909
|
+
PLAYING: 1,
|
|
1910
|
+
PAUSED: 2,
|
|
1911
|
+
BUFFERING: 3,
|
|
1912
|
+
CUED: 5
|
|
1913
|
+
};
|
|
1880
1914
|
|
|
1881
1915
|
var YouTubePlayer = function YouTubePlayer(_ref) {
|
|
1882
1916
|
var url = _ref.url;
|
|
@@ -2140,7 +2174,7 @@ var Media = function Media(_ref) {
|
|
|
2140
2174
|
React__default.createElement(
|
|
2141
2175
|
LazyLoad,
|
|
2142
2176
|
{ once: true },
|
|
2143
|
-
React__default.createElement(Figure$1.Image, _extends({ className: 'media-image', style: { maxWidth: '100%' }, src: urlFor(poster).url() }, alt && { alt: alt }))
|
|
2177
|
+
React__default.createElement(Figure$1.Image, _extends$1({ className: 'media-image', style: { maxWidth: '100%' }, src: urlFor(poster).url() }, alt && { alt: alt }))
|
|
2144
2178
|
),
|
|
2145
2179
|
caption && React__default.createElement(
|
|
2146
2180
|
Figure$1.Caption,
|
|
@@ -2152,7 +2186,7 @@ var Media = function Media(_ref) {
|
|
|
2152
2186
|
} else if (caption && caption !== '') {
|
|
2153
2187
|
return React__default.createElement(
|
|
2154
2188
|
'a',
|
|
2155
|
-
_extends({}, uploadDoc.downloadMedia ? {
|
|
2189
|
+
_extends$1({}, uploadDoc.downloadMedia ? {
|
|
2156
2190
|
href: uploadDoc.asset.url + '?dl='
|
|
2157
2191
|
} : { href: uploadDoc.asset.url, target: blank ? '_blank' : '_self', rel: 'noopener noreferrer' }, {
|
|
2158
2192
|
style: { paddingLeft: '4px', paddingRight: '4px' },
|
|
@@ -2205,7 +2239,7 @@ var Video = function Video(_ref) {
|
|
|
2205
2239
|
var onVideoSuccess = function onVideoSuccess(success) {
|
|
2206
2240
|
//console.log('success:', success.ref)
|
|
2207
2241
|
var player = success.ref;
|
|
2208
|
-
if (_typeof
|
|
2242
|
+
if (_typeof(player.ima3) === 'object' && player.ima3.settings && player.ima3.settings.serverUrl && targeting !== null) {
|
|
2209
2243
|
player.ima3.settings.debug = true;
|
|
2210
2244
|
if (targeting.content_placement && targeting.document_url) {
|
|
2211
2245
|
player.ima3.settings.serverUrl = player.ima3.settings.serverUrl + '&cust_params=' + encodeURIComponent('content_placement=' + targeting.content_placement + '&document_url=' + targeting.document_url);
|
|
@@ -2720,17 +2754,11 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
2720
2754
|
|
|
2721
2755
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2722
2756
|
|
|
2723
|
-
function
|
|
2724
|
-
|
|
2725
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2757
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
2726
2758
|
|
|
2727
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance
|
|
2759
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
|
2728
2760
|
|
|
2729
|
-
function
|
|
2730
|
-
|
|
2731
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
2732
|
-
|
|
2733
|
-
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
2761
|
+
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
2734
2762
|
|
|
2735
2763
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
2736
2764
|
|
|
@@ -2860,12 +2888,12 @@ function getSDK(url, sdkGlobal) {
|
|
|
2860
2888
|
|
|
2861
2889
|
function getConfig(props$1, defaultProps, showWarning) {
|
|
2862
2890
|
var config = (0, _deepmerge["default"])(defaultProps.config, props$1.config);
|
|
2863
|
-
|
|
2864
|
-
var
|
|
2865
|
-
|
|
2891
|
+
var _iteratorNormalCompletion = true;
|
|
2892
|
+
var _didIteratorError = false;
|
|
2893
|
+
var _iteratorError = undefined;
|
|
2866
2894
|
|
|
2867
2895
|
try {
|
|
2868
|
-
for (_iterator.
|
|
2896
|
+
for (var _iterator = props.DEPRECATED_CONFIG_PROPS[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
2869
2897
|
var p = _step.value;
|
|
2870
2898
|
|
|
2871
2899
|
if (props$1[p]) {
|
|
@@ -2880,9 +2908,18 @@ function getConfig(props$1, defaultProps, showWarning) {
|
|
|
2880
2908
|
}
|
|
2881
2909
|
}
|
|
2882
2910
|
} catch (err) {
|
|
2883
|
-
|
|
2911
|
+
_didIteratorError = true;
|
|
2912
|
+
_iteratorError = err;
|
|
2884
2913
|
} finally {
|
|
2885
|
-
|
|
2914
|
+
try {
|
|
2915
|
+
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
2916
|
+
_iterator["return"]();
|
|
2917
|
+
}
|
|
2918
|
+
} finally {
|
|
2919
|
+
if (_didIteratorError) {
|
|
2920
|
+
throw _iteratorError;
|
|
2921
|
+
}
|
|
2922
|
+
}
|
|
2886
2923
|
}
|
|
2887
2924
|
|
|
2888
2925
|
return config;
|
|
@@ -3029,16 +3066,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
3029
3066
|
|
|
3030
3067
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
3031
3068
|
|
|
3032
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
3033
|
-
|
|
3034
3069
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
3035
3070
|
|
|
3036
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
3037
|
-
|
|
3038
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
3039
|
-
|
|
3040
3071
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
3041
3072
|
|
|
3073
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
3074
|
+
|
|
3042
3075
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
3043
3076
|
|
|
3044
3077
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -3047,12 +3080,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
3047
3080
|
|
|
3048
3081
|
var SEEK_ON_PLAY_EXPIRY = 5000;
|
|
3049
3082
|
|
|
3050
|
-
var Player =
|
|
3083
|
+
var Player =
|
|
3084
|
+
/*#__PURE__*/
|
|
3085
|
+
function (_Component) {
|
|
3051
3086
|
_inherits(Player, _Component);
|
|
3052
3087
|
|
|
3053
|
-
var _super = _createSuper(Player);
|
|
3054
|
-
|
|
3055
3088
|
function Player() {
|
|
3089
|
+
var _getPrototypeOf2;
|
|
3090
|
+
|
|
3056
3091
|
var _this;
|
|
3057
3092
|
|
|
3058
3093
|
_classCallCheck(this, Player);
|
|
@@ -3061,7 +3096,7 @@ var Player = /*#__PURE__*/function (_Component) {
|
|
|
3061
3096
|
_args[_key] = arguments[_key];
|
|
3062
3097
|
}
|
|
3063
3098
|
|
|
3064
|
-
_this =
|
|
3099
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Player)).call.apply(_getPrototypeOf2, [this].concat(_args)));
|
|
3065
3100
|
|
|
3066
3101
|
_defineProperty(_assertThisInitialized(_this), "mounted", false);
|
|
3067
3102
|
|
|
@@ -3386,7 +3421,7 @@ var Player = /*#__PURE__*/function (_Component) {
|
|
|
3386
3421
|
return null;
|
|
3387
3422
|
}
|
|
3388
3423
|
|
|
3389
|
-
return
|
|
3424
|
+
return _react["default"].createElement(Player, _extends({}, this.props, {
|
|
3390
3425
|
ref: this.ref,
|
|
3391
3426
|
onReady: this.handleReady,
|
|
3392
3427
|
onPlay: this.handlePlay,
|
|
@@ -3447,16 +3482,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
3447
3482
|
|
|
3448
3483
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
3449
3484
|
|
|
3450
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
3451
|
-
|
|
3452
3485
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
3453
3486
|
|
|
3454
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
3455
|
-
|
|
3456
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
3457
|
-
|
|
3458
3487
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
3459
3488
|
|
|
3489
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
3490
|
+
|
|
3460
3491
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
3461
3492
|
|
|
3462
3493
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -3468,12 +3499,14 @@ var SUPPORTED_PROPS = Object.keys(props.propTypes);
|
|
|
3468
3499
|
function createSinglePlayer(activePlayer) {
|
|
3469
3500
|
var _class, _temp;
|
|
3470
3501
|
|
|
3471
|
-
return _temp = _class =
|
|
3502
|
+
return _temp = _class =
|
|
3503
|
+
/*#__PURE__*/
|
|
3504
|
+
function (_Component) {
|
|
3472
3505
|
_inherits(SinglePlayer, _Component);
|
|
3473
3506
|
|
|
3474
|
-
var _super = _createSuper(SinglePlayer);
|
|
3475
|
-
|
|
3476
3507
|
function SinglePlayer() {
|
|
3508
|
+
var _getPrototypeOf2;
|
|
3509
|
+
|
|
3477
3510
|
var _this;
|
|
3478
3511
|
|
|
3479
3512
|
_classCallCheck(this, SinglePlayer);
|
|
@@ -3482,7 +3515,7 @@ function createSinglePlayer(activePlayer) {
|
|
|
3482
3515
|
args[_key] = arguments[_key];
|
|
3483
3516
|
}
|
|
3484
3517
|
|
|
3485
|
-
_this =
|
|
3518
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(SinglePlayer)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
3486
3519
|
|
|
3487
3520
|
_defineProperty(_assertThisInitialized(_this), "config", (0, utils.getConfig)(_this.props, props.defaultProps, true));
|
|
3488
3521
|
|
|
@@ -3550,12 +3583,12 @@ function createSinglePlayer(activePlayer) {
|
|
|
3550
3583
|
height = _this$props.height,
|
|
3551
3584
|
Wrapper = _this$props.wrapper;
|
|
3552
3585
|
var otherProps = (0, utils.omit)(this.props, SUPPORTED_PROPS, props.DEPRECATED_CONFIG_PROPS);
|
|
3553
|
-
return
|
|
3586
|
+
return _react["default"].createElement(Wrapper, _extends({
|
|
3554
3587
|
style: _objectSpread({}, style, {
|
|
3555
3588
|
width: width,
|
|
3556
3589
|
height: height
|
|
3557
3590
|
})
|
|
3558
|
-
}, otherProps),
|
|
3591
|
+
}, otherProps), _react["default"].createElement(_Player["default"], _extends({}, this.props, {
|
|
3559
3592
|
ref: this.ref,
|
|
3560
3593
|
activePlayer: activePlayer,
|
|
3561
3594
|
config: this.config
|
|
@@ -3601,31 +3634,23 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
3601
3634
|
|
|
3602
3635
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
3603
3636
|
|
|
3604
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
3605
|
-
|
|
3606
3637
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
3607
3638
|
|
|
3608
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
3609
|
-
|
|
3610
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
3611
|
-
|
|
3612
3639
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
3613
3640
|
|
|
3641
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
3642
|
+
|
|
3614
3643
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
3615
3644
|
|
|
3616
3645
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
3617
3646
|
|
|
3618
3647
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3619
3648
|
|
|
3620
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) ||
|
|
3649
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
3621
3650
|
|
|
3622
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance
|
|
3651
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
|
3623
3652
|
|
|
3624
|
-
function
|
|
3625
|
-
|
|
3626
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
3627
|
-
|
|
3628
|
-
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
3653
|
+
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
3629
3654
|
|
|
3630
3655
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
3631
3656
|
|
|
@@ -3650,12 +3675,14 @@ function parsePlaylist(url) {
|
|
|
3650
3675
|
return {};
|
|
3651
3676
|
}
|
|
3652
3677
|
|
|
3653
|
-
var YouTube =
|
|
3678
|
+
var YouTube =
|
|
3679
|
+
/*#__PURE__*/
|
|
3680
|
+
function (_Component) {
|
|
3654
3681
|
_inherits(YouTube, _Component);
|
|
3655
3682
|
|
|
3656
|
-
var _super = _createSuper(YouTube);
|
|
3657
|
-
|
|
3658
3683
|
function YouTube() {
|
|
3684
|
+
var _getPrototypeOf2;
|
|
3685
|
+
|
|
3659
3686
|
var _this;
|
|
3660
3687
|
|
|
3661
3688
|
_classCallCheck(this, YouTube);
|
|
@@ -3664,7 +3691,7 @@ var YouTube = /*#__PURE__*/function (_Component) {
|
|
|
3664
3691
|
args[_key] = arguments[_key];
|
|
3665
3692
|
}
|
|
3666
3693
|
|
|
3667
|
-
_this =
|
|
3694
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(YouTube)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
3668
3695
|
|
|
3669
3696
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
3670
3697
|
|
|
@@ -3852,9 +3879,9 @@ var YouTube = /*#__PURE__*/function (_Component) {
|
|
|
3852
3879
|
height: '100%',
|
|
3853
3880
|
display: display
|
|
3854
3881
|
};
|
|
3855
|
-
return
|
|
3882
|
+
return _react["default"].createElement("div", {
|
|
3856
3883
|
style: style
|
|
3857
|
-
},
|
|
3884
|
+
}, _react["default"].createElement("div", {
|
|
3858
3885
|
ref: this.ref
|
|
3859
3886
|
}));
|
|
3860
3887
|
}
|
|
@@ -3910,16 +3937,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
3910
3937
|
|
|
3911
3938
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
3912
3939
|
|
|
3913
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
3914
|
-
|
|
3915
3940
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
3916
3941
|
|
|
3917
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
3918
|
-
|
|
3919
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
3920
|
-
|
|
3921
3942
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
3922
3943
|
|
|
3944
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
3945
|
+
|
|
3923
3946
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
3924
3947
|
|
|
3925
3948
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -3928,14 +3951,16 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
3928
3951
|
|
|
3929
3952
|
var SDK_URL = 'https://w.soundcloud.com/player/api.js';
|
|
3930
3953
|
var SDK_GLOBAL = 'SC';
|
|
3931
|
-
var MATCH_URL = /(
|
|
3954
|
+
var MATCH_URL = /(soundcloud\.com|snd\.sc)\/.+$/;
|
|
3932
3955
|
|
|
3933
|
-
var SoundCloud =
|
|
3956
|
+
var SoundCloud =
|
|
3957
|
+
/*#__PURE__*/
|
|
3958
|
+
function (_Component) {
|
|
3934
3959
|
_inherits(SoundCloud, _Component);
|
|
3935
3960
|
|
|
3936
|
-
var _super = _createSuper(SoundCloud);
|
|
3937
|
-
|
|
3938
3961
|
function SoundCloud() {
|
|
3962
|
+
var _getPrototypeOf2;
|
|
3963
|
+
|
|
3939
3964
|
var _this;
|
|
3940
3965
|
|
|
3941
3966
|
_classCallCheck(this, SoundCloud);
|
|
@@ -3944,7 +3969,7 @@ var SoundCloud = /*#__PURE__*/function (_Component) {
|
|
|
3944
3969
|
args[_key] = arguments[_key];
|
|
3945
3970
|
}
|
|
3946
3971
|
|
|
3947
|
-
_this =
|
|
3972
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(SoundCloud)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
3948
3973
|
|
|
3949
3974
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
3950
3975
|
|
|
@@ -4065,7 +4090,7 @@ var SoundCloud = /*#__PURE__*/function (_Component) {
|
|
|
4065
4090
|
height: '100%',
|
|
4066
4091
|
display: display
|
|
4067
4092
|
};
|
|
4068
|
-
return
|
|
4093
|
+
return _react["default"].createElement("iframe", {
|
|
4069
4094
|
ref: this.ref,
|
|
4070
4095
|
src: "https://w.soundcloud.com/player/?url=".concat(encodeURIComponent(this.props.url)),
|
|
4071
4096
|
style: style,
|
|
@@ -4127,16 +4152,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
4127
4152
|
|
|
4128
4153
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
4129
4154
|
|
|
4130
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
4131
|
-
|
|
4132
4155
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
4133
4156
|
|
|
4134
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
4135
|
-
|
|
4136
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
4137
|
-
|
|
4138
4157
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
4139
4158
|
|
|
4159
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
4160
|
+
|
|
4140
4161
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
4141
4162
|
|
|
4142
4163
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -4148,12 +4169,14 @@ var SDK_GLOBAL = 'Vimeo';
|
|
|
4148
4169
|
var MATCH_URL = /vimeo\.com\/.+/;
|
|
4149
4170
|
var MATCH_FILE_URL = /vimeo\.com\/external\/[0-9]+\..+/;
|
|
4150
4171
|
|
|
4151
|
-
var Vimeo =
|
|
4172
|
+
var Vimeo =
|
|
4173
|
+
/*#__PURE__*/
|
|
4174
|
+
function (_Component) {
|
|
4152
4175
|
_inherits(Vimeo, _Component);
|
|
4153
4176
|
|
|
4154
|
-
var _super = _createSuper(Vimeo);
|
|
4155
|
-
|
|
4156
4177
|
function Vimeo() {
|
|
4178
|
+
var _getPrototypeOf2;
|
|
4179
|
+
|
|
4157
4180
|
var _this;
|
|
4158
4181
|
|
|
4159
4182
|
_classCallCheck(this, Vimeo);
|
|
@@ -4162,7 +4185,7 @@ var Vimeo = /*#__PURE__*/function (_Component) {
|
|
|
4162
4185
|
args[_key] = arguments[_key];
|
|
4163
4186
|
}
|
|
4164
4187
|
|
|
4165
|
-
_this =
|
|
4188
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Vimeo)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
4166
4189
|
|
|
4167
4190
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
4168
4191
|
|
|
@@ -4319,7 +4342,7 @@ var Vimeo = /*#__PURE__*/function (_Component) {
|
|
|
4319
4342
|
overflow: 'hidden',
|
|
4320
4343
|
display: display
|
|
4321
4344
|
};
|
|
4322
|
-
return
|
|
4345
|
+
return _react["default"].createElement("div", {
|
|
4323
4346
|
key: this.props.url,
|
|
4324
4347
|
ref: this.ref,
|
|
4325
4348
|
style: style
|
|
@@ -4379,16 +4402,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
4379
4402
|
|
|
4380
4403
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
4381
4404
|
|
|
4382
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
4383
|
-
|
|
4384
4405
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
4385
4406
|
|
|
4386
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
4387
|
-
|
|
4388
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
4389
|
-
|
|
4390
4407
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
4391
4408
|
|
|
4409
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
4410
|
+
|
|
4392
4411
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
4393
4412
|
|
|
4394
4413
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -4401,12 +4420,14 @@ var SDK_GLOBAL_READY = 'fbAsyncInit';
|
|
|
4401
4420
|
var MATCH_URL = /^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/;
|
|
4402
4421
|
var PLAYER_ID_PREFIX = 'facebook-player-';
|
|
4403
4422
|
|
|
4404
|
-
var Facebook =
|
|
4423
|
+
var Facebook =
|
|
4424
|
+
/*#__PURE__*/
|
|
4425
|
+
function (_Component) {
|
|
4405
4426
|
_inherits(Facebook, _Component);
|
|
4406
4427
|
|
|
4407
|
-
var _super = _createSuper(Facebook);
|
|
4408
|
-
|
|
4409
4428
|
function Facebook() {
|
|
4429
|
+
var _getPrototypeOf2;
|
|
4430
|
+
|
|
4410
4431
|
var _this;
|
|
4411
4432
|
|
|
4412
4433
|
_classCallCheck(this, Facebook);
|
|
@@ -4415,7 +4436,7 @@ var Facebook = /*#__PURE__*/function (_Component) {
|
|
|
4415
4436
|
args[_key] = arguments[_key];
|
|
4416
4437
|
}
|
|
4417
4438
|
|
|
4418
|
-
_this =
|
|
4439
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Facebook)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
4419
4440
|
|
|
4420
4441
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
4421
4442
|
|
|
@@ -4531,7 +4552,7 @@ var Facebook = /*#__PURE__*/function (_Component) {
|
|
|
4531
4552
|
width: '100%',
|
|
4532
4553
|
height: '100%'
|
|
4533
4554
|
};
|
|
4534
|
-
return
|
|
4555
|
+
return _react["default"].createElement("div", {
|
|
4535
4556
|
style: style,
|
|
4536
4557
|
id: this.playerID,
|
|
4537
4558
|
className: "fb-video",
|
|
@@ -4591,16 +4612,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
4591
4612
|
|
|
4592
4613
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
4593
4614
|
|
|
4594
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
4595
|
-
|
|
4596
4615
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
4597
4616
|
|
|
4598
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
4599
|
-
|
|
4600
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
4601
|
-
|
|
4602
4617
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
4603
4618
|
|
|
4619
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
4620
|
+
|
|
4604
4621
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
4605
4622
|
|
|
4606
4623
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -4611,12 +4628,14 @@ var SDK_URL = 'https://cdn.embed.ly/player-0.1.0.min.js';
|
|
|
4611
4628
|
var SDK_GLOBAL = 'playerjs';
|
|
4612
4629
|
var MATCH_URL = /streamable\.com\/([a-z0-9]+)$/;
|
|
4613
4630
|
|
|
4614
|
-
var Streamable =
|
|
4631
|
+
var Streamable =
|
|
4632
|
+
/*#__PURE__*/
|
|
4633
|
+
function (_Component) {
|
|
4615
4634
|
_inherits(Streamable, _Component);
|
|
4616
4635
|
|
|
4617
|
-
var _super = _createSuper(Streamable);
|
|
4618
|
-
|
|
4619
4636
|
function Streamable() {
|
|
4637
|
+
var _getPrototypeOf2;
|
|
4638
|
+
|
|
4620
4639
|
var _this;
|
|
4621
4640
|
|
|
4622
4641
|
_classCallCheck(this, Streamable);
|
|
@@ -4625,7 +4644,7 @@ var Streamable = /*#__PURE__*/function (_Component) {
|
|
|
4625
4644
|
args[_key] = arguments[_key];
|
|
4626
4645
|
}
|
|
4627
4646
|
|
|
4628
|
-
_this =
|
|
4647
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Streamable)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
4629
4648
|
|
|
4630
4649
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
4631
4650
|
|
|
@@ -4745,7 +4764,7 @@ var Streamable = /*#__PURE__*/function (_Component) {
|
|
|
4745
4764
|
width: '100%',
|
|
4746
4765
|
height: '100%'
|
|
4747
4766
|
};
|
|
4748
|
-
return
|
|
4767
|
+
return _react["default"].createElement("iframe", {
|
|
4749
4768
|
ref: this.ref,
|
|
4750
4769
|
src: "https://streamable.com/o/".concat(id),
|
|
4751
4770
|
frameBorder: "0",
|
|
@@ -4806,16 +4825,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
4806
4825
|
|
|
4807
4826
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
4808
4827
|
|
|
4809
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
4810
|
-
|
|
4811
4828
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
4812
4829
|
|
|
4813
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
4814
|
-
|
|
4815
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
4816
|
-
|
|
4817
4830
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
4818
4831
|
|
|
4832
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
4833
|
+
|
|
4819
4834
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
4820
4835
|
|
|
4821
4836
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -4826,48 +4841,26 @@ var SDK_URL = 'https://fast.wistia.com/assets/external/E-v1.js';
|
|
|
4826
4841
|
var SDK_GLOBAL = 'Wistia';
|
|
4827
4842
|
var MATCH_URL = /(?:wistia\.com|wi\.st)\/(?:medias|embed)\/(.*)$/;
|
|
4828
4843
|
|
|
4829
|
-
var Wistia =
|
|
4844
|
+
var Wistia =
|
|
4845
|
+
/*#__PURE__*/
|
|
4846
|
+
function (_Component) {
|
|
4830
4847
|
_inherits(Wistia, _Component);
|
|
4831
4848
|
|
|
4832
|
-
var _super = _createSuper(Wistia);
|
|
4833
|
-
|
|
4834
4849
|
function Wistia() {
|
|
4850
|
+
var _getPrototypeOf2;
|
|
4851
|
+
|
|
4835
4852
|
var _this;
|
|
4836
4853
|
|
|
4837
4854
|
_classCallCheck(this, Wistia);
|
|
4838
4855
|
|
|
4839
|
-
for (var _len = arguments.length,
|
|
4840
|
-
|
|
4856
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
4857
|
+
args[_key] = arguments[_key];
|
|
4841
4858
|
}
|
|
4842
4859
|
|
|
4843
|
-
_this =
|
|
4860
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Wistia)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
4844
4861
|
|
|
4845
4862
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
4846
4863
|
|
|
4847
|
-
_defineProperty(_assertThisInitialized(_this), "onPlay", function () {
|
|
4848
|
-
var _this$props;
|
|
4849
|
-
|
|
4850
|
-
return (_this$props = _this.props).onPlay.apply(_this$props, arguments);
|
|
4851
|
-
});
|
|
4852
|
-
|
|
4853
|
-
_defineProperty(_assertThisInitialized(_this), "onPause", function () {
|
|
4854
|
-
var _this$props2;
|
|
4855
|
-
|
|
4856
|
-
return (_this$props2 = _this.props).onPause.apply(_this$props2, arguments);
|
|
4857
|
-
});
|
|
4858
|
-
|
|
4859
|
-
_defineProperty(_assertThisInitialized(_this), "onSeek", function () {
|
|
4860
|
-
var _this$props3;
|
|
4861
|
-
|
|
4862
|
-
return (_this$props3 = _this.props).onSeek.apply(_this$props3, arguments);
|
|
4863
|
-
});
|
|
4864
|
-
|
|
4865
|
-
_defineProperty(_assertThisInitialized(_this), "onEnded", function () {
|
|
4866
|
-
var _this$props4;
|
|
4867
|
-
|
|
4868
|
-
return (_this$props4 = _this.props).onEnded.apply(_this$props4, arguments);
|
|
4869
|
-
});
|
|
4870
|
-
|
|
4871
4864
|
_defineProperty(_assertThisInitialized(_this), "mute", function () {
|
|
4872
4865
|
_this.callPlayer('mute');
|
|
4873
4866
|
});
|
|
@@ -4889,13 +4882,17 @@ var Wistia = /*#__PURE__*/function (_Component) {
|
|
|
4889
4882
|
value: function load(url) {
|
|
4890
4883
|
var _this2 = this;
|
|
4891
4884
|
|
|
4892
|
-
var _this$
|
|
4893
|
-
playing = _this$
|
|
4894
|
-
muted = _this$
|
|
4895
|
-
controls = _this$
|
|
4896
|
-
_onReady = _this$
|
|
4897
|
-
|
|
4898
|
-
|
|
4885
|
+
var _this$props = this.props,
|
|
4886
|
+
playing = _this$props.playing,
|
|
4887
|
+
muted = _this$props.muted,
|
|
4888
|
+
controls = _this$props.controls,
|
|
4889
|
+
_onReady = _this$props.onReady,
|
|
4890
|
+
onPlay = _this$props.onPlay,
|
|
4891
|
+
onPause = _this$props.onPause,
|
|
4892
|
+
onSeek = _this$props.onSeek,
|
|
4893
|
+
onEnded = _this$props.onEnded,
|
|
4894
|
+
config = _this$props.config,
|
|
4895
|
+
onError = _this$props.onError;
|
|
4899
4896
|
(0, utils.getSDK)(SDK_URL, SDK_GLOBAL).then(function () {
|
|
4900
4897
|
window._wq = window._wq || [];
|
|
4901
4898
|
|
|
@@ -4912,28 +4909,19 @@ var Wistia = /*#__PURE__*/function (_Component) {
|
|
|
4912
4909
|
|
|
4913
4910
|
_this2.unbind();
|
|
4914
4911
|
|
|
4915
|
-
_this2.player.bind('play',
|
|
4912
|
+
_this2.player.bind('play', onPlay);
|
|
4916
4913
|
|
|
4917
|
-
_this2.player.bind('pause',
|
|
4914
|
+
_this2.player.bind('pause', onPause);
|
|
4918
4915
|
|
|
4919
|
-
_this2.player.bind('seek',
|
|
4916
|
+
_this2.player.bind('seek', onSeek);
|
|
4920
4917
|
|
|
4921
|
-
_this2.player.bind('end',
|
|
4918
|
+
_this2.player.bind('end', onEnded);
|
|
4922
4919
|
|
|
4923
4920
|
_onReady();
|
|
4924
4921
|
}
|
|
4925
4922
|
});
|
|
4926
4923
|
}, onError);
|
|
4927
4924
|
}
|
|
4928
|
-
}, {
|
|
4929
|
-
key: "unbind",
|
|
4930
|
-
value: function unbind() {
|
|
4931
|
-
this.player.unbind('play', this.onPlay);
|
|
4932
|
-
this.player.unbind('pause', this.onPause);
|
|
4933
|
-
this.player.unbind('seek', this.onSeek);
|
|
4934
|
-
this.player.unbind('end', this.onEnded);
|
|
4935
|
-
} // Proxy methods to prevent listener leaks
|
|
4936
|
-
|
|
4937
4925
|
}, {
|
|
4938
4926
|
key: "play",
|
|
4939
4927
|
value: function play() {
|
|
@@ -4944,6 +4932,19 @@ var Wistia = /*#__PURE__*/function (_Component) {
|
|
|
4944
4932
|
value: function pause() {
|
|
4945
4933
|
this.callPlayer('pause');
|
|
4946
4934
|
}
|
|
4935
|
+
}, {
|
|
4936
|
+
key: "unbind",
|
|
4937
|
+
value: function unbind() {
|
|
4938
|
+
var _this$props2 = this.props,
|
|
4939
|
+
onPlay = _this$props2.onPlay,
|
|
4940
|
+
onPause = _this$props2.onPause,
|
|
4941
|
+
onSeek = _this$props2.onSeek,
|
|
4942
|
+
onEnded = _this$props2.onEnded;
|
|
4943
|
+
this.player.unbind('play', onPlay);
|
|
4944
|
+
this.player.unbind('pause', onPause);
|
|
4945
|
+
this.player.unbind('seek', onSeek);
|
|
4946
|
+
this.player.unbind('end', onEnded);
|
|
4947
|
+
}
|
|
4947
4948
|
}, {
|
|
4948
4949
|
key: "stop",
|
|
4949
4950
|
value: function stop() {
|
|
@@ -4989,7 +4990,7 @@ var Wistia = /*#__PURE__*/function (_Component) {
|
|
|
4989
4990
|
width: '100%',
|
|
4990
4991
|
height: '100%'
|
|
4991
4992
|
};
|
|
4992
|
-
return
|
|
4993
|
+
return _react["default"].createElement("div", {
|
|
4993
4994
|
key: id,
|
|
4994
4995
|
className: className,
|
|
4995
4996
|
style: style
|
|
@@ -5049,16 +5050,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
5049
5050
|
|
|
5050
5051
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
5051
5052
|
|
|
5052
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
5053
|
-
|
|
5054
5053
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
5055
5054
|
|
|
5056
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
5057
|
-
|
|
5058
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
5059
|
-
|
|
5060
5055
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
5061
5056
|
|
|
5057
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
5058
|
+
|
|
5062
5059
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
5063
5060
|
|
|
5064
5061
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -5071,12 +5068,14 @@ var MATCH_VIDEO_URL = /(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/;
|
|
|
5071
5068
|
var MATCH_CHANNEL_URL = /(?:www\.|go\.)?twitch\.tv\/([a-z0-9_]+)($|\?)/;
|
|
5072
5069
|
var PLAYER_ID_PREFIX = 'twitch-player-';
|
|
5073
5070
|
|
|
5074
|
-
var Twitch =
|
|
5071
|
+
var Twitch =
|
|
5072
|
+
/*#__PURE__*/
|
|
5073
|
+
function (_Component) {
|
|
5075
5074
|
_inherits(Twitch, _Component);
|
|
5076
5075
|
|
|
5077
|
-
var _super = _createSuper(Twitch);
|
|
5078
|
-
|
|
5079
5076
|
function Twitch() {
|
|
5077
|
+
var _getPrototypeOf2;
|
|
5078
|
+
|
|
5080
5079
|
var _this;
|
|
5081
5080
|
|
|
5082
5081
|
_classCallCheck(this, Twitch);
|
|
@@ -5085,7 +5084,7 @@ var Twitch = /*#__PURE__*/function (_Component) {
|
|
|
5085
5084
|
args[_key] = arguments[_key];
|
|
5086
5085
|
}
|
|
5087
5086
|
|
|
5088
|
-
_this =
|
|
5087
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Twitch)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
5089
5088
|
|
|
5090
5089
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
5091
5090
|
|
|
@@ -5206,7 +5205,7 @@ var Twitch = /*#__PURE__*/function (_Component) {
|
|
|
5206
5205
|
width: '100%',
|
|
5207
5206
|
height: '100%'
|
|
5208
5207
|
};
|
|
5209
|
-
return
|
|
5208
|
+
return _react["default"].createElement("div", {
|
|
5210
5209
|
style: style,
|
|
5211
5210
|
id: this.playerID
|
|
5212
5211
|
});
|
|
@@ -5259,15 +5258,11 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
5259
5258
|
|
|
5260
5259
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
5261
5260
|
|
|
5262
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) ||
|
|
5263
|
-
|
|
5264
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
5265
|
-
|
|
5266
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
5261
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
5267
5262
|
|
|
5268
|
-
function
|
|
5263
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
|
5269
5264
|
|
|
5270
|
-
function _iterableToArrayLimit(arr, i) { if (
|
|
5265
|
+
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
5271
5266
|
|
|
5272
5267
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
5273
5268
|
|
|
@@ -5277,16 +5272,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
5277
5272
|
|
|
5278
5273
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
5279
5274
|
|
|
5280
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
5281
|
-
|
|
5282
5275
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
5283
5276
|
|
|
5284
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
5285
|
-
|
|
5286
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
5287
|
-
|
|
5288
5277
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
5289
5278
|
|
|
5279
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
5280
|
+
|
|
5290
5281
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
5291
5282
|
|
|
5292
5283
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -5298,12 +5289,14 @@ var SDK_GLOBAL = 'DM';
|
|
|
5298
5289
|
var SDK_GLOBAL_READY = 'dmAsyncInit';
|
|
5299
5290
|
var MATCH_URL = /^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?$/;
|
|
5300
5291
|
|
|
5301
|
-
var DailyMotion =
|
|
5292
|
+
var DailyMotion =
|
|
5293
|
+
/*#__PURE__*/
|
|
5294
|
+
function (_Component) {
|
|
5302
5295
|
_inherits(DailyMotion, _Component);
|
|
5303
5296
|
|
|
5304
|
-
var _super = _createSuper(DailyMotion);
|
|
5305
|
-
|
|
5306
5297
|
function DailyMotion() {
|
|
5298
|
+
var _getPrototypeOf2;
|
|
5299
|
+
|
|
5307
5300
|
var _this;
|
|
5308
5301
|
|
|
5309
5302
|
_classCallCheck(this, DailyMotion);
|
|
@@ -5312,7 +5305,7 @@ var DailyMotion = /*#__PURE__*/function (_Component) {
|
|
|
5312
5305
|
args[_key] = arguments[_key];
|
|
5313
5306
|
}
|
|
5314
5307
|
|
|
5315
|
-
_this =
|
|
5308
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(DailyMotion)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
5316
5309
|
|
|
5317
5310
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
5318
5311
|
|
|
@@ -5441,9 +5434,9 @@ var DailyMotion = /*#__PURE__*/function (_Component) {
|
|
|
5441
5434
|
height: '100%',
|
|
5442
5435
|
display: display
|
|
5443
5436
|
};
|
|
5444
|
-
return
|
|
5437
|
+
return _react["default"].createElement("div", {
|
|
5445
5438
|
style: style
|
|
5446
|
-
},
|
|
5439
|
+
}, _react["default"].createElement("div", {
|
|
5447
5440
|
ref: this.ref
|
|
5448
5441
|
}));
|
|
5449
5442
|
}
|
|
@@ -5501,16 +5494,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
5501
5494
|
|
|
5502
5495
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
5503
5496
|
|
|
5504
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
5505
|
-
|
|
5506
5497
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
5507
5498
|
|
|
5508
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
5509
|
-
|
|
5510
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
5511
|
-
|
|
5512
5499
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
5513
5500
|
|
|
5501
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
5502
|
+
|
|
5514
5503
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
5515
5504
|
|
|
5516
5505
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -5521,12 +5510,14 @@ var SDK_URL = 'https://widget.mixcloud.com/media/js/widgetApi.js';
|
|
|
5521
5510
|
var SDK_GLOBAL = 'Mixcloud';
|
|
5522
5511
|
var MATCH_URL = /mixcloud\.com\/([^/]+\/[^/]+)/;
|
|
5523
5512
|
|
|
5524
|
-
var Mixcloud =
|
|
5513
|
+
var Mixcloud =
|
|
5514
|
+
/*#__PURE__*/
|
|
5515
|
+
function (_Component) {
|
|
5525
5516
|
_inherits(Mixcloud, _Component);
|
|
5526
5517
|
|
|
5527
|
-
var _super = _createSuper(Mixcloud);
|
|
5528
|
-
|
|
5529
5518
|
function Mixcloud() {
|
|
5519
|
+
var _getPrototypeOf2;
|
|
5520
|
+
|
|
5530
5521
|
var _this;
|
|
5531
5522
|
|
|
5532
5523
|
_classCallCheck(this, Mixcloud);
|
|
@@ -5535,7 +5526,7 @@ var Mixcloud = /*#__PURE__*/function (_Component) {
|
|
|
5535
5526
|
args[_key] = arguments[_key];
|
|
5536
5527
|
}
|
|
5537
5528
|
|
|
5538
|
-
_this =
|
|
5529
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Mixcloud)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
5539
5530
|
|
|
5540
5531
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
5541
5532
|
|
|
@@ -5638,7 +5629,7 @@ var Mixcloud = /*#__PURE__*/function (_Component) {
|
|
|
5638
5629
|
})); // We have to give the iframe a key here to prevent a
|
|
5639
5630
|
// weird dialog appearing when loading a new track
|
|
5640
5631
|
|
|
5641
|
-
return
|
|
5632
|
+
return _react["default"].createElement("iframe", {
|
|
5642
5633
|
key: id,
|
|
5643
5634
|
ref: this.ref,
|
|
5644
5635
|
style: style,
|
|
@@ -5698,33 +5689,23 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
5698
5689
|
|
|
5699
5690
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
5700
5691
|
|
|
5701
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
5702
|
-
|
|
5703
5692
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
5704
5693
|
|
|
5705
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
5706
|
-
|
|
5707
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
5708
|
-
|
|
5709
5694
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
5710
5695
|
|
|
5696
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
5697
|
+
|
|
5711
5698
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
5712
5699
|
|
|
5713
5700
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
5714
5701
|
|
|
5715
5702
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5716
5703
|
|
|
5717
|
-
function _createForOfIteratorHelper(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var it, normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
5718
|
-
|
|
5719
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
5720
|
-
|
|
5721
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
5722
|
-
|
|
5723
5704
|
var IOS = typeof navigator !== 'undefined' && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
|
5724
5705
|
var AUDIO_EXTENSIONS = /\.(m4a|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i;
|
|
5725
5706
|
var VIDEO_EXTENSIONS = /\.(mp4|og[gv]|webm|mov|m4v)($|\?)/i;
|
|
5726
5707
|
var HLS_EXTENSIONS = /\.(m3u8)($|\?)/i;
|
|
5727
|
-
var HLS_SDK_URL = 'https://cdn.jsdelivr.net/npm/hls.js@VERSION
|
|
5708
|
+
var HLS_SDK_URL = 'https://cdn.jsdelivr.net/npm/hls.js@VERSION';
|
|
5728
5709
|
var HLS_GLOBAL = 'Hls';
|
|
5729
5710
|
var DASH_EXTENSIONS = /\.(mpd)($|\?)/i;
|
|
5730
5711
|
var DASH_SDK_URL = 'https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js';
|
|
@@ -5733,11 +5714,12 @@ var MATCH_DROPBOX_URL = /www\.dropbox\.com\/.+/;
|
|
|
5733
5714
|
|
|
5734
5715
|
function canPlay(url) {
|
|
5735
5716
|
if (url instanceof Array) {
|
|
5736
|
-
var
|
|
5737
|
-
|
|
5717
|
+
var _iteratorNormalCompletion = true;
|
|
5718
|
+
var _didIteratorError = false;
|
|
5719
|
+
var _iteratorError = undefined;
|
|
5738
5720
|
|
|
5739
5721
|
try {
|
|
5740
|
-
for (_iterator.
|
|
5722
|
+
for (var _iterator = url[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
5741
5723
|
var item = _step.value;
|
|
5742
5724
|
|
|
5743
5725
|
if (typeof item === 'string' && canPlay(item)) {
|
|
@@ -5749,9 +5731,18 @@ function canPlay(url) {
|
|
|
5749
5731
|
}
|
|
5750
5732
|
}
|
|
5751
5733
|
} catch (err) {
|
|
5752
|
-
|
|
5734
|
+
_didIteratorError = true;
|
|
5735
|
+
_iteratorError = err;
|
|
5753
5736
|
} finally {
|
|
5754
|
-
|
|
5737
|
+
try {
|
|
5738
|
+
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
5739
|
+
_iterator["return"]();
|
|
5740
|
+
}
|
|
5741
|
+
} finally {
|
|
5742
|
+
if (_didIteratorError) {
|
|
5743
|
+
throw _iteratorError;
|
|
5744
|
+
}
|
|
5745
|
+
}
|
|
5755
5746
|
}
|
|
5756
5747
|
|
|
5757
5748
|
return false;
|
|
@@ -5775,12 +5766,14 @@ function canEnablePIP(url) {
|
|
|
5775
5766
|
return canPlay(url) && (!!document.pictureInPictureEnabled || supportsWebKitPresentationMode()) && !AUDIO_EXTENSIONS.test(url);
|
|
5776
5767
|
}
|
|
5777
5768
|
|
|
5778
|
-
var FilePlayer =
|
|
5769
|
+
var FilePlayer =
|
|
5770
|
+
/*#__PURE__*/
|
|
5771
|
+
function (_Component) {
|
|
5779
5772
|
_inherits(FilePlayer, _Component);
|
|
5780
5773
|
|
|
5781
|
-
var _super = _createSuper(FilePlayer);
|
|
5782
|
-
|
|
5783
5774
|
function FilePlayer() {
|
|
5775
|
+
var _getPrototypeOf2;
|
|
5776
|
+
|
|
5784
5777
|
var _this;
|
|
5785
5778
|
|
|
5786
5779
|
_classCallCheck(this, FilePlayer);
|
|
@@ -5789,7 +5782,7 @@ var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
|
5789
5782
|
_args[_key] = arguments[_key];
|
|
5790
5783
|
}
|
|
5791
5784
|
|
|
5792
|
-
_this =
|
|
5785
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(FilePlayer)).call.apply(_getPrototypeOf2, [this].concat(_args)));
|
|
5793
5786
|
|
|
5794
5787
|
_defineProperty(_assertThisInitialized(_this), "onReady", function () {
|
|
5795
5788
|
var _this$props;
|
|
@@ -5876,19 +5869,19 @@ var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
|
5876
5869
|
|
|
5877
5870
|
_defineProperty(_assertThisInitialized(_this), "renderSourceElement", function (source, index) {
|
|
5878
5871
|
if (typeof source === 'string') {
|
|
5879
|
-
return
|
|
5872
|
+
return _react["default"].createElement("source", {
|
|
5880
5873
|
key: index,
|
|
5881
5874
|
src: source
|
|
5882
5875
|
});
|
|
5883
5876
|
}
|
|
5884
5877
|
|
|
5885
|
-
return
|
|
5878
|
+
return _react["default"].createElement("source", _extends({
|
|
5886
5879
|
key: index
|
|
5887
5880
|
}, source));
|
|
5888
5881
|
});
|
|
5889
5882
|
|
|
5890
5883
|
_defineProperty(_assertThisInitialized(_this), "renderTrack", function (track, index) {
|
|
5891
|
-
return
|
|
5884
|
+
return _react["default"].createElement("track", _extends({
|
|
5892
5885
|
key: index
|
|
5893
5886
|
}, track));
|
|
5894
5887
|
});
|
|
@@ -5926,10 +5919,6 @@ var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
|
5926
5919
|
key: "componentWillUnmount",
|
|
5927
5920
|
value: function componentWillUnmount() {
|
|
5928
5921
|
this.removeListeners(this.player);
|
|
5929
|
-
|
|
5930
|
-
if (this.hls) {
|
|
5931
|
-
this.hls.destroy();
|
|
5932
|
-
}
|
|
5933
5922
|
}
|
|
5934
5923
|
}, {
|
|
5935
5924
|
key: "addListeners",
|
|
@@ -6060,6 +6049,10 @@ var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
|
6060
6049
|
value: function stop() {
|
|
6061
6050
|
this.player.removeAttribute('src');
|
|
6062
6051
|
|
|
6052
|
+
if (this.hls) {
|
|
6053
|
+
this.hls.destroy();
|
|
6054
|
+
}
|
|
6055
|
+
|
|
6063
6056
|
if (this.dash) {
|
|
6064
6057
|
this.dash.reset();
|
|
6065
6058
|
}
|
|
@@ -6171,7 +6164,7 @@ var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
|
6171
6164
|
width: width === 'auto' ? width : '100%',
|
|
6172
6165
|
height: height === 'auto' ? height : '100%'
|
|
6173
6166
|
};
|
|
6174
|
-
return
|
|
6167
|
+
return _react["default"].createElement(Element, _extends({
|
|
6175
6168
|
ref: this.ref,
|
|
6176
6169
|
src: this.getSource(url),
|
|
6177
6170
|
style: style,
|
|
@@ -6261,16 +6254,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
6261
6254
|
|
|
6262
6255
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
6263
6256
|
|
|
6264
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
6265
|
-
|
|
6266
6257
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
6267
6258
|
|
|
6268
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
6269
|
-
|
|
6270
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
6271
|
-
|
|
6272
6259
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
6273
6260
|
|
|
6261
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
6262
|
+
|
|
6274
6263
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
6275
6264
|
|
|
6276
6265
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -6279,12 +6268,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
6279
6268
|
|
|
6280
6269
|
var ICON_SIZE = '64px';
|
|
6281
6270
|
|
|
6282
|
-
var Preview =
|
|
6271
|
+
var Preview =
|
|
6272
|
+
/*#__PURE__*/
|
|
6273
|
+
function (_Component) {
|
|
6283
6274
|
_inherits(Preview, _Component);
|
|
6284
6275
|
|
|
6285
|
-
var _super = _createSuper(Preview);
|
|
6286
|
-
|
|
6287
6276
|
function Preview() {
|
|
6277
|
+
var _getPrototypeOf2;
|
|
6278
|
+
|
|
6288
6279
|
var _this;
|
|
6289
6280
|
|
|
6290
6281
|
_classCallCheck(this, Preview);
|
|
@@ -6293,7 +6284,7 @@ var Preview = /*#__PURE__*/function (_Component) {
|
|
|
6293
6284
|
args[_key] = arguments[_key];
|
|
6294
6285
|
}
|
|
6295
6286
|
|
|
6296
|
-
_this =
|
|
6287
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Preview)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
6297
6288
|
|
|
6298
6289
|
_defineProperty(_assertThisInitialized(_this), "mounted", false);
|
|
6299
6290
|
|
|
@@ -6391,15 +6382,15 @@ var Preview = /*#__PURE__*/function (_Component) {
|
|
|
6391
6382
|
}
|
|
6392
6383
|
};
|
|
6393
6384
|
|
|
6394
|
-
var defaultPlayIcon =
|
|
6385
|
+
var defaultPlayIcon = _react["default"].createElement("div", {
|
|
6395
6386
|
style: styles.shadow,
|
|
6396
6387
|
className: "react-player__shadow"
|
|
6397
|
-
},
|
|
6388
|
+
}, _react["default"].createElement("div", {
|
|
6398
6389
|
style: styles.playIcon,
|
|
6399
6390
|
className: "react-player__play-icon"
|
|
6400
6391
|
}));
|
|
6401
6392
|
|
|
6402
|
-
return
|
|
6393
|
+
return _react["default"].createElement("div", {
|
|
6403
6394
|
style: styles.preview,
|
|
6404
6395
|
className: "react-player__preview",
|
|
6405
6396
|
onClick: onClick
|
|
@@ -6436,12 +6427,6 @@ var _Player = _interopRequireDefault(Player_1);
|
|
|
6436
6427
|
|
|
6437
6428
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
6438
6429
|
|
|
6439
|
-
function _createForOfIteratorHelper(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var it, normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
6440
|
-
|
|
6441
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6442
|
-
|
|
6443
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
6444
|
-
|
|
6445
6430
|
var PRELOAD_PLAYERS = [{
|
|
6446
6431
|
Player: YouTube_1.YouTube,
|
|
6447
6432
|
configKey: 'youtube',
|
|
@@ -6462,16 +6447,16 @@ var PRELOAD_PLAYERS = [{
|
|
|
6462
6447
|
|
|
6463
6448
|
function renderPreloadPlayers(url, controls, config) {
|
|
6464
6449
|
var players = [];
|
|
6465
|
-
|
|
6466
|
-
var
|
|
6467
|
-
|
|
6450
|
+
var _iteratorNormalCompletion = true;
|
|
6451
|
+
var _didIteratorError = false;
|
|
6452
|
+
var _iteratorError = undefined;
|
|
6468
6453
|
|
|
6469
6454
|
try {
|
|
6470
|
-
for (_iterator.
|
|
6455
|
+
for (var _iterator = PRELOAD_PLAYERS[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
6471
6456
|
var player = _step.value;
|
|
6472
6457
|
|
|
6473
6458
|
if (!player.Player.canPlay(url) && config[player.configKey].preload) {
|
|
6474
|
-
players.push(
|
|
6459
|
+
players.push(_react["default"].createElement(_Player["default"], {
|
|
6475
6460
|
key: player.Player.displayName,
|
|
6476
6461
|
activePlayer: player.Player,
|
|
6477
6462
|
url: player.url,
|
|
@@ -6483,9 +6468,18 @@ function renderPreloadPlayers(url, controls, config) {
|
|
|
6483
6468
|
}
|
|
6484
6469
|
}
|
|
6485
6470
|
} catch (err) {
|
|
6486
|
-
|
|
6471
|
+
_didIteratorError = true;
|
|
6472
|
+
_iteratorError = err;
|
|
6487
6473
|
} finally {
|
|
6488
|
-
|
|
6474
|
+
try {
|
|
6475
|
+
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
6476
|
+
_iterator["return"]();
|
|
6477
|
+
}
|
|
6478
|
+
} finally {
|
|
6479
|
+
if (_didIteratorError) {
|
|
6480
|
+
throw _iteratorError;
|
|
6481
|
+
}
|
|
6482
|
+
}
|
|
6489
6483
|
}
|
|
6490
6484
|
|
|
6491
6485
|
return players;
|
|
@@ -6609,17 +6603,13 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
6609
6603
|
|
|
6610
6604
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
6611
6605
|
|
|
6612
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) ||
|
|
6613
|
-
|
|
6614
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6615
|
-
|
|
6616
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6606
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
|
|
6617
6607
|
|
|
6618
|
-
function
|
|
6608
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
|
|
6619
6609
|
|
|
6620
|
-
function
|
|
6610
|
+
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
|
|
6621
6611
|
|
|
6622
|
-
function
|
|
6612
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
|
|
6623
6613
|
|
|
6624
6614
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
6625
6615
|
|
|
@@ -6627,16 +6617,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
6627
6617
|
|
|
6628
6618
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
6629
6619
|
|
|
6630
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
6631
|
-
|
|
6632
6620
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
6633
6621
|
|
|
6634
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
6635
|
-
|
|
6636
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
6637
|
-
|
|
6638
6622
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
6639
6623
|
|
|
6624
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
6625
|
+
|
|
6640
6626
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
6641
6627
|
|
|
6642
6628
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -6646,12 +6632,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
6646
6632
|
var SUPPORTED_PROPS = Object.keys(props.propTypes);
|
|
6647
6633
|
var customPlayers = [];
|
|
6648
6634
|
|
|
6649
|
-
var ReactPlayer =
|
|
6635
|
+
var ReactPlayer =
|
|
6636
|
+
/*#__PURE__*/
|
|
6637
|
+
function (_Component) {
|
|
6650
6638
|
_inherits(ReactPlayer, _Component);
|
|
6651
6639
|
|
|
6652
|
-
var _super = _createSuper(ReactPlayer);
|
|
6653
|
-
|
|
6654
6640
|
function ReactPlayer() {
|
|
6641
|
+
var _getPrototypeOf2;
|
|
6642
|
+
|
|
6655
6643
|
var _this;
|
|
6656
6644
|
|
|
6657
6645
|
_classCallCheck(this, ReactPlayer);
|
|
@@ -6660,7 +6648,7 @@ var ReactPlayer = /*#__PURE__*/function (_Component) {
|
|
|
6660
6648
|
args[_key] = arguments[_key];
|
|
6661
6649
|
}
|
|
6662
6650
|
|
|
6663
|
-
_this =
|
|
6651
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(ReactPlayer)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
6664
6652
|
|
|
6665
6653
|
_defineProperty(_assertThisInitialized(_this), "config", (0, utils.getConfig)(_this.props, props.defaultProps, true));
|
|
6666
6654
|
|
|
@@ -6771,7 +6759,7 @@ var ReactPlayer = /*#__PURE__*/function (_Component) {
|
|
|
6771
6759
|
key: "renderActivePlayer",
|
|
6772
6760
|
value: function renderActivePlayer(url, activePlayer) {
|
|
6773
6761
|
if (!url) return null;
|
|
6774
|
-
return
|
|
6762
|
+
return _react["default"].createElement(_Player4["default"], _extends({}, this.props, {
|
|
6775
6763
|
key: activePlayer.displayName,
|
|
6776
6764
|
ref: this.activePlayerRef,
|
|
6777
6765
|
config: this.config,
|
|
@@ -6808,14 +6796,14 @@ var ReactPlayer = /*#__PURE__*/function (_Component) {
|
|
|
6808
6796
|
var preloadPlayers = (0, _preload["default"])(url, controls, this.config);
|
|
6809
6797
|
var players = [renderedActivePlayer].concat(_toConsumableArray(preloadPlayers)).sort(this.sortPlayers);
|
|
6810
6798
|
|
|
6811
|
-
var preview =
|
|
6799
|
+
var preview = _react["default"].createElement(_Preview["default"], {
|
|
6812
6800
|
url: url,
|
|
6813
6801
|
light: light,
|
|
6814
6802
|
playIcon: playIcon,
|
|
6815
6803
|
onClick: this.handleClickPreview
|
|
6816
6804
|
});
|
|
6817
6805
|
|
|
6818
|
-
return
|
|
6806
|
+
return _react["default"].createElement(Wrapper, _extends({
|
|
6819
6807
|
ref: this.wrapperRef,
|
|
6820
6808
|
style: _objectSpread({}, style, {
|
|
6821
6809
|
width: width,
|
|
@@ -7062,6 +7050,7 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
7062
7050
|
var today = moment().utc().format();
|
|
7063
7051
|
|
|
7064
7052
|
var Videos = nodes.videos.filter(function (video) {
|
|
7053
|
+
console.dir(video);
|
|
7065
7054
|
if ((video.is_visible === true || !video.hasOwnProperty('is_visible')) && (today >= video.published || !video.hasOwnProperty('published'))) {
|
|
7066
7055
|
return video;
|
|
7067
7056
|
}
|
|
@@ -7380,7 +7369,7 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
7380
7369
|
Videos[series - 1].intro
|
|
7381
7370
|
)
|
|
7382
7371
|
),
|
|
7383
|
-
Videos[series - 1] && Videos[series - 1].text && React__default.createElement(BlockContent, _extends({ serializers: getSerializers, blocks: Videos[series - 1].text, imageOptions: { w: 320, h: 240, fit: 'max' } }, client.config()))
|
|
7372
|
+
Videos[series - 1] && Videos[series - 1].text && React__default.createElement(BlockContent, _extends$1({ serializers: getSerializers, blocks: Videos[series - 1].text, imageOptions: { w: 320, h: 240, fit: 'max' } }, client.config()))
|
|
7384
7373
|
),
|
|
7385
7374
|
React__default.createElement(
|
|
7386
7375
|
'style',
|
|
@@ -7508,7 +7497,7 @@ var Poll = function Poll(_ref) {
|
|
|
7508
7497
|
);
|
|
7509
7498
|
};
|
|
7510
7499
|
|
|
7511
|
-
var numberOfPaginations =
|
|
7500
|
+
var numberOfPaginations = main_35 ? 4 : 10;
|
|
7512
7501
|
|
|
7513
7502
|
var Quiz = function Quiz(_ref) {
|
|
7514
7503
|
var quizzes = _ref.quizzes,
|
|
@@ -7621,7 +7610,7 @@ var Quiz = function Quiz(_ref) {
|
|
|
7621
7610
|
var renderPagination = function renderPagination() {
|
|
7622
7611
|
return React__default.createElement(
|
|
7623
7612
|
Pagination,
|
|
7624
|
-
{ className: 'p-0 m-0', size:
|
|
7613
|
+
{ className: 'p-0 m-0', size: main_35 && 'sm' },
|
|
7625
7614
|
React__default.createElement(Pagination.First, { onClick: function onClick() {
|
|
7626
7615
|
return changePage('first');
|
|
7627
7616
|
}, disabled: currentPage === 1 }),
|
|
@@ -7854,7 +7843,7 @@ var MultiMedia = function MultiMedia(props) {
|
|
|
7854
7843
|
{ xs: 12, md: 12 / medias.length, key: media._key },
|
|
7855
7844
|
React__default.createElement(
|
|
7856
7845
|
'a',
|
|
7857
|
-
_extends({}, media.upload_doc && media.upload_doc.asset && { href: media.upload_doc.asset.url, target: media.blank ? '_blank' : '_self' }, {
|
|
7846
|
+
_extends$1({}, media.upload_doc && media.upload_doc.asset && { href: media.upload_doc.asset.url, target: media.blank ? '_blank' : '_self' }, {
|
|
7858
7847
|
style: { cursor: media.upload_doc && media.upload_doc.asset && media.upload_doc.asset.url ? 'pointer' : 'default' } }),
|
|
7859
7848
|
React__default.createElement(
|
|
7860
7849
|
'div',
|
|
@@ -8045,12 +8034,65 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8045
8034
|
var articleContainerRef = useRef(null);
|
|
8046
8035
|
var arrowRef = useRef(null);
|
|
8047
8036
|
|
|
8048
|
-
var
|
|
8037
|
+
var _ref2 = router && router.asPath && router.asPath.split('?')[1] ? useState(router.asPath.split('=')[1]) : useState(null),
|
|
8038
|
+
_ref3 = _slicedToArray(_ref2, 2),
|
|
8039
|
+
selectedArticle = _ref3[0],
|
|
8040
|
+
setSelectedArticle = _ref3[1];
|
|
8041
|
+
|
|
8042
|
+
var _useState = useState(false),
|
|
8049
8043
|
_useState2 = _slicedToArray(_useState, 2),
|
|
8050
|
-
|
|
8051
|
-
|
|
8044
|
+
firstLoad = _useState2[0],
|
|
8045
|
+
setFirstLoad = _useState2[1];
|
|
8046
|
+
|
|
8047
|
+
var _useState3 = useState(null),
|
|
8048
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
8049
|
+
currentURL = _useState4[0],
|
|
8050
|
+
setCurrentURL = _useState4[1];
|
|
8051
|
+
|
|
8052
|
+
var _useState5 = useState(null),
|
|
8053
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
8054
|
+
currentTitle = _useState6[0],
|
|
8055
|
+
setCurrentTitle = _useState6[1];
|
|
8056
|
+
|
|
8057
|
+
var _useState7 = useState(null),
|
|
8058
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
8059
|
+
currentSummary = _useState8[0],
|
|
8060
|
+
setCurrentSummary = _useState8[1];
|
|
8052
8061
|
|
|
8053
|
-
var
|
|
8062
|
+
var _useState9 = useState(null),
|
|
8063
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
8064
|
+
currentThumbnail = _useState10[0],
|
|
8065
|
+
setCurrentThumbnail = _useState10[1];
|
|
8066
|
+
|
|
8067
|
+
var _useState11 = useState(null),
|
|
8068
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
8069
|
+
sensorVisible = _useState12[0],
|
|
8070
|
+
setSensorVisible = _useState12[1];
|
|
8071
|
+
|
|
8072
|
+
var _useState13 = useState(0),
|
|
8073
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
8074
|
+
contentWidth = _useState14[0],
|
|
8075
|
+
setContentWidth = _useState14[1];
|
|
8076
|
+
|
|
8077
|
+
var _useState15 = useState(false),
|
|
8078
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
8079
|
+
upArrowClicked = _useState16[0],
|
|
8080
|
+
setUpArrowClicked = _useState16[1];
|
|
8081
|
+
|
|
8082
|
+
var _useState17 = useState(null),
|
|
8083
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
8084
|
+
articleScrollHeight = _useState18[0],
|
|
8085
|
+
setArticleScrollHeight = _useState18[1];
|
|
8086
|
+
|
|
8087
|
+
var _useState19 = useState(false),
|
|
8088
|
+
_useState20 = _slicedToArray(_useState19, 2),
|
|
8089
|
+
articleClicked = _useState20[0],
|
|
8090
|
+
setArticleClicked = _useState20[1];
|
|
8091
|
+
|
|
8092
|
+
var _useState21 = useState(null),
|
|
8093
|
+
_useState22 = _slicedToArray(_useState21, 2),
|
|
8094
|
+
articleIndex = _useState22[0],
|
|
8095
|
+
setArticleIndex = _useState22[1];
|
|
8054
8096
|
|
|
8055
8097
|
var Articles = nodes.articles.filter(function (article) {
|
|
8056
8098
|
if ((article.is_visible === true || !article.hasOwnProperty('is_visible')) && today >= article.published) {
|
|
@@ -8083,7 +8125,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8083
8125
|
'a',
|
|
8084
8126
|
{ onClick: function onClick(e) {
|
|
8085
8127
|
return articleCardClickHandler(e);
|
|
8086
|
-
}, 'data-articleid': '' + article.param.current },
|
|
8128
|
+
}, 'data-cardlabel': '' + articleLabel, 'data-articleIndex': '' + index, 'data-articleid': '' + article.param.current },
|
|
8087
8129
|
React__default.createElement(
|
|
8088
8130
|
'div',
|
|
8089
8131
|
{ className: 'prevNext-thumbnail' },
|
|
@@ -8113,43 +8155,17 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8113
8155
|
});
|
|
8114
8156
|
};
|
|
8115
8157
|
|
|
8116
|
-
var _ref2 = router && router.asPath && router.asPath.split('?')[1] ? useState(router.asPath.split('=')[1]) : useState(null),
|
|
8117
|
-
_ref3 = _slicedToArray(_ref2, 2),
|
|
8118
|
-
selectedArticle = _ref3[0],
|
|
8119
|
-
setSelectedArticle = _ref3[1];
|
|
8120
|
-
|
|
8121
|
-
var _useState3 = useState(false),
|
|
8122
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
8123
|
-
firstLoad = _useState4[0],
|
|
8124
|
-
setFirstLoad = _useState4[1];
|
|
8125
|
-
|
|
8126
|
-
var _useState5 = useState(null),
|
|
8127
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
8128
|
-
currentURL = _useState6[0],
|
|
8129
|
-
setCurrentURL = _useState6[1];
|
|
8130
|
-
|
|
8131
|
-
var _useState7 = useState(null),
|
|
8132
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
8133
|
-
currentTitle = _useState8[0],
|
|
8134
|
-
setCurrentTitle = _useState8[1];
|
|
8135
|
-
|
|
8136
|
-
var _useState9 = useState(null),
|
|
8137
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
8138
|
-
currentSummary = _useState10[0],
|
|
8139
|
-
setCurrentSummary = _useState10[1];
|
|
8140
|
-
|
|
8141
|
-
var _useState11 = useState(null),
|
|
8142
|
-
_useState12 = _slicedToArray(_useState11, 2),
|
|
8143
|
-
currentThumbnail = _useState12[0],
|
|
8144
|
-
setCurrentThumbnail = _useState12[1];
|
|
8145
|
-
|
|
8146
8158
|
var articleCardClickHandler = function articleCardClickHandler(e) {
|
|
8147
8159
|
e.preventDefault();
|
|
8148
8160
|
var articleClicked = e.currentTarget.dataset.articleid;
|
|
8161
|
+
setArticleClicked(true);
|
|
8162
|
+
setArticleIndex(e.currentTarget.dataset.articleindex);
|
|
8163
|
+
setSensorVisible(false);
|
|
8149
8164
|
setSelectedArticle(articleClicked);
|
|
8150
|
-
scrollToArticle(articleClicked);
|
|
8165
|
+
scrollToArticle(articleClicked, e.currentTarget.dataset.cardlabel);
|
|
8166
|
+
arrowRef.current.style.visibility = 'hidden';
|
|
8151
8167
|
};
|
|
8152
|
-
var scrollToArticle = function scrollToArticle(id) {
|
|
8168
|
+
var scrollToArticle = function scrollToArticle(id, cardLabel) {
|
|
8153
8169
|
var localArticleID = id ? id : selectedArticle;
|
|
8154
8170
|
var findArticle = function findArticle(ref) {
|
|
8155
8171
|
if (ref) {
|
|
@@ -8157,13 +8173,18 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8157
8173
|
}
|
|
8158
8174
|
return false;
|
|
8159
8175
|
};
|
|
8176
|
+
console.log('cardLabel', cardLabel);
|
|
8177
|
+
var isNextPrev = cardLabel === 'Next' || 'Previous' ? true : false;
|
|
8178
|
+
console.log(isNextPrev);
|
|
8160
8179
|
var indexOfRef = refArray.current.findIndex(findArticle);
|
|
8161
|
-
|
|
8162
8180
|
if (indexOfRef >= 0) {
|
|
8163
8181
|
var newOffsetTop = !firstLoad ? refArray.current[indexOfRef].wraperRef.current.offsetTop : refArray.current[indexOfRef].wraperRef.current.offsetTop + document.getElementsByTagName('header')[0].clientHeight;
|
|
8164
8182
|
// console.dir(refArray.current[indexOfRef].wraperRef.current)
|
|
8165
8183
|
// console.log(document.getElementsByTagName('header')[0].clientHeight)
|
|
8166
8184
|
// console.log(refArray.current[indexOfRef].wraperRef.current.offsetTop)
|
|
8185
|
+
|
|
8186
|
+
setArticleScrollHeight(newOffsetTop);
|
|
8187
|
+
|
|
8167
8188
|
window.scrollTo({ top: newOffsetTop, behavior: 'smooth' });
|
|
8168
8189
|
//refArray.current[indexOfRef].wraperRef.current.scrollIntoView({ behavior: 'smooth', block: 'start' })
|
|
8169
8190
|
}
|
|
@@ -8172,10 +8193,16 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8172
8193
|
|
|
8173
8194
|
var renderAuthorBiography = function renderAuthorBiography(biography) {
|
|
8174
8195
|
if (biography) {
|
|
8175
|
-
return React__default.createElement(BlockContent, _extends({ serializers: getSerializers, blocks: [biography] }, client.config()));
|
|
8196
|
+
return React__default.createElement(BlockContent, _extends$1({ serializers: getSerializers, blocks: [biography] }, client.config()));
|
|
8176
8197
|
}
|
|
8177
8198
|
};
|
|
8178
8199
|
|
|
8200
|
+
useEffect(function () {
|
|
8201
|
+
if (articleClicked === true) {
|
|
8202
|
+
onChangeArticle(Articles[articleIndex].param.current, 'top', Articles[articleIndex].title, Articles[articleIndex].summary, urlFor(Articles[articleIndex].thumbnail.asset).url());
|
|
8203
|
+
}
|
|
8204
|
+
}, [articleClicked]);
|
|
8205
|
+
|
|
8179
8206
|
var onChangeArticle = function onChangeArticle(path, visibility, title, summary, shareImage) {
|
|
8180
8207
|
var currentPath = window && window.location && window.location.pathname ? window.location.pathname.replace('?seriesArticle=', '') : '';
|
|
8181
8208
|
var newPath = (router && router.asPath && router.asPath.split('?')[0]) + '?seriesArticle=' + path;
|
|
@@ -8215,7 +8242,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8215
8242
|
var window = e.currentTarget;
|
|
8216
8243
|
if (preVscroll > window.scrollY) {
|
|
8217
8244
|
isScrollDown = false;
|
|
8218
|
-
if (window.scrollY > articleContainerRef.current.offsetTop && preVscroll !== 0 &&
|
|
8245
|
+
if (window.scrollY > articleContainerRef.current.offsetTop && preVscroll !== 0 && upArrowClicked === false && articleClicked === false) {
|
|
8219
8246
|
arrowRef.current.style.visibility = 'visible';
|
|
8220
8247
|
}
|
|
8221
8248
|
} else if (preVscroll < window.scrollY) {
|
|
@@ -8229,8 +8256,15 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8229
8256
|
if (preVscroll <= articleContainerRef.current.offsetTop) {
|
|
8230
8257
|
arrowRef.current.style.visibility = 'hidden';
|
|
8231
8258
|
}
|
|
8259
|
+
if (window.scrollY >= articleScrollHeight && articleClicked === true) {
|
|
8260
|
+
setArticleClicked(false);
|
|
8261
|
+
setSensorVisible(true);
|
|
8262
|
+
setUpArrowClicked(false);
|
|
8263
|
+
}
|
|
8232
8264
|
if (window.scrollY === 0 && upArrowClicked === true) {
|
|
8233
|
-
|
|
8265
|
+
setUpArrowClicked(false);
|
|
8266
|
+
setSensorVisible(true);
|
|
8267
|
+
setArticleClicked(false);
|
|
8234
8268
|
}
|
|
8235
8269
|
};
|
|
8236
8270
|
|
|
@@ -8244,7 +8278,8 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8244
8278
|
useLayoutEffect(function () {
|
|
8245
8279
|
//console.log('useLayoutEffect')
|
|
8246
8280
|
if (!firstLoad) {
|
|
8247
|
-
|
|
8281
|
+
setUpArrowClicked(false);
|
|
8282
|
+
if (main_36) {
|
|
8248
8283
|
grabLoadedAds();
|
|
8249
8284
|
} else {
|
|
8250
8285
|
scrollToArticle();
|
|
@@ -8268,7 +8303,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8268
8303
|
//let targeting = getTargeting({ article: activeArticle, cpModificationRequired, position: props.position, prevUrl })
|
|
8269
8304
|
if (pageview) pageview(path);
|
|
8270
8305
|
|
|
8271
|
-
if (!
|
|
8306
|
+
if (!main_36) {
|
|
8272
8307
|
lib_3.getGoogletag().then(function (googletag) {
|
|
8273
8308
|
if (window.googletag && googletag.pubadsReady) {
|
|
8274
8309
|
lib_3.refresh();
|
|
@@ -8276,7 +8311,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8276
8311
|
});
|
|
8277
8312
|
}
|
|
8278
8313
|
//Refresh leaderboard ad on mobile
|
|
8279
|
-
if (
|
|
8314
|
+
if (main_36) {
|
|
8280
8315
|
var leaderboardSlotId = '';
|
|
8281
8316
|
lib_3.getGoogletag().then(function (googletag) {
|
|
8282
8317
|
if (window.googletag && googletag.pubadsReady) {
|
|
@@ -8286,26 +8321,34 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8286
8321
|
}
|
|
8287
8322
|
};
|
|
8288
8323
|
|
|
8289
|
-
|
|
8290
|
-
|
|
8291
|
-
|
|
8292
|
-
|
|
8293
|
-
|
|
8294
|
-
|
|
8295
|
-
|
|
8296
|
-
|
|
8297
|
-
|
|
8324
|
+
useEffect(function () {
|
|
8325
|
+
console.log('sensorVisible Effect');
|
|
8326
|
+
if (sensorVisible === false && articleClicked === false) {
|
|
8327
|
+
var newPath = router.asPath.split('?')[0];
|
|
8328
|
+
var title = nodes.seriesTitle;
|
|
8329
|
+
isScrollDown = true;
|
|
8330
|
+
setUpArrowClicked(true);
|
|
8331
|
+
arrowRef.current.style.visibility = 'hidden';
|
|
8332
|
+
window.scrollTo({ top: 0, behavior: 'smooth' });
|
|
8333
|
+
window.history.pushState({}, '', newPath);
|
|
8334
|
+
document.title = title;
|
|
8298
8335
|
|
|
8299
|
-
|
|
8300
|
-
|
|
8301
|
-
|
|
8302
|
-
|
|
8303
|
-
|
|
8304
|
-
|
|
8305
|
-
|
|
8306
|
-
|
|
8336
|
+
setCurrentURL(newPath);
|
|
8337
|
+
setCurrentTitle(title);
|
|
8338
|
+
if (rootArticle) {
|
|
8339
|
+
setCurrentSummary(rootArticle.summary ? rootArticle.summary : '');
|
|
8340
|
+
setCurrentThumbnail(urlFor(rootArticle.thumbnail.asset).url());
|
|
8341
|
+
} else {
|
|
8342
|
+
setCurrentSummary('');
|
|
8343
|
+
setCurrentThumbnail('');
|
|
8344
|
+
}
|
|
8345
|
+
refreshAD(newPath);
|
|
8307
8346
|
}
|
|
8308
|
-
|
|
8347
|
+
}, [sensorVisible]);
|
|
8348
|
+
|
|
8349
|
+
var handleArrowClick = function handleArrowClick() {
|
|
8350
|
+
console.log('handleArrowClick');
|
|
8351
|
+
setSensorVisible(false);
|
|
8309
8352
|
};
|
|
8310
8353
|
|
|
8311
8354
|
return React__default.createElement(
|
|
@@ -8337,7 +8380,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8337
8380
|
React__default.createElement(
|
|
8338
8381
|
'div',
|
|
8339
8382
|
{ className: 'ad-box', style: { textAlign: 'center' } },
|
|
8340
|
-
|
|
8383
|
+
main_36 && Ads.map(function (ad, index) {
|
|
8341
8384
|
if (index === 0) {
|
|
8342
8385
|
return React__default.createElement(
|
|
8343
8386
|
'div',
|
|
@@ -8369,6 +8412,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8369
8412
|
React__default.createElement(
|
|
8370
8413
|
InscreenSensor,
|
|
8371
8414
|
{
|
|
8415
|
+
visible: sensorVisible,
|
|
8372
8416
|
offSetTop: 120,
|
|
8373
8417
|
className: 'inscreen-wrapper',
|
|
8374
8418
|
key: '' + article.param.current,
|
|
@@ -8377,7 +8421,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8377
8421
|
return refArray.current[index] = ele;
|
|
8378
8422
|
},
|
|
8379
8423
|
onChange: function onChange(visible) {
|
|
8380
|
-
if (
|
|
8424
|
+
if (upArrowClicked === false && articleClicked === false) {
|
|
8381
8425
|
if (visible === 'top' || visible === 'bottom' || visible === 'small-top') {
|
|
8382
8426
|
onChangeArticle(article.param.current, visible, article.title, article.summary, urlFor(article.thumbnail.asset).url());
|
|
8383
8427
|
}
|
|
@@ -8427,7 +8471,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8427
8471
|
React__default.createElement(
|
|
8428
8472
|
'div',
|
|
8429
8473
|
{ className: 'mt-2 mb-2' },
|
|
8430
|
-
React__default.createElement(BlockContent, _extends({
|
|
8474
|
+
React__default.createElement(BlockContent, _extends$1({
|
|
8431
8475
|
serializers: getSerializers,
|
|
8432
8476
|
videoAccountIDs: accountIDs,
|
|
8433
8477
|
blocks: article.text,
|
|
@@ -8458,7 +8502,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8458
8502
|
React__default.createElement(
|
|
8459
8503
|
'div',
|
|
8460
8504
|
{ className: 'ad-box', style: { textAlign: 'center' } },
|
|
8461
|
-
|
|
8505
|
+
main_36 && Articles.length - 1 !== index && Ads.map(function (ad, innerIndex) {
|
|
8462
8506
|
if (innerIndex === 0) {
|
|
8463
8507
|
return React__default.createElement(
|
|
8464
8508
|
'div',
|
|
@@ -8741,7 +8785,7 @@ var MultiFigure = function MultiFigure(props) {
|
|
|
8741
8785
|
{ xs: 12, md: 12 / images.length, key: index },
|
|
8742
8786
|
image.link ? React__default.createElement(
|
|
8743
8787
|
'a',
|
|
8744
|
-
_extends({}, image.link && { href: image.link, target: image.blank ? '_blank' : '_self' }, { style: { cursor: image.link ? 'pointer' : 'default' } }),
|
|
8788
|
+
_extends$1({}, image.link && { href: image.link, target: image.blank ? '_blank' : '_self' }, { style: { cursor: image.link ? 'pointer' : 'default' } }),
|
|
8745
8789
|
React__default.createElement(
|
|
8746
8790
|
'div',
|
|
8747
8791
|
{ className: 'multi-figure-image-container' },
|