UNPKG

@story-telling-reporter/react-embed-code-generator

Version:
1 lines 27.7 kB
"use strict";(self.webpackChunk_story_telling_reporter_react_embed_code_generator=self.webpackChunk_story_telling_reporter_react_embed_code_generator||[]).push([[93],{706:(e,t,n)=>{function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],u=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(e,t)||o(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){if(e){if("string"==typeof e)return a(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.Karaoke=function(e){var t=e.audioUrls,n=e.webVtt,a=e.className,i=e.preload,c=void 0===i?"auto":i,f=e.quoteBy,y=e.hintOnly,w=void 0!==y&&y,k=e.hintId,j=(0,l.useRef)(null),_=(0,l.useRef)(null),S=r(p.hooks.useMuted(!0,j),2),C=S[0],O=S[1],M=r((0,d.useInView)({rootMargin:"-25% 0% -25% 0%",threshold:0}),2),I=M[0],A=M[1],P=r((0,l.useState)(0),2),L=P[0],E=P[1],T=r((0,l.useState)(!1),2),N=T[0],Q=T[1],K=r((0,l.useState)(!1),2),B=K[0],V=K[1],W=r((0,l.useState)(!1),2),z=W[0],R=W[1],D=r((0,l.useState)([]),2),U=D[0],q=D[1],Z=r((0,l.useState)(null),2),$=Z[0],F=Z[1],H=r((0,l.useState)(null),2),J=H[0],G=H[1];(0,l.useEffect)((function(){var e=new Blob([n],{type:"text/plain"});G(URL.createObjectURL(e))}),[]),(0,l.useEffect)((function(){var e=_.current,t=function(e){var t,n=(null===(t=e.target)||void 0===t||null===(t=t.track)||void 0===t?void 0:t.cues)||[];if(U.length!==n.length){console.log("[react-karaoke] track's cues list: ",n);var r,a=[],i=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=o(e))){t&&(e=t);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==t.return||t.return()}finally{if(l)throw a}}}}(n);try{for(i.s();!(r=i.n()).done;){var l=r.value;a.push(l)}}catch(e){i.e(e)}finally{i.f()}q(a)}},n=function(e){var t,n=null===(t=e.target)||void 0===t||null===(t=t.track)||void 0===t||null===(t=t.activeCues)||void 0===t?void 0:t[0];n&&(console.log("[react-karaoke] cue changed. active cue: ",n),F(n))};return e&&(e.addEventListener("cuechange",n),e.addEventListener("load",t)),function(){e&&(e.removeEventListener("cuechange",n),e.removeEventListener("load",t))}}),[U,$]),(0,l.useEffect)((function(){var e=j.current,t=function(){Q(!0)},n=function(){var t=e.currentTime;E(t)};return e&&(e.addEventListener("timeupdate",n),e.addEventListener("ended",t)),function(){e&&(e.removeEventListener("timeupdate",n),e.removeEventListener("ended",t))}}),[L]),(0,l.useEffect)((function(){var e=j.current;e&&(e.muted=C)}),[C]),(0,l.useEffect)((function(){var e=j.current;if(e)if(A){if(!z){var t=e.play();void 0!==t&&t.then((function(){console.log("[react-karaoke] audio plays successfully."),e.setAttribute("data-played",!0),R(!0),V(!1)})).catch((function(e){console.log("[react-karaoke] unable to play audio"),console.log("[react-karaoke] error: ",e)}))}}else e.pause(),V(!0)}),[A,z]);var X=!z||z&&B||N?(0,m.jsx)(h,{onClick:function(){var e=j.current;if(e){N&&(Q(!1),E(0),e.currentTime=0);var t=e.play();void 0!==t&&t.then((function(){console.log("[react-karaoke] audio plays successfully."),e.setAttribute("data-played",!0),R(!0),V(!1)})).catch((function(e){console.log("[react-karaoke] unable to play audio"),console.log("[react-karaoke] error: ",e)}))}},children:(0,m.jsx)(s.PlayIcon,{})}):(0,m.jsx)(h,{onClick:function(){var e=j.current;e&&(C?(e.muted=!1,O(!1)):(e.muted=!0,O(!0)),e.setAttribute("data-played",!0))},children:C?(0,m.jsx)(s.MuteIcon,{}):(0,m.jsx)(s.SoundIcon,{})}),Y=(0,l.useMemo)((function(){return function(e){var t;return Array.isArray(e)?null===(t=e.map((function(e){return null==e?void 0:e.text})))||void 0===t?void 0:t.filter((function(e){return"string"==typeof e})):[]}(U)}),[U]),ee=(0,l.useMemo)((function(){return function(e,t){if(!Array.isArray(e)||!t)return 0;var n=function(e,t){if(!Array.isArray(e)||!t)return[];var n=e.findIndex((function(e){return(null==e?void 0:e.startTime)===(null==t?void 0:t.startTime)}));return e.slice(0,n)}(e,t);return n.map((function(e){return e.text})).filter((function(e){return"string"==typeof e})).join("").length}(U,$)}),[U,$]);if($){var te=$.text,ne=($.endTime-$.startTime)/te.length;L>$.startTime&&(ee+=Math.floor((L-$.startTime)/ne))}return w?(0,m.jsx)(v,{id:k}):(0,m.jsxs)(b,{className:a,ref:I,children:[X,(0,m.jsxs)("video",{ref:j,preload:c,"data-twreporter-story-telling":!0,"data-react-karaoke":!0,"data-muted":C,"data-played":!1,playsInline:!0,style:{display:"none"},children:[(0,m.jsx)("track",{ref:_,default:!0,kind:"metadata",src:J}),t.map((function(e,t){return(0,m.jsx)("source",{src:e},"audio_source_".concat(t))}))]}),(0,m.jsxs)(x,{onClick:function(){var e=window.getSelection();if("Range"!==(null==e?void 0:e.type)){var t=j.current;if(t){if(!B)return t.pause(),void V(!0);N&&(Q(!1),E(0),t.currentTime=0),t.play(),t.setAttribute("data-played",!0),V(!1)}}},children:[(0,m.jsx)(u.default,{textArr:Y,currentCharIdx:ee,animationPlayState:B?"paused":"running"}),f?(0,m.jsx)(g,{children:f}):null]})]})};var l=function(e){if("function"==typeof WeakMap){var t=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var n,r,o={__proto__:null,default:e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return o;if(n=t){if(n.has(e))return n.get(e);n.set(e,o)}for(var a in e)"default"!==a&&{}.hasOwnProperty.call(e,a)&&((r=(n=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,a))&&(r.get||r.set)?n(o,a,r):o[a]=e[a]);return o}(e)}(n(4041)),u=y(n(1102)),c=y(n(9716)),s=n(4992),f=n(6397),d=n(5900),p=n(3596),m=n(1085);function y(e){return e&&e.__esModule?e:{default:e}}var v=p.twreporter.Hint,h=c.default.div.withConfig({displayName:"twreporter__AudioBt",componentId:"sc-t66wct-0"})(["cursor:pointer;width:40px;height:40px;display:flex;svg{width:24px;margin:auto;}"]),g=c.default.div.withConfig({displayName:"twreporter__QuoteBy",componentId:"sc-t66wct-1"})(["font-size:12px;font-weight:400;line-height:1.5;letter-spacing:0em;text-align:right;margin-top:16px;color:#808080;&::before{content:'';display:inline-block;width:48px;border-top:0.5px solid #808080;margin-right:8px;vertical-align:middle;}"]),b=c.default.blockquote.withConfig({displayName:"twreporter__Container",componentId:"sc-t66wct-2"})(["margin:0;margin-left:auto;margin-right:auto;text-align:left;*{box-sizing:border-box;}width:calc(100vw - 68px);","{width:453px;}","{width:480px;padding-left:24px;padding-right:32px;}","{width:580px;padding-left:24px;padding-right:32px;}display:flex;align-items:flex-start;gap:8px;","{flex-shrink:0;}"],f.mediaQuery.tabletOnly,f.mediaQuery.desktopOnly,f.mediaQuery.hd,h),x=c.default.div.withConfig({displayName:"twreporter__QuoteContainer",componentId:"sc-t66wct-3"})(["max-width:calc(272 / 320 * 100%);","{max-width:405px;}","{max-width:376px;}","{max-width:476px;}"],f.mediaQuery.tabletOnly,f.mediaQuery.desktopOnly,f.mediaQuery.hd)},960:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mediaQuery=t.default=t.breakpoints=void 0;var n=t.breakpoints={small:320,medium:760,large:1440},r=t.mediaQuery={smallOnly:"@media (max-width: ".concat(n.medium-1,"px)"),mediumOnly:"@media (min-width: ".concat(n.medium,"px) and (max-width: ").concat(n.large-1,"px)"),mediumAbove:"@media (min-width: ".concat(n.medium,"px)"),largeBelow:"@media (max-width: ".concat(n.large-1,"px)"),largeOnly:"@media (min-width: ".concat(n.large,"px)")};t.default={breakpoints:n,mediaQuery:r}},1102:(e,t,n)=>{function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.className,n=e.textArr,r=e.currentCharIdx,o=e.animationPlayState,a=void 0===o?"running":o,u=0,c=n.map((function(e){var t=Array.from(e),n=t.map((function(e,t){return(0,i.jsx)(l,{$toAnimate:t+u<r,$animationPlayState:a,children:e},"char_".concat(t))}));return u+=t.length,n}));return(0,i.jsx)("div",{className:t,children:c})},function(e){if("function"==typeof WeakMap){var t=new WeakMap;new WeakMap}!function(e){if(e&&e.__esModule)return e;var n,o,a={__proto__:null,default:e};if(null===e||"object"!=r(e)&&"function"!=typeof e)return a;if(n=t){if(n.has(e))return n.get(e);n.set(e,a)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((o=(n=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(o.get||o.set)?n(a,i,o):a[i]=e[i])}(e)}(n(4041));var o,a=(o=n(9716))&&o.__esModule?o:{default:o},i=n(1085),l=a.default.span.withConfig({displayName:"quote__Char",componentId:"sc-1gsjo3e-0"})(["@keyframes colored{0%{color:#808080;}50%{color:#c09662;}100%{color:#404040;}}color:#808080;transition:color 0.2s linear;font-family:Noto Sans TC,Sans-Serif,serif;font-size:18px;font-weight:400;line-height:2;letter-spacing:0em;text-align:justify;",""],(function(e){return e.$toAnimate?"\n animation-name: colored;\n animation-fill-mode: both;\n animation-duration: 1s;\n animation-play-state: ".concat(e.$animationPlayState,";\n "):"animation-play-state: ".concat(e.$animationPlayState)}))},1743:(e,t,n)=>{function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],u=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(e,t)||o(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){if(e){if("string"==typeof e)return a(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.Karaoke=function(e){var t=e.audioUrls,n=e.webVtt,a=e.className,i=e.preload,c=void 0===i?"auto":i,f=e.quoteBy,y=e.hintText,k=void 0===y?"":y,j=e.hintId,_=e.hintOnly,S=void 0!==_&&_,C=(0,l.useRef)(null),O=(0,l.useRef)(null),M=r(p.hooks.useMuted(!0,C),2),I=M[0],A=M[1],P=r((0,d.useInView)({rootMargin:"-25% 0% -25% 0%",threshold:0}),2),L=P[0],E=P[1],T=r((0,l.useState)(0),2),N=T[0],Q=T[1],K=r((0,l.useState)(!1),2),B=K[0],V=K[1],W=r((0,l.useState)(!1),2),z=W[0],R=W[1],D=r((0,l.useState)(!1),2),U=D[0],q=D[1],Z=r((0,l.useState)([]),2),$=Z[0],F=Z[1],H=r((0,l.useState)(null),2),J=H[0],G=H[1],X=r((0,l.useState)(null),2),Y=X[0],ee=X[1];(0,l.useEffect)((function(){var e=new Blob([n],{type:"text/plain"});ee(URL.createObjectURL(e))}),[]),(0,l.useEffect)((function(){var e=O.current,t=function(e){var t,n=(null===(t=e.target)||void 0===t||null===(t=t.track)||void 0===t?void 0:t.cues)||[];if($.length!==n.length){console.log("[react-karaoke] track's cues list: ",n);var r,a=[],i=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=o(e))){t&&(e=t);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==t.return||t.return()}finally{if(l)throw a}}}}(n);try{for(i.s();!(r=i.n()).done;){var l=r.value;a.push(l)}}catch(e){i.e(e)}finally{i.f()}F(a)}},n=function(e){var t,n=null===(t=e.target)||void 0===t||null===(t=t.track)||void 0===t||null===(t=t.activeCues)||void 0===t?void 0:t[0];n&&(console.log("[react-karaoke] cue changed. active cue: ",n),G(n))};return e&&(e.addEventListener("cuechange",n),e.addEventListener("load",t)),function(){e&&(e.removeEventListener("cuechange",n),e.removeEventListener("load",t))}}),[$,J]),(0,l.useEffect)((function(){var e=C.current,t=function(){V(!0)},n=function(){var t=e.currentTime;Q(t)};return e&&(e.addEventListener("timeupdate",n),e.addEventListener("ended",t)),function(){e&&(e.removeEventListener("timeupdate",n),e.removeEventListener("ended",t))}}),[N]),(0,l.useEffect)((function(){var e=C.current;e&&(e.muted=I)}),[I]),(0,l.useEffect)((function(){var e=C.current;e&&(E?U||(e.play().then((function(){console.log("[react-karaoke] audio plays successfully.")})).catch((function(e){console.log("[react-karaoke] unable to play audio"),console.log("[react-karaoke] error: ",e)})),q(!0),R(!1),e.setAttribute("data-played",!0)):(e.pause(),R(!0)))}),[E,z,U]);var te=!U||U&&z||B?(0,m.jsx)(h,{onClick:function(){var e=C.current;e&&(B&&(V(!1),Q(0),e.currentTime=0),e.play(),e.setAttribute("data-played",!0),R(!1))},children:(0,m.jsx)(s.PlayIcon,{})}):(0,m.jsx)(h,{onClick:function(){var e=C.current;e&&(I?(e.muted=!1,A(!1)):(e.muted=!0,A(!0)),e.setAttribute("data-played",!0))},children:I?(0,m.jsx)(s.MuteIcon,{}):(0,m.jsx)(s.SoundIcon,{})}),ne=(0,l.useMemo)((function(){return function(e){var t;return Array.isArray(e)?null===(t=e.map((function(e){return null==e?void 0:e.text})))||void 0===t?void 0:t.filter((function(e){return"string"==typeof e})):[]}($)}),[$]),re=(0,l.useMemo)((function(){return function(e,t){if(!Array.isArray(e)||!t)return 0;var n=function(e,t){if(!Array.isArray(e)||!t)return[];var n=e.findIndex((function(e){return(null==e?void 0:e.startTime)===(null==t?void 0:t.startTime)}));return e.slice(0,n)}(e,t);return n.map((function(e){return e.text})).filter((function(e){return"string"==typeof e})).join("").length}($,J)}),[$,J]);if(J){var oe=J.text,ae=(J.endTime-J.startTime)/oe.length;N>J.startTime&&(re+=Math.floor((N-J.startTime)/ae))}return S?(0,m.jsx)(v,{id:j,text:k}):(0,m.jsxs)(m.Fragment,{children:[k&&(0,m.jsx)(v,{id:j,text:k}),(0,m.jsx)(x,{children:(0,m.jsxs)(b,{className:a,ref:L,children:[(0,m.jsx)(w,{}),(0,m.jsxs)("video",{ref:C,preload:c,"data-twreporter-story-telling":!0,"data-react-karaoke":!0,"data-muted":I,"data-played":!1,playsInline:!0,style:{display:"none"},children:[(0,m.jsx)("track",{ref:O,default:!0,kind:"metadata",src:Y}),t.map((function(e,t){return(0,m.jsx)("source",{src:e},"audio_source_".concat(t))}))]}),(0,m.jsx)(u.default,{textArr:ne,currentCharIdx:re}),f?(0,m.jsx)(g,{children:f}):null,te]})})]})};var l=function(e){if("function"==typeof WeakMap){var t=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var n,r,o={__proto__:null,default:e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return o;if(n=t){if(n.has(e))return n.get(e);n.set(e,o)}for(var a in e)"default"!==a&&{}.hasOwnProperty.call(e,a)&&((r=(n=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,a))&&(r.get||r.set)?n(o,a,r):o[a]=e[a]);return o}(e)}(n(4041)),u=y(n(9751)),c=y(n(9716)),s=n(5565),f=n(960),d=n(5900),p=n(3596),m=n(1085);function y(e){return e&&e.__esModule?e:{default:e}}var v=p.kids.Hint,h=c.default.div.withConfig({displayName:"kids__AudioBt",componentId:"sc-1o6e38n-0"})(["cursor:pointer;"]),g=c.default.div.withConfig({displayName:"kids__QuoteBy",componentId:"sc-1o6e38n-1"})(["font-family:Noto Sans TC,Sans-Serif,serif;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:0.05em;margin-top:15px;color:#747474;"]),b=c.default.blockquote.withConfig({displayName:"kids__QuoteContainer",componentId:"sc-1o6e38n-2"})(["margin:0;box-sizing:border-box;font-family:SweiMarkerSansCJKtc-Regular,Noto Sans TC,Sans-Serif,serif;letter-spacing:1.5px;position:relative;width:100%;background-color:#f4f4f4;border-radius:20px;padding:60px 40px 90px 40px;","{padding:60px 20px 80px 20px;}","{position:absolute;right:40px;bottom:40px;","{right:23px;bottom:23px;}}"],f.mediaQuery.smallOnly,h,f.mediaQuery.smallOnly),x=c.default.div.withConfig({displayName:"kids__OuterBox",componentId:"sc-1o6e38n-3"})(["padding-top:54px;width:100%;max-width:700px;"]),w=(0,c.default)(s.LogoIcon).withConfig({displayName:"kids__Logo",componentId:"sc-1o6e38n-4"})(["position:absolute;left:50%;top:0;transform:translate(-50%,-50%);width:100px;"])},4717:(e,t,n)=>{function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}var o=["componentTheme"];function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t,n){return(t=function(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.Karaoke=f,Object.defineProperty(t,"KidsKaraoke",{enumerable:!0,get:function(){return u.Karaoke}}),Object.defineProperty(t,"TwreporterKaraoke",{enumerable:!0,get:function(){return c.Karaoke}}),t.default=void 0;var u=n(1743),c=n(706),s=n(1085);function f(e){var t=e.componentTheme,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,o);return"kids"===t?(0,s.jsx)(u.Karaoke,i({},n)):(0,s.jsx)(c.Karaoke,i({},n))}t.default={Karaoke:f,KidsKaraoke:u.Karaoke,TwreporterKaraoke:c.Karaoke}},4992:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MuteIcon=function(){return(0,o.jsxs)("svg",{viewBox:"0 0 24 24",fill:"#808080",xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsx)("path",{d:"M12 9.48366V5.00194C12 4.14669 10.9961 3.6861 10.3478 4.24392L5.41641 8.48708H3C2.44772 8.48708 2 8.93479 2 9.48707V14.6098C2 15.1621 2.44772 15.6098 3 15.6098H5.58884L10.3478 19.7046C10.9961 20.2625 12 19.8019 12 18.9466V14.6133L12 14.6098V9.48708L12 9.48366Z"}),(0,o.jsx)("path",{d:"M20.9385 10.0037C21.2314 9.71083 21.2314 9.23595 20.9385 8.94306C20.6456 8.65017 20.1708 8.65017 19.8779 8.94306L17.51 11.3109L15.1421 8.94306C14.8493 8.65017 14.3744 8.65017 14.0815 8.94306C13.7886 9.23595 13.7886 9.71083 14.0815 10.0037L16.4494 12.3716L14.0815 14.7394C13.7886 15.0323 13.7886 15.5072 14.0815 15.8001C14.3744 16.093 14.8493 16.093 15.1422 15.8001L17.51 13.4322L19.8779 15.8001C20.1707 16.093 20.6456 16.093 20.9385 15.8001C21.2314 15.5072 21.2314 15.0323 20.9385 14.7394L18.5707 12.3716L20.9385 10.0037Z"})]})},t.PlayIcon=function(){return(0,o.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)("path",{d:"M6 20V4L19 12L6 20Z",fill:"#C09662"})})},t.SeparationLine=function(){return(0,o.jsx)("svg",{viewBox:"0 0 270 11",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)("path",{d:"M270,11c-6.285,0 -9.463,-2.629 -12.537,-5.172c-3.097,-2.562 -6.023,-4.982 -12.013,-4.982c-5.99,0 -8.915,2.42 -12.013,4.982c-3.074,2.543 -6.252,5.172 -12.537,5.172c-6.284,0 -9.462,-2.629 -12.535,-5.172c-3.097,-2.562 -6.022,-4.982 -12.011,-4.982c-5.99,0 -8.916,2.42 -12.012,4.983c-3.074,2.542 -6.252,5.171 -12.536,5.171c-6.284,0 -9.462,-2.629 -12.535,-5.172c-3.097,-2.562 -6.022,-4.982 -12.011,-4.982c-5.989,0 -8.915,2.42 -12.012,4.983c-3.073,2.542 -6.251,5.171 -12.534,5.171c-6.284,0 -9.461,-2.629 -12.534,-5.172c-3.097,-2.562 -6.021,-4.982 -12.01,-4.982c-5.988,0 -8.912,2.42 -12.008,4.982c-3.073,2.543 -6.251,5.172 -12.534,5.172c-6.283,0 -9.459,-2.629 -12.532,-5.172c-3.096,-2.562 -6.02,-4.982 -12.008,-4.982c-5.989,0 -8.914,2.42 -12.01,4.982c-3.073,2.543 -6.251,5.172 -12.535,5.172c-6.283,0 -9.46,-2.629 -12.533,-5.172c-3.097,-2.562 -6.022,-4.982 -12.01,-4.982l0,-0.846c6.283,0 9.461,2.629 12.534,5.172c3.096,2.562 6.021,4.982 12.009,4.982c5.989,0 8.914,-2.42 12.011,-4.982c3.073,-2.543 6.251,-5.172 12.534,-5.172c6.283,0 9.46,2.629 12.533,5.172c3.095,2.562 6.019,4.982 12.007,4.982c5.988,0 8.913,-2.42 12.009,-4.982c3.073,-2.543 6.25,-5.172 12.533,-5.172c6.283,0 9.461,2.629 12.534,5.172c3.096,2.562 6.022,4.982 12.01,4.982c5.989,0 8.913,-2.42 12.01,-4.982c3.073,-2.543 6.251,-5.172 12.536,-5.172c6.284,0 9.461,2.629 12.535,5.172c3.096,2.562 6.022,4.982 12.011,4.982c5.989,0 8.915,-2.42 12.012,-4.982c3.073,-2.543 6.251,-5.172 12.536,-5.172c6.284,0 9.462,2.629 12.535,5.172c3.097,2.562 6.022,4.982 12.011,4.982c5.99,0 8.916,-2.42 12.013,-4.982c3.074,-2.543 6.252,-5.172 12.537,-5.172c6.286,0 9.463,2.629 12.537,5.172c3.098,2.562 6.023,4.982 12.013,4.982l0,0.846Z",fill:"rgb(192, 150, 98)"})})},t.SoundIcon=function(){return(0,o.jsxs)("svg",{viewBox:"0 0 24 24",fill:"#C09662",xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsx)("path",{d:"M12 9.48366V5.00194C12 4.14669 10.9961 3.6861 10.3478 4.24392L5.41641 8.48708H3C2.44772 8.48708 2 8.93479 2 9.48707V14.6098C2 15.1621 2.44772 15.6098 3 15.6098H5.58884L10.3478 19.7046C10.9961 20.2625 12 19.8019 12 18.9466V14.6133L12 14.6098V9.48708L12 9.48366Z"}),(0,o.jsx)("path",{d:"M16.2974 4.2819C15.9009 4.1623 15.4824 4.38682 15.3628 4.78339C15.2432 5.17996 15.4677 5.5984 15.8643 5.71801C16.529 5.91849 17.1496 6.22502 17.7068 6.61889C19.3811 7.80241 20.4779 9.76964 20.4779 12C20.4779 14.9738 18.5274 17.4787 15.8643 18.2819C15.4677 18.4015 15.2432 18.82 15.3628 19.2165C15.4824 19.6131 15.9009 19.8376 16.2974 19.718C19.5874 18.7258 21.9779 15.6422 21.9779 12C21.9779 9.26726 20.6319 6.84967 18.5726 5.394C17.8863 4.90885 17.1201 4.53001 16.2974 4.2819ZM14.2527 8.28629C13.8585 8.15892 13.4358 8.37519 13.3084 8.76934C13.181 9.16348 13.3973 9.58625 13.7914 9.71362C14.0058 9.78288 14.2085 9.88959 14.3928 10.0292C14.9482 10.4499 15.3309 11.1661 15.3309 12C15.3309 13.1176 14.649 14.0092 13.7914 14.2863C13.3973 14.4137 13.181 14.8364 13.3084 15.2306C13.4358 15.6247 13.8585 15.841 14.2527 15.7136C15.7763 15.2213 16.8309 13.7177 16.8309 12C16.8309 10.7068 16.2364 9.54382 15.2984 8.83343C14.9853 8.5963 14.6333 8.40929 14.2527 8.28629Z"})]})},(r=n(4041))&&r.__esModule;var r,o=n(1085)},5565:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LogoIcon=function(e){var t=e.className;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("link",{rel:"preload",href:"".concat(a,"/karaoke-logo.svg"),as:"image"}),(0,o.jsx)("img",{className:t,src:"".concat(a,"/karaoke-logo.svg"),width:"100%"})]})},t.MuteIcon=function(e){var t=e.className,n=e.onClick,r=e.styles;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("link",{rel:"preload",href:"".concat(a,"/mute.svg"),as:"image"}),(0,o.jsx)("img",{className:t,src:"".concat(a,"/mute.svg"),styles:r,width:"100%",onClick:n})]})},t.PlayIcon=function(e){var t=e.className,n=e.onClick,r=e.styles;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("link",{rel:"preload",href:"".concat(a,"/play.svg"),as:"image"}),(0,o.jsx)("img",{className:t,src:"".concat(a,"/play.svg"),styles:r,width:"100%",onClick:n})]})},t.SoundIcon=function(e){var t=e.className,n=e.onClick,r=e.style;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("link",{rel:"preload",href:"".concat(a,"/sound.svg"),as:"image"}),(0,o.jsx)("img",{className:t,src:"".concat(a,"/sound.svg"),style:r,width:"100%",onClick:n})]})},(r=n(4041))&&r.__esModule;var r,o=n(1085),a="https://www.unpkg.com/@story-telling-reporter/react-karaoke/public/icons/kids"},6397:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mediaQuery=t.default=void 0;var n=t.mediaQuery={mobile:"@media (max-width: 767px)",tabletAbove:"@media (min-width: 768px)",tabletOnly:"@media (min-width: 768px) and (max-width: 1023px)",desktopAbove:"@media (min-width: 1024px)",desktopBelow:"@media (max-width: 1023px)",desktopOnly:"@media (min-width: 1024px) and (max-width: 1440px)",hd:"@media (min-width: 1440px)"};t.default={mediaQuery:n}},9751:(e,t,n)=>{function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.className,n=e.textArr,r=e.currentCharIdx,o=0,a=n.map((function(e){var t=Array.from(e),n=t.map((function(e,t){return(0,l.jsx)(u,{isTransitioned:t+o<r,children:e},"char_".concat(t))})).concat((0,l.jsx)("br",{},"char_break_line"));return o+=t.length,n}));return(0,l.jsx)(c,{className:t,children:a})},function(e){if("function"==typeof WeakMap){var t=new WeakMap;new WeakMap}!function(e){if(e&&e.__esModule)return e;var n,o,a={__proto__:null,default:e};if(null===e||"object"!=r(e)&&"function"!=typeof e)return a;if(n=t){if(n.has(e))return n.get(e);n.set(e,a)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((o=(n=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(o.get||o.set)?n(a,i,o):a[i]=e[i])}(e)}(n(4041));var o,a=n(960),i=(o=n(9716))&&o.__esModule?o:{default:o},l=n(1085),u=i.default.span.withConfig({displayName:"quote__Char",componentId:"sc-zczmli-0"})(["transition:color 0.5s linear;font-size:24px;font-weight:400;line-height:1.5;","{font-size:20px;}",""],a.mediaQuery.smallOnly,(function(e){return"\n color: ".concat(e.isTransitioned?"#27B5F7":"#232323",";\n ")})),c=i.default.span.withConfig({displayName:"quote__Quote",componentId:"sc-zczmli-1"})([""])}}]);