react-player
Advanced tools
Comparing version 0.14.2 to 0.14.3
@@ -7,2 +7,13 @@ # Change Log | ||
#### [v0.14.3](https://github.com/CookPete/react-player/compare/v0.14.2...v0.14.3) | ||
> 21 February 2017 | ||
* Add assertion for canPlay with https://vimeo [`#141`](https://github.com/CookPete/react-player/pull/141) | ||
* Use npm 4.x on travis [`#143`](https://github.com/CookPete/react-player/pull/143) | ||
* Use ubuntu 14.04 for travis [`#144`](https://github.com/CookPete/react-player/pull/144) | ||
* fixed width & height of video when it is in fullscreen mode [`#151`](https://github.com/CookPete/react-player/pull/151) | ||
* update webpack to 2.2.1 [`#156`](https://github.com/CookPete/react-player/pull/156) | ||
* Fix vidme url regex [`#158`](https://github.com/CookPete/react-player/issues/158) | ||
#### [v0.14.2](https://github.com/CookPete/react-player/compare/v0.14.1...v0.14.2) | ||
@@ -13,3 +24,3 @@ > 14 February 2017 | ||
* Fix npm prepublish script on windows [`#139`](https://github.com/CookPete/react-player/issues/139) | ||
* Use cross-env for build scripts [`a6191cf`](https://github.com/CookPete/react-player/commit/a6191cf1d0c14453c88deccfc81db63a60a3a1e0) | ||
* fixed width & height of video when it is in fullscreen mode [`f966a15`](https://github.com/CookPete/react-player/commit/f966a15c2e2221359eee54e0753e8f0906e670fd) | ||
@@ -16,0 +27,0 @@ |
@@ -1,3 +0,2 @@ | ||
var ReactPlayer=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(2),f=r(c),p=n(5),y=n(13),d=r(y),h=n(8),v=r(h),b=n(11),m=r(b),g=n(4),w=r(g),_=n(9),P=r(_),O=n(10),k=r(O),j=n(12),E=r(j),T=function(e){function t(){var e,n,r,u;i(this,t);for(var l=arguments.length,c=Array(l),p=0;p<l;p++)c[p]=arguments[p];return n=r=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(c))),r.seekTo=function(e){r.player&&r.player.seekTo(e)},r.progress=function(){if(r.props.url&&r.player){var e=r.player.getFractionLoaded()||0,t=r.player.getFractionPlayed()||0,n={};e!==r.prevLoaded&&(n.loaded=e),t!==r.prevPlayed&&(n.played=t),(n.loaded||n.played)&&r.props.onProgress(n),r.prevLoaded=e,r.prevPlayed=t}r.progressTimeout=setTimeout(r.progress,r.props.progressFrequency)},r.ref=function(e){r.player=e},r.renderPlayer=function(e){var t=e.canPlay(r.props.url),n=r.props,i=n.youtubeConfig,a=n.soundcloudConfig,u=n.vimeoConfig,l=n.fileConfig,c=o(n,["youtubeConfig","soundcloudConfig","vimeoConfig","fileConfig"]),p=t?s({},c,{ref:r.ref}):{};return f.default.createElement(e,s({key:e.displayName,youtubeConfig:i,soundcloudConfig:a,vimeoConfig:u,fileConfig:l},p))},u=n,a(r,u)}return u(t,e),l(t,[{key:"componentDidMount",value:function(){this.progress()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.progressTimeout)}},{key:"shouldComponentUpdate",value:function(e){return this.props.url!==e.url||this.props.playing!==e.playing||this.props.volume!==e.volume||this.props.playbackRate!==e.playbackRate||this.props.height!==e.height||this.props.width!==e.width||this.props.hidden!==e.hidden}},{key:"renderPlayers",value:function(){var e=this.props,t=e.url,n=e.youtubeConfig,r=e.vimeoConfig,o=[];return d.default.canPlay(t)?o.push(d.default):v.default.canPlay(t)?o.push(v.default):m.default.canPlay(t)?o.push(m.default):P.default.canPlay(t)?o.push(P.default):k.default.canPlay(t)?o.push(k.default):E.default.canPlay(t)?o.push(E.default):t&&o.push(w.default),!d.default.canPlay(t)&&n.preload&&o.push(d.default),!m.default.canPlay(t)&&r.preload&&o.push(m.default),o.map(this.renderPlayer)}},{key:"render",value:function(){var e=this.props,t=e.style,n=e.width,r=e.height,o=e.className,i=e.hidden,a=this.renderPlayers();return f.default.createElement("div",{style:s({},t,{width:n,height:r}),className:o,hidden:i},a)}}]),t}(c.Component);T.displayName="ReactPlayer",T.propTypes=p.propTypes,T.defaultProps=p.defaultProps,t.default=T,e.exports=t.default},function(e,t,n){(function(t,r,o){!function(t,n){e.exports=n()}(this,function(){"use strict";function e(e){return"function"==typeof e||"object"==typeof e&&null!==e}function r(e){return"function"==typeof e}function i(e){z=e}function a(e){J=e}function u(){return function(){return t.nextTick(p)}}function s(){return"undefined"!=typeof Y?function(){Y(p)}:f()}function l(){var e=0,t=new Z(p),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function c(){var e=new MessageChannel;return e.port1.onmessage=p,function(){return e.port2.postMessage(0)}}function f(){var e=setTimeout;return function(){return e(p,1)}}function p(){for(var e=0;e<G;e+=2){var t=ne[e],n=ne[e+1];t(n),ne[e]=void 0,ne[e+1]=void 0}G=0}function y(){try{var e=n(20);return Y=e.runOnLoop||e.runOnContext,s()}catch(e){return f()}}function d(e,t){var n=arguments,r=this,o=new this.constructor(v);void 0===o[oe]&&I(o);var i=r._state;return i?!function(){var e=n[i-1];J(function(){return D(i,o,e,r._result)})}():R(r,o,e,t),o}function h(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var n=new t(v);return k(n,e),n}function v(){}function b(){return new TypeError("You cannot resolve a promise with itself")}function m(){return new TypeError("A promises callback cannot return that same promise.")}function g(e){try{return e.then}catch(e){return se.error=e,se}}function w(e,t,n,r){try{e.call(t,n,r)}catch(e){return e}}function _(e,t,n){J(function(e){var r=!1,o=w(n,t,function(n){r||(r=!0,t!==n?k(e,n):E(e,n))},function(t){r||(r=!0,T(e,t))},"Settle: "+(e._label||" unknown promise"));!r&&o&&(r=!0,T(e,o))},e)}function P(e,t){t._state===ae?E(e,t._result):t._state===ue?T(e,t._result):R(t,void 0,function(t){return k(e,t)},function(t){return T(e,t)})}function O(e,t,n){t.constructor===e.constructor&&n===d&&t.constructor.resolve===h?P(e,t):n===se?T(e,se.error):void 0===n?E(e,t):r(n)?_(e,t,n):E(e,t)}function k(t,n){t===n?T(t,b()):e(n)?O(t,n,g(n)):E(t,n)}function j(e){e._onerror&&e._onerror(e._result),C(e)}function E(e,t){e._state===ie&&(e._result=t,e._state=ae,0!==e._subscribers.length&&J(C,e))}function T(e,t){e._state===ie&&(e._state=ue,e._result=t,J(j,e))}function R(e,t,n,r){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+ae]=n,o[i+ue]=r,0===i&&e._state&&J(C,e)}function C(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,o=void 0,i=e._result,a=0;a<t.length;a+=3)r=t[a],o=t[a+n],r?D(n,r,o,i):o(i);e._subscribers.length=0}}function A(){this.error=null}function S(e,t){try{return e(t)}catch(e){return le.error=e,le}}function D(e,t,n,o){var i=r(n),a=void 0,u=void 0,s=void 0,l=void 0;if(i){if(a=S(n,o),a===le?(l=!0,u=a.error,a=null):s=!0,t===a)return void T(t,m())}else a=o,s=!0;t._state!==ie||(i&&s?k(t,a):l?T(t,u):e===ae?E(t,a):e===ue&&T(t,a))}function x(e,t){try{t(function(t){k(e,t)},function(t){T(e,t)})}catch(t){T(e,t)}}function M(){return ce++}function I(e){e[oe]=ce++,e._state=void 0,e._result=void 0,e._subscribers=[]}function B(e,t){this._instanceConstructor=e,this.promise=new e(v),this.promise[oe]||I(this.promise),H(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?E(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&E(this.promise,this._result))):T(this.promise,F())}function F(){return new Error("Array Methods must be provided an Array")}function U(e){return new B(this,e).promise}function L(e){var t=this;return new t(H(e)?function(n,r){for(var o=e.length,i=0;i<o;i++)t.resolve(e[i]).then(n,r)}:function(e,t){return t(new TypeError("You must pass an array to race."))})}function N(e){var t=this,n=new t(v);return T(n,e),n}function V(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function q(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function W(e){this[oe]=M(),this._result=this._state=void 0,this._subscribers=[],v!==e&&("function"!=typeof e&&V(),this instanceof W?x(this,e):q())}function K(){var e=void 0;if("undefined"!=typeof o)e=o;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var n=null;try{n=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===n&&!t.cast)return}e.Promise=W}var $=void 0;$=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var H=$,G=0,Y=void 0,z=void 0,J=function(e,t){ne[G]=e,ne[G+1]=t,G+=2,2===G&&(z?z(p):re())},X="undefined"!=typeof window?window:void 0,Q=X||{},Z=Q.MutationObserver||Q.WebKitMutationObserver,ee="undefined"==typeof self&&"undefined"!=typeof t&&"[object process]"==={}.toString.call(t),te="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,ne=new Array(1e3),re=void 0;re=ee?u():Z?l():te?c():void 0===X?y():f();var oe=Math.random().toString(36).substring(16),ie=void 0,ae=1,ue=2,se=new A,le=new A,ce=0;return B.prototype._enumerate=function(){for(var e=this.length,t=this._input,n=0;this._state===ie&&n<e;n++)this._eachEntry(t[n],n)},B.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===h){var o=g(e);if(o===d&&e._state!==ie)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(n===W){var i=new n(v);O(i,e,o),this._willSettleAt(i,t)}else this._willSettleAt(new n(function(t){return t(e)}),t)}else this._willSettleAt(r(e),t)},B.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===ie&&(this._remaining--,e===ue?T(r,n):this._result[t]=n),0===this._remaining&&E(r,this._result)},B.prototype._willSettleAt=function(e,t){var n=this;R(e,void 0,function(e){return n._settledAt(ae,t,e)},function(e){return n._settledAt(ue,t,e)})},W.all=U,W.race=L,W.resolve=h,W.reject=N,W._setScheduler=i,W._setAsap=a,W._asap=J,W.prototype={constructor:W,then:d,catch:function(e){return this.then(null,e)}},W.polyfill=K,W.Promise=W,W}),e.exports=o.Promise}).call(t,n(17),n(1),function(){return this}())},function(e,t){e.exports=React},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(2),s=n(5),l=5e3,c=function(e){function t(){var e,n,i,a;r(this,t);for(var u=arguments.length,s=Array(u),l=0;l<u;l++)s[l]=arguments[l];return n=i=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),i.isReady=!1,i.startOnPlay=!0,i.durationOnPlay=!1,i.seekOnPlay=null,i.onPlay=function(){var e=i.props,t=e.volume,n=e.onStart,r=e.onPlay,o=e.onDuration,a=e.playbackRate;i.startOnPlay&&(i.setPlaybackRate(a),i.setVolume(t),n(),i.startOnPlay=!1),r(),i.seekOnPlay&&(i.seekTo(i.seekOnPlay),i.seekOnPlay=null),i.durationOnPlay&&(o(i.getDuration()),i.durationOnPlay=!1)},i.onReady=function(){var e=i.props,t=e.onReady,n=e.playing,r=e.onDuration;i.isReady=!0,t(),(n||i.preloading)&&(i.preloading=!1,i.loadOnReady?(i.load(i.loadOnReady),i.loadOnReady=null):i.play());var o=i.getDuration();o?r(o):i.durationOnPlay=!0},a=n,o(i,a)}return i(t,e),a(t,[{key:"componentDidMount",value:function(){var e=this.props.url;this.mounted=!0,e&&this.load(e)}},{key:"componentWillUnmount",value:function(){this.stop(),this.mounted=!1}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.url,r=t.playing,o=t.volume,i=t.playbackRate;n!==e.url&&e.url?(this.seekOnPlay=null,this.startOnPlay=!0,this.load(e.url)):n&&!e.url?(this.stop(),clearTimeout(this.updateTimeout)):!r&&e.playing?this.play():r&&!e.playing?this.pause():o!==e.volume?this.setVolume(e.volume):i!==e.playbackRate&&this.setPlaybackRate(e.playbackRate)}},{key:"shouldComponentUpdate",value:function(e){return this.props.url!==e.url}},{key:"seekTo",value:function(e){var t=this;this.isReady||0===e||(this.seekOnPlay=e,setTimeout(function(){t.seekOnPlay=null},l))}}]),t}(u.Component);c.propTypes=s.propTypes,c.defaultProps=s.defaultProps,t.default=c,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;if(void 0!==a)return a.call(r)},c=n(2),f=r(c),p=n(3),y=r(p),d=/\.(m4a|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i,h=function(e){function t(){var e,n,r,a;o(this,t);for(var u=arguments.length,s=Array(u),l=0;l<u;l++)s[l]=arguments[l];return n=r=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),r.ref=function(e){r.player=e},a=n,i(r,a)}return a(t,e),s(t,[{key:"componentDidMount",value:function(){var e=this,n=this.props,r=n.onPause,o=n.onEnded,i=n.onError;this.player.addEventListener("canplay",this.onReady),this.player.addEventListener("play",this.onPlay),this.player.addEventListener("pause",function(){e.mounted&&r()}),this.player.addEventListener("ended",o),this.player.addEventListener("error",i),this.player.setAttribute("webkit-playsinline",""),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentDidMount",this).call(this)}},{key:"componentWillUnmount",value:function(){var e=this.props,n=e.onPause,r=e.onEnded,o=e.onError;this.player.removeEventListener("canplay",this.onReady),this.player.removeEventListener("play",this.onPlay),this.player.removeEventListener("pause",n),this.player.removeEventListener("ended",r),this.player.removeEventListener("error",o),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentWillUnmount",this).call(this)}},{key:"load",value:function(e){this.player.src=e}},{key:"play",value:function(){this.player.play()}},{key:"pause",value:function(){this.player.pause()}},{key:"stop",value:function(){this.player.removeAttribute("src")}},{key:"seekTo",value:function(e){l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"seekTo",this).call(this,e),this.player.currentTime=this.getDuration()*e}},{key:"setVolume",value:function(e){this.player.volume=e}},{key:"setPlaybackRate",value:function(e){this.player.playbackRate=e}},{key:"getDuration",value:function(){return this.isReady?this.player.duration:null}},{key:"getFractionPlayed",value:function(){return this.isReady?this.player.currentTime/this.getDuration():null}},{key:"getFractionLoaded",value:function(){return this.isReady&&0!==this.player.buffered.length?this.player.buffered.end(0)/this.getDuration():null}},{key:"render",value:function(){var e=this.props,t=e.url,n=e.loop,r=e.controls,o=e.fileConfig,i=d.test(t)?"audio":"video",a={width:"100%",height:"100%",display:t?"block":"none"};return f.default.createElement(i,u({ref:this.ref,style:a,preload:"auto",controls:r,loop:n},o.attributes))}}],[{key:"canPlay",value:function(e){return!0}}]),t}(y.default);h.displayName="FilePlayer",t.default=h,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultProps=t.propTypes=void 0;var r=n(2),o=r.PropTypes.string,i=r.PropTypes.bool,a=r.PropTypes.number,u=r.PropTypes.oneOfType,s=r.PropTypes.shape,l=r.PropTypes.object,c=r.PropTypes.func;t.propTypes={url:o,playing:i,loop:i,controls:i,volume:a,playbackRate:a,width:u([o,a]),height:u([o,a]),hidden:i,className:o,style:l,progressFrequency:a,soundcloudConfig:s({clientId:o,showArtwork:i}),youtubeConfig:s({playerVars:l,preload:i}),vimeoConfig:s({iframeParams:l,preload:i}),fileConfig:s({attributes:l}),onReady:c,onStart:c,onPlay:c,onPause:c,onBuffer:c,onEnded:c,onError:c,onDuration:c,onProgress:c},t.defaultProps={playing:!1,loop:!1,controls:!1,volume:.8,playbackRate:1,width:640,height:360,hidden:!1,progressFrequency:1e3,soundcloudConfig:{clientId:"e8b6f84fbcad14c301ca1355cae1dea2",showArtwork:!0},youtubeConfig:{playerVars:{},preload:!1},vimeoConfig:{iframeParams:{},preload:!1},fileConfig:{attributes:{}},onReady:function(){},onStart:function(){},onPlay:function(){},onPause:function(){},onBuffer:function(){},onEnded:function(){},onError:function(){},onDuration:function(){},onProgress:function(){}}},function(e,t,n){(function(t){!function(e){"use strict";function n(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function r(e){return"string"!=typeof e&&(e=String(e)),e}function o(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return m.iterable&&(t[Symbol.iterator]=function(){return t}),t}function i(e){this.map={},e instanceof i?e.forEach(function(e,t){this.append(t,e)},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function a(e){return e.bodyUsed?t.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function u(e){return new t(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function s(e){var t=new FileReader,n=u(t);return t.readAsArrayBuffer(e),n}function l(e){var t=new FileReader,n=u(t);return t.readAsText(e),n}function c(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}function f(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function p(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(m.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(m.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(m.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(m.arrayBuffer&&m.blob&&w(e))this._bodyArrayBuffer=f(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!m.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e)&&!_(e))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=f(e)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):m.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},m.blob&&(this.blob=function(){var e=a(this);if(e)return e;if(this._bodyBlob)return t.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return t.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return t.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?a(this)||t.resolve(this._bodyArrayBuffer):this.blob().then(s)}),this.text=function(){var e=a(this);if(e)return e;if(this._bodyBlob)return l(this._bodyBlob);if(this._bodyArrayBuffer)return t.resolve(c(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return t.resolve(this._bodyText)},m.formData&&(this.formData=function(){return this.text().then(h)}),this.json=function(){return this.text().then(JSON.parse)},this}function y(e){var t=e.toUpperCase();return P.indexOf(t)>-1?t:e}function d(e,t){t=t||{};var n=t.body;if("string"==typeof e)this.url=e;else{if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new i(e.headers)),this.method=e.method,this.mode=e.mode,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new i(t.headers)),this.method=y(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function h(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}}),t}function v(e){var t=new i;return e.split("\r\n").forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}}),t}function b(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new i(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var m={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(m.arrayBuffer)var g=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],w=function(e){return e&&DataView.prototype.isPrototypeOf(e)},_=ArrayBuffer.isView||function(e){return e&&g.indexOf(Object.prototype.toString.call(e))>-1};i.prototype.append=function(e,t){e=n(e),t=r(t);var o=this.map[e];this.map[e]=o?o+","+t:t},i.prototype.delete=function(e){delete this.map[n(e)]},i.prototype.get=function(e){return e=n(e),this.has(e)?this.map[e]:null},i.prototype.has=function(e){return this.map.hasOwnProperty(n(e))},i.prototype.set=function(e,t){this.map[n(e)]=r(t)},i.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},i.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),o(e)},i.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),o(e)},i.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),o(e)},m.iterable&&(i.prototype[Symbol.iterator]=i.prototype.entries);var P=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];d.prototype.clone=function(){return new d(this,{body:this._bodyInit})},p.call(d.prototype),p.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new i(this.headers),url:this.url})},b.error=function(){var e=new b(null,{status:0,statusText:""});return e.type="error",e};var O=[301,302,303,307,308];b.redirect=function(e,t){if(O.indexOf(t)===-1)throw new RangeError("Invalid status code");return new b(null,{status:t,headers:{location:e}})},e.Headers=i,e.Request=d,e.Response=b,e.fetch=function(e,n){return new t(function(t,r){var o=new d(e,n),i=new XMLHttpRequest;i.onload=function(){var e={status:i.status,statusText:i.statusText,headers:v(i.getAllResponseHeaders()||"")};e.url="responseURL"in i?i.responseURL:e.headers.get("X-Request-URL");var n="response"in i?i.response:i.responseText;t(new b(n,e))},i.onerror=function(){r(new TypeError("Network request failed"))},i.ontimeout=function(){r(new TypeError("Network request failed"))},i.open(o.method,o.url,!0),"include"===o.credentials&&(i.withCredentials=!0),"responseType"in i&&m.blob&&(i.responseType="blob"),o.headers.forEach(function(e,t){i.setRequestHeader(t,e)}),i.send("undefined"==typeof o._bodyInit?null:o._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!=typeof self?self:this),e.exports=self.fetch}).call(t,n(1))},function(e,t){function n(e,t){for(var n in t)e.setAttribute(n,t[n])}function r(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function o(e,t){e.onreadystatechange=function(){"complete"!=this.readyState&&"loaded"!=this.readyState||(this.onreadystatechange=null,t(null,e))}}e.exports=function(e,t,i){var a=document.head||document.getElementsByTagName("head")[0],u=document.createElement("script");"function"==typeof t&&(i=t,t={}),t=t||{},i=i||function(){},u.type=t.type||"text/javascript",u.charset=t.charset||"utf8",u.async=!("async"in t)||!!t.async,u.src=e,t.attrs&&n(u,t.attrs),t.text&&(u.text=""+t.text);var s="onload"in u?r:o;s(u,i),u.onload||r(u,i),a.appendChild(u)}},function(e,t,n){(function(r){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;if(void 0!==a)return a.call(r)},c=n(2),f=o(c),p=n(15),y=o(p),d=n(4),h=o(d),v=n(5),b="//api.soundcloud.com/resolve.json",m=/^https?:\/\/(soundcloud.com|snd.sc)\/([a-z0-9-_]+\/[a-z0-9-_]+)$/,g={},w=function(e){function t(){var e,n,r,o;i(this,t);for(var u=arguments.length,s=Array(u),l=0;l<u;l++)s[l]=arguments[l];return n=r=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),r.state={image:null},r.clientId=r.props.soundcloudConfig.clientId||v.defaultProps.soundcloudConfig.clientId,r.ref=function(e){r.player=e},o=n,a(r,o)}return u(t,e),s(t,[{key:"shouldComponentUpdate",value:function(e,n){return l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"shouldComponentUpdate",this).call(this,e,n)||this.state.image!==n.image}},{key:"getSongData",value:function(e){var t=this;return g[e]?r.resolve(g[e]):(0,y.default)(b+"?url="+e+"&client_id="+this.clientId).then(function(n){return n.ok?(g[e]=n.json(),g[e]):void t.props.onError(new Error("SoundCloud track could not be resolved"))})}},{key:"load",value:function(e){var t=this,n=this.props,r=n.soundcloudConfig,o=n.onError;this.stop(),this.getSongData(e).then(function(e){if(t.mounted){if(!e.streamable)return void o(new Error("SoundCloud track is not streamable"));var n=e.artwork_url||e.user.avatar_url;n&&r.showArtwork&&t.setState({image:n.replace("-large","-t500x500")}),t.player.src=e.stream_url+"?client_id="+t.clientId}},o)}},{key:"render",value:function(){var e=this.props,t=e.url,n=e.loop,r=e.controls,o={display:t?"block":"none",height:"100%",backgroundImage:this.state.image?"url("+this.state.image+")":null,backgroundSize:"cover",backgroundPosition:"center"};return f.default.createElement("div",{style:o},f.default.createElement("audio",{ref:this.ref,type:"audio/mpeg",preload:"auto",style:{width:"100%",height:"100%"},controls:r,loop:n}))}}],[{key:"canPlay",value:function(e){return m.test(e)}}]),t}(h.default);w.displayName="SoundCloud",t.default=w,e.exports=t.default}).call(t,n(1))},function(e,t,n){(function(r,o){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(4),f=i(c),p="https://api.streamable.com/videos/",y=/^https?:\/\/streamable.com\/([a-z0-9]+)$/,d={},h=function(e){function t(){return a(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return s(t,e),l(t,[{key:"getData",value:function(e){var t=this.props.onError,n=e.match(y)[1];return d[n]?r.resolve(d[n]):o(p+n).then(function(e){return 200===e.status?(d[n]=e.json(),d[n]):void t(new Error("Streamable track could not be resolved"))})}},{key:"load",value:function(e){var t=this,n=this.props.onError;this.stop(),this.getData(e).then(function(e){t.mounted&&(t.player.src=e.files.mp4.url)},n)}}],[{key:"canPlay",value:function(e){return y.test(e)}}]),t}(f.default);h.displayName="Streamable",t.default=h,e.exports=t.default}).call(t,n(1),n(6))},function(e,t,n){(function(r,o){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(4),f=i(c),p="https://api.vid.me/videoByUrl/",y=/^https?:\/\/vid.me\/([a-z0-9]+)$/,d={},h=function(e){function t(){return a(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return s(t,e),l(t,[{key:"getData",value:function(e){ | ||
var t=this.props.onError,n=e.match(y)[1];return d[n]?r.resolve(d[n]):o(p+n).then(function(e){return 200===e.status?(d[n]=e.json(),d[n]):void t(new Error("Vidme track could not be resolved"))})}},{key:"load",value:function(e){var t=this,n=this.props.onError;this.stop(),this.getData(e).then(function(e){t.mounted&&(t.player.src=e.video.complete_url)},n)}}],[{key:"canPlay",value:function(e){return y.test(e)}}]),t}(f.default);h.displayName="Vidme",t.default=h,e.exports=t.default}).call(t,n(1),n(6))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;if(void 0!==a)return a.call(r)},c=n(2),f=r(c),p=n(18),y=n(3),d=r(y),h="https://player.vimeo.com/video/",v=/https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/,b=/^https?:\/\/player.vimeo.com/,m="https://vimeo.com/127250231",g={api:1,autoplay:0,badge:0,byline:0,fullscreen:1,portrait:0,title:0},w=function(e){function t(){var e,n,r,a;o(this,t);for(var u=arguments.length,s=Array(u),l=0;l<u;l++)s[l]=arguments[l];return n=r=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),r.onMessage=function(e){if(b.test(e.origin)){r.origin=r.origin||e.origin;var t=JSON.parse(e.data);"ready"===t.event&&(r.postMessage("getDuration"),r.postMessage("addEventListener","playProgress"),r.postMessage("addEventListener","loadProgress"),r.postMessage("addEventListener","play"),r.postMessage("addEventListener","pause"),r.postMessage("addEventListener","finish")),"playProgress"===t.event&&(r.fractionPlayed=t.data.percent),"loadProgress"===t.event&&(r.fractionLoaded=t.data.percent),"play"===t.event&&r.onPlay(),"pause"===t.event&&r.props.onPause(),"finish"===t.event&&r.onEnded(),"getDuration"===t.method&&(r.duration=t.value,r.onReady())}},r.onEnded=function(){var e=r.props,t=e.loop,n=e.onEnded;t&&r.seekTo(0),n()},r.postMessage=function(e,t){if(r.origin){var n=JSON.stringify({method:e,value:t});return r.iframe.contentWindow&&r.iframe.contentWindow.postMessage(n,r.origin)}},r.ref=function(e){r.iframe=e},a=n,i(r,a)}return a(t,e),s(t,[{key:"componentDidMount",value:function(){var e=this.props,n=e.url,r=e.vimeoConfig;window.addEventListener("message",this.onMessage,!1),!n&&r.preload&&(this.preloading=!0,this.load(m)),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentDidMount",this).call(this)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("message",this.onMessage,!1),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentWillUnmount",this).call(this)}},{key:"getIframeParams",value:function(){return u({},g,this.props.vimeoConfig.iframeParams)}},{key:"load",value:function(e){var t=e.match(v)[3];this.iframe.src=h+t+"?"+(0,p.stringify)(this.getIframeParams())}},{key:"play",value:function(){this.postMessage("play")}},{key:"pause",value:function(){this.postMessage("pause")}},{key:"stop",value:function(){this.iframe.src=""}},{key:"seekTo",value:function(e){l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"seekTo",this).call(this,e),this.postMessage("seekTo",this.duration*e)}},{key:"setVolume",value:function(e){this.postMessage("setVolume",e)}},{key:"setPlaybackRate",value:function(e){this.postMessage("setPlaybackRate",e)}},{key:"getDuration",value:function(){return this.duration}},{key:"getFractionPlayed",value:function(){return this.fractionPlayed||null}},{key:"getFractionLoaded",value:function(){return this.fractionLoaded||null}},{key:"render",value:function(){var e=this.getIframeParams(),t=e.fullscreen,n={display:this.props.url?"block":"none",width:"100%",height:"100%"};return f.default.createElement("iframe",{ref:this.ref,frameBorder:"0",style:n,allowFullScreen:t})}}],[{key:"canPlay",value:function(e){return v.test(e)}}]),t}(d.default);w.displayName="Vimeo",t.default=w,e.exports=t.default},function(e,t,n){(function(r){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;if(void 0!==a)return a.call(r)},c=n(2),f=o(c),p=n(7),y=o(p),d=n(3),h=o(d),v="//fast.wistia.com/assets/external/E-v1.js",b="Wistia",m=/^https?:\/\/(.+)?(wistia.com|wi.st)\/(medias|embed)\/(.*)$/,g=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),s(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.onStart,r=t.onPause,o=t.onEnded;this.loadingSDK=!0,this.getSDK().then(function(){window._wq=window._wq||[],window._wq.push({id:e.getID(e.props.url),onReady:function(t){e.loadingSDK=!1,e.player=t,e.player.bind("start",n),e.player.bind("play",e.onPlay),e.player.bind("pause",r),e.player.bind("end",o),e.onReady()}})})}},{key:"getSDK",value:function(){return new r(function(e,t){window[b]?e():(0,y.default)(v,function(n,r){n&&t(n),e(r)})})}},{key:"getID",value:function(e){return e&&e.match(m)[4]}},{key:"load",value:function(e){var t=this.getID(e);this.isReady&&(this.player.replaceWith(t),this.props.onReady(),this.onReady())}},{key:"play",value:function(){this.isReady&&this.player&&this.player.play()}},{key:"pause",value:function(){this.isReady&&this.player&&this.player&&this.player.pause()}},{key:"stop",value:function(){this.isReady&&this.player&&this.player.pause()}},{key:"seekTo",value:function(e){l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"seekTo",this).call(this,e),this.isReady&&this.player&&this.player.time(this.getDuration()*e)}},{key:"setVolume",value:function(e){this.isReady&&this.player&&this.player.volume&&this.player.volume(e)}},{key:"setPlaybackRate",value:function(e){this.isReady&&this.player&&this.player.playbackRate&&this.player.playbackRate(e)}},{key:"getDuration",value:function(){if(this.isReady&&this.player&&this.player.duration)return this.player.duration()}},{key:"getFractionPlayed",value:function(){return this.isReady&&this.player&&this.player.percentWatched?this.player.percentWatched():null}},{key:"getFractionLoaded",value:function(){return null}},{key:"render",value:function(){var e=this.getID(this.props.url),t="wistia_embed wistia_async_"+e,n={width:"100%",height:"100%",display:this.props.url?"block":"none"};return f.default.createElement("div",{className:t,style:n})}}],[{key:"canPlay",value:function(e){return m.test(e)}}]),t}(h.default);g.displayName="Wistia",t.default=g,e.exports=t.default}).call(t,n(1))},function(e,t,n){(function(r){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;if(void 0!==a)return a.call(r)},f=n(2),p=o(f),y=n(7),d=o(y),h=n(3),v=o(h),b=n(14),m="https://www.youtube.com/iframe_api",g="YT",w="onYouTubeIframeAPIReady",_=/^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/,P="https://www.youtube.com/watch?v=GlCmAC4MHek",O={autoplay:0,playsinline:1,showinfo:0,rel:0,iv_load_policy:3},k=function(e){function t(){var e,n,r,o;i(this,t);for(var u=arguments.length,s=Array(u),l=0;l<u;l++)s[l]=arguments[l];return n=r=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),r.onStateChange=function(e){var t=e.data,n=r.props,o=n.onPause,i=n.onBuffer,a=window[g].PlayerState,u=a.PLAYING,s=a.PAUSED,l=a.BUFFERING,c=a.ENDED,f=a.CUED;t===u&&r.onPlay(),t===s&&o(),t===l&&i(),t===c&&r.onEnded(),t===f&&r.onReady()},r.onEnded=function(){var e=r.props,t=e.loop,n=e.onEnded;t&&r.seekTo(0),n()},r.ref=function(e){r.container=e},o=n,a(r,o)}return u(t,e),l(t,[{key:"componentDidMount",value:function(){var e=this.props,n=e.url,r=e.youtubeConfig;!n&&r.preload&&(this.preloading=!0,this.load(P)),c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentDidMount",this).call(this)}},{key:"getSDK",value:function(){return window[g]&&window[g].loaded?r.resolve(window[g]):new r(function(e,t){var n=window[w];window[w]=function(){n&&n(),e(window[g])},(0,d.default)(m,function(e){e&&t(e)})})}},{key:"load",value:function(e){var t=this,n=this.props,r=n.controls,o=n.youtubeConfig,i=n.onError,a=e&&e.match(_)[1];return this.isReady?void this.player.cueVideoById({videoId:a,startSeconds:(0,b.parseStartTime)(e)}):this.loadingSDK?void(this.loadOnReady=e):(this.loadingSDK=!0,void this.getSDK().then(function(n){t.player=new n.Player(t.container,{width:"100%",height:"100%",videoId:a,playerVars:s({},O,{controls:r?1:0,start:(0,b.parseStartTime)(e),origin:window.location.origin},o.playerVars),events:{onReady:function(){t.loadingSDK=!1,t.onReady()},onStateChange:t.onStateChange,onError:function(e){return i(e.data)}}})},i))}},{key:"play",value:function(){this.isReady&&this.player.playVideo&&this.player.playVideo()}},{key:"pause",value:function(){this.isReady&&this.player.pauseVideo&&this.player.pauseVideo()}},{key:"stop",value:function(){this.isReady&&this.player.stopVideo&&this.player.stopVideo()}},{key:"seekTo",value:function(e){c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"seekTo",this).call(this,e),this.isReady&&this.player.seekTo&&this.player.seekTo(this.getDuration()*e)}},{key:"setVolume",value:function(e){this.isReady&&this.player.setVolume&&this.player.setVolume(100*e)}},{key:"setPlaybackRate",value:function(e){this.isReady&&this.player.setPlaybackRate&&this.player.setPlaybackRate(e)}},{key:"getDuration",value:function(){return this.isReady&&this.player.getDuration?this.player.getDuration():null}},{key:"getFractionPlayed",value:function(){return this.isReady&&this.getDuration()?this.player.getCurrentTime()/this.getDuration():null}},{key:"getFractionLoaded",value:function(){return this.isReady&&this.player.getVideoLoadedFraction?this.player.getVideoLoadedFraction():null}},{key:"render",value:function(){var e={width:"100%",height:"100%",display:this.props.url?"block":"none"};return p.default.createElement("div",{style:e},p.default.createElement("div",{ref:this.ref}))}}],[{key:"canPlay",value:function(e){return _.test(e)}}]),t}(v.default);k.displayName="YouTube",t.default=k,e.exports=t.default}).call(t,n(1))},function(e,t){"use strict";function n(e){var t=e.match(i);if(t){var n=t[1];if(n.match(a))return r(n);if(u.test(n))return parseInt(n,10)}return 0}function r(e){for(var t=0,n=a.exec(e);null!==n;){var r=n,i=o(r,3),u=i[1],s=i[2];"h"===s&&(t+=60*parseInt(u,10)*60),"m"===s&&(t+=60*parseInt(u,10)),"s"===s&&(t+=parseInt(u,10)),n=a.exec(e)}return t}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.parseStartTime=n;var i=/[?&#](?:start|t)=([0-9hms]+)/,a=/(\d+)(h|m|s)/g,u=/^\d+$/},function(e,t,n){var r,o,i;(function(n){!function(n,a){o=[t,e],r=a,i="function"==typeof r?r.apply(t,o):r,!(void 0!==i&&(e.exports=i))}(this,function(e,t){"use strict";function r(){return"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random())}function o(e){try{delete window[e]}catch(t){window[e]=void 0}}function i(e){var t=document.getElementById(e);document.getElementsByTagName("head")[0].removeChild(t)}function a(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],a=e,s=t.timeout||u.timeout,l=t.jsonpCallback||u.jsonpCallback,c=void 0;return new n(function(u,f){var p=t.jsonpCallbackFunction||r(),y=l+"_"+p;window[p]=function(e){u({ok:!0,json:function(){return n.resolve(e)}}),c&&clearTimeout(c),i(y),o(p)},a+=a.indexOf("?")===-1?"?":"&";var d=document.createElement("script");d.setAttribute("src",""+a+l+"="+p),d.id=y,document.getElementsByTagName("head")[0].appendChild(d),c=setTimeout(function(){f(new Error("JSONP request to "+e+" timed out")),o(p),i(y)},s)})}var u={timeout:5e3,jsonpCallback:"callback",jsonpCallbackFunction:null};t.exports=a})}).call(t,n(1))},function(e,t){"use strict";function n(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function r(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}var o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=r()?Object.assign:function(e,t){for(var r,a,u=n(e),s=1;s<arguments.length;s++){r=Object(arguments[s]);for(var l in r)o.call(r,l)&&(u[l]=r[l]);if(Object.getOwnPropertySymbols){a=Object.getOwnPropertySymbols(r);for(var c=0;c<a.length;c++)i.call(r,a[c])&&(u[a[c]]=r[a[c]])}}return u}},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(c===setTimeout)return setTimeout(e,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function i(e){if(f===clearTimeout)return clearTimeout(e);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(e);try{return f(e)}catch(t){try{return f.call(null,e)}catch(t){return f.call(this,e)}}}function a(){h&&y&&(h=!1,y.length?d=y.concat(d):v=-1,d.length&&u())}function u(){if(!h){var e=o(a);h=!0;for(var t=d.length;t;){for(y=d,d=[];++v<t;)y&&y[v].run();v=-1,t=d.length}y=null,h=!1,i(e)}}function s(e,t){this.fun=e,this.array=t}function l(){}var c,f,p=e.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:n}catch(e){c=n}try{f="function"==typeof clearTimeout?clearTimeout:r}catch(e){f=r}}();var y,d=[],h=!1,v=-1;p.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];d.push(new s(e,t)),1!==d.length||h||o(u)},s.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=l,p.addListener=l,p.once=l,p.off=l,p.removeListener=l,p.removeAllListeners=l,p.emit=l,p.binding=function(e){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(e){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(e,t,n){"use strict";function r(e,t){return t.encode?t.strict?o(e):encodeURIComponent(e):e}var o=n(19),i=n(16);t.extract=function(e){return e.split("?")[1]||""},t.parse=function(e){var t=Object.create(null);return"string"!=typeof e?t:(e=e.trim().replace(/^(\?|#|&)/,""))?(e.split("&").forEach(function(e){var n=e.replace(/\+/g," ").split("="),r=n.shift(),o=n.length>0?n.join("="):void 0;r=decodeURIComponent(r),o=void 0===o?null:decodeURIComponent(o),void 0===t[r]?t[r]=o:Array.isArray(t[r])?t[r].push(o):t[r]=[t[r],o]}),t):t},t.stringify=function(e,t){var n={encode:!0,strict:!0};return t=i(n,t),e?Object.keys(e).sort().map(function(n){var o=e[n];if(void 0===o)return"";if(null===o)return r(n,t);if(Array.isArray(o)){var i=[];return o.slice().forEach(function(e){void 0!==e&&(null===e?i.push(r(n,t)):i.push(r(n,t)+"="+r(e,t)))}),i.join("&")}return r(n,t)+"="+r(o,t)}).filter(function(e){return e.length>0}).join("&"):""}},function(e,t){"use strict";e.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}},function(e,t){}]); | ||
//# sourceMappingURL=ReactPlayer.js.map | ||
var ReactPlayer=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=21)}([function(e,t){e.exports=React},function(e,t,n){(function(t,r,o){!function(t,n){e.exports=n()}(this,function(){"use strict";function e(e){return"function"==typeof e||"object"==typeof e&&null!==e}function r(e){return"function"==typeof e}function i(e){z=e}function a(e){J=e}function u(){return function(){return t.nextTick(p)}}function s(){return"undefined"!=typeof Y?function(){Y(p)}:f()}function l(){var e=0,t=new Z(p),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function c(){var e=new MessageChannel;return e.port1.onmessage=p,function(){return e.port2.postMessage(0)}}function f(){var e=setTimeout;return function(){return e(p,1)}}function p(){for(var e=0;e<G;e+=2){var t=ne[e],n=ne[e+1];t(n),ne[e]=void 0,ne[e+1]=void 0}G=0}function y(){try{var e=n(20);return Y=e.runOnLoop||e.runOnContext,s()}catch(e){return f()}}function d(e,t){var n=arguments,r=this,o=new this.constructor(v);void 0===o[oe]&&I(o);var i=r._state;return i?!function(){var e=n[i-1];J(function(){return D(i,o,e,r._result)})}():R(r,o,e,t),o}function h(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var n=new t(v);return k(n,e),n}function v(){}function b(){return new TypeError("You cannot resolve a promise with itself")}function m(){return new TypeError("A promises callback cannot return that same promise.")}function g(e){try{return e.then}catch(e){return se.error=e,se}}function w(e,t,n,r){try{e.call(t,n,r)}catch(e){return e}}function _(e,t,n){J(function(e){var r=!1,o=w(n,t,function(n){r||(r=!0,t!==n?k(e,n):E(e,n))},function(t){r||(r=!0,T(e,t))},"Settle: "+(e._label||" unknown promise"));!r&&o&&(r=!0,T(e,o))},e)}function O(e,t){t._state===ae?E(e,t._result):t._state===ue?T(e,t._result):R(t,void 0,function(t){return k(e,t)},function(t){return T(e,t)})}function P(e,t,n){t.constructor===e.constructor&&n===d&&t.constructor.resolve===h?O(e,t):n===se?T(e,se.error):void 0===n?E(e,t):r(n)?_(e,t,n):E(e,t)}function k(t,n){t===n?T(t,b()):e(n)?P(t,n,g(n)):E(t,n)}function j(e){e._onerror&&e._onerror(e._result),C(e)}function E(e,t){e._state===ie&&(e._result=t,e._state=ae,0!==e._subscribers.length&&J(C,e))}function T(e,t){e._state===ie&&(e._state=ue,e._result=t,J(j,e))}function R(e,t,n,r){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+ae]=n,o[i+ue]=r,0===i&&e._state&&J(C,e)}function C(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,o=void 0,i=e._result,a=0;a<t.length;a+=3)r=t[a],o=t[a+n],r?D(n,r,o,i):o(i);e._subscribers.length=0}}function A(){this.error=null}function S(e,t){try{return e(t)}catch(e){return le.error=e,le}}function D(e,t,n,o){var i=r(n),a=void 0,u=void 0,s=void 0,l=void 0;if(i){if(a=S(n,o),a===le?(l=!0,u=a.error,a=null):s=!0,t===a)return void T(t,m())}else a=o,s=!0;t._state!==ie||(i&&s?k(t,a):l?T(t,u):e===ae?E(t,a):e===ue&&T(t,a))}function x(e,t){try{t(function(t){k(e,t)},function(t){T(e,t)})}catch(t){T(e,t)}}function M(){return ce++}function I(e){e[oe]=ce++,e._state=void 0,e._result=void 0,e._subscribers=[]}function B(e,t){this._instanceConstructor=e,this.promise=new e(v),this.promise[oe]||I(this.promise),H(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?E(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&E(this.promise,this._result))):T(this.promise,F())}function F(){return new Error("Array Methods must be provided an Array")}function U(e){return new B(this,e).promise}function L(e){var t=this;return new t(H(e)?function(n,r){for(var o=e.length,i=0;i<o;i++)t.resolve(e[i]).then(n,r)}:function(e,t){return t(new TypeError("You must pass an array to race."))})}function N(e){var t=this,n=new t(v);return T(n,e),n}function V(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function q(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function W(e){this[oe]=M(),this._result=this._state=void 0,this._subscribers=[],v!==e&&("function"!=typeof e&&V(),this instanceof W?x(this,e):q())}function K(){var e=void 0;if("undefined"!=typeof o)e=o;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var n=null;try{n=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===n&&!t.cast)return}e.Promise=W}var $=void 0;$=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var H=$,G=0,Y=void 0,z=void 0,J=function(e,t){ne[G]=e,ne[G+1]=t,G+=2,2===G&&(z?z(p):re())},X="undefined"!=typeof window?window:void 0,Q=X||{},Z=Q.MutationObserver||Q.WebKitMutationObserver,ee="undefined"==typeof self&&"undefined"!=typeof t&&"[object process]"==={}.toString.call(t),te="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,ne=new Array(1e3),re=void 0;re=ee?u():Z?l():te?c():void 0===X?y():f();var oe=Math.random().toString(36).substring(16),ie=void 0,ae=1,ue=2,se=new A,le=new A,ce=0;return B.prototype._enumerate=function(){for(var e=this.length,t=this._input,n=0;this._state===ie&&n<e;n++)this._eachEntry(t[n],n)},B.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===h){var o=g(e);if(o===d&&e._state!==ie)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(n===W){var i=new n(v);P(i,e,o),this._willSettleAt(i,t)}else this._willSettleAt(new n(function(t){return t(e)}),t)}else this._willSettleAt(r(e),t)},B.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===ie&&(this._remaining--,e===ue?T(r,n):this._result[t]=n),0===this._remaining&&E(r,this._result)},B.prototype._willSettleAt=function(e,t){var n=this;R(e,void 0,function(e){return n._settledAt(ae,t,e)},function(e){return n._settledAt(ue,t,e)})},W.all=U,W.race=L,W.resolve=h,W.reject=N,W._setScheduler=i,W._setAsap=a,W._asap=J,W.prototype={constructor:W,then:d,catch:function(e){return this.then(null,e)}},W.polyfill=K,W.Promise=W,W}),e.exports=o.Promise}).call(t,n(16),n(1),n(19))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;if(void 0!==a)return a.call(r)},c=n(0),f=r(c),p=n(3),y=r(p),d=/\.(m4a|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i,h=function(e){function t(){var e,n,r,a;o(this,t);for(var u=arguments.length,s=Array(u),l=0;l<u;l++)s[l]=arguments[l];return n=r=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),r.ref=function(e){r.player=e},a=n,i(r,a)}return a(t,e),s(t,[{key:"componentDidMount",value:function(){var e=this,n=this.props,r=n.onPause,o=n.onEnded,i=n.onError;this.player.addEventListener("canplay",this.onReady),this.player.addEventListener("play",this.onPlay),this.player.addEventListener("pause",function(){e.mounted&&r()}),this.player.addEventListener("ended",o),this.player.addEventListener("error",i),this.player.setAttribute("webkit-playsinline",""),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentDidMount",this).call(this)}},{key:"componentWillUnmount",value:function(){var e=this.props,n=e.onPause,r=e.onEnded,o=e.onError;this.player.removeEventListener("canplay",this.onReady),this.player.removeEventListener("play",this.onPlay),this.player.removeEventListener("pause",n),this.player.removeEventListener("ended",r),this.player.removeEventListener("error",o),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentWillUnmount",this).call(this)}},{key:"load",value:function(e){this.player.src=e}},{key:"play",value:function(){this.player.play()}},{key:"pause",value:function(){this.player.pause()}},{key:"stop",value:function(){this.player.removeAttribute("src")}},{key:"seekTo",value:function(e){l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"seekTo",this).call(this,e),this.player.currentTime=this.getDuration()*e}},{key:"setVolume",value:function(e){this.player.volume=e}},{key:"setPlaybackRate",value:function(e){this.player.playbackRate=e}},{key:"getDuration",value:function(){return this.isReady?this.player.duration:null}},{key:"getFractionPlayed",value:function(){return this.isReady?this.player.currentTime/this.getDuration():null}},{key:"getFractionLoaded",value:function(){return this.isReady&&0!==this.player.buffered.length?this.player.buffered.end(0)/this.getDuration():null}},{key:"render",value:function(){var e=this.props,t=e.url,n=e.loop,r=e.controls,o=e.fileConfig,i=d.test(t)?"audio":"video",a={width:"100%",height:"100%",display:t?"block":"none"};return f.default.createElement(i,u({ref:this.ref,style:a,preload:"auto",controls:r,loop:n},o.attributes))}}],[{key:"canPlay",value:function(e){return!0}}]),t}(y.default);h.displayName="FilePlayer",t.default=h,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),s=n(4),l=5e3,c=function(e){function t(){var e,n,i,a;r(this,t);for(var u=arguments.length,s=Array(u),l=0;l<u;l++)s[l]=arguments[l];return n=i=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),i.isReady=!1,i.startOnPlay=!0,i.durationOnPlay=!1,i.seekOnPlay=null,i.onPlay=function(){var e=i.props,t=e.volume,n=e.onStart,r=e.onPlay,o=e.onDuration,a=e.playbackRate;i.startOnPlay&&(i.setPlaybackRate(a),i.setVolume(t),n(),i.startOnPlay=!1),r(),i.seekOnPlay&&(i.seekTo(i.seekOnPlay),i.seekOnPlay=null),i.durationOnPlay&&(o(i.getDuration()),i.durationOnPlay=!1)},i.onReady=function(){var e=i.props,t=e.onReady,n=e.playing,r=e.onDuration;i.isReady=!0,t(),(n||i.preloading)&&(i.preloading=!1,i.loadOnReady?(i.load(i.loadOnReady),i.loadOnReady=null):i.play());var o=i.getDuration();o?r(o):i.durationOnPlay=!0},a=n,o(i,a)}return i(t,e),a(t,[{key:"componentDidMount",value:function(){var e=this.props.url;this.mounted=!0,e&&this.load(e)}},{key:"componentWillUnmount",value:function(){this.stop(),this.mounted=!1}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.url,r=t.playing,o=t.volume,i=t.playbackRate;n!==e.url&&e.url?(this.seekOnPlay=null,this.startOnPlay=!0,this.load(e.url)):n&&!e.url?(this.stop(),clearTimeout(this.updateTimeout)):!r&&e.playing?this.play():r&&!e.playing?this.pause():o!==e.volume?this.setVolume(e.volume):i!==e.playbackRate&&this.setPlaybackRate(e.playbackRate)}},{key:"shouldComponentUpdate",value:function(e){return this.props.url!==e.url}},{key:"seekTo",value:function(e){var t=this;this.isReady||0===e||(this.seekOnPlay=e,setTimeout(function(){t.seekOnPlay=null},l))}}]),t}(u.Component);c.propTypes=s.propTypes,c.defaultProps=s.defaultProps,t.default=c,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultProps=t.propTypes=void 0;var r=n(0),o=r.PropTypes.string,i=r.PropTypes.bool,a=r.PropTypes.number,u=r.PropTypes.oneOfType,s=r.PropTypes.shape,l=r.PropTypes.object,c=r.PropTypes.func;t.propTypes={url:o,playing:i,loop:i,controls:i,volume:a,playbackRate:a,width:u([o,a]),height:u([o,a]),hidden:i,className:o,style:l,progressFrequency:a,soundcloudConfig:s({clientId:o,showArtwork:i}),youtubeConfig:s({playerVars:l,preload:i}),vimeoConfig:s({iframeParams:l,preload:i}),fileConfig:s({attributes:l}),onReady:c,onStart:c,onPlay:c,onPause:c,onBuffer:c,onEnded:c,onError:c,onDuration:c,onProgress:c},t.defaultProps={playing:!1,loop:!1,controls:!1,volume:.8,playbackRate:1,width:640,height:360,hidden:!1,progressFrequency:1e3,soundcloudConfig:{clientId:"e8b6f84fbcad14c301ca1355cae1dea2",showArtwork:!0},youtubeConfig:{playerVars:{},preload:!1},vimeoConfig:{iframeParams:{},preload:!1},fileConfig:{attributes:{}},onReady:function(){},onStart:function(){},onPlay:function(){},onPause:function(){},onBuffer:function(){},onEnded:function(){},onError:function(){},onDuration:function(){},onProgress:function(){}}},function(e,t,n){(function(t){!function(e){"use strict";function n(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function r(e){return"string"!=typeof e&&(e=String(e)),e}function o(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return m.iterable&&(t[Symbol.iterator]=function(){return t}),t}function i(e){this.map={},e instanceof i?e.forEach(function(e,t){this.append(t,e)},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function a(e){return e.bodyUsed?t.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function u(e){return new t(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function s(e){var t=new FileReader,n=u(t);return t.readAsArrayBuffer(e),n}function l(e){var t=new FileReader,n=u(t);return t.readAsText(e),n}function c(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}function f(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function p(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(m.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(m.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(m.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(m.arrayBuffer&&m.blob&&w(e))this._bodyArrayBuffer=f(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!m.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e)&&!_(e))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=f(e)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):m.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},m.blob&&(this.blob=function(){var e=a(this);if(e)return e;if(this._bodyBlob)return t.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return t.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return t.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?a(this)||t.resolve(this._bodyArrayBuffer):this.blob().then(s)}),this.text=function(){var e=a(this);if(e)return e;if(this._bodyBlob)return l(this._bodyBlob);if(this._bodyArrayBuffer)return t.resolve(c(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return t.resolve(this._bodyText)},m.formData&&(this.formData=function(){return this.text().then(h)}),this.json=function(){return this.text().then(JSON.parse)},this}function y(e){var t=e.toUpperCase();return O.indexOf(t)>-1?t:e}function d(e,t){t=t||{};var n=t.body;if("string"==typeof e)this.url=e;else{if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new i(e.headers)),this.method=e.method,this.mode=e.mode,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new i(t.headers)),this.method=y(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function h(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}}),t}function v(e){var t=new i;return e.split("\r\n").forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}}),t}function b(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new i(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var m={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(m.arrayBuffer)var g=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],w=function(e){return e&&DataView.prototype.isPrototypeOf(e)},_=ArrayBuffer.isView||function(e){return e&&g.indexOf(Object.prototype.toString.call(e))>-1};i.prototype.append=function(e,t){e=n(e),t=r(t);var o=this.map[e];this.map[e]=o?o+","+t:t},i.prototype.delete=function(e){delete this.map[n(e)]},i.prototype.get=function(e){return e=n(e),this.has(e)?this.map[e]:null},i.prototype.has=function(e){return this.map.hasOwnProperty(n(e))},i.prototype.set=function(e,t){this.map[n(e)]=r(t)},i.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},i.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),o(e)},i.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),o(e)},i.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),o(e)},m.iterable&&(i.prototype[Symbol.iterator]=i.prototype.entries);var O=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];d.prototype.clone=function(){return new d(this,{body:this._bodyInit})},p.call(d.prototype),p.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new i(this.headers),url:this.url})},b.error=function(){var e=new b(null,{status:0,statusText:""});return e.type="error",e};var P=[301,302,303,307,308];b.redirect=function(e,t){if(P.indexOf(t)===-1)throw new RangeError("Invalid status code");return new b(null,{status:t,headers:{location:e}})},e.Headers=i,e.Request=d,e.Response=b,e.fetch=function(e,n){return new t(function(t,r){var o=new d(e,n),i=new XMLHttpRequest;i.onload=function(){var e={status:i.status,statusText:i.statusText,headers:v(i.getAllResponseHeaders()||"")};e.url="responseURL"in i?i.responseURL:e.headers.get("X-Request-URL");var n="response"in i?i.response:i.responseText;t(new b(n,e))},i.onerror=function(){r(new TypeError("Network request failed"))},i.ontimeout=function(){r(new TypeError("Network request failed"))},i.open(o.method,o.url,!0),"include"===o.credentials&&(i.withCredentials=!0),"responseType"in i&&m.blob&&(i.responseType="blob"),o.headers.forEach(function(e,t){i.setRequestHeader(t,e)}),i.send("undefined"==typeof o._bodyInit?null:o._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!=typeof self?self:this),e.exports=self.fetch}).call(t,n(1))},function(e,t){function n(e,t){for(var n in t)e.setAttribute(n,t[n])}function r(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function o(e,t){e.onreadystatechange=function(){"complete"!=this.readyState&&"loaded"!=this.readyState||(this.onreadystatechange=null,t(null,e))}}e.exports=function(e,t,i){var a=document.head||document.getElementsByTagName("head")[0],u=document.createElement("script");"function"==typeof t&&(i=t,t={}),t=t||{},i=i||function(){},u.type=t.type||"text/javascript",u.charset=t.charset||"utf8",u.async=!("async"in t)||!!t.async,u.src=e,t.attrs&&n(u,t.attrs),t.text&&(u.text=""+t.text);var s="onload"in u?r:o;s(u,i),u.onload||r(u,i),a.appendChild(u)}},function(e,t,n){"use strict";(function(r){function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;if(void 0!==a)return a.call(r)},c=n(0),f=o(c),p=n(14),y=o(p),d=n(2),h=o(d),v=n(4),b="//api.soundcloud.com/resolve.json",m=/^https?:\/\/(soundcloud.com|snd.sc)\/([a-z0-9-_]+\/[a-z0-9-_]+)$/,g={},w=function(e){function t(){var e,n,r,o;i(this,t);for(var u=arguments.length,s=Array(u),l=0;l<u;l++)s[l]=arguments[l];return n=r=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),r.state={image:null},r.clientId=r.props.soundcloudConfig.clientId||v.defaultProps.soundcloudConfig.clientId,r.ref=function(e){r.player=e},o=n,a(r,o)}return u(t,e),s(t,[{key:"shouldComponentUpdate",value:function(e,n){return l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"shouldComponentUpdate",this).call(this,e,n)||this.state.image!==n.image}},{key:"getSongData",value:function(e){var t=this;return g[e]?r.resolve(g[e]):(0,y.default)(b+"?url="+e+"&client_id="+this.clientId).then(function(n){return n.ok?(g[e]=n.json(),g[e]):void t.props.onError(new Error("SoundCloud track could not be resolved"))})}},{key:"load",value:function(e){var t=this,n=this.props,r=n.soundcloudConfig,o=n.onError;this.stop(),this.getSongData(e).then(function(e){if(t.mounted){if(!e.streamable)return void o(new Error("SoundCloud track is not streamable"));var n=e.artwork_url||e.user.avatar_url;n&&r.showArtwork&&t.setState({image:n.replace("-large","-t500x500")}),t.player.src=e.stream_url+"?client_id="+t.clientId}},o)}},{key:"render",value:function(){var e=this.props,t=e.url,n=e.loop,r=e.controls,o={display:t?"block":"none",height:"100%",backgroundImage:this.state.image?"url("+this.state.image+")":null,backgroundSize:"cover",backgroundPosition:"center"};return f.default.createElement("div",{style:o},f.default.createElement("audio",{ref:this.ref,type:"audio/mpeg",preload:"auto",style:{width:"100%",height:"100%"},controls:r,loop:n}))}}],[{key:"canPlay",value:function(e){return m.test(e)}}]),t}(h.default);w.displayName="SoundCloud",t.default=w,e.exports=t.default}).call(t,n(1))},function(e,t,n){"use strict";(function(r,o){function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(2),f=i(c),p="https://api.streamable.com/videos/",y=/^https?:\/\/streamable.com\/([a-z0-9]+)$/,d={},h=function(e){function t(){return a(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return s(t,e),l(t,[{key:"getData",value:function(e){var t=this.props.onError,n=e.match(y)[1];return d[n]?r.resolve(d[n]):o(p+n).then(function(e){return 200===e.status?(d[n]=e.json(),d[n]):void t(new Error("Streamable track could not be resolved"))})}},{key:"load",value:function(e){var t=this,n=this.props.onError;this.stop(),this.getData(e).then(function(e){t.mounted&&(t.player.src=e.files.mp4.url)},n)}}],[{key:"canPlay",value:function(e){return y.test(e)}}]),t}(f.default);h.displayName="Streamable",t.default=h,e.exports=t.default}).call(t,n(1),n(5))},function(e,t,n){"use strict";(function(r,o){function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(2),f=i(c),p="https://api.vid.me/videoByUrl/",y=/^https?:\/\/vid.me\/([a-z0-9]+)$/i,d={},h=function(e){function t(){return a(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return s(t,e),l(t,[{key:"getData",value:function(e){var t=this.props.onError,n=e.match(y)[1];return d[n]?r.resolve(d[n]):o(p+n).then(function(e){return 200===e.status?(d[n]=e.json(),d[n]):void t(new Error("Vidme track could not be resolved"))})}},{key:"load",value:function(e){var t=this,n=this.props.onError;this.stop(),this.getData(e).then(function(e){t.mounted&&(t.player.src=e.video.complete_url)},n)}}],[{key:"canPlay",value:function(e){return y.test(e)}}]),t}(f.default);h.displayName="Vidme",t.default=h,e.exports=t.default}).call(t,n(1),n(5))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;if(void 0!==a)return a.call(r)},c=n(0),f=r(c),p=n(17),y=n(3),d=r(y),h="https://player.vimeo.com/video/",v=/https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/,b=/^https?:\/\/player.vimeo.com/,m="https://vimeo.com/127250231",g={api:1,autoplay:0,badge:0,byline:0,fullscreen:1,portrait:0,title:0},w=function(e){function t(){var e,n,r,a;o(this,t);for(var u=arguments.length,s=Array(u),l=0;l<u;l++)s[l]=arguments[l];return n=r=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),r.onMessage=function(e){if(b.test(e.origin)){r.origin=r.origin||e.origin;var t=JSON.parse(e.data);"ready"===t.event&&(r.postMessage("getDuration"),r.postMessage("addEventListener","playProgress"),r.postMessage("addEventListener","loadProgress"),r.postMessage("addEventListener","play"),r.postMessage("addEventListener","pause"),r.postMessage("addEventListener","finish")),"playProgress"===t.event&&(r.fractionPlayed=t.data.percent),"loadProgress"===t.event&&(r.fractionLoaded=t.data.percent),"play"===t.event&&r.onPlay(),"pause"===t.event&&r.props.onPause(),"finish"===t.event&&r.onEnded(),"getDuration"===t.method&&(r.duration=t.value,r.onReady())}},r.onEnded=function(){var e=r.props,t=e.loop,n=e.onEnded;t&&r.seekTo(0),n()},r.postMessage=function(e,t){if(r.origin){var n=JSON.stringify({method:e,value:t});return r.iframe.contentWindow&&r.iframe.contentWindow.postMessage(n,r.origin)}},r.ref=function(e){r.iframe=e},a=n,i(r,a)}return a(t,e), | ||
s(t,[{key:"componentDidMount",value:function(){var e=this.props,n=e.url,r=e.vimeoConfig;window.addEventListener("message",this.onMessage,!1),!n&&r.preload&&(this.preloading=!0,this.load(m)),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentDidMount",this).call(this)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("message",this.onMessage,!1),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentWillUnmount",this).call(this)}},{key:"getIframeParams",value:function(){return u({},g,this.props.vimeoConfig.iframeParams)}},{key:"load",value:function(e){var t=e.match(v)[3];this.iframe.src=h+t+"?"+(0,p.stringify)(this.getIframeParams())}},{key:"play",value:function(){this.postMessage("play")}},{key:"pause",value:function(){this.postMessage("pause")}},{key:"stop",value:function(){this.iframe.src=""}},{key:"seekTo",value:function(e){l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"seekTo",this).call(this,e),this.postMessage("seekTo",this.duration*e)}},{key:"setVolume",value:function(e){this.postMessage("setVolume",e)}},{key:"setPlaybackRate",value:function(e){this.postMessage("setPlaybackRate",e)}},{key:"getDuration",value:function(){return this.duration}},{key:"getFractionPlayed",value:function(){return this.fractionPlayed||null}},{key:"getFractionLoaded",value:function(){return this.fractionLoaded||null}},{key:"render",value:function(){var e=this.getIframeParams(),t=e.fullscreen,n={display:this.props.url?"block":"none",width:"100%",height:"100%"};return f.default.createElement("iframe",{ref:this.ref,frameBorder:"0",style:n,allowFullScreen:t})}}],[{key:"canPlay",value:function(e){return v.test(e)}}]),t}(d.default);w.displayName="Vimeo",t.default=w,e.exports=t.default},function(e,t,n){"use strict";(function(r){function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;if(void 0!==a)return a.call(r)},c=n(0),f=o(c),p=n(6),y=o(p),d=n(3),h=o(d),v="//fast.wistia.com/assets/external/E-v1.js",b="Wistia",m=/^https?:\/\/(.+)?(wistia.com|wi.st)\/(medias|embed)\/(.*)$/,g=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),s(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.onStart,r=t.onPause,o=t.onEnded;this.loadingSDK=!0,this.getSDK().then(function(){window._wq=window._wq||[],window._wq.push({id:e.getID(e.props.url),onReady:function(t){e.loadingSDK=!1,e.player=t,e.player.bind("start",n),e.player.bind("play",e.onPlay),e.player.bind("pause",r),e.player.bind("end",o),e.onReady()}})})}},{key:"getSDK",value:function(){return new r(function(e,t){window[b]?e():(0,y.default)(v,function(n,r){n&&t(n),e(r)})})}},{key:"getID",value:function(e){return e&&e.match(m)[4]}},{key:"load",value:function(e){var t=this.getID(e);this.isReady&&(this.player.replaceWith(t),this.props.onReady(),this.onReady())}},{key:"play",value:function(){this.isReady&&this.player&&this.player.play()}},{key:"pause",value:function(){this.isReady&&this.player&&this.player&&this.player.pause()}},{key:"stop",value:function(){this.isReady&&this.player&&this.player.pause()}},{key:"seekTo",value:function(e){l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"seekTo",this).call(this,e),this.isReady&&this.player&&this.player.time(this.getDuration()*e)}},{key:"setVolume",value:function(e){this.isReady&&this.player&&this.player.volume&&this.player.volume(e)}},{key:"setPlaybackRate",value:function(e){this.isReady&&this.player&&this.player.playbackRate&&this.player.playbackRate(e)}},{key:"getDuration",value:function(){if(this.isReady&&this.player&&this.player.duration)return this.player.duration()}},{key:"getFractionPlayed",value:function(){return this.isReady&&this.player&&this.player.percentWatched?this.player.percentWatched():null}},{key:"getFractionLoaded",value:function(){return null}},{key:"render",value:function(){var e=this.getID(this.props.url),t="wistia_embed wistia_async_"+e,n={width:"100%",height:"100%",display:this.props.url?"block":"none"};return f.default.createElement("div",{className:t,style:n})}}],[{key:"canPlay",value:function(e){return m.test(e)}}]),t}(h.default);g.displayName="Wistia",t.default=g,e.exports=t.default}).call(t,n(1))},function(e,t,n){"use strict";(function(r){function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;if(void 0!==a)return a.call(r)},f=n(0),p=o(f),y=n(6),d=o(y),h=n(3),v=o(h),b=n(13),m="https://www.youtube.com/iframe_api",g="YT",w="onYouTubeIframeAPIReady",_=/^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/,O="https://www.youtube.com/watch?v=GlCmAC4MHek",P={autoplay:0,playsinline:1,showinfo:0,rel:0,iv_load_policy:3},k=function(e){function t(){var e,n,r,o;i(this,t);for(var u=arguments.length,s=Array(u),l=0;l<u;l++)s[l]=arguments[l];return n=r=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),r.onStateChange=function(e){var t=e.data,n=r.props,o=n.onPause,i=n.onBuffer,a=window[g].PlayerState,u=a.PLAYING,s=a.PAUSED,l=a.BUFFERING,c=a.ENDED,f=a.CUED;t===u&&r.onPlay(),t===s&&o(),t===l&&i(),t===c&&r.onEnded(),t===f&&r.onReady()},r.onEnded=function(){var e=r.props,t=e.loop,n=e.onEnded;t&&r.seekTo(0),n()},r.ref=function(e){r.container=e},o=n,a(r,o)}return u(t,e),l(t,[{key:"componentDidMount",value:function(){var e=this.props,n=e.url,r=e.youtubeConfig;!n&&r.preload&&(this.preloading=!0,this.load(O)),c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentDidMount",this).call(this)}},{key:"getSDK",value:function(){return window[g]&&window[g].loaded?r.resolve(window[g]):new r(function(e,t){var n=window[w];window[w]=function(){n&&n(),e(window[g])},(0,d.default)(m,function(e){e&&t(e)})})}},{key:"load",value:function(e){var t=this,n=this.props,r=n.controls,o=n.youtubeConfig,i=n.onError,a=e&&e.match(_)[1];return this.isReady?void this.player.cueVideoById({videoId:a,startSeconds:(0,b.parseStartTime)(e)}):this.loadingSDK?void(this.loadOnReady=e):(this.loadingSDK=!0,void this.getSDK().then(function(n){t.player=new n.Player(t.container,{width:"100%",height:"100%",videoId:a,playerVars:s({},P,{controls:r?1:0,start:(0,b.parseStartTime)(e),origin:window.location.origin},o.playerVars),events:{onReady:function(){t.loadingSDK=!1,t.onReady()},onStateChange:t.onStateChange,onError:function(e){return i(e.data)}}})},i))}},{key:"play",value:function(){this.isReady&&this.player.playVideo&&this.player.playVideo()}},{key:"pause",value:function(){this.isReady&&this.player.pauseVideo&&this.player.pauseVideo()}},{key:"stop",value:function(){this.isReady&&this.player.stopVideo&&this.player.stopVideo()}},{key:"seekTo",value:function(e){c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"seekTo",this).call(this,e),this.isReady&&this.player.seekTo&&this.player.seekTo(this.getDuration()*e)}},{key:"setVolume",value:function(e){this.isReady&&this.player.setVolume&&this.player.setVolume(100*e)}},{key:"setPlaybackRate",value:function(e){this.isReady&&this.player.setPlaybackRate&&this.player.setPlaybackRate(e)}},{key:"getDuration",value:function(){return this.isReady&&this.player.getDuration?this.player.getDuration():null}},{key:"getFractionPlayed",value:function(){return this.isReady&&this.getDuration()?this.player.getCurrentTime()/this.getDuration():null}},{key:"getFractionLoaded",value:function(){return this.isReady&&this.player.getVideoLoadedFraction?this.player.getVideoLoadedFraction():null}},{key:"render",value:function(){var e={width:"100%",height:"100%",display:this.props.url?"block":"none"};return p.default.createElement("div",{style:e},p.default.createElement("div",{ref:this.ref}))}}],[{key:"canPlay",value:function(e){return _.test(e)}}]),t}(v.default);k.displayName="YouTube",t.default=k,e.exports=t.default}).call(t,n(1))},function(e,t,n){"use strict";function r(e){var t=e.match(a);if(t){var n=t[1];if(n.match(u))return o(n);if(s.test(n))return parseInt(n,10)}return 0}function o(e){for(var t=0,n=u.exec(e);null!==n;){var r=n,o=i(r,3),a=o[1],s=o[2];"h"===s&&(t+=60*parseInt(a,10)*60),"m"===s&&(t+=60*parseInt(a,10)),"s"===s&&(t+=parseInt(a,10)),n=u.exec(e)}return t}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.parseStartTime=r;var a=/[?&#](?:start|t)=([0-9hms]+)/,u=/(\d+)(h|m|s)/g,s=/^\d+$/},function(e,t,n){(function(n){var r,o,i;!function(n,a){o=[t,e],r=a,i="function"==typeof r?r.apply(t,o):r,!(void 0!==i&&(e.exports=i))}(this,function(e,t){"use strict";function r(){return"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random())}function o(e){try{delete window[e]}catch(t){window[e]=void 0}}function i(e){var t=document.getElementById(e);document.getElementsByTagName("head")[0].removeChild(t)}function a(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],a=e,s=t.timeout||u.timeout,l=t.jsonpCallback||u.jsonpCallback,c=void 0;return new n(function(u,f){var p=t.jsonpCallbackFunction||r(),y=l+"_"+p;window[p]=function(e){u({ok:!0,json:function(){return n.resolve(e)}}),c&&clearTimeout(c),i(y),o(p)},a+=a.indexOf("?")===-1?"?":"&";var d=document.createElement("script");d.setAttribute("src",""+a+l+"="+p),d.id=y,document.getElementsByTagName("head")[0].appendChild(d),c=setTimeout(function(){f(new Error("JSONP request to "+e+" timed out")),o(p),i(y)},s)})}var u={timeout:5e3,jsonpCallback:"callback",jsonpCallbackFunction:null};t.exports=a})}).call(t,n(1))},function(e,t,n){"use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function o(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}var i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=o()?Object.assign:function(e,t){for(var n,o,u=r(e),s=1;s<arguments.length;s++){n=Object(arguments[s]);for(var l in n)i.call(n,l)&&(u[l]=n[l]);if(Object.getOwnPropertySymbols){o=Object.getOwnPropertySymbols(n);for(var c=0;c<o.length;c++)a.call(n,o[c])&&(u[o[c]]=n[o[c]])}}return u}},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(c===setTimeout)return setTimeout(e,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function i(e){if(f===clearTimeout)return clearTimeout(e);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(e);try{return f(e)}catch(t){try{return f.call(null,e)}catch(t){return f.call(this,e)}}}function a(){h&&y&&(h=!1,y.length?d=y.concat(d):v=-1,d.length&&u())}function u(){if(!h){var e=o(a);h=!0;for(var t=d.length;t;){for(y=d,d=[];++v<t;)y&&y[v].run();v=-1,t=d.length}y=null,h=!1,i(e)}}function s(e,t){this.fun=e,this.array=t}function l(){}var c,f,p=e.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:n}catch(e){c=n}try{f="function"==typeof clearTimeout?clearTimeout:r}catch(e){f=r}}();var y,d=[],h=!1,v=-1;p.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];d.push(new s(e,t)),1!==d.length||h||o(u)},s.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=l,p.addListener=l,p.once=l,p.off=l,p.removeListener=l,p.removeAllListeners=l,p.emit=l,p.binding=function(e){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(e){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(e,t,n){"use strict";function r(e,t){return t.encode?t.strict?o(e):encodeURIComponent(e):e}var o=n(18),i=n(15);t.extract=function(e){return e.split("?")[1]||""},t.parse=function(e){var t=Object.create(null);return"string"!=typeof e?t:(e=e.trim().replace(/^(\?|#|&)/,""))?(e.split("&").forEach(function(e){var n=e.replace(/\+/g," ").split("="),r=n.shift(),o=n.length>0?n.join("="):void 0;r=decodeURIComponent(r),o=void 0===o?null:decodeURIComponent(o),void 0===t[r]?t[r]=o:Array.isArray(t[r])?t[r].push(o):t[r]=[t[r],o]}),t):t},t.stringify=function(e,t){var n={encode:!0,strict:!0};return t=i(n,t),e?Object.keys(e).sort().map(function(n){var o=e[n];if(void 0===o)return"";if(null===o)return r(n,t);if(Array.isArray(o)){var i=[];return o.slice().forEach(function(e){void 0!==e&&(null===e?i.push(r(n,t)):i.push(r(n,t)+"="+r(e,t)))}),i.join("&")}return r(n,t)+"="+r(o,t)}).filter(function(e){return e.length>0}).join("&"):""}},function(e,t,n){"use strict";e.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(0),f=r(c),p=n(4),y=n(12),d=r(y),h=n(7),v=r(h),b=n(10),m=r(b),g=n(2),w=r(g),_=n(8),O=r(_),P=n(9),k=r(P),j=n(11),E=r(j),T=function(e){function t(){var e,n,r,u;i(this,t);for(var l=arguments.length,c=Array(l),p=0;p<l;p++)c[p]=arguments[p];return n=r=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(c))),r.seekTo=function(e){r.player&&r.player.seekTo(e)},r.progress=function(){if(r.props.url&&r.player){var e=r.player.getFractionLoaded()||0,t=r.player.getFractionPlayed()||0,n={};e!==r.prevLoaded&&(n.loaded=e),t!==r.prevPlayed&&(n.played=t),(n.loaded||n.played)&&r.props.onProgress(n),r.prevLoaded=e,r.prevPlayed=t}r.progressTimeout=setTimeout(r.progress,r.props.progressFrequency)},r.ref=function(e){r.player=e},r.renderPlayer=function(e){var t=e.canPlay(r.props.url),n=r.props,i=n.youtubeConfig,a=n.soundcloudConfig,u=n.vimeoConfig,l=n.fileConfig,c=o(n,["youtubeConfig","soundcloudConfig","vimeoConfig","fileConfig"]),p=t?s({},c,{ref:r.ref}):{};return f.default.createElement(e,s({key:e.displayName,youtubeConfig:i,soundcloudConfig:a,vimeoConfig:u,fileConfig:l},p))},u=n,a(r,u)}return u(t,e),l(t,[{key:"componentDidMount",value:function(){this.progress()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.progressTimeout)}},{key:"shouldComponentUpdate",value:function(e){return this.props.url!==e.url||this.props.playing!==e.playing||this.props.volume!==e.volume||this.props.playbackRate!==e.playbackRate||this.props.height!==e.height||this.props.width!==e.width||this.props.hidden!==e.hidden}},{key:"renderPlayers",value:function(){var e=this.props,t=e.url,n=e.youtubeConfig,r=e.vimeoConfig,o=[];return d.default.canPlay(t)?o.push(d.default):v.default.canPlay(t)?o.push(v.default):m.default.canPlay(t)?o.push(m.default):O.default.canPlay(t)?o.push(O.default):k.default.canPlay(t)?o.push(k.default):E.default.canPlay(t)?o.push(E.default):t&&o.push(w.default),!d.default.canPlay(t)&&n.preload&&o.push(d.default),!m.default.canPlay(t)&&r.preload&&o.push(m.default),o.map(this.renderPlayer)}},{key:"render",value:function(){var e=this.props,t=e.style,n=e.width,r=e.height,o=e.className,i=e.hidden,a=this.renderPlayers();return f.default.createElement("div",{style:s({},t,{width:n,height:r}),className:o,hidden:i},a)}}]),t}(c.Component);T.displayName="ReactPlayer",T.propTypes=p.propTypes,T.defaultProps=p.defaultProps,t.default=T,e.exports=t.default}]); |
@@ -22,3 +22,3 @@ 'use strict'; | ||
var RESOLVE_URL = 'https://api.vid.me/videoByUrl/'; | ||
var MATCH_URL = /^https?:\/\/vid.me\/([a-z0-9]+)$/; | ||
var MATCH_URL = /^https?:\/\/vid.me\/([a-z0-9]+)$/i; | ||
@@ -25,0 +25,0 @@ var cache = {}; // Cache song data requests |
{ | ||
"name": "react-player", | ||
"version": "0.14.2", | ||
"version": "0.14.3", | ||
"description": "A react component for playing a variety of URLs, including file paths, YouTube, SoundCloud, Streamable, Vidme, Vimeo and Wistia", | ||
@@ -67,3 +67,3 @@ "main": "lib/ReactPlayer.js", | ||
"express": "^4.14.0", | ||
"extract-text-webpack-plugin": "^1.0.1", | ||
"extract-text-webpack-plugin": "^2.0.0-rc.3", | ||
"json-loader": "^0.5.4", | ||
@@ -78,3 +78,3 @@ "karma": "^1.3.0", | ||
"karma-sourcemap-loader": "^0.3.7", | ||
"karma-webpack": "^1.8.0", | ||
"karma-webpack": "^2.0.2", | ||
"mocha": "^3.1.0", | ||
@@ -86,8 +86,8 @@ "node-sass": "^4.1.1", | ||
"rimraf": "^2.5.4", | ||
"sass-loader": "^4.0.2", | ||
"sass-loader": "^6.0.1", | ||
"screenfull": "^3.0.2", | ||
"snazzy": "^5.0.0", | ||
"snazzy": "^6.0.0", | ||
"standard": "^8.3.0", | ||
"style-loader": "^0.13.1", | ||
"webpack": "^1.13.2", | ||
"webpack": "^2.2.1", | ||
"webpack-dev-middleware": "^1.8.3", | ||
@@ -94,0 +94,0 @@ "webpack-hot-middleware": "^2.12.2", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
858403
29
2683