mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-08-20 22:52:39 +02:00
deploy: 0708e0ae1c
This commit is contained in:
@@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkOpenSign_Docs=self.webpackChunkOpenSign_Docs||[]).push([[7100],{43353:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>p,frontMatter:()=>s,metadata:()=>a,toc:()=>d});var o=n(85893),r=n(11151);const s={sidebar_position:1},i="Intro",a={id:"help/intro",title:"Intro",description:"\ud83c\udf1fGet ready for an electrifying journey at OpenSign\u2122, the most incredibly documented open source document signing solution! \ud83d\ude80 This is your go-to spot for diving deep into everything OpenSign\u2122 has to offer. Whether you\u2019re just starting out or you\u2019re a seasoned pro eager to uncover even more cool features, we\u2019ve got you covered with the most awesome, top-notch guides and resources around. Get ready to make the most out of OpenSign\u2122 \ud83c\udf89\ud83d\udcda\ud83d\udd0d Your adventure in excellence starts here! \ud83c\udf08\u2728\ud83c\udf1f",source:"@site/docs/help/intro.md",sourceDirName:"help",slug:"/help/intro",permalink:"/docs/help/intro",draft:!1,unlisted:!1,editUrl:"https://github.com/opensignlabs/opensign/tree/feat-docs/docs/docs/help/intro.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",next:{title:"Create New OpenSign Document",permalink:"/docs/category/create-new-opensign-document"}},c={},d=[{value:"Getting Started",id:"getting-started",level:2}];function u(e){const t={a:"a",h1:"h1",h2:"h2",p:"p",strong:"strong",...(0,r.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h1,{id:"intro",children:"Intro"}),"\n",(0,o.jsxs)(t.p,{children:["\ud83c\udf1fGet ready for an electrifying journey at ",(0,o.jsx)(t.a,{href:"https://app.opensignlabs.com",children:"OpenSign\u2122"}),", the most incredibly documented open source document signing solution! \ud83d\ude80 This is your go-to spot for diving deep into everything OpenSign\u2122 has to offer. Whether you\u2019re just starting out or you\u2019re a seasoned pro eager to uncover even more cool features, we\u2019ve got you covered with the most awesome, top-notch guides and resources around. Get ready to make the most out of OpenSign\u2122 \ud83c\udf89\ud83d\udcda\ud83d\udd0d Your adventure in excellence starts here! \ud83c\udf08\u2728\ud83c\udf1f"]}),"\n",(0,o.jsx)(t.h2,{id:"getting-started",children:"Getting Started"}),"\n",(0,o.jsxs)(t.p,{children:["Try OpenSign on cloud at ",(0,o.jsx)(t.strong,{children:(0,o.jsx)(t.a,{href:"https://app.opensignlabs.com",children:"OpenSignLabs"})}),"."]}),"\n",(0,o.jsx)(t.p,{children:"Or"}),"\n",(0,o.jsxs)(t.p,{children:["Get started by deploying a new instance of ",(0,o.jsx)(t.strong,{children:"OpenSign"})," by following the ",(0,o.jsxs)(t.strong,{children:[(0,o.jsx)(t.a,{href:"https://docs.opensignlabs.com/docs/self-host/intro",children:"installation guide"}),"."]})]})]})}function p(e={}){const{wrapper:t}={...(0,r.a)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(u,{...e})}):u(e)}},11151:(e,t,n)=>{n.d(t,{Z:()=>a,a:()=>i});var o=n(67294);const r={},s=o.createContext(r);function i(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]);
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkOpenSign_Docs=self.webpackChunkOpenSign_Docs||[]).push([[7100],{43353:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>h,contentTitle:()=>d,default:()=>u,frontMatter:()=>a,metadata:()=>c,toc:()=>p});var o=n(85893),r=n(11151),s=n(22004),i=n.n(s);const a={sidebar_position:1},d="Intro",c={id:"help/intro",title:"Intro",description:"\ud83c\udf1fGet ready for an electrifying journey at OpenSign\u2122, the most incredibly documented open source document signing solution! \ud83d\ude80 This is your go-to spot for diving deep into everything OpenSign\u2122 has to offer. Whether you\u2019re just starting out or you\u2019re a seasoned pro eager to uncover even more cool features, we\u2019ve got you covered with the most awesome, top-notch guides and resources around. Get ready to make the most out of OpenSign\u2122 \ud83c\udf89\ud83d\udcda\ud83d\udd0d Your adventure in excellence starts here! \ud83c\udf08\u2728\ud83c\udf1f",source:"@site/docs/help/intro.md",sourceDirName:"help",slug:"/help/intro",permalink:"/docs/help/intro",draft:!1,unlisted:!1,editUrl:"https://github.com/opensignlabs/opensign/tree/feat-docs/docs/docs/help/intro.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",next:{title:"Create New OpenSign Document",permalink:"/docs/category/create-new-opensign-document"}},h={},p=[{value:"Getting Started",id:"getting-started",level:2}];function l(e){const t={a:"a",h1:"h1",h2:"h2",p:"p",strong:"strong",...(0,r.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h1,{id:"intro",children:"Intro"}),"\n",(0,o.jsxs)(t.p,{children:["\ud83c\udf1fGet ready for an electrifying journey at ",(0,o.jsx)(t.a,{href:"https://app.opensignlabs.com",children:"OpenSign\u2122"}),", the most incredibly documented open source document signing solution! \ud83d\ude80 This is your go-to spot for diving deep into everything OpenSign\u2122 has to offer. Whether you\u2019re just starting out or you\u2019re a seasoned pro eager to uncover even more cool features, we\u2019ve got you covered with the most awesome, top-notch guides and resources around. Get ready to make the most out of OpenSign\u2122 \ud83c\udf89\ud83d\udcda\ud83d\udd0d Your adventure in excellence starts here! \ud83c\udf08\u2728\ud83c\udf1f"]}),"\n",(0,o.jsx)("div",{children:(0,o.jsx)(i(),{playing:!0,controls:!0,url:"https://www.youtube.com/watch?v=GY_OP697EiU"})}),"\n",(0,o.jsx)(t.h2,{id:"getting-started",children:"Getting Started"}),"\n",(0,o.jsxs)(t.p,{children:["Try OpenSign on cloud at ",(0,o.jsx)(t.strong,{children:(0,o.jsx)(t.a,{href:"https://app.opensignlabs.com",children:"OpenSignLabs"})}),"."]}),"\n",(0,o.jsx)(t.p,{children:"Or"}),"\n",(0,o.jsxs)(t.p,{children:["Get started by deploying a new instance of ",(0,o.jsx)(t.strong,{children:"OpenSign"})," by following the ",(0,o.jsxs)(t.strong,{children:[(0,o.jsx)(t.a,{href:"https://docs.opensignlabs.com/docs/self-host/intro",children:"installation guide"}),"."]})]})]})}function u(e={}){const{wrapper:t}={...(0,r.a)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}}}]);
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,155 @@
|
||||
exports.id = 596;
|
||||
exports.ids = [596];
|
||||
exports.modules = {
|
||||
|
||||
/***/ 36807:
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var __publicField = (obj, key, value) => {
|
||||
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
||||
return value;
|
||||
};
|
||||
var DailyMotion_exports = {};
|
||||
__export(DailyMotion_exports, {
|
||||
default: () => DailyMotion
|
||||
});
|
||||
module.exports = __toCommonJS(DailyMotion_exports);
|
||||
var import_react = __toESM(__webpack_require__(67294));
|
||||
var import_utils = __webpack_require__(38045);
|
||||
var import_patterns = __webpack_require__(71776);
|
||||
const SDK_URL = "https://api.dmcdn.net/all.js";
|
||||
const SDK_GLOBAL = "DM";
|
||||
const SDK_GLOBAL_READY = "dmAsyncInit";
|
||||
class DailyMotion extends import_react.Component {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
__publicField(this, "callPlayer", import_utils.callPlayer);
|
||||
__publicField(this, "onDurationChange", () => {
|
||||
const duration = this.getDuration();
|
||||
this.props.onDuration(duration);
|
||||
});
|
||||
__publicField(this, "mute", () => {
|
||||
this.callPlayer("setMuted", true);
|
||||
});
|
||||
__publicField(this, "unmute", () => {
|
||||
this.callPlayer("setMuted", false);
|
||||
});
|
||||
__publicField(this, "ref", (container) => {
|
||||
this.container = container;
|
||||
});
|
||||
}
|
||||
componentDidMount() {
|
||||
this.props.onMount && this.props.onMount(this);
|
||||
}
|
||||
load(url) {
|
||||
const { controls, config, onError, playing } = this.props;
|
||||
const [, id] = url.match(import_patterns.MATCH_URL_DAILYMOTION);
|
||||
if (this.player) {
|
||||
this.player.load(id, {
|
||||
start: (0, import_utils.parseStartTime)(url),
|
||||
autoplay: playing
|
||||
});
|
||||
return;
|
||||
}
|
||||
(0, import_utils.getSDK)(SDK_URL, SDK_GLOBAL, SDK_GLOBAL_READY, (DM) => DM.player).then((DM) => {
|
||||
if (!this.container)
|
||||
return;
|
||||
const Player = DM.player;
|
||||
this.player = new Player(this.container, {
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
video: id,
|
||||
params: {
|
||||
controls,
|
||||
autoplay: this.props.playing,
|
||||
mute: this.props.muted,
|
||||
start: (0, import_utils.parseStartTime)(url),
|
||||
origin: window.location.origin,
|
||||
...config.params
|
||||
},
|
||||
events: {
|
||||
apiready: this.props.onReady,
|
||||
seeked: () => this.props.onSeek(this.player.currentTime),
|
||||
video_end: this.props.onEnded,
|
||||
durationchange: this.onDurationChange,
|
||||
pause: this.props.onPause,
|
||||
playing: this.props.onPlay,
|
||||
waiting: this.props.onBuffer,
|
||||
error: (event) => onError(event)
|
||||
}
|
||||
});
|
||||
}, onError);
|
||||
}
|
||||
play() {
|
||||
this.callPlayer("play");
|
||||
}
|
||||
pause() {
|
||||
this.callPlayer("pause");
|
||||
}
|
||||
stop() {
|
||||
}
|
||||
seekTo(seconds, keepPlaying = true) {
|
||||
this.callPlayer("seek", seconds);
|
||||
if (!keepPlaying) {
|
||||
this.pause();
|
||||
}
|
||||
}
|
||||
setVolume(fraction) {
|
||||
this.callPlayer("setVolume", fraction);
|
||||
}
|
||||
getDuration() {
|
||||
return this.player.duration || null;
|
||||
}
|
||||
getCurrentTime() {
|
||||
return this.player.currentTime;
|
||||
}
|
||||
getSecondsLoaded() {
|
||||
return this.player.bufferedTime;
|
||||
}
|
||||
render() {
|
||||
const { display } = this.props;
|
||||
const style = {
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
display
|
||||
};
|
||||
return /* @__PURE__ */ import_react.default.createElement("div", { style }, /* @__PURE__ */ import_react.default.createElement("div", { ref: this.ref }));
|
||||
}
|
||||
}
|
||||
__publicField(DailyMotion, "displayName", "DailyMotion");
|
||||
__publicField(DailyMotion, "canPlay", import_patterns.canPlay.dailymotion);
|
||||
__publicField(DailyMotion, "loopOnEnded", true);
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
};
|
||||
;
|
||||
@@ -0,0 +1 @@
|
||||
(self.webpackChunkOpenSign_Docs=self.webpackChunkOpenSign_Docs||[]).push([[7596],{36807:(e,t,r)=>{var a,n=Object.create,s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,l=Object.getPrototypeOf,p=Object.prototype.hasOwnProperty,u=(e,t,r,a)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of i(t))p.call(e,n)||n===r||s(e,n,{get:()=>t[n],enumerable:!(a=o(t,n))||a.enumerable});return e},h=(e,t,r)=>(((e,t,r)=>{t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r),c={};((e,t)=>{for(var r in t)s(e,r,{get:t[r],enumerable:!0})})(c,{default:()=>f}),e.exports=(a=c,u(s({},"__esModule",{value:!0}),a));var y=((e,t,r)=>(r=null!=e?n(l(e)):{},u(!t&&e&&e.__esModule?r:s(r,"default",{value:e,enumerable:!0}),e)))(r(67294)),d=r(38045),m=r(71776);class f extends y.Component{constructor(){super(...arguments),h(this,"callPlayer",d.callPlayer),h(this,"onDurationChange",(()=>{const e=this.getDuration();this.props.onDuration(e)})),h(this,"mute",(()=>{this.callPlayer("setMuted",!0)})),h(this,"unmute",(()=>{this.callPlayer("setMuted",!1)})),h(this,"ref",(e=>{this.container=e}))}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){const{controls:t,config:r,onError:a,playing:n}=this.props,[,s]=e.match(m.MATCH_URL_DAILYMOTION);this.player?this.player.load(s,{start:(0,d.parseStartTime)(e),autoplay:n}):(0,d.getSDK)("https://api.dmcdn.net/all.js","DM","dmAsyncInit",(e=>e.player)).then((n=>{if(!this.container)return;const o=n.player;this.player=new o(this.container,{width:"100%",height:"100%",video:s,params:{controls:t,autoplay:this.props.playing,mute:this.props.muted,start:(0,d.parseStartTime)(e),origin:window.location.origin,...r.params},events:{apiready:this.props.onReady,seeked:()=>this.props.onSeek(this.player.currentTime),video_end:this.props.onEnded,durationchange:this.onDurationChange,pause:this.props.onPause,playing:this.props.onPlay,waiting:this.props.onBuffer,error:e=>a(e)}})}),a)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,t=!0){this.callPlayer("seek",e),t||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}getDuration(){return this.player.duration||null}getCurrentTime(){return this.player.currentTime}getSecondsLoaded(){return this.player.bufferedTime}render(){const{display:e}=this.props,t={width:"100%",height:"100%",display:e};return y.default.createElement("div",{style:t},y.default.createElement("div",{ref:this.ref}))}}h(f,"displayName","DailyMotion"),h(f,"canPlay",m.canPlay.dailymotion),h(f,"loopOnEnded",!0)}}]);
|
||||
@@ -0,0 +1 @@
|
||||
(self.webpackChunkOpenSign_Docs=self.webpackChunkOpenSign_Docs||[]).push([[2121],{31972:(e,t,s)=>{var r,a=Object.create,l=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,n=Object.getPrototypeOf,p=Object.prototype.hasOwnProperty,u=(e,t,s,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of i(t))p.call(e,a)||a===s||l(e,a,{get:()=>t[a],enumerable:!(r=o(t,a))||r.enumerable});return e},c=(e,t,s)=>(((e,t,s)=>{t in e?l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s})(e,"symbol"!=typeof t?t+"":t,s),s),h={};((e,t)=>{for(var s in t)l(e,s,{get:t[s],enumerable:!0})})(h,{default:()=>g}),e.exports=(r=h,u(l({},"__esModule",{value:!0}),r));var y=((e,t,s)=>(s=null!=e?a(n(e)):{},u(!t&&e&&e.__esModule?s:l(s,"default",{value:e,enumerable:!0}),e)))(s(67294)),d=s(38045),b=s(71776);const f="https://connect.facebook.net/en_US/sdk.js",m="fbAsyncInit";class g extends y.Component{constructor(){super(...arguments),c(this,"callPlayer",d.callPlayer),c(this,"playerID",this.props.config.playerId||`facebook-player-${(0,d.randomString)()}`),c(this,"mute",(()=>{this.callPlayer("mute")})),c(this,"unmute",(()=>{this.callPlayer("unmute")}))}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e,t){t?(0,d.getSDK)(f,"FB",m).then((e=>e.XFBML.parse())):(0,d.getSDK)(f,"FB",m).then((e=>{e.init({appId:this.props.config.appId,xfbml:!0,version:this.props.config.version}),e.Event.subscribe("xfbml.render",(e=>{this.props.onLoaded()})),e.Event.subscribe("xfbml.ready",(e=>{"video"===e.type&&e.id===this.playerID&&(this.player=e.instance,this.player.subscribe("startedPlaying",this.props.onPlay),this.player.subscribe("paused",this.props.onPause),this.player.subscribe("finishedPlaying",this.props.onEnded),this.player.subscribe("startedBuffering",this.props.onBuffer),this.player.subscribe("finishedBuffering",this.props.onBufferEnd),this.player.subscribe("error",this.props.onError),this.props.muted?this.callPlayer("mute"):this.callPlayer("unmute"),this.props.onReady(),document.getElementById(this.playerID).querySelector("iframe").style.visibility="visible")}))}))}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,t=!0){this.callPlayer("seek",e),t||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}getDuration(){return this.callPlayer("getDuration")}getCurrentTime(){return this.callPlayer("getCurrentPosition")}getSecondsLoaded(){return null}render(){const{attributes:e}=this.props.config;return y.default.createElement("div",{style:{width:"100%",height:"100%"},id:this.playerID,className:"fb-video","data-href":this.props.url,"data-autoplay":this.props.playing?"true":"false","data-allowfullscreen":"true","data-controls":this.props.controls?"true":"false",...e})}}c(g,"displayName","Facebook"),c(g,"canPlay",b.canPlay.facebook),c(g,"loopOnEnded",!0)}}]);
|
||||
@@ -0,0 +1,156 @@
|
||||
exports.id = 121;
|
||||
exports.ids = [121];
|
||||
exports.modules = {
|
||||
|
||||
/***/ 31972:
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var __publicField = (obj, key, value) => {
|
||||
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
||||
return value;
|
||||
};
|
||||
var Facebook_exports = {};
|
||||
__export(Facebook_exports, {
|
||||
default: () => Facebook
|
||||
});
|
||||
module.exports = __toCommonJS(Facebook_exports);
|
||||
var import_react = __toESM(__webpack_require__(67294));
|
||||
var import_utils = __webpack_require__(38045);
|
||||
var import_patterns = __webpack_require__(71776);
|
||||
const SDK_URL = "https://connect.facebook.net/en_US/sdk.js";
|
||||
const SDK_GLOBAL = "FB";
|
||||
const SDK_GLOBAL_READY = "fbAsyncInit";
|
||||
const PLAYER_ID_PREFIX = "facebook-player-";
|
||||
class Facebook extends import_react.Component {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
__publicField(this, "callPlayer", import_utils.callPlayer);
|
||||
__publicField(this, "playerID", this.props.config.playerId || `${PLAYER_ID_PREFIX}${(0, import_utils.randomString)()}`);
|
||||
__publicField(this, "mute", () => {
|
||||
this.callPlayer("mute");
|
||||
});
|
||||
__publicField(this, "unmute", () => {
|
||||
this.callPlayer("unmute");
|
||||
});
|
||||
}
|
||||
componentDidMount() {
|
||||
this.props.onMount && this.props.onMount(this);
|
||||
}
|
||||
load(url, isReady) {
|
||||
if (isReady) {
|
||||
(0, import_utils.getSDK)(SDK_URL, SDK_GLOBAL, SDK_GLOBAL_READY).then((FB) => FB.XFBML.parse());
|
||||
return;
|
||||
}
|
||||
(0, import_utils.getSDK)(SDK_URL, SDK_GLOBAL, SDK_GLOBAL_READY).then((FB) => {
|
||||
FB.init({
|
||||
appId: this.props.config.appId,
|
||||
xfbml: true,
|
||||
version: this.props.config.version
|
||||
});
|
||||
FB.Event.subscribe("xfbml.render", (msg) => {
|
||||
this.props.onLoaded();
|
||||
});
|
||||
FB.Event.subscribe("xfbml.ready", (msg) => {
|
||||
if (msg.type === "video" && msg.id === this.playerID) {
|
||||
this.player = msg.instance;
|
||||
this.player.subscribe("startedPlaying", this.props.onPlay);
|
||||
this.player.subscribe("paused", this.props.onPause);
|
||||
this.player.subscribe("finishedPlaying", this.props.onEnded);
|
||||
this.player.subscribe("startedBuffering", this.props.onBuffer);
|
||||
this.player.subscribe("finishedBuffering", this.props.onBufferEnd);
|
||||
this.player.subscribe("error", this.props.onError);
|
||||
if (this.props.muted) {
|
||||
this.callPlayer("mute");
|
||||
} else {
|
||||
this.callPlayer("unmute");
|
||||
}
|
||||
this.props.onReady();
|
||||
document.getElementById(this.playerID).querySelector("iframe").style.visibility = "visible";
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
play() {
|
||||
this.callPlayer("play");
|
||||
}
|
||||
pause() {
|
||||
this.callPlayer("pause");
|
||||
}
|
||||
stop() {
|
||||
}
|
||||
seekTo(seconds, keepPlaying = true) {
|
||||
this.callPlayer("seek", seconds);
|
||||
if (!keepPlaying) {
|
||||
this.pause();
|
||||
}
|
||||
}
|
||||
setVolume(fraction) {
|
||||
this.callPlayer("setVolume", fraction);
|
||||
}
|
||||
getDuration() {
|
||||
return this.callPlayer("getDuration");
|
||||
}
|
||||
getCurrentTime() {
|
||||
return this.callPlayer("getCurrentPosition");
|
||||
}
|
||||
getSecondsLoaded() {
|
||||
return null;
|
||||
}
|
||||
render() {
|
||||
const { attributes } = this.props.config;
|
||||
const style = {
|
||||
width: "100%",
|
||||
height: "100%"
|
||||
};
|
||||
return /* @__PURE__ */ import_react.default.createElement(
|
||||
"div",
|
||||
{
|
||||
style,
|
||||
id: this.playerID,
|
||||
className: "fb-video",
|
||||
"data-href": this.props.url,
|
||||
"data-autoplay": this.props.playing ? "true" : "false",
|
||||
"data-allowfullscreen": "true",
|
||||
"data-controls": this.props.controls ? "true" : "false",
|
||||
...attributes
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
__publicField(Facebook, "displayName", "Facebook");
|
||||
__publicField(Facebook, "canPlay", import_patterns.canPlay.facebook);
|
||||
__publicField(Facebook, "loopOnEnded", true);
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
};
|
||||
;
|
||||
@@ -0,0 +1,385 @@
|
||||
exports.id = 11;
|
||||
exports.ids = [11];
|
||||
exports.modules = {
|
||||
|
||||
/***/ 14926:
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var __publicField = (obj, key, value) => {
|
||||
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
||||
return value;
|
||||
};
|
||||
var FilePlayer_exports = {};
|
||||
__export(FilePlayer_exports, {
|
||||
default: () => FilePlayer
|
||||
});
|
||||
module.exports = __toCommonJS(FilePlayer_exports);
|
||||
var import_react = __toESM(__webpack_require__(67294));
|
||||
var import_utils = __webpack_require__(38045);
|
||||
var import_patterns = __webpack_require__(71776);
|
||||
const HAS_NAVIGATOR = typeof navigator !== "undefined";
|
||||
const IS_IPAD_PRO = HAS_NAVIGATOR && navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1;
|
||||
const IS_IOS = HAS_NAVIGATOR && (/iPad|iPhone|iPod/.test(navigator.userAgent) || IS_IPAD_PRO) && !window.MSStream;
|
||||
const IS_SAFARI = HAS_NAVIGATOR && /^((?!chrome|android).)*safari/i.test(navigator.userAgent) && !window.MSStream;
|
||||
const HLS_SDK_URL = "https://cdn.jsdelivr.net/npm/hls.js@VERSION/dist/hls.min.js";
|
||||
const HLS_GLOBAL = "Hls";
|
||||
const DASH_SDK_URL = "https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js";
|
||||
const DASH_GLOBAL = "dashjs";
|
||||
const FLV_SDK_URL = "https://cdn.jsdelivr.net/npm/flv.js@VERSION/dist/flv.min.js";
|
||||
const FLV_GLOBAL = "flvjs";
|
||||
const MATCH_DROPBOX_URL = /www\.dropbox\.com\/.+/;
|
||||
const MATCH_CLOUDFLARE_STREAM = /https:\/\/watch\.cloudflarestream\.com\/([a-z0-9]+)/;
|
||||
const REPLACE_CLOUDFLARE_STREAM = "https://videodelivery.net/{id}/manifest/video.m3u8";
|
||||
class FilePlayer extends import_react.Component {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
// Proxy methods to prevent listener leaks
|
||||
__publicField(this, "onReady", (...args) => this.props.onReady(...args));
|
||||
__publicField(this, "onPlay", (...args) => this.props.onPlay(...args));
|
||||
__publicField(this, "onBuffer", (...args) => this.props.onBuffer(...args));
|
||||
__publicField(this, "onBufferEnd", (...args) => this.props.onBufferEnd(...args));
|
||||
__publicField(this, "onPause", (...args) => this.props.onPause(...args));
|
||||
__publicField(this, "onEnded", (...args) => this.props.onEnded(...args));
|
||||
__publicField(this, "onError", (...args) => this.props.onError(...args));
|
||||
__publicField(this, "onPlayBackRateChange", (event) => this.props.onPlaybackRateChange(event.target.playbackRate));
|
||||
__publicField(this, "onEnablePIP", (...args) => this.props.onEnablePIP(...args));
|
||||
__publicField(this, "onDisablePIP", (e) => {
|
||||
const { onDisablePIP, playing } = this.props;
|
||||
onDisablePIP(e);
|
||||
if (playing) {
|
||||
this.play();
|
||||
}
|
||||
});
|
||||
__publicField(this, "onPresentationModeChange", (e) => {
|
||||
if (this.player && (0, import_utils.supportsWebKitPresentationMode)(this.player)) {
|
||||
const { webkitPresentationMode } = this.player;
|
||||
if (webkitPresentationMode === "picture-in-picture") {
|
||||
this.onEnablePIP(e);
|
||||
} else if (webkitPresentationMode === "inline") {
|
||||
this.onDisablePIP(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
__publicField(this, "onSeek", (e) => {
|
||||
this.props.onSeek(e.target.currentTime);
|
||||
});
|
||||
__publicField(this, "mute", () => {
|
||||
this.player.muted = true;
|
||||
});
|
||||
__publicField(this, "unmute", () => {
|
||||
this.player.muted = false;
|
||||
});
|
||||
__publicField(this, "renderSourceElement", (source, index) => {
|
||||
if (typeof source === "string") {
|
||||
return /* @__PURE__ */ import_react.default.createElement("source", { key: index, src: source });
|
||||
}
|
||||
return /* @__PURE__ */ import_react.default.createElement("source", { key: index, ...source });
|
||||
});
|
||||
__publicField(this, "renderTrack", (track, index) => {
|
||||
return /* @__PURE__ */ import_react.default.createElement("track", { key: index, ...track });
|
||||
});
|
||||
__publicField(this, "ref", (player) => {
|
||||
if (this.player) {
|
||||
this.prevPlayer = this.player;
|
||||
}
|
||||
this.player = player;
|
||||
});
|
||||
}
|
||||
componentDidMount() {
|
||||
this.props.onMount && this.props.onMount(this);
|
||||
this.addListeners(this.player);
|
||||
const src = this.getSource(this.props.url);
|
||||
if (src) {
|
||||
this.player.src = src;
|
||||
}
|
||||
if (IS_IOS || this.props.config.forceDisableHls) {
|
||||
this.player.load();
|
||||
}
|
||||
}
|
||||
componentDidUpdate(prevProps) {
|
||||
if (this.shouldUseAudio(this.props) !== this.shouldUseAudio(prevProps)) {
|
||||
this.removeListeners(this.prevPlayer, prevProps.url);
|
||||
this.addListeners(this.player);
|
||||
}
|
||||
if (this.props.url !== prevProps.url && !(0, import_utils.isMediaStream)(this.props.url) && !(this.props.url instanceof Array)) {
|
||||
this.player.srcObject = null;
|
||||
}
|
||||
}
|
||||
componentWillUnmount() {
|
||||
this.player.removeAttribute("src");
|
||||
this.removeListeners(this.player);
|
||||
if (this.hls) {
|
||||
this.hls.destroy();
|
||||
}
|
||||
}
|
||||
addListeners(player) {
|
||||
const { url, playsinline } = this.props;
|
||||
player.addEventListener("play", this.onPlay);
|
||||
player.addEventListener("waiting", this.onBuffer);
|
||||
player.addEventListener("playing", this.onBufferEnd);
|
||||
player.addEventListener("pause", this.onPause);
|
||||
player.addEventListener("seeked", this.onSeek);
|
||||
player.addEventListener("ended", this.onEnded);
|
||||
player.addEventListener("error", this.onError);
|
||||
player.addEventListener("ratechange", this.onPlayBackRateChange);
|
||||
player.addEventListener("enterpictureinpicture", this.onEnablePIP);
|
||||
player.addEventListener("leavepictureinpicture", this.onDisablePIP);
|
||||
player.addEventListener("webkitpresentationmodechanged", this.onPresentationModeChange);
|
||||
if (!this.shouldUseHLS(url)) {
|
||||
player.addEventListener("canplay", this.onReady);
|
||||
}
|
||||
if (playsinline) {
|
||||
player.setAttribute("playsinline", "");
|
||||
player.setAttribute("webkit-playsinline", "");
|
||||
player.setAttribute("x5-playsinline", "");
|
||||
}
|
||||
}
|
||||
removeListeners(player, url) {
|
||||
player.removeEventListener("canplay", this.onReady);
|
||||
player.removeEventListener("play", this.onPlay);
|
||||
player.removeEventListener("waiting", this.onBuffer);
|
||||
player.removeEventListener("playing", this.onBufferEnd);
|
||||
player.removeEventListener("pause", this.onPause);
|
||||
player.removeEventListener("seeked", this.onSeek);
|
||||
player.removeEventListener("ended", this.onEnded);
|
||||
player.removeEventListener("error", this.onError);
|
||||
player.removeEventListener("ratechange", this.onPlayBackRateChange);
|
||||
player.removeEventListener("enterpictureinpicture", this.onEnablePIP);
|
||||
player.removeEventListener("leavepictureinpicture", this.onDisablePIP);
|
||||
player.removeEventListener("webkitpresentationmodechanged", this.onPresentationModeChange);
|
||||
if (!this.shouldUseHLS(url)) {
|
||||
player.removeEventListener("canplay", this.onReady);
|
||||
}
|
||||
}
|
||||
shouldUseAudio(props) {
|
||||
if (props.config.forceVideo) {
|
||||
return false;
|
||||
}
|
||||
if (props.config.attributes.poster) {
|
||||
return false;
|
||||
}
|
||||
return import_patterns.AUDIO_EXTENSIONS.test(props.url) || props.config.forceAudio;
|
||||
}
|
||||
shouldUseHLS(url) {
|
||||
if (IS_SAFARI && this.props.config.forceSafariHLS || this.props.config.forceHLS) {
|
||||
return true;
|
||||
}
|
||||
if (IS_IOS || this.props.config.forceDisableHls) {
|
||||
return false;
|
||||
}
|
||||
return import_patterns.HLS_EXTENSIONS.test(url) || MATCH_CLOUDFLARE_STREAM.test(url);
|
||||
}
|
||||
shouldUseDASH(url) {
|
||||
return import_patterns.DASH_EXTENSIONS.test(url) || this.props.config.forceDASH;
|
||||
}
|
||||
shouldUseFLV(url) {
|
||||
return import_patterns.FLV_EXTENSIONS.test(url) || this.props.config.forceFLV;
|
||||
}
|
||||
load(url) {
|
||||
const { hlsVersion, hlsOptions, dashVersion, flvVersion } = this.props.config;
|
||||
if (this.hls) {
|
||||
this.hls.destroy();
|
||||
}
|
||||
if (this.dash) {
|
||||
this.dash.reset();
|
||||
}
|
||||
if (this.shouldUseHLS(url)) {
|
||||
(0, import_utils.getSDK)(HLS_SDK_URL.replace("VERSION", hlsVersion), HLS_GLOBAL).then((Hls) => {
|
||||
this.hls = new Hls(hlsOptions);
|
||||
this.hls.on(Hls.Events.MANIFEST_PARSED, () => {
|
||||
this.props.onReady();
|
||||
});
|
||||
this.hls.on(Hls.Events.ERROR, (e, data) => {
|
||||
this.props.onError(e, data, this.hls, Hls);
|
||||
});
|
||||
if (MATCH_CLOUDFLARE_STREAM.test(url)) {
|
||||
const id = url.match(MATCH_CLOUDFLARE_STREAM)[1];
|
||||
this.hls.loadSource(REPLACE_CLOUDFLARE_STREAM.replace("{id}", id));
|
||||
} else {
|
||||
this.hls.loadSource(url);
|
||||
}
|
||||
this.hls.attachMedia(this.player);
|
||||
this.props.onLoaded();
|
||||
});
|
||||
}
|
||||
if (this.shouldUseDASH(url)) {
|
||||
(0, import_utils.getSDK)(DASH_SDK_URL.replace("VERSION", dashVersion), DASH_GLOBAL).then((dashjs) => {
|
||||
this.dash = dashjs.MediaPlayer().create();
|
||||
this.dash.initialize(this.player, url, this.props.playing);
|
||||
this.dash.on("error", this.props.onError);
|
||||
if (parseInt(dashVersion) < 3) {
|
||||
this.dash.getDebug().setLogToBrowserConsole(false);
|
||||
} else {
|
||||
this.dash.updateSettings({ debug: { logLevel: dashjs.Debug.LOG_LEVEL_NONE } });
|
||||
}
|
||||
this.props.onLoaded();
|
||||
});
|
||||
}
|
||||
if (this.shouldUseFLV(url)) {
|
||||
(0, import_utils.getSDK)(FLV_SDK_URL.replace("VERSION", flvVersion), FLV_GLOBAL).then((flvjs) => {
|
||||
this.flv = flvjs.createPlayer({ type: "flv", url });
|
||||
this.flv.attachMediaElement(this.player);
|
||||
this.flv.on(flvjs.Events.ERROR, (e, data) => {
|
||||
this.props.onError(e, data, this.flv, flvjs);
|
||||
});
|
||||
this.flv.load();
|
||||
this.props.onLoaded();
|
||||
});
|
||||
}
|
||||
if (url instanceof Array) {
|
||||
this.player.load();
|
||||
} else if ((0, import_utils.isMediaStream)(url)) {
|
||||
try {
|
||||
this.player.srcObject = url;
|
||||
} catch (e) {
|
||||
this.player.src = window.URL.createObjectURL(url);
|
||||
}
|
||||
}
|
||||
}
|
||||
play() {
|
||||
const promise = this.player.play();
|
||||
if (promise) {
|
||||
promise.catch(this.props.onError);
|
||||
}
|
||||
}
|
||||
pause() {
|
||||
this.player.pause();
|
||||
}
|
||||
stop() {
|
||||
this.player.removeAttribute("src");
|
||||
if (this.dash) {
|
||||
this.dash.reset();
|
||||
}
|
||||
}
|
||||
seekTo(seconds, keepPlaying = true) {
|
||||
this.player.currentTime = seconds;
|
||||
if (!keepPlaying) {
|
||||
this.pause();
|
||||
}
|
||||
}
|
||||
setVolume(fraction) {
|
||||
this.player.volume = fraction;
|
||||
}
|
||||
enablePIP() {
|
||||
if (this.player.requestPictureInPicture && document.pictureInPictureElement !== this.player) {
|
||||
this.player.requestPictureInPicture();
|
||||
} else if ((0, import_utils.supportsWebKitPresentationMode)(this.player) && this.player.webkitPresentationMode !== "picture-in-picture") {
|
||||
this.player.webkitSetPresentationMode("picture-in-picture");
|
||||
}
|
||||
}
|
||||
disablePIP() {
|
||||
if (document.exitPictureInPicture && document.pictureInPictureElement === this.player) {
|
||||
document.exitPictureInPicture();
|
||||
} else if ((0, import_utils.supportsWebKitPresentationMode)(this.player) && this.player.webkitPresentationMode !== "inline") {
|
||||
this.player.webkitSetPresentationMode("inline");
|
||||
}
|
||||
}
|
||||
setPlaybackRate(rate) {
|
||||
try {
|
||||
this.player.playbackRate = rate;
|
||||
} catch (error) {
|
||||
this.props.onError(error);
|
||||
}
|
||||
}
|
||||
getDuration() {
|
||||
if (!this.player)
|
||||
return null;
|
||||
const { duration, seekable } = this.player;
|
||||
if (duration === Infinity && seekable.length > 0) {
|
||||
return seekable.end(seekable.length - 1);
|
||||
}
|
||||
return duration;
|
||||
}
|
||||
getCurrentTime() {
|
||||
if (!this.player)
|
||||
return null;
|
||||
return this.player.currentTime;
|
||||
}
|
||||
getSecondsLoaded() {
|
||||
if (!this.player)
|
||||
return null;
|
||||
const { buffered } = this.player;
|
||||
if (buffered.length === 0) {
|
||||
return 0;
|
||||
}
|
||||
const end = buffered.end(buffered.length - 1);
|
||||
const duration = this.getDuration();
|
||||
if (end > duration) {
|
||||
return duration;
|
||||
}
|
||||
return end;
|
||||
}
|
||||
getSource(url) {
|
||||
const useHLS = this.shouldUseHLS(url);
|
||||
const useDASH = this.shouldUseDASH(url);
|
||||
const useFLV = this.shouldUseFLV(url);
|
||||
if (url instanceof Array || (0, import_utils.isMediaStream)(url) || useHLS || useDASH || useFLV) {
|
||||
return void 0;
|
||||
}
|
||||
if (MATCH_DROPBOX_URL.test(url)) {
|
||||
return url.replace("www.dropbox.com", "dl.dropboxusercontent.com");
|
||||
}
|
||||
return url;
|
||||
}
|
||||
render() {
|
||||
const { url, playing, loop, controls, muted, config, width, height } = this.props;
|
||||
const useAudio = this.shouldUseAudio(this.props);
|
||||
const Element = useAudio ? "audio" : "video";
|
||||
const style = {
|
||||
width: width === "auto" ? width : "100%",
|
||||
height: height === "auto" ? height : "100%"
|
||||
};
|
||||
return /* @__PURE__ */ import_react.default.createElement(
|
||||
Element,
|
||||
{
|
||||
ref: this.ref,
|
||||
src: this.getSource(url),
|
||||
style,
|
||||
preload: "auto",
|
||||
autoPlay: playing || void 0,
|
||||
controls,
|
||||
muted,
|
||||
loop,
|
||||
...config.attributes
|
||||
},
|
||||
url instanceof Array && url.map(this.renderSourceElement),
|
||||
config.tracks.map(this.renderTrack)
|
||||
);
|
||||
}
|
||||
}
|
||||
__publicField(FilePlayer, "displayName", "FilePlayer");
|
||||
__publicField(FilePlayer, "canPlay", import_patterns.canPlay.file);
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
};
|
||||
;
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
(self.webpackChunkOpenSign_Docs=self.webpackChunkOpenSign_Docs||[]).push([[261],{73911:(e,t,r)=>{var s,a=Object.create,o=Object.defineProperty,l=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,i=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,p=(e,t,r,s)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of n(t))u.call(e,a)||a===r||o(e,a,{get:()=>t[a],enumerable:!(s=l(t,a))||s.enumerable});return e},h=(e,t,r)=>(((e,t,r)=>{t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r),d={};((e,t)=>{for(var r in t)o(e,r,{get:t[r],enumerable:!0})})(d,{default:()=>f}),e.exports=(s=d,p(o({},"__esModule",{value:!0}),s));var c=((e,t,r)=>(r=null!=e?a(i(e)):{},p(!t&&e&&e.__esModule?r:o(r,"default",{value:e,enumerable:!0}),e)))(r(67294)),y=r(38045),m=r(71776);class f extends c.Component{constructor(){super(...arguments),h(this,"callPlayer",y.callPlayer),h(this,"duration",null),h(this,"currentTime",null),h(this,"secondsLoaded",null),h(this,"mute",(()=>{this.callPlayer("mute")})),h(this,"unmute",(()=>{this.callPlayer("unmute")})),h(this,"ref",(e=>{this.iframe=e}))}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){(0,y.getSDK)("https://cdn.embed.ly/player-0.1.0.min.js","playerjs").then((e=>{this.iframe&&(this.player=new e.Player(this.iframe),this.player.on("ready",(()=>{setTimeout((()=>{this.player.isReady=!0,this.player.setLoop(this.props.loop),this.props.muted&&this.player.mute(),this.addListeners(this.player,this.props),this.props.onReady()}),500)})))}),this.props.onError)}addListeners(e,t){e.on("play",t.onPlay),e.on("pause",t.onPause),e.on("ended",t.onEnded),e.on("error",t.onError),e.on("timeupdate",(({duration:e,seconds:t})=>{this.duration=e,this.currentTime=t}))}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,t=!0){this.callPlayer("setCurrentTime",e),t||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}setLoop(e){this.callPlayer("setLoop",e)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.secondsLoaded}render(){return c.default.createElement("iframe",{ref:this.ref,src:this.props.url,frameBorder:"0",scrolling:"no",style:{width:"100%",height:"100%"},allow:"encrypted-media; autoplay; fullscreen;",referrerPolicy:"no-referrer-when-downgrade"})}}h(f,"displayName","Kaltura"),h(f,"canPlay",m.canPlay.kaltura)}}]);
|
||||
@@ -0,0 +1,153 @@
|
||||
exports.id = 261;
|
||||
exports.ids = [261];
|
||||
exports.modules = {
|
||||
|
||||
/***/ 73911:
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var __publicField = (obj, key, value) => {
|
||||
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
||||
return value;
|
||||
};
|
||||
var Kaltura_exports = {};
|
||||
__export(Kaltura_exports, {
|
||||
default: () => Kaltura
|
||||
});
|
||||
module.exports = __toCommonJS(Kaltura_exports);
|
||||
var import_react = __toESM(__webpack_require__(67294));
|
||||
var import_utils = __webpack_require__(38045);
|
||||
var import_patterns = __webpack_require__(71776);
|
||||
const SDK_URL = "https://cdn.embed.ly/player-0.1.0.min.js";
|
||||
const SDK_GLOBAL = "playerjs";
|
||||
class Kaltura extends import_react.Component {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
__publicField(this, "callPlayer", import_utils.callPlayer);
|
||||
__publicField(this, "duration", null);
|
||||
__publicField(this, "currentTime", null);
|
||||
__publicField(this, "secondsLoaded", null);
|
||||
__publicField(this, "mute", () => {
|
||||
this.callPlayer("mute");
|
||||
});
|
||||
__publicField(this, "unmute", () => {
|
||||
this.callPlayer("unmute");
|
||||
});
|
||||
__publicField(this, "ref", (iframe) => {
|
||||
this.iframe = iframe;
|
||||
});
|
||||
}
|
||||
componentDidMount() {
|
||||
this.props.onMount && this.props.onMount(this);
|
||||
}
|
||||
load(url) {
|
||||
(0, import_utils.getSDK)(SDK_URL, SDK_GLOBAL).then((playerjs) => {
|
||||
if (!this.iframe)
|
||||
return;
|
||||
this.player = new playerjs.Player(this.iframe);
|
||||
this.player.on("ready", () => {
|
||||
setTimeout(() => {
|
||||
this.player.isReady = true;
|
||||
this.player.setLoop(this.props.loop);
|
||||
if (this.props.muted) {
|
||||
this.player.mute();
|
||||
}
|
||||
this.addListeners(this.player, this.props);
|
||||
this.props.onReady();
|
||||
}, 500);
|
||||
});
|
||||
}, this.props.onError);
|
||||
}
|
||||
addListeners(player, props) {
|
||||
player.on("play", props.onPlay);
|
||||
player.on("pause", props.onPause);
|
||||
player.on("ended", props.onEnded);
|
||||
player.on("error", props.onError);
|
||||
player.on("timeupdate", ({ duration, seconds }) => {
|
||||
this.duration = duration;
|
||||
this.currentTime = seconds;
|
||||
});
|
||||
}
|
||||
play() {
|
||||
this.callPlayer("play");
|
||||
}
|
||||
pause() {
|
||||
this.callPlayer("pause");
|
||||
}
|
||||
stop() {
|
||||
}
|
||||
seekTo(seconds, keepPlaying = true) {
|
||||
this.callPlayer("setCurrentTime", seconds);
|
||||
if (!keepPlaying) {
|
||||
this.pause();
|
||||
}
|
||||
}
|
||||
setVolume(fraction) {
|
||||
this.callPlayer("setVolume", fraction);
|
||||
}
|
||||
setLoop(loop) {
|
||||
this.callPlayer("setLoop", loop);
|
||||
}
|
||||
getDuration() {
|
||||
return this.duration;
|
||||
}
|
||||
getCurrentTime() {
|
||||
return this.currentTime;
|
||||
}
|
||||
getSecondsLoaded() {
|
||||
return this.secondsLoaded;
|
||||
}
|
||||
render() {
|
||||
const style = {
|
||||
width: "100%",
|
||||
height: "100%"
|
||||
};
|
||||
return /* @__PURE__ */ import_react.default.createElement(
|
||||
"iframe",
|
||||
{
|
||||
ref: this.ref,
|
||||
src: this.props.url,
|
||||
frameBorder: "0",
|
||||
scrolling: "no",
|
||||
style,
|
||||
allow: "encrypted-media; autoplay; fullscreen;",
|
||||
referrerPolicy: "no-referrer-when-downgrade"
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
__publicField(Kaltura, "displayName", "Kaltura");
|
||||
__publicField(Kaltura, "canPlay", import_patterns.canPlay.kaltura);
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
};
|
||||
;
|
||||
@@ -0,0 +1,141 @@
|
||||
exports.id = 667;
|
||||
exports.ids = [667];
|
||||
exports.modules = {
|
||||
|
||||
/***/ 50143:
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var __publicField = (obj, key, value) => {
|
||||
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
||||
return value;
|
||||
};
|
||||
var Mixcloud_exports = {};
|
||||
__export(Mixcloud_exports, {
|
||||
default: () => Mixcloud
|
||||
});
|
||||
module.exports = __toCommonJS(Mixcloud_exports);
|
||||
var import_react = __toESM(__webpack_require__(67294));
|
||||
var import_utils = __webpack_require__(38045);
|
||||
var import_patterns = __webpack_require__(71776);
|
||||
const SDK_URL = "https://widget.mixcloud.com/media/js/widgetApi.js";
|
||||
const SDK_GLOBAL = "Mixcloud";
|
||||
class Mixcloud extends import_react.Component {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
__publicField(this, "callPlayer", import_utils.callPlayer);
|
||||
__publicField(this, "duration", null);
|
||||
__publicField(this, "currentTime", null);
|
||||
__publicField(this, "secondsLoaded", null);
|
||||
__publicField(this, "mute", () => {
|
||||
});
|
||||
__publicField(this, "unmute", () => {
|
||||
});
|
||||
__publicField(this, "ref", (iframe) => {
|
||||
this.iframe = iframe;
|
||||
});
|
||||
}
|
||||
componentDidMount() {
|
||||
this.props.onMount && this.props.onMount(this);
|
||||
}
|
||||
load(url) {
|
||||
(0, import_utils.getSDK)(SDK_URL, SDK_GLOBAL).then((Mixcloud2) => {
|
||||
this.player = Mixcloud2.PlayerWidget(this.iframe);
|
||||
this.player.ready.then(() => {
|
||||
this.player.events.play.on(this.props.onPlay);
|
||||
this.player.events.pause.on(this.props.onPause);
|
||||
this.player.events.ended.on(this.props.onEnded);
|
||||
this.player.events.error.on(this.props.error);
|
||||
this.player.events.progress.on((seconds, duration) => {
|
||||
this.currentTime = seconds;
|
||||
this.duration = duration;
|
||||
});
|
||||
this.props.onReady();
|
||||
});
|
||||
}, this.props.onError);
|
||||
}
|
||||
play() {
|
||||
this.callPlayer("play");
|
||||
}
|
||||
pause() {
|
||||
this.callPlayer("pause");
|
||||
}
|
||||
stop() {
|
||||
}
|
||||
seekTo(seconds, keepPlaying = true) {
|
||||
this.callPlayer("seek", seconds);
|
||||
if (!keepPlaying) {
|
||||
this.pause();
|
||||
}
|
||||
}
|
||||
setVolume(fraction) {
|
||||
}
|
||||
getDuration() {
|
||||
return this.duration;
|
||||
}
|
||||
getCurrentTime() {
|
||||
return this.currentTime;
|
||||
}
|
||||
getSecondsLoaded() {
|
||||
return null;
|
||||
}
|
||||
render() {
|
||||
const { url, config } = this.props;
|
||||
const id = url.match(import_patterns.MATCH_URL_MIXCLOUD)[1];
|
||||
const style = {
|
||||
width: "100%",
|
||||
height: "100%"
|
||||
};
|
||||
const query = (0, import_utils.queryString)({
|
||||
...config.options,
|
||||
feed: `/${id}/`
|
||||
});
|
||||
return /* @__PURE__ */ import_react.default.createElement(
|
||||
"iframe",
|
||||
{
|
||||
key: id,
|
||||
ref: this.ref,
|
||||
style,
|
||||
src: `https://www.mixcloud.com/widget/iframe/?${query}`,
|
||||
frameBorder: "0",
|
||||
allow: "autoplay"
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
__publicField(Mixcloud, "displayName", "Mixcloud");
|
||||
__publicField(Mixcloud, "canPlay", import_patterns.canPlay.mixcloud);
|
||||
__publicField(Mixcloud, "loopOnEnded", true);
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
};
|
||||
;
|
||||
@@ -0,0 +1 @@
|
||||
(self.webpackChunkOpenSign_Docs=self.webpackChunkOpenSign_Docs||[]).push([[4667],{50143:(e,t,r)=>{var s,o=Object.create,n=Object.defineProperty,a=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,i=Object.getPrototypeOf,p=Object.prototype.hasOwnProperty,u=(e,t,r,s)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of l(t))p.call(e,o)||o===r||n(e,o,{get:()=>t[o],enumerable:!(s=a(t,o))||s.enumerable});return e},h=(e,t,r)=>(((e,t,r)=>{t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r),c={};((e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})})(c,{default:()=>f}),e.exports=(s=c,u(n({},"__esModule",{value:!0}),s));var d=((e,t,r)=>(r=null!=e?o(i(e)):{},u(!t&&e&&e.__esModule?r:n(r,"default",{value:e,enumerable:!0}),e)))(r(67294)),y=r(38045),m=r(71776);class f extends d.Component{constructor(){super(...arguments),h(this,"callPlayer",y.callPlayer),h(this,"duration",null),h(this,"currentTime",null),h(this,"secondsLoaded",null),h(this,"mute",(()=>{})),h(this,"unmute",(()=>{})),h(this,"ref",(e=>{this.iframe=e}))}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){(0,y.getSDK)("https://widget.mixcloud.com/media/js/widgetApi.js","Mixcloud").then((e=>{this.player=e.PlayerWidget(this.iframe),this.player.ready.then((()=>{this.player.events.play.on(this.props.onPlay),this.player.events.pause.on(this.props.onPause),this.player.events.ended.on(this.props.onEnded),this.player.events.error.on(this.props.error),this.player.events.progress.on(((e,t)=>{this.currentTime=e,this.duration=t})),this.props.onReady()}))}),this.props.onError)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,t=!0){this.callPlayer("seek",e),t||this.pause()}setVolume(e){}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return null}render(){const{url:e,config:t}=this.props,r=e.match(m.MATCH_URL_MIXCLOUD)[1],s=(0,y.queryString)({...t.options,feed:`/${r}/`});return d.default.createElement("iframe",{key:r,ref:this.ref,style:{width:"100%",height:"100%"},src:`https://www.mixcloud.com/widget/iframe/?${s}`,frameBorder:"0",allow:"autoplay"})}}h(f,"displayName","Mixcloud"),h(f,"canPlay",m.canPlay.mixcloud),h(f,"loopOnEnded",!0)}}]);
|
||||
@@ -0,0 +1 @@
|
||||
(self.webpackChunkOpenSign_Docs=self.webpackChunkOpenSign_Docs||[]).push([[7664],{83855:(e,t,r)=>{var a,n=Object.create,i=Object.defineProperty,l=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.getPrototypeOf,p=Object.prototype.hasOwnProperty,c=(e,t,r,a)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of o(t))p.call(e,n)||n===r||i(e,n,{get:()=>t[n],enumerable:!(a=l(t,n))||a.enumerable});return e},u=(e,t,r)=>(((e,t,r)=>{t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r),d={};((e,t)=>{for(var r in t)i(e,r,{get:t[r],enumerable:!0})})(d,{default:()=>b}),e.exports=(a=d,c(i({},"__esModule",{value:!0}),a));var h=((e,t,r)=>(r=null!=e?n(s(e)):{},c(!t&&e&&e.__esModule?r:i(r,"default",{value:e,enumerable:!0}),e)))(r(67294));const m="64px",g={};class b extends h.Component{constructor(){super(...arguments),u(this,"mounted",!1),u(this,"state",{image:null}),u(this,"handleKeyPress",(e=>{"Enter"!==e.key&&" "!==e.key||this.props.onClick()}))}componentDidMount(){this.mounted=!0,this.fetchImage(this.props)}componentDidUpdate(e){const{url:t,light:r}=this.props;e.url===t&&e.light===r||this.fetchImage(this.props)}componentWillUnmount(){this.mounted=!1}fetchImage({url:e,light:t,oEmbedUrl:r}){if(!h.default.isValidElement(t))if("string"!=typeof t){if(!g[e])return this.setState({image:null}),window.fetch(r.replace("{url}",e)).then((e=>e.json())).then((t=>{if(t.thumbnail_url&&this.mounted){const r=t.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");this.setState({image:r}),g[e]=r}}));this.setState({image:g[e]})}else this.setState({image:t})}render(){const{light:e,onClick:t,playIcon:r,previewTabIndex:a}=this.props,{image:n}=this.state,i=h.default.isValidElement(e),l={display:"flex",alignItems:"center",justifyContent:"center"},o={preview:{width:"100%",height:"100%",backgroundImage:n&&!i?`url(${n})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...l},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:m,width:m,height:m,position:i?"absolute":void 0,...l},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},s=h.default.createElement("div",{style:o.shadow,className:"react-player__shadow"},h.default.createElement("div",{style:o.playIcon,className:"react-player__play-icon"}));return h.default.createElement("div",{style:o.preview,className:"react-player__preview",onClick:t,tabIndex:a,onKeyPress:this.handleKeyPress},i?e:null,r||s)}}}}]);
|
||||
@@ -0,0 +1,149 @@
|
||||
exports.id = 664;
|
||||
exports.ids = [664];
|
||||
exports.modules = {
|
||||
|
||||
/***/ 83855:
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var __publicField = (obj, key, value) => {
|
||||
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
||||
return value;
|
||||
};
|
||||
var Preview_exports = {};
|
||||
__export(Preview_exports, {
|
||||
default: () => Preview
|
||||
});
|
||||
module.exports = __toCommonJS(Preview_exports);
|
||||
var import_react = __toESM(__webpack_require__(67294));
|
||||
const ICON_SIZE = "64px";
|
||||
const cache = {};
|
||||
class Preview extends import_react.Component {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
__publicField(this, "mounted", false);
|
||||
__publicField(this, "state", {
|
||||
image: null
|
||||
});
|
||||
__publicField(this, "handleKeyPress", (e) => {
|
||||
if (e.key === "Enter" || e.key === " ") {
|
||||
this.props.onClick();
|
||||
}
|
||||
});
|
||||
}
|
||||
componentDidMount() {
|
||||
this.mounted = true;
|
||||
this.fetchImage(this.props);
|
||||
}
|
||||
componentDidUpdate(prevProps) {
|
||||
const { url, light } = this.props;
|
||||
if (prevProps.url !== url || prevProps.light !== light) {
|
||||
this.fetchImage(this.props);
|
||||
}
|
||||
}
|
||||
componentWillUnmount() {
|
||||
this.mounted = false;
|
||||
}
|
||||
fetchImage({ url, light, oEmbedUrl }) {
|
||||
if (import_react.default.isValidElement(light)) {
|
||||
return;
|
||||
}
|
||||
if (typeof light === "string") {
|
||||
this.setState({ image: light });
|
||||
return;
|
||||
}
|
||||
if (cache[url]) {
|
||||
this.setState({ image: cache[url] });
|
||||
return;
|
||||
}
|
||||
this.setState({ image: null });
|
||||
return window.fetch(oEmbedUrl.replace("{url}", url)).then((response) => response.json()).then((data) => {
|
||||
if (data.thumbnail_url && this.mounted) {
|
||||
const image = data.thumbnail_url.replace("height=100", "height=480").replace("-d_295x166", "-d_640");
|
||||
this.setState({ image });
|
||||
cache[url] = image;
|
||||
}
|
||||
});
|
||||
}
|
||||
render() {
|
||||
const { light, onClick, playIcon, previewTabIndex } = this.props;
|
||||
const { image } = this.state;
|
||||
const isElement = import_react.default.isValidElement(light);
|
||||
const flexCenter = {
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "center"
|
||||
};
|
||||
const styles = {
|
||||
preview: {
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
backgroundImage: image && !isElement ? `url(${image})` : void 0,
|
||||
backgroundSize: "cover",
|
||||
backgroundPosition: "center",
|
||||
cursor: "pointer",
|
||||
...flexCenter
|
||||
},
|
||||
shadow: {
|
||||
background: "radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",
|
||||
borderRadius: ICON_SIZE,
|
||||
width: ICON_SIZE,
|
||||
height: ICON_SIZE,
|
||||
position: isElement ? "absolute" : void 0,
|
||||
...flexCenter
|
||||
},
|
||||
playIcon: {
|
||||
borderStyle: "solid",
|
||||
borderWidth: "16px 0 16px 26px",
|
||||
borderColor: "transparent transparent transparent white",
|
||||
marginLeft: "7px"
|
||||
}
|
||||
};
|
||||
const defaultPlayIcon = /* @__PURE__ */ import_react.default.createElement("div", { style: styles.shadow, className: "react-player__shadow" }, /* @__PURE__ */ import_react.default.createElement("div", { style: styles.playIcon, className: "react-player__play-icon" }));
|
||||
return /* @__PURE__ */ import_react.default.createElement(
|
||||
"div",
|
||||
{
|
||||
style: styles.preview,
|
||||
className: "react-player__preview",
|
||||
onClick,
|
||||
tabIndex: previewTabIndex,
|
||||
onKeyPress: this.handleKeyPress
|
||||
},
|
||||
isElement ? light : null,
|
||||
playIcon || defaultPlayIcon
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
};
|
||||
;
|
||||
@@ -0,0 +1 @@
|
||||
(self.webpackChunkOpenSign_Docs=self.webpackChunkOpenSign_Docs||[]).push([[6125],{72648:(e,t,r)=>{var s,o=Object.create,i=Object.defineProperty,l=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,a=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,p=(e,t,r,s)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of n(t))u.call(e,o)||o===r||i(e,o,{get:()=>t[o],enumerable:!(s=l(t,o))||s.enumerable});return e},h=(e,t,r)=>(((e,t,r)=>{t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r),d={};((e,t)=>{for(var r in t)i(e,r,{get:t[r],enumerable:!0})})(d,{default:()=>f}),e.exports=(s=d,p(i({},"__esModule",{value:!0}),s));var c=((e,t,r)=>(r=null!=e?o(a(e)):{},p(!t&&e&&e.__esModule?r:i(r,"default",{value:e,enumerable:!0}),e)))(r(67294)),y=r(38045),m=r(71776);class f extends c.Component{constructor(){super(...arguments),h(this,"callPlayer",y.callPlayer),h(this,"duration",null),h(this,"currentTime",null),h(this,"fractionLoaded",null),h(this,"mute",(()=>{this.setVolume(0)})),h(this,"unmute",(()=>{null!==this.props.volume&&this.setVolume(this.props.volume)})),h(this,"ref",(e=>{this.iframe=e}))}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e,t){(0,y.getSDK)("https://w.soundcloud.com/player/api.js","SC").then((r=>{if(!this.iframe)return;const{PLAY:s,PLAY_PROGRESS:o,PAUSE:i,FINISH:l,ERROR:n}=r.Widget.Events;t||(this.player=r.Widget(this.iframe),this.player.bind(s,this.props.onPlay),this.player.bind(i,(()=>{this.duration-this.currentTime<.05||this.props.onPause()})),this.player.bind(o,(e=>{this.currentTime=e.currentPosition/1e3,this.fractionLoaded=e.loadedProgress})),this.player.bind(l,(()=>this.props.onEnded())),this.player.bind(n,(e=>this.props.onError(e)))),this.player.load(e,{...this.props.config.options,callback:()=>{this.player.getDuration((e=>{this.duration=e/1e3,this.props.onReady()}))}})}))}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,t=!0){this.callPlayer("seekTo",1e3*e),t||this.pause()}setVolume(e){this.callPlayer("setVolume",100*e)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.fractionLoaded*this.duration}render(){const{display:e}=this.props,t={width:"100%",height:"100%",display:e};return c.default.createElement("iframe",{ref:this.ref,src:`https://w.soundcloud.com/player/?url=${encodeURIComponent(this.props.url)}`,style:t,frameBorder:0,allow:"autoplay"})}}h(f,"displayName","SoundCloud"),h(f,"canPlay",m.canPlay.soundcloud),h(f,"loopOnEnded",!0)}}]);
|
||||
@@ -0,0 +1,158 @@
|
||||
exports.id = 125;
|
||||
exports.ids = [125];
|
||||
exports.modules = {
|
||||
|
||||
/***/ 72648:
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var __publicField = (obj, key, value) => {
|
||||
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
||||
return value;
|
||||
};
|
||||
var SoundCloud_exports = {};
|
||||
__export(SoundCloud_exports, {
|
||||
default: () => SoundCloud
|
||||
});
|
||||
module.exports = __toCommonJS(SoundCloud_exports);
|
||||
var import_react = __toESM(__webpack_require__(67294));
|
||||
var import_utils = __webpack_require__(38045);
|
||||
var import_patterns = __webpack_require__(71776);
|
||||
const SDK_URL = "https://w.soundcloud.com/player/api.js";
|
||||
const SDK_GLOBAL = "SC";
|
||||
class SoundCloud extends import_react.Component {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
__publicField(this, "callPlayer", import_utils.callPlayer);
|
||||
__publicField(this, "duration", null);
|
||||
__publicField(this, "currentTime", null);
|
||||
__publicField(this, "fractionLoaded", null);
|
||||
__publicField(this, "mute", () => {
|
||||
this.setVolume(0);
|
||||
});
|
||||
__publicField(this, "unmute", () => {
|
||||
if (this.props.volume !== null) {
|
||||
this.setVolume(this.props.volume);
|
||||
}
|
||||
});
|
||||
__publicField(this, "ref", (iframe) => {
|
||||
this.iframe = iframe;
|
||||
});
|
||||
}
|
||||
componentDidMount() {
|
||||
this.props.onMount && this.props.onMount(this);
|
||||
}
|
||||
load(url, isReady) {
|
||||
(0, import_utils.getSDK)(SDK_URL, SDK_GLOBAL).then((SC) => {
|
||||
if (!this.iframe)
|
||||
return;
|
||||
const { PLAY, PLAY_PROGRESS, PAUSE, FINISH, ERROR } = SC.Widget.Events;
|
||||
if (!isReady) {
|
||||
this.player = SC.Widget(this.iframe);
|
||||
this.player.bind(PLAY, this.props.onPlay);
|
||||
this.player.bind(PAUSE, () => {
|
||||
const remaining = this.duration - this.currentTime;
|
||||
if (remaining < 0.05) {
|
||||
return;
|
||||
}
|
||||
this.props.onPause();
|
||||
});
|
||||
this.player.bind(PLAY_PROGRESS, (e) => {
|
||||
this.currentTime = e.currentPosition / 1e3;
|
||||
this.fractionLoaded = e.loadedProgress;
|
||||
});
|
||||
this.player.bind(FINISH, () => this.props.onEnded());
|
||||
this.player.bind(ERROR, (e) => this.props.onError(e));
|
||||
}
|
||||
this.player.load(url, {
|
||||
...this.props.config.options,
|
||||
callback: () => {
|
||||
this.player.getDuration((duration) => {
|
||||
this.duration = duration / 1e3;
|
||||
this.props.onReady();
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
play() {
|
||||
this.callPlayer("play");
|
||||
}
|
||||
pause() {
|
||||
this.callPlayer("pause");
|
||||
}
|
||||
stop() {
|
||||
}
|
||||
seekTo(seconds, keepPlaying = true) {
|
||||
this.callPlayer("seekTo", seconds * 1e3);
|
||||
if (!keepPlaying) {
|
||||
this.pause();
|
||||
}
|
||||
}
|
||||
setVolume(fraction) {
|
||||
this.callPlayer("setVolume", fraction * 100);
|
||||
}
|
||||
getDuration() {
|
||||
return this.duration;
|
||||
}
|
||||
getCurrentTime() {
|
||||
return this.currentTime;
|
||||
}
|
||||
getSecondsLoaded() {
|
||||
return this.fractionLoaded * this.duration;
|
||||
}
|
||||
render() {
|
||||
const { display } = this.props;
|
||||
const style = {
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
display
|
||||
};
|
||||
return /* @__PURE__ */ import_react.default.createElement(
|
||||
"iframe",
|
||||
{
|
||||
ref: this.ref,
|
||||
src: `https://w.soundcloud.com/player/?url=${encodeURIComponent(this.props.url)}`,
|
||||
style,
|
||||
frameBorder: 0,
|
||||
allow: "autoplay"
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
__publicField(SoundCloud, "displayName", "SoundCloud");
|
||||
__publicField(SoundCloud, "canPlay", import_patterns.canPlay.soundcloud);
|
||||
__publicField(SoundCloud, "loopOnEnded", true);
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
};
|
||||
;
|
||||
@@ -0,0 +1 @@
|
||||
(self.webpackChunkOpenSign_Docs=self.webpackChunkOpenSign_Docs||[]).push([[2546],{50993:(e,t,r)=>{var s,a=Object.create,o=Object.defineProperty,l=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,i=Object.getPrototypeOf,p=Object.prototype.hasOwnProperty,u=(e,t,r,s)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of n(t))p.call(e,a)||a===r||o(e,a,{get:()=>t[a],enumerable:!(s=l(t,a))||s.enumerable});return e},h=(e,t,r)=>(((e,t,r)=>{t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r),c={};((e,t)=>{for(var r in t)o(e,r,{get:t[r],enumerable:!0})})(c,{default:()=>f}),e.exports=(s=c,u(o({},"__esModule",{value:!0}),s));var d=((e,t,r)=>(r=null!=e?a(i(e)):{},u(!t&&e&&e.__esModule?r:o(r,"default",{value:e,enumerable:!0}),e)))(r(67294)),y=r(38045),m=r(71776);class f extends d.Component{constructor(){super(...arguments),h(this,"callPlayer",y.callPlayer),h(this,"duration",null),h(this,"currentTime",null),h(this,"secondsLoaded",null),h(this,"mute",(()=>{this.callPlayer("mute")})),h(this,"unmute",(()=>{this.callPlayer("unmute")})),h(this,"ref",(e=>{this.iframe=e}))}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){(0,y.getSDK)("https://cdn.embed.ly/player-0.1.0.min.js","playerjs").then((e=>{this.iframe&&(this.player=new e.Player(this.iframe),this.player.setLoop(this.props.loop),this.player.on("ready",this.props.onReady),this.player.on("play",this.props.onPlay),this.player.on("pause",this.props.onPause),this.player.on("seeked",this.props.onSeek),this.player.on("ended",this.props.onEnded),this.player.on("error",this.props.onError),this.player.on("timeupdate",(({duration:e,seconds:t})=>{this.duration=e,this.currentTime=t})),this.player.on("buffered",(({percent:e})=>{this.duration&&(this.secondsLoaded=this.duration*e)})),this.props.muted&&this.player.mute())}),this.props.onError)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,t=!0){this.callPlayer("setCurrentTime",e),t||this.pause()}setVolume(e){this.callPlayer("setVolume",100*e)}setLoop(e){this.callPlayer("setLoop",e)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.secondsLoaded}render(){const e=this.props.url.match(m.MATCH_URL_STREAMABLE)[1];return d.default.createElement("iframe",{ref:this.ref,src:`https://streamable.com/o/${e}`,frameBorder:"0",scrolling:"no",style:{width:"100%",height:"100%"},allow:"encrypted-media; autoplay; fullscreen;"})}}h(f,"displayName","Streamable"),h(f,"canPlay",m.canPlay.streamable)}}]);
|
||||
@@ -0,0 +1,151 @@
|
||||
exports.id = 546;
|
||||
exports.ids = [546];
|
||||
exports.modules = {
|
||||
|
||||
/***/ 50993:
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var __publicField = (obj, key, value) => {
|
||||
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
||||
return value;
|
||||
};
|
||||
var Streamable_exports = {};
|
||||
__export(Streamable_exports, {
|
||||
default: () => Streamable
|
||||
});
|
||||
module.exports = __toCommonJS(Streamable_exports);
|
||||
var import_react = __toESM(__webpack_require__(67294));
|
||||
var import_utils = __webpack_require__(38045);
|
||||
var import_patterns = __webpack_require__(71776);
|
||||
const SDK_URL = "https://cdn.embed.ly/player-0.1.0.min.js";
|
||||
const SDK_GLOBAL = "playerjs";
|
||||
class Streamable extends import_react.Component {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
__publicField(this, "callPlayer", import_utils.callPlayer);
|
||||
__publicField(this, "duration", null);
|
||||
__publicField(this, "currentTime", null);
|
||||
__publicField(this, "secondsLoaded", null);
|
||||
__publicField(this, "mute", () => {
|
||||
this.callPlayer("mute");
|
||||
});
|
||||
__publicField(this, "unmute", () => {
|
||||
this.callPlayer("unmute");
|
||||
});
|
||||
__publicField(this, "ref", (iframe) => {
|
||||
this.iframe = iframe;
|
||||
});
|
||||
}
|
||||
componentDidMount() {
|
||||
this.props.onMount && this.props.onMount(this);
|
||||
}
|
||||
load(url) {
|
||||
(0, import_utils.getSDK)(SDK_URL, SDK_GLOBAL).then((playerjs) => {
|
||||
if (!this.iframe)
|
||||
return;
|
||||
this.player = new playerjs.Player(this.iframe);
|
||||
this.player.setLoop(this.props.loop);
|
||||
this.player.on("ready", this.props.onReady);
|
||||
this.player.on("play", this.props.onPlay);
|
||||
this.player.on("pause", this.props.onPause);
|
||||
this.player.on("seeked", this.props.onSeek);
|
||||
this.player.on("ended", this.props.onEnded);
|
||||
this.player.on("error", this.props.onError);
|
||||
this.player.on("timeupdate", ({ duration, seconds }) => {
|
||||
this.duration = duration;
|
||||
this.currentTime = seconds;
|
||||
});
|
||||
this.player.on("buffered", ({ percent }) => {
|
||||
if (this.duration) {
|
||||
this.secondsLoaded = this.duration * percent;
|
||||
}
|
||||
});
|
||||
if (this.props.muted) {
|
||||
this.player.mute();
|
||||
}
|
||||
}, this.props.onError);
|
||||
}
|
||||
play() {
|
||||
this.callPlayer("play");
|
||||
}
|
||||
pause() {
|
||||
this.callPlayer("pause");
|
||||
}
|
||||
stop() {
|
||||
}
|
||||
seekTo(seconds, keepPlaying = true) {
|
||||
this.callPlayer("setCurrentTime", seconds);
|
||||
if (!keepPlaying) {
|
||||
this.pause();
|
||||
}
|
||||
}
|
||||
setVolume(fraction) {
|
||||
this.callPlayer("setVolume", fraction * 100);
|
||||
}
|
||||
setLoop(loop) {
|
||||
this.callPlayer("setLoop", loop);
|
||||
}
|
||||
getDuration() {
|
||||
return this.duration;
|
||||
}
|
||||
getCurrentTime() {
|
||||
return this.currentTime;
|
||||
}
|
||||
getSecondsLoaded() {
|
||||
return this.secondsLoaded;
|
||||
}
|
||||
render() {
|
||||
const id = this.props.url.match(import_patterns.MATCH_URL_STREAMABLE)[1];
|
||||
const style = {
|
||||
width: "100%",
|
||||
height: "100%"
|
||||
};
|
||||
return /* @__PURE__ */ import_react.default.createElement(
|
||||
"iframe",
|
||||
{
|
||||
ref: this.ref,
|
||||
src: `https://streamable.com/o/${id}`,
|
||||
frameBorder: "0",
|
||||
scrolling: "no",
|
||||
style,
|
||||
allow: "encrypted-media; autoplay; fullscreen;"
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
__publicField(Streamable, "displayName", "Streamable");
|
||||
__publicField(Streamable, "canPlay", import_patterns.canPlay.streamable);
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
};
|
||||
;
|
||||
@@ -0,0 +1 @@
|
||||
(self.webpackChunkOpenSign_Docs=self.webpackChunkOpenSign_Docs||[]).push([[6216],{29482:(e,t,r)=>{var s,a=Object.create,l=Object.defineProperty,n=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,o=Object.getPrototypeOf,p=Object.prototype.hasOwnProperty,h=(e,t,r,s)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of i(t))p.call(e,a)||a===r||l(e,a,{get:()=>t[a],enumerable:!(s=n(t,a))||s.enumerable});return e},y=(e,t,r)=>(((e,t,r)=>{t in e?l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r),d={};((e,t)=>{for(var r in t)l(e,r,{get:t[r],enumerable:!0})})(d,{default:()=>P}),e.exports=(s=d,h(l({},"__esModule",{value:!0}),s));var c=((e,t,r)=>(r=null!=e?a(o(e)):{},h(!t&&e&&e.__esModule?r:l(r,"default",{value:e,enumerable:!0}),e)))(r(67294)),u=r(38045),m=r(71776);class P extends c.Component{constructor(){super(...arguments),y(this,"callPlayer",u.callPlayer),y(this,"playerID",this.props.config.playerId||`twitch-player-${(0,u.randomString)()}`),y(this,"mute",(()=>{this.callPlayer("setMuted",!0)})),y(this,"unmute",(()=>{this.callPlayer("setMuted",!1)}))}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e,t){const{playsinline:r,onError:s,config:a,controls:l}=this.props,n=m.MATCH_URL_TWITCH_CHANNEL.test(e),i=n?e.match(m.MATCH_URL_TWITCH_CHANNEL)[1]:e.match(m.MATCH_URL_TWITCH_VIDEO)[1];t?n?this.player.setChannel(i):this.player.setVideo("v"+i):(0,u.getSDK)("https://player.twitch.tv/js/embed/v1.js","Twitch").then((t=>{this.player=new t.Player(this.playerID,{video:n?"":i,channel:n?i:"",height:"100%",width:"100%",playsinline:r,autoplay:this.props.playing,muted:this.props.muted,controls:!!n||l,time:(0,u.parseStartTime)(e),...a.options});const{READY:s,PLAYING:o,PAUSE:p,ENDED:h,ONLINE:y,OFFLINE:d,SEEK:c}=t.Player;this.player.addEventListener(s,this.props.onReady),this.player.addEventListener(o,this.props.onPlay),this.player.addEventListener(p,this.props.onPause),this.player.addEventListener(h,this.props.onEnded),this.player.addEventListener(c,this.props.onSeek),this.player.addEventListener(y,this.props.onLoaded),this.player.addEventListener(d,this.props.onLoaded)}),s)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){this.callPlayer("pause")}seekTo(e,t=!0){this.callPlayer("seek",e),t||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}getDuration(){return this.callPlayer("getDuration")}getCurrentTime(){return this.callPlayer("getCurrentTime")}getSecondsLoaded(){return null}render(){return c.default.createElement("div",{style:{width:"100%",height:"100%"},id:this.playerID})}}y(P,"displayName","Twitch"),y(P,"canPlay",m.canPlay.twitch),y(P,"loopOnEnded",!0)}}]);
|
||||
@@ -0,0 +1,145 @@
|
||||
exports.id = 216;
|
||||
exports.ids = [216];
|
||||
exports.modules = {
|
||||
|
||||
/***/ 29482:
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var __publicField = (obj, key, value) => {
|
||||
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
||||
return value;
|
||||
};
|
||||
var Twitch_exports = {};
|
||||
__export(Twitch_exports, {
|
||||
default: () => Twitch
|
||||
});
|
||||
module.exports = __toCommonJS(Twitch_exports);
|
||||
var import_react = __toESM(__webpack_require__(67294));
|
||||
var import_utils = __webpack_require__(38045);
|
||||
var import_patterns = __webpack_require__(71776);
|
||||
const SDK_URL = "https://player.twitch.tv/js/embed/v1.js";
|
||||
const SDK_GLOBAL = "Twitch";
|
||||
const PLAYER_ID_PREFIX = "twitch-player-";
|
||||
class Twitch extends import_react.Component {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
__publicField(this, "callPlayer", import_utils.callPlayer);
|
||||
__publicField(this, "playerID", this.props.config.playerId || `${PLAYER_ID_PREFIX}${(0, import_utils.randomString)()}`);
|
||||
__publicField(this, "mute", () => {
|
||||
this.callPlayer("setMuted", true);
|
||||
});
|
||||
__publicField(this, "unmute", () => {
|
||||
this.callPlayer("setMuted", false);
|
||||
});
|
||||
}
|
||||
componentDidMount() {
|
||||
this.props.onMount && this.props.onMount(this);
|
||||
}
|
||||
load(url, isReady) {
|
||||
const { playsinline, onError, config, controls } = this.props;
|
||||
const isChannel = import_patterns.MATCH_URL_TWITCH_CHANNEL.test(url);
|
||||
const id = isChannel ? url.match(import_patterns.MATCH_URL_TWITCH_CHANNEL)[1] : url.match(import_patterns.MATCH_URL_TWITCH_VIDEO)[1];
|
||||
if (isReady) {
|
||||
if (isChannel) {
|
||||
this.player.setChannel(id);
|
||||
} else {
|
||||
this.player.setVideo("v" + id);
|
||||
}
|
||||
return;
|
||||
}
|
||||
(0, import_utils.getSDK)(SDK_URL, SDK_GLOBAL).then((Twitch2) => {
|
||||
this.player = new Twitch2.Player(this.playerID, {
|
||||
video: isChannel ? "" : id,
|
||||
channel: isChannel ? id : "",
|
||||
height: "100%",
|
||||
width: "100%",
|
||||
playsinline,
|
||||
autoplay: this.props.playing,
|
||||
muted: this.props.muted,
|
||||
// https://github.com/CookPete/react-player/issues/733#issuecomment-549085859
|
||||
controls: isChannel ? true : controls,
|
||||
time: (0, import_utils.parseStartTime)(url),
|
||||
...config.options
|
||||
});
|
||||
const { READY, PLAYING, PAUSE, ENDED, ONLINE, OFFLINE, SEEK } = Twitch2.Player;
|
||||
this.player.addEventListener(READY, this.props.onReady);
|
||||
this.player.addEventListener(PLAYING, this.props.onPlay);
|
||||
this.player.addEventListener(PAUSE, this.props.onPause);
|
||||
this.player.addEventListener(ENDED, this.props.onEnded);
|
||||
this.player.addEventListener(SEEK, this.props.onSeek);
|
||||
this.player.addEventListener(ONLINE, this.props.onLoaded);
|
||||
this.player.addEventListener(OFFLINE, this.props.onLoaded);
|
||||
}, onError);
|
||||
}
|
||||
play() {
|
||||
this.callPlayer("play");
|
||||
}
|
||||
pause() {
|
||||
this.callPlayer("pause");
|
||||
}
|
||||
stop() {
|
||||
this.callPlayer("pause");
|
||||
}
|
||||
seekTo(seconds, keepPlaying = true) {
|
||||
this.callPlayer("seek", seconds);
|
||||
if (!keepPlaying) {
|
||||
this.pause();
|
||||
}
|
||||
}
|
||||
setVolume(fraction) {
|
||||
this.callPlayer("setVolume", fraction);
|
||||
}
|
||||
getDuration() {
|
||||
return this.callPlayer("getDuration");
|
||||
}
|
||||
getCurrentTime() {
|
||||
return this.callPlayer("getCurrentTime");
|
||||
}
|
||||
getSecondsLoaded() {
|
||||
return null;
|
||||
}
|
||||
render() {
|
||||
const style = {
|
||||
width: "100%",
|
||||
height: "100%"
|
||||
};
|
||||
return /* @__PURE__ */ import_react.default.createElement("div", { style, id: this.playerID });
|
||||
}
|
||||
}
|
||||
__publicField(Twitch, "displayName", "Twitch");
|
||||
__publicField(Twitch, "canPlay", import_patterns.canPlay.twitch);
|
||||
__publicField(Twitch, "loopOnEnded", true);
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
};
|
||||
;
|
||||
@@ -0,0 +1,149 @@
|
||||
exports.id = 888;
|
||||
exports.ids = [888];
|
||||
exports.modules = {
|
||||
|
||||
/***/ 36596:
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var __publicField = (obj, key, value) => {
|
||||
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
||||
return value;
|
||||
};
|
||||
var Vidyard_exports = {};
|
||||
__export(Vidyard_exports, {
|
||||
default: () => Vidyard
|
||||
});
|
||||
module.exports = __toCommonJS(Vidyard_exports);
|
||||
var import_react = __toESM(__webpack_require__(67294));
|
||||
var import_utils = __webpack_require__(38045);
|
||||
var import_patterns = __webpack_require__(71776);
|
||||
const SDK_URL = "https://play.vidyard.com/embed/v4.js";
|
||||
const SDK_GLOBAL = "VidyardV4";
|
||||
const SDK_GLOBAL_READY = "onVidyardAPI";
|
||||
class Vidyard extends import_react.Component {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
__publicField(this, "callPlayer", import_utils.callPlayer);
|
||||
__publicField(this, "mute", () => {
|
||||
this.setVolume(0);
|
||||
});
|
||||
__publicField(this, "unmute", () => {
|
||||
if (this.props.volume !== null) {
|
||||
this.setVolume(this.props.volume);
|
||||
}
|
||||
});
|
||||
__publicField(this, "ref", (container) => {
|
||||
this.container = container;
|
||||
});
|
||||
}
|
||||
componentDidMount() {
|
||||
this.props.onMount && this.props.onMount(this);
|
||||
}
|
||||
load(url) {
|
||||
const { playing, config, onError, onDuration } = this.props;
|
||||
const id = url && url.match(import_patterns.MATCH_URL_VIDYARD)[1];
|
||||
if (this.player) {
|
||||
this.stop();
|
||||
}
|
||||
(0, import_utils.getSDK)(SDK_URL, SDK_GLOBAL, SDK_GLOBAL_READY).then((Vidyard2) => {
|
||||
if (!this.container)
|
||||
return;
|
||||
Vidyard2.api.addReadyListener((data, player) => {
|
||||
if (this.player) {
|
||||
return;
|
||||
}
|
||||
this.player = player;
|
||||
this.player.on("ready", this.props.onReady);
|
||||
this.player.on("play", this.props.onPlay);
|
||||
this.player.on("pause", this.props.onPause);
|
||||
this.player.on("seek", this.props.onSeek);
|
||||
this.player.on("playerComplete", this.props.onEnded);
|
||||
}, id);
|
||||
Vidyard2.api.renderPlayer({
|
||||
uuid: id,
|
||||
container: this.container,
|
||||
autoplay: playing ? 1 : 0,
|
||||
...config.options
|
||||
});
|
||||
Vidyard2.api.getPlayerMetadata(id).then((meta) => {
|
||||
this.duration = meta.length_in_seconds;
|
||||
onDuration(meta.length_in_seconds);
|
||||
});
|
||||
}, onError);
|
||||
}
|
||||
play() {
|
||||
this.callPlayer("play");
|
||||
}
|
||||
pause() {
|
||||
this.callPlayer("pause");
|
||||
}
|
||||
stop() {
|
||||
window.VidyardV4.api.destroyPlayer(this.player);
|
||||
}
|
||||
seekTo(amount, keepPlaying = true) {
|
||||
this.callPlayer("seek", amount);
|
||||
if (!keepPlaying) {
|
||||
this.pause();
|
||||
}
|
||||
}
|
||||
setVolume(fraction) {
|
||||
this.callPlayer("setVolume", fraction);
|
||||
}
|
||||
setPlaybackRate(rate) {
|
||||
this.callPlayer("setPlaybackSpeed", rate);
|
||||
}
|
||||
getDuration() {
|
||||
return this.duration;
|
||||
}
|
||||
getCurrentTime() {
|
||||
return this.callPlayer("currentTime");
|
||||
}
|
||||
getSecondsLoaded() {
|
||||
return null;
|
||||
}
|
||||
render() {
|
||||
const { display } = this.props;
|
||||
const style = {
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
display
|
||||
};
|
||||
return /* @__PURE__ */ import_react.default.createElement("div", { style }, /* @__PURE__ */ import_react.default.createElement("div", { ref: this.ref }));
|
||||
}
|
||||
}
|
||||
__publicField(Vidyard, "displayName", "Vidyard");
|
||||
__publicField(Vidyard, "canPlay", import_patterns.canPlay.vidyard);
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
};
|
||||
;
|
||||
@@ -0,0 +1 @@
|
||||
(self.webpackChunkOpenSign_Docs=self.webpackChunkOpenSign_Docs||[]).push([[8888],{36596:(e,t,a)=>{var r,s=Object.create,l=Object.defineProperty,o=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,i=Object.getPrototypeOf,p=Object.prototype.hasOwnProperty,y=(e,t,a,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of n(t))p.call(e,s)||s===a||l(e,s,{get:()=>t[s],enumerable:!(r=o(t,s))||r.enumerable});return e},u=(e,t,a)=>(((e,t,a)=>{t in e?l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a),h={};((e,t)=>{for(var a in t)l(e,a,{get:t[a],enumerable:!0})})(h,{default:()=>P}),e.exports=(r=h,y(l({},"__esModule",{value:!0}),r));var d=((e,t,a)=>(a=null!=e?s(i(e)):{},y(!t&&e&&e.__esModule?a:l(a,"default",{value:e,enumerable:!0}),e)))(a(67294)),c=a(38045),m=a(71776);class P extends d.Component{constructor(){super(...arguments),u(this,"callPlayer",c.callPlayer),u(this,"mute",(()=>{this.setVolume(0)})),u(this,"unmute",(()=>{null!==this.props.volume&&this.setVolume(this.props.volume)})),u(this,"ref",(e=>{this.container=e}))}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){const{playing:t,config:a,onError:r,onDuration:s}=this.props,l=e&&e.match(m.MATCH_URL_VIDYARD)[1];this.player&&this.stop(),(0,c.getSDK)("https://play.vidyard.com/embed/v4.js","VidyardV4","onVidyardAPI").then((e=>{this.container&&(e.api.addReadyListener(((e,t)=>{this.player||(this.player=t,this.player.on("ready",this.props.onReady),this.player.on("play",this.props.onPlay),this.player.on("pause",this.props.onPause),this.player.on("seek",this.props.onSeek),this.player.on("playerComplete",this.props.onEnded))}),l),e.api.renderPlayer({uuid:l,container:this.container,autoplay:t?1:0,...a.options}),e.api.getPlayerMetadata(l).then((e=>{this.duration=e.length_in_seconds,s(e.length_in_seconds)})))}),r)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){window.VidyardV4.api.destroyPlayer(this.player)}seekTo(e,t=!0){this.callPlayer("seek",e),t||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}setPlaybackRate(e){this.callPlayer("setPlaybackSpeed",e)}getDuration(){return this.duration}getCurrentTime(){return this.callPlayer("currentTime")}getSecondsLoaded(){return null}render(){const{display:e}=this.props,t={width:"100%",height:"100%",display:e};return d.default.createElement("div",{style:t},d.default.createElement("div",{ref:this.ref}))}}u(P,"displayName","Vidyard"),u(P,"canPlay",m.canPlay.vidyard)}}]);
|
||||
@@ -0,0 +1 @@
|
||||
(self.webpackChunkOpenSign_Docs=self.webpackChunkOpenSign_Docs||[]).push([[3743],{80868:(e,t,s)=>{var r,o=Object.create,a=Object.defineProperty,n=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,l=Object.getPrototypeOf,p=Object.prototype.hasOwnProperty,h=(e,t,s,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of i(t))p.call(e,o)||o===s||a(e,o,{get:()=>t[o],enumerable:!(r=n(t,o))||r.enumerable});return e},u=(e,t,s)=>(((e,t,s)=>{t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s})(e,"symbol"!=typeof t?t+"":t,s),s),c={};((e,t)=>{for(var s in t)a(e,s,{get:t[s],enumerable:!0})})(c,{default:()=>b}),e.exports=(r=c,h(a({},"__esModule",{value:!0}),r));var y=((e,t,s)=>(s=null!=e?o(l(e)):{},h(!t&&e&&e.__esModule?s:a(s,"default",{value:e,enumerable:!0}),e)))(s(67294)),d=s(38045),f=s(71776);const m=e=>e.replace("/manage/videos","");class b extends y.Component{constructor(){super(...arguments),u(this,"callPlayer",d.callPlayer),u(this,"duration",null),u(this,"currentTime",null),u(this,"secondsLoaded",null),u(this,"mute",(()=>{this.setMuted(!0)})),u(this,"unmute",(()=>{this.setMuted(!1)})),u(this,"ref",(e=>{this.container=e}))}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){this.duration=null,(0,d.getSDK)("https://player.vimeo.com/api/player.js","Vimeo").then((t=>{if(!this.container)return;const{playerOptions:s,title:r}=this.props.config;this.player=new t.Player(this.container,{url:m(e),autoplay:this.props.playing,muted:this.props.muted,loop:this.props.loop,playsinline:this.props.playsinline,controls:this.props.controls,...s}),this.player.ready().then((()=>{const e=this.container.querySelector("iframe");e.style.width="100%",e.style.height="100%",r&&(e.title=r)})).catch(this.props.onError),this.player.on("loaded",(()=>{this.props.onReady(),this.refreshDuration()})),this.player.on("play",(()=>{this.props.onPlay(),this.refreshDuration()})),this.player.on("pause",this.props.onPause),this.player.on("seeked",(e=>this.props.onSeek(e.seconds))),this.player.on("ended",this.props.onEnded),this.player.on("error",this.props.onError),this.player.on("timeupdate",(({seconds:e})=>{this.currentTime=e})),this.player.on("progress",(({seconds:e})=>{this.secondsLoaded=e})),this.player.on("bufferstart",this.props.onBuffer),this.player.on("bufferend",this.props.onBufferEnd),this.player.on("playbackratechange",(e=>this.props.onPlaybackRateChange(e.playbackRate)))}),this.props.onError)}refreshDuration(){this.player.getDuration().then((e=>{this.duration=e}))}play(){const e=this.callPlayer("play");e&&e.catch(this.props.onError)}pause(){this.callPlayer("pause")}stop(){this.callPlayer("unload")}seekTo(e,t=!0){this.callPlayer("setCurrentTime",e),t||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}setMuted(e){this.callPlayer("setMuted",e)}setLoop(e){this.callPlayer("setLoop",e)}setPlaybackRate(e){this.callPlayer("setPlaybackRate",e)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.secondsLoaded}render(){const{display:e}=this.props,t={width:"100%",height:"100%",overflow:"hidden",display:e};return y.default.createElement("div",{key:this.props.url,ref:this.ref,style:t})}}u(b,"displayName","Vimeo"),u(b,"canPlay",f.canPlay.vimeo),u(b,"forceLoad",!0)}}]);
|
||||
@@ -0,0 +1,190 @@
|
||||
exports.id = 743;
|
||||
exports.ids = [743];
|
||||
exports.modules = {
|
||||
|
||||
/***/ 80868:
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var __publicField = (obj, key, value) => {
|
||||
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
||||
return value;
|
||||
};
|
||||
var Vimeo_exports = {};
|
||||
__export(Vimeo_exports, {
|
||||
default: () => Vimeo
|
||||
});
|
||||
module.exports = __toCommonJS(Vimeo_exports);
|
||||
var import_react = __toESM(__webpack_require__(67294));
|
||||
var import_utils = __webpack_require__(38045);
|
||||
var import_patterns = __webpack_require__(71776);
|
||||
const SDK_URL = "https://player.vimeo.com/api/player.js";
|
||||
const SDK_GLOBAL = "Vimeo";
|
||||
const cleanUrl = (url) => {
|
||||
return url.replace("/manage/videos", "");
|
||||
};
|
||||
class Vimeo extends import_react.Component {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
// Prevent checking isLoading when URL changes
|
||||
__publicField(this, "callPlayer", import_utils.callPlayer);
|
||||
__publicField(this, "duration", null);
|
||||
__publicField(this, "currentTime", null);
|
||||
__publicField(this, "secondsLoaded", null);
|
||||
__publicField(this, "mute", () => {
|
||||
this.setMuted(true);
|
||||
});
|
||||
__publicField(this, "unmute", () => {
|
||||
this.setMuted(false);
|
||||
});
|
||||
__publicField(this, "ref", (container) => {
|
||||
this.container = container;
|
||||
});
|
||||
}
|
||||
componentDidMount() {
|
||||
this.props.onMount && this.props.onMount(this);
|
||||
}
|
||||
load(url) {
|
||||
this.duration = null;
|
||||
(0, import_utils.getSDK)(SDK_URL, SDK_GLOBAL).then((Vimeo2) => {
|
||||
if (!this.container)
|
||||
return;
|
||||
const { playerOptions, title } = this.props.config;
|
||||
this.player = new Vimeo2.Player(this.container, {
|
||||
url: cleanUrl(url),
|
||||
autoplay: this.props.playing,
|
||||
muted: this.props.muted,
|
||||
loop: this.props.loop,
|
||||
playsinline: this.props.playsinline,
|
||||
controls: this.props.controls,
|
||||
...playerOptions
|
||||
});
|
||||
this.player.ready().then(() => {
|
||||
const iframe = this.container.querySelector("iframe");
|
||||
iframe.style.width = "100%";
|
||||
iframe.style.height = "100%";
|
||||
if (title) {
|
||||
iframe.title = title;
|
||||
}
|
||||
}).catch(this.props.onError);
|
||||
this.player.on("loaded", () => {
|
||||
this.props.onReady();
|
||||
this.refreshDuration();
|
||||
});
|
||||
this.player.on("play", () => {
|
||||
this.props.onPlay();
|
||||
this.refreshDuration();
|
||||
});
|
||||
this.player.on("pause", this.props.onPause);
|
||||
this.player.on("seeked", (e) => this.props.onSeek(e.seconds));
|
||||
this.player.on("ended", this.props.onEnded);
|
||||
this.player.on("error", this.props.onError);
|
||||
this.player.on("timeupdate", ({ seconds }) => {
|
||||
this.currentTime = seconds;
|
||||
});
|
||||
this.player.on("progress", ({ seconds }) => {
|
||||
this.secondsLoaded = seconds;
|
||||
});
|
||||
this.player.on("bufferstart", this.props.onBuffer);
|
||||
this.player.on("bufferend", this.props.onBufferEnd);
|
||||
this.player.on("playbackratechange", (e) => this.props.onPlaybackRateChange(e.playbackRate));
|
||||
}, this.props.onError);
|
||||
}
|
||||
refreshDuration() {
|
||||
this.player.getDuration().then((duration) => {
|
||||
this.duration = duration;
|
||||
});
|
||||
}
|
||||
play() {
|
||||
const promise = this.callPlayer("play");
|
||||
if (promise) {
|
||||
promise.catch(this.props.onError);
|
||||
}
|
||||
}
|
||||
pause() {
|
||||
this.callPlayer("pause");
|
||||
}
|
||||
stop() {
|
||||
this.callPlayer("unload");
|
||||
}
|
||||
seekTo(seconds, keepPlaying = true) {
|
||||
this.callPlayer("setCurrentTime", seconds);
|
||||
if (!keepPlaying) {
|
||||
this.pause();
|
||||
}
|
||||
}
|
||||
setVolume(fraction) {
|
||||
this.callPlayer("setVolume", fraction);
|
||||
}
|
||||
setMuted(muted) {
|
||||
this.callPlayer("setMuted", muted);
|
||||
}
|
||||
setLoop(loop) {
|
||||
this.callPlayer("setLoop", loop);
|
||||
}
|
||||
setPlaybackRate(rate) {
|
||||
this.callPlayer("setPlaybackRate", rate);
|
||||
}
|
||||
getDuration() {
|
||||
return this.duration;
|
||||
}
|
||||
getCurrentTime() {
|
||||
return this.currentTime;
|
||||
}
|
||||
getSecondsLoaded() {
|
||||
return this.secondsLoaded;
|
||||
}
|
||||
render() {
|
||||
const { display } = this.props;
|
||||
const style = {
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
overflow: "hidden",
|
||||
display
|
||||
};
|
||||
return /* @__PURE__ */ import_react.default.createElement(
|
||||
"div",
|
||||
{
|
||||
key: this.props.url,
|
||||
ref: this.ref,
|
||||
style
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
__publicField(Vimeo, "displayName", "Vimeo");
|
||||
__publicField(Vimeo, "canPlay", import_patterns.canPlay.vimeo);
|
||||
__publicField(Vimeo, "forceLoad", true);
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
};
|
||||
;
|
||||
@@ -0,0 +1 @@
|
||||
(self.webpackChunkOpenSign_Docs=self.webpackChunkOpenSign_Docs||[]).push([[8055],{8018:(e,t,a)=>{var n,s=Object.create,l=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,r=Object.getPrototypeOf,p=Object.prototype.hasOwnProperty,h=(e,t,a,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of i(t))p.call(e,s)||s===a||l(e,s,{get:()=>t[s],enumerable:!(n=o(t,s))||n.enumerable});return e},u=(e,t,a)=>(((e,t,a)=>{t in e?l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a),y={};((e,t)=>{for(var a in t)l(e,a,{get:t[a],enumerable:!0})})(y,{default:()=>P}),e.exports=(n=y,h(l({},"__esModule",{value:!0}),n));var c=((e,t,a)=>(a=null!=e?s(r(e)):{},h(!t&&e&&e.__esModule?a:l(a,"default",{value:e,enumerable:!0}),e)))(a(67294)),d=a(38045),b=a(71776);class P extends c.Component{constructor(){super(...arguments),u(this,"callPlayer",d.callPlayer),u(this,"playerID",this.props.config.playerId||`wistia-player-${(0,d.randomString)()}`),u(this,"onPlay",((...e)=>this.props.onPlay(...e))),u(this,"onPause",((...e)=>this.props.onPause(...e))),u(this,"onSeek",((...e)=>this.props.onSeek(...e))),u(this,"onEnded",((...e)=>this.props.onEnded(...e))),u(this,"onPlaybackRateChange",((...e)=>this.props.onPlaybackRateChange(...e))),u(this,"mute",(()=>{this.callPlayer("mute")})),u(this,"unmute",(()=>{this.callPlayer("unmute")}))}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){const{playing:t,muted:a,controls:n,onReady:s,config:l,onError:o}=this.props;(0,d.getSDK)("https://fast.wistia.com/assets/external/E-v1.js","Wistia").then((e=>{l.customControls&&l.customControls.forEach((t=>e.defineControl(t))),window._wq=window._wq||[],window._wq.push({id:this.playerID,options:{autoPlay:t,silentAutoPlay:"allow",muted:a,controlsVisibleOnLoad:n,fullscreenButton:n,playbar:n,playbackRateControl:n,qualityControl:n,volumeControl:n,settingsControl:n,smallPlayButton:n,...l.options},onReady:e=>{this.player=e,this.unbind(),this.player.bind("play",this.onPlay),this.player.bind("pause",this.onPause),this.player.bind("seek",this.onSeek),this.player.bind("end",this.onEnded),this.player.bind("playbackratechange",this.onPlaybackRateChange),s()}})}),o)}unbind(){this.player.unbind("play",this.onPlay),this.player.unbind("pause",this.onPause),this.player.unbind("seek",this.onSeek),this.player.unbind("end",this.onEnded),this.player.unbind("playbackratechange",this.onPlaybackRateChange)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){this.unbind(),this.callPlayer("remove")}seekTo(e,t=!0){this.callPlayer("time",e),t||this.pause()}setVolume(e){this.callPlayer("volume",e)}setPlaybackRate(e){this.callPlayer("playbackRate",e)}getDuration(){return this.callPlayer("duration")}getCurrentTime(){return this.callPlayer("time")}getSecondsLoaded(){return null}render(){const{url:e}=this.props,t=e&&e.match(b.MATCH_URL_WISTIA)[1],a=`wistia_embed wistia_async_${t}`;return c.default.createElement("div",{id:this.playerID,key:t,className:a,style:{width:"100%",height:"100%"}})}}u(P,"displayName","Wistia"),u(P,"canPlay",b.canPlay.wistia),u(P,"loopOnEnded",!0)}}]);
|
||||
@@ -0,0 +1,165 @@
|
||||
exports.id = 55;
|
||||
exports.ids = [55];
|
||||
exports.modules = {
|
||||
|
||||
/***/ 8018:
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var __publicField = (obj, key, value) => {
|
||||
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
||||
return value;
|
||||
};
|
||||
var Wistia_exports = {};
|
||||
__export(Wistia_exports, {
|
||||
default: () => Wistia
|
||||
});
|
||||
module.exports = __toCommonJS(Wistia_exports);
|
||||
var import_react = __toESM(__webpack_require__(67294));
|
||||
var import_utils = __webpack_require__(38045);
|
||||
var import_patterns = __webpack_require__(71776);
|
||||
const SDK_URL = "https://fast.wistia.com/assets/external/E-v1.js";
|
||||
const SDK_GLOBAL = "Wistia";
|
||||
const PLAYER_ID_PREFIX = "wistia-player-";
|
||||
class Wistia extends import_react.Component {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
__publicField(this, "callPlayer", import_utils.callPlayer);
|
||||
__publicField(this, "playerID", this.props.config.playerId || `${PLAYER_ID_PREFIX}${(0, import_utils.randomString)()}`);
|
||||
// Proxy methods to prevent listener leaks
|
||||
__publicField(this, "onPlay", (...args) => this.props.onPlay(...args));
|
||||
__publicField(this, "onPause", (...args) => this.props.onPause(...args));
|
||||
__publicField(this, "onSeek", (...args) => this.props.onSeek(...args));
|
||||
__publicField(this, "onEnded", (...args) => this.props.onEnded(...args));
|
||||
__publicField(this, "onPlaybackRateChange", (...args) => this.props.onPlaybackRateChange(...args));
|
||||
__publicField(this, "mute", () => {
|
||||
this.callPlayer("mute");
|
||||
});
|
||||
__publicField(this, "unmute", () => {
|
||||
this.callPlayer("unmute");
|
||||
});
|
||||
}
|
||||
componentDidMount() {
|
||||
this.props.onMount && this.props.onMount(this);
|
||||
}
|
||||
load(url) {
|
||||
const { playing, muted, controls, onReady, config, onError } = this.props;
|
||||
(0, import_utils.getSDK)(SDK_URL, SDK_GLOBAL).then((Wistia2) => {
|
||||
if (config.customControls) {
|
||||
config.customControls.forEach((control) => Wistia2.defineControl(control));
|
||||
}
|
||||
window._wq = window._wq || [];
|
||||
window._wq.push({
|
||||
id: this.playerID,
|
||||
options: {
|
||||
autoPlay: playing,
|
||||
silentAutoPlay: "allow",
|
||||
muted,
|
||||
controlsVisibleOnLoad: controls,
|
||||
fullscreenButton: controls,
|
||||
playbar: controls,
|
||||
playbackRateControl: controls,
|
||||
qualityControl: controls,
|
||||
volumeControl: controls,
|
||||
settingsControl: controls,
|
||||
smallPlayButton: controls,
|
||||
...config.options
|
||||
},
|
||||
onReady: (player) => {
|
||||
this.player = player;
|
||||
this.unbind();
|
||||
this.player.bind("play", this.onPlay);
|
||||
this.player.bind("pause", this.onPause);
|
||||
this.player.bind("seek", this.onSeek);
|
||||
this.player.bind("end", this.onEnded);
|
||||
this.player.bind("playbackratechange", this.onPlaybackRateChange);
|
||||
onReady();
|
||||
}
|
||||
});
|
||||
}, onError);
|
||||
}
|
||||
unbind() {
|
||||
this.player.unbind("play", this.onPlay);
|
||||
this.player.unbind("pause", this.onPause);
|
||||
this.player.unbind("seek", this.onSeek);
|
||||
this.player.unbind("end", this.onEnded);
|
||||
this.player.unbind("playbackratechange", this.onPlaybackRateChange);
|
||||
}
|
||||
play() {
|
||||
this.callPlayer("play");
|
||||
}
|
||||
pause() {
|
||||
this.callPlayer("pause");
|
||||
}
|
||||
stop() {
|
||||
this.unbind();
|
||||
this.callPlayer("remove");
|
||||
}
|
||||
seekTo(seconds, keepPlaying = true) {
|
||||
this.callPlayer("time", seconds);
|
||||
if (!keepPlaying) {
|
||||
this.pause();
|
||||
}
|
||||
}
|
||||
setVolume(fraction) {
|
||||
this.callPlayer("volume", fraction);
|
||||
}
|
||||
setPlaybackRate(rate) {
|
||||
this.callPlayer("playbackRate", rate);
|
||||
}
|
||||
getDuration() {
|
||||
return this.callPlayer("duration");
|
||||
}
|
||||
getCurrentTime() {
|
||||
return this.callPlayer("time");
|
||||
}
|
||||
getSecondsLoaded() {
|
||||
return null;
|
||||
}
|
||||
render() {
|
||||
const { url } = this.props;
|
||||
const videoID = url && url.match(import_patterns.MATCH_URL_WISTIA)[1];
|
||||
const className = `wistia_embed wistia_async_${videoID}`;
|
||||
const style = {
|
||||
width: "100%",
|
||||
height: "100%"
|
||||
};
|
||||
return /* @__PURE__ */ import_react.default.createElement("div", { id: this.playerID, key: videoID, className, style });
|
||||
}
|
||||
}
|
||||
__publicField(Wistia, "displayName", "Wistia");
|
||||
__publicField(Wistia, "canPlay", import_patterns.canPlay.wistia);
|
||||
__publicField(Wistia, "loopOnEnded", true);
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
};
|
||||
;
|
||||
@@ -0,0 +1 @@
|
||||
(self.webpackChunkOpenSign_Docs=self.webpackChunkOpenSign_Docs||[]).push([[4439],{60356:(e,t,a)=>{var s,o=a(25108),l=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,p=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty,c=(e,t,a,s)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of i(t))y.call(e,o)||o===a||n(e,o,{get:()=>t[o],enumerable:!(s=r(t,o))||s.enumerable});return e},u=(e,t,a)=>(((e,t,a)=>{t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a})(e,"symbol"!=typeof t?t+"":t,a),a),h={};((e,t)=>{for(var a in t)n(e,a,{get:t[a],enumerable:!0})})(h,{default:()=>w}),e.exports=(s=h,c(n({},"__esModule",{value:!0}),s));var d=((e,t,a)=>(a=null!=e?l(p(e)):{},c(!t&&e&&e.__esModule?a:n(a,"default",{value:e,enumerable:!0}),e)))(a(67294)),P=a(38045),g=a(71776);const m=/[?&](?:list|channel)=([a-zA-Z0-9_-]+)/,f=/user\/([a-zA-Z0-9_-]+)\/?/,b=/youtube-nocookie\.com/;class w extends d.Component{constructor(){super(...arguments),u(this,"callPlayer",P.callPlayer),u(this,"parsePlaylist",(e=>{if(e instanceof Array)return{listType:"playlist",playlist:e.map(this.getID).join(",")};if(m.test(e)){const[,t]=e.match(m);return{listType:"playlist",list:t.replace(/^UC/,"UU")}}if(f.test(e)){const[,t]=e.match(f);return{listType:"user_uploads",list:t}}return{}})),u(this,"onStateChange",(e=>{const{data:t}=e,{onPlay:a,onPause:s,onBuffer:o,onBufferEnd:l,onEnded:n,onReady:r,loop:i,config:{playerVars:p,onUnstarted:y}}=this.props,{UNSTARTED:c,PLAYING:u,PAUSED:h,BUFFERING:d,ENDED:P,CUED:g}=window.YT.PlayerState;if(t===c&&y(),t===u&&(a(),l()),t===h&&s(),t===d&&o(),t===P){const e=!!this.callPlayer("getPlaylist");i&&!e&&(p.start?this.seekTo(p.start):this.play()),n()}t===g&&r()})),u(this,"mute",(()=>{this.callPlayer("mute")})),u(this,"unmute",(()=>{this.callPlayer("unMute")})),u(this,"ref",(e=>{this.container=e}))}componentDidMount(){this.props.onMount&&this.props.onMount(this)}getID(e){return!e||e instanceof Array||m.test(e)?null:e.match(g.MATCH_URL_YOUTUBE)[1]}load(e,t){const{playing:a,muted:s,playsinline:l,controls:n,loop:r,config:i,onError:p}=this.props,{playerVars:y,embedOptions:c}=i,u=this.getID(e);if(t)return m.test(e)||f.test(e)||e instanceof Array?void this.player.loadPlaylist(this.parsePlaylist(e)):void this.player.cueVideoById({videoId:u,startSeconds:(0,P.parseStartTime)(e)||y.start,endSeconds:(0,P.parseEndTime)(e)||y.end});(0,P.getSDK)("https://www.youtube.com/iframe_api","YT","onYouTubeIframeAPIReady",(e=>e.loaded)).then((t=>{this.container&&(this.player=new t.Player(this.container,{width:"100%",height:"100%",videoId:u,playerVars:{autoplay:a?1:0,mute:s?1:0,controls:n?1:0,start:(0,P.parseStartTime)(e),end:(0,P.parseEndTime)(e),origin:window.location.origin,playsinline:l?1:0,...this.parsePlaylist(e),...y},events:{onReady:()=>{r&&this.player.setLoop(!0),this.props.onReady()},onPlaybackRateChange:e=>this.props.onPlaybackRateChange(e.data),onPlaybackQualityChange:e=>this.props.onPlaybackQualityChange(e),onStateChange:this.onStateChange,onError:e=>p(e.data)},host:b.test(e)?"https://www.youtube-nocookie.com":void 0,...c}))}),p),c.events&&o.warn("Using `embedOptions.events` will likely break things. Use ReactPlayer\u2019s callback props instead, eg onReady, onPlay, onPause")}play(){this.callPlayer("playVideo")}pause(){this.callPlayer("pauseVideo")}stop(){document.body.contains(this.callPlayer("getIframe"))&&this.callPlayer("stopVideo")}seekTo(e,t=!1){this.callPlayer("seekTo",e),t||this.props.playing||this.pause()}setVolume(e){this.callPlayer("setVolume",100*e)}setPlaybackRate(e){this.callPlayer("setPlaybackRate",e)}setLoop(e){this.callPlayer("setLoop",e)}getDuration(){return this.callPlayer("getDuration")}getCurrentTime(){return this.callPlayer("getCurrentTime")}getSecondsLoaded(){return this.callPlayer("getVideoLoadedFraction")*this.getDuration()}render(){const{display:e}=this.props,t={width:"100%",height:"100%",display:e};return d.default.createElement("div",{style:t},d.default.createElement("div",{ref:this.ref}))}}u(w,"displayName","YouTube"),u(w,"canPlay",g.canPlay.youtube)}}]);
|
||||
@@ -0,0 +1,236 @@
|
||||
exports.id = 439;
|
||||
exports.ids = [439];
|
||||
exports.modules = {
|
||||
|
||||
/***/ 60356:
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
/* provided dependency */ var console = __webpack_require__(25108);
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var __publicField = (obj, key, value) => {
|
||||
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
||||
return value;
|
||||
};
|
||||
var YouTube_exports = {};
|
||||
__export(YouTube_exports, {
|
||||
default: () => YouTube
|
||||
});
|
||||
module.exports = __toCommonJS(YouTube_exports);
|
||||
var import_react = __toESM(__webpack_require__(67294));
|
||||
var import_utils = __webpack_require__(38045);
|
||||
var import_patterns = __webpack_require__(71776);
|
||||
const SDK_URL = "https://www.youtube.com/iframe_api";
|
||||
const SDK_GLOBAL = "YT";
|
||||
const SDK_GLOBAL_READY = "onYouTubeIframeAPIReady";
|
||||
const MATCH_PLAYLIST = /[?&](?:list|channel)=([a-zA-Z0-9_-]+)/;
|
||||
const MATCH_USER_UPLOADS = /user\/([a-zA-Z0-9_-]+)\/?/;
|
||||
const MATCH_NOCOOKIE = /youtube-nocookie\.com/;
|
||||
const NOCOOKIE_HOST = "https://www.youtube-nocookie.com";
|
||||
class YouTube extends import_react.Component {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
__publicField(this, "callPlayer", import_utils.callPlayer);
|
||||
__publicField(this, "parsePlaylist", (url) => {
|
||||
if (url instanceof Array) {
|
||||
return {
|
||||
listType: "playlist",
|
||||
playlist: url.map(this.getID).join(",")
|
||||
};
|
||||
}
|
||||
if (MATCH_PLAYLIST.test(url)) {
|
||||
const [, playlistId] = url.match(MATCH_PLAYLIST);
|
||||
return {
|
||||
listType: "playlist",
|
||||
list: playlistId.replace(/^UC/, "UU")
|
||||
};
|
||||
}
|
||||
if (MATCH_USER_UPLOADS.test(url)) {
|
||||
const [, username] = url.match(MATCH_USER_UPLOADS);
|
||||
return {
|
||||
listType: "user_uploads",
|
||||
list: username
|
||||
};
|
||||
}
|
||||
return {};
|
||||
});
|
||||
__publicField(this, "onStateChange", (event) => {
|
||||
const { data } = event;
|
||||
const { onPlay, onPause, onBuffer, onBufferEnd, onEnded, onReady, loop, config: { playerVars, onUnstarted } } = this.props;
|
||||
const { UNSTARTED, PLAYING, PAUSED, BUFFERING, ENDED, CUED } = window[SDK_GLOBAL].PlayerState;
|
||||
if (data === UNSTARTED)
|
||||
onUnstarted();
|
||||
if (data === PLAYING) {
|
||||
onPlay();
|
||||
onBufferEnd();
|
||||
}
|
||||
if (data === PAUSED)
|
||||
onPause();
|
||||
if (data === BUFFERING)
|
||||
onBuffer();
|
||||
if (data === ENDED) {
|
||||
const isPlaylist = !!this.callPlayer("getPlaylist");
|
||||
if (loop && !isPlaylist) {
|
||||
if (playerVars.start) {
|
||||
this.seekTo(playerVars.start);
|
||||
} else {
|
||||
this.play();
|
||||
}
|
||||
}
|
||||
onEnded();
|
||||
}
|
||||
if (data === CUED)
|
||||
onReady();
|
||||
});
|
||||
__publicField(this, "mute", () => {
|
||||
this.callPlayer("mute");
|
||||
});
|
||||
__publicField(this, "unmute", () => {
|
||||
this.callPlayer("unMute");
|
||||
});
|
||||
__publicField(this, "ref", (container) => {
|
||||
this.container = container;
|
||||
});
|
||||
}
|
||||
componentDidMount() {
|
||||
this.props.onMount && this.props.onMount(this);
|
||||
}
|
||||
getID(url) {
|
||||
if (!url || url instanceof Array || MATCH_PLAYLIST.test(url)) {
|
||||
return null;
|
||||
}
|
||||
return url.match(import_patterns.MATCH_URL_YOUTUBE)[1];
|
||||
}
|
||||
load(url, isReady) {
|
||||
const { playing, muted, playsinline, controls, loop, config, onError } = this.props;
|
||||
const { playerVars, embedOptions } = config;
|
||||
const id = this.getID(url);
|
||||
if (isReady) {
|
||||
if (MATCH_PLAYLIST.test(url) || MATCH_USER_UPLOADS.test(url) || url instanceof Array) {
|
||||
this.player.loadPlaylist(this.parsePlaylist(url));
|
||||
return;
|
||||
}
|
||||
this.player.cueVideoById({
|
||||
videoId: id,
|
||||
startSeconds: (0, import_utils.parseStartTime)(url) || playerVars.start,
|
||||
endSeconds: (0, import_utils.parseEndTime)(url) || playerVars.end
|
||||
});
|
||||
return;
|
||||
}
|
||||
(0, import_utils.getSDK)(SDK_URL, SDK_GLOBAL, SDK_GLOBAL_READY, (YT) => YT.loaded).then((YT) => {
|
||||
if (!this.container)
|
||||
return;
|
||||
this.player = new YT.Player(this.container, {
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
videoId: id,
|
||||
playerVars: {
|
||||
autoplay: playing ? 1 : 0,
|
||||
mute: muted ? 1 : 0,
|
||||
controls: controls ? 1 : 0,
|
||||
start: (0, import_utils.parseStartTime)(url),
|
||||
end: (0, import_utils.parseEndTime)(url),
|
||||
origin: window.location.origin,
|
||||
playsinline: playsinline ? 1 : 0,
|
||||
...this.parsePlaylist(url),
|
||||
...playerVars
|
||||
},
|
||||
events: {
|
||||
onReady: () => {
|
||||
if (loop) {
|
||||
this.player.setLoop(true);
|
||||
}
|
||||
this.props.onReady();
|
||||
},
|
||||
onPlaybackRateChange: (event) => this.props.onPlaybackRateChange(event.data),
|
||||
onPlaybackQualityChange: (event) => this.props.onPlaybackQualityChange(event),
|
||||
onStateChange: this.onStateChange,
|
||||
onError: (event) => onError(event.data)
|
||||
},
|
||||
host: MATCH_NOCOOKIE.test(url) ? NOCOOKIE_HOST : void 0,
|
||||
...embedOptions
|
||||
});
|
||||
}, onError);
|
||||
if (embedOptions.events) {
|
||||
console.warn("Using `embedOptions.events` will likely break things. Use ReactPlayer\u2019s callback props instead, eg onReady, onPlay, onPause");
|
||||
}
|
||||
}
|
||||
play() {
|
||||
this.callPlayer("playVideo");
|
||||
}
|
||||
pause() {
|
||||
this.callPlayer("pauseVideo");
|
||||
}
|
||||
stop() {
|
||||
if (!document.body.contains(this.callPlayer("getIframe")))
|
||||
return;
|
||||
this.callPlayer("stopVideo");
|
||||
}
|
||||
seekTo(amount, keepPlaying = false) {
|
||||
this.callPlayer("seekTo", amount);
|
||||
if (!keepPlaying && !this.props.playing) {
|
||||
this.pause();
|
||||
}
|
||||
}
|
||||
setVolume(fraction) {
|
||||
this.callPlayer("setVolume", fraction * 100);
|
||||
}
|
||||
setPlaybackRate(rate) {
|
||||
this.callPlayer("setPlaybackRate", rate);
|
||||
}
|
||||
setLoop(loop) {
|
||||
this.callPlayer("setLoop", loop);
|
||||
}
|
||||
getDuration() {
|
||||
return this.callPlayer("getDuration");
|
||||
}
|
||||
getCurrentTime() {
|
||||
return this.callPlayer("getCurrentTime");
|
||||
}
|
||||
getSecondsLoaded() {
|
||||
return this.callPlayer("getVideoLoadedFraction") * this.getDuration();
|
||||
}
|
||||
render() {
|
||||
const { display } = this.props;
|
||||
const style = {
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
display
|
||||
};
|
||||
return /* @__PURE__ */ import_react.default.createElement("div", { style }, /* @__PURE__ */ import_react.default.createElement("div", { ref: this.ref }));
|
||||
}
|
||||
}
|
||||
__publicField(YouTube, "displayName", "YouTube");
|
||||
__publicField(YouTube, "canPlay", import_patterns.canPlay.youtube);
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
};
|
||||
;
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user