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AY7O,KAAKwkB,eAAe3V,GAAQ,EAGlE,CACA2V,gBAAiBre,OAAM0I,YACnB,MAAM4V,EAAUte,IAAS2c,EAAsBC,KAAO/iB,KAAKge,SAAWhe,KAAKojB,YA8CnF,SAASsB,GAAaD,GAGlB,OAAOA,EAAQE,UAAYF,EAAQG,UAAUnd,OAAS,CAC1D,EAjDYid,CAAaD,IACbzkB,KAAKmjB,KAAK0B,IAAI,IAAMJ,EAAQvP,KAAKrG,GAEzC,CACAzO,cACIJ,KAAKmkB,iBACT,CACAA,kBACQnkB,KAAKskB,iBACLtkB,KAAKskB,gBAAgB9C,aAE7B,EAEJ0B,SAAwBxI,UAAI,0BAAwFwI,GAxZThR,MAwZkDA,OAxZlDA,MAwZ4EA,OAAS,EAChMgR,EAAwB4B,UAzZmF5S,MAAE,MAyZLgR,EAAuBjgB,qiBAzZpBiP,SAmVrGgR,CAAuB,KA2GvB6B,GAAoB,MAA1B,MAAMA,GAENA,SAAqBrK,UAAI,0BAAwFqK,EAAoB,EACrIA,EAAqBC,UAjcsF9S,MAAE,MAicK6S,IAClHA,EAAqBE,UAlcsF/S,MAAE,IA8bvG6S,CAAoB","names":["Destroy","Observable","constructor","super","subscriber","this","destroySubject$","subscribe","ReplaySubject","ngOnDestroy","next","complete","factory","easeOutQuad","x","CountUpDirective","count","count$","duration","duration$","elementRef","renderer","destroy$","BehaviorSubject","combineLatest","pipe","switchMap","startTime","animationFrameScheduler","interval","period","scheduler","asyncScheduler","timer","map","elapsedTime","takeWhile","progress","Math","round","endWith","values","source","concat","of","distinctUntilChanged","ngOnInit","displayCurrentCount","currentCount$","takeUntil","currentCount","setProperty","nativeElement","core","selectors","DotThousandsSeparatorModule","CommonModule","DotThousandsSeparatorPipe","DecimalPipe","transform","value","digitsInfo","locale","formattedValue","replace","t","pure","RelativeTimeModule","RelativeTimePipe","args","now","Date","date","seconds","floor","getTime","intervals","year","month","week","day","hour","minute","hasOwnProperty","result","ScriptStore","name","src","DynamicScriptLoaderService","forEach","script","scripts","loaded","load","promises","push","loadScript","Promise","all","resolve","reject","status","document","createElement","type","readyState","onreadystatechange","onload","onerror","error","getElementsByTagName","appendChild","TikTokPixelService","initTikTokPixel","window","TiktokAnalyticsObject","ttq","methods","setAndDefer","e","Array","prototype","slice","call","arguments","i","length","instance","_i","n","_u","_t","_o","o","async","a","parentNode","insertBefore","loadPixel","pixelId","trackPageView","page","trackEvent","eventName","params","track","CategoryEnum","FollowTabEnum","MonetisakuStatusEnum","RoleEnum","AcquisitionUsecase","acquisitionRepository","getAcquisitionBySlug","url","data","registerAcquisition","id","checkAcquisitionRegistrationStatus","isRegistered","getSubmittedPost","submitPost","postIds","getEligiblePost","acquisitionId","_angular_core__WEBPACK_IMPORTED_MODULE_1__","ConfigurationUsecase","categoryRepository","getCategories","getActiveGenreByCategory","code","getGenres","getGenresNonFiction","getCopyright","getAgeRestriction","setDraftConfiguration","getTopGenre","limit","item","_id","toLowerCase","EbookBookmarkUsecase","ebookBookmarkRepository","addEbookBookmark","ebookId","removeEbookBookmark","getEbookBookmarkStatus","getEbookStatus","getEbookBookmark","getListEbookBookmarkSelf","updateEbookBookmark","action","getCollection","category","MonetisakuUsecase","monetisakuRepository","applyMonetisaku","postId","getStatusMonetisaku","isHasOnProgress","getDetailLatestPendingMonetisaku","getListMonetisakuByStatus","PostModel","getDetailEnrollmentById","getMonetisakuBalance","balance","getRateFee","rate_fee","getCreatorEarningList","submitWithdrawal","amount","destinationBank","destinationAccountName","destinationAccountNumber","_angular_core__WEBPACK_IMPORTED_MODULE_2__","PaymentUsecase","paymentRepository","authenticationUsecase","getWriterRoyalty","response","getListTopUpProduct","getBalance","accessToken","tokenHelper","decodedToken","userId","getOrderDetail","orderId","acquireTopUpGateway","product","paymentMethodId","user","token","fullName","split","user_id","price","topup_price_id","email","first_name","last_name","payment_id","inquiryPaymentChannel","payload","getHistoryTopup","getUsageHistory","getCoinUsageHistory","toString","purchaseChapter","chapterId","getPaymentMethod","groupByGroupName","reduce","groups","groupName","group_name","purchaseWacaAiPackage","packageId","purchaseEbook","getHistoryPaymentEbook","checkOwnershipEbook","getListPaymentChannels","groupByCategoryName","inquiryEbook","categoryName","pay_category_name","group","find","items","inquiryChapter","_angular_core__WEBPACK_IMPORTED_MODULE_3__","ReviewUsecase","reviewRepository","getAllReview","getAllReviewByPostId","getPaginatedReview","getPaginateReviewByPostId","getMyReview","getMyReviewByPostId","submitReview","WacaAiUsecase","wacaAiRepository","getAllPrompts","getAllPackages","durationTypeMap","yearly","monthly","weekly","daily","duration_type","getRemainingQuotaAndDuration","generateWordsFromPrompt","promptId","input","sentence","ButtonProgressComponent","i0","ButtonProgressModule","MatIconModule","CardBookHorizontalModule","ChipModule","LandingFooterComponent","LandingFooterModule","LandingNavbarModule","MatButtonModule","MatMenuModule","RevampLandingNavbarComponent","router","dialog","tiktokPixel","appConfigurationService","AppRoutingConstant","RoutingConstant","events","event","NavigationEnd","currentRoute","showLoginDialog","open","LoginDialogComponent","width","panelClass","afterClosed","res","location","reload","sendWhatsApp","goToHomepage","mixpanel","content_name","content_category","content_ids","navigate","then","emitEvent","isDesktopView","_angular_core__WEBPACK_IMPORTED_MODULE_5__","ctx","RevampLandingNavbarModule","UserWacaKoinComponent","paymentUsecase","EventEmitter","isLoading","availableCoin","emit","err","errorMessage","DialogDetailBadgeComponent","dialogRef","onClose","close","_angular_core__WEBPACK_IMPORTED_MODULE_0__","MAT_DIALOG_DATA","BottomSheetPaymentComponent","inject","MatBottomSheetRef","openLink","_bottomSheetRef","dismiss","state","fromPage","preventDefault","MAT_BOTTOM_SHEET_DATA","MatListModule","_angular_material_list__WEBPACK_IMPORTED_MODULE_3__","moment","_rollupMoment__default","_rollupMoment","MAT_MOMENT_DATE_ADAPTER_OPTIONS","InjectionToken","providedIn","MAT_MOMENT_DATE_ADAPTER_OPTIONS_FACTORY","useUtc","range","valueFunction","valuesArray","MomentDateAdapter","DateAdapter","dateLocale","_options","setLocale","momentLocaleData","localeData","_localeData","firstDayOfWeek","longMonths","months","shortMonths","monthsShort","dates","createDate","format","longDaysOfWeek","weekdays","shortDaysOfWeek","weekdaysShort","narrowDaysOfWeek","weekdaysMin","getYear","clone","getMonth","getDate","getDayOfWeek","getMonthNames","style","getDateNames","getDayOfWeekNames","getYearName","getFirstDayOfWeek","getNumDaysInMonth","daysInMonth","_createMoment","isValid","today","parse","parseFormat","displayFormat","addCalendarYears","years","add","addCalendarMonths","addCalendarDays","days","toIso8601","deserialize","isDateInstance","ISO_8601","obj","isMoment","invalid","strict","utc","ɵfac","MAT_DATE_LOCALE","ɵprov","resolveContainerElement","selector","scrollWindow","defaultElement","fromRoot","hasWindow","documentElement","container","findElement","customRoot","querySelector","Error","inputPropChanged","prop","firstChange","VerticalProps","clientHeight","offsetHeight","scrollHeight","pageYOffset","offsetTop","scrollTop","top","HorizontalProps","AxisResolver","vertical","propsMap","clientHeightKey","offsetHeightKey","scrollHeightKey","pageYOffsetKey","offsetTopKey","scrollTopKey","topKey","isElementWindow","windowElement","some","Object","includes","getDocumentElement","isContainerWindow","calculatePoints","element","resolver","height","extractHeightForElement","isWindow","axis","extractHeightPropKeys","getElementHeight","calculatePointsForWindow","scrolled","getElementPageYOffset","nativeElementHeight","totalToScroll","getElementOffsetTop","elem","getBoundingClientRect","calculatePointsForElement","isNaN","docElem","ownerDocument","defaultView","shouldFireScrollEvent","distance","down","up","scrollingDown","remaining","containerBreakpoint","scrolledUntilNow","ScrollState","lastScrollPosition","lastTotalToScroll","triggered","updateScrollPosition","position","updateTotalToScroll","updateScroll","updateTriggeredFlag","scroll","isScrollingDown","isTriggeredScroll","createScroller","config","scrollContainer","createResolver","createResolverWithContainer","horizontal","scrollState","upDistance","downDistance","attachScrollEvent","options","obs","fromEvent","throttle","throttleTime","durationSelector","operate","leading","trailing","hasValue","sendValue","throttled","isComplete","endThrottling","unsubscribe","send","cleanupThrottling","startThrottle","innerFrom","createOperatorSubscriber","closed","undefined","mergeMap","positionStats","toInfiniteScrollParams","stats","scrollDown","fire","getScrollStats","isScrollingDownwards","tap","filter","shouldTriggerEvents","alwaysCallback","isTriggeredCurrentTotal","toInfiniteScrollAction","InfiniteScrollActions","DOWN","UP","currentScrollPosition","InfiniteScrollDirective","zone","scrolledUp","infiniteScrollDistance","infiniteScrollUpDistance","infiniteScrollThrottle","infiniteScrollDisabled","infiniteScrollContainer","immediateCheck","ngAfterViewInit","setup","ngOnChanges","containerChanged","disabledChanged","distanceChanged","shouldSetup","currentValue","destroyScroller","hasWindowDefined","runOutsideAngular","disposeScroller","disable","handleOnScroll","emitter","hasObservers","observed","observers","run","ɵdir","InfiniteScrollModule","ɵmod","ɵinj"],"sourceRoot":"webpack:///","sources":["./src/app/common/directive/count-up/destroy.ts","./src/app/common/directive/count-up/count-up.directive.ts","./node_modules/rxjs/dist/esm/internal/observable/interval.js","./node_modules/rxjs/dist/esm/internal/operators/endWith.js","./src/app/common/pipe/dot-thousands-separator/dot-thousands-separator.module.ts","./src/app/common/pipe/dot-thousands-separator/dot-thousands-separator.pipe.ts","./src/app/common/pipe/relative-time/relative-time.module.ts","./src/app/common/pipe/relative-time/relative-time.pipe.ts","./src/app/common/services/dynamicScriptLoader.service.ts","./src/app/common/services/tiktok-pixel.service.service.ts","./src/app/data/enum/conf_category_enum.ts","./src/app/data/enum/follow.enum.ts","./src/app/data/enum/monetisaku.enum.ts","./src/app/data/enum/user.enum.ts","./src/app/domain/usecase/acquisition.usecase.ts","./src/app/domain/usecase/configuration.usecase.ts","./src/app/domain/usecase/ebook.bookmark.usecase.ts","./src/app/domain/usecase/monetisaku.usecase.ts","./src/app/domain/usecase/payment.usecase.ts","./src/app/domain/usecase/review.usecase.ts","./src/app/domain/usecase/wacaAi.usecase.ts","./src/app/presentation/components/button-progress/button-progress.component.ts","./src/app/presentation/components/button-progress/button-progress.component.html","./src/app/presentation/components/button-progress/button-progress.module.ts","./src/app/presentation/components/card-book-horizontal/card-book-horizontal.module.ts","./src/app/presentation/components/chip/chip.module.ts","./src/app/presentation/components/landing-footer/landing-footer.component.ts","./src/app/presentation/components/landing-footer/landing-footer.component.html","./src/app/presentation/components/landing-footer/landing-footer.module.ts","./src/app/presentation/components/landing-navbar/landing-navbar.module.ts","./src/app/presentation/components/revamp-landing-navbar/revamp-landing-navbar.component.ts","./src/app/presentation/components/revamp-landing-navbar/revamp-landing-navbar.component.html","./src/app/presentation/components/revamp-landing-navbar/revamp-landing-navbar.module.ts","./src/app/presentation/components/user-waca-koin/user-waca-koin.component.html","./src/app/presentation/components/user-waca-koin/user-waca-koin.component.ts","./src/app/presentation/journey/profile/components/dialog-detail-badge/dialog-detail-badge.component.ts","./src/app/presentation/journey/profile/components/dialog-detail-badge/dialog-detail-badge.component.html","./src/app/presentation/journey/topup/components/bottom-sheet-payment/bottom-sheet-payment.component.ts","./src/app/presentation/journey/topup/components/bottom-sheet-payment/bottom-sheet-payment.component.html","./node_modules/@angular/material-moment-adapter/fesm2020/material-moment-adapter.mjs","./node_modules/ngx-infinite-scroll/fesm2020/ngx-infinite-scroll.mjs","./node_modules/rxjs/dist/esm/internal/operators/throttleTime.js","./node_modules/rxjs/dist/esm/internal/operators/throttle.js"],"sourcesContent":["import { Injectable, OnDestroy } from '@angular/core';\nimport { Observable, ReplaySubject } from 'rxjs';\n\n@Injectable()\nexport class Destroy extends Observable implements OnDestroy {\n\tprivate readonly destroySubject$ = new ReplaySubject(1);\n\n\tconstructor() {\n\t\tsuper((subscriber) => this.destroySubject$.subscribe(subscriber));\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis.destroySubject$.next();\n\t\tthis.destroySubject$.complete();\n\t}\n}\n","import { Directive, ElementRef, Input, OnInit, Renderer2 } from '@angular/core';\nimport {\n\tanimationFrameScheduler,\n\tBehaviorSubject,\n\tcombineLatest,\n\tdistinctUntilChanged,\n\tendWith,\n\tinterval,\n\tmap,\n\tswitchMap,\n\ttakeUntil,\n\ttakeWhile\n} from 'rxjs';\nimport { Destroy } from './destroy';\n\n/**\n * Quadratic Ease-Out Function: f(x) = x * (2 - x)\n */\nconst easeOutQuad = (x: number): number => x * (2 - x);\n\n@Directive({\n\tselector: '[countUp]',\n\tproviders: [Destroy]\n})\nexport class CountUpDirective implements OnInit {\n\tprivate readonly count$ = new BehaviorSubject(0);\n\tprivate readonly duration$ = new BehaviorSubject(2000);\n\n\tprivate readonly currentCount$ = combineLatest([this.count$, this.duration$]).pipe(\n\t\tswitchMap(([count, duration]) => {\n\t\t\t// get the time when animation is triggered\n\t\t\tconst startTime = animationFrameScheduler.now();\n\n\t\t\treturn interval(0, animationFrameScheduler).pipe(\n\t\t\t\t// calculate elapsed time\n\t\t\t\tmap(() => animationFrameScheduler.now() - startTime),\n\t\t\t\t// calculate progress\n\t\t\t\tmap((elapsedTime) => elapsedTime / duration),\n\t\t\t\t// complete when progress is greater than 1\n\t\t\t\ttakeWhile((progress) => progress <= 1),\n\t\t\t\t// apply quadratic ease-out\n\t\t\t\t// for faster start and slower end of counting\n\t\t\t\tmap(easeOutQuad),\n\t\t\t\t// calculate current count\n\t\t\t\tmap((progress) => Math.round(progress * count)),\n\t\t\t\t// make sure that last emitted value is count\n\t\t\t\tendWith(count),\n\t\t\t\tdistinctUntilChanged()\n\t\t\t);\n\t\t})\n\t);\n\n\t@Input('countUp')\n\tset count(count: number) {\n\t\tthis.count$.next(count);\n\t}\n\n\t@Input()\n\tset duration(duration: number) {\n\t\tthis.duration$.next(duration);\n\t}\n\n\tconstructor(\n\t\tprivate readonly elementRef: ElementRef,\n\t\tprivate readonly renderer: Renderer2,\n\t\tprivate readonly destroy$: Destroy\n\t) {}\n\n\tngOnInit(): void {\n\t\tthis.displayCurrentCount();\n\t}\n\n\tprivate displayCurrentCount(): void {\n\t\tthis.currentCount$.pipe(takeUntil(this.destroy$)).subscribe((currentCount) => {\n\t\t\tthis.renderer.setProperty(this.elementRef.nativeElement, 'innerHTML', currentCount);\n\t\t});\n\t}\n}\n","import { asyncScheduler } from '../scheduler/async';\nimport { timer } from './timer';\nexport function interval(period = 0, scheduler = asyncScheduler) {\n if (period < 0) {\n period = 0;\n }\n return timer(period, period, scheduler);\n}\n","import { concat } from '../observable/concat';\nimport { of } from '../observable/of';\nexport function endWith(...values) {\n return (source) => concat(source, of(...values));\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { DotThousandsSeparatorPipe } from './dot-thousands-separator.pipe';\n\n@NgModule({\n\tdeclarations: [DotThousandsSeparatorPipe],\n\timports: [CommonModule],\n\texports: [DotThousandsSeparatorPipe]\n})\nexport class DotThousandsSeparatorModule {}\n","import { DecimalPipe } from '@angular/common';\nimport { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n\tname: 'dotThousandsSeparator'\n})\nexport class DotThousandsSeparatorPipe extends DecimalPipe implements PipeTransform {\n\t// @ts-ignore\n\ttransform(value: any, digitsInfo?: string, locale?: string): string | null {\n\t\tconst formattedValue = super.transform(value, digitsInfo, locale);\n\t\tif (formattedValue) {\n\t\t\treturn formattedValue.replace(/,/g, '.');\n\t\t}\n\t\treturn null;\n\t}\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RelativeTimePipe } from './relative-time.pipe';\n\n@NgModule({\n\tdeclarations: [RelativeTimePipe],\n\timports: [CommonModule],\n\texports: [RelativeTimePipe]\n})\nexport class RelativeTimeModule {}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n\tname: 'relativeTime'\n})\nexport class RelativeTimePipe implements PipeTransform {\n\ttransform(value: any, ...args: unknown[]): string {\n\t\tif (value) {\n\t\t\tconst now = new Date();\n\t\t\tconst date = new Date(value);\n\t\t\tconst seconds = Math.floor((now.getTime() - date.getTime()) / 1000);\n\n\t\t\tconst intervals: { [key: string]: number } = {\n\t\t\t\tyear: seconds / (60 * 60 * 24 * 30 * 12),\n\t\t\t\tmonth: seconds / (60 * 60 * 24 * 30),\n\t\t\t\tweek: seconds / (60 * 60 * 24 * 7),\n\t\t\t\tday: seconds / (60 * 60 * 24),\n\t\t\t\thour: seconds / (60 * 60),\n\t\t\t\tminute: seconds / 60\n\t\t\t};\n\n\t\t\tfor (const interval in intervals) {\n\t\t\t\tif (intervals.hasOwnProperty(interval)) {\n\t\t\t\t\tconst result = Math.floor(intervals[interval]);\n\t\t\t\t\tif (result > 1) {\n\t\t\t\t\t\treturn `${result} ${interval}s ago`;\n\t\t\t\t\t} else if (result === 1) {\n\t\t\t\t\t\treturn `${result} ${interval} ago`;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn 'Just now';\n\t\t}\n\t\treturn '';\n\t}\n}\n","import { Injectable } from '@angular/core';\n\ninterface Scripts {\n\tname: string;\n\tsrc: string;\n}\n\nexport const ScriptStore: Scripts[] = [\n\t{\n\t\tname: 'midtrans',\n\t\tsrc: 'https://app.midtrans.com/snap/snap.js'\n\t}\n];\n\ndeclare var document: any;\n\n@Injectable()\nexport class DynamicScriptLoaderService {\n\tprivate scripts: any = {};\n\n\tconstructor() {\n\t\tScriptStore.forEach((script: any) => {\n\t\t\tthis.scripts[script.name] = {\n\t\t\t\tloaded: false,\n\t\t\t\tsrc: script.src\n\t\t\t};\n\t\t});\n\t}\n\n\tload(...scripts: string[]) {\n\t\tconst promises: any[] = [];\n\t\tscripts.forEach((script) => promises.push(this.loadScript(script)));\n\t\treturn Promise.all(promises);\n\t}\n\n\tloadScript(name: string) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tif (!this.scripts[name].loaded) {\n\t\t\t\t// load script\n\t\t\t\tconst script = document.createElement('script');\n\t\t\t\tscript.type = 'text/javascript';\n\t\t\t\tscript.src = this.scripts[name].src;\n\t\t\t\tif (name === 'midtrans') {\n\t\t\t\t\tscript['data-client-key'] = 'Mid-client-15EGq_5W44o060nS';\n\t\t\t\t}\n\t\t\t\tif (script.readyState) {\n\t\t\t\t\t// IE\n\t\t\t\t\tscript.onreadystatechange = () => {\n\t\t\t\t\t\tif (script.readyState === 'loaded' || script.readyState === 'complete') {\n\t\t\t\t\t\t\tscript.onreadystatechange = null;\n\t\t\t\t\t\t\tthis.scripts[name].loaded = true;\n\t\t\t\t\t\t\tresolve({ script: name, loaded: true, status: 'Loaded' });\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t} else {\n\t\t\t\t\t// Others\n\t\t\t\t\tscript.onload = () => {\n\t\t\t\t\t\tthis.scripts[name].loaded = true;\n\t\t\t\t\t\tresolve({ script: name, loaded: true, status: 'Loaded' });\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tscript.onerror = (error: any) =>\n\t\t\t\t\tresolve({ script: name, loaded: false, status: 'Loaded' });\n\t\t\t\tdocument.getElementsByTagName('head')[0].appendChild(script);\n\t\t\t} else {\n\t\t\t\tresolve({ script: name, loaded: true, status: 'Already Loaded' });\n\t\t\t}\n\t\t});\n\t}\n}\n","// src/app/tiktok-pixel.service.ts\nimport { Injectable } from '@angular/core';\n\ndeclare var window: any;\n\n@Injectable({\n\tprovidedIn: 'root'\n})\nexport class TikTokPixelService {\n\tconstructor() {\n\t\tthis.initTikTokPixel();\n\t}\n\n\tprivate initTikTokPixel() {\n\t\twindow.TiktokAnalyticsObject = 'ttq';\n\t\tconst ttq = (window['ttq'] = window['ttq'] || []);\n\t\tttq.methods = [\n\t\t\t'page',\n\t\t\t'track',\n\t\t\t'identify',\n\t\t\t'instances',\n\t\t\t'debug',\n\t\t\t'on',\n\t\t\t'off',\n\t\t\t'once',\n\t\t\t'ready',\n\t\t\t'alias',\n\t\t\t'group',\n\t\t\t'enableCookie',\n\t\t\t'disableCookie'\n\t\t];\n\t\tttq.setAndDefer = function (t: any, e: any) {\n\t\t\tt[e] = function () {\n\t\t\t\tt.push([e].concat(Array.prototype.slice.call(arguments, 0)));\n\t\t\t};\n\t\t};\n\t\tfor (var i = 0; i < ttq.methods.length; i++) {\n\t\t\tttq.setAndDefer(ttq, ttq.methods[i]);\n\t\t}\n\t\tttq.instance = function (t: any) {\n\t\t\tvar e = ttq._i[t] || [];\n\t\t\tfor (var n = 0; n < ttq.methods.length; n++) {\n\t\t\t\tttq.setAndDefer(e, ttq.methods[n]);\n\t\t\t}\n\t\t\treturn e;\n\t\t};\n\t\tttq.load = function (e: any, n: any) {\n\t\t\tvar i = 'https://analytics.tiktok.com/i18n/pixel/events.js';\n\t\t\tttq._i = ttq._i || {};\n\t\t\tttq._i[e] = [];\n\t\t\tttq._i[e]._u = i;\n\t\t\tttq._t = ttq._t || {};\n\t\t\tttq._t[e] = +new Date();\n\t\t\tttq._o = ttq._o || {};\n\t\t\tttq._o[e] = n || {};\n\t\t\tvar o = document.createElement('script');\n\t\t\to.type = 'text/javascript';\n\t\t\to.async = true;\n\t\t\to.src = i + '?sdkid=' + e + '&lib=ttq';\n\t\t\tvar a = document.getElementsByTagName('script')[0];\n\t\t\t// @ts-ignore\n\t\t\ta.parentNode.insertBefore(o, a);\n\t\t};\n\t}\n\n\tloadPixel(pixelId: string) {\n\t\twindow['ttq'].load(pixelId);\n\t}\n\n\ttrackPageView() {\n\t\twindow['ttq'].page();\n\t}\n\n\ttrackEvent(eventName: string, params?: object) {\n\t\twindow['ttq'].track(eventName, params);\n\t}\n}\n","export enum CategoryEnum {\n\tSHORT_STORY = 'SHORT_STORY',\n\tNOVEL = 'NOVEL',\n\tPOEM = 'POEM'\n}\n","export enum FollowTabEnum {\n\tFOLLOWING = 'Following',\n\tFOLLOWERS = 'Followers'\n}\n","export enum MonetisakuStatusEnum {\n\tPENDING = 'PENDING',\n\tAPPROVED = 'APPROVED',\n\tREJECTED = 'REJECTED'\n}\n","export enum RoleEnum {\n\tPUBLISHER = 'PUBLISHER',\n\tWRITER = 'WRITER'\n}\n","import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { IAcquisitionDetail } from '../../data/interface/acquisition.interface';\nimport { AcquisitionRepository } from '@domain/repositories/acquisition.repository';\n\n@Injectable({\n\tprovidedIn: 'root'\n})\nexport class AcquisitionUsecase {\n\tconstructor(private acquisitionRepository: AcquisitionRepository) {}\n\n\tgetAcquisitionBySlug(url: string): Observable {\n\t\treturn this.acquisitionRepository.getAcquisitionBySlug(url).pipe(\n\t\t\tmap((result: any) => {\n\t\t\t\tif (result.data) {\n\t\t\t\t\treturn result.data;\n\t\t\t\t} else {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\t}\n\n\tregisterAcquisition(params: object, id: string): Observable {\n\t\treturn this.acquisitionRepository.registerAcquisition(params, id).pipe(\n\t\t\tmap((result: any) => {\n\t\t\t\tif (result) {\n\t\t\t\t\treturn result;\n\t\t\t\t} else {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\t}\n\n\tcheckAcquisitionRegistrationStatus(id: string): Observable {\n\t\treturn this.acquisitionRepository.checkAcquisitionRegistrationStatus(id).pipe(\n\t\t\tmap((result: any) => {\n\t\t\t\treturn result.data.isRegistered;\n\t\t\t})\n\t\t);\n\t}\n\n\tgetSubmittedPost(id: string): Observable {\n\t\treturn this.acquisitionRepository.getSubmittedPost(id).pipe(\n\t\t\tmap((result: any) => {\n\t\t\t\treturn result.data;\n\t\t\t})\n\t\t);\n\t}\n\n\tsubmitPost(id: string, postIds: string[]): Observable {\n\t\treturn this.acquisitionRepository.submitPost(id, postIds).pipe(\n\t\t\tmap((result: any) => {\n\t\t\t\treturn result.data;\n\t\t\t})\n\t\t);\n\t}\n\n\tgetEligiblePost(acquisitionId: string): Observable {\n\t\treturn this.acquisitionRepository.getEligiblePost(acquisitionId).pipe(\n\t\t\tmap((result: any) => {\n\t\t\t\treturn result.data;\n\t\t\t})\n\t\t);\n\t}\n}\n","import { Injectable } from '@angular/core';\nimport { CategoryModel } from '@data/models/category-model';\nimport { Observable } from 'rxjs';\nimport { ConfigurationRepository } from '../repositories/configuration.repository';\n\nimport { GenreModel } from '@data/models/genre-model';\nimport { CopyrightModel } from '@data/models/copyright-model';\nimport { AgeModel } from '@data/models/age-model';\nimport { map } from 'rxjs/operators';\nimport { GenreSummaryModel } from '@data/models/genre-summary.model';\n\n@Injectable({\n\tprovidedIn: 'root'\n})\nexport class ConfigurationUsecase {\n\tconstructor(private categoryRepository: ConfigurationRepository) {}\n\n\tgetCategories(): Observable {\n\t\treturn this.categoryRepository.getCategories().pipe(\n\t\t\tmap((result: any) => {\n\t\t\t\tif (result.data) {\n\t\t\t\t\treturn result.data;\n\t\t\t\t} else {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\t}\n\n\tgetActiveGenreByCategory(code: string): Observable {\n\t\treturn this.categoryRepository.getActiveGenreByCategory(code).pipe(\n\t\t\tmap((result: any) => {\n\t\t\t\tif (result.data) {\n\t\t\t\t\treturn result.data;\n\t\t\t\t} else {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\t}\n\n\tgetGenres(): Observable {\n\t\treturn this.categoryRepository.getGenres().pipe(\n\t\t\tmap((result: any) => {\n\t\t\t\tif (result.data) {\n\t\t\t\t\treturn result.data;\n\t\t\t\t} else {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\t}\n\n\tgetGenresNonFiction(): Observable {\n\t\treturn this.categoryRepository.getGenresNonFiction().pipe(\n\t\t\tmap((result: any) => {\n\t\t\t\tif (result.data) {\n\t\t\t\t\treturn result.data;\n\t\t\t\t} else {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\t}\n\n\tgetCopyright(): Observable {\n\t\treturn this.categoryRepository.getCopyright().pipe(\n\t\t\tmap((result: any) => {\n\t\t\t\tif (result.data) {\n\t\t\t\t\treturn result.data;\n\t\t\t\t} else {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\t}\n\n\tgetAgeRestriction(): Observable {\n\t\treturn this.categoryRepository.getAgeRestriction().pipe(\n\t\t\tmap((result: any) => {\n\t\t\t\tif (result.data) {\n\t\t\t\t\treturn result.data;\n\t\t\t\t} else {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\t}\n\n\tsetDraftConfiguration(params: any): Observable {\n\t\treturn this.categoryRepository.setDraftConfiguration(params).pipe(\n\t\t\tmap((result: any) => {\n\t\t\t\tif (result.data) {\n\t\t\t\t\treturn result.data;\n\t\t\t\t} else {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\t}\n\n\tgetTopGenre(limit: number): Observable {\n\t\treturn this.categoryRepository.getTopGenre(limit).pipe(\n\t\t\tmap((result: any) => {\n\t\t\t\tif (result.data) {\n\t\t\t\t\treturn result.data.map((item: any) =>\n\t\t\t\t\t\titem._id.replace(/_/g, ' ').toLowerCase()\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\t}\n}\n","import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { EbookBookmarkRepository } from '../repositories/ebook.bookmark.repository';\nimport { CollectionCategoryEnum } from '@data/enum/ebook.bookmark.enum';\n\n@Injectable({\n\tprovidedIn: 'root'\n})\nexport class EbookBookmarkUsecase {\n\tuser: any;\n\n\tconstructor(private ebookBookmarkRepository: EbookBookmarkRepository) {}\n\n\taddEbookBookmark(ebookId: string): Observable {\n\t\tconst payload = { ebookId };\n\t\treturn this.ebookBookmarkRepository.addEbookBookmark(payload);\n\t}\n\n\tremoveEbookBookmark(ebookId: string): Observable {\n\t\tconst payload = { ebookId };\n\t\treturn this.ebookBookmarkRepository.removeEbookBookmark(payload);\n\t}\n\n\tgetEbookBookmarkStatus(ebookId: string): Observable {\n\t\treturn this.ebookBookmarkRepository.getEbookStatus(ebookId).pipe(\n\t\t\tmap((result: any) => {\n\t\t\t\tif (result.data) {\n\t\t\t\t\treturn result.data;\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\t}\n\n\tgetEbookBookmark(): Observable {\n\t\treturn this.ebookBookmarkRepository.getListEbookBookmarkSelf().pipe(\n\t\t\tmap((result: any) => {\n\t\t\t\tif (result.data) {\n\t\t\t\t\treturn result.data;\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\t}\n\n\tupdateEbookBookmark(action: string, ebookId: string): Observable {\n\t\treturn this.ebookBookmarkRepository.updateEbookBookmark(action, ebookId);\n\t}\n\n\tgetCollection(category: CollectionCategoryEnum): Observable {\n\t\treturn this.ebookBookmarkRepository.getCollection(category).pipe(\n\t\t\tmap((result: any) => {\n\t\t\t\tif (result.data) {\n\t\t\t\t\treturn result.data;\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\t}\n}\n","import { Injectable } from '@angular/core';\nimport { MonetisakuRepository } from '../repositories/monetisaku.repository';\nimport { map } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport { PostModel } from '@data/models/post.model';\nimport { MonetisakuStatusEnum } from '@data/enum/monetisaku.enum';\nimport {\n\tIGetCreatorEarningsListItem,\n\tIMonetisakuEnrollmentListItem\n} from '@data/interface/monetisaku.interface';\n\n@Injectable({\n\tprovidedIn: 'root'\n})\nexport class MonetisakuUsecase {\n\tconstructor(private monetisakuRepository: MonetisakuRepository) {}\n\n\tapplyMonetisaku(postId: string): Observable {\n\t\treturn this.monetisakuRepository.applyMonetisaku(postId).pipe(map(() => true));\n\t}\n\n\tgetStatusMonetisaku(): Observable {\n\t\treturn this.monetisakuRepository.getStatusMonetisaku().pipe(\n\t\t\tmap((result) => {\n\t\t\t\treturn result.data.isHasOnProgress;\n\t\t\t})\n\t\t);\n\t}\n\n\tgetDetailLatestPendingMonetisaku(): Observable {\n\t\treturn this.monetisakuRepository.getDetailLatestPendingMonetisaku().pipe(\n\t\t\tmap((result) => {\n\t\t\t\tif (result) {\n\t\t\t\t\treturn result.data;\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\t}\n\n\tgetListMonetisakuByStatus(status: MonetisakuStatusEnum): Observable {\n\t\treturn this.monetisakuRepository.getListMonetisakuByStatus(status).pipe(\n\t\t\tmap((result) => {\n\t\t\t\tif (result.data) {\n\t\t\t\t\tconst data: IMonetisakuEnrollmentListItem[] = result.data;\n\t\t\t\t\treturn data.map((item) => PostModel.fromMonetisakuEnrollmentListItem(item));\n\t\t\t\t} else {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\t}\n\n\tgetDetailEnrollmentById(id: string): Observable {\n\t\treturn this.monetisakuRepository\n\t\t\t.getDetailEnrollmentById(id)\n\t\t\t.pipe(map((result) => result.data));\n\t}\n\n\tgetMonetisakuBalance(): Observable {\n\t\treturn this.monetisakuRepository.getMonetisakuBalance().pipe(\n\t\t\tmap((result) => {\n\t\t\t\tif (result.data) {\n\t\t\t\t\treturn result.data.balance;\n\t\t\t\t} else {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\t}\n\n\tgetRateFee(): Observable {\n\t\treturn this.monetisakuRepository.getRateFee().pipe(\n\t\t\tmap((result: any) => {\n\t\t\t\tif (result.data) {\n\t\t\t\t\treturn result.data.rate_fee;\n\t\t\t\t} else {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\t}\n\n\tgetCreatorEarningList(): Observable {\n\t\treturn this.monetisakuRepository.getCreatorEarningList().pipe(\n\t\t\tmap((result: any) => {\n\t\t\t\tif (result.data) {\n\t\t\t\t\treturn result.data;\n\t\t\t\t} else {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\t}\n\n\tsubmitWithdrawal(\n\t\tamount: number,\n\t\tdestinationBank: string,\n\t\tdestinationAccountName: string,\n\t\tdestinationAccountNumber: string\n\t): Observable {\n\t\tconst payload = {\n\t\t\tamount,\n\t\t\tdestinationBank,\n\t\t\tdestinationAccountName,\n\t\t\tdestinationAccountNumber\n\t\t};\n\t\treturn this.monetisakuRepository.submitWithdrawal(payload).pipe(map(() => true));\n\t}\n}\n","import { Injectable } from '@angular/core';\nimport { PaymentRepository } from '@domain/repositories/payment.repository';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport {\n\tIBalance,\n\tICoinUsageHistoryItem,\n\tIGroupedPaymentChannelMethod,\n\tIGroupedPaymentMethod,\n\tIInquiryChapterRequest,\n\tIInquiryEbookRequest,\n\tIOrderDetail,\n\tIPaymentChannelMethod,\n\tIPaymentInquiryRequest,\n\tIPaymentMethod,\n\tITopUpProduct\n} from '@data/interface/payment.interface';\nimport tokenHelper from '../../common/tokenHelper';\nimport { AuthenticationUsecase } from '@domain/usecase/authentication.usecase';\nimport { ProfileModel } from '@data/models/profile.model';\nimport { IRoyalty } from '@data/interface/monetisaku.interface';\n\n@Injectable({\n\tprovidedIn: 'root'\n})\nexport class PaymentUsecase {\n\tconstructor(\n\t\tprivate paymentRepository: PaymentRepository,\n\t\tprivate authenticationUsecase: AuthenticationUsecase\n\t) { }\n\n\tgetWriterRoyalty(): Observable {\n\t\treturn this.paymentRepository.getWriterRoyalty().pipe(\n\t\t\tmap((response: any) => {\n\t\t\t\treturn response.data;\n\t\t\t})\n\t\t);\n\t}\n\n\tgetListTopUpProduct(): Observable {\n\t\treturn this.paymentRepository.getListTopUpProduct().pipe(\n\t\t\tmap((response: any) => {\n\t\t\t\treturn response.data;\n\t\t\t})\n\t\t);\n\t}\n\n\tgetBalance(): Observable {\n\t\tconst accessToken = tokenHelper.getAccessToken();\n\t\tconst decodedToken = tokenHelper.decodeToken(accessToken || '');\n\t\treturn this.paymentRepository.getBalance(decodedToken.userId).pipe(\n\t\t\tmap((response: any) => {\n\t\t\t\treturn response.data;\n\t\t\t})\n\t\t);\n\t}\n\n\tgetOrderDetail(orderId: string): Observable {\n\t\treturn this.paymentRepository.getOrderDetail(orderId).pipe(\n\t\t\tmap((response: any) => {\n\t\t\t\treturn response.data;\n\t\t\t})\n\t\t);\n\t}\n\n\tacquireTopUpGateway(\n\t\tproduct: ITopUpProduct,\n\t\tpaymentMethodId: number,\n\t\tuser: ProfileModel\n\t): Observable {\n\t\tconst token = tokenHelper.getAccessToken();\n\t\tconst decodedToken = tokenHelper.decodeToken(token || '');\n\t\tconst fullName = user.fullName.split(' ');\n\t\tconst firstName = fullName ? fullName[0] : '';\n\t\tconst lastName = fullName && fullName[1] ? fullName[1] : '-';\n\n\t\tconst payload = {\n\t\t\tuser_id: decodedToken.userId,\n\t\t\tprice: product.price,\n\t\t\ttopup_price_id: product.id,\n\t\t\temail: decodedToken.email,\n\t\t\tfirst_name: firstName,\n\t\t\tlast_name: lastName,\n\t\t\tpayment_id: paymentMethodId\n\t\t};\n\t\treturn this.paymentRepository.acquireTopUpGateway(payload).pipe(\n\t\t\tmap((response: any) => {\n\t\t\t\treturn response.data;\n\t\t\t})\n\t\t);\n\t}\n\n\tinquiryPaymentChannel(\n\t\tpayload: IPaymentInquiryRequest\n\t): Observable {\n\t\treturn this.paymentRepository.inquiryPaymentChannel(payload).pipe(\n\t\t\tmap((response: any) => {\n\t\t\t\treturn response.data;\n\t\t\t})\n\t\t);\n\t}\n\n\tgetHistoryTopup(): Observable {\n\t\tconst accessToken = tokenHelper.getAccessToken();\n\t\tconst decodedToken = tokenHelper.decodeToken(accessToken || '');\n\t\treturn this.paymentRepository.getHistoryTopup(decodedToken.userId, '100', '1').pipe(\n\t\t\tmap((response: any) => {\n\t\t\t\treturn response.data;\n\t\t\t})\n\t\t);\n\t}\n\n\tgetUsageHistory(page: number): Observable {\n\t\tconst limit = 25;\n\n\t\tconst accessToken = tokenHelper.getAccessToken();\n\t\tconst decodedToken = tokenHelper.decodeToken(accessToken || '');\n\t\treturn this.paymentRepository\n\t\t\t.getCoinUsageHistory(decodedToken.userId, limit.toString(), page.toString())\n\t\t\t.pipe(\n\t\t\t\tmap((response: any) => {\n\t\t\t\t\treturn response.data;\n\t\t\t\t})\n\t\t\t);\n\t}\n\n\tpurchaseChapter(chapterId: string): Observable {\n\t\treturn this.paymentRepository.purchaseChapter(chapterId).pipe(\n\t\t\tmap((response: any) => {\n\t\t\t\treturn response.data;\n\t\t\t})\n\t\t);\n\t}\n\n\tgetPaymentMethod(): Observable {\n\t\treturn this.paymentRepository.getPaymentMethod().pipe(\n\t\t\tmap((response: any) => {\n\t\t\t\tconst data: IPaymentMethod[] = response.data;\n\t\t\t\treturn this.groupByGroupName(data);\n\t\t\t})\n\t\t);\n\t}\n\n\tgroupByGroupName(data: IPaymentMethod[]): IGroupedPaymentMethod {\n\t\treturn data.reduce((groups, item) => {\n\t\t\tconst groupName = item.group_name;\n\t\t\tif (!groups[groupName]) {\n\t\t\t\tgroups[groupName] = [];\n\t\t\t}\n\t\t\tgroups[groupName].push(item);\n\t\t\treturn groups;\n\t\t}, {} as IGroupedPaymentMethod);\n\t}\n\n\tpurchaseWacaAiPackage(packageId: string): Observable {\n\t\treturn this.paymentRepository.purchaseWacaAiPackage(packageId).pipe(\n\t\t\tmap((response: any) => {\n\t\t\t\treturn response.data;\n\t\t\t})\n\t\t);\n\t}\n\n\tpurchaseEbook(ebookId: string): Observable {\n\t\treturn this.paymentRepository.purchaseEbook(ebookId).pipe(\n\t\t\tmap((response: any) => {\n\t\t\t\treturn response.data;\n\t\t\t})\n\t\t);\n\t}\n\n\tgetHistoryPaymentEbook(): Observable {\n\t\treturn this.paymentRepository.getHistoryPaymentEbook().pipe(\n\t\t\tmap((response: any) => {\n\t\t\t\treturn response.data;\n\t\t\t})\n\t\t);\n\t}\n\n\tcheckOwnershipEbook(ebookId: string): Observable {\n\t\treturn this.paymentRepository.checkOwnershipEbook(ebookId).pipe(\n\t\t\tmap((response: any) => {\n\t\t\t\treturn response.data;\n\t\t\t})\n\t\t);\n\t}\n\n\tgetListPaymentChannels(amount:number): Observable {\n\t\treturn this.paymentRepository.getListPaymentChannels(amount).pipe(\n\t\t\tmap((response: any) => {\n\t\t\t\tconst data: IPaymentChannelMethod[] = response.data;\n\t\t\t\t// const data: IPaymentMethod[] = response.data;\n\t\t\t\t// return this.groupByGroupName(data);\n\n\t\t\t\treturn this.groupByCategoryName(data)\n\t\t\t})\n\t\t);\n\t}\n\n\tinquiryEbook(payload: IInquiryEbookRequest): Observable {\n\t\treturn this.paymentRepository.inquiryEbook(payload).pipe(\n\t\t\tmap((response: any) => {\n\t\t\t\treturn response.data;\n\t\t\t})\n\t\t);\n\t}\n\n\tgroupByCategoryName(data: IPaymentChannelMethod[]): { category: string, items: IPaymentChannelMethod[] }[] {\n\t\tconst groups: { category: string, items: IPaymentChannelMethod[] }[] = [];\n\n\t\tdata.forEach((item) => {\n\t\t\tconst categoryName = item.pay_category_name;\n\t\t\tlet group = groups.find((group) => group.category === categoryName);\n\t\t\tif (!group) {\n\t\t\t\tgroup = { category: categoryName, items: [] };\n\t\t\t\tgroups.push(group);\n\t\t\t}\n\t\t\tgroup.items.push(item);\n\t\t});\n\n\t\treturn groups; // Returns an array of objects to maintain the order\n\n\n\t}\n\n\tinquiryChapter(payload: IInquiryChapterRequest): Observable {\n\t\treturn this.paymentRepository.inquiryChapter(payload).pipe(\n\t\t\tmap((response: any) => {\n\t\t\t\treturn response.data;\n\t\t\t})\n\t\t);\n\t}\n}\n","import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { ReviewRepository } from '../repositories/review.repository';\nimport { IGetPaginateReviewResponse } from '@data/interface/review.interface';\n\n@Injectable({\n\tprovidedIn: 'root'\n})\nexport class ReviewUsecase {\n\tuser: any;\n\n\tconstructor(private reviewRepository: ReviewRepository) {}\n\n\tgetAllReview(postId: string): Observable {\n\t\treturn this.reviewRepository.getAllReviewByPostId(postId).pipe(\n\t\t\tmap((result: any) => {\n\t\t\t\tif (result.data) {\n\t\t\t\t\treturn result.data;\n\t\t\t\t} else {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\t}\n\n\tgetPaginatedReview(\n\t\tpostId: string,\n\t\tpage: number,\n\t\tlimit: number\n\t): Observable {\n\t\tconst query = {\n\t\t\tpage,\n\t\t\tlimit\n\t\t};\n\t\treturn this.reviewRepository.getPaginateReviewByPostId(postId, query).pipe(\n\t\t\tmap((result: any) => {\n\t\t\t\tif (result.data) {\n\t\t\t\t\treturn result.data;\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\t}\n\n\tgetMyReview(postId: string): Observable {\n\t\treturn this.reviewRepository.getMyReviewByPostId(postId).pipe(\n\t\t\tmap((result: any) => {\n\t\t\t\tif (result.data) {\n\t\t\t\t\treturn result.data;\n\t\t\t\t} else {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\t}\n\n\tsubmitReview(payload: object, postId: string): Observable {\n\t\treturn this.reviewRepository.submitReview(payload, postId);\n\t}\n}\n","import { WacaAiRepository } from '@domain/repositories/wacaAi.repository';\nimport { Injectable } from '@angular/core';\nimport { map, Observable } from 'rxjs';\nimport { IAiPackage, IAiPrompt } from '@data/interface/wacaAi.interface';\n\n@Injectable({\n\tprovidedIn: 'root'\n})\nexport class WacaAiUsecase {\n\tconstructor(private wacaAiRepository: WacaAiRepository) {}\n\n\tgetAllPrompts(): Observable {\n\t\treturn this.wacaAiRepository.getAllPrompts().pipe(\n\t\t\tmap((result: any) => {\n\t\t\t\treturn result.data;\n\t\t\t})\n\t\t);\n\t}\n\n\tgetAllPackages(): Observable {\n\t\tconst durationTypeMap: { [key in IAiPackage['duration_type']]: string } = {\n\t\t\tyearly: 'tahun',\n\t\t\tmonthly: 'bulan',\n\t\t\tweekly: 'minggu',\n\t\t\tdaily: 'hari'\n\t\t};\n\n\t\treturn this.wacaAiRepository.getAllPackages().pipe(\n\t\t\tmap((result: any) => {\n\t\t\t\treturn result.data.map((item: any) => ({\n\t\t\t\t\t...item,\n\t\t\t\t\tduration_type: durationTypeMap[item.duration_type]\n\t\t\t\t}));\n\t\t\t})\n\t\t);\n\t}\n\n\tgetRemainingQuotaAndDuration(): Observable<{ summary_quota: number; expired_date: Date }> {\n\t\treturn this.wacaAiRepository.getRemainingQuotaAndDuration().pipe(\n\t\t\tmap((result: any) => {\n\t\t\t\treturn result.data.data;\n\t\t\t})\n\t\t);\n\t}\n\n\tgenerateWordsFromPrompt(\n\t\tpromptId: string,\n\t\tinput: string\n\t): Observable<{\n\t\tremaining_quota: number;\n\t\tresult_recommendation: string;\n\t}> {\n\t\tconst payload = {\n\t\t\tpromptId,\n\t\t\tsentence: input\n\t\t};\n\n\t\treturn this.wacaAiRepository.generateWordsFromPrompt(payload).pipe(\n\t\t\tmap((result: any) => {\n\t\t\t\treturn result.data;\n\t\t\t})\n\t\t);\n\t}\n}\n","import { Component, OnInit } from '@angular/core';\n\n@Component({\n\tselector: 'app-button-progress',\n\ttemplateUrl: './button-progress.component.html',\n\tstyleUrls: ['./button-progress.component.scss']\n})\nexport class ButtonProgressComponent implements OnInit {\n\tconstructor() {}\n\n\tngOnInit(): void {}\n}\n","\n\t\n\tLoading...\n\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ButtonProgressComponent } from './button-progress.component';\nimport { MatIconModule } from '@angular/material/icon';\n\n@NgModule({\n\tdeclarations: [ButtonProgressComponent],\n\texports: [ButtonProgressComponent],\n\timports: [CommonModule, MatIconModule]\n})\nexport class ButtonProgressModule {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CardBookHorizontalComponent } from './card-book-horizontal.component';\n\n@NgModule({\n\tdeclarations: [CardBookHorizontalComponent],\n\texports: [CardBookHorizontalComponent],\n\timports: [CommonModule]\n})\nexport class CardBookHorizontalModule {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ChipComponent } from './chip.component';\n\n@NgModule({\n\tdeclarations: [ChipComponent],\n\texports: [ChipComponent],\n\timports: [CommonModule]\n})\nexport class ChipModule {}\n","import { Component } from '@angular/core';\n\n@Component({\n\tselector: 'app-landing-footer',\n\ttemplateUrl: './landing-footer.component.html',\n\tstyleUrls: ['./landing-footer.component.scss']\n})\nexport class LandingFooterComponent {}\n","\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { LandingFooterComponent } from './landing-footer.component';\nimport { MatIconModule } from '@angular/material/icon';\n\n@NgModule({\n\tdeclarations: [LandingFooterComponent],\n\texports: [LandingFooterComponent],\n\timports: [CommonModule, MatIconModule]\n})\nexport class LandingFooterModule {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { LandingNavbarComponent } from './landing-navbar.component';\nimport { RouterLink } from '@angular/router';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatMenuModule } from '@angular/material/menu';\n\n@NgModule({\n\tdeclarations: [LandingNavbarComponent],\n\texports: [LandingNavbarComponent],\n\timports: [CommonModule, RouterLink, MatButtonModule, MatIconModule, MatMenuModule]\n})\nexport class LandingNavbarModule {}\n","import { Component } from '@angular/core';\nimport AppRoutingConstant from '../../../app-routing.constant';\nimport { NavigationEnd, Router } from '@angular/router';\nimport { LoginDialogComponent } from '@components/login-dialog/login-dialog.component';\nimport { MatDialog } from '@angular/material/dialog';\nimport { AuthenticationUsecase } from '@domain/usecase/authentication.usecase';\nimport RoutingConstant from '../../../app-routing.constant';\nimport { TikTokPixelService } from '@common/services/tiktok-pixel.service.service';\nimport mixpanel from 'mixpanel-browser';\nimport { PixelEventProperties } from 'ngx-pixel/lib/pixel.models';\nimport { AppConfigurationService } from '../../../app-configuration.service';\n\n\n@Component({\n\tselector: 'app-revamp-landing-navbar',\n\ttemplateUrl: './revamp-landing-navbar.component.html',\n\tstyleUrls: ['./revamp-landing-navbar.component.scss']\n})\nexport class RevampLandingNavbarComponent {\n\tisNavbarCollapsed = true;\n\tprotected readonly AppRoutingConstant = AppRoutingConstant;\n\tcurrentRoute = '/';\n\tprotected readonly RoutingConstant = RoutingConstant;\n\ttiktokPixelIdMulaiBaca = 'CQRHP73C77UFGSJEFKH0';\n\ttiktokPixelIdMulaiMenulis = 'CQRIDJ3C77U53M1BLF70';\n\ttiktokPixelIdPageView = 'CQRIESBC77U5SJ4PUPU0';\n\n\n\tconstructor(\n\t\tprivate router: Router,\n\t\tprivate dialog: MatDialog,\n\t\tpublic authenticationUsecase: AuthenticationUsecase,\n\t\tprivate tiktokPixel: TikTokPixelService,\n\t\tprivate appConfigurationService: AppConfigurationService,\n\n\n\t) {\n\t\tthis.router.events.subscribe((event: any) => {\n\t\t\tif (event instanceof NavigationEnd) {\n\t\t\t\tthis.currentRoute = event.url;\n\t\t\t}\n\t\t});\n\t}\n\n\tshowLoginDialog() {\n\t\tthis.dialog\n\t\t\t.open(LoginDialogComponent, {\n\t\t\t\twidth: '400px',\n\t\t\t\tpanelClass: 'custom-dialog-container'\n\t\t\t})\n\t\t\t.afterClosed()\n\t\t\t.subscribe({\n\t\t\t\tnext: (res: any) => {\n\t\t\t\t\tif (res) {\n\t\t\t\t\t\twindow.location.reload();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t}\n\n\tsendWhatsApp() {\n\t\tconst phoneNumber = '085171207470'; // Replace with the target phone number\n\n\t\tconst whatsappUrl = `https://wa.me/${phoneNumber}`;\n\t\twindow.open(whatsappUrl, '_blank');\n\t}\n\n\tgoToHomepage() {\n\t\tmixpanel.track('Landing Page - CTA Reading Clicked');\n\t\tconst eventProperties: PixelEventProperties = {\n\t\t\tcontent_name: 'Mulai Baca',\n\t\t\tcontent_category: 'Homepage',\n\t\t\tcontent_ids: ['1']\n\t\t};\n\t\tthis.tiktokPixel.trackEvent('ViewContent', eventProperties);\n\n\t\tthis.router.navigate([RoutingConstant.HOME]).then(() => {\n\t\t\tthis.appConfigurationService.emitEvent({ isDesktopView: false });\n\t\t});\n\t}\n}\n","\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RevampLandingNavbarComponent } from './revamp-landing-navbar.component';\nimport { RouterLink } from '@angular/router';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatMenuModule } from '@angular/material/menu';\n\n@NgModule({\n\tdeclarations: [RevampLandingNavbarComponent],\n\texports: [RevampLandingNavbarComponent],\n\timports: [CommonModule, RouterLink, MatButtonModule, MatIconModule, MatMenuModule]\n})\nexport class RevampLandingNavbarModule {}\n","\n\tKoin kamu\n\t\"waca-coin\"\n\t
\n\n\n\n\t\n\n","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { PaymentUsecase } from '@domain/usecase/payment.usecase';\n\n@Component({\n\tselector: 'app-user-waca-koin',\n\ttemplateUrl: './user-waca-koin.component.html',\n\tstyleUrls: ['./user-waca-koin.component.scss']\n})\nexport class UserWacaKoinComponent implements OnInit {\n\t@Input()\n\tisShowLabel = true;\n\n\t@Output()\n\tpublic availableCoin = new EventEmitter();\n\n\tbalance = 0;\n\tisLoading = true;\n\terrorMessage = '';\n\n\tconstructor(private paymentUsecase: PaymentUsecase) {}\n\n\tngOnInit(): void {\n\t\tthis.isLoading = true;\n\t\tthis.paymentUsecase.getBalance().subscribe({\n\t\t\tnext: (response: any) => {\n\t\t\t\tthis.isLoading = false;\n\t\t\t\tthis.balance = response.balance;\n\t\t\t\tthis.availableCoin.emit(this.balance);\n\t\t\t},\n\t\t\terror: (err) => {\n\t\t\t\tthis.isLoading = false;\n\t\t\t\tthis.errorMessage = err;\n\t\t\t}\n\t\t});\n\t}\n}\n","import { Component, Inject, ViewEncapsulation } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\n\n@Component({\n\tselector: 'app-dialog-detail-badge',\n\ttemplateUrl: './dialog-detail-badge.component.html',\n\tstyleUrls: ['./dialog-detail-badge.component.scss'],\n\tencapsulation: ViewEncapsulation.None\n})\nexport class DialogDetailBadgeComponent {\n\tconstructor(\n\t\tpublic dialogRef: MatDialogRef,\n\t\t@Inject(MAT_DIALOG_DATA) public data: any\n\t) {}\n\n\tonClose() {\n\t\tthis.dialogRef.close(false);\n\t}\n}\n","
\n\t
\n\t\t\n\t\t
{{ this.data.name }}
\n\t\t
\n\t\t\t{{ this.data.description }}\n\t\t
\n\t\t
\n\t\t\t\n\t\t\t\tTutup\n\t\t\t\n\t\t
\n\t
\n
\n","import { Component, inject, Inject } from '@angular/core';\nimport { MatListModule } from '@angular/material/list';\nimport {\n MatBottomSheet,\n MatBottomSheetModule,\n MatBottomSheetRef,\n MAT_BOTTOM_SHEET_DATA\n} from '@angular/material/bottom-sheet';\nimport { NavigationExtras, Router } from '@angular/router';\n\n@Component({\n selector: 'app-bottom-sheet-payment',\n templateUrl: './bottom-sheet-payment.component.html',\n styleUrls: ['./bottom-sheet-payment.component.scss'],\n standalone: true,\n imports: [MatListModule],\n})\nexport class BottomSheetPaymentComponent {\n private _bottomSheetRef =\n inject>(MatBottomSheetRef);\n constructor(@Inject(MAT_BOTTOM_SHEET_DATA) public data: any, private router: Router) { }\n\n ngOnInit(): void {\n }\n openLink(event: MouseEvent): void {\n this._bottomSheetRef.dismiss();\n const currentRoute = this.router.url;\n const navigationExtras: NavigationExtras = {\n state: {\n data: this.data,\n fromPage: currentRoute\n }\n };\n\n this.router.navigate(['/topup/payment-method'], navigationExtras)\n event.preventDefault();\n }\n}\n","
\n
\n
Pilih cara Pembayaran
\n
\n Pilih salah satu metode pembayaran yang sesuai dengan keinginan kamu. Harga dan ketentuan mungkin bisa\n berbeda tergantung metode yang kamu pilih.\n
\n
\n \n \n
\n
\n \n
\n
\n
Wacaku
\n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n + 12 lainnya\n
\n
\n
\n
\n
\n\n
\n
","import * as i0 from '@angular/core';\nimport { InjectionToken, Injectable, Optional, Inject, NgModule } from '@angular/core';\nimport { DateAdapter, MAT_DATE_LOCALE, MAT_DATE_FORMATS } from '@angular/material/core';\nimport * as _rollupMoment from 'moment';\nimport _rollupMoment__default from 'moment';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst moment = _rollupMoment__default || _rollupMoment;\n/** InjectionToken for moment date adapter to configure options. */\nconst MAT_MOMENT_DATE_ADAPTER_OPTIONS = new InjectionToken('MAT_MOMENT_DATE_ADAPTER_OPTIONS', {\n providedIn: 'root',\n factory: MAT_MOMENT_DATE_ADAPTER_OPTIONS_FACTORY,\n});\n/** @docs-private */\nfunction MAT_MOMENT_DATE_ADAPTER_OPTIONS_FACTORY() {\n return {\n useUtc: false,\n };\n}\n/** Creates an array and fills it with values. */\nfunction range(length, valueFunction) {\n const valuesArray = Array(length);\n for (let i = 0; i < length; i++) {\n valuesArray[i] = valueFunction(i);\n }\n return valuesArray;\n}\n/** Adapts Moment.js Dates for use with Angular Material. */\nclass MomentDateAdapter extends DateAdapter {\n constructor(dateLocale, _options) {\n super();\n this._options = _options;\n this.setLocale(dateLocale || moment.locale());\n }\n setLocale(locale) {\n super.setLocale(locale);\n let momentLocaleData = moment.localeData(locale);\n this._localeData = {\n firstDayOfWeek: momentLocaleData.firstDayOfWeek(),\n longMonths: momentLocaleData.months(),\n shortMonths: momentLocaleData.monthsShort(),\n dates: range(31, i => this.createDate(2017, 0, i + 1).format('D')),\n longDaysOfWeek: momentLocaleData.weekdays(),\n shortDaysOfWeek: momentLocaleData.weekdaysShort(),\n narrowDaysOfWeek: momentLocaleData.weekdaysMin(),\n };\n }\n getYear(date) {\n return this.clone(date).year();\n }\n getMonth(date) {\n return this.clone(date).month();\n }\n getDate(date) {\n return this.clone(date).date();\n }\n getDayOfWeek(date) {\n return this.clone(date).day();\n }\n getMonthNames(style) {\n // Moment.js doesn't support narrow month names, so we just use short if narrow is requested.\n return style == 'long' ? this._localeData.longMonths : this._localeData.shortMonths;\n }\n getDateNames() {\n return this._localeData.dates;\n }\n getDayOfWeekNames(style) {\n if (style == 'long') {\n return this._localeData.longDaysOfWeek;\n }\n if (style == 'short') {\n return this._localeData.shortDaysOfWeek;\n }\n return this._localeData.narrowDaysOfWeek;\n }\n getYearName(date) {\n return this.clone(date).format('YYYY');\n }\n getFirstDayOfWeek() {\n return this._localeData.firstDayOfWeek;\n }\n getNumDaysInMonth(date) {\n return this.clone(date).daysInMonth();\n }\n clone(date) {\n return date.clone().locale(this.locale);\n }\n createDate(year, month, date) {\n // Moment.js will create an invalid date if any of the components are out of bounds, but we\n // explicitly check each case so we can throw more descriptive errors.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (month < 0 || month > 11) {\n throw Error(`Invalid month index \"${month}\". Month index has to be between 0 and 11.`);\n }\n if (date < 1) {\n throw Error(`Invalid date \"${date}\". Date has to be greater than 0.`);\n }\n }\n const result = this._createMoment({ year, month, date }).locale(this.locale);\n // If the result isn't valid, the date must have been out of bounds for this month.\n if (!result.isValid() && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error(`Invalid date \"${date}\" for month with index \"${month}\".`);\n }\n return result;\n }\n today() {\n return this._createMoment().locale(this.locale);\n }\n parse(value, parseFormat) {\n if (value && typeof value == 'string') {\n return this._createMoment(value, parseFormat, this.locale);\n }\n return value ? this._createMoment(value).locale(this.locale) : null;\n }\n format(date, displayFormat) {\n date = this.clone(date);\n if (!this.isValid(date) && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('MomentDateAdapter: Cannot format invalid date.');\n }\n return date.format(displayFormat);\n }\n addCalendarYears(date, years) {\n return this.clone(date).add({ years });\n }\n addCalendarMonths(date, months) {\n return this.clone(date).add({ months });\n }\n addCalendarDays(date, days) {\n return this.clone(date).add({ days });\n }\n toIso8601(date) {\n return this.clone(date).format();\n }\n /**\n * Returns the given value if given a valid Moment or null. Deserializes valid ISO 8601 strings\n * (https://www.ietf.org/rfc/rfc3339.txt) and valid Date objects into valid Moments and empty\n * string into null. Returns an invalid date for all other values.\n */\n deserialize(value) {\n let date;\n if (value instanceof Date) {\n date = this._createMoment(value).locale(this.locale);\n }\n else if (this.isDateInstance(value)) {\n // Note: assumes that cloning also sets the correct locale.\n return this.clone(value);\n }\n if (typeof value === 'string') {\n if (!value) {\n return null;\n }\n date = this._createMoment(value, moment.ISO_8601).locale(this.locale);\n }\n if (date && this.isValid(date)) {\n return this._createMoment(date).locale(this.locale);\n }\n return super.deserialize(value);\n }\n isDateInstance(obj) {\n return moment.isMoment(obj);\n }\n isValid(date) {\n return this.clone(date).isValid();\n }\n invalid() {\n return moment.invalid();\n }\n /** Creates a Moment instance while respecting the current UTC settings. */\n _createMoment(date, format, locale) {\n const { strict, useUtc } = this._options || {};\n return useUtc ? moment.utc(date, format, locale, strict) : moment(date, format, locale, strict);\n }\n}\nMomentDateAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: MomentDateAdapter, deps: [{ token: MAT_DATE_LOCALE, optional: true }, { token: MAT_MOMENT_DATE_ADAPTER_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\nMomentDateAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: MomentDateAdapter });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: MomentDateAdapter, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_DATE_LOCALE]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_MOMENT_DATE_ADAPTER_OPTIONS]\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst MAT_MOMENT_DATE_FORMATS = {\n parse: {\n dateInput: 'l',\n },\n display: {\n dateInput: 'l',\n monthYearLabel: 'MMM YYYY',\n dateA11yLabel: 'LL',\n monthYearA11yLabel: 'MMMM YYYY',\n },\n};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass MomentDateModule {\n}\nMomentDateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: MomentDateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nMomentDateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: MomentDateModule });\nMomentDateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: MomentDateModule, providers: [\n {\n provide: DateAdapter,\n useClass: MomentDateAdapter,\n deps: [MAT_DATE_LOCALE, MAT_MOMENT_DATE_ADAPTER_OPTIONS],\n },\n ] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: MomentDateModule, decorators: [{\n type: NgModule,\n args: [{\n providers: [\n {\n provide: DateAdapter,\n useClass: MomentDateAdapter,\n deps: [MAT_DATE_LOCALE, MAT_MOMENT_DATE_ADAPTER_OPTIONS],\n },\n ],\n }]\n }] });\nclass MatMomentDateModule {\n}\nMatMomentDateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: MatMomentDateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nMatMomentDateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: MatMomentDateModule, imports: [MomentDateModule] });\nMatMomentDateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: MatMomentDateModule, providers: [{ provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS }], imports: [MomentDateModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.2.0-rc.0\", ngImport: i0, type: MatMomentDateModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [MomentDateModule],\n providers: [{ provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS }],\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_MOMENT_DATE_ADAPTER_OPTIONS, MAT_MOMENT_DATE_ADAPTER_OPTIONS_FACTORY, MAT_MOMENT_DATE_FORMATS, MatMomentDateModule, MomentDateAdapter, MomentDateModule };\n","import * as i0 from '@angular/core';\nimport { Injectable, EventEmitter, Directive, Output, Input, NgModule } from '@angular/core';\nimport { of, fromEvent } from 'rxjs';\nimport { mergeMap, map, tap, filter, throttleTime } from 'rxjs/operators';\n\nclass NgxInfiniteScrollService {\n constructor() { }\n}\nNgxInfiniteScrollService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.3\", ngImport: i0, type: NgxInfiniteScrollService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNgxInfiniteScrollService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.0.3\", ngImport: i0, type: NgxInfiniteScrollService, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.3\", ngImport: i0, type: NgxInfiniteScrollService, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root'\n }]\n }], ctorParameters: function () { return []; } });\n\nfunction resolveContainerElement(selector, scrollWindow, defaultElement, fromRoot) {\n const hasWindow = window && !!window.document && window.document.documentElement;\n let container = hasWindow && scrollWindow ? window : defaultElement;\n if (selector) {\n const containerIsString = selector && hasWindow && typeof selector === 'string';\n container = containerIsString\n ? findElement(selector, defaultElement.nativeElement, fromRoot)\n : selector;\n if (!container) {\n throw new Error('ngx-infinite-scroll {resolveContainerElement()}: selector for');\n }\n }\n return container;\n}\nfunction findElement(selector, customRoot, fromRoot) {\n const rootEl = fromRoot ? window.document : customRoot;\n return rootEl.querySelector(selector);\n}\nfunction inputPropChanged(prop) {\n return prop && !prop.firstChange;\n}\nfunction hasWindowDefined() {\n return typeof window !== 'undefined';\n}\n\nconst VerticalProps = {\n clientHeight: \"clientHeight\",\n offsetHeight: \"offsetHeight\",\n scrollHeight: \"scrollHeight\",\n pageYOffset: \"pageYOffset\",\n offsetTop: \"offsetTop\",\n scrollTop: \"scrollTop\",\n top: \"top\"\n};\nconst HorizontalProps = {\n clientHeight: \"clientWidth\",\n offsetHeight: \"offsetWidth\",\n scrollHeight: \"scrollWidth\",\n pageYOffset: \"pageXOffset\",\n offsetTop: \"offsetLeft\",\n scrollTop: \"scrollLeft\",\n top: \"left\"\n};\nclass AxisResolver {\n constructor(vertical = true) {\n this.vertical = vertical;\n this.propsMap = vertical ? VerticalProps : HorizontalProps;\n }\n clientHeightKey() {\n return this.propsMap.clientHeight;\n }\n offsetHeightKey() {\n return this.propsMap.offsetHeight;\n }\n scrollHeightKey() {\n return this.propsMap.scrollHeight;\n }\n pageYOffsetKey() {\n return this.propsMap.pageYOffset;\n }\n offsetTopKey() {\n return this.propsMap.offsetTop;\n }\n scrollTopKey() {\n return this.propsMap.scrollTop;\n }\n topKey() {\n return this.propsMap.top;\n }\n}\n\nfunction shouldTriggerEvents(alwaysCallback, shouldFireScrollEvent, isTriggeredCurrentTotal) {\n if (alwaysCallback && shouldFireScrollEvent) {\n return true;\n }\n if (!isTriggeredCurrentTotal && shouldFireScrollEvent) {\n return true;\n }\n return false;\n}\n\nfunction createResolver({ windowElement, axis, }) {\n return createResolverWithContainer({ axis, isWindow: isElementWindow(windowElement) }, windowElement);\n}\nfunction createResolverWithContainer(resolver, windowElement) {\n const container = resolver.isWindow || (windowElement && !windowElement.nativeElement)\n ? windowElement\n : windowElement.nativeElement;\n return { ...resolver, container };\n}\nfunction isElementWindow(windowElement) {\n const isWindow = ['Window', 'global'].some((obj) => Object.prototype.toString.call(windowElement).includes(obj));\n return isWindow;\n}\nfunction getDocumentElement(isContainerWindow, windowElement) {\n return isContainerWindow ? windowElement.document.documentElement : null;\n}\nfunction calculatePoints(element, resolver) {\n const height = extractHeightForElement(resolver);\n return resolver.isWindow\n ? calculatePointsForWindow(height, element, resolver)\n : calculatePointsForElement(height, element, resolver);\n}\nfunction calculatePointsForWindow(height, element, resolver) {\n const { axis, container, isWindow } = resolver;\n const { offsetHeightKey, clientHeightKey } = extractHeightPropKeys(axis);\n // scrolled until now / current y point\n const scrolled = height +\n getElementPageYOffset(getDocumentElement(isWindow, container), axis, isWindow);\n // total height / most bottom y point\n const nativeElementHeight = getElementHeight(element.nativeElement, isWindow, offsetHeightKey, clientHeightKey);\n const totalToScroll = getElementOffsetTop(element.nativeElement, axis, isWindow) +\n nativeElementHeight;\n return { height, scrolled, totalToScroll, isWindow };\n}\nfunction calculatePointsForElement(height, element, resolver) {\n const { axis, container } = resolver;\n // perhaps use container.offsetTop instead of 'scrollTop'\n const scrolled = container[axis.scrollTopKey()];\n const totalToScroll = container[axis.scrollHeightKey()];\n return { height, scrolled, totalToScroll, isWindow: false };\n}\nfunction extractHeightPropKeys(axis) {\n return {\n offsetHeightKey: axis.offsetHeightKey(),\n clientHeightKey: axis.clientHeightKey(),\n };\n}\nfunction extractHeightForElement({ container, isWindow, axis, }) {\n const { offsetHeightKey, clientHeightKey } = extractHeightPropKeys(axis);\n return getElementHeight(container, isWindow, offsetHeightKey, clientHeightKey);\n}\nfunction getElementHeight(elem, isWindow, offsetHeightKey, clientHeightKey) {\n if (isNaN(elem[offsetHeightKey])) {\n const docElem = getDocumentElement(isWindow, elem);\n return docElem ? docElem[clientHeightKey] : 0;\n }\n else {\n return elem[offsetHeightKey];\n }\n}\nfunction getElementOffsetTop(elem, axis, isWindow) {\n const topKey = axis.topKey();\n // elem = elem.nativeElement;\n if (!elem.getBoundingClientRect) {\n // || elem.css('none')) {\n return;\n }\n return (elem.getBoundingClientRect()[topKey] +\n getElementPageYOffset(elem, axis, isWindow));\n}\nfunction getElementPageYOffset(elem, axis, isWindow) {\n const pageYOffset = axis.pageYOffsetKey();\n const scrollTop = axis.scrollTopKey();\n const offsetTop = axis.offsetTopKey();\n if (isNaN(window.pageYOffset)) {\n return getDocumentElement(isWindow, elem)[scrollTop];\n }\n else if (elem.ownerDocument) {\n return elem.ownerDocument.defaultView[pageYOffset];\n }\n else {\n return elem[offsetTop];\n }\n}\n\nfunction shouldFireScrollEvent(container, distance = { down: 0, up: 0 }, scrollingDown) {\n let remaining;\n let containerBreakpoint;\n if (container.totalToScroll <= 0) {\n return false;\n }\n const scrolledUntilNow = container.isWindow\n ? container.scrolled\n : container.height + container.scrolled;\n if (scrollingDown) {\n remaining =\n (container.totalToScroll - scrolledUntilNow) / container.totalToScroll;\n const distanceDown = distance?.down ? distance.down : 0;\n containerBreakpoint = distanceDown / 10;\n }\n else {\n const totalHiddenContentHeight = container.scrolled + (container.totalToScroll - scrolledUntilNow);\n remaining = container.scrolled / totalHiddenContentHeight;\n const distanceUp = distance?.up ? distance.up : 0;\n containerBreakpoint = distanceUp / 10;\n }\n const shouldFireEvent = remaining <= containerBreakpoint;\n return shouldFireEvent;\n}\nfunction isScrollingDownwards(lastScrollPosition, container) {\n return lastScrollPosition < container.scrolled;\n}\nfunction getScrollStats(lastScrollPosition, container, distance) {\n const scrollDown = isScrollingDownwards(lastScrollPosition, container);\n return {\n fire: shouldFireScrollEvent(container, distance, scrollDown),\n scrollDown,\n };\n}\nfunction updateScrollPosition(position, scrollState) {\n return (scrollState.lastScrollPosition = position);\n}\nfunction updateTotalToScroll(totalToScroll, scrollState) {\n if (scrollState.lastTotalToScroll !== totalToScroll) {\n scrollState.lastTotalToScroll = scrollState.totalToScroll;\n scrollState.totalToScroll = totalToScroll;\n }\n}\nfunction isSameTotalToScroll(scrollState) {\n return scrollState.totalToScroll === scrollState.lastTotalToScroll;\n}\nfunction updateTriggeredFlag(scroll, scrollState, triggered, isScrollingDown) {\n if (isScrollingDown) {\n scrollState.triggered.down = scroll;\n }\n else {\n scrollState.triggered.up = scroll;\n }\n}\nfunction isTriggeredScroll(totalToScroll, scrollState, isScrollingDown) {\n return isScrollingDown\n ? scrollState.triggered.down === totalToScroll\n : scrollState.triggered.up === totalToScroll;\n}\nfunction updateScrollState(scrollState, scrolledUntilNow, totalToScroll) {\n updateScrollPosition(scrolledUntilNow, scrollState);\n updateTotalToScroll(totalToScroll, scrollState);\n // const isSameTotal = isSameTotalToScroll(scrollState);\n // if (!isSameTotal) {\n // updateTriggeredFlag(scrollState, false, isScrollingDown);\n // }\n}\n\nclass ScrollState {\n constructor({ totalToScroll }) {\n this.lastScrollPosition = 0;\n this.lastTotalToScroll = 0;\n this.totalToScroll = 0;\n this.triggered = {\n down: 0,\n up: 0,\n };\n this.totalToScroll = totalToScroll;\n }\n updateScrollPosition(position) {\n return (this.lastScrollPosition = position);\n }\n updateTotalToScroll(totalToScroll) {\n if (this.lastTotalToScroll !== totalToScroll) {\n this.lastTotalToScroll = this.totalToScroll;\n this.totalToScroll = totalToScroll;\n }\n }\n updateScroll(scrolledUntilNow, totalToScroll) {\n this.updateScrollPosition(scrolledUntilNow);\n this.updateTotalToScroll(totalToScroll);\n }\n updateTriggeredFlag(scroll, isScrollingDown) {\n if (isScrollingDown) {\n this.triggered.down = scroll;\n }\n else {\n this.triggered.up = scroll;\n }\n }\n isTriggeredScroll(totalToScroll, isScrollingDown) {\n return isScrollingDown\n ? this.triggered.down === totalToScroll\n : this.triggered.up === totalToScroll;\n }\n}\n\nfunction createScroller(config) {\n const { scrollContainer, scrollWindow, element, fromRoot } = config;\n const resolver = createResolver({\n axis: new AxisResolver(!config.horizontal),\n windowElement: resolveContainerElement(scrollContainer, scrollWindow, element, fromRoot),\n });\n const scrollState = new ScrollState({\n totalToScroll: calculatePoints(element, resolver),\n });\n const options = {\n container: resolver.container,\n throttle: config.throttle,\n };\n const distance = {\n up: config.upDistance,\n down: config.downDistance,\n };\n return attachScrollEvent(options).pipe(mergeMap(() => of(calculatePoints(element, resolver))), map((positionStats) => toInfiniteScrollParams(scrollState.lastScrollPosition, positionStats, distance)), tap(({ stats }) => scrollState.updateScroll(stats.scrolled, stats.totalToScroll)), filter(({ fire, scrollDown, stats: { totalToScroll } }) => shouldTriggerEvents(config.alwaysCallback, fire, scrollState.isTriggeredScroll(totalToScroll, scrollDown))), tap(({ scrollDown, stats: { totalToScroll } }) => {\n scrollState.updateTriggeredFlag(totalToScroll, scrollDown);\n }), map(toInfiniteScrollAction));\n}\nfunction attachScrollEvent(options) {\n let obs = fromEvent(options.container, 'scroll');\n // For an unknown reason calling `sampleTime()` causes trouble for many users, even with `options.throttle = 0`.\n // Let's avoid calling the function unless needed.\n // Replacing with throttleTime seems to solve the problem\n // See https://github.com/orizens/ngx-infinite-scroll/issues/198\n if (options.throttle) {\n obs = obs.pipe(throttleTime(options.throttle, undefined, {\n leading: true,\n trailing: true,\n }));\n }\n return obs;\n}\nfunction toInfiniteScrollParams(lastScrollPosition, stats, distance) {\n const { scrollDown, fire } = getScrollStats(lastScrollPosition, stats, distance);\n return {\n scrollDown,\n fire,\n stats,\n };\n}\nconst InfiniteScrollActions = {\n DOWN: '[NGX_ISE] DOWN',\n UP: '[NGX_ISE] UP',\n};\nfunction toInfiniteScrollAction(response) {\n const { scrollDown, stats: { scrolled: currentScrollPosition }, } = response;\n return {\n type: scrollDown ? InfiniteScrollActions.DOWN : InfiniteScrollActions.UP,\n payload: {\n currentScrollPosition,\n },\n };\n}\n\nclass InfiniteScrollDirective {\n constructor(element, zone) {\n this.element = element;\n this.zone = zone;\n this.scrolled = new EventEmitter();\n this.scrolledUp = new EventEmitter();\n this.infiniteScrollDistance = 2;\n this.infiniteScrollUpDistance = 1.5;\n this.infiniteScrollThrottle = 150;\n this.infiniteScrollDisabled = false;\n this.infiniteScrollContainer = null;\n this.scrollWindow = true;\n this.immediateCheck = false;\n this.horizontal = false;\n this.alwaysCallback = false;\n this.fromRoot = false;\n }\n ngAfterViewInit() {\n if (!this.infiniteScrollDisabled) {\n this.setup();\n }\n }\n ngOnChanges({ infiniteScrollContainer, infiniteScrollDisabled, infiniteScrollDistance, }) {\n const containerChanged = inputPropChanged(infiniteScrollContainer);\n const disabledChanged = inputPropChanged(infiniteScrollDisabled);\n const distanceChanged = inputPropChanged(infiniteScrollDistance);\n const shouldSetup = (!disabledChanged && !this.infiniteScrollDisabled) ||\n (disabledChanged && !infiniteScrollDisabled.currentValue) ||\n distanceChanged;\n if (containerChanged || disabledChanged || distanceChanged) {\n this.destroyScroller();\n if (shouldSetup) {\n this.setup();\n }\n }\n }\n setup() {\n if (hasWindowDefined()) {\n this.zone.runOutsideAngular(() => {\n this.disposeScroller = createScroller({\n fromRoot: this.fromRoot,\n alwaysCallback: this.alwaysCallback,\n disable: this.infiniteScrollDisabled,\n downDistance: this.infiniteScrollDistance,\n element: this.element,\n horizontal: this.horizontal,\n scrollContainer: this.infiniteScrollContainer,\n scrollWindow: this.scrollWindow,\n throttle: this.infiniteScrollThrottle,\n upDistance: this.infiniteScrollUpDistance,\n }).subscribe((payload) => this.handleOnScroll(payload));\n });\n }\n }\n handleOnScroll({ type, payload }) {\n const emitter = type === InfiniteScrollActions.DOWN ? this.scrolled : this.scrolledUp;\n if (hasObservers(emitter)) {\n this.zone.run(() => emitter.emit(payload));\n }\n }\n ngOnDestroy() {\n this.destroyScroller();\n }\n destroyScroller() {\n if (this.disposeScroller) {\n this.disposeScroller.unsubscribe();\n }\n }\n}\nInfiniteScrollDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.3\", ngImport: i0, type: InfiniteScrollDirective, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });\nInfiniteScrollDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.0.3\", type: InfiniteScrollDirective, selector: \"[infiniteScroll], [infinite-scroll], [data-infinite-scroll]\", inputs: { infiniteScrollDistance: \"infiniteScrollDistance\", infiniteScrollUpDistance: \"infiniteScrollUpDistance\", infiniteScrollThrottle: \"infiniteScrollThrottle\", infiniteScrollDisabled: \"infiniteScrollDisabled\", infiniteScrollContainer: \"infiniteScrollContainer\", scrollWindow: \"scrollWindow\", immediateCheck: \"immediateCheck\", horizontal: \"horizontal\", alwaysCallback: \"alwaysCallback\", fromRoot: \"fromRoot\" }, outputs: { scrolled: \"scrolled\", scrolledUp: \"scrolledUp\" }, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.3\", ngImport: i0, type: InfiniteScrollDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[infiniteScroll], [infinite-scroll], [data-infinite-scroll]',\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { scrolled: [{\n type: Output\n }], scrolledUp: [{\n type: Output\n }], infiniteScrollDistance: [{\n type: Input\n }], infiniteScrollUpDistance: [{\n type: Input\n }], infiniteScrollThrottle: [{\n type: Input\n }], infiniteScrollDisabled: [{\n type: Input\n }], infiniteScrollContainer: [{\n type: Input\n }], scrollWindow: [{\n type: Input\n }], immediateCheck: [{\n type: Input\n }], horizontal: [{\n type: Input\n }], alwaysCallback: [{\n type: Input\n }], fromRoot: [{\n type: Input\n }] } });\nfunction hasObservers(emitter) {\n // Note: The `observed` property is available only in RxJS@7.2.0, which means it's\n // not available for users running the lower version.\n return emitter.observed ?? emitter.observers.length > 0;\n}\n\nclass InfiniteScrollModule {\n}\nInfiniteScrollModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.0.3\", ngImport: i0, type: InfiniteScrollModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nInfiniteScrollModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.0.3\", ngImport: i0, type: InfiniteScrollModule, declarations: [InfiniteScrollDirective], exports: [InfiniteScrollDirective] });\nInfiniteScrollModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.0.3\", ngImport: i0, type: InfiniteScrollModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.0.3\", ngImport: i0, type: InfiniteScrollModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [InfiniteScrollDirective],\n exports: [InfiniteScrollDirective],\n imports: [],\n providers: [],\n }]\n }] });\n\n/*\n * Public API Surface of ngx-infinite-scroll\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { InfiniteScrollDirective, InfiniteScrollModule, NgxInfiniteScrollService };\n","import { asyncScheduler } from '../scheduler/async';\nimport { throttle } from './throttle';\nimport { timer } from '../observable/timer';\nexport function throttleTime(duration, scheduler = asyncScheduler, config) {\n const duration$ = timer(duration, scheduler);\n return throttle(() => duration$, config);\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nexport function throttle(durationSelector, config) {\n return operate((source, subscriber) => {\n const { leading = true, trailing = false } = config !== null && config !== void 0 ? config : {};\n let hasValue = false;\n let sendValue = null;\n let throttled = null;\n let isComplete = false;\n const endThrottling = () => {\n throttled === null || throttled === void 0 ? void 0 : throttled.unsubscribe();\n throttled = null;\n if (trailing) {\n send();\n isComplete && subscriber.complete();\n }\n };\n const cleanupThrottling = () => {\n throttled = null;\n isComplete && subscriber.complete();\n };\n const startThrottle = (value) => (throttled = innerFrom(durationSelector(value)).subscribe(createOperatorSubscriber(subscriber, endThrottling, cleanupThrottling)));\n const send = () => {\n if (hasValue) {\n hasValue = false;\n const value = sendValue;\n sendValue = null;\n subscriber.next(value);\n !isComplete && startThrottle(value);\n }\n };\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n hasValue = true;\n sendValue = value;\n !(throttled && !throttled.closed) && (leading ? send() : startThrottle(value));\n }, () => {\n isComplete = true;\n !(trailing && hasValue && throttled && !throttled.closed) && subscriber.complete();\n }));\n });\n}\n"],"x_google_ignoreList":[2,3,39,40,41,42]}