1import{f as g}from"./chunk-HEX2VLO6.js";import{f as v,i as S,m as d}from"./chunk-Z2DB4BHG.js";import{a as u}from"./chunk-7ALBCXC7.js";import{w as l,y as f}from"./chunk-KLT57EFM.js";import{oa as p,sa as a}from"./chunk-P43IKVHK.js";var b=(()=>{class o{constructor(e,i){this.http=e,this.fireStore=i}getToken(){return this.fireStore.getToken()}read(){return this.http.get("/Alerts")}add(e){let i=new l({"Content-Type":"application/json"});return this.http.post("/Alerts",e,{headers:i})}delete(e){let i=new l({"Content-Type":"application/json"});return this.http.post("/Alerts/delete?AlertID="+e,{},{headers:i})}static{this.\u0275fac=function(i){return new(i||o)(a(f),a(v))}}static{this.\u0275prov=p({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();var T=(()=>{class o{constructor(e,i,n,s,r){this.alertServ=e,this.shiriumServ=i,this.appSrv=n,this.notifySrv=s,this.socialLoginServ=r,this.downloadFterLoginQueue=[],this.socialLoginServ.startSessionEvent.subscribe(c=>{if(c&&this.downloadFterLoginQueue.length){let t=this.downloadFterLoginQueue[0];this.downloadShirium(t.lectureId,t.sourceId,t.isSponsored,!0),this.downloadFterLoginQueue=[]}})}downloadShirium(e,i,n,s=!1){if(this.alertServ.getToken()){let r=null,c=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!s&&c&&(r=window.open("","_blank")),!n&&+i==1?this.shiriumServ.getDownloadStatus(+e,+i).subscribe({next:t=>{t&&t.startsWith("//")&&(t=t.replace("//","https://")),t&&i&&(t.includes("http")?this.submitDownloadForm(r,t):this.notifySrv.showNotification({Warning:t}))},error:t=>{console.error(t)}}):this.shiriumServ.getDownloadStatus(+e,+i).subscribe({next:t=>{t&&t.startsWith("//")&&(t="https://"+t.slice(2)),t&&i&&(t.includes("http")?this.submitDownloadForm(r,t):this.notifySrv.showNotification({Warning:t}))},error:t=>{console.error(t)}})}else{this.appSrv.openAuthDialog();let r=document.getElementsByClassName("media-player-container")[0];r&&r.classList.remove("active"),this.downloadFterLoginQueue.push({lectureId:e,sourceId:i,isSponsored:n});return}}submitDownloadForm(e,i){let n=e?e.document:document,s=n.createElement("form");s.method="GET";let r=i.split("?");s.action=r[0],r.length>1&&r[1].split("&").forEach(c=>{let[t,m]=c.split("="),h=n.createElement("input");h.type="hidden",h.name=decodeURIComponent(t),h.value=m?decodeURIComponent(m):"",s.appendChild(h)}),n.body.appendChild(s),s.submit(),e||n.body.removeChild(s)}static{this.\u0275fac=function(i){return new(i||o)(a(b),a(g),a(d),a(u),a(S))}}static{this.\u0275prov=p({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();export{b as a,T as b};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.