diff --git a/asset-manifest.json b/asset-manifest.json index 05e67004..45604384 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,7 +1,7 @@ { "files": { "main.css": "/asbplayer/static/css/main.86960484.css", - "main.js": "/asbplayer/static/js/main.6a2e1859.js", + "main.js": "/asbplayer/static/js/main.74bf3200.js", "static/js/952.c01a84bd.chunk.js": "/asbplayer/static/js/952.c01a84bd.chunk.js", "static/js/958.9e8e0c75.chunk.js": "/asbplayer/static/js/958.9e8e0c75.chunk.js", "static/js/572.1edf17df.chunk.js": "/asbplayer/static/js/572.1edf17df.chunk.js", @@ -23,7 +23,7 @@ "static/media/roboto-greek-ext-400-normal.woff2": "/asbplayer/static/media/roboto-greek-ext-400-normal.bb723e8458c9c653e505.woff2", "index.html": "/asbplayer/index.html", "main.86960484.css.map": "/asbplayer/static/css/main.86960484.css.map", - "main.6a2e1859.js.map": "/asbplayer/static/js/main.6a2e1859.js.map", + "main.74bf3200.js.map": "/asbplayer/static/js/main.74bf3200.js.map", "952.c01a84bd.chunk.js.map": "/asbplayer/static/js/952.c01a84bd.chunk.js.map", "958.9e8e0c75.chunk.js.map": "/asbplayer/static/js/958.9e8e0c75.chunk.js.map", "347.2371fb9e.chunk.js.map": "/asbplayer/static/js/347.2371fb9e.chunk.js.map", @@ -31,6 +31,6 @@ }, "entrypoints": [ "static/css/main.86960484.css", - "static/js/main.6a2e1859.js" + "static/js/main.74bf3200.js" ] } \ No newline at end of file diff --git a/background-colored.png b/background-colored.png index b5d8cf02..df60001a 100644 Binary files a/background-colored.png and b/background-colored.png differ diff --git a/favicon.ico b/favicon.ico index bf68b281..9ccd4e6f 100644 Binary files a/favicon.ico and b/favicon.ico differ diff --git a/index.html b/index.html index 88fcc445..eb6c794a 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -
e||125i)return r.slice(0,u-a.length+1)}return r}},9550:function(e,t,n){var r;!function(i,o){"use strict";var a="function",s="undefined",l="object",u="string",c="model",d="name",f="type",p="vendor",h="version",v="architecture",m="console",g="mobile",y="tablet",b="smarttv",x="wearable",k="embedded",w="Amazon",S="Apple",C="ASUS",E="BlackBerry",O="Browser",P="Chrome",F="Firefox",T="Google",R="Huawei",_="LG",j="Microsoft",A="Motorola",Z="Opera",N="Samsung",D="Sony",M="Xiaomi",I="Zebra",L="Facebook",B=function(e){for(var t={},n=0;n
"):n,o=e[t];o&&(i=o+"
"+i),e[t]=i}}},{key:"_sanitizeFileName",value:function(e){return v()(e,{replacement:"_"})}},{key:"_inheritHtmlMarkup",value:function(e,t){for(var n=RegExp("<[^>]*>(.*?)[^>]*>","ig"),r=t.replace("
",""),i=e;;){var o=n.exec(r);if(null===o||o.length<2)break;i=i.replace(o[1],o[0])}return i}},{key:"_storeMediaFile",value:function(){var e=i(l().mark((function e(t,n,r){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._executeAction("storeMediaFile",{filename:t,data:n},r));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"_executeAction",value:function(){var e=i(l().mark((function e(t,n,r){var i,o;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i={action:t,version:6},n&&(i.params=n),e.next=4,this.fetcher.fetch(r||this.settingsProvider.ankiConnectUrl,i);case 4:if(!(o=e.sent).error){e.next=7;break}throw new Error(o.error);case 7:return e.abrupt("return",o);case 8:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()}]),e}(),iy=new(function(){function e(){(0,o.Z)(this,e),this.settings=void 0}return(0,a.Z)(e,[{key:"ankiConnectUrl",get:function(){return this.settings.ankiConnectUrl}},{key:"deck",get:function(){return this.settings.deck}},{key:"noteType",get:function(){return this.settings.noteType}},{key:"sentenceField",get:function(){return this.settings.sentenceField}},{key:"definitionField",get:function(){return this.settings.definitionField}},{key:"audioField",get:function(){return this.settings.audioField}},{key:"imageField",get:function(){return this.settings.imageField}},{key:"wordField",get:function(){return this.settings.wordField}},{key:"sourceField",get:function(){return this.settings.sourceField}},{key:"urlField",get:function(){return this.settings.urlField}},{key:"customAnkiFields",get:function(){return this.settings.customAnkiFields}},{key:"tags",get:function(){return this.settings.tags}},{key:"preferMp3",get:function(){return this.settings.preferMp3}},{key:"audioPaddingStart",get:function(){return this.settings.audioPaddingStart}},{key:"audioPaddingEnd",get:function(){return this.settings.audioPaddingEnd}},{key:"maxImageWidth",get:function(){return this.settings.maxImageWidth}},{key:"maxImageHeight",get:function(){return this.settings.maxImageHeight}},{key:"surroundingSubtitlesCountRadius",get:function(){return this.settings.surroundingSubtitlesCountRadius}},{key:"surroundingSubtitlesTimeRadius",get:function(){return this.settings.surroundingSubtitlesTimeRadius}}]),e}()),oy=["searchParams"],ay=function(){return new Worker(new URL(n.p+n.u(952),n.b))},sy=function(){var e=i(l().mark((function e(){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Worker(new URL(n.p+n.u(958),n.b)));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ly=Xi((function(e){return{content:{flexGrow:1,transition:e.transitions.create("margin",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),marginRight:0},contentShift:function(t){var n=t.drawerWidth;return{transition:e.transitions.create("margin",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen}),marginRight:n}}}}));function uy(e){var t=e.searchParams,n=(0,Ui.Z)(e,oy),r=t.get("video"),i=t.get("channel"),o="true"===t.get("popout");return(0,je.useEffect)((function(){N(r)}),[r]),(0,La.jsx)(Xg,K({videoFile:r,channel:i,popOut:o},n))}function cy(e){var t=ly(e);return(0,La.jsx)("main",{className:(0,Lo.Z)(t.content,(0,$.Z)({},t.contentShift,e.drawerOpen)),children:e.children})}const dy=function(e){var t=e.origin,n=e.logoUrl,r=e.settings,o=e.extension,a=e.fetcher,s=e.onSettingsChanged,u=Rs().t,d=(0,je.useMemo)((function(){return new Io({regexFilter:r.subtitleRegexFilter,regexFilterTextReplacement:r.subtitleRegexFilterTextReplacement,pgsWorkerFactory:sy})}),[r.subtitleRegexFilter,r.subtitleRegexFilterTextReplacement]),p=(0,je.useState)([]),h=(0,c.Z)(p,2),v=h[0],g=h[1],y=Vg(r,o),b=(0,je.useMemo)((function(){return e=r.themeType,(0,Ji.Z)({palette:{primary:{main:"#49007a"},secondary:{main:"#ff1f62"},error:{main:eo.Z.A400},background:{default:"rgba(0, 0, 0, 0)"},type:e}});var e}),[r.themeType]),x=function(e){var t=e.settings,n=e.fetcher;return iy.settings=t,(0,je.useMemo)((function(){return new ry(iy,n)}),[n])}({settings:r,fetcher:a}),k=(0,je.useMemo)((function(){return new URLSearchParams(location.search)}),[]),w=(0,je.useMemo)((function(){return null!==k.get("video")}),[k]),S=(0,je.useState)(!1),C=(0,c.Z)(S,2),P=C[0],F=C[1],T=_m(r.keyBindSet,o),_=(0,je.useRef)(null),A=(0,je.useRef)(null),N=(0,je.useState)(),M=(0,c.Z)(N,2),I=M[0],L=M[1],B=Qi(!w),W=(0,c.Z)(B,1)[0],H=_.current?.2:.3,V=_.current?150:300,U=Math.max(V,W*H),q=function(e){var t=(0,je.useMemo)((function(){return new Vi(e)}),[e]),n=(0,je.useState)([]),r=(0,c.Z)(n,2),o=r[0],a=r[1],s=(0,je.useCallback)((function(e){a((function(t){var n,r=(0,Se.Z)(t),i=f(e);try{var o=function(){var e=n.value;void 0===t.find((function(t){return t.id===e.id}))&&r.push(e)};for(i.s();!(n=i.n()).done;)o()}catch(a){i.e(a)}finally{i.f()}return r}))}),[]),u=(0,je.useCallback)(i(l().mark((function n(){return l().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.t0=s,n.next=3,t.fetch(e);case 3:n.t1=n.sent,(0,n.t0)(n.t1);case 5:case"end":return n.stop()}}),n)}))),[e,s,t]);(0,je.useEffect)((function(){var n=t.liveFetch(e).subscribe(s);return function(){return n.unsubscribe()}}),[t,e,s]);var d=(0,je.useCallback)(function(){var e=i(l().mark((function e(n){var r,i,s,u;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=[],i=f(o);try{for(i.s();!(s=i.n()).done;)u=s.value,n.id!==u.id&&r.push(u)}catch(l){i.e(l)}finally{i.f()}return a(r),e.next=6,t.delete(n.id);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[o,t]),p=(0,je.useCallback)(function(){var e=i(l().mark((function e(n){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a((function(e){return[].concat((0,Se.Z)(e),[n])})),e.next=3,t.save(n);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[t]);return{copyHistoryItems:o,refreshCopyHistory:u,deleteCopyHistoryItem:d,saveCopyHistoryItem:p}}(r.miningHistoryStorageLimit),G=q.copyHistoryItems,X=q.refreshCopyHistory,Y=q.deleteCopyHistoryItem,Q=q.saveCopyHistoryItem,J=(0,je.useRef)([]);J.current=G;var ee=(0,je.useState)(!1),te=(0,c.Z)(ee,2),ne=te[0],ie=te[1],oe=(0,je.useState)(y.theaterMode),ae=(0,c.Z)(oe,2),se=ae[0],le=ae[1],ue=(0,je.useState)(!1),ce=(0,c.Z)(ue,2),de=ce[0],fe=ce[1],pe=(0,je.useState)(!1),he=(0,c.Z)(pe,2),ve=he[0],me=he[1],ge=(0,je.useState)(),ye=(0,c.Z)(ge,2),be=ye[0],xe=ye[1],ke=(0,je.useState)(!1),we=(0,c.Z)(ke,2),Ce=we[0],Ee=we[1],Oe=(0,je.useState)(),Pe=(0,c.Z)(Oe,2),Fe=Pe[0],Te=Pe[1],Re=(0,je.useState)(),_e=(0,c.Z)(Re,2),Ae=_e[0],Ze=_e[1],Ne=(0,je.useState)(),De=(0,c.Z)(Ne,2),Me=De[0],Ie=De[1],Le=(0,je.useState)({subtitleFiles:[]}),Be=(0,c.Z)(Le,2),ze=Be[0],We=Be[1],He=(0,je.useState)([]),Ve=(0,c.Z)(He,2),Ue=Ve[0],Ke=Ve[1],qe=(0,je.useState)(!1),Ge=(0,c.Z)(qe,2),Xe=Ge[0],Ye=Ge[1],Qe=(0,je.useRef)(null),Je=(0,je.useState)(),et=(0,c.Z)(Je,2),tt=et[0],nt=et[1],rt=(0,je.useState)(!1),it=(0,c.Z)(rt,2),ot=it[0],at=it[1],st=(0,je.useState)(!1),lt=(0,c.Z)(st,2),ut=lt[0],ct=lt[1],dt=(0,je.useState)(),ft=(0,c.Z)(dt,2),pt=ft[0],ht=ft[1],vt=(0,je.useState)(!1),mt=(0,c.Z)(vt,2),gt=mt[0],yt=mt[1],bt=(0,je.useState)({timestamp:0,resume:!1}),xt=(0,c.Z)(bt,2),kt=xt[0],wt=xt[1],St=(0,je.useState)(!1),Ct=(0,c.Z)(St,2),Et=Ct[0],Ot=Ct[1],Pt=(0,je.useState)(),Ft=(0,c.Z)(Pt,2),Tt=Ft[0],Rt=Ft[1],_t=(0,je.useState)(!1),jt=(0,c.Z)(_t,2),At=jt[0],Zt=jt[1],Nt=(0,je.useState)(!1),Dt=(0,c.Z)(Nt,2),Mt=Dt[0],It=Dt[1],Lt=(0,je.useState)(),Bt=(0,c.Z)(Lt,2),zt=Bt[0],Wt=Bt[1],Ht=(0,je.useState)(),Vt=(0,c.Z)(Ht,2),$t=Vt[0],Ut=Vt[1],Kt=(0,je.useState)(),qt=(0,c.Z)(Kt,2),Gt=qt[0],Xt=qt[1],Yt=(0,je.useRef)(null),Qt=(0,je.useRef)(!1);Qt.current=gt;var Jt=ze.subtitleFiles,en=(0,je.useCallback)((function(e){var t;(console.error(e),Te("error"),e instanceof ey)?xe(null!==(t=u(e.locKey,e.locParams))&&void 0!==t?t:"{var t="\n";function n(e,s,l,u){var c="",d="";s.format&&s.indentBy.length>0&&(d=t+""+s.indentBy.repeat(u));for(var f=0;f