@mjhls/mjh-framework 1.0.294 → 1.0.296
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 +171 -171
- package/dist/cjs/ADInfeed-824fcfb6.js +54 -0
- package/dist/cjs/{AdSlot-0cd6f861.js → AdSlot-405b39eb.js} +5 -4
- package/dist/cjs/DeckContent.js +11 -11
- package/dist/cjs/DeckQueue.js +1 -1
- package/dist/cjs/{Figure-167c0214.js → Figure-0681dd7d.js} +1 -1
- package/dist/cjs/{GridContent-fa2e1b56.js → GridContent-929798bf.js} +3 -3
- package/dist/cjs/GridContent.js +4 -4
- package/dist/cjs/IssueContentDeck.js +1 -1
- package/dist/cjs/IssueDeck.js +1 -1
- package/dist/cjs/MasterDeck.js +9 -9
- package/dist/cjs/{Normal-61221bc6.js → Normal-d3a56ac1.js} +30 -30
- package/dist/cjs/PublicationDeck.js +1 -1
- package/dist/cjs/QueueDeckExpanded.js +3 -3
- package/dist/cjs/{TaxonomyCard-4210753c.js → TaxonomyCard-03364755.js} +1 -1
- package/dist/cjs/TaxonomyCard.js +2 -2
- package/dist/cjs/TemplateNormal.js +2 -2
- package/dist/cjs/ThumbnailCard.js +1 -1
- package/dist/cjs/VideoSeriesListing.js +1 -1
- package/dist/cjs/{YoutubeGroup-39eba427.js → YoutubeGroup-98ffbc57.js} +4 -4
- package/dist/cjs/YoutubeGroup.js +1 -1
- package/dist/cjs/{index-be0c82be.js → index-39beccb3.js} +2 -1
- package/dist/cjs/index.js +625 -572
- package/dist/esm/ADInfeed-a1d8cb44.js +49 -0
- package/dist/esm/{AdSlot-03043ffb.js → AdSlot-b4f04c96.js} +5 -4
- package/dist/esm/DeckContent.js +11 -11
- package/dist/esm/DeckQueue.js +1 -1
- package/dist/esm/{Figure-9f21ef27.js → Figure-cff72982.js} +1 -1
- package/dist/esm/{GridContent-88ed988c.js → GridContent-862176ac.js} +2 -2
- package/dist/esm/GridContent.js +4 -4
- package/dist/esm/IssueContentDeck.js +1 -1
- package/dist/esm/IssueDeck.js +1 -1
- package/dist/esm/MasterDeck.js +9 -9
- package/dist/esm/{Normal-3a537c0a.js → Normal-4180d06d.js} +30 -30
- package/dist/esm/PublicationDeck.js +1 -1
- package/dist/esm/QueueDeckExpanded.js +3 -3
- package/dist/esm/{TaxonomyCard-1d039949.js → TaxonomyCard-8d8c0d6f.js} +1 -1
- package/dist/esm/TaxonomyCard.js +2 -2
- package/dist/esm/TemplateNormal.js +2 -2
- package/dist/esm/ThumbnailCard.js +1 -1
- package/dist/esm/VideoSeriesListing.js +1 -1
- package/dist/esm/{YoutubeGroup-f59297bb.js → YoutubeGroup-562ed456.js} +4 -4
- package/dist/esm/YoutubeGroup.js +1 -1
- package/dist/esm/{index-73819142.js → index-3849e3fe.js} +2 -1
- package/dist/esm/index.js +629 -576
- package/package.json +103 -103
- package/dist/cjs/ADInfeed-db54195d.js +0 -47
- package/dist/esm/ADInfeed-ac3ac372.js +0 -42
package/dist/cjs/index.js
CHANGED
|
@@ -25,23 +25,23 @@ var Link = _interopDefault(require('next/link'));
|
|
|
25
25
|
var Router = require('next/router');
|
|
26
26
|
var Router__default = _interopDefault(Router);
|
|
27
27
|
require('react-dom');
|
|
28
|
-
var index = require('./index-
|
|
28
|
+
var index = require('./index-39beccb3.js');
|
|
29
29
|
require('./index-fa0fb52c.js');
|
|
30
30
|
var entities = require('./entities-310b46ee.js');
|
|
31
31
|
var slicedToArray = require('./slicedToArray-e38fb29d.js');
|
|
32
|
-
var AdSlot = require('./AdSlot-
|
|
32
|
+
var AdSlot = require('./AdSlot-405b39eb.js');
|
|
33
33
|
require('./promise-2c453658.js');
|
|
34
|
-
require('./ADInfeed-
|
|
34
|
+
require('./ADInfeed-824fcfb6.js');
|
|
35
35
|
var DeckContent = require('./DeckContent.js');
|
|
36
36
|
var get$1 = require('./get-de2660c3.js');
|
|
37
|
-
var GridContent = require('./GridContent-
|
|
37
|
+
var GridContent = require('./GridContent-929798bf.js');
|
|
38
38
|
var DeckQueue = require('./DeckQueue.js');
|
|
39
39
|
require('react-bootstrap/Media');
|
|
40
40
|
var ThumbnailCard = require('./ThumbnailCard.js');
|
|
41
|
-
var TaxonomyCard = require('./TaxonomyCard-
|
|
41
|
+
var TaxonomyCard = require('./TaxonomyCard-03364755.js');
|
|
42
42
|
require('./react-social-icons-cd0d9d3b.js');
|
|
43
43
|
var GroupDeck = require('./GroupDeck.js');
|
|
44
|
-
var YoutubeGroup = require('./YoutubeGroup-
|
|
44
|
+
var YoutubeGroup = require('./YoutubeGroup-98ffbc57.js');
|
|
45
45
|
var reactBootstrap = require('react-bootstrap');
|
|
46
46
|
var QueueDeckExpanded = require('./QueueDeckExpanded.js');
|
|
47
47
|
var index_esm = require('./index.esm-340d3792.js');
|
|
@@ -53,7 +53,7 @@ var IssueDeck = require('./IssueDeck.js');
|
|
|
53
53
|
require('react-bootstrap/Badge');
|
|
54
54
|
var IssueContentDeck = require('./IssueContentDeck.js');
|
|
55
55
|
var Spinner = _interopDefault(require('react-bootstrap/Spinner'));
|
|
56
|
-
var TemplateNormal = require('./Normal-
|
|
56
|
+
var TemplateNormal = require('./Normal-d3a56ac1.js');
|
|
57
57
|
require('react-bootstrap/ListGroup');
|
|
58
58
|
var Head = _interopDefault(require('next/head'));
|
|
59
59
|
var Accordion = _interopDefault(require('react-bootstrap/Accordion'));
|
|
@@ -2921,7 +2921,6 @@ var ADFloatingFooter = function ADFloatingFooter(_ref) {
|
|
|
2921
2921
|
_floatingAd$sizes = floatingAd.sizes,
|
|
2922
2922
|
sizes = _floatingAd$sizes === undefined ? [[728, 90]] : _floatingAd$sizes;
|
|
2923
2923
|
|
|
2924
|
-
|
|
2925
2924
|
var adTargeting = {
|
|
2926
2925
|
content_placement: targeting.content_placement,
|
|
2927
2926
|
tags: targeting.tags,
|
|
@@ -2931,15 +2930,10 @@ var ADFloatingFooter = function ADFloatingFooter(_ref) {
|
|
|
2931
2930
|
campaign_id: targeting.campaign_id
|
|
2932
2931
|
};
|
|
2933
2932
|
|
|
2934
|
-
var _useState = React.useState(
|
|
2933
|
+
var _useState = React.useState(true),
|
|
2935
2934
|
_useState2 = slicedToArray._slicedToArray(_useState, 2),
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
var _useState3 = React.useState(true),
|
|
2940
|
-
_useState4 = slicedToArray._slicedToArray(_useState3, 2),
|
|
2941
|
-
widthFlag = _useState4[0],
|
|
2942
|
-
setWidthFlag = _useState4[1];
|
|
2935
|
+
widthFlag = _useState2[0],
|
|
2936
|
+
setWidthFlag = _useState2[1];
|
|
2943
2937
|
|
|
2944
2938
|
React.useEffect(function () {
|
|
2945
2939
|
if (window && window.innerWidth < minScreenWidth) {
|
|
@@ -2947,17 +2941,42 @@ var ADFloatingFooter = function ADFloatingFooter(_ref) {
|
|
|
2947
2941
|
}
|
|
2948
2942
|
}, [minScreenWidth]);
|
|
2949
2943
|
|
|
2944
|
+
var collapseAd = function collapseAd() {
|
|
2945
|
+
var parent = document.getElementById('floating-ad-wrapper');
|
|
2946
|
+
parent.style.height = '0%';
|
|
2947
|
+
parent.style.width = '0%';
|
|
2948
|
+
parent.style.display = 'none';
|
|
2949
|
+
};
|
|
2950
|
+
|
|
2951
|
+
var checkIsAdFound = function checkIsAdFound(isFound) {
|
|
2952
|
+
if (isFound) {
|
|
2953
|
+
var parent = document.getElementById('floating-ad-wrapper');
|
|
2954
|
+
parent.style.display = 'block';
|
|
2955
|
+
} else {
|
|
2956
|
+
collapseAd();
|
|
2957
|
+
}
|
|
2958
|
+
};
|
|
2959
|
+
|
|
2950
2960
|
return React__default.createElement(
|
|
2951
2961
|
React__default.Fragment,
|
|
2952
2962
|
null,
|
|
2953
|
-
|
|
2963
|
+
widthFlag && React__default.createElement(
|
|
2954
2964
|
'div',
|
|
2955
|
-
{ className: 'floating-ad-wrapper ' + title },
|
|
2956
|
-
React__default.createElement(AdSlot.DFPAdSlot, {
|
|
2965
|
+
{ id: 'floating-ad-wrapper', className: 'floating-ad-wrapper ' + title },
|
|
2966
|
+
React__default.createElement(AdSlot.DFPAdSlot, {
|
|
2967
|
+
className: className,
|
|
2968
|
+
slotId: slotId,
|
|
2969
|
+
networkID: networkID,
|
|
2970
|
+
sizes: sizes,
|
|
2971
|
+
adUnit: adUnit,
|
|
2972
|
+
targeting: adTargeting,
|
|
2973
|
+
refreshFlag: false,
|
|
2974
|
+
checkIsAdFound: checkIsAdFound
|
|
2975
|
+
}),
|
|
2957
2976
|
React__default.createElement(
|
|
2958
2977
|
'div',
|
|
2959
2978
|
{ className: 'closeButton', onClick: function onClick() {
|
|
2960
|
-
return
|
|
2979
|
+
return collapseAd();
|
|
2961
2980
|
} },
|
|
2962
2981
|
'x'
|
|
2963
2982
|
)
|
|
@@ -2965,7 +2984,7 @@ var ADFloatingFooter = function ADFloatingFooter(_ref) {
|
|
|
2965
2984
|
React__default.createElement(
|
|
2966
2985
|
'style',
|
|
2967
2986
|
{ jsx: 'true' },
|
|
2968
|
-
'\n .floating-ad-wrapper {\n width: auto;\n margin: 0;\n background-color: #f5f5f5;\n position: fixed;\n bottom: 0;\n left: 50%;\n transform: translateX(-50%);\n z-index: 9000;\n }\n .closeButton {\n position: absolute;\n top: -10px;\n right: -10px;\n background: grey;\n color: white;\n font-weight: 500;\n border: 2px solid white;\n border-radius: 50%;\n width: 30px;\n height: 30px;\n text-align: center;\n font-size: 17px;\n cursor: pointer;\n }\n '
|
|
2987
|
+
'\n .floating-ad-wrapper {\n width: auto;\n margin: 0;\n background-color: #f5f5f5;\n position: fixed;\n bottom: 0;\n left: 50%;\n transform: translateX(-50%);\n z-index: 9000;\n display: none;\n }\n .closeButton {\n position: absolute;\n top: -10px;\n right: -10px;\n background: grey;\n color: white;\n font-weight: 500;\n border: 2px solid white;\n border-radius: 50%;\n width: 30px;\n height: 30px;\n text-align: center;\n font-size: 17px;\n cursor: pointer;\n }\n '
|
|
2969
2988
|
)
|
|
2970
2989
|
);
|
|
2971
2990
|
};
|
|
@@ -3051,21 +3070,15 @@ var ADWelcome = function ADWelcome(_ref) {
|
|
|
3051
3070
|
pos: position,
|
|
3052
3071
|
campaign_id: targeting.campaign_id
|
|
3053
3072
|
};
|
|
3054
|
-
var adRef = React.useRef(null);
|
|
3055
|
-
|
|
3056
|
-
var _useState = React.useState(),
|
|
3057
|
-
_useState2 = slicedToArray._slicedToArray(_useState, 2),
|
|
3058
|
-
showAd = _useState2[0],
|
|
3059
|
-
setShowAd = _useState2[1];
|
|
3060
3073
|
|
|
3061
3074
|
var calculateTimeLeft = function calculateTimeLeft(timeLeft) {
|
|
3062
3075
|
return --timeLeft;
|
|
3063
3076
|
};
|
|
3064
3077
|
|
|
3065
|
-
var
|
|
3066
|
-
|
|
3067
|
-
timeLeft =
|
|
3068
|
-
setTimeLeft =
|
|
3078
|
+
var _useState = React.useState(calculateTimeLeft(counter + 1)),
|
|
3079
|
+
_useState2 = slicedToArray._slicedToArray(_useState, 2),
|
|
3080
|
+
timeLeft = _useState2[0],
|
|
3081
|
+
setTimeLeft = _useState2[1];
|
|
3069
3082
|
|
|
3070
3083
|
React.useEffect(function () {
|
|
3071
3084
|
if (timeLeft > 0) {
|
|
@@ -3077,17 +3090,18 @@ var ADWelcome = function ADWelcome(_ref) {
|
|
|
3077
3090
|
}
|
|
3078
3091
|
});
|
|
3079
3092
|
|
|
3080
|
-
|
|
3081
|
-
if (
|
|
3082
|
-
|
|
3083
|
-
|
|
3093
|
+
var checkIsAdFound = function checkIsAdFound(isFound) {
|
|
3094
|
+
if (isFound) {
|
|
3095
|
+
var parent = document.getElementById('welcome-modal');
|
|
3096
|
+
parent.style.display = 'block';
|
|
3097
|
+
} else {
|
|
3084
3098
|
setFlag(true);
|
|
3085
3099
|
}
|
|
3086
|
-
}
|
|
3100
|
+
};
|
|
3087
3101
|
|
|
3088
3102
|
return React__default.createElement(
|
|
3089
3103
|
'div',
|
|
3090
|
-
{
|
|
3104
|
+
{ style: { outline: 'none', display: 'none' }, className: 'welcome-modal', id: 'welcome-modal' },
|
|
3091
3105
|
React__default.createElement(
|
|
3092
3106
|
'div',
|
|
3093
3107
|
{ className: 'right-top', style: { position: 'absolute', top: 0, right: 0, textAlign: 'center', margin: '2rem' } },
|
|
@@ -3124,7 +3138,16 @@ var ADWelcome = function ADWelcome(_ref) {
|
|
|
3124
3138
|
React__default.createElement(
|
|
3125
3139
|
'div',
|
|
3126
3140
|
{ className: title, style: { position: 'relative', width: '300px', height: '250px', margin: 'auto', top: '10rem' } },
|
|
3127
|
-
React__default.createElement(AdSlot.DFPAdSlot, {
|
|
3141
|
+
React__default.createElement(AdSlot.DFPAdSlot, {
|
|
3142
|
+
className: className,
|
|
3143
|
+
slotId: slotId,
|
|
3144
|
+
networkID: networkID,
|
|
3145
|
+
sizes: sizes,
|
|
3146
|
+
adUnit: adUnit,
|
|
3147
|
+
targeting: adTargeting,
|
|
3148
|
+
refreshFlag: false,
|
|
3149
|
+
checkIsAdFound: checkIsAdFound
|
|
3150
|
+
})
|
|
3128
3151
|
),
|
|
3129
3152
|
React__default.createElement(
|
|
3130
3153
|
'style',
|
|
@@ -3197,21 +3220,18 @@ var Slideshow = function Slideshow(_ref) {
|
|
|
3197
3220
|
);
|
|
3198
3221
|
};
|
|
3199
3222
|
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3223
|
+
// do not edit .js files directly - edit src/index.jst
|
|
3224
|
+
|
|
3225
|
+
|
|
3203
3226
|
|
|
3204
3227
|
var fastDeepEqual = function equal(a, b) {
|
|
3205
3228
|
if (a === b) return true;
|
|
3206
3229
|
|
|
3207
3230
|
if (a && b && typeof a == 'object' && typeof b == 'object') {
|
|
3208
|
-
|
|
3209
|
-
, arrB = isArray(b)
|
|
3210
|
-
, i
|
|
3211
|
-
, length
|
|
3212
|
-
, key;
|
|
3231
|
+
if (a.constructor !== b.constructor) return false;
|
|
3213
3232
|
|
|
3214
|
-
|
|
3233
|
+
var length, i, keys;
|
|
3234
|
+
if (Array.isArray(a)) {
|
|
3215
3235
|
length = a.length;
|
|
3216
3236
|
if (length != b.length) return false;
|
|
3217
3237
|
for (i = length; i-- !== 0;)
|
|
@@ -3219,35 +3239,29 @@ var fastDeepEqual = function equal(a, b) {
|
|
|
3219
3239
|
return true;
|
|
3220
3240
|
}
|
|
3221
3241
|
|
|
3222
|
-
if (arrA != arrB) return false;
|
|
3223
3242
|
|
|
3224
|
-
var dateA = a instanceof Date
|
|
3225
|
-
, dateB = b instanceof Date;
|
|
3226
|
-
if (dateA != dateB) return false;
|
|
3227
|
-
if (dateA && dateB) return a.getTime() == b.getTime();
|
|
3228
3243
|
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
if (
|
|
3232
|
-
if (regexpA && regexpB) return a.toString() == b.toString();
|
|
3244
|
+
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
3245
|
+
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
|
3246
|
+
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
|
3233
3247
|
|
|
3234
|
-
|
|
3248
|
+
keys = Object.keys(a);
|
|
3235
3249
|
length = keys.length;
|
|
3236
|
-
|
|
3237
|
-
if (length !== keyList(b).length)
|
|
3238
|
-
return false;
|
|
3250
|
+
if (length !== Object.keys(b).length) return false;
|
|
3239
3251
|
|
|
3240
3252
|
for (i = length; i-- !== 0;)
|
|
3241
|
-
if (!
|
|
3253
|
+
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
3242
3254
|
|
|
3243
3255
|
for (i = length; i-- !== 0;) {
|
|
3244
|
-
key = keys[i];
|
|
3256
|
+
var key = keys[i];
|
|
3257
|
+
|
|
3245
3258
|
if (!equal(a[key], b[key])) return false;
|
|
3246
3259
|
}
|
|
3247
3260
|
|
|
3248
3261
|
return true;
|
|
3249
3262
|
}
|
|
3250
3263
|
|
|
3264
|
+
// true if both NaN, false otherwise
|
|
3251
3265
|
return a!==a && b!==b;
|
|
3252
3266
|
};
|
|
3253
3267
|
|
|
@@ -4270,7 +4284,7 @@ function formatValue(ctx, value, recurseTimes) {
|
|
|
4270
4284
|
var base = '', array = false, braces = ['{', '}'];
|
|
4271
4285
|
|
|
4272
4286
|
// Make Array say that they are Array
|
|
4273
|
-
if (isArray
|
|
4287
|
+
if (isArray(value)) {
|
|
4274
4288
|
array = true;
|
|
4275
4289
|
braces = ['[', ']'];
|
|
4276
4290
|
}
|
|
@@ -4449,7 +4463,7 @@ function reduceToSingleString(output, base, braces) {
|
|
|
4449
4463
|
|
|
4450
4464
|
// NOTE: These type checking functions intentionally don't use `instanceof`
|
|
4451
4465
|
// because it is fragile and can be easily faked with `Object.create()`.
|
|
4452
|
-
function isArray
|
|
4466
|
+
function isArray(ar) {
|
|
4453
4467
|
return Array.isArray(ar);
|
|
4454
4468
|
}
|
|
4455
4469
|
|
|
@@ -4576,7 +4590,7 @@ var util = {
|
|
|
4576
4590
|
isNullOrUndefined: isNullOrUndefined,
|
|
4577
4591
|
isNull: isNull,
|
|
4578
4592
|
isBoolean: isBoolean,
|
|
4579
|
-
isArray: isArray
|
|
4593
|
+
isArray: isArray,
|
|
4580
4594
|
inspect: inspect,
|
|
4581
4595
|
deprecate: deprecate,
|
|
4582
4596
|
format: format,
|
|
@@ -5243,199 +5257,235 @@ module.exports = exports['default'];
|
|
|
5243
5257
|
|
|
5244
5258
|
var youTubePlayer = _commonjsHelpers.unwrapExports(dist);
|
|
5245
5259
|
|
|
5246
|
-
|
|
5247
|
-
|
|
5248
|
-
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; };
|
|
5260
|
+
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); }
|
|
5249
5261
|
|
|
5250
5262
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5251
5263
|
|
|
5252
|
-
function
|
|
5264
|
+
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); } }
|
|
5253
5265
|
|
|
5254
|
-
function
|
|
5266
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
5267
|
+
|
|
5268
|
+
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); }; }
|
|
5255
5269
|
|
|
5256
|
-
|
|
5257
|
-
|
|
5258
|
-
|
|
5259
|
-
|
|
5260
|
-
|
|
5270
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
5271
|
+
|
|
5272
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
5273
|
+
|
|
5274
|
+
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; } }
|
|
5275
|
+
|
|
5276
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
5277
|
+
|
|
5278
|
+
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
|
+
|
|
5280
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
5281
|
+
|
|
5282
|
+
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; }
|
|
5283
|
+
|
|
5284
|
+
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; }
|
|
5285
|
+
|
|
5286
|
+
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; }
|
|
5287
|
+
/**
|
|
5288
|
+
* Check whether a `props` change should result in the video being updated.
|
|
5289
|
+
*
|
|
5290
|
+
* @param {Object} prevProps
|
|
5291
|
+
* @param {Object} props
|
|
5261
5292
|
*/
|
|
5293
|
+
|
|
5262
5294
|
function shouldUpdateVideo(prevProps, props) {
|
|
5263
5295
|
// A changing video should always trigger an update
|
|
5264
5296
|
if (prevProps.videoId !== props.videoId) {
|
|
5265
5297
|
return true;
|
|
5266
|
-
}
|
|
5267
|
-
|
|
5268
|
-
// Otherwise, a change in the start/end time playerVars also requires a player
|
|
5298
|
+
} // Otherwise, a change in the start/end time playerVars also requires a player
|
|
5269
5299
|
// update.
|
|
5300
|
+
|
|
5301
|
+
|
|
5270
5302
|
var prevVars = prevProps.opts.playerVars || {};
|
|
5271
5303
|
var vars = props.opts.playerVars || {};
|
|
5272
|
-
|
|
5273
5304
|
return prevVars.start !== vars.start || prevVars.end !== vars.end;
|
|
5274
5305
|
}
|
|
5275
|
-
|
|
5276
|
-
|
|
5277
|
-
*
|
|
5278
|
-
*
|
|
5279
|
-
*
|
|
5280
|
-
*
|
|
5281
|
-
* @param {Object} opts
|
|
5306
|
+
/**
|
|
5307
|
+
* Neutralize API options that only require a video update, leaving only options
|
|
5308
|
+
* that require a player reset. The results can then be compared to see if a
|
|
5309
|
+
* player reset is necessary.
|
|
5310
|
+
*
|
|
5311
|
+
* @param {Object} opts
|
|
5282
5312
|
*/
|
|
5313
|
+
|
|
5314
|
+
|
|
5283
5315
|
function filterResetOptions(opts) {
|
|
5284
|
-
return
|
|
5285
|
-
playerVars:
|
|
5316
|
+
return _objectSpread({}, opts, {
|
|
5317
|
+
playerVars: _objectSpread({}, opts.playerVars, {
|
|
5286
5318
|
autoplay: 0,
|
|
5287
5319
|
start: 0,
|
|
5288
5320
|
end: 0
|
|
5289
5321
|
})
|
|
5290
5322
|
});
|
|
5291
5323
|
}
|
|
5292
|
-
|
|
5293
|
-
|
|
5294
|
-
*
|
|
5295
|
-
*
|
|
5296
|
-
*
|
|
5297
|
-
*
|
|
5298
|
-
*
|
|
5299
|
-
* @param {Object}
|
|
5300
|
-
* @param {Object} props
|
|
5324
|
+
/**
|
|
5325
|
+
* Check whether a `props` change should result in the player being reset.
|
|
5326
|
+
* The player is reset when the `props.opts` change, except if the only change
|
|
5327
|
+
* is in the `start` and `end` playerVars, because a video update can deal with
|
|
5328
|
+
* those.
|
|
5329
|
+
*
|
|
5330
|
+
* @param {Object} prevProps
|
|
5331
|
+
* @param {Object} props
|
|
5301
5332
|
*/
|
|
5333
|
+
|
|
5334
|
+
|
|
5302
5335
|
function shouldResetPlayer(prevProps, props) {
|
|
5303
5336
|
return !fastDeepEqual(filterResetOptions(prevProps.opts), filterResetOptions(props.opts));
|
|
5304
5337
|
}
|
|
5305
|
-
|
|
5306
|
-
|
|
5307
|
-
*
|
|
5308
|
-
*
|
|
5309
|
-
* @param {Object}
|
|
5310
|
-
* @param {Object} props
|
|
5338
|
+
/**
|
|
5339
|
+
* Check whether a props change should result in an id or className update.
|
|
5340
|
+
*
|
|
5341
|
+
* @param {Object} prevProps
|
|
5342
|
+
* @param {Object} props
|
|
5311
5343
|
*/
|
|
5344
|
+
|
|
5345
|
+
|
|
5312
5346
|
function shouldUpdatePlayer(prevProps, props) {
|
|
5313
5347
|
return prevProps.id !== props.id || prevProps.className !== props.className;
|
|
5314
5348
|
}
|
|
5315
5349
|
|
|
5316
|
-
var YouTube = function (_React$Component) {
|
|
5350
|
+
var YouTube = /*#__PURE__*/function (_React$Component) {
|
|
5317
5351
|
_inherits(YouTube, _React$Component);
|
|
5318
5352
|
|
|
5353
|
+
var _super = _createSuper(YouTube);
|
|
5354
|
+
|
|
5355
|
+
/**
|
|
5356
|
+
* Expose PlayerState constants for convenience. These constants can also be
|
|
5357
|
+
* accessed through the global YT object after the YouTube IFrame API is instantiated.
|
|
5358
|
+
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
5359
|
+
*/
|
|
5319
5360
|
function YouTube(props) {
|
|
5361
|
+
var _this;
|
|
5362
|
+
|
|
5320
5363
|
_classCallCheck(this, YouTube);
|
|
5321
5364
|
|
|
5322
|
-
|
|
5365
|
+
_this = _super.call(this, props);
|
|
5323
5366
|
|
|
5324
|
-
_this
|
|
5367
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerReady", function (event) {
|
|
5325
5368
|
return _this.props.onReady(event);
|
|
5326
|
-
};
|
|
5369
|
+
});
|
|
5327
5370
|
|
|
5328
|
-
_this
|
|
5371
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerError", function (event) {
|
|
5329
5372
|
return _this.props.onError(event);
|
|
5330
|
-
};
|
|
5373
|
+
});
|
|
5331
5374
|
|
|
5332
|
-
_this
|
|
5375
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerStateChange", function (event) {
|
|
5333
5376
|
_this.props.onStateChange(event);
|
|
5334
|
-
switch (event.data) {
|
|
5335
5377
|
|
|
5378
|
+
switch (event.data) {
|
|
5336
5379
|
case YouTube.PlayerState.ENDED:
|
|
5337
5380
|
_this.props.onEnd(event);
|
|
5381
|
+
|
|
5338
5382
|
break;
|
|
5339
5383
|
|
|
5340
5384
|
case YouTube.PlayerState.PLAYING:
|
|
5341
5385
|
_this.props.onPlay(event);
|
|
5386
|
+
|
|
5342
5387
|
break;
|
|
5343
5388
|
|
|
5344
5389
|
case YouTube.PlayerState.PAUSED:
|
|
5345
5390
|
_this.props.onPause(event);
|
|
5391
|
+
|
|
5346
5392
|
break;
|
|
5347
5393
|
}
|
|
5348
|
-
};
|
|
5394
|
+
});
|
|
5349
5395
|
|
|
5350
|
-
_this
|
|
5396
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerPlaybackRateChange", function (event) {
|
|
5351
5397
|
return _this.props.onPlaybackRateChange(event);
|
|
5352
|
-
};
|
|
5398
|
+
});
|
|
5353
5399
|
|
|
5354
|
-
_this
|
|
5400
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerPlaybackQualityChange", function (event) {
|
|
5355
5401
|
return _this.props.onPlaybackQualityChange(event);
|
|
5356
|
-
};
|
|
5402
|
+
});
|
|
5357
5403
|
|
|
5358
|
-
_this
|
|
5404
|
+
_defineProperty(_assertThisInitialized(_this), "createPlayer", function () {
|
|
5359
5405
|
// do not attempt to create a player server-side, it won't work
|
|
5360
|
-
if (typeof document === 'undefined') return;
|
|
5361
|
-
|
|
5362
|
-
var playerOpts =
|
|
5406
|
+
if (typeof document === 'undefined') return; // create player
|
|
5407
|
+
|
|
5408
|
+
var playerOpts = _objectSpread({}, _this.props.opts, {
|
|
5363
5409
|
// preload the `videoId` video if one is already given
|
|
5364
5410
|
videoId: _this.props.videoId
|
|
5365
5411
|
});
|
|
5366
|
-
|
|
5367
|
-
// attach event handlers
|
|
5412
|
+
|
|
5413
|
+
_this.internalPlayer = youTubePlayer(_this.container, playerOpts); // attach event handlers
|
|
5414
|
+
|
|
5368
5415
|
_this.internalPlayer.on('ready', _this.onPlayerReady);
|
|
5416
|
+
|
|
5369
5417
|
_this.internalPlayer.on('error', _this.onPlayerError);
|
|
5418
|
+
|
|
5370
5419
|
_this.internalPlayer.on('stateChange', _this.onPlayerStateChange);
|
|
5420
|
+
|
|
5371
5421
|
_this.internalPlayer.on('playbackRateChange', _this.onPlayerPlaybackRateChange);
|
|
5422
|
+
|
|
5372
5423
|
_this.internalPlayer.on('playbackQualityChange', _this.onPlayerPlaybackQualityChange);
|
|
5373
|
-
};
|
|
5424
|
+
});
|
|
5374
5425
|
|
|
5375
|
-
_this
|
|
5426
|
+
_defineProperty(_assertThisInitialized(_this), "resetPlayer", function () {
|
|
5376
5427
|
return _this.internalPlayer.destroy().then(_this.createPlayer);
|
|
5377
|
-
};
|
|
5428
|
+
});
|
|
5378
5429
|
|
|
5379
|
-
_this
|
|
5430
|
+
_defineProperty(_assertThisInitialized(_this), "updatePlayer", function () {
|
|
5380
5431
|
_this.internalPlayer.getIframe().then(function (iframe) {
|
|
5381
5432
|
if (_this.props.id) iframe.setAttribute('id', _this.props.id);else iframe.removeAttribute('id');
|
|
5382
5433
|
if (_this.props.className) iframe.setAttribute('class', _this.props.className);else iframe.removeAttribute('class');
|
|
5383
5434
|
});
|
|
5384
|
-
};
|
|
5435
|
+
});
|
|
5385
5436
|
|
|
5386
|
-
_this
|
|
5437
|
+
_defineProperty(_assertThisInitialized(_this), "updateVideo", function () {
|
|
5387
5438
|
if (typeof _this.props.videoId === 'undefined' || _this.props.videoId === null) {
|
|
5388
5439
|
_this.internalPlayer.stopVideo();
|
|
5440
|
+
|
|
5389
5441
|
return;
|
|
5390
|
-
}
|
|
5442
|
+
} // set queueing options
|
|
5443
|
+
|
|
5391
5444
|
|
|
5392
|
-
// set queueing options
|
|
5393
5445
|
var autoplay = false;
|
|
5394
5446
|
var opts = {
|
|
5395
5447
|
videoId: _this.props.videoId
|
|
5396
5448
|
};
|
|
5449
|
+
|
|
5397
5450
|
if ('playerVars' in _this.props.opts) {
|
|
5398
5451
|
autoplay = _this.props.opts.playerVars.autoplay === 1;
|
|
5452
|
+
|
|
5399
5453
|
if ('start' in _this.props.opts.playerVars) {
|
|
5400
5454
|
opts.startSeconds = _this.props.opts.playerVars.start;
|
|
5401
5455
|
}
|
|
5456
|
+
|
|
5402
5457
|
if ('end' in _this.props.opts.playerVars) {
|
|
5403
5458
|
opts.endSeconds = _this.props.opts.playerVars.end;
|
|
5404
5459
|
}
|
|
5405
|
-
}
|
|
5460
|
+
} // if autoplay is enabled loadVideoById
|
|
5461
|
+
|
|
5406
5462
|
|
|
5407
|
-
// if autoplay is enabled loadVideoById
|
|
5408
5463
|
if (autoplay) {
|
|
5409
5464
|
_this.internalPlayer.loadVideoById(opts);
|
|
5465
|
+
|
|
5410
5466
|
return;
|
|
5411
|
-
}
|
|
5412
|
-
|
|
5467
|
+
} // default behaviour just cues the video
|
|
5468
|
+
|
|
5469
|
+
|
|
5413
5470
|
_this.internalPlayer.cueVideoById(opts);
|
|
5414
|
-
};
|
|
5471
|
+
});
|
|
5415
5472
|
|
|
5416
|
-
_this
|
|
5473
|
+
_defineProperty(_assertThisInitialized(_this), "refContainer", function (container) {
|
|
5417
5474
|
_this.container = container;
|
|
5418
|
-
};
|
|
5475
|
+
});
|
|
5419
5476
|
|
|
5420
5477
|
_this.container = null;
|
|
5421
5478
|
_this.internalPlayer = null;
|
|
5422
5479
|
return _this;
|
|
5423
5480
|
}
|
|
5424
5481
|
|
|
5425
|
-
/**
|
|
5426
|
-
* Expose PlayerState constants for convenience. These constants can also be
|
|
5427
|
-
* accessed through the global YT object after the YouTube IFrame API is instantiated.
|
|
5428
|
-
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
5429
|
-
*/
|
|
5430
|
-
|
|
5431
|
-
|
|
5432
5482
|
_createClass(YouTube, [{
|
|
5433
|
-
key:
|
|
5483
|
+
key: "componentDidMount",
|
|
5434
5484
|
value: function componentDidMount() {
|
|
5435
5485
|
this.createPlayer();
|
|
5436
5486
|
}
|
|
5437
5487
|
}, {
|
|
5438
|
-
key:
|
|
5488
|
+
key: "componentDidUpdate",
|
|
5439
5489
|
value: function componentDidUpdate(prevProps) {
|
|
5440
5490
|
if (shouldUpdatePlayer(prevProps, this.props)) {
|
|
5441
5491
|
this.updatePlayer();
|
|
@@ -5450,112 +5500,58 @@ var YouTube = function (_React$Component) {
|
|
|
5450
5500
|
}
|
|
5451
5501
|
}
|
|
5452
5502
|
}, {
|
|
5453
|
-
key:
|
|
5503
|
+
key: "componentWillUnmount",
|
|
5454
5504
|
value: function componentWillUnmount() {
|
|
5455
|
-
/**
|
|
5456
|
-
* Note: The `youtube-player` package that is used promisifies all
|
|
5457
|
-
* Player API calls, which introduces a delay of a tick before it actually
|
|
5458
|
-
* gets destroyed. Since React attempts to remove the element instantly
|
|
5459
|
-
* this method isn't quick enough to reset the container element.
|
|
5505
|
+
/**
|
|
5506
|
+
* Note: The `youtube-player` package that is used promisifies all YouTube
|
|
5507
|
+
* Player API calls, which introduces a delay of a tick before it actually
|
|
5508
|
+
* gets destroyed. Since React attempts to remove the element instantly
|
|
5509
|
+
* this method isn't quick enough to reset the container element.
|
|
5460
5510
|
*/
|
|
5461
5511
|
this.internalPlayer.destroy();
|
|
5462
5512
|
}
|
|
5463
|
-
|
|
5464
|
-
|
|
5465
|
-
*
|
|
5466
|
-
*
|
|
5467
|
-
*
|
|
5468
|
-
* @param {Object} target - player object
|
|
5469
|
-
*/
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
/**
|
|
5473
|
-
* https://developers.google.com/youtube/iframe_api_reference#onError
|
|
5474
|
-
*
|
|
5475
|
-
* @param {Object} event
|
|
5476
|
-
* @param {Integer} data - error type
|
|
5477
|
-
* @param {Object} target - player object
|
|
5478
|
-
*/
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
/**
|
|
5482
|
-
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
5483
|
-
*
|
|
5484
|
-
* @param {Object} event
|
|
5485
|
-
* @param {Integer} data - status change type
|
|
5486
|
-
* @param {Object} target - actual YT player
|
|
5487
|
-
*/
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
/**
|
|
5491
|
-
* https://developers.google.com/youtube/iframe_api_reference#onPlaybackRateChange
|
|
5492
|
-
*
|
|
5493
|
-
* @param {Object} event
|
|
5494
|
-
* @param {Float} data - playback rate
|
|
5495
|
-
* @param {Object} target - actual YT player
|
|
5496
|
-
*/
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
/**
|
|
5500
|
-
* https://developers.google.com/youtube/iframe_api_reference#onPlaybackQualityChange
|
|
5501
|
-
*
|
|
5502
|
-
* @param {Object} event
|
|
5503
|
-
* @param {String} data - playback quality
|
|
5504
|
-
* @param {Object} target - actual YT player
|
|
5505
|
-
*/
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
/**
|
|
5509
|
-
* Initialize the Youtube Player API on the container and attach event handlers
|
|
5510
|
-
*/
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
/**
|
|
5514
|
-
* Shorthand for destroying and then re-creating the Youtube Player
|
|
5515
|
-
*/
|
|
5516
|
-
|
|
5517
|
-
|
|
5518
|
-
/**
|
|
5519
|
-
* Method to update the id and class of the Youtube Player iframe.
|
|
5520
|
-
* React should update this automatically but since the Youtube Player API
|
|
5521
|
-
* replaced the DIV that is mounted by React we need to do this manually.
|
|
5522
|
-
*/
|
|
5523
|
-
|
|
5524
|
-
|
|
5525
|
-
/**
|
|
5526
|
-
* Call Youtube Player API methods to update the currently playing video.
|
|
5527
|
-
* Depeding on the `opts.playerVars.autoplay` this function uses one of two
|
|
5528
|
-
* Youtube Player API methods to update the video.
|
|
5513
|
+
/**
|
|
5514
|
+
* https://developers.google.com/youtube/iframe_api_reference#onReady
|
|
5515
|
+
*
|
|
5516
|
+
* @param {Object} event
|
|
5517
|
+
* @param {Object} target - player object
|
|
5529
5518
|
*/
|
|
5530
5519
|
|
|
5531
5520
|
}, {
|
|
5532
|
-
key:
|
|
5521
|
+
key: "render",
|
|
5533
5522
|
value: function render() {
|
|
5534
|
-
return React__default.createElement(
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
|
|
5523
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
5524
|
+
className: this.props.containerClassName
|
|
5525
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
5526
|
+
id: this.props.id,
|
|
5527
|
+
className: this.props.className,
|
|
5528
|
+
ref: this.refContainer
|
|
5529
|
+
}));
|
|
5539
5530
|
}
|
|
5540
5531
|
}]);
|
|
5541
5532
|
|
|
5542
5533
|
return YouTube;
|
|
5543
5534
|
}(React__default.Component);
|
|
5544
5535
|
|
|
5536
|
+
_defineProperty(YouTube, "PlayerState", {
|
|
5537
|
+
UNSTARTED: -1,
|
|
5538
|
+
ENDED: 0,
|
|
5539
|
+
PLAYING: 1,
|
|
5540
|
+
PAUSED: 2,
|
|
5541
|
+
BUFFERING: 3,
|
|
5542
|
+
CUED: 5
|
|
5543
|
+
});
|
|
5544
|
+
|
|
5545
5545
|
YouTube.propTypes = {
|
|
5546
5546
|
videoId: PropTypes.string,
|
|
5547
|
-
|
|
5548
5547
|
// custom ID for player element
|
|
5549
5548
|
id: PropTypes.string,
|
|
5550
|
-
|
|
5551
5549
|
// custom class name for player element
|
|
5552
5550
|
className: PropTypes.string,
|
|
5553
5551
|
// custom class name for player container element
|
|
5554
5552
|
containerClassName: PropTypes.string,
|
|
5555
|
-
|
|
5556
5553
|
// https://developers.google.com/youtube/iframe_api_reference#Loading_a_Video_Player
|
|
5557
5554
|
opts: PropTypes.objectOf(PropTypes.any),
|
|
5558
|
-
|
|
5559
5555
|
// event subscriptions
|
|
5560
5556
|
onReady: PropTypes.func,
|
|
5561
5557
|
onError: PropTypes.func,
|
|
@@ -5567,6 +5563,7 @@ YouTube.propTypes = {
|
|
|
5567
5563
|
onPlaybackQualityChange: PropTypes.func
|
|
5568
5564
|
};
|
|
5569
5565
|
YouTube.defaultProps = {
|
|
5566
|
+
videoId: null,
|
|
5570
5567
|
id: null,
|
|
5571
5568
|
className: null,
|
|
5572
5569
|
opts: {},
|
|
@@ -5580,14 +5577,6 @@ YouTube.defaultProps = {
|
|
|
5580
5577
|
onPlaybackRateChange: function onPlaybackRateChange() {},
|
|
5581
5578
|
onPlaybackQualityChange: function onPlaybackQualityChange() {}
|
|
5582
5579
|
};
|
|
5583
|
-
YouTube.PlayerState = {
|
|
5584
|
-
UNSTARTED: -1,
|
|
5585
|
-
ENDED: 0,
|
|
5586
|
-
PLAYING: 1,
|
|
5587
|
-
PAUSED: 2,
|
|
5588
|
-
BUFFERING: 3,
|
|
5589
|
-
CUED: 5
|
|
5590
|
-
};
|
|
5591
5580
|
|
|
5592
5581
|
var YouTubePlayer = function YouTubePlayer(_ref) {
|
|
5593
5582
|
var url = _ref.url;
|
|
@@ -6611,8 +6600,8 @@ var window_1 = win;
|
|
|
6611
6600
|
|
|
6612
6601
|
/*! @name @brightcove/react-player-loader @version 1.4.0 @license Apache-2.0 */
|
|
6613
6602
|
|
|
6614
|
-
function _extends
|
|
6615
|
-
_extends
|
|
6603
|
+
function _extends() {
|
|
6604
|
+
_extends = Object.assign || function (target) {
|
|
6616
6605
|
for (var i = 1; i < arguments.length; i++) {
|
|
6617
6606
|
var source = arguments[i];
|
|
6618
6607
|
|
|
@@ -6626,7 +6615,7 @@ function _extends$1() {
|
|
|
6626
6615
|
return target;
|
|
6627
6616
|
};
|
|
6628
6617
|
|
|
6629
|
-
return _extends
|
|
6618
|
+
return _extends.apply(this, arguments);
|
|
6630
6619
|
}
|
|
6631
6620
|
|
|
6632
6621
|
function _inheritsLoose(subClass, superClass) {
|
|
@@ -6635,7 +6624,7 @@ function _inheritsLoose(subClass, superClass) {
|
|
|
6635
6624
|
subClass.__proto__ = superClass;
|
|
6636
6625
|
}
|
|
6637
6626
|
|
|
6638
|
-
function _assertThisInitialized(self) {
|
|
6627
|
+
function _assertThisInitialized$1(self) {
|
|
6639
6628
|
if (self === void 0) {
|
|
6640
6629
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
6641
6630
|
}
|
|
@@ -6645,8 +6634,8 @@ function _assertThisInitialized(self) {
|
|
|
6645
6634
|
|
|
6646
6635
|
/*! @name @brightcove/player-loader @version 1.7.1 @license Apache-2.0 */
|
|
6647
6636
|
|
|
6648
|
-
function _extends$1
|
|
6649
|
-
_extends$1
|
|
6637
|
+
function _extends$1() {
|
|
6638
|
+
_extends$1 = Object.assign || function (target) {
|
|
6650
6639
|
for (var i = 1; i < arguments.length; i++) {
|
|
6651
6640
|
var source = arguments[i];
|
|
6652
6641
|
|
|
@@ -6660,7 +6649,7 @@ function _extends$1$1() {
|
|
|
6660
6649
|
return target;
|
|
6661
6650
|
};
|
|
6662
6651
|
|
|
6663
|
-
return _extends$1
|
|
6652
|
+
return _extends$1.apply(this, arguments);
|
|
6664
6653
|
}
|
|
6665
6654
|
|
|
6666
6655
|
var version$1 = "1.7.1";
|
|
@@ -6668,7 +6657,7 @@ var version$1 = "1.7.1";
|
|
|
6668
6657
|
/*! @name @brightcove/player-url @version 1.2.0 @license Apache-2.0 */
|
|
6669
6658
|
var version$1$1 = "1.2.0";
|
|
6670
6659
|
|
|
6671
|
-
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
|
6660
|
+
var _typeof$1 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
|
6672
6661
|
return typeof obj;
|
|
6673
6662
|
} : function (obj) {
|
|
6674
6663
|
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
@@ -6803,7 +6792,7 @@ var brightcovePlayerUrl = function brightcovePlayerUrl(_ref) {
|
|
|
6803
6792
|
|
|
6804
6793
|
var qs = '';
|
|
6805
6794
|
|
|
6806
|
-
if (iframe && queryParams && (typeof queryParams === 'undefined' ? 'undefined' : _typeof(queryParams)) === 'object') {
|
|
6795
|
+
if (iframe && queryParams && (typeof queryParams === 'undefined' ? 'undefined' : _typeof$1(queryParams)) === 'object') {
|
|
6807
6796
|
qs = getQueryString(queryParams);
|
|
6808
6797
|
}
|
|
6809
6798
|
|
|
@@ -7037,7 +7026,7 @@ var wrapResponsive = function wrapResponsive(embedType, embedOptions, el) {
|
|
|
7037
7026
|
el.style.width = '100%';
|
|
7038
7027
|
el.style.height = '100%';
|
|
7039
7028
|
|
|
7040
|
-
var responsive = _extends$1
|
|
7029
|
+
var responsive = _extends$1({
|
|
7041
7030
|
aspectRatio: DEFAULT_ASPECT_RATIO,
|
|
7042
7031
|
iframeHorizontalPlaylist: DEFAULT_IFRAME_HORIZONTAL_PLAYLIST,
|
|
7043
7032
|
maxWidth: DEFAULT_MAX_WIDTH
|
|
@@ -7722,7 +7711,7 @@ var loadPlayer = function loadPlayer(params, resolve, reject) {
|
|
|
7722
7711
|
|
|
7723
7712
|
|
|
7724
7713
|
var brightcovePlayerLoader = function brightcovePlayerLoader(parameters) {
|
|
7725
|
-
var params = _extends$1
|
|
7714
|
+
var params = _extends$1({}, DEFAULTS, parameters);
|
|
7726
7715
|
|
|
7727
7716
|
var Promise = params.Promise,
|
|
7728
7717
|
onSuccess = params.onSuccess,
|
|
@@ -7864,7 +7853,7 @@ function (_React$Component) {
|
|
|
7864
7853
|
_this.refNode = ref;
|
|
7865
7854
|
};
|
|
7866
7855
|
|
|
7867
|
-
_this.loadPlayer = _this.loadPlayer.bind(_assertThisInitialized(_this));
|
|
7856
|
+
_this.loadPlayer = _this.loadPlayer.bind(_assertThisInitialized$1(_this));
|
|
7868
7857
|
return _this;
|
|
7869
7858
|
}
|
|
7870
7859
|
/**
|
|
@@ -7885,7 +7874,7 @@ function (_React$Component) {
|
|
|
7885
7874
|
var userSuccess = this.props.onSuccess;
|
|
7886
7875
|
var userFailure = this.props.onFailure;
|
|
7887
7876
|
|
|
7888
|
-
var options = _extends
|
|
7877
|
+
var options = _extends({}, this.props, {
|
|
7889
7878
|
refNode: this.refNode,
|
|
7890
7879
|
refNodeInsert: 'append',
|
|
7891
7880
|
onSuccess: function onSuccess(_ref) {
|
|
@@ -8194,7 +8183,7 @@ function (_React$Component) {
|
|
|
8194
8183
|
;
|
|
8195
8184
|
|
|
8196
8185
|
_proto.render = function render() {
|
|
8197
|
-
var props = _extends
|
|
8186
|
+
var props = _extends({
|
|
8198
8187
|
className: 'brightcove-react-player-loader'
|
|
8199
8188
|
}, this.props.attrs, {
|
|
8200
8189
|
ref: this.setRefNode
|
|
@@ -8610,11 +8599,17 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
8610
8599
|
|
|
8611
8600
|
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; }
|
|
8612
8601
|
|
|
8613
|
-
function
|
|
8602
|
+
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; } } }; }
|
|
8603
|
+
|
|
8604
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8614
8605
|
|
|
8615
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
|
8606
|
+
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."); }
|
|
8616
8607
|
|
|
8617
|
-
function
|
|
8608
|
+
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); }
|
|
8609
|
+
|
|
8610
|
+
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; }
|
|
8611
|
+
|
|
8612
|
+
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; }
|
|
8618
8613
|
|
|
8619
8614
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8620
8615
|
|
|
@@ -8744,12 +8739,12 @@ function getSDK(url, sdkGlobal) {
|
|
|
8744
8739
|
|
|
8745
8740
|
function getConfig(props$1, defaultProps, showWarning) {
|
|
8746
8741
|
var config = (0, _deepmerge["default"])(defaultProps.config, props$1.config);
|
|
8747
|
-
|
|
8748
|
-
var
|
|
8749
|
-
|
|
8742
|
+
|
|
8743
|
+
var _iterator = _createForOfIteratorHelper(props.DEPRECATED_CONFIG_PROPS),
|
|
8744
|
+
_step;
|
|
8750
8745
|
|
|
8751
8746
|
try {
|
|
8752
|
-
for (
|
|
8747
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
8753
8748
|
var p = _step.value;
|
|
8754
8749
|
|
|
8755
8750
|
if (props$1[p]) {
|
|
@@ -8764,18 +8759,9 @@ function getConfig(props$1, defaultProps, showWarning) {
|
|
|
8764
8759
|
}
|
|
8765
8760
|
}
|
|
8766
8761
|
} catch (err) {
|
|
8767
|
-
|
|
8768
|
-
_iteratorError = err;
|
|
8762
|
+
_iterator.e(err);
|
|
8769
8763
|
} finally {
|
|
8770
|
-
|
|
8771
|
-
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
8772
|
-
_iterator["return"]();
|
|
8773
|
-
}
|
|
8774
|
-
} finally {
|
|
8775
|
-
if (_didIteratorError) {
|
|
8776
|
-
throw _iteratorError;
|
|
8777
|
-
}
|
|
8778
|
-
}
|
|
8764
|
+
_iterator.f();
|
|
8779
8765
|
}
|
|
8780
8766
|
|
|
8781
8767
|
return config;
|
|
@@ -8922,12 +8908,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
8922
8908
|
|
|
8923
8909
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
8924
8910
|
|
|
8925
|
-
function
|
|
8911
|
+
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); }; }
|
|
8926
8912
|
|
|
8927
|
-
function
|
|
8913
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
8928
8914
|
|
|
8929
8915
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
8930
8916
|
|
|
8917
|
+
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; } }
|
|
8918
|
+
|
|
8919
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
8920
|
+
|
|
8931
8921
|
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); }
|
|
8932
8922
|
|
|
8933
8923
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -8936,14 +8926,12 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
8936
8926
|
|
|
8937
8927
|
var SEEK_ON_PLAY_EXPIRY = 5000;
|
|
8938
8928
|
|
|
8939
|
-
var Player =
|
|
8940
|
-
/*#__PURE__*/
|
|
8941
|
-
function (_Component) {
|
|
8929
|
+
var Player = /*#__PURE__*/function (_Component) {
|
|
8942
8930
|
_inherits(Player, _Component);
|
|
8943
8931
|
|
|
8944
|
-
|
|
8945
|
-
var _getPrototypeOf2;
|
|
8932
|
+
var _super = _createSuper(Player);
|
|
8946
8933
|
|
|
8934
|
+
function Player() {
|
|
8947
8935
|
var _this;
|
|
8948
8936
|
|
|
8949
8937
|
_classCallCheck(this, Player);
|
|
@@ -8952,7 +8940,7 @@ function (_Component) {
|
|
|
8952
8940
|
_args[_key] = arguments[_key];
|
|
8953
8941
|
}
|
|
8954
8942
|
|
|
8955
|
-
_this =
|
|
8943
|
+
_this = _super.call.apply(_super, [this].concat(_args));
|
|
8956
8944
|
|
|
8957
8945
|
_defineProperty(_assertThisInitialized(_this), "mounted", false);
|
|
8958
8946
|
|
|
@@ -9277,7 +9265,7 @@ function (_Component) {
|
|
|
9277
9265
|
return null;
|
|
9278
9266
|
}
|
|
9279
9267
|
|
|
9280
|
-
return _react["default"].createElement(Player, _extends({}, this.props, {
|
|
9268
|
+
return /*#__PURE__*/_react["default"].createElement(Player, _extends({}, this.props, {
|
|
9281
9269
|
ref: this.ref,
|
|
9282
9270
|
onReady: this.handleReady,
|
|
9283
9271
|
onPlay: this.handlePlay,
|
|
@@ -9338,12 +9326,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
9338
9326
|
|
|
9339
9327
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
9340
9328
|
|
|
9341
|
-
function
|
|
9329
|
+
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); }; }
|
|
9342
9330
|
|
|
9343
|
-
function
|
|
9331
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
9344
9332
|
|
|
9345
9333
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9346
9334
|
|
|
9335
|
+
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; } }
|
|
9336
|
+
|
|
9337
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9338
|
+
|
|
9347
9339
|
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); }
|
|
9348
9340
|
|
|
9349
9341
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -9355,14 +9347,12 @@ var SUPPORTED_PROPS = Object.keys(props.propTypes);
|
|
|
9355
9347
|
function createSinglePlayer(activePlayer) {
|
|
9356
9348
|
var _class, _temp;
|
|
9357
9349
|
|
|
9358
|
-
return _temp = _class =
|
|
9359
|
-
/*#__PURE__*/
|
|
9360
|
-
function (_Component) {
|
|
9350
|
+
return _temp = _class = /*#__PURE__*/function (_Component) {
|
|
9361
9351
|
_inherits(SinglePlayer, _Component);
|
|
9362
9352
|
|
|
9363
|
-
|
|
9364
|
-
var _getPrototypeOf2;
|
|
9353
|
+
var _super = _createSuper(SinglePlayer);
|
|
9365
9354
|
|
|
9355
|
+
function SinglePlayer() {
|
|
9366
9356
|
var _this;
|
|
9367
9357
|
|
|
9368
9358
|
_classCallCheck(this, SinglePlayer);
|
|
@@ -9371,7 +9361,7 @@ function createSinglePlayer(activePlayer) {
|
|
|
9371
9361
|
args[_key] = arguments[_key];
|
|
9372
9362
|
}
|
|
9373
9363
|
|
|
9374
|
-
_this =
|
|
9364
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
9375
9365
|
|
|
9376
9366
|
_defineProperty(_assertThisInitialized(_this), "config", (0, utils.getConfig)(_this.props, props.defaultProps, true));
|
|
9377
9367
|
|
|
@@ -9439,12 +9429,12 @@ function createSinglePlayer(activePlayer) {
|
|
|
9439
9429
|
height = _this$props.height,
|
|
9440
9430
|
Wrapper = _this$props.wrapper;
|
|
9441
9431
|
var otherProps = (0, utils.omit)(this.props, SUPPORTED_PROPS, props.DEPRECATED_CONFIG_PROPS);
|
|
9442
|
-
return _react["default"].createElement(Wrapper, _extends({
|
|
9432
|
+
return /*#__PURE__*/_react["default"].createElement(Wrapper, _extends({
|
|
9443
9433
|
style: _objectSpread({}, style, {
|
|
9444
9434
|
width: width,
|
|
9445
9435
|
height: height
|
|
9446
9436
|
})
|
|
9447
|
-
}, otherProps), _react["default"].createElement(_Player["default"], _extends({}, this.props, {
|
|
9437
|
+
}, otherProps), /*#__PURE__*/_react["default"].createElement(_Player["default"], _extends({}, this.props, {
|
|
9448
9438
|
ref: this.ref,
|
|
9449
9439
|
activePlayer: activePlayer,
|
|
9450
9440
|
config: this.config
|
|
@@ -9490,23 +9480,31 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
9490
9480
|
|
|
9491
9481
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
9492
9482
|
|
|
9493
|
-
function
|
|
9483
|
+
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); }; }
|
|
9494
9484
|
|
|
9495
|
-
function
|
|
9485
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
9496
9486
|
|
|
9497
9487
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9498
9488
|
|
|
9489
|
+
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; } }
|
|
9490
|
+
|
|
9491
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9492
|
+
|
|
9499
9493
|
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); }
|
|
9500
9494
|
|
|
9501
9495
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
9502
9496
|
|
|
9503
9497
|
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; }
|
|
9504
9498
|
|
|
9505
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
9499
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
9500
|
+
|
|
9501
|
+
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."); }
|
|
9506
9502
|
|
|
9507
|
-
function
|
|
9503
|
+
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); }
|
|
9508
9504
|
|
|
9509
|
-
function
|
|
9505
|
+
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; }
|
|
9506
|
+
|
|
9507
|
+
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; }
|
|
9510
9508
|
|
|
9511
9509
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
9512
9510
|
|
|
@@ -9531,14 +9529,12 @@ function parsePlaylist(url) {
|
|
|
9531
9529
|
return {};
|
|
9532
9530
|
}
|
|
9533
9531
|
|
|
9534
|
-
var YouTube =
|
|
9535
|
-
/*#__PURE__*/
|
|
9536
|
-
function (_Component) {
|
|
9532
|
+
var YouTube = /*#__PURE__*/function (_Component) {
|
|
9537
9533
|
_inherits(YouTube, _Component);
|
|
9538
9534
|
|
|
9539
|
-
|
|
9540
|
-
var _getPrototypeOf2;
|
|
9535
|
+
var _super = _createSuper(YouTube);
|
|
9541
9536
|
|
|
9537
|
+
function YouTube() {
|
|
9542
9538
|
var _this;
|
|
9543
9539
|
|
|
9544
9540
|
_classCallCheck(this, YouTube);
|
|
@@ -9547,7 +9543,7 @@ function (_Component) {
|
|
|
9547
9543
|
args[_key] = arguments[_key];
|
|
9548
9544
|
}
|
|
9549
9545
|
|
|
9550
|
-
_this =
|
|
9546
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
9551
9547
|
|
|
9552
9548
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
9553
9549
|
|
|
@@ -9735,9 +9731,9 @@ function (_Component) {
|
|
|
9735
9731
|
height: '100%',
|
|
9736
9732
|
display: display
|
|
9737
9733
|
};
|
|
9738
|
-
return _react["default"].createElement("div", {
|
|
9734
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
9739
9735
|
style: style
|
|
9740
|
-
}, _react["default"].createElement("div", {
|
|
9736
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
9741
9737
|
ref: this.ref
|
|
9742
9738
|
}));
|
|
9743
9739
|
}
|
|
@@ -9793,12 +9789,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
9793
9789
|
|
|
9794
9790
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
9795
9791
|
|
|
9796
|
-
function
|
|
9792
|
+
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); }; }
|
|
9797
9793
|
|
|
9798
|
-
function
|
|
9794
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
9799
9795
|
|
|
9800
9796
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9801
9797
|
|
|
9798
|
+
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; } }
|
|
9799
|
+
|
|
9800
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9801
|
+
|
|
9802
9802
|
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); }
|
|
9803
9803
|
|
|
9804
9804
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -9807,16 +9807,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
9807
9807
|
|
|
9808
9808
|
var SDK_URL = 'https://w.soundcloud.com/player/api.js';
|
|
9809
9809
|
var SDK_GLOBAL = 'SC';
|
|
9810
|
-
var MATCH_URL = /(soundcloud\.com|snd\.sc)
|
|
9810
|
+
var MATCH_URL = /(?:soundcloud\.com|snd\.sc)\/[^.]+$/;
|
|
9811
9811
|
|
|
9812
|
-
var SoundCloud =
|
|
9813
|
-
/*#__PURE__*/
|
|
9814
|
-
function (_Component) {
|
|
9812
|
+
var SoundCloud = /*#__PURE__*/function (_Component) {
|
|
9815
9813
|
_inherits(SoundCloud, _Component);
|
|
9816
9814
|
|
|
9817
|
-
|
|
9818
|
-
var _getPrototypeOf2;
|
|
9815
|
+
var _super = _createSuper(SoundCloud);
|
|
9819
9816
|
|
|
9817
|
+
function SoundCloud() {
|
|
9820
9818
|
var _this;
|
|
9821
9819
|
|
|
9822
9820
|
_classCallCheck(this, SoundCloud);
|
|
@@ -9825,7 +9823,7 @@ function (_Component) {
|
|
|
9825
9823
|
args[_key] = arguments[_key];
|
|
9826
9824
|
}
|
|
9827
9825
|
|
|
9828
|
-
_this =
|
|
9826
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
9829
9827
|
|
|
9830
9828
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
9831
9829
|
|
|
@@ -9946,7 +9944,7 @@ function (_Component) {
|
|
|
9946
9944
|
height: '100%',
|
|
9947
9945
|
display: display
|
|
9948
9946
|
};
|
|
9949
|
-
return _react["default"].createElement("iframe", {
|
|
9947
|
+
return /*#__PURE__*/_react["default"].createElement("iframe", {
|
|
9950
9948
|
ref: this.ref,
|
|
9951
9949
|
src: "https://w.soundcloud.com/player/?url=".concat(encodeURIComponent(this.props.url)),
|
|
9952
9950
|
style: style,
|
|
@@ -10008,12 +10006,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10008
10006
|
|
|
10009
10007
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10010
10008
|
|
|
10011
|
-
function
|
|
10009
|
+
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); }; }
|
|
10012
10010
|
|
|
10013
|
-
function
|
|
10011
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10014
10012
|
|
|
10015
10013
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10016
10014
|
|
|
10015
|
+
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; } }
|
|
10016
|
+
|
|
10017
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10018
|
+
|
|
10017
10019
|
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); }
|
|
10018
10020
|
|
|
10019
10021
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -10025,14 +10027,12 @@ var SDK_GLOBAL = 'Vimeo';
|
|
|
10025
10027
|
var MATCH_URL = /vimeo\.com\/.+/;
|
|
10026
10028
|
var MATCH_FILE_URL = /vimeo\.com\/external\/[0-9]+\..+/;
|
|
10027
10029
|
|
|
10028
|
-
var Vimeo =
|
|
10029
|
-
/*#__PURE__*/
|
|
10030
|
-
function (_Component) {
|
|
10030
|
+
var Vimeo = /*#__PURE__*/function (_Component) {
|
|
10031
10031
|
_inherits(Vimeo, _Component);
|
|
10032
10032
|
|
|
10033
|
-
|
|
10034
|
-
var _getPrototypeOf2;
|
|
10033
|
+
var _super = _createSuper(Vimeo);
|
|
10035
10034
|
|
|
10035
|
+
function Vimeo() {
|
|
10036
10036
|
var _this;
|
|
10037
10037
|
|
|
10038
10038
|
_classCallCheck(this, Vimeo);
|
|
@@ -10041,7 +10041,7 @@ function (_Component) {
|
|
|
10041
10041
|
args[_key] = arguments[_key];
|
|
10042
10042
|
}
|
|
10043
10043
|
|
|
10044
|
-
_this =
|
|
10044
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
10045
10045
|
|
|
10046
10046
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10047
10047
|
|
|
@@ -10198,7 +10198,7 @@ function (_Component) {
|
|
|
10198
10198
|
overflow: 'hidden',
|
|
10199
10199
|
display: display
|
|
10200
10200
|
};
|
|
10201
|
-
return _react["default"].createElement("div", {
|
|
10201
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
10202
10202
|
key: this.props.url,
|
|
10203
10203
|
ref: this.ref,
|
|
10204
10204
|
style: style
|
|
@@ -10258,12 +10258,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10258
10258
|
|
|
10259
10259
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10260
10260
|
|
|
10261
|
-
function
|
|
10261
|
+
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); }; }
|
|
10262
10262
|
|
|
10263
|
-
function
|
|
10263
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10264
10264
|
|
|
10265
10265
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10266
10266
|
|
|
10267
|
+
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; } }
|
|
10268
|
+
|
|
10269
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10270
|
+
|
|
10267
10271
|
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); }
|
|
10268
10272
|
|
|
10269
10273
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -10276,14 +10280,12 @@ var SDK_GLOBAL_READY = 'fbAsyncInit';
|
|
|
10276
10280
|
var MATCH_URL = /^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/;
|
|
10277
10281
|
var PLAYER_ID_PREFIX = 'facebook-player-';
|
|
10278
10282
|
|
|
10279
|
-
var Facebook =
|
|
10280
|
-
/*#__PURE__*/
|
|
10281
|
-
function (_Component) {
|
|
10283
|
+
var Facebook = /*#__PURE__*/function (_Component) {
|
|
10282
10284
|
_inherits(Facebook, _Component);
|
|
10283
10285
|
|
|
10284
|
-
|
|
10285
|
-
var _getPrototypeOf2;
|
|
10286
|
+
var _super = _createSuper(Facebook);
|
|
10286
10287
|
|
|
10288
|
+
function Facebook() {
|
|
10287
10289
|
var _this;
|
|
10288
10290
|
|
|
10289
10291
|
_classCallCheck(this, Facebook);
|
|
@@ -10292,7 +10294,7 @@ function (_Component) {
|
|
|
10292
10294
|
args[_key] = arguments[_key];
|
|
10293
10295
|
}
|
|
10294
10296
|
|
|
10295
|
-
_this =
|
|
10297
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
10296
10298
|
|
|
10297
10299
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10298
10300
|
|
|
@@ -10408,7 +10410,7 @@ function (_Component) {
|
|
|
10408
10410
|
width: '100%',
|
|
10409
10411
|
height: '100%'
|
|
10410
10412
|
};
|
|
10411
|
-
return _react["default"].createElement("div", {
|
|
10413
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
10412
10414
|
style: style,
|
|
10413
10415
|
id: this.playerID,
|
|
10414
10416
|
className: "fb-video",
|
|
@@ -10468,12 +10470,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10468
10470
|
|
|
10469
10471
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10470
10472
|
|
|
10471
|
-
function
|
|
10473
|
+
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); }; }
|
|
10472
10474
|
|
|
10473
|
-
function
|
|
10475
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10474
10476
|
|
|
10475
10477
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10476
10478
|
|
|
10479
|
+
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; } }
|
|
10480
|
+
|
|
10481
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10482
|
+
|
|
10477
10483
|
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); }
|
|
10478
10484
|
|
|
10479
10485
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -10484,14 +10490,12 @@ var SDK_URL = 'https://cdn.embed.ly/player-0.1.0.min.js';
|
|
|
10484
10490
|
var SDK_GLOBAL = 'playerjs';
|
|
10485
10491
|
var MATCH_URL = /streamable\.com\/([a-z0-9]+)$/;
|
|
10486
10492
|
|
|
10487
|
-
var Streamable =
|
|
10488
|
-
/*#__PURE__*/
|
|
10489
|
-
function (_Component) {
|
|
10493
|
+
var Streamable = /*#__PURE__*/function (_Component) {
|
|
10490
10494
|
_inherits(Streamable, _Component);
|
|
10491
10495
|
|
|
10492
|
-
|
|
10493
|
-
var _getPrototypeOf2;
|
|
10496
|
+
var _super = _createSuper(Streamable);
|
|
10494
10497
|
|
|
10498
|
+
function Streamable() {
|
|
10495
10499
|
var _this;
|
|
10496
10500
|
|
|
10497
10501
|
_classCallCheck(this, Streamable);
|
|
@@ -10500,7 +10504,7 @@ function (_Component) {
|
|
|
10500
10504
|
args[_key] = arguments[_key];
|
|
10501
10505
|
}
|
|
10502
10506
|
|
|
10503
|
-
_this =
|
|
10507
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
10504
10508
|
|
|
10505
10509
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10506
10510
|
|
|
@@ -10620,7 +10624,7 @@ function (_Component) {
|
|
|
10620
10624
|
width: '100%',
|
|
10621
10625
|
height: '100%'
|
|
10622
10626
|
};
|
|
10623
|
-
return _react["default"].createElement("iframe", {
|
|
10627
|
+
return /*#__PURE__*/_react["default"].createElement("iframe", {
|
|
10624
10628
|
ref: this.ref,
|
|
10625
10629
|
src: "https://streamable.com/o/".concat(id),
|
|
10626
10630
|
frameBorder: "0",
|
|
@@ -10681,12 +10685,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10681
10685
|
|
|
10682
10686
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10683
10687
|
|
|
10684
|
-
function
|
|
10688
|
+
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); }; }
|
|
10685
10689
|
|
|
10686
|
-
function
|
|
10690
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10687
10691
|
|
|
10688
10692
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10689
10693
|
|
|
10694
|
+
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; } }
|
|
10695
|
+
|
|
10696
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10697
|
+
|
|
10690
10698
|
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); }
|
|
10691
10699
|
|
|
10692
10700
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -10697,26 +10705,48 @@ var SDK_URL = 'https://fast.wistia.com/assets/external/E-v1.js';
|
|
|
10697
10705
|
var SDK_GLOBAL = 'Wistia';
|
|
10698
10706
|
var MATCH_URL = /(?:wistia\.com|wi\.st)\/(?:medias|embed)\/(.*)$/;
|
|
10699
10707
|
|
|
10700
|
-
var Wistia =
|
|
10701
|
-
/*#__PURE__*/
|
|
10702
|
-
function (_Component) {
|
|
10708
|
+
var Wistia = /*#__PURE__*/function (_Component) {
|
|
10703
10709
|
_inherits(Wistia, _Component);
|
|
10704
10710
|
|
|
10705
|
-
|
|
10706
|
-
var _getPrototypeOf2;
|
|
10711
|
+
var _super = _createSuper(Wistia);
|
|
10707
10712
|
|
|
10713
|
+
function Wistia() {
|
|
10708
10714
|
var _this;
|
|
10709
10715
|
|
|
10710
10716
|
_classCallCheck(this, Wistia);
|
|
10711
10717
|
|
|
10712
|
-
for (var _len = arguments.length,
|
|
10713
|
-
|
|
10718
|
+
for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
10719
|
+
_args[_key] = arguments[_key];
|
|
10714
10720
|
}
|
|
10715
10721
|
|
|
10716
|
-
_this =
|
|
10722
|
+
_this = _super.call.apply(_super, [this].concat(_args));
|
|
10717
10723
|
|
|
10718
10724
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10719
10725
|
|
|
10726
|
+
_defineProperty(_assertThisInitialized(_this), "onPlay", function () {
|
|
10727
|
+
var _this$props;
|
|
10728
|
+
|
|
10729
|
+
return (_this$props = _this.props).onPlay.apply(_this$props, arguments);
|
|
10730
|
+
});
|
|
10731
|
+
|
|
10732
|
+
_defineProperty(_assertThisInitialized(_this), "onPause", function () {
|
|
10733
|
+
var _this$props2;
|
|
10734
|
+
|
|
10735
|
+
return (_this$props2 = _this.props).onPause.apply(_this$props2, arguments);
|
|
10736
|
+
});
|
|
10737
|
+
|
|
10738
|
+
_defineProperty(_assertThisInitialized(_this), "onSeek", function () {
|
|
10739
|
+
var _this$props3;
|
|
10740
|
+
|
|
10741
|
+
return (_this$props3 = _this.props).onSeek.apply(_this$props3, arguments);
|
|
10742
|
+
});
|
|
10743
|
+
|
|
10744
|
+
_defineProperty(_assertThisInitialized(_this), "onEnded", function () {
|
|
10745
|
+
var _this$props4;
|
|
10746
|
+
|
|
10747
|
+
return (_this$props4 = _this.props).onEnded.apply(_this$props4, arguments);
|
|
10748
|
+
});
|
|
10749
|
+
|
|
10720
10750
|
_defineProperty(_assertThisInitialized(_this), "mute", function () {
|
|
10721
10751
|
_this.callPlayer('mute');
|
|
10722
10752
|
});
|
|
@@ -10738,17 +10768,13 @@ function (_Component) {
|
|
|
10738
10768
|
value: function load(url) {
|
|
10739
10769
|
var _this2 = this;
|
|
10740
10770
|
|
|
10741
|
-
var _this$
|
|
10742
|
-
playing = _this$
|
|
10743
|
-
muted = _this$
|
|
10744
|
-
controls = _this$
|
|
10745
|
-
_onReady = _this$
|
|
10746
|
-
|
|
10747
|
-
|
|
10748
|
-
onSeek = _this$props.onSeek,
|
|
10749
|
-
onEnded = _this$props.onEnded,
|
|
10750
|
-
config = _this$props.config,
|
|
10751
|
-
onError = _this$props.onError;
|
|
10771
|
+
var _this$props5 = this.props,
|
|
10772
|
+
playing = _this$props5.playing,
|
|
10773
|
+
muted = _this$props5.muted,
|
|
10774
|
+
controls = _this$props5.controls,
|
|
10775
|
+
_onReady = _this$props5.onReady,
|
|
10776
|
+
config = _this$props5.config,
|
|
10777
|
+
onError = _this$props5.onError;
|
|
10752
10778
|
(0, utils.getSDK)(SDK_URL, SDK_GLOBAL).then(function () {
|
|
10753
10779
|
window._wq = window._wq || [];
|
|
10754
10780
|
|
|
@@ -10765,19 +10791,28 @@ function (_Component) {
|
|
|
10765
10791
|
|
|
10766
10792
|
_this2.unbind();
|
|
10767
10793
|
|
|
10768
|
-
_this2.player.bind('play', onPlay);
|
|
10794
|
+
_this2.player.bind('play', _this2.onPlay);
|
|
10769
10795
|
|
|
10770
|
-
_this2.player.bind('pause', onPause);
|
|
10796
|
+
_this2.player.bind('pause', _this2.onPause);
|
|
10771
10797
|
|
|
10772
|
-
_this2.player.bind('seek', onSeek);
|
|
10798
|
+
_this2.player.bind('seek', _this2.onSeek);
|
|
10773
10799
|
|
|
10774
|
-
_this2.player.bind('end', onEnded);
|
|
10800
|
+
_this2.player.bind('end', _this2.onEnded);
|
|
10775
10801
|
|
|
10776
10802
|
_onReady();
|
|
10777
10803
|
}
|
|
10778
10804
|
});
|
|
10779
10805
|
}, onError);
|
|
10780
10806
|
}
|
|
10807
|
+
}, {
|
|
10808
|
+
key: "unbind",
|
|
10809
|
+
value: function unbind() {
|
|
10810
|
+
this.player.unbind('play', this.onPlay);
|
|
10811
|
+
this.player.unbind('pause', this.onPause);
|
|
10812
|
+
this.player.unbind('seek', this.onSeek);
|
|
10813
|
+
this.player.unbind('end', this.onEnded);
|
|
10814
|
+
} // Proxy methods to prevent listener leaks
|
|
10815
|
+
|
|
10781
10816
|
}, {
|
|
10782
10817
|
key: "play",
|
|
10783
10818
|
value: function play() {
|
|
@@ -10788,19 +10823,6 @@ function (_Component) {
|
|
|
10788
10823
|
value: function pause() {
|
|
10789
10824
|
this.callPlayer('pause');
|
|
10790
10825
|
}
|
|
10791
|
-
}, {
|
|
10792
|
-
key: "unbind",
|
|
10793
|
-
value: function unbind() {
|
|
10794
|
-
var _this$props2 = this.props,
|
|
10795
|
-
onPlay = _this$props2.onPlay,
|
|
10796
|
-
onPause = _this$props2.onPause,
|
|
10797
|
-
onSeek = _this$props2.onSeek,
|
|
10798
|
-
onEnded = _this$props2.onEnded;
|
|
10799
|
-
this.player.unbind('play', onPlay);
|
|
10800
|
-
this.player.unbind('pause', onPause);
|
|
10801
|
-
this.player.unbind('seek', onSeek);
|
|
10802
|
-
this.player.unbind('end', onEnded);
|
|
10803
|
-
}
|
|
10804
10826
|
}, {
|
|
10805
10827
|
key: "stop",
|
|
10806
10828
|
value: function stop() {
|
|
@@ -10846,7 +10868,7 @@ function (_Component) {
|
|
|
10846
10868
|
width: '100%',
|
|
10847
10869
|
height: '100%'
|
|
10848
10870
|
};
|
|
10849
|
-
return _react["default"].createElement("div", {
|
|
10871
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
10850
10872
|
key: id,
|
|
10851
10873
|
className: className,
|
|
10852
10874
|
style: style
|
|
@@ -10906,12 +10928,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10906
10928
|
|
|
10907
10929
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10908
10930
|
|
|
10909
|
-
function
|
|
10931
|
+
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); }; }
|
|
10910
10932
|
|
|
10911
|
-
function
|
|
10933
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10912
10934
|
|
|
10913
10935
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10914
10936
|
|
|
10937
|
+
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; } }
|
|
10938
|
+
|
|
10939
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10940
|
+
|
|
10915
10941
|
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); }
|
|
10916
10942
|
|
|
10917
10943
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -10924,14 +10950,12 @@ var MATCH_VIDEO_URL = /(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/;
|
|
|
10924
10950
|
var MATCH_CHANNEL_URL = /(?:www\.|go\.)?twitch\.tv\/([a-z0-9_]+)($|\?)/;
|
|
10925
10951
|
var PLAYER_ID_PREFIX = 'twitch-player-';
|
|
10926
10952
|
|
|
10927
|
-
var Twitch =
|
|
10928
|
-
/*#__PURE__*/
|
|
10929
|
-
function (_Component) {
|
|
10953
|
+
var Twitch = /*#__PURE__*/function (_Component) {
|
|
10930
10954
|
_inherits(Twitch, _Component);
|
|
10931
10955
|
|
|
10932
|
-
|
|
10933
|
-
var _getPrototypeOf2;
|
|
10956
|
+
var _super = _createSuper(Twitch);
|
|
10934
10957
|
|
|
10958
|
+
function Twitch() {
|
|
10935
10959
|
var _this;
|
|
10936
10960
|
|
|
10937
10961
|
_classCallCheck(this, Twitch);
|
|
@@ -10940,7 +10964,7 @@ function (_Component) {
|
|
|
10940
10964
|
args[_key] = arguments[_key];
|
|
10941
10965
|
}
|
|
10942
10966
|
|
|
10943
|
-
_this =
|
|
10967
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
10944
10968
|
|
|
10945
10969
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10946
10970
|
|
|
@@ -11061,7 +11085,7 @@ function (_Component) {
|
|
|
11061
11085
|
width: '100%',
|
|
11062
11086
|
height: '100%'
|
|
11063
11087
|
};
|
|
11064
|
-
return _react["default"].createElement("div", {
|
|
11088
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
11065
11089
|
style: style,
|
|
11066
11090
|
id: this.playerID
|
|
11067
11091
|
});
|
|
@@ -11114,11 +11138,15 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
11114
11138
|
|
|
11115
11139
|
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; }
|
|
11116
11140
|
|
|
11117
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
11141
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
11142
|
+
|
|
11143
|
+
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."); }
|
|
11118
11144
|
|
|
11119
|
-
function
|
|
11145
|
+
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); }
|
|
11120
11146
|
|
|
11121
|
-
function
|
|
11147
|
+
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; }
|
|
11148
|
+
|
|
11149
|
+
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; }
|
|
11122
11150
|
|
|
11123
11151
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11124
11152
|
|
|
@@ -11128,12 +11156,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
11128
11156
|
|
|
11129
11157
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
11130
11158
|
|
|
11131
|
-
function
|
|
11159
|
+
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); }; }
|
|
11132
11160
|
|
|
11133
|
-
function
|
|
11161
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
11134
11162
|
|
|
11135
11163
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11136
11164
|
|
|
11165
|
+
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; } }
|
|
11166
|
+
|
|
11167
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
11168
|
+
|
|
11137
11169
|
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); }
|
|
11138
11170
|
|
|
11139
11171
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -11145,14 +11177,12 @@ var SDK_GLOBAL = 'DM';
|
|
|
11145
11177
|
var SDK_GLOBAL_READY = 'dmAsyncInit';
|
|
11146
11178
|
var MATCH_URL = /^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?$/;
|
|
11147
11179
|
|
|
11148
|
-
var DailyMotion =
|
|
11149
|
-
/*#__PURE__*/
|
|
11150
|
-
function (_Component) {
|
|
11180
|
+
var DailyMotion = /*#__PURE__*/function (_Component) {
|
|
11151
11181
|
_inherits(DailyMotion, _Component);
|
|
11152
11182
|
|
|
11153
|
-
|
|
11154
|
-
var _getPrototypeOf2;
|
|
11183
|
+
var _super = _createSuper(DailyMotion);
|
|
11155
11184
|
|
|
11185
|
+
function DailyMotion() {
|
|
11156
11186
|
var _this;
|
|
11157
11187
|
|
|
11158
11188
|
_classCallCheck(this, DailyMotion);
|
|
@@ -11161,7 +11191,7 @@ function (_Component) {
|
|
|
11161
11191
|
args[_key] = arguments[_key];
|
|
11162
11192
|
}
|
|
11163
11193
|
|
|
11164
|
-
_this =
|
|
11194
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
11165
11195
|
|
|
11166
11196
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
11167
11197
|
|
|
@@ -11290,9 +11320,9 @@ function (_Component) {
|
|
|
11290
11320
|
height: '100%',
|
|
11291
11321
|
display: display
|
|
11292
11322
|
};
|
|
11293
|
-
return _react["default"].createElement("div", {
|
|
11323
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
11294
11324
|
style: style
|
|
11295
|
-
}, _react["default"].createElement("div", {
|
|
11325
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
11296
11326
|
ref: this.ref
|
|
11297
11327
|
}));
|
|
11298
11328
|
}
|
|
@@ -11350,12 +11380,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
11350
11380
|
|
|
11351
11381
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
11352
11382
|
|
|
11353
|
-
function
|
|
11383
|
+
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); }; }
|
|
11354
11384
|
|
|
11355
|
-
function
|
|
11385
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
11356
11386
|
|
|
11357
11387
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11358
11388
|
|
|
11389
|
+
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; } }
|
|
11390
|
+
|
|
11391
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
11392
|
+
|
|
11359
11393
|
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); }
|
|
11360
11394
|
|
|
11361
11395
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -11366,14 +11400,12 @@ var SDK_URL = 'https://widget.mixcloud.com/media/js/widgetApi.js';
|
|
|
11366
11400
|
var SDK_GLOBAL = 'Mixcloud';
|
|
11367
11401
|
var MATCH_URL = /mixcloud\.com\/([^/]+\/[^/]+)/;
|
|
11368
11402
|
|
|
11369
|
-
var Mixcloud =
|
|
11370
|
-
/*#__PURE__*/
|
|
11371
|
-
function (_Component) {
|
|
11403
|
+
var Mixcloud = /*#__PURE__*/function (_Component) {
|
|
11372
11404
|
_inherits(Mixcloud, _Component);
|
|
11373
11405
|
|
|
11374
|
-
|
|
11375
|
-
var _getPrototypeOf2;
|
|
11406
|
+
var _super = _createSuper(Mixcloud);
|
|
11376
11407
|
|
|
11408
|
+
function Mixcloud() {
|
|
11377
11409
|
var _this;
|
|
11378
11410
|
|
|
11379
11411
|
_classCallCheck(this, Mixcloud);
|
|
@@ -11382,7 +11414,7 @@ function (_Component) {
|
|
|
11382
11414
|
args[_key] = arguments[_key];
|
|
11383
11415
|
}
|
|
11384
11416
|
|
|
11385
|
-
_this =
|
|
11417
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
11386
11418
|
|
|
11387
11419
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
11388
11420
|
|
|
@@ -11485,7 +11517,7 @@ function (_Component) {
|
|
|
11485
11517
|
})); // We have to give the iframe a key here to prevent a
|
|
11486
11518
|
// weird dialog appearing when loading a new track
|
|
11487
11519
|
|
|
11488
|
-
return _react["default"].createElement("iframe", {
|
|
11520
|
+
return /*#__PURE__*/_react["default"].createElement("iframe", {
|
|
11489
11521
|
key: id,
|
|
11490
11522
|
ref: this.ref,
|
|
11491
11523
|
style: style,
|
|
@@ -11545,23 +11577,33 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
11545
11577
|
|
|
11546
11578
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
11547
11579
|
|
|
11548
|
-
function
|
|
11580
|
+
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); }; }
|
|
11549
11581
|
|
|
11550
|
-
function
|
|
11582
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
11551
11583
|
|
|
11552
11584
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11553
11585
|
|
|
11586
|
+
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; } }
|
|
11587
|
+
|
|
11588
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
11589
|
+
|
|
11554
11590
|
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); }
|
|
11555
11591
|
|
|
11556
11592
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
11557
11593
|
|
|
11558
11594
|
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; }
|
|
11559
11595
|
|
|
11596
|
+
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; } } }; }
|
|
11597
|
+
|
|
11598
|
+
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); }
|
|
11599
|
+
|
|
11600
|
+
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; }
|
|
11601
|
+
|
|
11560
11602
|
var IOS = typeof navigator !== 'undefined' && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
|
11561
11603
|
var AUDIO_EXTENSIONS = /\.(m4a|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i;
|
|
11562
11604
|
var VIDEO_EXTENSIONS = /\.(mp4|og[gv]|webm|mov|m4v)($|\?)/i;
|
|
11563
11605
|
var HLS_EXTENSIONS = /\.(m3u8)($|\?)/i;
|
|
11564
|
-
var HLS_SDK_URL = 'https://cdn.jsdelivr.net/npm/hls.js@VERSION';
|
|
11606
|
+
var HLS_SDK_URL = 'https://cdn.jsdelivr.net/npm/hls.js@VERSION/dist/hls.min.js';
|
|
11565
11607
|
var HLS_GLOBAL = 'Hls';
|
|
11566
11608
|
var DASH_EXTENSIONS = /\.(mpd)($|\?)/i;
|
|
11567
11609
|
var DASH_SDK_URL = 'https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js';
|
|
@@ -11570,12 +11612,11 @@ var MATCH_DROPBOX_URL = /www\.dropbox\.com\/.+/;
|
|
|
11570
11612
|
|
|
11571
11613
|
function canPlay(url) {
|
|
11572
11614
|
if (url instanceof Array) {
|
|
11573
|
-
var
|
|
11574
|
-
|
|
11575
|
-
var _iteratorError = undefined;
|
|
11615
|
+
var _iterator = _createForOfIteratorHelper(url),
|
|
11616
|
+
_step;
|
|
11576
11617
|
|
|
11577
11618
|
try {
|
|
11578
|
-
for (
|
|
11619
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
11579
11620
|
var item = _step.value;
|
|
11580
11621
|
|
|
11581
11622
|
if (typeof item === 'string' && canPlay(item)) {
|
|
@@ -11587,18 +11628,9 @@ function canPlay(url) {
|
|
|
11587
11628
|
}
|
|
11588
11629
|
}
|
|
11589
11630
|
} catch (err) {
|
|
11590
|
-
|
|
11591
|
-
_iteratorError = err;
|
|
11631
|
+
_iterator.e(err);
|
|
11592
11632
|
} finally {
|
|
11593
|
-
|
|
11594
|
-
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
11595
|
-
_iterator["return"]();
|
|
11596
|
-
}
|
|
11597
|
-
} finally {
|
|
11598
|
-
if (_didIteratorError) {
|
|
11599
|
-
throw _iteratorError;
|
|
11600
|
-
}
|
|
11601
|
-
}
|
|
11633
|
+
_iterator.f();
|
|
11602
11634
|
}
|
|
11603
11635
|
|
|
11604
11636
|
return false;
|
|
@@ -11622,14 +11654,12 @@ function canEnablePIP(url) {
|
|
|
11622
11654
|
return canPlay(url) && (!!document.pictureInPictureEnabled || supportsWebKitPresentationMode()) && !AUDIO_EXTENSIONS.test(url);
|
|
11623
11655
|
}
|
|
11624
11656
|
|
|
11625
|
-
var FilePlayer =
|
|
11626
|
-
/*#__PURE__*/
|
|
11627
|
-
function (_Component) {
|
|
11657
|
+
var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
11628
11658
|
_inherits(FilePlayer, _Component);
|
|
11629
11659
|
|
|
11630
|
-
|
|
11631
|
-
var _getPrototypeOf2;
|
|
11660
|
+
var _super = _createSuper(FilePlayer);
|
|
11632
11661
|
|
|
11662
|
+
function FilePlayer() {
|
|
11633
11663
|
var _this;
|
|
11634
11664
|
|
|
11635
11665
|
_classCallCheck(this, FilePlayer);
|
|
@@ -11638,7 +11668,7 @@ function (_Component) {
|
|
|
11638
11668
|
_args[_key] = arguments[_key];
|
|
11639
11669
|
}
|
|
11640
11670
|
|
|
11641
|
-
_this =
|
|
11671
|
+
_this = _super.call.apply(_super, [this].concat(_args));
|
|
11642
11672
|
|
|
11643
11673
|
_defineProperty(_assertThisInitialized(_this), "onReady", function () {
|
|
11644
11674
|
var _this$props;
|
|
@@ -11725,19 +11755,19 @@ function (_Component) {
|
|
|
11725
11755
|
|
|
11726
11756
|
_defineProperty(_assertThisInitialized(_this), "renderSourceElement", function (source, index) {
|
|
11727
11757
|
if (typeof source === 'string') {
|
|
11728
|
-
return _react["default"].createElement("source", {
|
|
11758
|
+
return /*#__PURE__*/_react["default"].createElement("source", {
|
|
11729
11759
|
key: index,
|
|
11730
11760
|
src: source
|
|
11731
11761
|
});
|
|
11732
11762
|
}
|
|
11733
11763
|
|
|
11734
|
-
return _react["default"].createElement("source", _extends({
|
|
11764
|
+
return /*#__PURE__*/_react["default"].createElement("source", _extends({
|
|
11735
11765
|
key: index
|
|
11736
11766
|
}, source));
|
|
11737
11767
|
});
|
|
11738
11768
|
|
|
11739
11769
|
_defineProperty(_assertThisInitialized(_this), "renderTrack", function (track, index) {
|
|
11740
|
-
return _react["default"].createElement("track", _extends({
|
|
11770
|
+
return /*#__PURE__*/_react["default"].createElement("track", _extends({
|
|
11741
11771
|
key: index
|
|
11742
11772
|
}, track));
|
|
11743
11773
|
});
|
|
@@ -11775,6 +11805,10 @@ function (_Component) {
|
|
|
11775
11805
|
key: "componentWillUnmount",
|
|
11776
11806
|
value: function componentWillUnmount() {
|
|
11777
11807
|
this.removeListeners(this.player);
|
|
11808
|
+
|
|
11809
|
+
if (this.hls) {
|
|
11810
|
+
this.hls.destroy();
|
|
11811
|
+
}
|
|
11778
11812
|
}
|
|
11779
11813
|
}, {
|
|
11780
11814
|
key: "addListeners",
|
|
@@ -11905,10 +11939,6 @@ function (_Component) {
|
|
|
11905
11939
|
value: function stop() {
|
|
11906
11940
|
this.player.removeAttribute('src');
|
|
11907
11941
|
|
|
11908
|
-
if (this.hls) {
|
|
11909
|
-
this.hls.destroy();
|
|
11910
|
-
}
|
|
11911
|
-
|
|
11912
11942
|
if (this.dash) {
|
|
11913
11943
|
this.dash.reset();
|
|
11914
11944
|
}
|
|
@@ -12020,7 +12050,7 @@ function (_Component) {
|
|
|
12020
12050
|
width: width === 'auto' ? width : '100%',
|
|
12021
12051
|
height: height === 'auto' ? height : '100%'
|
|
12022
12052
|
};
|
|
12023
|
-
return _react["default"].createElement(Element, _extends({
|
|
12053
|
+
return /*#__PURE__*/_react["default"].createElement(Element, _extends({
|
|
12024
12054
|
ref: this.ref,
|
|
12025
12055
|
src: this.getSource(url),
|
|
12026
12056
|
style: style,
|
|
@@ -12110,12 +12140,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
12110
12140
|
|
|
12111
12141
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
12112
12142
|
|
|
12113
|
-
function
|
|
12143
|
+
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); }; }
|
|
12114
12144
|
|
|
12115
|
-
function
|
|
12145
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
12116
12146
|
|
|
12117
12147
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12118
12148
|
|
|
12149
|
+
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; } }
|
|
12150
|
+
|
|
12151
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
12152
|
+
|
|
12119
12153
|
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); }
|
|
12120
12154
|
|
|
12121
12155
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -12124,14 +12158,12 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
12124
12158
|
|
|
12125
12159
|
var ICON_SIZE = '64px';
|
|
12126
12160
|
|
|
12127
|
-
var Preview =
|
|
12128
|
-
/*#__PURE__*/
|
|
12129
|
-
function (_Component) {
|
|
12161
|
+
var Preview = /*#__PURE__*/function (_Component) {
|
|
12130
12162
|
_inherits(Preview, _Component);
|
|
12131
12163
|
|
|
12132
|
-
|
|
12133
|
-
var _getPrototypeOf2;
|
|
12164
|
+
var _super = _createSuper(Preview);
|
|
12134
12165
|
|
|
12166
|
+
function Preview() {
|
|
12135
12167
|
var _this;
|
|
12136
12168
|
|
|
12137
12169
|
_classCallCheck(this, Preview);
|
|
@@ -12140,7 +12172,7 @@ function (_Component) {
|
|
|
12140
12172
|
args[_key] = arguments[_key];
|
|
12141
12173
|
}
|
|
12142
12174
|
|
|
12143
|
-
_this =
|
|
12175
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
12144
12176
|
|
|
12145
12177
|
_defineProperty(_assertThisInitialized(_this), "mounted", false);
|
|
12146
12178
|
|
|
@@ -12238,15 +12270,15 @@ function (_Component) {
|
|
|
12238
12270
|
}
|
|
12239
12271
|
};
|
|
12240
12272
|
|
|
12241
|
-
var defaultPlayIcon = _react["default"].createElement("div", {
|
|
12273
|
+
var defaultPlayIcon = /*#__PURE__*/_react["default"].createElement("div", {
|
|
12242
12274
|
style: styles.shadow,
|
|
12243
12275
|
className: "react-player__shadow"
|
|
12244
|
-
}, _react["default"].createElement("div", {
|
|
12276
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
12245
12277
|
style: styles.playIcon,
|
|
12246
12278
|
className: "react-player__play-icon"
|
|
12247
12279
|
}));
|
|
12248
12280
|
|
|
12249
|
-
return _react["default"].createElement("div", {
|
|
12281
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
12250
12282
|
style: styles.preview,
|
|
12251
12283
|
className: "react-player__preview",
|
|
12252
12284
|
onClick: onClick
|
|
@@ -12283,6 +12315,12 @@ var _Player = _interopRequireDefault(Player_1);
|
|
|
12283
12315
|
|
|
12284
12316
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12285
12317
|
|
|
12318
|
+
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; } } }; }
|
|
12319
|
+
|
|
12320
|
+
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); }
|
|
12321
|
+
|
|
12322
|
+
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; }
|
|
12323
|
+
|
|
12286
12324
|
var PRELOAD_PLAYERS = [{
|
|
12287
12325
|
Player: YouTube_1.YouTube,
|
|
12288
12326
|
configKey: 'youtube',
|
|
@@ -12303,16 +12341,16 @@ var PRELOAD_PLAYERS = [{
|
|
|
12303
12341
|
|
|
12304
12342
|
function renderPreloadPlayers(url, controls, config) {
|
|
12305
12343
|
var players = [];
|
|
12306
|
-
|
|
12307
|
-
var
|
|
12308
|
-
|
|
12344
|
+
|
|
12345
|
+
var _iterator = _createForOfIteratorHelper(PRELOAD_PLAYERS),
|
|
12346
|
+
_step;
|
|
12309
12347
|
|
|
12310
12348
|
try {
|
|
12311
|
-
for (
|
|
12349
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
12312
12350
|
var player = _step.value;
|
|
12313
12351
|
|
|
12314
12352
|
if (!player.Player.canPlay(url) && config[player.configKey].preload) {
|
|
12315
|
-
players.push(_react["default"].createElement(_Player["default"], {
|
|
12353
|
+
players.push( /*#__PURE__*/_react["default"].createElement(_Player["default"], {
|
|
12316
12354
|
key: player.Player.displayName,
|
|
12317
12355
|
activePlayer: player.Player,
|
|
12318
12356
|
url: player.url,
|
|
@@ -12324,18 +12362,9 @@ function renderPreloadPlayers(url, controls, config) {
|
|
|
12324
12362
|
}
|
|
12325
12363
|
}
|
|
12326
12364
|
} catch (err) {
|
|
12327
|
-
|
|
12328
|
-
_iteratorError = err;
|
|
12365
|
+
_iterator.e(err);
|
|
12329
12366
|
} finally {
|
|
12330
|
-
|
|
12331
|
-
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
12332
|
-
_iterator["return"]();
|
|
12333
|
-
}
|
|
12334
|
-
} finally {
|
|
12335
|
-
if (_didIteratorError) {
|
|
12336
|
-
throw _iteratorError;
|
|
12337
|
-
}
|
|
12338
|
-
}
|
|
12367
|
+
_iterator.f();
|
|
12339
12368
|
}
|
|
12340
12369
|
|
|
12341
12370
|
return players;
|
|
@@ -12459,13 +12488,17 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
12459
12488
|
|
|
12460
12489
|
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); }
|
|
12461
12490
|
|
|
12462
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
|
|
12491
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
12492
|
+
|
|
12493
|
+
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."); }
|
|
12494
|
+
|
|
12495
|
+
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); }
|
|
12463
12496
|
|
|
12464
|
-
function
|
|
12497
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
|
|
12465
12498
|
|
|
12466
|
-
function
|
|
12499
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
12467
12500
|
|
|
12468
|
-
function
|
|
12501
|
+
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; }
|
|
12469
12502
|
|
|
12470
12503
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
12471
12504
|
|
|
@@ -12473,12 +12506,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
12473
12506
|
|
|
12474
12507
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
12475
12508
|
|
|
12476
|
-
function
|
|
12509
|
+
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); }; }
|
|
12477
12510
|
|
|
12478
|
-
function
|
|
12511
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
12479
12512
|
|
|
12480
12513
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12481
12514
|
|
|
12515
|
+
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; } }
|
|
12516
|
+
|
|
12517
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
12518
|
+
|
|
12482
12519
|
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); }
|
|
12483
12520
|
|
|
12484
12521
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -12488,14 +12525,12 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
12488
12525
|
var SUPPORTED_PROPS = Object.keys(props.propTypes);
|
|
12489
12526
|
var customPlayers = [];
|
|
12490
12527
|
|
|
12491
|
-
var ReactPlayer =
|
|
12492
|
-
/*#__PURE__*/
|
|
12493
|
-
function (_Component) {
|
|
12528
|
+
var ReactPlayer = /*#__PURE__*/function (_Component) {
|
|
12494
12529
|
_inherits(ReactPlayer, _Component);
|
|
12495
12530
|
|
|
12496
|
-
|
|
12497
|
-
var _getPrototypeOf2;
|
|
12531
|
+
var _super = _createSuper(ReactPlayer);
|
|
12498
12532
|
|
|
12533
|
+
function ReactPlayer() {
|
|
12499
12534
|
var _this;
|
|
12500
12535
|
|
|
12501
12536
|
_classCallCheck(this, ReactPlayer);
|
|
@@ -12504,7 +12539,7 @@ function (_Component) {
|
|
|
12504
12539
|
args[_key] = arguments[_key];
|
|
12505
12540
|
}
|
|
12506
12541
|
|
|
12507
|
-
_this =
|
|
12542
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
12508
12543
|
|
|
12509
12544
|
_defineProperty(_assertThisInitialized(_this), "config", (0, utils.getConfig)(_this.props, props.defaultProps, true));
|
|
12510
12545
|
|
|
@@ -12615,7 +12650,7 @@ function (_Component) {
|
|
|
12615
12650
|
key: "renderActivePlayer",
|
|
12616
12651
|
value: function renderActivePlayer(url, activePlayer) {
|
|
12617
12652
|
if (!url) return null;
|
|
12618
|
-
return _react["default"].createElement(_Player4["default"], _extends({}, this.props, {
|
|
12653
|
+
return /*#__PURE__*/_react["default"].createElement(_Player4["default"], _extends({}, this.props, {
|
|
12619
12654
|
key: activePlayer.displayName,
|
|
12620
12655
|
ref: this.activePlayerRef,
|
|
12621
12656
|
config: this.config,
|
|
@@ -12652,14 +12687,14 @@ function (_Component) {
|
|
|
12652
12687
|
var preloadPlayers = (0, _preload["default"])(url, controls, this.config);
|
|
12653
12688
|
var players = [renderedActivePlayer].concat(_toConsumableArray(preloadPlayers)).sort(this.sortPlayers);
|
|
12654
12689
|
|
|
12655
|
-
var preview = _react["default"].createElement(_Preview["default"], {
|
|
12690
|
+
var preview = /*#__PURE__*/_react["default"].createElement(_Preview["default"], {
|
|
12656
12691
|
url: url,
|
|
12657
12692
|
light: light,
|
|
12658
12693
|
playIcon: playIcon,
|
|
12659
12694
|
onClick: this.handleClickPreview
|
|
12660
12695
|
});
|
|
12661
12696
|
|
|
12662
|
-
return _react["default"].createElement(Wrapper, _extends({
|
|
12697
|
+
return /*#__PURE__*/_react["default"].createElement(Wrapper, _extends({
|
|
12663
12698
|
ref: this.wrapperRef,
|
|
12664
12699
|
style: _objectSpread({}, style, {
|
|
12665
12700
|
width: width,
|
|
@@ -13518,7 +13553,7 @@ var NativeAd = function NativeAd(props) {
|
|
|
13518
13553
|
};
|
|
13519
13554
|
|
|
13520
13555
|
var Figure = dynamic(function () {
|
|
13521
|
-
return Promise
|
|
13556
|
+
return new Promise(function (resolve) { resolve(require('./Figure-0681dd7d.js')); });
|
|
13522
13557
|
}, { ssr: false });
|
|
13523
13558
|
|
|
13524
13559
|
var checkUrlIsExternal = function checkUrlIsExternal(url) {
|
|
@@ -14099,16 +14134,16 @@ var RelatedTopicsDropdown = function RelatedTopicsDropdown(_ref) {
|
|
|
14099
14134
|
_ref$className = _ref.className,
|
|
14100
14135
|
className = _ref$className === undefined ? '' : _ref$className;
|
|
14101
14136
|
|
|
14102
|
-
/*
|
|
14103
|
-
Props accepted - parentTaxonomy(required, object), subTaxonomy(required, array), page(optional), exclude(optional), variant(optional), className(optional)
|
|
14104
|
-
example:
|
|
14105
|
-
<RelatedTopicDropdown
|
|
14106
|
-
page='/clinical'
|
|
14107
|
-
exclude="clinical"
|
|
14108
|
-
className='mb-3'
|
|
14109
|
-
parentTaxonomy={props.parentTaxonomy}
|
|
14110
|
-
subTaxonomies={props.subTaxonomies}
|
|
14111
|
-
/>
|
|
14137
|
+
/*
|
|
14138
|
+
Props accepted - parentTaxonomy(required, object), subTaxonomy(required, array), page(optional), exclude(optional), variant(optional), className(optional)
|
|
14139
|
+
example:
|
|
14140
|
+
<RelatedTopicDropdown
|
|
14141
|
+
page='/clinical'
|
|
14142
|
+
exclude="clinical"
|
|
14143
|
+
className='mb-3'
|
|
14144
|
+
parentTaxonomy={props.parentTaxonomy}
|
|
14145
|
+
subTaxonomies={props.subTaxonomies}
|
|
14146
|
+
/>
|
|
14112
14147
|
*/
|
|
14113
14148
|
if (subTaxonomies.length === 0 && parentTaxonomy) {
|
|
14114
14149
|
if (parentTaxonomy.identifier == exclude) {
|
|
@@ -14146,25 +14181,25 @@ var RelatedTopicsDropdown = function RelatedTopicsDropdown(_ref) {
|
|
|
14146
14181
|
}
|
|
14147
14182
|
};
|
|
14148
14183
|
|
|
14149
|
-
/*
|
|
14150
|
-
This dropdown is used inside Article body to display related content placement and document group pages
|
|
14151
|
-
sample usage: <ArticleDetailDropdown article={props.article} exclude={['News']} style={{ backgroundColor: 'var(--primary)', border: 0 }} />
|
|
14152
|
-
|
|
14153
|
-
- accepts any normal html arrtibute (style, id, class)
|
|
14154
|
-
|
|
14155
|
-
- in article query, need to add '...' to content_placement to retreive additional info needed, and document_group to retrieve group data if available
|
|
14156
|
-
|
|
14157
|
-
'content_placement': taxonomyMapping[]-> {
|
|
14158
|
-
...,
|
|
14159
|
-
'ancestor': parent->parent->identifier,
|
|
14160
|
-
'parent': parent->identifier,
|
|
14161
|
-
'path': identifier
|
|
14162
|
-
},
|
|
14163
|
-
'document_group': documentGroup-> {
|
|
14164
|
-
name,
|
|
14165
|
-
'parent': parent->identifier,
|
|
14166
|
-
'path': identifier.current
|
|
14167
|
-
}
|
|
14184
|
+
/*
|
|
14185
|
+
This dropdown is used inside Article body to display related content placement and document group pages
|
|
14186
|
+
sample usage: <ArticleDetailDropdown article={props.article} exclude={['News']} style={{ backgroundColor: 'var(--primary)', border: 0 }} />
|
|
14187
|
+
|
|
14188
|
+
- accepts any normal html arrtibute (style, id, class)
|
|
14189
|
+
|
|
14190
|
+
- in article query, need to add '...' to content_placement to retreive additional info needed, and document_group to retrieve group data if available
|
|
14191
|
+
|
|
14192
|
+
'content_placement': taxonomyMapping[]-> {
|
|
14193
|
+
...,
|
|
14194
|
+
'ancestor': parent->parent->identifier,
|
|
14195
|
+
'parent': parent->identifier,
|
|
14196
|
+
'path': identifier
|
|
14197
|
+
},
|
|
14198
|
+
'document_group': documentGroup-> {
|
|
14199
|
+
name,
|
|
14200
|
+
'parent': parent->identifier,
|
|
14201
|
+
'path': identifier.current
|
|
14202
|
+
}
|
|
14168
14203
|
*/
|
|
14169
14204
|
|
|
14170
14205
|
var ArticleDetailDropdown = function ArticleDetailDropdown(props) {
|
|
@@ -15072,34 +15107,34 @@ var GridHero = function GridHero(props) {
|
|
|
15072
15107
|
);
|
|
15073
15108
|
};
|
|
15074
15109
|
|
|
15075
|
-
/*
|
|
15076
|
-
Sample query
|
|
15077
|
-
let references = ''
|
|
15078
|
-
if(article.taxonomyMapping.length > 0){
|
|
15079
|
-
article.taxonomyMapping.forEach((ref, index) => {
|
|
15080
|
-
references = references + `references('${ref._ref}') `
|
|
15081
|
-
if(index+1 !== article.taxonomyMapping.length){
|
|
15082
|
-
references = references + ` && `
|
|
15083
|
-
}
|
|
15084
|
-
})
|
|
15085
|
-
}
|
|
15086
|
-
|
|
15087
|
-
const relatedArticlesQuery = `*[!(_id in path("drafts.**")) && _type == "article" && title !='${article.title}' && defined(title) && is_visible == true && ( references('article.documentGroup._id') || ${references} ) && published <= '${today}'] | order(published desc) [0...4] {
|
|
15088
|
-
...,
|
|
15089
|
-
title,
|
|
15090
|
-
summary,
|
|
15091
|
-
thumbnail,
|
|
15092
|
-
url,
|
|
15093
|
-
published,
|
|
15094
|
-
authorMapping[]->,
|
|
15095
|
-
contentCategory->
|
|
15096
|
-
}`
|
|
15097
|
-
const relatedArticles = await client.fetch(relatedArticlesQuery)
|
|
15098
|
-
|
|
15099
|
-
Sample usage
|
|
15100
|
-
<RelatedContent dataRecord={props.relatedArticles} client={client} showAuthor showPublished reverse/>
|
|
15101
|
-
|
|
15102
|
-
|
|
15110
|
+
/*
|
|
15111
|
+
Sample query
|
|
15112
|
+
let references = ''
|
|
15113
|
+
if(article.taxonomyMapping.length > 0){
|
|
15114
|
+
article.taxonomyMapping.forEach((ref, index) => {
|
|
15115
|
+
references = references + `references('${ref._ref}') `
|
|
15116
|
+
if(index+1 !== article.taxonomyMapping.length){
|
|
15117
|
+
references = references + ` && `
|
|
15118
|
+
}
|
|
15119
|
+
})
|
|
15120
|
+
}
|
|
15121
|
+
|
|
15122
|
+
const relatedArticlesQuery = `*[!(_id in path("drafts.**")) && _type == "article" && title !='${article.title}' && defined(title) && is_visible == true && ( references('article.documentGroup._id') || ${references} ) && published <= '${today}'] | order(published desc) [0...4] {
|
|
15123
|
+
...,
|
|
15124
|
+
title,
|
|
15125
|
+
summary,
|
|
15126
|
+
thumbnail,
|
|
15127
|
+
url,
|
|
15128
|
+
published,
|
|
15129
|
+
authorMapping[]->,
|
|
15130
|
+
contentCategory->
|
|
15131
|
+
}`
|
|
15132
|
+
const relatedArticles = await client.fetch(relatedArticlesQuery)
|
|
15133
|
+
|
|
15134
|
+
Sample usage
|
|
15135
|
+
<RelatedContent dataRecord={props.relatedArticles} client={client} showAuthor showPublished reverse/>
|
|
15136
|
+
|
|
15137
|
+
|
|
15103
15138
|
*/
|
|
15104
15139
|
var RelatedContent = function RelatedContent(props) {
|
|
15105
15140
|
var client = props.client,
|
|
@@ -15166,21 +15201,21 @@ var RelatedContent = function RelatedContent(props) {
|
|
|
15166
15201
|
);
|
|
15167
15202
|
};
|
|
15168
15203
|
|
|
15169
|
-
/*
|
|
15170
|
-
Example usage - targetedonc.com/latest-conference
|
|
15171
|
-
const query = `*[!(_id in path("drafts.**")) && _type == "article" && defined(title) && is_visible == true && published <= '${today}' && references('b49d36b8-aa56-4183-a2bc-1568c229fb72') ] | order(published desc) [$from...$to] {
|
|
15172
|
-
...,
|
|
15173
|
-
title,
|
|
15174
|
-
summary,
|
|
15175
|
-
thumbnail,
|
|
15176
|
-
url,
|
|
15177
|
-
published,
|
|
15178
|
-
documentGroup->,
|
|
15179
|
-
contentCategory->,
|
|
15180
|
-
'pageNumber': ${currentPage}
|
|
15181
|
-
}`
|
|
15182
|
-
|
|
15183
|
-
const posts = await client.fetch(query, params)
|
|
15204
|
+
/*
|
|
15205
|
+
Example usage - targetedonc.com/latest-conference
|
|
15206
|
+
const query = `*[!(_id in path("drafts.**")) && _type == "article" && defined(title) && is_visible == true && published <= '${today}' && references('b49d36b8-aa56-4183-a2bc-1568c229fb72') ] | order(published desc) [$from...$to] {
|
|
15207
|
+
...,
|
|
15208
|
+
title,
|
|
15209
|
+
summary,
|
|
15210
|
+
thumbnail,
|
|
15211
|
+
url,
|
|
15212
|
+
published,
|
|
15213
|
+
documentGroup->,
|
|
15214
|
+
contentCategory->,
|
|
15215
|
+
'pageNumber': ${currentPage}
|
|
15216
|
+
}`
|
|
15217
|
+
|
|
15218
|
+
const posts = await client.fetch(query, params)
|
|
15184
15219
|
*/
|
|
15185
15220
|
|
|
15186
15221
|
var ConferenceArticleCard = function ConferenceArticleCard(props) {
|
|
@@ -16169,13 +16204,13 @@ var Article = function Article(props) {
|
|
|
16169
16204
|
var shareVia = shareOptions.shareVia,
|
|
16170
16205
|
shareSubject = shareOptions.shareSubject,
|
|
16171
16206
|
twitterSiteName = shareOptions.twitterSiteName,
|
|
16172
|
-
shareImageDefault = shareOptions.shareImageDefault
|
|
16207
|
+
shareImageDefault = shareOptions.shareImageDefault,
|
|
16208
|
+
shareSiteTitle = shareOptions.shareSiteTitle;
|
|
16173
16209
|
|
|
16174
16210
|
var shareUrl = shareOptions.shareBaseUrl + props.url;
|
|
16175
16211
|
var shareTitle = title;
|
|
16176
16212
|
var shareSummary = summary;
|
|
16177
16213
|
var shareImage = thumbnail && thumbnail.asset ? urlFor(thumbnail.asset).url() : shareImageDefault;
|
|
16178
|
-
|
|
16179
16214
|
var siteName = props.website.title;
|
|
16180
16215
|
return React__default.createElement(
|
|
16181
16216
|
React__default.Fragment,
|
|
@@ -16192,6 +16227,25 @@ var Article = function Article(props) {
|
|
|
16192
16227
|
React__default.createElement(
|
|
16193
16228
|
'div',
|
|
16194
16229
|
null,
|
|
16230
|
+
React__default.createElement(
|
|
16231
|
+
Head,
|
|
16232
|
+
null,
|
|
16233
|
+
React__default.createElement(
|
|
16234
|
+
'title',
|
|
16235
|
+
null,
|
|
16236
|
+
shareTitle + ' | ' + props.cache.siteSettingCache.name
|
|
16237
|
+
),
|
|
16238
|
+
React__default.createElement('meta', { property: 'og:url', content: shareUrl }),
|
|
16239
|
+
React__default.createElement('meta', { property: 'og:title', content: shareTitle }),
|
|
16240
|
+
React__default.createElement('meta', { property: 'og:image', content: shareImage }),
|
|
16241
|
+
React__default.createElement('meta', { property: 'og:site_name', content: props.Settings.title }),
|
|
16242
|
+
React__default.createElement('meta', { property: 'og:description', content: shareSummary }),
|
|
16243
|
+
React__default.createElement('meta', { name: 'twitter:card', content: 'summary' }),
|
|
16244
|
+
React__default.createElement('meta', { name: 'twitter:title', content: shareTitle }),
|
|
16245
|
+
React__default.createElement('meta', { name: 'twitter:image', content: shareImage }),
|
|
16246
|
+
React__default.createElement('meta', { name: 'twitter:site', content: '@' + shareSiteTitle }),
|
|
16247
|
+
React__default.createElement('meta', { name: 'twitter:description', content: shareSummary })
|
|
16248
|
+
),
|
|
16195
16249
|
React__default.createElement(
|
|
16196
16250
|
Head,
|
|
16197
16251
|
null,
|
|
@@ -16559,7 +16613,6 @@ var ArticleQueue = function ArticleQueue(props) {
|
|
|
16559
16613
|
if (props.pageview) {
|
|
16560
16614
|
props.pageview(newPath);
|
|
16561
16615
|
}
|
|
16562
|
-
|
|
16563
16616
|
refreshAdd(path);
|
|
16564
16617
|
}
|
|
16565
16618
|
}
|
|
@@ -16579,27 +16632,27 @@ var ArticleQueue = function ArticleQueue(props) {
|
|
|
16579
16632
|
};
|
|
16580
16633
|
|
|
16581
16634
|
var KMTracker = function KMTracker(props) {
|
|
16582
|
-
|
|
16635
|
+
var id = props.id;
|
|
16583
16636
|
|
|
16584
|
-
|
|
16637
|
+
if (document && id) {
|
|
16585
16638
|
(function () {
|
|
16586
|
-
|
|
16639
|
+
var ecnJquery = document.createElement('script');
|
|
16587
16640
|
|
|
16588
|
-
|
|
16589
|
-
|
|
16590
|
-
|
|
16641
|
+
ecnJquery.type = 'text/javascript';
|
|
16642
|
+
ecnJquery.async = true;
|
|
16643
|
+
ecnJquery.src = 'https://apidt.ecn5.com/ECN_jQuery.min.js';
|
|
16591
16644
|
|
|
16592
|
-
|
|
16645
|
+
var ecnScript = document.createElement('script');
|
|
16593
16646
|
|
|
16594
|
-
|
|
16595
|
-
|
|
16596
|
-
|
|
16597
|
-
|
|
16647
|
+
ecnScript.type = 'text/javascript';
|
|
16648
|
+
ecnScript.async = true;
|
|
16649
|
+
ecnScript.id = 'km-tracker';
|
|
16650
|
+
ecnScript.src = 'https://apidt.ecn5.com/ECN_tracker_Secure.js?TrackerKey=' + id;
|
|
16598
16651
|
|
|
16599
|
-
|
|
16600
|
-
|
|
16601
|
-
|
|
16602
|
-
|
|
16652
|
+
document.head.appendChild(ecnJquery);
|
|
16653
|
+
document.head.appendChild(ecnScript);
|
|
16654
|
+
})();
|
|
16655
|
+
}
|
|
16603
16656
|
};
|
|
16604
16657
|
|
|
16605
16658
|
exports.AdSlot = AdSlot.DFPAdSlot;
|