@mjhls/mjh-framework 1.0.534 → 1.0.536
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 +172 -172
- 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 +5 -5
- package/dist/cjs/ADGutter.js +2 -2
- package/dist/cjs/ADSponsoredResources.js +2 -2
- package/dist/cjs/ADWebcast.js +2 -2
- package/dist/cjs/ADWelcome.js +2 -2
- package/dist/cjs/AdSlot.js +2 -2
- package/dist/cjs/AdSlotsProvider.js +1 -1
- package/dist/cjs/ArticleQueue.js +10 -11
- package/dist/cjs/Auth.js +301 -250
- package/dist/cjs/{BlockContent-77f81ffc.js → BlockContent-f942392e.js} +1 -1
- package/dist/cjs/CMEDeck.js +5 -5
- package/dist/cjs/Column3.js +4 -4
- package/dist/cjs/ConferenceArticleCard.js +17 -17
- package/dist/cjs/DeckContent.js +15 -15
- package/dist/cjs/DeckQueue.js +6 -6
- package/dist/cjs/{Dfp-fcdeabc4.js → Dfp-fbe32b96.js} +1 -1
- package/dist/cjs/EventsDeck.js +22 -22
- package/dist/cjs/ExternalResources.js +6 -7
- package/dist/cjs/Feature.js +3 -3
- package/dist/cjs/ForbesHero.js +2 -2
- package/dist/cjs/GridContent.js +10 -10
- package/dist/cjs/GridHero.js +2 -2
- package/dist/cjs/GroupDeck.js +5 -5
- package/dist/cjs/HamMagazine.js +11 -11
- 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 +36 -36
- package/dist/cjs/KMTracker.js +15 -15
- package/dist/cjs/LeftNav.js +2 -2
- package/dist/cjs/MasterDeck.js +24 -27
- package/dist/cjs/NavMagazine.js +12 -12
- package/dist/cjs/NavNative.js +11 -11
- package/dist/cjs/OncliveHero.js +2 -2
- package/dist/cjs/OncliveLargeHero.js +2 -2
- package/dist/cjs/PartnerDetailListing.js +14 -1211
- package/dist/cjs/PublicationDeck.js +1 -1
- package/dist/cjs/PublicationLanding.js +33 -33
- package/dist/cjs/QueueDeckExpanded.js +9 -9
- package/dist/cjs/RelatedContent.js +30 -30
- package/dist/cjs/RelatedTopicsDropdown.js +10 -10
- package/dist/cjs/SideFooter.js +2 -2
- package/dist/cjs/TaxonomyCard.js +2 -2
- package/dist/cjs/TemplateNormal.js +2 -2
- package/dist/cjs/ThumbnailCard.js +1 -1
- package/dist/cjs/Ustream.js +2 -2
- package/dist/cjs/VerticalHero.js +2 -2
- package/dist/cjs/VideoSeriesFilter.js +1 -1
- package/dist/cjs/VideoSeriesListing.js +4 -4
- package/dist/cjs/View.js +38 -39
- package/dist/cjs/YahooHero.js +2 -2
- package/dist/cjs/YoutubeGroup.js +5 -5
- package/dist/cjs/getQuery.js +1 -1
- package/dist/cjs/getRelatedArticle.js +1 -1
- package/dist/cjs/getSerializers.js +589 -443
- package/dist/cjs/{getTargeting-3d208b98.js → getTargeting-b15993cb.js} +11 -11
- package/dist/cjs/getTargeting.js +1 -1
- package/dist/cjs/{index-3294d3bc.js → index-5be2866f.js} +1 -1
- package/dist/cjs/{index-be0c82be.js → index-b5eb3ff8.js} +20 -19
- package/dist/cjs/{index-fa3cec70.js → index-f7ee1612.js} +4 -6
- package/dist/cjs/{index.es-9110add6.js → index.es-ab3f2690.js} +3 -1
- package/dist/cjs/index.js +11 -11
- package/dist/cjs/{main-88348b15.js → main-bc4db521.js} +66 -35
- package/dist/cjs/{moment-575fe24c.js → moment-66a6a284.js} +1 -1
- package/dist/cjs/urlFor.js +2 -2
- 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 +5 -5
- package/dist/esm/ADGutter.js +2 -2
- package/dist/esm/ADSponsoredResources.js +2 -2
- package/dist/esm/ADWebcast.js +2 -2
- package/dist/esm/ADWelcome.js +2 -2
- package/dist/esm/AdSlot.js +2 -2
- package/dist/esm/AdSlotsProvider.js +1 -1
- package/dist/esm/ArticleQueue.js +10 -11
- package/dist/esm/Auth.js +298 -247
- package/dist/esm/{BlockContent-e9b4ddcf.js → BlockContent-a614acdf.js} +1 -1
- package/dist/esm/CMEDeck.js +5 -5
- package/dist/esm/Column3.js +4 -4
- package/dist/esm/ConferenceArticleCard.js +17 -17
- package/dist/esm/DeckContent.js +15 -15
- package/dist/esm/DeckQueue.js +6 -6
- package/dist/esm/{Dfp-81a052c2.js → Dfp-ae9336e2.js} +1 -1
- package/dist/esm/EventsDeck.js +22 -22
- package/dist/esm/ExternalResources.js +6 -7
- package/dist/esm/Feature.js +3 -3
- package/dist/esm/ForbesHero.js +2 -2
- package/dist/esm/GridContent.js +10 -10
- package/dist/esm/GridHero.js +2 -2
- package/dist/esm/GroupDeck.js +5 -5
- package/dist/esm/HamMagazine.js +11 -11
- 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 +36 -36
- package/dist/esm/KMTracker.js +15 -15
- package/dist/esm/LeftNav.js +2 -2
- package/dist/esm/MasterDeck.js +24 -27
- package/dist/esm/NavMagazine.js +12 -12
- package/dist/esm/NavNative.js +11 -11
- package/dist/esm/OncliveHero.js +2 -2
- package/dist/esm/OncliveLargeHero.js +2 -2
- package/dist/esm/PartnerDetailListing.js +12 -1209
- package/dist/esm/PublicationDeck.js +1 -1
- package/dist/esm/PublicationLanding.js +33 -33
- package/dist/esm/QueueDeckExpanded.js +9 -9
- package/dist/esm/RelatedContent.js +30 -30
- package/dist/esm/RelatedTopicsDropdown.js +10 -10
- package/dist/esm/SideFooter.js +2 -2
- package/dist/esm/TaxonomyCard.js +2 -2
- package/dist/esm/TemplateNormal.js +2 -2
- package/dist/esm/ThumbnailCard.js +1 -1
- package/dist/esm/Ustream.js +2 -2
- package/dist/esm/VerticalHero.js +2 -2
- package/dist/esm/VideoSeriesFilter.js +1 -1
- package/dist/esm/VideoSeriesListing.js +4 -4
- package/dist/esm/View.js +13 -14
- package/dist/esm/YahooHero.js +2 -2
- package/dist/esm/YoutubeGroup.js +5 -5
- package/dist/esm/getQuery.js +1 -1
- package/dist/esm/getRelatedArticle.js +1 -1
- package/dist/esm/getSerializers.js +589 -443
- package/dist/esm/{getTargeting-1f2c61e3.js → getTargeting-1a0bd08d.js} +9 -9
- package/dist/esm/getTargeting.js +1 -1
- package/dist/esm/{index-73819142.js → index-51a80699.js} +20 -19
- package/dist/esm/{index-3f4dd6f2.js → index-93ec3c59.js} +4 -6
- package/dist/esm/{index-ef6d5dcf.js → index-d2f90501.js} +1 -1
- package/dist/esm/{index.es-29c1cef5.js → index.es-938a3a58.js} +3 -1
- package/dist/esm/index.js +11 -11
- package/dist/esm/{main-d7ee6151.js → main-7255814e.js} +65 -34
- package/dist/esm/{moment-e2f9b20c.js → moment-12415288.js} +1 -1
- package/dist/esm/urlFor.js +2 -2
- package/package.json +107 -107
- package/dist/cjs/Figure-eeac313a.js +0 -154
- package/dist/esm/Figure-bc2b95d7.js +0 -149
- /package/dist/cjs/{ADInfeed-d8e47444.js → ADInfeed-3404200f.js} +0 -0
- /package/dist/cjs/{ADlgInfeed-947c3a47.js → ADlgInfeed-2611e1a9.js} +0 -0
- /package/dist/esm/{ADInfeed-2eb234ae.js → ADInfeed-27674dc6.js} +0 -0
- /package/dist/esm/{ADlgInfeed-17c13711.js → ADlgInfeed-43060a77.js} +0 -0
|
@@ -5,20 +5,20 @@ import './_library-528f1934.js';
|
|
|
5
5
|
import './_iter-detect-6e099a34.js';
|
|
6
6
|
import { _ as _Array$from } from './from-2c0a5f49.js';
|
|
7
7
|
import './_object-pie-33c40e79.js';
|
|
8
|
-
import { _ as _extends
|
|
8
|
+
import { _ as _extends } from './extends-6e00b262.js';
|
|
9
9
|
import './web.dom.iterable-46c95e52.js';
|
|
10
10
|
import './typeof-5f046efd.js';
|
|
11
11
|
import './_is-array-dd5523d6.js';
|
|
12
12
|
import React__default, { useState, useEffect } from 'react';
|
|
13
|
-
import { l as lib_3 } from './index-
|
|
13
|
+
import { l as lib_3 } from './index-93ec3c59.js';
|
|
14
14
|
import PropTypes from 'prop-types';
|
|
15
15
|
import Router, { useRouter } from 'next/router';
|
|
16
16
|
import './isSymbol-b7b7434f.js';
|
|
17
17
|
import './debounce-048d9cb6.js';
|
|
18
18
|
import 'react-dom';
|
|
19
|
-
import { i as imageUrlBuilder } from './index-
|
|
19
|
+
import { i as imageUrlBuilder } from './index-51a80699.js';
|
|
20
20
|
import { L as LazyLoad } from './index-5f9f807a.js';
|
|
21
|
-
import { b as main_16, c as
|
|
21
|
+
import { b as main_16, c as main_38 } from './main-7255814e.js';
|
|
22
22
|
import { h as html_decode_1 } from './entities-7cc3bf45.js';
|
|
23
23
|
import { _ as _slicedToArray } from './slicedToArray-f1e40361.js';
|
|
24
24
|
import './stringify-e30bc114.js';
|
|
@@ -26,7 +26,7 @@ import './asyncToGenerator-0379e924.js';
|
|
|
26
26
|
import './_set-species-6f64f1c1.js';
|
|
27
27
|
import { B as Beam, S as Segment } from './beam-a25bd8fd.js';
|
|
28
28
|
import DFPAdSlot from './AdSlot.js';
|
|
29
|
-
import { B as BlockContent } from './BlockContent-
|
|
29
|
+
import { B as BlockContent } from './BlockContent-a614acdf.js';
|
|
30
30
|
import { g as getYoutubeId } from './smoothscroll-4b699764.js';
|
|
31
31
|
import GroupDeck from './GroupDeck.js';
|
|
32
32
|
import { Carousel, Table, Figure as Figure$1, Button, ProgressBar, Row, Col } from 'react-bootstrap';
|
|
@@ -34,7 +34,6 @@ import Button$1 from 'react-bootstrap/Button';
|
|
|
34
34
|
import { u as util } from './util-7700fc59.js';
|
|
35
35
|
import { R as ReactPlayerLoader } from './brightcove-react-player-loader.es-83f53e4e.js';
|
|
36
36
|
import Pagination from 'react-bootstrap/Pagination';
|
|
37
|
-
import dynamic from 'next/dynamic';
|
|
38
37
|
|
|
39
38
|
var urlFor = function urlFor(source, builder) {
|
|
40
39
|
return builder.image(source).auto('format');
|
|
@@ -99,21 +98,18 @@ var Slideshow = function Slideshow(_ref) {
|
|
|
99
98
|
);
|
|
100
99
|
};
|
|
101
100
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
101
|
+
// do not edit .js files directly - edit src/index.jst
|
|
102
|
+
|
|
103
|
+
|
|
105
104
|
|
|
106
105
|
var fastDeepEqual = function equal(a, b) {
|
|
107
106
|
if (a === b) return true;
|
|
108
107
|
|
|
109
108
|
if (a && b && typeof a == 'object' && typeof b == 'object') {
|
|
110
|
-
|
|
111
|
-
, arrB = isArray(b)
|
|
112
|
-
, i
|
|
113
|
-
, length
|
|
114
|
-
, key;
|
|
109
|
+
if (a.constructor !== b.constructor) return false;
|
|
115
110
|
|
|
116
|
-
|
|
111
|
+
var length, i, keys;
|
|
112
|
+
if (Array.isArray(a)) {
|
|
117
113
|
length = a.length;
|
|
118
114
|
if (length != b.length) return false;
|
|
119
115
|
for (i = length; i-- !== 0;)
|
|
@@ -121,35 +117,29 @@ var fastDeepEqual = function equal(a, b) {
|
|
|
121
117
|
return true;
|
|
122
118
|
}
|
|
123
119
|
|
|
124
|
-
if (arrA != arrB) return false;
|
|
125
120
|
|
|
126
|
-
var dateA = a instanceof Date
|
|
127
|
-
, dateB = b instanceof Date;
|
|
128
|
-
if (dateA != dateB) return false;
|
|
129
|
-
if (dateA && dateB) return a.getTime() == b.getTime();
|
|
130
121
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
if (
|
|
134
|
-
if (regexpA && regexpB) return a.toString() == b.toString();
|
|
122
|
+
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
123
|
+
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
|
124
|
+
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
|
135
125
|
|
|
136
|
-
|
|
126
|
+
keys = Object.keys(a);
|
|
137
127
|
length = keys.length;
|
|
138
|
-
|
|
139
|
-
if (length !== keyList(b).length)
|
|
140
|
-
return false;
|
|
128
|
+
if (length !== Object.keys(b).length) return false;
|
|
141
129
|
|
|
142
130
|
for (i = length; i-- !== 0;)
|
|
143
|
-
if (!
|
|
131
|
+
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
144
132
|
|
|
145
133
|
for (i = length; i-- !== 0;) {
|
|
146
|
-
key = keys[i];
|
|
134
|
+
var key = keys[i];
|
|
135
|
+
|
|
147
136
|
if (!equal(a[key], b[key])) return false;
|
|
148
137
|
}
|
|
149
138
|
|
|
150
139
|
return true;
|
|
151
140
|
}
|
|
152
141
|
|
|
142
|
+
// true if both NaN, false otherwise
|
|
153
143
|
return a!==a && b!==b;
|
|
154
144
|
};
|
|
155
145
|
|
|
@@ -1572,199 +1562,235 @@ module.exports = exports['default'];
|
|
|
1572
1562
|
|
|
1573
1563
|
var youTubePlayer = unwrapExports(dist);
|
|
1574
1564
|
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
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; };
|
|
1565
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
1578
1566
|
|
|
1579
1567
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1580
1568
|
|
|
1581
|
-
function
|
|
1569
|
+
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); } }
|
|
1570
|
+
|
|
1571
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
1572
|
+
|
|
1573
|
+
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); }; }
|
|
1582
1574
|
|
|
1583
|
-
function
|
|
1575
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
1576
|
+
|
|
1577
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
1584
1578
|
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1579
|
+
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; } }
|
|
1580
|
+
|
|
1581
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
1582
|
+
|
|
1583
|
+
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); }
|
|
1584
|
+
|
|
1585
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
1586
|
+
|
|
1587
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
1588
|
+
|
|
1589
|
+
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; }
|
|
1590
|
+
|
|
1591
|
+
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; }
|
|
1592
|
+
/**
|
|
1593
|
+
* Check whether a `props` change should result in the video being updated.
|
|
1594
|
+
*
|
|
1595
|
+
* @param {Object} prevProps
|
|
1596
|
+
* @param {Object} props
|
|
1590
1597
|
*/
|
|
1598
|
+
|
|
1591
1599
|
function shouldUpdateVideo(prevProps, props) {
|
|
1592
1600
|
// A changing video should always trigger an update
|
|
1593
1601
|
if (prevProps.videoId !== props.videoId) {
|
|
1594
1602
|
return true;
|
|
1595
|
-
}
|
|
1596
|
-
|
|
1597
|
-
// Otherwise, a change in the start/end time playerVars also requires a player
|
|
1603
|
+
} // Otherwise, a change in the start/end time playerVars also requires a player
|
|
1598
1604
|
// update.
|
|
1605
|
+
|
|
1606
|
+
|
|
1599
1607
|
var prevVars = prevProps.opts.playerVars || {};
|
|
1600
1608
|
var vars = props.opts.playerVars || {};
|
|
1601
|
-
|
|
1602
1609
|
return prevVars.start !== vars.start || prevVars.end !== vars.end;
|
|
1603
1610
|
}
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
*
|
|
1607
|
-
*
|
|
1608
|
-
*
|
|
1609
|
-
*
|
|
1610
|
-
* @param {Object} opts
|
|
1611
|
+
/**
|
|
1612
|
+
* Neutralize API options that only require a video update, leaving only options
|
|
1613
|
+
* that require a player reset. The results can then be compared to see if a
|
|
1614
|
+
* player reset is necessary.
|
|
1615
|
+
*
|
|
1616
|
+
* @param {Object} opts
|
|
1611
1617
|
*/
|
|
1618
|
+
|
|
1619
|
+
|
|
1612
1620
|
function filterResetOptions(opts) {
|
|
1613
|
-
return
|
|
1614
|
-
playerVars:
|
|
1621
|
+
return _objectSpread({}, opts, {
|
|
1622
|
+
playerVars: _objectSpread({}, opts.playerVars, {
|
|
1615
1623
|
autoplay: 0,
|
|
1616
1624
|
start: 0,
|
|
1617
1625
|
end: 0
|
|
1618
1626
|
})
|
|
1619
1627
|
});
|
|
1620
1628
|
}
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
*
|
|
1624
|
-
*
|
|
1625
|
-
*
|
|
1626
|
-
*
|
|
1627
|
-
*
|
|
1628
|
-
* @param {Object}
|
|
1629
|
-
* @param {Object} props
|
|
1629
|
+
/**
|
|
1630
|
+
* Check whether a `props` change should result in the player being reset.
|
|
1631
|
+
* The player is reset when the `props.opts` change, except if the only change
|
|
1632
|
+
* is in the `start` and `end` playerVars, because a video update can deal with
|
|
1633
|
+
* those.
|
|
1634
|
+
*
|
|
1635
|
+
* @param {Object} prevProps
|
|
1636
|
+
* @param {Object} props
|
|
1630
1637
|
*/
|
|
1638
|
+
|
|
1639
|
+
|
|
1631
1640
|
function shouldResetPlayer(prevProps, props) {
|
|
1632
1641
|
return !fastDeepEqual(filterResetOptions(prevProps.opts), filterResetOptions(props.opts));
|
|
1633
1642
|
}
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
*
|
|
1637
|
-
*
|
|
1638
|
-
* @param {Object}
|
|
1639
|
-
* @param {Object} props
|
|
1643
|
+
/**
|
|
1644
|
+
* Check whether a props change should result in an id or className update.
|
|
1645
|
+
*
|
|
1646
|
+
* @param {Object} prevProps
|
|
1647
|
+
* @param {Object} props
|
|
1640
1648
|
*/
|
|
1649
|
+
|
|
1650
|
+
|
|
1641
1651
|
function shouldUpdatePlayer(prevProps, props) {
|
|
1642
1652
|
return prevProps.id !== props.id || prevProps.className !== props.className;
|
|
1643
1653
|
}
|
|
1644
1654
|
|
|
1645
|
-
var YouTube = function (_React$Component) {
|
|
1655
|
+
var YouTube = /*#__PURE__*/function (_React$Component) {
|
|
1646
1656
|
_inherits(YouTube, _React$Component);
|
|
1647
1657
|
|
|
1658
|
+
var _super = _createSuper(YouTube);
|
|
1659
|
+
|
|
1660
|
+
/**
|
|
1661
|
+
* Expose PlayerState constants for convenience. These constants can also be
|
|
1662
|
+
* accessed through the global YT object after the YouTube IFrame API is instantiated.
|
|
1663
|
+
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
1664
|
+
*/
|
|
1648
1665
|
function YouTube(props) {
|
|
1666
|
+
var _this;
|
|
1667
|
+
|
|
1649
1668
|
_classCallCheck(this, YouTube);
|
|
1650
1669
|
|
|
1651
|
-
|
|
1670
|
+
_this = _super.call(this, props);
|
|
1652
1671
|
|
|
1653
|
-
_this
|
|
1672
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerReady", function (event) {
|
|
1654
1673
|
return _this.props.onReady(event);
|
|
1655
|
-
};
|
|
1674
|
+
});
|
|
1656
1675
|
|
|
1657
|
-
_this
|
|
1676
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerError", function (event) {
|
|
1658
1677
|
return _this.props.onError(event);
|
|
1659
|
-
};
|
|
1678
|
+
});
|
|
1660
1679
|
|
|
1661
|
-
_this
|
|
1680
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerStateChange", function (event) {
|
|
1662
1681
|
_this.props.onStateChange(event);
|
|
1663
|
-
switch (event.data) {
|
|
1664
1682
|
|
|
1683
|
+
switch (event.data) {
|
|
1665
1684
|
case YouTube.PlayerState.ENDED:
|
|
1666
1685
|
_this.props.onEnd(event);
|
|
1686
|
+
|
|
1667
1687
|
break;
|
|
1668
1688
|
|
|
1669
1689
|
case YouTube.PlayerState.PLAYING:
|
|
1670
1690
|
_this.props.onPlay(event);
|
|
1691
|
+
|
|
1671
1692
|
break;
|
|
1672
1693
|
|
|
1673
1694
|
case YouTube.PlayerState.PAUSED:
|
|
1674
1695
|
_this.props.onPause(event);
|
|
1696
|
+
|
|
1675
1697
|
break;
|
|
1676
1698
|
}
|
|
1677
|
-
};
|
|
1699
|
+
});
|
|
1678
1700
|
|
|
1679
|
-
_this
|
|
1701
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerPlaybackRateChange", function (event) {
|
|
1680
1702
|
return _this.props.onPlaybackRateChange(event);
|
|
1681
|
-
};
|
|
1703
|
+
});
|
|
1682
1704
|
|
|
1683
|
-
_this
|
|
1705
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerPlaybackQualityChange", function (event) {
|
|
1684
1706
|
return _this.props.onPlaybackQualityChange(event);
|
|
1685
|
-
};
|
|
1707
|
+
});
|
|
1686
1708
|
|
|
1687
|
-
_this
|
|
1709
|
+
_defineProperty(_assertThisInitialized(_this), "createPlayer", function () {
|
|
1688
1710
|
// do not attempt to create a player server-side, it won't work
|
|
1689
|
-
if (typeof document === 'undefined') return;
|
|
1690
|
-
|
|
1691
|
-
var playerOpts =
|
|
1711
|
+
if (typeof document === 'undefined') return; // create player
|
|
1712
|
+
|
|
1713
|
+
var playerOpts = _objectSpread({}, _this.props.opts, {
|
|
1692
1714
|
// preload the `videoId` video if one is already given
|
|
1693
1715
|
videoId: _this.props.videoId
|
|
1694
1716
|
});
|
|
1695
|
-
|
|
1696
|
-
// attach event handlers
|
|
1717
|
+
|
|
1718
|
+
_this.internalPlayer = youTubePlayer(_this.container, playerOpts); // attach event handlers
|
|
1719
|
+
|
|
1697
1720
|
_this.internalPlayer.on('ready', _this.onPlayerReady);
|
|
1721
|
+
|
|
1698
1722
|
_this.internalPlayer.on('error', _this.onPlayerError);
|
|
1723
|
+
|
|
1699
1724
|
_this.internalPlayer.on('stateChange', _this.onPlayerStateChange);
|
|
1725
|
+
|
|
1700
1726
|
_this.internalPlayer.on('playbackRateChange', _this.onPlayerPlaybackRateChange);
|
|
1727
|
+
|
|
1701
1728
|
_this.internalPlayer.on('playbackQualityChange', _this.onPlayerPlaybackQualityChange);
|
|
1702
|
-
};
|
|
1729
|
+
});
|
|
1703
1730
|
|
|
1704
|
-
_this
|
|
1731
|
+
_defineProperty(_assertThisInitialized(_this), "resetPlayer", function () {
|
|
1705
1732
|
return _this.internalPlayer.destroy().then(_this.createPlayer);
|
|
1706
|
-
};
|
|
1733
|
+
});
|
|
1707
1734
|
|
|
1708
|
-
_this
|
|
1735
|
+
_defineProperty(_assertThisInitialized(_this), "updatePlayer", function () {
|
|
1709
1736
|
_this.internalPlayer.getIframe().then(function (iframe) {
|
|
1710
1737
|
if (_this.props.id) iframe.setAttribute('id', _this.props.id);else iframe.removeAttribute('id');
|
|
1711
1738
|
if (_this.props.className) iframe.setAttribute('class', _this.props.className);else iframe.removeAttribute('class');
|
|
1712
1739
|
});
|
|
1713
|
-
};
|
|
1740
|
+
});
|
|
1714
1741
|
|
|
1715
|
-
_this
|
|
1742
|
+
_defineProperty(_assertThisInitialized(_this), "updateVideo", function () {
|
|
1716
1743
|
if (typeof _this.props.videoId === 'undefined' || _this.props.videoId === null) {
|
|
1717
1744
|
_this.internalPlayer.stopVideo();
|
|
1745
|
+
|
|
1718
1746
|
return;
|
|
1719
|
-
}
|
|
1747
|
+
} // set queueing options
|
|
1748
|
+
|
|
1720
1749
|
|
|
1721
|
-
// set queueing options
|
|
1722
1750
|
var autoplay = false;
|
|
1723
1751
|
var opts = {
|
|
1724
1752
|
videoId: _this.props.videoId
|
|
1725
1753
|
};
|
|
1754
|
+
|
|
1726
1755
|
if ('playerVars' in _this.props.opts) {
|
|
1727
1756
|
autoplay = _this.props.opts.playerVars.autoplay === 1;
|
|
1757
|
+
|
|
1728
1758
|
if ('start' in _this.props.opts.playerVars) {
|
|
1729
1759
|
opts.startSeconds = _this.props.opts.playerVars.start;
|
|
1730
1760
|
}
|
|
1761
|
+
|
|
1731
1762
|
if ('end' in _this.props.opts.playerVars) {
|
|
1732
1763
|
opts.endSeconds = _this.props.opts.playerVars.end;
|
|
1733
1764
|
}
|
|
1734
|
-
}
|
|
1765
|
+
} // if autoplay is enabled loadVideoById
|
|
1766
|
+
|
|
1735
1767
|
|
|
1736
|
-
// if autoplay is enabled loadVideoById
|
|
1737
1768
|
if (autoplay) {
|
|
1738
1769
|
_this.internalPlayer.loadVideoById(opts);
|
|
1770
|
+
|
|
1739
1771
|
return;
|
|
1740
|
-
}
|
|
1741
|
-
|
|
1772
|
+
} // default behaviour just cues the video
|
|
1773
|
+
|
|
1774
|
+
|
|
1742
1775
|
_this.internalPlayer.cueVideoById(opts);
|
|
1743
|
-
};
|
|
1776
|
+
});
|
|
1744
1777
|
|
|
1745
|
-
_this
|
|
1778
|
+
_defineProperty(_assertThisInitialized(_this), "refContainer", function (container) {
|
|
1746
1779
|
_this.container = container;
|
|
1747
|
-
};
|
|
1780
|
+
});
|
|
1748
1781
|
|
|
1749
1782
|
_this.container = null;
|
|
1750
1783
|
_this.internalPlayer = null;
|
|
1751
1784
|
return _this;
|
|
1752
1785
|
}
|
|
1753
1786
|
|
|
1754
|
-
/**
|
|
1755
|
-
* Expose PlayerState constants for convenience. These constants can also be
|
|
1756
|
-
* accessed through the global YT object after the YouTube IFrame API is instantiated.
|
|
1757
|
-
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
1758
|
-
*/
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
1787
|
_createClass(YouTube, [{
|
|
1762
|
-
key:
|
|
1788
|
+
key: "componentDidMount",
|
|
1763
1789
|
value: function componentDidMount() {
|
|
1764
1790
|
this.createPlayer();
|
|
1765
1791
|
}
|
|
1766
1792
|
}, {
|
|
1767
|
-
key:
|
|
1793
|
+
key: "componentDidUpdate",
|
|
1768
1794
|
value: function componentDidUpdate(prevProps) {
|
|
1769
1795
|
if (shouldUpdatePlayer(prevProps, this.props)) {
|
|
1770
1796
|
this.updatePlayer();
|
|
@@ -1779,112 +1805,58 @@ var YouTube = function (_React$Component) {
|
|
|
1779
1805
|
}
|
|
1780
1806
|
}
|
|
1781
1807
|
}, {
|
|
1782
|
-
key:
|
|
1808
|
+
key: "componentWillUnmount",
|
|
1783
1809
|
value: function componentWillUnmount() {
|
|
1784
|
-
/**
|
|
1785
|
-
* Note: The `youtube-player` package that is used promisifies all
|
|
1786
|
-
* Player API calls, which introduces a delay of a tick before it actually
|
|
1787
|
-
* gets destroyed. Since React attempts to remove the element instantly
|
|
1788
|
-
* this method isn't quick enough to reset the container element.
|
|
1810
|
+
/**
|
|
1811
|
+
* Note: The `youtube-player` package that is used promisifies all YouTube
|
|
1812
|
+
* Player API calls, which introduces a delay of a tick before it actually
|
|
1813
|
+
* gets destroyed. Since React attempts to remove the element instantly
|
|
1814
|
+
* this method isn't quick enough to reset the container element.
|
|
1789
1815
|
*/
|
|
1790
1816
|
this.internalPlayer.destroy();
|
|
1791
1817
|
}
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
*
|
|
1795
|
-
*
|
|
1796
|
-
*
|
|
1797
|
-
* @param {Object} target - player object
|
|
1798
|
-
*/
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
/**
|
|
1802
|
-
* https://developers.google.com/youtube/iframe_api_reference#onError
|
|
1803
|
-
*
|
|
1804
|
-
* @param {Object} event
|
|
1805
|
-
* @param {Integer} data - error type
|
|
1806
|
-
* @param {Object} target - player object
|
|
1807
|
-
*/
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
/**
|
|
1811
|
-
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
1812
|
-
*
|
|
1813
|
-
* @param {Object} event
|
|
1814
|
-
* @param {Integer} data - status change type
|
|
1815
|
-
* @param {Object} target - actual YT player
|
|
1816
|
-
*/
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
/**
|
|
1820
|
-
* https://developers.google.com/youtube/iframe_api_reference#onPlaybackRateChange
|
|
1821
|
-
*
|
|
1822
|
-
* @param {Object} event
|
|
1823
|
-
* @param {Float} data - playback rate
|
|
1824
|
-
* @param {Object} target - actual YT player
|
|
1825
|
-
*/
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
/**
|
|
1829
|
-
* https://developers.google.com/youtube/iframe_api_reference#onPlaybackQualityChange
|
|
1830
|
-
*
|
|
1831
|
-
* @param {Object} event
|
|
1832
|
-
* @param {String} data - playback quality
|
|
1833
|
-
* @param {Object} target - actual YT player
|
|
1834
|
-
*/
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
/**
|
|
1838
|
-
* Initialize the Youtube Player API on the container and attach event handlers
|
|
1839
|
-
*/
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
/**
|
|
1843
|
-
* Shorthand for destroying and then re-creating the Youtube Player
|
|
1844
|
-
*/
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
/**
|
|
1848
|
-
* Method to update the id and class of the Youtube Player iframe.
|
|
1849
|
-
* React should update this automatically but since the Youtube Player API
|
|
1850
|
-
* replaced the DIV that is mounted by React we need to do this manually.
|
|
1851
|
-
*/
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
/**
|
|
1855
|
-
* Call Youtube Player API methods to update the currently playing video.
|
|
1856
|
-
* Depeding on the `opts.playerVars.autoplay` this function uses one of two
|
|
1857
|
-
* Youtube Player API methods to update the video.
|
|
1818
|
+
/**
|
|
1819
|
+
* https://developers.google.com/youtube/iframe_api_reference#onReady
|
|
1820
|
+
*
|
|
1821
|
+
* @param {Object} event
|
|
1822
|
+
* @param {Object} target - player object
|
|
1858
1823
|
*/
|
|
1859
1824
|
|
|
1860
1825
|
}, {
|
|
1861
|
-
key:
|
|
1826
|
+
key: "render",
|
|
1862
1827
|
value: function render() {
|
|
1863
|
-
return React__default.createElement(
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1828
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
1829
|
+
className: this.props.containerClassName
|
|
1830
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
1831
|
+
id: this.props.id,
|
|
1832
|
+
className: this.props.className,
|
|
1833
|
+
ref: this.refContainer
|
|
1834
|
+
}));
|
|
1868
1835
|
}
|
|
1869
1836
|
}]);
|
|
1870
1837
|
|
|
1871
1838
|
return YouTube;
|
|
1872
1839
|
}(React__default.Component);
|
|
1873
1840
|
|
|
1841
|
+
_defineProperty(YouTube, "PlayerState", {
|
|
1842
|
+
UNSTARTED: -1,
|
|
1843
|
+
ENDED: 0,
|
|
1844
|
+
PLAYING: 1,
|
|
1845
|
+
PAUSED: 2,
|
|
1846
|
+
BUFFERING: 3,
|
|
1847
|
+
CUED: 5
|
|
1848
|
+
});
|
|
1849
|
+
|
|
1874
1850
|
YouTube.propTypes = {
|
|
1875
1851
|
videoId: PropTypes.string,
|
|
1876
|
-
|
|
1877
1852
|
// custom ID for player element
|
|
1878
1853
|
id: PropTypes.string,
|
|
1879
|
-
|
|
1880
1854
|
// custom class name for player element
|
|
1881
1855
|
className: PropTypes.string,
|
|
1882
1856
|
// custom class name for player container element
|
|
1883
1857
|
containerClassName: PropTypes.string,
|
|
1884
|
-
|
|
1885
1858
|
// https://developers.google.com/youtube/iframe_api_reference#Loading_a_Video_Player
|
|
1886
1859
|
opts: PropTypes.objectOf(PropTypes.any),
|
|
1887
|
-
|
|
1888
1860
|
// event subscriptions
|
|
1889
1861
|
onReady: PropTypes.func,
|
|
1890
1862
|
onError: PropTypes.func,
|
|
@@ -1896,6 +1868,7 @@ YouTube.propTypes = {
|
|
|
1896
1868
|
onPlaybackQualityChange: PropTypes.func
|
|
1897
1869
|
};
|
|
1898
1870
|
YouTube.defaultProps = {
|
|
1871
|
+
videoId: null,
|
|
1899
1872
|
id: null,
|
|
1900
1873
|
className: null,
|
|
1901
1874
|
opts: {},
|
|
@@ -1909,14 +1882,6 @@ YouTube.defaultProps = {
|
|
|
1909
1882
|
onPlaybackRateChange: function onPlaybackRateChange() {},
|
|
1910
1883
|
onPlaybackQualityChange: function onPlaybackQualityChange() {}
|
|
1911
1884
|
};
|
|
1912
|
-
YouTube.PlayerState = {
|
|
1913
|
-
UNSTARTED: -1,
|
|
1914
|
-
ENDED: 0,
|
|
1915
|
-
PLAYING: 1,
|
|
1916
|
-
PAUSED: 2,
|
|
1917
|
-
BUFFERING: 3,
|
|
1918
|
-
CUED: 5
|
|
1919
|
-
};
|
|
1920
1885
|
|
|
1921
1886
|
var YouTubePlayer = function YouTubePlayer(_ref) {
|
|
1922
1887
|
var url = _ref.url;
|
|
@@ -2177,7 +2142,7 @@ var Media = function Media(_ref) {
|
|
|
2177
2142
|
React__default.createElement(
|
|
2178
2143
|
'a',
|
|
2179
2144
|
{ href: uploadDoc.asset.url, target: blank ? '_blank' : '_self' },
|
|
2180
|
-
React__default.createElement(Figure$1.Image, _extends
|
|
2145
|
+
React__default.createElement(Figure$1.Image, _extends({ className: 'media-image', style: { maxWidth: '100%' }, src: urlFor(poster).url() }, alt && { alt: alt })),
|
|
2181
2146
|
caption && React__default.createElement(
|
|
2182
2147
|
Figure$1.Caption,
|
|
2183
2148
|
{ className: 'media-caption' },
|
|
@@ -2188,7 +2153,7 @@ var Media = function Media(_ref) {
|
|
|
2188
2153
|
} else if (caption && caption !== '') {
|
|
2189
2154
|
return React__default.createElement(
|
|
2190
2155
|
'a',
|
|
2191
|
-
_extends
|
|
2156
|
+
_extends({}, uploadDoc.downloadMedia ? {
|
|
2192
2157
|
href: uploadDoc.asset.url + '?dl='
|
|
2193
2158
|
} : { href: uploadDoc.asset.url, target: blank ? '_blank' : '_self', rel: 'noopener noreferrer' }, {
|
|
2194
2159
|
style: { paddingLeft: '4px', paddingRight: '4px' },
|
|
@@ -2751,11 +2716,17 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
2751
2716
|
|
|
2752
2717
|
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; }
|
|
2753
2718
|
|
|
2754
|
-
function
|
|
2719
|
+
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(_e2) { throw _e2; }, 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(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
2720
|
+
|
|
2721
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2722
|
+
|
|
2723
|
+
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."); }
|
|
2724
|
+
|
|
2725
|
+
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); }
|
|
2755
2726
|
|
|
2756
|
-
function
|
|
2727
|
+
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; }
|
|
2757
2728
|
|
|
2758
|
-
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr)
|
|
2729
|
+
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; }
|
|
2759
2730
|
|
|
2760
2731
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
2761
2732
|
|
|
@@ -2885,12 +2856,12 @@ function getSDK(url, sdkGlobal) {
|
|
|
2885
2856
|
|
|
2886
2857
|
function getConfig(props$1, defaultProps, showWarning) {
|
|
2887
2858
|
var config = (0, _deepmerge["default"])(defaultProps.config, props$1.config);
|
|
2888
|
-
|
|
2889
|
-
var
|
|
2890
|
-
|
|
2859
|
+
|
|
2860
|
+
var _iterator = _createForOfIteratorHelper(props.DEPRECATED_CONFIG_PROPS),
|
|
2861
|
+
_step;
|
|
2891
2862
|
|
|
2892
2863
|
try {
|
|
2893
|
-
for (
|
|
2864
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
2894
2865
|
var p = _step.value;
|
|
2895
2866
|
|
|
2896
2867
|
if (props$1[p]) {
|
|
@@ -2905,18 +2876,9 @@ function getConfig(props$1, defaultProps, showWarning) {
|
|
|
2905
2876
|
}
|
|
2906
2877
|
}
|
|
2907
2878
|
} catch (err) {
|
|
2908
|
-
|
|
2909
|
-
_iteratorError = err;
|
|
2879
|
+
_iterator.e(err);
|
|
2910
2880
|
} finally {
|
|
2911
|
-
|
|
2912
|
-
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
2913
|
-
_iterator["return"]();
|
|
2914
|
-
}
|
|
2915
|
-
} finally {
|
|
2916
|
-
if (_didIteratorError) {
|
|
2917
|
-
throw _iteratorError;
|
|
2918
|
-
}
|
|
2919
|
-
}
|
|
2881
|
+
_iterator.f();
|
|
2920
2882
|
}
|
|
2921
2883
|
|
|
2922
2884
|
return config;
|
|
@@ -3063,12 +3025,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
3063
3025
|
|
|
3064
3026
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
3065
3027
|
|
|
3066
|
-
function
|
|
3028
|
+
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); }; }
|
|
3067
3029
|
|
|
3068
|
-
function
|
|
3030
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
3069
3031
|
|
|
3070
3032
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
3071
3033
|
|
|
3034
|
+
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; } }
|
|
3035
|
+
|
|
3036
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
3037
|
+
|
|
3072
3038
|
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); }
|
|
3073
3039
|
|
|
3074
3040
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -3077,14 +3043,12 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
3077
3043
|
|
|
3078
3044
|
var SEEK_ON_PLAY_EXPIRY = 5000;
|
|
3079
3045
|
|
|
3080
|
-
var Player =
|
|
3081
|
-
/*#__PURE__*/
|
|
3082
|
-
function (_Component) {
|
|
3046
|
+
var Player = /*#__PURE__*/function (_Component) {
|
|
3083
3047
|
_inherits(Player, _Component);
|
|
3084
3048
|
|
|
3085
|
-
|
|
3086
|
-
var _getPrototypeOf2;
|
|
3049
|
+
var _super = _createSuper(Player);
|
|
3087
3050
|
|
|
3051
|
+
function Player() {
|
|
3088
3052
|
var _this;
|
|
3089
3053
|
|
|
3090
3054
|
_classCallCheck(this, Player);
|
|
@@ -3093,7 +3057,7 @@ function (_Component) {
|
|
|
3093
3057
|
_args[_key] = arguments[_key];
|
|
3094
3058
|
}
|
|
3095
3059
|
|
|
3096
|
-
_this =
|
|
3060
|
+
_this = _super.call.apply(_super, [this].concat(_args));
|
|
3097
3061
|
|
|
3098
3062
|
_defineProperty(_assertThisInitialized(_this), "mounted", false);
|
|
3099
3063
|
|
|
@@ -3418,7 +3382,7 @@ function (_Component) {
|
|
|
3418
3382
|
return null;
|
|
3419
3383
|
}
|
|
3420
3384
|
|
|
3421
|
-
return _react["default"].createElement(Player, _extends({}, this.props, {
|
|
3385
|
+
return /*#__PURE__*/_react["default"].createElement(Player, _extends({}, this.props, {
|
|
3422
3386
|
ref: this.ref,
|
|
3423
3387
|
onReady: this.handleReady,
|
|
3424
3388
|
onPlay: this.handlePlay,
|
|
@@ -3479,12 +3443,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
3479
3443
|
|
|
3480
3444
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
3481
3445
|
|
|
3482
|
-
function
|
|
3446
|
+
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); }; }
|
|
3483
3447
|
|
|
3484
|
-
function
|
|
3448
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
3485
3449
|
|
|
3486
3450
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
3487
3451
|
|
|
3452
|
+
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; } }
|
|
3453
|
+
|
|
3454
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
3455
|
+
|
|
3488
3456
|
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); }
|
|
3489
3457
|
|
|
3490
3458
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -3496,14 +3464,12 @@ var SUPPORTED_PROPS = Object.keys(props.propTypes);
|
|
|
3496
3464
|
function createSinglePlayer(activePlayer) {
|
|
3497
3465
|
var _class, _temp;
|
|
3498
3466
|
|
|
3499
|
-
return _temp = _class =
|
|
3500
|
-
/*#__PURE__*/
|
|
3501
|
-
function (_Component) {
|
|
3467
|
+
return _temp = _class = /*#__PURE__*/function (_Component) {
|
|
3502
3468
|
_inherits(SinglePlayer, _Component);
|
|
3503
3469
|
|
|
3504
|
-
|
|
3505
|
-
var _getPrototypeOf2;
|
|
3470
|
+
var _super = _createSuper(SinglePlayer);
|
|
3506
3471
|
|
|
3472
|
+
function SinglePlayer() {
|
|
3507
3473
|
var _this;
|
|
3508
3474
|
|
|
3509
3475
|
_classCallCheck(this, SinglePlayer);
|
|
@@ -3512,7 +3478,7 @@ function createSinglePlayer(activePlayer) {
|
|
|
3512
3478
|
args[_key] = arguments[_key];
|
|
3513
3479
|
}
|
|
3514
3480
|
|
|
3515
|
-
_this =
|
|
3481
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
3516
3482
|
|
|
3517
3483
|
_defineProperty(_assertThisInitialized(_this), "config", (0, utils.getConfig)(_this.props, props.defaultProps, true));
|
|
3518
3484
|
|
|
@@ -3580,12 +3546,12 @@ function createSinglePlayer(activePlayer) {
|
|
|
3580
3546
|
height = _this$props.height,
|
|
3581
3547
|
Wrapper = _this$props.wrapper;
|
|
3582
3548
|
var otherProps = (0, utils.omit)(this.props, SUPPORTED_PROPS, props.DEPRECATED_CONFIG_PROPS);
|
|
3583
|
-
return _react["default"].createElement(Wrapper, _extends({
|
|
3549
|
+
return /*#__PURE__*/_react["default"].createElement(Wrapper, _extends({
|
|
3584
3550
|
style: _objectSpread({}, style, {
|
|
3585
3551
|
width: width,
|
|
3586
3552
|
height: height
|
|
3587
3553
|
})
|
|
3588
|
-
}, otherProps), _react["default"].createElement(_Player["default"], _extends({}, this.props, {
|
|
3554
|
+
}, otherProps), /*#__PURE__*/_react["default"].createElement(_Player["default"], _extends({}, this.props, {
|
|
3589
3555
|
ref: this.ref,
|
|
3590
3556
|
activePlayer: activePlayer,
|
|
3591
3557
|
config: this.config
|
|
@@ -3631,23 +3597,31 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
3631
3597
|
|
|
3632
3598
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
3633
3599
|
|
|
3634
|
-
function
|
|
3600
|
+
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); }; }
|
|
3635
3601
|
|
|
3636
|
-
function
|
|
3602
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
3637
3603
|
|
|
3638
3604
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
3639
3605
|
|
|
3606
|
+
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; } }
|
|
3607
|
+
|
|
3608
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
3609
|
+
|
|
3640
3610
|
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); }
|
|
3641
3611
|
|
|
3642
3612
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
3643
3613
|
|
|
3644
3614
|
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; }
|
|
3645
3615
|
|
|
3646
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
3616
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3617
|
+
|
|
3618
|
+
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."); }
|
|
3619
|
+
|
|
3620
|
+
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); }
|
|
3647
3621
|
|
|
3648
|
-
function
|
|
3622
|
+
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; }
|
|
3649
3623
|
|
|
3650
|
-
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr)
|
|
3624
|
+
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; }
|
|
3651
3625
|
|
|
3652
3626
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
3653
3627
|
|
|
@@ -3672,14 +3646,12 @@ function parsePlaylist(url) {
|
|
|
3672
3646
|
return {};
|
|
3673
3647
|
}
|
|
3674
3648
|
|
|
3675
|
-
var YouTube =
|
|
3676
|
-
/*#__PURE__*/
|
|
3677
|
-
function (_Component) {
|
|
3649
|
+
var YouTube = /*#__PURE__*/function (_Component) {
|
|
3678
3650
|
_inherits(YouTube, _Component);
|
|
3679
3651
|
|
|
3680
|
-
|
|
3681
|
-
var _getPrototypeOf2;
|
|
3652
|
+
var _super = _createSuper(YouTube);
|
|
3682
3653
|
|
|
3654
|
+
function YouTube() {
|
|
3683
3655
|
var _this;
|
|
3684
3656
|
|
|
3685
3657
|
_classCallCheck(this, YouTube);
|
|
@@ -3688,7 +3660,7 @@ function (_Component) {
|
|
|
3688
3660
|
args[_key] = arguments[_key];
|
|
3689
3661
|
}
|
|
3690
3662
|
|
|
3691
|
-
_this =
|
|
3663
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
3692
3664
|
|
|
3693
3665
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
3694
3666
|
|
|
@@ -3876,9 +3848,9 @@ function (_Component) {
|
|
|
3876
3848
|
height: '100%',
|
|
3877
3849
|
display: display
|
|
3878
3850
|
};
|
|
3879
|
-
return _react["default"].createElement("div", {
|
|
3851
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
3880
3852
|
style: style
|
|
3881
|
-
}, _react["default"].createElement("div", {
|
|
3853
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
3882
3854
|
ref: this.ref
|
|
3883
3855
|
}));
|
|
3884
3856
|
}
|
|
@@ -3934,12 +3906,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
3934
3906
|
|
|
3935
3907
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
3936
3908
|
|
|
3937
|
-
function
|
|
3909
|
+
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); }; }
|
|
3938
3910
|
|
|
3939
|
-
function
|
|
3911
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
3940
3912
|
|
|
3941
3913
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
3942
3914
|
|
|
3915
|
+
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; } }
|
|
3916
|
+
|
|
3917
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
3918
|
+
|
|
3943
3919
|
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); }
|
|
3944
3920
|
|
|
3945
3921
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -3948,16 +3924,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
3948
3924
|
|
|
3949
3925
|
var SDK_URL = 'https://w.soundcloud.com/player/api.js';
|
|
3950
3926
|
var SDK_GLOBAL = 'SC';
|
|
3951
|
-
var MATCH_URL = /(soundcloud\.com|snd\.sc)
|
|
3927
|
+
var MATCH_URL = /(?:soundcloud\.com|snd\.sc)\/[^.]+$/;
|
|
3952
3928
|
|
|
3953
|
-
var SoundCloud =
|
|
3954
|
-
/*#__PURE__*/
|
|
3955
|
-
function (_Component) {
|
|
3929
|
+
var SoundCloud = /*#__PURE__*/function (_Component) {
|
|
3956
3930
|
_inherits(SoundCloud, _Component);
|
|
3957
3931
|
|
|
3958
|
-
|
|
3959
|
-
var _getPrototypeOf2;
|
|
3932
|
+
var _super = _createSuper(SoundCloud);
|
|
3960
3933
|
|
|
3934
|
+
function SoundCloud() {
|
|
3961
3935
|
var _this;
|
|
3962
3936
|
|
|
3963
3937
|
_classCallCheck(this, SoundCloud);
|
|
@@ -3966,7 +3940,7 @@ function (_Component) {
|
|
|
3966
3940
|
args[_key] = arguments[_key];
|
|
3967
3941
|
}
|
|
3968
3942
|
|
|
3969
|
-
_this =
|
|
3943
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
3970
3944
|
|
|
3971
3945
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
3972
3946
|
|
|
@@ -4087,7 +4061,7 @@ function (_Component) {
|
|
|
4087
4061
|
height: '100%',
|
|
4088
4062
|
display: display
|
|
4089
4063
|
};
|
|
4090
|
-
return _react["default"].createElement("iframe", {
|
|
4064
|
+
return /*#__PURE__*/_react["default"].createElement("iframe", {
|
|
4091
4065
|
ref: this.ref,
|
|
4092
4066
|
src: "https://w.soundcloud.com/player/?url=".concat(encodeURIComponent(this.props.url)),
|
|
4093
4067
|
style: style,
|
|
@@ -4149,12 +4123,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
4149
4123
|
|
|
4150
4124
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
4151
4125
|
|
|
4152
|
-
function
|
|
4126
|
+
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); }; }
|
|
4153
4127
|
|
|
4154
|
-
function
|
|
4128
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
4155
4129
|
|
|
4156
4130
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
4157
4131
|
|
|
4132
|
+
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; } }
|
|
4133
|
+
|
|
4134
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
4135
|
+
|
|
4158
4136
|
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); }
|
|
4159
4137
|
|
|
4160
4138
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -4166,14 +4144,12 @@ var SDK_GLOBAL = 'Vimeo';
|
|
|
4166
4144
|
var MATCH_URL = /vimeo\.com\/.+/;
|
|
4167
4145
|
var MATCH_FILE_URL = /vimeo\.com\/external\/[0-9]+\..+/;
|
|
4168
4146
|
|
|
4169
|
-
var Vimeo =
|
|
4170
|
-
/*#__PURE__*/
|
|
4171
|
-
function (_Component) {
|
|
4147
|
+
var Vimeo = /*#__PURE__*/function (_Component) {
|
|
4172
4148
|
_inherits(Vimeo, _Component);
|
|
4173
4149
|
|
|
4174
|
-
|
|
4175
|
-
var _getPrototypeOf2;
|
|
4150
|
+
var _super = _createSuper(Vimeo);
|
|
4176
4151
|
|
|
4152
|
+
function Vimeo() {
|
|
4177
4153
|
var _this;
|
|
4178
4154
|
|
|
4179
4155
|
_classCallCheck(this, Vimeo);
|
|
@@ -4182,7 +4158,7 @@ function (_Component) {
|
|
|
4182
4158
|
args[_key] = arguments[_key];
|
|
4183
4159
|
}
|
|
4184
4160
|
|
|
4185
|
-
_this =
|
|
4161
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
4186
4162
|
|
|
4187
4163
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
4188
4164
|
|
|
@@ -4339,7 +4315,7 @@ function (_Component) {
|
|
|
4339
4315
|
overflow: 'hidden',
|
|
4340
4316
|
display: display
|
|
4341
4317
|
};
|
|
4342
|
-
return _react["default"].createElement("div", {
|
|
4318
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
4343
4319
|
key: this.props.url,
|
|
4344
4320
|
ref: this.ref,
|
|
4345
4321
|
style: style
|
|
@@ -4399,12 +4375,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
4399
4375
|
|
|
4400
4376
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
4401
4377
|
|
|
4402
|
-
function
|
|
4378
|
+
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); }; }
|
|
4403
4379
|
|
|
4404
|
-
function
|
|
4380
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
4405
4381
|
|
|
4406
4382
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
4407
4383
|
|
|
4384
|
+
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; } }
|
|
4385
|
+
|
|
4386
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
4387
|
+
|
|
4408
4388
|
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); }
|
|
4409
4389
|
|
|
4410
4390
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -4417,14 +4397,12 @@ var SDK_GLOBAL_READY = 'fbAsyncInit';
|
|
|
4417
4397
|
var MATCH_URL = /^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/;
|
|
4418
4398
|
var PLAYER_ID_PREFIX = 'facebook-player-';
|
|
4419
4399
|
|
|
4420
|
-
var Facebook =
|
|
4421
|
-
/*#__PURE__*/
|
|
4422
|
-
function (_Component) {
|
|
4400
|
+
var Facebook = /*#__PURE__*/function (_Component) {
|
|
4423
4401
|
_inherits(Facebook, _Component);
|
|
4424
4402
|
|
|
4425
|
-
|
|
4426
|
-
var _getPrototypeOf2;
|
|
4403
|
+
var _super = _createSuper(Facebook);
|
|
4427
4404
|
|
|
4405
|
+
function Facebook() {
|
|
4428
4406
|
var _this;
|
|
4429
4407
|
|
|
4430
4408
|
_classCallCheck(this, Facebook);
|
|
@@ -4433,7 +4411,7 @@ function (_Component) {
|
|
|
4433
4411
|
args[_key] = arguments[_key];
|
|
4434
4412
|
}
|
|
4435
4413
|
|
|
4436
|
-
_this =
|
|
4414
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
4437
4415
|
|
|
4438
4416
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
4439
4417
|
|
|
@@ -4549,7 +4527,7 @@ function (_Component) {
|
|
|
4549
4527
|
width: '100%',
|
|
4550
4528
|
height: '100%'
|
|
4551
4529
|
};
|
|
4552
|
-
return _react["default"].createElement("div", {
|
|
4530
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
4553
4531
|
style: style,
|
|
4554
4532
|
id: this.playerID,
|
|
4555
4533
|
className: "fb-video",
|
|
@@ -4609,12 +4587,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
4609
4587
|
|
|
4610
4588
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
4611
4589
|
|
|
4612
|
-
function
|
|
4590
|
+
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); }; }
|
|
4613
4591
|
|
|
4614
|
-
function
|
|
4592
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
4615
4593
|
|
|
4616
4594
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
4617
4595
|
|
|
4596
|
+
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; } }
|
|
4597
|
+
|
|
4598
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
4599
|
+
|
|
4618
4600
|
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); }
|
|
4619
4601
|
|
|
4620
4602
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -4625,14 +4607,12 @@ var SDK_URL = 'https://cdn.embed.ly/player-0.1.0.min.js';
|
|
|
4625
4607
|
var SDK_GLOBAL = 'playerjs';
|
|
4626
4608
|
var MATCH_URL = /streamable\.com\/([a-z0-9]+)$/;
|
|
4627
4609
|
|
|
4628
|
-
var Streamable =
|
|
4629
|
-
/*#__PURE__*/
|
|
4630
|
-
function (_Component) {
|
|
4610
|
+
var Streamable = /*#__PURE__*/function (_Component) {
|
|
4631
4611
|
_inherits(Streamable, _Component);
|
|
4632
4612
|
|
|
4633
|
-
|
|
4634
|
-
var _getPrototypeOf2;
|
|
4613
|
+
var _super = _createSuper(Streamable);
|
|
4635
4614
|
|
|
4615
|
+
function Streamable() {
|
|
4636
4616
|
var _this;
|
|
4637
4617
|
|
|
4638
4618
|
_classCallCheck(this, Streamable);
|
|
@@ -4641,7 +4621,7 @@ function (_Component) {
|
|
|
4641
4621
|
args[_key] = arguments[_key];
|
|
4642
4622
|
}
|
|
4643
4623
|
|
|
4644
|
-
_this =
|
|
4624
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
4645
4625
|
|
|
4646
4626
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
4647
4627
|
|
|
@@ -4761,7 +4741,7 @@ function (_Component) {
|
|
|
4761
4741
|
width: '100%',
|
|
4762
4742
|
height: '100%'
|
|
4763
4743
|
};
|
|
4764
|
-
return _react["default"].createElement("iframe", {
|
|
4744
|
+
return /*#__PURE__*/_react["default"].createElement("iframe", {
|
|
4765
4745
|
ref: this.ref,
|
|
4766
4746
|
src: "https://streamable.com/o/".concat(id),
|
|
4767
4747
|
frameBorder: "0",
|
|
@@ -4822,12 +4802,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
4822
4802
|
|
|
4823
4803
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
4824
4804
|
|
|
4825
|
-
function
|
|
4805
|
+
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); }; }
|
|
4826
4806
|
|
|
4827
|
-
function
|
|
4807
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
4828
4808
|
|
|
4829
4809
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
4830
4810
|
|
|
4811
|
+
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; } }
|
|
4812
|
+
|
|
4813
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
4814
|
+
|
|
4831
4815
|
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); }
|
|
4832
4816
|
|
|
4833
4817
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -4838,26 +4822,48 @@ var SDK_URL = 'https://fast.wistia.com/assets/external/E-v1.js';
|
|
|
4838
4822
|
var SDK_GLOBAL = 'Wistia';
|
|
4839
4823
|
var MATCH_URL = /(?:wistia\.com|wi\.st)\/(?:medias|embed)\/(.*)$/;
|
|
4840
4824
|
|
|
4841
|
-
var Wistia =
|
|
4842
|
-
/*#__PURE__*/
|
|
4843
|
-
function (_Component) {
|
|
4825
|
+
var Wistia = /*#__PURE__*/function (_Component) {
|
|
4844
4826
|
_inherits(Wistia, _Component);
|
|
4845
4827
|
|
|
4846
|
-
|
|
4847
|
-
var _getPrototypeOf2;
|
|
4828
|
+
var _super = _createSuper(Wistia);
|
|
4848
4829
|
|
|
4830
|
+
function Wistia() {
|
|
4849
4831
|
var _this;
|
|
4850
4832
|
|
|
4851
4833
|
_classCallCheck(this, Wistia);
|
|
4852
4834
|
|
|
4853
|
-
for (var _len = arguments.length,
|
|
4854
|
-
|
|
4835
|
+
for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
4836
|
+
_args[_key] = arguments[_key];
|
|
4855
4837
|
}
|
|
4856
4838
|
|
|
4857
|
-
_this =
|
|
4839
|
+
_this = _super.call.apply(_super, [this].concat(_args));
|
|
4858
4840
|
|
|
4859
4841
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
4860
4842
|
|
|
4843
|
+
_defineProperty(_assertThisInitialized(_this), "onPlay", function () {
|
|
4844
|
+
var _this$props;
|
|
4845
|
+
|
|
4846
|
+
return (_this$props = _this.props).onPlay.apply(_this$props, arguments);
|
|
4847
|
+
});
|
|
4848
|
+
|
|
4849
|
+
_defineProperty(_assertThisInitialized(_this), "onPause", function () {
|
|
4850
|
+
var _this$props2;
|
|
4851
|
+
|
|
4852
|
+
return (_this$props2 = _this.props).onPause.apply(_this$props2, arguments);
|
|
4853
|
+
});
|
|
4854
|
+
|
|
4855
|
+
_defineProperty(_assertThisInitialized(_this), "onSeek", function () {
|
|
4856
|
+
var _this$props3;
|
|
4857
|
+
|
|
4858
|
+
return (_this$props3 = _this.props).onSeek.apply(_this$props3, arguments);
|
|
4859
|
+
});
|
|
4860
|
+
|
|
4861
|
+
_defineProperty(_assertThisInitialized(_this), "onEnded", function () {
|
|
4862
|
+
var _this$props4;
|
|
4863
|
+
|
|
4864
|
+
return (_this$props4 = _this.props).onEnded.apply(_this$props4, arguments);
|
|
4865
|
+
});
|
|
4866
|
+
|
|
4861
4867
|
_defineProperty(_assertThisInitialized(_this), "mute", function () {
|
|
4862
4868
|
_this.callPlayer('mute');
|
|
4863
4869
|
});
|
|
@@ -4879,17 +4885,13 @@ function (_Component) {
|
|
|
4879
4885
|
value: function load(url) {
|
|
4880
4886
|
var _this2 = this;
|
|
4881
4887
|
|
|
4882
|
-
var _this$
|
|
4883
|
-
playing = _this$
|
|
4884
|
-
muted = _this$
|
|
4885
|
-
controls = _this$
|
|
4886
|
-
_onReady = _this$
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
onSeek = _this$props.onSeek,
|
|
4890
|
-
onEnded = _this$props.onEnded,
|
|
4891
|
-
config = _this$props.config,
|
|
4892
|
-
onError = _this$props.onError;
|
|
4888
|
+
var _this$props5 = this.props,
|
|
4889
|
+
playing = _this$props5.playing,
|
|
4890
|
+
muted = _this$props5.muted,
|
|
4891
|
+
controls = _this$props5.controls,
|
|
4892
|
+
_onReady = _this$props5.onReady,
|
|
4893
|
+
config = _this$props5.config,
|
|
4894
|
+
onError = _this$props5.onError;
|
|
4893
4895
|
(0, utils.getSDK)(SDK_URL, SDK_GLOBAL).then(function () {
|
|
4894
4896
|
window._wq = window._wq || [];
|
|
4895
4897
|
|
|
@@ -4906,19 +4908,28 @@ function (_Component) {
|
|
|
4906
4908
|
|
|
4907
4909
|
_this2.unbind();
|
|
4908
4910
|
|
|
4909
|
-
_this2.player.bind('play', onPlay);
|
|
4911
|
+
_this2.player.bind('play', _this2.onPlay);
|
|
4910
4912
|
|
|
4911
|
-
_this2.player.bind('pause', onPause);
|
|
4913
|
+
_this2.player.bind('pause', _this2.onPause);
|
|
4912
4914
|
|
|
4913
|
-
_this2.player.bind('seek', onSeek);
|
|
4915
|
+
_this2.player.bind('seek', _this2.onSeek);
|
|
4914
4916
|
|
|
4915
|
-
_this2.player.bind('end', onEnded);
|
|
4917
|
+
_this2.player.bind('end', _this2.onEnded);
|
|
4916
4918
|
|
|
4917
4919
|
_onReady();
|
|
4918
4920
|
}
|
|
4919
4921
|
});
|
|
4920
4922
|
}, onError);
|
|
4921
4923
|
}
|
|
4924
|
+
}, {
|
|
4925
|
+
key: "unbind",
|
|
4926
|
+
value: function unbind() {
|
|
4927
|
+
this.player.unbind('play', this.onPlay);
|
|
4928
|
+
this.player.unbind('pause', this.onPause);
|
|
4929
|
+
this.player.unbind('seek', this.onSeek);
|
|
4930
|
+
this.player.unbind('end', this.onEnded);
|
|
4931
|
+
} // Proxy methods to prevent listener leaks
|
|
4932
|
+
|
|
4922
4933
|
}, {
|
|
4923
4934
|
key: "play",
|
|
4924
4935
|
value: function play() {
|
|
@@ -4929,19 +4940,6 @@ function (_Component) {
|
|
|
4929
4940
|
value: function pause() {
|
|
4930
4941
|
this.callPlayer('pause');
|
|
4931
4942
|
}
|
|
4932
|
-
}, {
|
|
4933
|
-
key: "unbind",
|
|
4934
|
-
value: function unbind() {
|
|
4935
|
-
var _this$props2 = this.props,
|
|
4936
|
-
onPlay = _this$props2.onPlay,
|
|
4937
|
-
onPause = _this$props2.onPause,
|
|
4938
|
-
onSeek = _this$props2.onSeek,
|
|
4939
|
-
onEnded = _this$props2.onEnded;
|
|
4940
|
-
this.player.unbind('play', onPlay);
|
|
4941
|
-
this.player.unbind('pause', onPause);
|
|
4942
|
-
this.player.unbind('seek', onSeek);
|
|
4943
|
-
this.player.unbind('end', onEnded);
|
|
4944
|
-
}
|
|
4945
4943
|
}, {
|
|
4946
4944
|
key: "stop",
|
|
4947
4945
|
value: function stop() {
|
|
@@ -4987,7 +4985,7 @@ function (_Component) {
|
|
|
4987
4985
|
width: '100%',
|
|
4988
4986
|
height: '100%'
|
|
4989
4987
|
};
|
|
4990
|
-
return _react["default"].createElement("div", {
|
|
4988
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
4991
4989
|
key: id,
|
|
4992
4990
|
className: className,
|
|
4993
4991
|
style: style
|
|
@@ -5047,12 +5045,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
5047
5045
|
|
|
5048
5046
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
5049
5047
|
|
|
5050
|
-
function
|
|
5048
|
+
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); }; }
|
|
5051
5049
|
|
|
5052
|
-
function
|
|
5050
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
5053
5051
|
|
|
5054
5052
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
5055
5053
|
|
|
5054
|
+
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; } }
|
|
5055
|
+
|
|
5056
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
5057
|
+
|
|
5056
5058
|
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); }
|
|
5057
5059
|
|
|
5058
5060
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -5065,14 +5067,12 @@ var MATCH_VIDEO_URL = /(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/;
|
|
|
5065
5067
|
var MATCH_CHANNEL_URL = /(?:www\.|go\.)?twitch\.tv\/([a-z0-9_]+)($|\?)/;
|
|
5066
5068
|
var PLAYER_ID_PREFIX = 'twitch-player-';
|
|
5067
5069
|
|
|
5068
|
-
var Twitch =
|
|
5069
|
-
/*#__PURE__*/
|
|
5070
|
-
function (_Component) {
|
|
5070
|
+
var Twitch = /*#__PURE__*/function (_Component) {
|
|
5071
5071
|
_inherits(Twitch, _Component);
|
|
5072
5072
|
|
|
5073
|
-
|
|
5074
|
-
var _getPrototypeOf2;
|
|
5073
|
+
var _super = _createSuper(Twitch);
|
|
5075
5074
|
|
|
5075
|
+
function Twitch() {
|
|
5076
5076
|
var _this;
|
|
5077
5077
|
|
|
5078
5078
|
_classCallCheck(this, Twitch);
|
|
@@ -5081,7 +5081,7 @@ function (_Component) {
|
|
|
5081
5081
|
args[_key] = arguments[_key];
|
|
5082
5082
|
}
|
|
5083
5083
|
|
|
5084
|
-
_this =
|
|
5084
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
5085
5085
|
|
|
5086
5086
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
5087
5087
|
|
|
@@ -5202,7 +5202,7 @@ function (_Component) {
|
|
|
5202
5202
|
width: '100%',
|
|
5203
5203
|
height: '100%'
|
|
5204
5204
|
};
|
|
5205
|
-
return _react["default"].createElement("div", {
|
|
5205
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
5206
5206
|
style: style,
|
|
5207
5207
|
id: this.playerID
|
|
5208
5208
|
});
|
|
@@ -5255,11 +5255,15 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
5255
5255
|
|
|
5256
5256
|
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; }
|
|
5257
5257
|
|
|
5258
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
5258
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
5259
5259
|
|
|
5260
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
|
5260
|
+
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."); }
|
|
5261
5261
|
|
|
5262
|
-
function
|
|
5262
|
+
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); }
|
|
5263
|
+
|
|
5264
|
+
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; }
|
|
5265
|
+
|
|
5266
|
+
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; }
|
|
5263
5267
|
|
|
5264
5268
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
5265
5269
|
|
|
@@ -5269,12 +5273,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
5269
5273
|
|
|
5270
5274
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
5271
5275
|
|
|
5272
|
-
function
|
|
5276
|
+
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); }; }
|
|
5273
5277
|
|
|
5274
|
-
function
|
|
5278
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
5275
5279
|
|
|
5276
5280
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
5277
5281
|
|
|
5282
|
+
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; } }
|
|
5283
|
+
|
|
5284
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
5285
|
+
|
|
5278
5286
|
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); }
|
|
5279
5287
|
|
|
5280
5288
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -5286,14 +5294,12 @@ var SDK_GLOBAL = 'DM';
|
|
|
5286
5294
|
var SDK_GLOBAL_READY = 'dmAsyncInit';
|
|
5287
5295
|
var MATCH_URL = /^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?$/;
|
|
5288
5296
|
|
|
5289
|
-
var DailyMotion =
|
|
5290
|
-
/*#__PURE__*/
|
|
5291
|
-
function (_Component) {
|
|
5297
|
+
var DailyMotion = /*#__PURE__*/function (_Component) {
|
|
5292
5298
|
_inherits(DailyMotion, _Component);
|
|
5293
5299
|
|
|
5294
|
-
|
|
5295
|
-
var _getPrototypeOf2;
|
|
5300
|
+
var _super = _createSuper(DailyMotion);
|
|
5296
5301
|
|
|
5302
|
+
function DailyMotion() {
|
|
5297
5303
|
var _this;
|
|
5298
5304
|
|
|
5299
5305
|
_classCallCheck(this, DailyMotion);
|
|
@@ -5302,7 +5308,7 @@ function (_Component) {
|
|
|
5302
5308
|
args[_key] = arguments[_key];
|
|
5303
5309
|
}
|
|
5304
5310
|
|
|
5305
|
-
_this =
|
|
5311
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
5306
5312
|
|
|
5307
5313
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
5308
5314
|
|
|
@@ -5431,9 +5437,9 @@ function (_Component) {
|
|
|
5431
5437
|
height: '100%',
|
|
5432
5438
|
display: display
|
|
5433
5439
|
};
|
|
5434
|
-
return _react["default"].createElement("div", {
|
|
5440
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
5435
5441
|
style: style
|
|
5436
|
-
}, _react["default"].createElement("div", {
|
|
5442
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
5437
5443
|
ref: this.ref
|
|
5438
5444
|
}));
|
|
5439
5445
|
}
|
|
@@ -5491,12 +5497,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
5491
5497
|
|
|
5492
5498
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
5493
5499
|
|
|
5494
|
-
function
|
|
5500
|
+
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); }; }
|
|
5495
5501
|
|
|
5496
|
-
function
|
|
5502
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
5497
5503
|
|
|
5498
5504
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
5499
5505
|
|
|
5506
|
+
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; } }
|
|
5507
|
+
|
|
5508
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
5509
|
+
|
|
5500
5510
|
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); }
|
|
5501
5511
|
|
|
5502
5512
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -5507,14 +5517,12 @@ var SDK_URL = 'https://widget.mixcloud.com/media/js/widgetApi.js';
|
|
|
5507
5517
|
var SDK_GLOBAL = 'Mixcloud';
|
|
5508
5518
|
var MATCH_URL = /mixcloud\.com\/([^/]+\/[^/]+)/;
|
|
5509
5519
|
|
|
5510
|
-
var Mixcloud =
|
|
5511
|
-
/*#__PURE__*/
|
|
5512
|
-
function (_Component) {
|
|
5520
|
+
var Mixcloud = /*#__PURE__*/function (_Component) {
|
|
5513
5521
|
_inherits(Mixcloud, _Component);
|
|
5514
5522
|
|
|
5515
|
-
|
|
5516
|
-
var _getPrototypeOf2;
|
|
5523
|
+
var _super = _createSuper(Mixcloud);
|
|
5517
5524
|
|
|
5525
|
+
function Mixcloud() {
|
|
5518
5526
|
var _this;
|
|
5519
5527
|
|
|
5520
5528
|
_classCallCheck(this, Mixcloud);
|
|
@@ -5523,7 +5531,7 @@ function (_Component) {
|
|
|
5523
5531
|
args[_key] = arguments[_key];
|
|
5524
5532
|
}
|
|
5525
5533
|
|
|
5526
|
-
_this =
|
|
5534
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
5527
5535
|
|
|
5528
5536
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
5529
5537
|
|
|
@@ -5626,7 +5634,7 @@ function (_Component) {
|
|
|
5626
5634
|
})); // We have to give the iframe a key here to prevent a
|
|
5627
5635
|
// weird dialog appearing when loading a new track
|
|
5628
5636
|
|
|
5629
|
-
return _react["default"].createElement("iframe", {
|
|
5637
|
+
return /*#__PURE__*/_react["default"].createElement("iframe", {
|
|
5630
5638
|
key: id,
|
|
5631
5639
|
ref: this.ref,
|
|
5632
5640
|
style: style,
|
|
@@ -5686,23 +5694,33 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
5686
5694
|
|
|
5687
5695
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
5688
5696
|
|
|
5689
|
-
function
|
|
5697
|
+
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); }; }
|
|
5690
5698
|
|
|
5691
|
-
function
|
|
5699
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
5692
5700
|
|
|
5693
5701
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
5694
5702
|
|
|
5703
|
+
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; } }
|
|
5704
|
+
|
|
5705
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
5706
|
+
|
|
5695
5707
|
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); }
|
|
5696
5708
|
|
|
5697
5709
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
5698
5710
|
|
|
5699
5711
|
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; }
|
|
5700
5712
|
|
|
5713
|
+
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; } } }; }
|
|
5714
|
+
|
|
5715
|
+
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); }
|
|
5716
|
+
|
|
5717
|
+
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; }
|
|
5718
|
+
|
|
5701
5719
|
var IOS = typeof navigator !== 'undefined' && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
|
5702
5720
|
var AUDIO_EXTENSIONS = /\.(m4a|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i;
|
|
5703
5721
|
var VIDEO_EXTENSIONS = /\.(mp4|og[gv]|webm|mov|m4v)($|\?)/i;
|
|
5704
5722
|
var HLS_EXTENSIONS = /\.(m3u8)($|\?)/i;
|
|
5705
|
-
var HLS_SDK_URL = 'https://cdn.jsdelivr.net/npm/hls.js@VERSION';
|
|
5723
|
+
var HLS_SDK_URL = 'https://cdn.jsdelivr.net/npm/hls.js@VERSION/dist/hls.min.js';
|
|
5706
5724
|
var HLS_GLOBAL = 'Hls';
|
|
5707
5725
|
var DASH_EXTENSIONS = /\.(mpd)($|\?)/i;
|
|
5708
5726
|
var DASH_SDK_URL = 'https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js';
|
|
@@ -5711,12 +5729,11 @@ var MATCH_DROPBOX_URL = /www\.dropbox\.com\/.+/;
|
|
|
5711
5729
|
|
|
5712
5730
|
function canPlay(url) {
|
|
5713
5731
|
if (url instanceof Array) {
|
|
5714
|
-
var
|
|
5715
|
-
|
|
5716
|
-
var _iteratorError = undefined;
|
|
5732
|
+
var _iterator = _createForOfIteratorHelper(url),
|
|
5733
|
+
_step;
|
|
5717
5734
|
|
|
5718
5735
|
try {
|
|
5719
|
-
for (
|
|
5736
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
5720
5737
|
var item = _step.value;
|
|
5721
5738
|
|
|
5722
5739
|
if (typeof item === 'string' && canPlay(item)) {
|
|
@@ -5728,18 +5745,9 @@ function canPlay(url) {
|
|
|
5728
5745
|
}
|
|
5729
5746
|
}
|
|
5730
5747
|
} catch (err) {
|
|
5731
|
-
|
|
5732
|
-
_iteratorError = err;
|
|
5748
|
+
_iterator.e(err);
|
|
5733
5749
|
} finally {
|
|
5734
|
-
|
|
5735
|
-
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
5736
|
-
_iterator["return"]();
|
|
5737
|
-
}
|
|
5738
|
-
} finally {
|
|
5739
|
-
if (_didIteratorError) {
|
|
5740
|
-
throw _iteratorError;
|
|
5741
|
-
}
|
|
5742
|
-
}
|
|
5750
|
+
_iterator.f();
|
|
5743
5751
|
}
|
|
5744
5752
|
|
|
5745
5753
|
return false;
|
|
@@ -5763,14 +5771,12 @@ function canEnablePIP(url) {
|
|
|
5763
5771
|
return canPlay(url) && (!!document.pictureInPictureEnabled || supportsWebKitPresentationMode()) && !AUDIO_EXTENSIONS.test(url);
|
|
5764
5772
|
}
|
|
5765
5773
|
|
|
5766
|
-
var FilePlayer =
|
|
5767
|
-
/*#__PURE__*/
|
|
5768
|
-
function (_Component) {
|
|
5774
|
+
var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
5769
5775
|
_inherits(FilePlayer, _Component);
|
|
5770
5776
|
|
|
5771
|
-
|
|
5772
|
-
var _getPrototypeOf2;
|
|
5777
|
+
var _super = _createSuper(FilePlayer);
|
|
5773
5778
|
|
|
5779
|
+
function FilePlayer() {
|
|
5774
5780
|
var _this;
|
|
5775
5781
|
|
|
5776
5782
|
_classCallCheck(this, FilePlayer);
|
|
@@ -5779,7 +5785,7 @@ function (_Component) {
|
|
|
5779
5785
|
_args[_key] = arguments[_key];
|
|
5780
5786
|
}
|
|
5781
5787
|
|
|
5782
|
-
_this =
|
|
5788
|
+
_this = _super.call.apply(_super, [this].concat(_args));
|
|
5783
5789
|
|
|
5784
5790
|
_defineProperty(_assertThisInitialized(_this), "onReady", function () {
|
|
5785
5791
|
var _this$props;
|
|
@@ -5866,19 +5872,19 @@ function (_Component) {
|
|
|
5866
5872
|
|
|
5867
5873
|
_defineProperty(_assertThisInitialized(_this), "renderSourceElement", function (source, index) {
|
|
5868
5874
|
if (typeof source === 'string') {
|
|
5869
|
-
return _react["default"].createElement("source", {
|
|
5875
|
+
return /*#__PURE__*/_react["default"].createElement("source", {
|
|
5870
5876
|
key: index,
|
|
5871
5877
|
src: source
|
|
5872
5878
|
});
|
|
5873
5879
|
}
|
|
5874
5880
|
|
|
5875
|
-
return _react["default"].createElement("source", _extends({
|
|
5881
|
+
return /*#__PURE__*/_react["default"].createElement("source", _extends({
|
|
5876
5882
|
key: index
|
|
5877
5883
|
}, source));
|
|
5878
5884
|
});
|
|
5879
5885
|
|
|
5880
5886
|
_defineProperty(_assertThisInitialized(_this), "renderTrack", function (track, index) {
|
|
5881
|
-
return _react["default"].createElement("track", _extends({
|
|
5887
|
+
return /*#__PURE__*/_react["default"].createElement("track", _extends({
|
|
5882
5888
|
key: index
|
|
5883
5889
|
}, track));
|
|
5884
5890
|
});
|
|
@@ -5916,6 +5922,10 @@ function (_Component) {
|
|
|
5916
5922
|
key: "componentWillUnmount",
|
|
5917
5923
|
value: function componentWillUnmount() {
|
|
5918
5924
|
this.removeListeners(this.player);
|
|
5925
|
+
|
|
5926
|
+
if (this.hls) {
|
|
5927
|
+
this.hls.destroy();
|
|
5928
|
+
}
|
|
5919
5929
|
}
|
|
5920
5930
|
}, {
|
|
5921
5931
|
key: "addListeners",
|
|
@@ -6046,10 +6056,6 @@ function (_Component) {
|
|
|
6046
6056
|
value: function stop() {
|
|
6047
6057
|
this.player.removeAttribute('src');
|
|
6048
6058
|
|
|
6049
|
-
if (this.hls) {
|
|
6050
|
-
this.hls.destroy();
|
|
6051
|
-
}
|
|
6052
|
-
|
|
6053
6059
|
if (this.dash) {
|
|
6054
6060
|
this.dash.reset();
|
|
6055
6061
|
}
|
|
@@ -6161,7 +6167,7 @@ function (_Component) {
|
|
|
6161
6167
|
width: width === 'auto' ? width : '100%',
|
|
6162
6168
|
height: height === 'auto' ? height : '100%'
|
|
6163
6169
|
};
|
|
6164
|
-
return _react["default"].createElement(Element, _extends({
|
|
6170
|
+
return /*#__PURE__*/_react["default"].createElement(Element, _extends({
|
|
6165
6171
|
ref: this.ref,
|
|
6166
6172
|
src: this.getSource(url),
|
|
6167
6173
|
style: style,
|
|
@@ -6251,12 +6257,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
6251
6257
|
|
|
6252
6258
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
6253
6259
|
|
|
6254
|
-
function
|
|
6260
|
+
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); }; }
|
|
6255
6261
|
|
|
6256
|
-
function
|
|
6262
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
6257
6263
|
|
|
6258
6264
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
6259
6265
|
|
|
6266
|
+
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; } }
|
|
6267
|
+
|
|
6268
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
6269
|
+
|
|
6260
6270
|
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); }
|
|
6261
6271
|
|
|
6262
6272
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -6265,14 +6275,12 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
6265
6275
|
|
|
6266
6276
|
var ICON_SIZE = '64px';
|
|
6267
6277
|
|
|
6268
|
-
var Preview =
|
|
6269
|
-
/*#__PURE__*/
|
|
6270
|
-
function (_Component) {
|
|
6278
|
+
var Preview = /*#__PURE__*/function (_Component) {
|
|
6271
6279
|
_inherits(Preview, _Component);
|
|
6272
6280
|
|
|
6273
|
-
|
|
6274
|
-
var _getPrototypeOf2;
|
|
6281
|
+
var _super = _createSuper(Preview);
|
|
6275
6282
|
|
|
6283
|
+
function Preview() {
|
|
6276
6284
|
var _this;
|
|
6277
6285
|
|
|
6278
6286
|
_classCallCheck(this, Preview);
|
|
@@ -6281,7 +6289,7 @@ function (_Component) {
|
|
|
6281
6289
|
args[_key] = arguments[_key];
|
|
6282
6290
|
}
|
|
6283
6291
|
|
|
6284
|
-
_this =
|
|
6292
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
6285
6293
|
|
|
6286
6294
|
_defineProperty(_assertThisInitialized(_this), "mounted", false);
|
|
6287
6295
|
|
|
@@ -6379,15 +6387,15 @@ function (_Component) {
|
|
|
6379
6387
|
}
|
|
6380
6388
|
};
|
|
6381
6389
|
|
|
6382
|
-
var defaultPlayIcon = _react["default"].createElement("div", {
|
|
6390
|
+
var defaultPlayIcon = /*#__PURE__*/_react["default"].createElement("div", {
|
|
6383
6391
|
style: styles.shadow,
|
|
6384
6392
|
className: "react-player__shadow"
|
|
6385
|
-
}, _react["default"].createElement("div", {
|
|
6393
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
6386
6394
|
style: styles.playIcon,
|
|
6387
6395
|
className: "react-player__play-icon"
|
|
6388
6396
|
}));
|
|
6389
6397
|
|
|
6390
|
-
return _react["default"].createElement("div", {
|
|
6398
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
6391
6399
|
style: styles.preview,
|
|
6392
6400
|
className: "react-player__preview",
|
|
6393
6401
|
onClick: onClick
|
|
@@ -6424,6 +6432,12 @@ var _Player = _interopRequireDefault(Player_1);
|
|
|
6424
6432
|
|
|
6425
6433
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
6426
6434
|
|
|
6435
|
+
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; } } }; }
|
|
6436
|
+
|
|
6437
|
+
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); }
|
|
6438
|
+
|
|
6439
|
+
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; }
|
|
6440
|
+
|
|
6427
6441
|
var PRELOAD_PLAYERS = [{
|
|
6428
6442
|
Player: YouTube_1.YouTube,
|
|
6429
6443
|
configKey: 'youtube',
|
|
@@ -6444,16 +6458,16 @@ var PRELOAD_PLAYERS = [{
|
|
|
6444
6458
|
|
|
6445
6459
|
function renderPreloadPlayers(url, controls, config) {
|
|
6446
6460
|
var players = [];
|
|
6447
|
-
|
|
6448
|
-
var
|
|
6449
|
-
|
|
6461
|
+
|
|
6462
|
+
var _iterator = _createForOfIteratorHelper(PRELOAD_PLAYERS),
|
|
6463
|
+
_step;
|
|
6450
6464
|
|
|
6451
6465
|
try {
|
|
6452
|
-
for (
|
|
6466
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
6453
6467
|
var player = _step.value;
|
|
6454
6468
|
|
|
6455
6469
|
if (!player.Player.canPlay(url) && config[player.configKey].preload) {
|
|
6456
|
-
players.push(_react["default"].createElement(_Player["default"], {
|
|
6470
|
+
players.push( /*#__PURE__*/_react["default"].createElement(_Player["default"], {
|
|
6457
6471
|
key: player.Player.displayName,
|
|
6458
6472
|
activePlayer: player.Player,
|
|
6459
6473
|
url: player.url,
|
|
@@ -6465,18 +6479,9 @@ function renderPreloadPlayers(url, controls, config) {
|
|
|
6465
6479
|
}
|
|
6466
6480
|
}
|
|
6467
6481
|
} catch (err) {
|
|
6468
|
-
|
|
6469
|
-
_iteratorError = err;
|
|
6482
|
+
_iterator.e(err);
|
|
6470
6483
|
} finally {
|
|
6471
|
-
|
|
6472
|
-
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
6473
|
-
_iterator["return"]();
|
|
6474
|
-
}
|
|
6475
|
-
} finally {
|
|
6476
|
-
if (_didIteratorError) {
|
|
6477
|
-
throw _iteratorError;
|
|
6478
|
-
}
|
|
6479
|
-
}
|
|
6484
|
+
_iterator.f();
|
|
6480
6485
|
}
|
|
6481
6486
|
|
|
6482
6487
|
return players;
|
|
@@ -6600,13 +6605,17 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
6600
6605
|
|
|
6601
6606
|
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); }
|
|
6602
6607
|
|
|
6603
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
|
|
6608
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
6609
|
+
|
|
6610
|
+
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."); }
|
|
6611
|
+
|
|
6612
|
+
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); }
|
|
6604
6613
|
|
|
6605
|
-
function
|
|
6614
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
|
|
6606
6615
|
|
|
6607
|
-
function
|
|
6616
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
6608
6617
|
|
|
6609
|
-
function
|
|
6618
|
+
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; }
|
|
6610
6619
|
|
|
6611
6620
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
6612
6621
|
|
|
@@ -6614,12 +6623,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
6614
6623
|
|
|
6615
6624
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
6616
6625
|
|
|
6617
|
-
function
|
|
6626
|
+
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); }; }
|
|
6618
6627
|
|
|
6619
|
-
function
|
|
6628
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
6620
6629
|
|
|
6621
6630
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
6622
6631
|
|
|
6632
|
+
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; } }
|
|
6633
|
+
|
|
6634
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
6635
|
+
|
|
6623
6636
|
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); }
|
|
6624
6637
|
|
|
6625
6638
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -6629,14 +6642,12 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
6629
6642
|
var SUPPORTED_PROPS = Object.keys(props.propTypes);
|
|
6630
6643
|
var customPlayers = [];
|
|
6631
6644
|
|
|
6632
|
-
var ReactPlayer =
|
|
6633
|
-
/*#__PURE__*/
|
|
6634
|
-
function (_Component) {
|
|
6645
|
+
var ReactPlayer = /*#__PURE__*/function (_Component) {
|
|
6635
6646
|
_inherits(ReactPlayer, _Component);
|
|
6636
6647
|
|
|
6637
|
-
|
|
6638
|
-
var _getPrototypeOf2;
|
|
6648
|
+
var _super = _createSuper(ReactPlayer);
|
|
6639
6649
|
|
|
6650
|
+
function ReactPlayer() {
|
|
6640
6651
|
var _this;
|
|
6641
6652
|
|
|
6642
6653
|
_classCallCheck(this, ReactPlayer);
|
|
@@ -6645,7 +6656,7 @@ function (_Component) {
|
|
|
6645
6656
|
args[_key] = arguments[_key];
|
|
6646
6657
|
}
|
|
6647
6658
|
|
|
6648
|
-
_this =
|
|
6659
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
6649
6660
|
|
|
6650
6661
|
_defineProperty(_assertThisInitialized(_this), "config", (0, utils.getConfig)(_this.props, props.defaultProps, true));
|
|
6651
6662
|
|
|
@@ -6756,7 +6767,7 @@ function (_Component) {
|
|
|
6756
6767
|
key: "renderActivePlayer",
|
|
6757
6768
|
value: function renderActivePlayer(url, activePlayer) {
|
|
6758
6769
|
if (!url) return null;
|
|
6759
|
-
return _react["default"].createElement(_Player4["default"], _extends({}, this.props, {
|
|
6770
|
+
return /*#__PURE__*/_react["default"].createElement(_Player4["default"], _extends({}, this.props, {
|
|
6760
6771
|
key: activePlayer.displayName,
|
|
6761
6772
|
ref: this.activePlayerRef,
|
|
6762
6773
|
config: this.config,
|
|
@@ -6793,14 +6804,14 @@ function (_Component) {
|
|
|
6793
6804
|
var preloadPlayers = (0, _preload["default"])(url, controls, this.config);
|
|
6794
6805
|
var players = [renderedActivePlayer].concat(_toConsumableArray(preloadPlayers)).sort(this.sortPlayers);
|
|
6795
6806
|
|
|
6796
|
-
var preview = _react["default"].createElement(_Preview["default"], {
|
|
6807
|
+
var preview = /*#__PURE__*/_react["default"].createElement(_Preview["default"], {
|
|
6797
6808
|
url: url,
|
|
6798
6809
|
light: light,
|
|
6799
6810
|
playIcon: playIcon,
|
|
6800
6811
|
onClick: this.handleClickPreview
|
|
6801
6812
|
});
|
|
6802
6813
|
|
|
6803
|
-
return _react["default"].createElement(Wrapper, _extends({
|
|
6814
|
+
return /*#__PURE__*/_react["default"].createElement(Wrapper, _extends({
|
|
6804
6815
|
ref: this.wrapperRef,
|
|
6805
6816
|
style: _objectSpread({}, style, {
|
|
6806
6817
|
width: width,
|
|
@@ -7348,7 +7359,7 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
7348
7359
|
{ className: 'mb-3' },
|
|
7349
7360
|
nodes.videos[series - 1].title
|
|
7350
7361
|
),
|
|
7351
|
-
nodes.videos[series - 1] && nodes.videos[series - 1].text && React__default.createElement(BlockContent, _extends
|
|
7362
|
+
nodes.videos[series - 1] && nodes.videos[series - 1].text && React__default.createElement(BlockContent, _extends({ serializers: getSerializers, blocks: nodes.videos[series - 1].text, imageOptions: { w: 320, h: 240, fit: 'max' } }, client.config()))
|
|
7352
7363
|
),
|
|
7353
7364
|
React__default.createElement(
|
|
7354
7365
|
'style',
|
|
@@ -7476,7 +7487,7 @@ var Poll = function Poll(_ref) {
|
|
|
7476
7487
|
);
|
|
7477
7488
|
};
|
|
7478
7489
|
|
|
7479
|
-
var numberOfPaginations =
|
|
7490
|
+
var numberOfPaginations = main_38 ? 4 : 10;
|
|
7480
7491
|
|
|
7481
7492
|
var Quiz = function Quiz(_ref) {
|
|
7482
7493
|
var quizzes = _ref.quizzes,
|
|
@@ -7589,7 +7600,7 @@ var Quiz = function Quiz(_ref) {
|
|
|
7589
7600
|
var renderPagination = function renderPagination() {
|
|
7590
7601
|
return React__default.createElement(
|
|
7591
7602
|
Pagination,
|
|
7592
|
-
{ className: 'p-0 m-0', size:
|
|
7603
|
+
{ className: 'p-0 m-0', size: main_38 && 'sm' },
|
|
7593
7604
|
React__default.createElement(Pagination.First, { onClick: function onClick() {
|
|
7594
7605
|
return changePage('first');
|
|
7595
7606
|
}, disabled: currentPage === 1 }),
|
|
@@ -7766,6 +7777,145 @@ var urlFor$2 = function urlFor(source, client) {
|
|
|
7766
7777
|
return builder.image(source).auto('format');
|
|
7767
7778
|
};
|
|
7768
7779
|
|
|
7780
|
+
var compareProps = function compareProps(prevProps, nextProps) {
|
|
7781
|
+
if (nextProps.node.asset && nextProps.node.asset._ref) {
|
|
7782
|
+
return prevProps.node.asset._ref === nextProps.node.asset._ref;
|
|
7783
|
+
}
|
|
7784
|
+
};
|
|
7785
|
+
|
|
7786
|
+
var FigureComponent = function FigureComponent(props) {
|
|
7787
|
+
var _useState = useState(false),
|
|
7788
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
7789
|
+
openImg = _useState2[0],
|
|
7790
|
+
setOpenImg = _useState2[1];
|
|
7791
|
+
|
|
7792
|
+
var _useState3 = useState(''),
|
|
7793
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
7794
|
+
openImgSrc = _useState4[0],
|
|
7795
|
+
setOpenImgSrc = _useState4[1];
|
|
7796
|
+
|
|
7797
|
+
if (typeof window === 'undefined') return null;
|
|
7798
|
+
|
|
7799
|
+
var node = props.node,
|
|
7800
|
+
client = props.client;
|
|
7801
|
+
|
|
7802
|
+
|
|
7803
|
+
if (!node.asset) return null;
|
|
7804
|
+
|
|
7805
|
+
var caption = node.caption,
|
|
7806
|
+
alt = node.alt,
|
|
7807
|
+
blank = node.blank,
|
|
7808
|
+
link = node.link,
|
|
7809
|
+
_node$alignment = node.alignment,
|
|
7810
|
+
alignment = _node$alignment === undefined ? 'center' : _node$alignment,
|
|
7811
|
+
_node$class_name = node.class_name,
|
|
7812
|
+
class_name = _node$class_name === undefined ? 'd-block' : _node$class_name,
|
|
7813
|
+
_node$disableTextWrap = node.disableTextWrap,
|
|
7814
|
+
disableTextWrap = _node$disableTextWrap === undefined ? false : _node$disableTextWrap;
|
|
7815
|
+
var _node$widthP = node.widthP,
|
|
7816
|
+
widthP = _node$widthP === undefined ? 'auto' : _node$widthP;
|
|
7817
|
+
|
|
7818
|
+
|
|
7819
|
+
var screenWidth = window.innerWidth;
|
|
7820
|
+
|
|
7821
|
+
if (client.clientConfig && client.clientConfig.defaultImageSize && widthP === 'auto') {
|
|
7822
|
+
widthP = client.clientConfig.defaultImageSize;
|
|
7823
|
+
}
|
|
7824
|
+
|
|
7825
|
+
var imageFloat = 'none';
|
|
7826
|
+
if (screenWidth > 1000) {
|
|
7827
|
+
var align = ['center', 'top'].includes(alignment.toLowerCase()) ? 'none' : alignment.toLowerCase();
|
|
7828
|
+
imageFloat = align;
|
|
7829
|
+
}
|
|
7830
|
+
|
|
7831
|
+
var figureMargin = null;
|
|
7832
|
+
if (imageFloat === 'none') {
|
|
7833
|
+
figureMargin = '0 auto 1rem';
|
|
7834
|
+
}
|
|
7835
|
+
if (imageFloat === 'left') {
|
|
7836
|
+
figureMargin = '0 1.5rem 1.5rem 0';
|
|
7837
|
+
}
|
|
7838
|
+
if (imageFloat === 'right') {
|
|
7839
|
+
figureMargin = '0 0 1.5rem 1.5rem';
|
|
7840
|
+
}
|
|
7841
|
+
|
|
7842
|
+
var imageWidth = null;
|
|
7843
|
+
if (screenWidth > 1000) {
|
|
7844
|
+
if (widthP === 'auto') {
|
|
7845
|
+
if (imageFloat === 'none') {
|
|
7846
|
+
imageWidth = 'auto';
|
|
7847
|
+
} else {
|
|
7848
|
+
imageWidth = '30%';
|
|
7849
|
+
}
|
|
7850
|
+
} else {
|
|
7851
|
+
imageWidth = widthP + '%';
|
|
7852
|
+
}
|
|
7853
|
+
} else {
|
|
7854
|
+
imageWidth = '100%';
|
|
7855
|
+
}
|
|
7856
|
+
|
|
7857
|
+
var figureStyle = disableTextWrap ? { maxWidth: '100%', width: imageWidth, margin: imageFloat !== 'none' ? imageFloat === 'left' ? '' : '0 0 0 auto' : '' } : {
|
|
7858
|
+
width: imageWidth,
|
|
7859
|
+
maxWidth: '100%',
|
|
7860
|
+
clear: 'both',
|
|
7861
|
+
float: imageFloat,
|
|
7862
|
+
margin: figureMargin
|
|
7863
|
+
};
|
|
7864
|
+
|
|
7865
|
+
return React__default.createElement(
|
|
7866
|
+
React__default.Fragment,
|
|
7867
|
+
null,
|
|
7868
|
+
React__default.createElement(
|
|
7869
|
+
Figure$1,
|
|
7870
|
+
{ className: '' + class_name, style: figureStyle },
|
|
7871
|
+
link ? React__default.createElement(
|
|
7872
|
+
'a',
|
|
7873
|
+
{ target: blank ? '_blank' : '_self', href: link },
|
|
7874
|
+
React__default.createElement(Figure$1.Image, { style: { maxWidth: '100%' }, className: 'figure-image', src: urlFor$2(node, client).url(), alt: alt && alt }),
|
|
7875
|
+
caption && React__default.createElement('div', { dangerouslySetInnerHTML: { __html: '<span class=\'figure-caption\'>' + caption + '</span>' } })
|
|
7876
|
+
) : React__default.createElement(
|
|
7877
|
+
React__default.Fragment,
|
|
7878
|
+
null,
|
|
7879
|
+
React__default.createElement(Figure$1.Image, {
|
|
7880
|
+
style: { maxWidth: '100%', cursor: 'pointer', width: 'auto' },
|
|
7881
|
+
className: 'figure-image',
|
|
7882
|
+
src: urlFor$2(node, client).url(),
|
|
7883
|
+
alt: alt && alt,
|
|
7884
|
+
onClick: function onClick() {
|
|
7885
|
+
setOpenImgSrc(urlFor$2(node, client).url());
|
|
7886
|
+
setOpenImg(true);
|
|
7887
|
+
}
|
|
7888
|
+
}),
|
|
7889
|
+
caption && React__default.createElement('div', { dangerouslySetInnerHTML: { __html: '<span class=\'figure-caption\'>' + caption + '</span>' } })
|
|
7890
|
+
)
|
|
7891
|
+
),
|
|
7892
|
+
React__default.createElement(
|
|
7893
|
+
'div',
|
|
7894
|
+
{ className: 'lightbox-target ' + (openImg ? 'open' : 'close') },
|
|
7895
|
+
React__default.createElement('img', { src: openImgSrc }),
|
|
7896
|
+
React__default.createElement('a', {
|
|
7897
|
+
className: 'lightbox-close',
|
|
7898
|
+
onClick: function onClick() {
|
|
7899
|
+
setOpenImgSrc('');
|
|
7900
|
+
setOpenImg(false);
|
|
7901
|
+
}
|
|
7902
|
+
})
|
|
7903
|
+
),
|
|
7904
|
+
React__default.createElement(
|
|
7905
|
+
'style',
|
|
7906
|
+
{ jsx: 'true' },
|
|
7907
|
+
'\n figure-caption {\n font-size: 90%;\n color: #6c757d;\n }\n /*Eliminates padding, centers the thumbnail */\n\n /* Styles the lightbox, removes it from sight and adds the fade-in transition */\n\n .lightbox-target {\n position: fixed;\n top: -100%;\n width: 100%;\n background: rgba(0, 0, 0, 0.7);\n width: 100%;\n opacity: 0;\n -webkit-transition: opacity 0.5s ease-in-out;\n -moz-transition: opacity 0.5s ease-in-out;\n -o-transition: opacity 0.5s ease-in-out;\n transition: opacity 0.5s ease-in-out;\n overflow: hidden;\n }\n\n .lightbox-target.close {\n opacity: 0;\n }\n\n /* Styles the lightbox image, centers it vertically and horizontally, adds the zoom-in transition and makes it responsive using a combination of margin and absolute positioning */\n\n .lightbox-target img {\n margin: auto;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n max-height: 0%;\n max-width: 0%;\n border: 3px solid white;\n box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3);\n box-sizing: border-box;\n -webkit-transition: 0.5s ease-in-out;\n -moz-transition: 0.5s ease-in-out;\n -o-transition: 0.5s ease-in-out;\n transition: 0.5s ease-in-out;\n }\n\n /* Styles the close link, adds the slide down transition */\n\n a.lightbox-close {\n display: block;\n width: 50px;\n height: 50px;\n box-sizing: border-box;\n background: white;\n color: black;\n text-decoration: none;\n position: absolute;\n top: -80px;\n right: 0;\n -webkit-transition: 0.5s ease-in-out;\n -moz-transition: 0.5s ease-in-out;\n -o-transition: 0.5s ease-in-out;\n transition: 0.5s ease-in-out;\n }\n\n /* Provides part of the "X" to eliminate an image from the close link */\n\n a.lightbox-close:before {\n content: \'\';\n display: block;\n height: 30px;\n width: 1px;\n background: black;\n position: absolute;\n left: 26px;\n top: 10px;\n -webkit-transform: rotate(45deg);\n -moz-transform: rotate(45deg);\n -o-transform: rotate(45deg);\n transform: rotate(45deg);\n }\n\n /* Provides part of the "X" to eliminate an image from the close link */\n\n a.lightbox-close:after {\n content: \'\';\n display: block;\n height: 30px;\n width: 1px;\n background: black;\n position: absolute;\n left: 26px;\n top: 10px;\n -webkit-transform: rotate(-45deg);\n -moz-transform: rotate(-45deg);\n -o-transform: rotate(-45deg);\n transform: rotate(-45deg);\n }\n\n /* Uses the :target pseudo-class to perform the animations upon clicking the .lightbox-target anchor */\n\n .lightbox-target.open {\n opacity: 1;\n top: 0;\n bottom: 0;\n right: 0;\n z-index: 99999;\n }\n\n .lightbox-target.open img {\n max-height: 100%;\n max-width: 100%;\n }\n\n .lightbox-target.open a.lightbox-close {\n top: 0px;\n }\n '
|
|
7908
|
+
)
|
|
7909
|
+
);
|
|
7910
|
+
};
|
|
7911
|
+
|
|
7912
|
+
var Figure = React__default.memo(FigureComponent, compareProps);
|
|
7913
|
+
|
|
7914
|
+
var urlFor$3 = function urlFor(source, client) {
|
|
7915
|
+
var builder = imageUrlBuilder(client);
|
|
7916
|
+
return builder.image(source).auto('format');
|
|
7917
|
+
};
|
|
7918
|
+
|
|
7769
7919
|
var MultiFigure = function MultiFigure(props) {
|
|
7770
7920
|
var images = props.node.images,
|
|
7771
7921
|
client = props.client;
|
|
@@ -7784,11 +7934,11 @@ var MultiFigure = function MultiFigure(props) {
|
|
|
7784
7934
|
{ xs: 12, md: 12 / images.length, key: index },
|
|
7785
7935
|
React__default.createElement(
|
|
7786
7936
|
'a',
|
|
7787
|
-
_extends
|
|
7937
|
+
_extends({}, image.link && { href: image.link, target: image.blank ? '_blank' : '_self' }, { style: { cursor: image.link ? 'pointer' : 'default' } }),
|
|
7788
7938
|
React__default.createElement(
|
|
7789
7939
|
'div',
|
|
7790
7940
|
{ className: 'multi-figure-image-container' },
|
|
7791
|
-
React__default.createElement('img', { 'images-count': images.length, className: 'multi-figure-image', src: urlFor$
|
|
7941
|
+
React__default.createElement('img', { 'images-count': images.length, className: 'multi-figure-image', src: urlFor$3(image.asset, client).url(), alt: image.alt }),
|
|
7792
7942
|
image.caption && React__default.createElement(
|
|
7793
7943
|
'span',
|
|
7794
7944
|
{ className: 'multi-figure-caption' },
|
|
@@ -7828,10 +7978,6 @@ var AnchorLinkElement = function AnchorLinkElement(props) {
|
|
|
7828
7978
|
);
|
|
7829
7979
|
};
|
|
7830
7980
|
|
|
7831
|
-
var Figure = dynamic(function () {
|
|
7832
|
-
return import('./Figure-bc2b95d7.js');
|
|
7833
|
-
}, { ssr: false });
|
|
7834
|
-
|
|
7835
7981
|
var ScrollToElement = function ScrollToElement(elementId) {
|
|
7836
7982
|
var element = document.getElementById(elementId);
|
|
7837
7983
|
if (element) {
|