import{bf as Pl,fy as Qwe,aY as S$1,eY as oi,av as E$1,ao as D$1}from'./main-DEZ5cZzu.js';var M=(()=>{class e{warnCacheKey;warnCacheResult;errCacheKey;errCacheResult;buildWarn(r){let{videoId:a,state:o}=r,c=`${a}-${o}`;return this.warnCacheKey===c&&this.warnCacheResult?this.warnCacheResult:(this.warnCacheResult=this._buildWarn(r),this.warnCacheKey=c,this.warnCacheResult);}_buildWarn(r){let{videoId:a,state:o}=r,c="Tw\xF3j film jest w trakcie przetwarzania.",l="To mo\u017Ce zaj\u0105\u0107 troch\u0119 czasu. W mi\u0119dzyczasie niekt\xF3re funkcje mog\u0105 nie by\u0107 dost\u0119pne do momentu, gdy zostanie to uko\u0144czone.",m="Skontaktuj si\u0119 z administratorem, \u017Ceby to naprawi\u0107.",u="Twoja przegl\u0105darka mo\u017Ce nie by\u0107 w stanie tego odtworzy\u0107.";switch(o){case Pl.PUBLISHED:case Pl.LIVE_ENDED:case Pl.WAITING_FOR_LIVE:return;case Pl.TO_TRANSCODE:return{title:"Transkodowanie w toku",manageMain:c,manageSecondary:l,watchMain:u,watchSecondary:""};case Pl.TO_IMPORT:return{title:"Importowanie w toku",manageMain:"Tw\xF3j zdalny film jest w trakcie importowania.",manageSecondary:l,watchMain:"Ten zdalny film jest w trakcie importowania. B\u0119dzie on dost\u0119pny, gdy importowanie zostanie zako\u0144czone.",watchSecondary:"",routerLink:{text:"Przejrzyj sw\xF3j import",link:["/my-library/video-imports"],queryParams:{videoId:a}}};case Pl.TO_IMPORT_FAILED:{let T="Nie uda\u0142o si\u0119 importowa\u0107 filmu z zewn\u0105trz \u2013 nie b\u0119dzie on dost\u0119pny.";return{title:"Importowanie nieudane",manageMain:"Tw\xF3j film z zewn\u0105trz nie m\xF3g\u0142 zosta\u0107 zaimportowany.",manageSecondary:"",watchMain:T,watchSecondary:"",routerLink:{text:"Przejrzyj sw\xF3j import",link:["/my-library/video-imports"],queryParams:{videoId:a}}};}case Pl.TO_MOVE_TO_FILE_SYSTEM:return{title:"Przenoszenie plik\xF3w wideo",manageMain:c,manageSecondary:l,watchMain:u,watchSecondary:"Film jest przenoszony do systemu plik\xF3w."};case Pl.TO_MOVE_TO_FILE_SYSTEM_FAILED:{let T="Nie uda\u0142o si\u0119 przenie\u015B\u0107 plik\xF3w wideo do systemu plik\xF3w platformy.";return{title:"Nie uda\u0142o si\u0119 przenie\u015B\u0107 plik\xF3w wideo",manageMain:T,manageSecondary:m,watchMain:u,watchSecondary:T};}case Pl.TO_MOVE_TO_EXTERNAL_STORAGE:return{title:"Przenoszenie plik\xF3w wideo",manageMain:c,manageSecondary:l,watchMain:u,watchSecondary:"Ten film jest przenoszony do zewn\u0119trznego dysku."};case Pl.TO_MOVE_TO_EXTERNAL_STORAGE_FAILED:{let T="Nie uda\u0142o si\u0119 przenie\u015B\u0107 plik\xF3w wideo do zewn\u0119trznego dysku.";return{title:"Nie uda\u0142o si\u0119 przenie\u015B\u0107 plik\xF3w wideo",manageMain:T,manageSecondary:m,watchMain:u,watchSecondary:T};}case Pl.TO_EDIT:return{title:"Edycja filmu jeszcze trwa",manageMain:c,manageSecondary:l,watchMain:u,watchSecondary:""};case Pl.TRANSCODING_FAILED:return{title:"Transkodowanie zako\u0144czone niepowodzeniem",manageMain:"Transkodowanie filmu zako\u0144czy\u0142o si\u0119 niepowodzeniem",manageSecondary:m,watchMain:u,watchSecondary:""};default:return o;}}buildErr(r){let{videoId:a,blacklisted:o,blacklistedReason:c}=r,l=`${a}-${o}-${Qwe(c)}`;return this.errCacheKey===l&&this.errCacheResult?this.errCacheResult:(this.errCacheResult=this._buildErr(r),this.errCacheKey=l,this.errCacheResult);}_buildErr(r){let{blacklisted:a,blacklistedReason:o}=r;if(a)return{title:"Zablokowany film",main:o||"Tw\xF3j film zosta\u0142 zablokowany przez platform\u0119"};}static ɵfac=function(a){return new(a||e)();};static ɵprov=S$1({token:e,factory:e.ɵfac});}return e;})();var O=e=>typeof e.id=="string"&&typeof e.from=="number"&&typeof e.to=="number"&&typeof e.text=="string",I=e=>!e||/^\s*$/.test(e),E={ID:"ID",TIME_LINE:"TIME_LINE",TEXT:"TEXT",MULTI_LINE_TEXT:"MULTI_LINE_TEXT",FIN_ENTRY:"FIN_ENTRY",FINISH:"FINISH"},h=e=>{let t=e.split(":"),r,a,o;return t.length===2?[a,o]=t:[r,a,o]=t,parseInt(o.replace(",",""),10)+parseInt(a,10)*60*1e3+(r?parseInt(r,10):0)*60*60*1e3;},S=()=>({start(e){let t=E.ID,r={tokens:e.split(/\n/),pos:0,result:[],current:{}};for(;t!==E.FINISH;){let a=this[t](r);r=a.params,t=a.next;}return r.result;},[E.ID](e){let{tokens:t,pos:r,current:a}=e;if(t.length<=r)return{next:E.FINISH,params:e};if(I(t[r]))return{next:E.ID,params:E$1(D$1({},e),{pos:r+1})};let o=t[r].includes("-->");return a.id=o?"":t[r],{next:E.TIME_LINE,params:E$1(D$1({},e),{current:a,tokens:t,pos:o?r:r+1})};},[E.TIME_LINE](e){let{tokens:t,pos:r,current:a}=e,o=t[r],[c,l]=o.split("-->");return a.from=h(c),a.to=h(l),{next:E.TEXT,params:E$1(D$1({},e),{current:a,pos:r+1})};},[E.TEXT](e){let{tokens:t,pos:r,current:a}=e;return t.length<=r?{next:E.FINISH,params:e}:(a.text=t[r],{next:E.MULTI_LINE_TEXT,params:E$1(D$1({},e),{current:a,pos:r+1})});},[E.MULTI_LINE_TEXT](e){let{tokens:t,pos:r,current:a}=e;return t.length<=r||I(t[r])?{next:E.FIN_ENTRY,params:e}:(a.text=`${a.text}
${t[r]}`,{next:E.MULTI_LINE_TEXT,params:E$1(D$1({},e),{current:a,pos:r+1})});},[E.FIN_ENTRY](e){let{pos:t,current:r,result:a}=e;if(O(r))a.push(r);else throw new Error(`Parsing error current not complete ${JSON.stringify(r)}`);return{next:E.ID,params:E$1(D$1({},e),{current:{},pos:t+1})};},[E.FINISH](e){return{next:E.FINISH,params:e};}}),L=e=>({entries:S().start(e)}),n={HEADER:"HEADER",ID:"ID",TIME_LINE:"TIME_LINE",ID_OR_NOTE_OR_STYLE_OR_REGION:"ID_OR_NOTE_OR_STYLE_OR_REGION",STYLE:"STYLE",NOTE:"NOTE",REGION:"REGION",LEGACY_HEADER:"LEGACY_HEADER",TEXT:"TEXT",MULTI_LINE_TEXT:"MULTI_LINE_TEXT",FIN_ENTRY:"FIN_ENTRY",FINISH:"FINISH"},R=e=>{let t=e.split(":"),r,a,o;return t.length===2?[a,o]=t:[r,a,o]=t,parseInt(o.replace(".",""),10)+parseInt(a,10)*60*1e3+(r?parseInt(r,10):0)*60*60*1e3;},g=()=>({start(e){let t=n.HEADER,r={tokens:e.split(/\n/),pos:0,result:[],current:{}};for(;t!==n.FINISH;){let a=this[t](r);r=a.params,t=a.next;}return r.result;},[n.HEADER](e){return{next:n.LEGACY_HEADER,params:E$1(D$1({},e),{pos:e.pos+1})};},[n.LEGACY_HEADER](e){let{tokens:t,pos:r}=e;return t.length<=r?{next:n.FINISH,params:e}:t[r].includes(":")&&!t[r].includes("-->")?{next:n.LEGACY_HEADER,params:E$1(D$1({},e),{pos:r+1})}:{next:n.ID_OR_NOTE_OR_STYLE_OR_REGION,params:e};},[n.ID_OR_NOTE_OR_STYLE_OR_REGION](e){let{tokens:t,pos:r}=e;return t.length<=r?{next:n.FINISH,params:e}:I(t[r])?{next:n.ID_OR_NOTE_OR_STYLE_OR_REGION,params:E$1(D$1({},e),{pos:r+1})}:t[r].toUpperCase().includes("NOTE")?{next:n.NOTE,params:e}:t[r].toUpperCase().includes("STYLE")?{next:n.STYLE,params:e}:t[r].toUpperCase().includes("REGION")?{next:n.REGION,params:e}:{next:n.ID,params:e};},[n.STYLE](e){let{tokens:t,pos:r}=e;return I(t[r])?{next:n.ID_OR_NOTE_OR_STYLE_OR_REGION,params:E$1(D$1({},e),{pos:r+1})}:{next:n.STYLE,params:E$1(D$1({},e),{pos:r+1})};},[n.NOTE](e){let{tokens:t,pos:r}=e;return I(t[r])?{next:n.ID_OR_NOTE_OR_STYLE_OR_REGION,params:E$1(D$1({},e),{pos:r+1})}:{next:n.STYLE,params:E$1(D$1({},e),{pos:r+1})};},[n.REGION](e){let{tokens:t,pos:r}=e;return I(t[r])?{next:n.ID_OR_NOTE_OR_STYLE_OR_REGION,params:E$1(D$1({},e),{pos:r+1})}:{next:n.REGION,params:E$1(D$1({},e),{pos:r+1})};},[n.ID](e){let{tokens:t,pos:r,current:a}=e;if(t.length<=r)return{next:n.FINISH,params:e};if(I(t[r]))return{next:n.ID,params:E$1(D$1({},e),{pos:r+1})};let o=t[r].includes("-->");return a.id=o?"":t[r],{next:n.TIME_LINE,params:E$1(D$1({},e),{current:a,tokens:t,pos:o?r:r+1})};},[n.TIME_LINE](e){let{tokens:t,pos:r,current:a}=e,o=t[r],[c,l]=o.split("-->");return a.from=R(c),a.to=R(l),{next:n.TEXT,params:E$1(D$1({},e),{current:a,pos:r+1})};},[n.TEXT](e){let{tokens:t,pos:r,current:a}=e;return t.length<=r?{next:n.FINISH,params:e}:(a.text=t[r],{next:n.MULTI_LINE_TEXT,params:E$1(D$1({},e),{current:a,pos:r+1})});},[n.MULTI_LINE_TEXT](e){let{tokens:t,pos:r,current:a}=e;return t.length<=r||I(t[r])?{next:n.FIN_ENTRY,params:e}:(a.text=`${a.text}
${t[r]}`,{next:n.MULTI_LINE_TEXT,params:E$1(D$1({},e),{current:a,pos:r+1})});},[n.FIN_ENTRY](e){let{pos:t,current:r,result:a}=e;if(O(r))a.push(r);else throw new Error(`Parsing error current not complete ${JSON.stringify(r)}`);return{next:n.ID_OR_NOTE_OR_STYLE_OR_REGION,params:E$1(D$1({},e),{current:{},pos:t+1})};},[n.FINISH](e){return{next:n.FINISH,params:e};}}),y=e=>({entries:g().start(e)}),D=e=>e.startsWith("WEBVTT")?y(e):L(e);var Y=(()=>{class e{transform(r){let a=Math.floor(r/3600),o=Math.floor(r%3600/60),c=r%60;if(a>0){let l=""+a+" godz.";return o!==0&&(l+=" "+(""+o+" min.")),c!==0&&(l+=" "+(""+c+" sek.")),l;}if(o>0){let l=""+o+" min.";return c!==0&&(l+=" "+(""+c+" sek.")),l;}return""+c+" sek. ";}static ɵfac=function(a){return new(a||e)();};static ɵpipe=oi({name:"myTimeDurationFormatter",type:e,pure:true});}return e;})();/**i18n:c8855ca17fb20171aa9dd43d012e42547cb1f0cfd9c21d4dc05679bbbdf5ccb8*/export{D,M,Y};//# sourceMappingURL=chunk-BPqeabYP.js.map