import{Na as O,Y as N,qe as p}from"./chunk-W6R7I2TH.js";import{a as s,b as i,i as m}from"./chunk-PTJGHD3V.js";var M=(()=>{let r=class r{cacheKey;cacheResult;buildWarn(n,o){let l=`${n}-${o}`;return this.cacheKey===l&&this.cacheResult?this.cacheResult:(this.cacheResult=this._buildWarn(n,o),this.cacheKey=l,this.cacheResult);}_buildWarn(n,o){let l="Your video file is being processed.",E="This can take a while and some features may not be available until it is complete.",I="Contact your administrator to fix it.",u="Your web browser may not be able to play it.";switch(o){case p.PUBLISHED:case p.LIVE_ENDED:case p.WAITING_FOR_LIVE:return;case p.TO_TRANSCODE:return{title:"Transcoding in progress",manageMain:l,manageSecondary:E,watchMain:u,watchSecondary:""};case p.TO_IMPORT:return{title:"Import in progress",manageMain:"Your remote video is being imported.",manageSecondary:E,watchMain:"The remote video is being imported, it will be available when the import is complete.",watchSecondary:"",routerLink:{text:"Review your import",link:["/my-library/video-imports"],queryParams:{search:`videoId:${n}`}}};case p.TO_IMPORT_FAILED:{let _="The remote video failed to import, it will not be available.";return{title:"Import failed",manageMain:"Your remote video failed to import.",manageSecondary:"",watchMain:_,watchSecondary:"",routerLink:{text:"Review your import",link:["/my-library/video-imports"],queryParams:{search:`videoId:${n}`}}};}case p.TO_MOVE_TO_FILE_SYSTEM:return{title:"Moving video files",manageMain:l,manageSecondary:E,watchMain:u,watchSecondary:"The video is being moved to the file system."};case p.TO_MOVE_TO_FILE_SYSTEM_FAILED:{let _="Failed to move video files to the platform file system.";return{title:"Failed to move video files",manageMain:_,manageSecondary:I,watchMain:u,watchSecondary:_};}case p.TO_MOVE_TO_EXTERNAL_STORAGE:return{title:"Moving video files",manageMain:l,manageSecondary:E,watchMain:u,watchSecondary:"The video is being moved to an external storage."};case p.TO_MOVE_TO_EXTERNAL_STORAGE_FAILED:{let _="Failed to move video files to an external storage.";return{title:"Failed to move video files",manageMain:_,manageSecondary:I,watchMain:u,watchSecondary:_};}case p.TO_EDIT:return{title:"Studio edition in progress",manageMain:l,manageSecondary:E,watchMain:u,watchSecondary:""};case p.TRANSCODING_FAILED:return{title:"Falha na transcodifica\xE7\xE3o",manageMain:"Failure during transcoding of your video files",manageSecondary:I,watchMain:u,watchSecondary:""};default:return o;}}};m(r,"\u0275fac",function(o){return new(o||r)();}),m(r,"\u0275prov",N({token:r,factory:r.ɵfac}));let e=r;return e;})();var h=e=>typeof e.id=="string"&&typeof e.from=="number"&&typeof e.to=="number"&&typeof e.text=="string",T=e=>!e||/^\s*$/.test(e),c={ID:"ID",TIME_LINE:"TIME_LINE",TEXT:"TEXT",MULTI_LINE_TEXT:"MULTI_LINE_TEXT",FIN_ENTRY:"FIN_ENTRY",FINISH:"FINISH"},d=e=>{let r=e.split(":"),t,n,o;return r.length===2?[n,o]=r:[t,n,o]=r,parseInt(o.replace(",",""),10)+parseInt(n,10)*60*1e3+(t?parseInt(t,10):0)*60*60*1e3;},S=()=>({start(e){let r=c.ID,t={tokens:e.split(/\n/),pos:0,result:[],current:{}};for(;r!==c.FINISH;){let n=this[r](t);t=n.params,r=n.next;}return t.result;},[c.ID](e){let{tokens:r,pos:t,current:n}=e;if(r.length<=t)return{next:c.FINISH,params:e};if(T(r[t]))return{next:c.ID,params:i(s({},e),{pos:t+1})};let o=r[t].includes("-->");return n.id=o?"":r[t],{next:c.TIME_LINE,params:i(s({},e),{current:n,tokens:r,pos:o?t:t+1})};},[c.TIME_LINE](e){let{tokens:r,pos:t,current:n}=e,o=r[t],[l,E]=o.split("-->");return n.from=d(l),n.to=d(E),{next:c.TEXT,params:i(s({},e),{current:n,pos:t+1})};},[c.TEXT](e){let{tokens:r,pos:t,current:n}=e;return r.length<=t?{next:c.FINISH,params:e}:(n.text=r[t],{next:c.MULTI_LINE_TEXT,params:i(s({},e),{current:n,pos:t+1})});},[c.MULTI_LINE_TEXT](e){let{tokens:r,pos:t,current:n}=e;return r.length<=t||T(r[t])?{next:c.FIN_ENTRY,params:e}:(n.text=`${n.text}
${r[t]}`,{next:c.MULTI_LINE_TEXT,params:i(s({},e),{current:n,pos:t+1})});},[c.FIN_ENTRY](e){let{pos:r,current:t,result:n}=e;if(h(t))n.push(t);else throw new Error(`Parsing error current not complete ${JSON.stringify(t)}`);return{next:c.ID,params:i(s({},e),{current:{},pos:r+1})};},[c.FINISH](e){return{next:c.FINISH,params:e};}}),f=e=>({entries:S().start(e)}),a={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 r=e.split(":"),t,n,o;return r.length===2?[n,o]=r:[t,n,o]=r,parseInt(o.replace(".",""),10)+parseInt(n,10)*60*1e3+(t?parseInt(t,10):0)*60*60*1e3;},x=()=>({start(e){let r=a.HEADER,t={tokens:e.split(/\n/),pos:0,result:[],current:{}};for(;r!==a.FINISH;){let n=this[r](t);t=n.params,r=n.next;}return t.result;},[a.HEADER](e){return{next:a.LEGACY_HEADER,params:i(s({},e),{pos:e.pos+1})};},[a.LEGACY_HEADER](e){let{tokens:r,pos:t}=e;return r.length<=t?{next:a.FINISH,params:e}:r[t].includes(":")&&!r[t].includes("-->")?{next:a.LEGACY_HEADER,params:i(s({},e),{pos:t+1})}:{next:a.ID_OR_NOTE_OR_STYLE_OR_REGION,params:e};},[a.ID_OR_NOTE_OR_STYLE_OR_REGION](e){let{tokens:r,pos:t}=e;return r.length<=t?{next:a.FINISH,params:e}:T(r[t])?{next:a.ID_OR_NOTE_OR_STYLE_OR_REGION,params:i(s({},e),{pos:t+1})}:r[t].toUpperCase().includes("NOTE")?{next:a.NOTE,params:e}:r[t].toUpperCase().includes("STYLE")?{next:a.STYLE,params:e}:r[t].toUpperCase().includes("REGION")?{next:a.REGION,params:e}:{next:a.ID,params:e};},[a.STYLE](e){let{tokens:r,pos:t}=e;return T(r[t])?{next:a.ID_OR_NOTE_OR_STYLE_OR_REGION,params:i(s({},e),{pos:t+1})}:{next:a.STYLE,params:i(s({},e),{pos:t+1})};},[a.NOTE](e){let{tokens:r,pos:t}=e;return T(r[t])?{next:a.ID_OR_NOTE_OR_STYLE_OR_REGION,params:i(s({},e),{pos:t+1})}:{next:a.STYLE,params:i(s({},e),{pos:t+1})};},[a.REGION](e){let{tokens:r,pos:t}=e;return T(r[t])?{next:a.ID_OR_NOTE_OR_STYLE_OR_REGION,params:i(s({},e),{pos:t+1})}:{next:a.REGION,params:i(s({},e),{pos:t+1})};},[a.ID](e){let{tokens:r,pos:t,current:n}=e;if(r.length<=t)return{next:a.FINISH,params:e};if(T(r[t]))return{next:a.ID,params:i(s({},e),{pos:t+1})};let o=r[t].includes("-->");return n.id=o?"":r[t],{next:a.TIME_LINE,params:i(s({},e),{current:n,tokens:r,pos:o?t:t+1})};},[a.TIME_LINE](e){let{tokens:r,pos:t,current:n}=e,o=r[t],[l,E]=o.split("-->");return n.from=R(l),n.to=R(E),{next:a.TEXT,params:i(s({},e),{current:n,pos:t+1})};},[a.TEXT](e){let{tokens:r,pos:t,current:n}=e;return r.length<=t?{next:a.FINISH,params:e}:(n.text=r[t],{next:a.MULTI_LINE_TEXT,params:i(s({},e),{current:n,pos:t+1})});},[a.MULTI_LINE_TEXT](e){let{tokens:r,pos:t,current:n}=e;return r.length<=t||T(r[t])?{next:a.FIN_ENTRY,params:e}:(n.text=`${n.text}
${r[t]}`,{next:a.MULTI_LINE_TEXT,params:i(s({},e),{current:n,pos:t+1})});},[a.FIN_ENTRY](e){let{pos:r,current:t,result:n}=e;if(h(t))n.push(t);else throw new Error(`Parsing error current not complete ${JSON.stringify(t)}`);return{next:a.ID_OR_NOTE_OR_STYLE_OR_REGION,params:i(s({},e),{current:{},pos:r+1})};},[a.FINISH](e){return{next:a.FINISH,params:e};}}),g=e=>({entries:x().start(e)}),F=e=>e.startsWith("WEBVTT")?g(e):f(e);var z=(()=>{let r=class r{transform(n){let o=Math.floor(n/3600),l=Math.floor(n%3600/60),E=n%60;if(o>0){let I=""+o+"o";return l!==0&&(I+=" "+(""+l+"min")),E!==0&&(I+=" "+(""+E+"seg")),I;}if(l>0){let I=""+l+"min";return E!==0&&(I+=` ${E}sec`),I;}return""+E+"segundo ";}};m(r,"\u0275fac",function(o){return new(o||r)();}),m(r,"\u0275pipe",O({name:"myTimeDurationFormatter",type:r,pure:!0}));let e=r;return e;})();export{M as a,F as b,z as c};/**i18n:90f1dd82a779b57eddc91ef20913c88eecaa9632bba8ac04ad50f47ae2b82df7*///# sourceMappingURL=chunk-ELQAKHRN.js.map