1"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([["src_app_components_article-overview_article-overview_component_ts-src_app_service_audio-servi-b19c4d0","src_app_components_article-overview_article-overview_component_ts-src_app_service_audio-servi-b19c4d1"],{26407(f,m,o){o.d(m,{x:()=>T});var p=o(89204),g=o(20948),_=o(58222),h=o(59510),l=o(47030),v=o(34966),y=o(45312),e=o(36124),c=o(23123),a=o(61811),O=o(79748),C=o(33486),P=o(68914),M=o(21901);const A=i=>({vSActive:i}),E=i=>({"background-image":i}),S=i=>({"fav-active":i});function D(i,s){1&i&&e.nrm(0,"img",15)}function b(i,s){if(1&i&&(e.j41(0,"div",16),e.EFF(1),e.nI1(2,"textPreview"),e.k0s()),2&i){const r=e.XpG();e.R7$(),e.SpI(" ",e.i5U(2,1,r.story,75)," ")}}function I(i,s){if(1&i&&(e.j41(0,"div",16),e.EFF(1),e.nI1(2,"textPreview"),e.k0s()),2&i){const r=e.XpG();e.R7$(),e.SpI(" ",e.i5U(2,1,r.story,50)," ")}}function w(i,s){if(1&i&&(e.j41(0,"span",17),e.EFF(1),e.nI1(2,"customDate"),e.k0s()),2&i){const r=e.XpG();e.R7$(),e.JRh(e.ii3(2,1,null==r.story?null:r.story.schedule,"d MMMM y","UTC",r.languageService.target))}}function R(i,s){1&i&&(e.j41(0,"div",18),e.nrm(1,"ion-icon",19),e.k0s())}function U(i,s){1&i&&e.nrm(0,"ion-icon",20)}function k(i,s){1&i&&e.nrm(0,"ion-icon",21)}let T=(()=>{var i;class s{constructor(t,n,d,u,F,x){this.languageService=t,this.purchaseService=n,this.storyService=d,this.navController=u,this.storageService=F,this.utilService=x,this.vSActive=!1,this.excludeDate=!1,this.environment=y.c,this.isFav=!1,this.isLearned=!1,this.showDate=!0,this.hasPodcast=!1}ngOnChanges(){this.initData()}ngOnInit(){this.initData()}showArticle(t){try{this.storyService.storyPreloaded=this.story,this.storyService.articleId=t,this.navController.navigateForward("article/".concat(t))}catch(n){this.utilService.logErrorOnServer(n)}}toggleFav(t){this.story.isFav?(this.storageService.removeFavorite(t),this.story.isFav=!this.story.isFav,this.storyService.updateArticleFavorites(this.story,!1)):(this.storageService.addFavorite(t),this.story.isFav=!this.story.isFav,this.storyService.updateArticleFavorites(this.story,!0))}checkIfStoryLearned(){this.story.isLearned=!!this.storageService.learnedStories.includes(this.story._id)}initData(){var t=this;return(0,p.A)(function*(){t.story&&((new Date(t.story.schedule)<new Date("2024-01-01T08:00:00")||t.excludeDate)&&(t.showDate=!1),t.story.isFav=t.storageService.checkFavorite(t.story._id),t.checkIfStoryLearned(),t.storageService.unlockedStoryByReviewChanges.subscribe(n=>{n===t.story._id&&(t.story.free=!0)}),t.storageService.unlockedStoryByShareChanges.subscribe(n=>{n===t.story._id&&(t.story.free=!0)}),((yield t.storageService.getUnlockedStoryByReview())===t.story._id||(yield t.storageService.getUnlockedStoryByShare())===t.story._id||(yield t.storageService.getUnlockedStoryByFree())===t.story._id)&&(t.story.free=!0),t.storageService.learnedStoriesChanged.subscribe(n=>{n.id===t.story._id&&n.added&&(t.story.isLearned=!0),n.id===t.story._id&&!n.added&&(t.story.isLearned=!1)}),t.hasPodcast=void 0!==t.storyService.getPodcast(t.story,t.languageService.target))})()}}return(i=s).\u0275fac=function(t){return new(t||i)(e.rXU(g.g),e.rXU(_.zZ),e.rXU(h.J),e.rXU(a.q9),e.rXU(l.n),e.rXU(v.T))},i.\u0275cmp=e.VBU({type:i,selectors:[["app-article-overview"]],inputs:{story:"story",vSActive:"vSActive",excludeDate:"excludeDate"},standalone:!1,features:[e.OA$],decls:19,vars:23,consts:[[1,"single-element",3,"ngClass"],[1,"single-element-main",3,"click"],[1,"single-element-image",3,"ngStyle"],["class","lock-icon","src","../../../assets/icon/icon-lock.svg","alt","",4,"ngIf"],[1,"single-element-body"],[1,"single-element-title"],["class","text-block",4,"ngIf"],[1,"single-element-header-categorie",3,"click"],[1,"single-element-level",3,"ngClass"],["class","single-element-date",4,"ngIf"],[1,"controll-btns"],["class","learned-btn learned-btn-active",4,"ngIf"],[1,"fav-btn",3,"click","ngClass"],["name","heart",4,"ngIf"],["name","heart","class","heart-selected",4,"ngIf"],["src","../../../assets/icon/icon-lock.svg","alt","",1,"lock-icon"],[1,"text-block"],[1,"single-element-date"],[1,"learned-btn","learned-btn-active"],["name","checkmark-circle"],["name","heart"],["name","heart",1,"heart-selected"]],template:function(t,n){1&t&&(e.j41(0,"div",0)(1,"div",1),e.bIt("click",function(){return n.showArticle(null==n.story?null:n.story._id)}),e.j41(2,"div",2),e.DNE(3,D,1,0,"img",3),e.k0s(),e.j41(4,"div",4)(5,"div",5),e.EFF(6),e.nI1(7,"storyTitle"),e.k0s(),e.DNE(8,b,3,4,"div",6)(9,I,3,4,"div",6),e.j41(10,"div",7),e.bIt("click",function(){return n.showArticle(null==n.story?null:n.story._id)}
1),e.j41(11,"div",8),e.EFF(12),e.k0s(),e.DNE(13,w,3,6,"span",9),e.j41(14,"div",10),e.DNE(15,R,2,0,"div",11),e.j41(16,"div",12),e.bIt("click",function(u){return u.preventDefault(),u.stopPropagation(),n.toggleFav(null==n.story?null:n.story._id)}),e.DNE(17,U,1,0,"ion-icon",13)(18,k,1,0,"ion-icon",14),e.k0s()()()()()()),2&t&&(e.Y8G("ngClass",e.eq3(17,A,n.vSActive)),e.R7$(2),e.Y8G("ngStyle",e.eq3(19,E,null!=n.story&&null!=n.story.picture&&n.story.picture.mediumLarge?"url("+n.environment.aws.imageUrl+n.story.picture.mediumLarge+")":"none")),e.R7$(),e.Y8G("ngIf",!(null!=n.story&&n.story.free||n.purchaseService.userPremium)),e.R7$(3),e.SpI(" ",e.brH(7,13,n.story,"target",!0)," "),e.R7$(2),e.Y8G("ngIf",!("zh-hans"===n.languageService.origin||"ja"===n.languageService.origin)),e.R7$(),e.Y8G("ngIf","zh-hans"===n.languageService.origin||"ja"===n.languageService.origin),e.R7$(2),e.Y8G("ngClass",null==n.story?null:n.story.level),e.R7$(),e.JRh(null==n.story?null:n.story.level),e.R7$(),e.Y8G("ngIf",n.showDate),e.R7$(2),e.Y8G("ngIf",null==n.story?null:n.story.isLearned),e.R7$(),e.Y8G("ngClass",e.eq3(21,S,null==n.story?null:n.story.isFav)),e.R7$(),e.Y8G("ngIf",!(null!=n.story&&n.story.isFav)),e.R7$(),e.Y8G("ngIf",null==n.story?null:n.story.isFav))},dependencies:[O.YU,O.bT,O.B3,c.iq,C.i,P.a,M.g],styles:[".single-element[_ngcontent-%COMP%]{margin:0 var(--ion-lg-spacing) var(--ion-sm-spacing) var(--ion-lg-spacing);color:var(--readle-font-color-main)}.single-element[_ngcontent-%COMP%] .single-element-main[_ngcontent-%COMP%]{display:flex}@media only screen and (min-width:768px){.single-element[_ngcontent-%COMP%] .single-element-main[_ngcontent-%COMP%]{height:calc(310px - 15vw);cursor:pointer}}@media only screen and (min-width:768px)and (min-width:1200px){.single-element[_ngcontent-%COMP%] .single-element-main[_ngcontent-%COMP%]{height:calc(290px - 10vw);min-height:130px}}.single-element[_ngcontent-%COMP%] .single-element-main[_ngcontent-%COMP%] .single-element-body[_ngcontent-%COMP%]{padding:8px 8px var(--ion-xs-spacing) 8px;background-color:var(--ion-color-secondary-contrast);border-radius:0 16px 16px 0;width:100%;display:flex;flex-direction:column;justify-content:space-between;background-color:var(--card-background)}.single-element[_ngcontent-%COMP%] .single-element-main[_ngcontent-%COMP%] .single-element-body[_ngcontent-%COMP%] .single-element-header-categorie[_ngcontent-%COMP%]{font-size:13px;color:var(--readle-font-color-light)}.single-element[_ngcontent-%COMP%] .single-element-main[_ngcontent-%COMP%] .single-element-body[_ngcontent-%COMP%] .single-element-header-categorie[_ngcontent-%COMP%] .single-element-date[_ngcontent-%COMP%]{color:var(--readle-font-color-light)}.single-element[_ngcontent-%COMP%] .single-element-main[_ngcontent-%COMP%] .single-element-body[_ngcontent-%COMP%] .single-element-header-categorie[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{color:#e7e4e7}.single-element[_ngcontent-%COMP%] .single-element-main[_ngcontent-%COMP%] .single-element-body[_ngcontent-%COMP%] .single-element-header-categorie[_ngcontent-%COMP%] ion-icon.heart-selected[_ngcontent-%COMP%]{color:var(--ion-color-primary)}.single-element[_ngcontent-%COMP%] .single-element-main[_ngcontent-%COMP%] .single-element-body[_ngcontent-%COMP%] .single-element-title[_ngcontent-%COMP%]{font-size:15px;font-weight:400;color:var(--readle-font-color-main)}.single-element[_ngcontent-%COMP%] .single-element-main[_ngcontent-%COMP%] .single-element-body[_ngcontent-%COMP%] .single-element-title[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{margin-right:var(--ion-sm-spacing)}.single-element[_ngcontent-%COMP%] .single-element-main[_ngcontent-%COMP%] .single-element-image[_ngcontent-%COMP%]{min-height:60px;min-width:90px;max-width:90px;border-radius:16px 0 0 16px;background-size:cover;background-position:center;position:relative}.text-block[_ngcontent-%COMP%]{margin:10px 0;font-size:11px;color:var(--readle-font-color-light)}.single-element-header-title[_ngcontent-%COMP%]{font-size:14px;margin-bottom:var(--ion-xs-spacing)}.single-element-text[_ngcontent-%COMP%]{font-size:13px;color:var(--readle-font-color-light);margin-bottom:var(--ion-xs-spacing);margin-top:3px;max-height:55px;overflow:hidden}.single-element-level[_ngcontent-%COMP%]{background-color:var(--ion-color-primary);border-radius:5px;color:#fff;display:inline-block;padding:3px var(--ion-xs-spacing);font-size:13px;margin-right:var(--ion-sm-spacing);font-family:var(--font-semibold);color:#353535!important}.border-bottom[_ngcontent-%COMP%]{border-bottom:1px solid var(--readle-divider-color)}.margin-bottom[_ngcontent-%COMP%]{margin-bottom:var(--ion-lg-spacing)}.controll-btns[_ngcontent-%COMP%]{float:right}.fav-btn[_ngcontent-%COMP%]{display:inline-block;vertical-align:middle}.fav-btn[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:20px;color:gray}.fav-active[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{color:var(--ion-color-danger)}.learned-btn[_ngcontent-%COMP%]{display:inline-block;vertical-align:middle}.learned-btn[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:20px;color:gray}.learned-btn-active[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:20px;color:var(--ion-color-primary)!important}.lock-icon[_ngcontent-%COMP%]{position:absolute;bottom:8px;left:8px;width:20px;height:20px}"]}),s})()},12232(f,m,o){o.d(m,{J:()=>h});var p=o(58222),g=o(45312),_=o(66563);let h=(()=>{var l;class v{constructor(e){this.purchaseService=e,this.currentAudio=new Audio,this.audioActive=!1,this.audioFiles=new Map,this.audioArray=[],this.podcastRepeat=!1}initNewAudio(e,c,a={}){this.destroyCurrentAudio(),this.currentAudio=new Audio,this.currentAudio.src="".concat(g.c.aws.audioUrl).concat(e,"?bucket=").concat(this.purchaseService.serverRegion),this.currentAudio.onended=null==a?void 0:a.onEnded,this.currentAudio.onerror=null==a?void 0:a.onError,c&&this.currentAudio.play()}getAudioUrl(e){return"".concat(g.c.aws.audioUrl).concat(e,"?bucket=").concat(this.purchaseService.serverRegion)}setAudioSpeed(e){this.currentAudio&&(this.currentAudio.playbackRate=e)}destroyCurrentAudio(){var e;null===(e=this.currentAudio)||void 0===e||e.pause(),this.currentAudio=null}play(){var e,c;null===(e=this.currentAudio)||void 0===e||e.play(),this.audioActive=!0,null===(c=this.currentAudio)||void 0===c||c.addEventListener("ended",()=>{this.audioActive=!1})}stop(){var e;null===(e=this.currentAudio)||void 0===e||e.pause()}initAudioArray(){}destroyArticleAudio(){}}return(l=v).\u0275fac=function(e){return new(e||l)(_.KVO(p.zZ))},l.\u0275prov=_.jDH({token:l,factory:l.\u0275fac,providedIn:"root"}),v})()}}]); 2//# sourceMappingURL=src_app_components_article-overview_article-overview_component_ts-src_app_service_audio-servi-b19c4d1.b8ce793e857398d3.js.map
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.