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