1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b9f5aa98-40d8-51d0-b2ce-61cb941961a0")}catch(e){}}(); 3import{a as j}from"./chunk-ZNUNMZFW.js";import{a as Q}from"./chunk-EK5ZBAE3.js";import{a as M}from"./chunk-3VYBMKPN.js";import{a as y,c as N}from"./chunk-ZDD4SSOU.js";import{a as O}from"./chunk-VURTDJFK.js";import{a as D}from"./chunk-FFQKLXM3.js";import{b as W}from"./chunk-YVUYRCAN.js";import{a as R}from"./chunk-47OVVS4W.js";import{a as q}from"./chunk-SQHZDWWP.js";import{a as x}from"./chunk-P3KXSEK4.js";import{a as U}from"./chunk-7YUR2SVM.js";import{b as C}from"./chunk-4FC5T6ZK.js";import{a as E}from"./chunk-WKWFG6OV.js";import{A}from"./chunk-RJ2UG3RJ.js";import{a as g}from"./chunk-B3Z3NAS4.js";import{n as $}from"./chunk-TGFFJGSM.js";import{e as B}from"./chunk-FPZ453VA.js";import{a as P}from"./chunk-JSRFQSGR.js";import{g as L}from"./chunk-ERBHIP22.js";import{a as T,b as I}from"./chunk-3Y7FMX6W.js";import{a as d}from"./chunk-BBW6WW7Z.js";import{b as w}from"./chunk-WLEWPZ6N.js";import{s as k}from"./chunk-OFQRR3BE.js";import{d as c,r as p}from"./chunk-NWCZTZ2F.js";import{A as _,f as b,g as o,ha as s,p as n,pa as S,u as f,ua as r}from"./chunk-5U7LGHIW.js";import{j as e}from"./chunk-EKFLB6J2.js";var ke=(()=>{let l=class l{constructor(){e(this,"repo",r(p));e(this,"bannerService",r(M));e(this,"appState",r(P));e(this,"clubAggregatorService",r(E));e(this,"quoteAggrigatorService",r(O));e(this,"reviewsAggrigatorService",r(U));e(this,"bookListAggrigatorService",r(R));e(this,"publisherAggrigator",r(Q));e(this,"postAggService",r(x));e(this,"utils",r(A));e(this,"_dialog",r(B));e(this,"likesService",r(q));e(this,"_bottomSheet",r(L));e(this,"router",r(k));e(this,"statisticsService",r(y));e(this,"snackbarService",r(I));e(this,"viewTrackerService",r(N));e(this,"userStateService",r($));e(this,"currentUser");e(this,"_loadingBanner",!0);e(this,"_loadingReview",!0);e(this,"_loadingPost",!0);e(this,"_loadingList",!0);e(this,"_loadingQuote",!0);e(this,"_loadingNewBook",!0);e(this,"_loadingPublisher",!0);e(this,"_loadingClub",!0);e(this,"_showResultSearch",new o(!1));e(this,"_banners$",new o([]));e(this,"_reviews$",new o([]));e(this,"_bookList$",new o([]));e(this,"_posts$",new o([]));e(this,"_quotes$",new o([]));e(this,"_clubs$",new o([]));e(this,"_newBooks$",new o([]));e(this,"_activePublisher$",new o([]));e(this,"_onTransitionDone$",new b);e(this,"environment",d);e(this,"newBookListId",this.environment.production?"5d365533-6493-4f81-bf17-4e308264da30":"970b259b-fd11-4717-88cb-c6e76e9d0962");this.repo.IsInBrowser&&(this.currentUser=this.userStateService.userDataSnapshot)}get onTransitionDone$(){return this._onTransitionDone$.asObservable()}get banners$(){return this._banners$.asObservable()}get reviews$(){return this._reviews$.asObservable()}get bookList$(){return this._bookList$.asObservable()}get posts$(){return this._posts$.asObservable()}get quotes$(){return this._quotes$.asObservable()}get clubs$(){return this._clubs$.asObservable()}get newBooks$(){return this._newBooks$.asObservable()}get activePublisher$(){return this._activePublisher$.asObservable()}get categories$(){return this.appState.categories$.pipe(f(t=>t==null?void 0:t.filter(i=>i.parentId===j)))}loadInitialPageData(){return _({bookList:this._bookList$.value.length<1?this.getSuggestedBookLists():n(null),reviews:this._reviews$.value.length<1?this.getSuggestedReviews():n(null),clubs:this._clubs$.value.length<1?this.getSuggestedClubs():n(null),posts:this._posts$.value.length<1?this.getSuggestedPosts():n(null),quotes:this._quotes$.value.length<1?this.getSuggestedQuotes():n(null),newBooks:this._newBooks$.value.length<1?this.getNewBooks():n(null),activePublishers:this._activePublisher$.value.length<1?this.getActivePublisher():n(null)})}getSuggestedReviews(){this._loadingReview=!0;let t=new g(0,15);return this.reviewsAggrigatorService.getChosenReviewsWithUserLiked(t).pipe(s(i=>{this._loadingReview=!1,i.hasError?this._reviews$.next([]):this._reviews$.next(i.result.items)}))}getSuggestedClubs(){this._loadingClub=!0;let t=new C(0,15);return this.clubAggregatorService.getChosenClubsWithState(t).pipe(s(i=>{this._loadingClub=!1,i.hasError?this._clubs$.next([]):this._clubs$.next(i.result.items)}))}getSuggestedPosts(){this._loadingPost=!0;let t=new g(0,15);return this.postAggService.getChosenBookListsWithUserLiked(t).pipe(s(i=>{this._loadingPost=!1,i.hasError?this._posts$.next([]):this._posts$.next(i.result.items)}))}getSuggestedQuotes(){this._loadingQuote=!0;let t=new g(0,15);return this.quoteAggrigatorService.getChosenQuotesWithUserLiked(t).pipe(s(i=>{this._loadingQuote=!1,i.hasError?this._quotes$.next([]):this._quotes$.next(i.result.items)}))}getSuggestedBookLists(){this._loadingList=!0;let t=new g(0,15);return this.bookListAggrigatorService.getChosenBookListsWithUserLiked(t).pipe(s(i=>{this._loadingList=!1,i.hasError?this._bookList$.next([]):this._bookList$.next(i.result.items)}))}getNewBooks(){this._loadingNewBook=!0;let t=new g(0,15);return this.bookListAggrigatorService.getBooksOfBooklist(this.newBookListId,t).pipe(s(i=>{i.hasError?this._newBooks$.next([]):this._newBooks$.next(i.result.items)}),s(()=>this._loadingNewBook=!1))}getActivePublisher(){return this._loadingPublisher=!0,this.publisherAggrigator.getActivePublishers().pipe(s(t=>{var i;t!=null&&t.hasError?(this._loadingPublisher=!1,this._activePublisher$.next([])):(this._loadingPublisher=!1,this._activePublisher$.next((i=t==null?void 0:t.result)==null?void 0:i.items))}))}likeItem(t){var i,u;return!((i=this.currentUser)!=null&&i.uniqeName)&&!((u=this.currentUser)!=null&&u.firstName)?(this.utils.opensigninDialog(this._dialog,"/",this.repo),n(null)):this.likesService.createLike(t,this.currentUser.id||"").pipe(s(a=>{var m,v;a!=null&&a.hasError&&((v=(m=a==null?void 0:a.apiError)==null?void 0:m.code)!=null?v:a==null?void 0:a.error)!=="RESTRICTED_USER"&&(t.userLiked=!1,this._dialog.open(D,{panelClass:"restrict-message-dialog",data:t}))}))}openUsersDialog(t){this.utils.peopleLiked(t,this._bottomSheet,this._dialog,this.repo,W)}navigateToCategoryBooks(t){this.router.navigate([w.category],{queryParams:{id:t.id}})}openBannerTab(t){return this.repo.IsInBrowser?this.statisticsService.redirectToLink(t).pipe(s(i=>{if(i.hasError){this.snackbarService.openSnackbar(T.error,"\u0639\u0645\u0644\u06CC\u0627\u062A \u0628\u0627 \u062E\u0637\u0627 \u0645\u0648\u0627\u062C\u0647 \u0634\u062F");return}let u=i.result;window.open(u,"_blank")})):n(null)}setScrollPosition(t){this.repo.IsInBrowser&&this.repo.setLocalItem(c,t.toString())}getScrollPosition(){var t;return this.repo.IsInBrowser&&(t=parseInt(this.repo.getLocalItem(c),10))!=null?t:null}get Repository(){return p.Instance}get viewTracker(){return this.viewTrackerService}scrollToTop(){this.repo.IsInBrowser&&window.scrollTo(0,0)}runSetTimeout(){this._onTransitionDone$.next()}};e(l,"\u0275fac",function(i){return new(i||l)}),e(l,"\u0275prov",S({token:l,factory:l.\u0275fac,providedIn:"root"}));let h=l;return h})();export{ke as a}; 4 5//# debugId=b9f5aa98-40d8-51d0-b2ce-61cb941961a0
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.