{ "version": 3, "sources": ["src/app/book-reader/_services/book.service.ts"], "sourcesContent": ["import { HttpClient } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { TextResonse } from 'src/app/_types/text-response';\nimport { environment } from 'src/environments/environment';\nimport { BookChapterItem } from '../_models/book-chapter-item';\nimport { BookInfo } from '../_models/book-info';\n\nexport interface FontFamily {\n /**\n * What the user should see\n */\n title: string;\n /**\n * The actual font face\n */\n family: string;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class BookService {\n\n baseUrl = environment.apiUrl;\n\n constructor(private http: HttpClient) { }\n\n getFontFamilies(): Array {\n return [{title: 'default', family: 'default'}, {title: 'EBGaramond', family: 'EBGaramond'}, {title: 'Fira Sans', family: 'Fira_Sans'},\n {title: 'Lato', family: 'Lato'}, {title: 'Libre Baskerville', family: 'Libre_Baskerville'}, {title: 'Merriweather', family: 'Merriweather'},\n {title: 'Nanum Gothic', family: 'Nanum_Gothic'}, {title: 'RocknRoll One', family: 'RocknRoll_One'}, {title: 'Open Dyslexic', family: 'OpenDyslexic2'}];\n }\n\n getBookChapters(chapterId: number) {\n return this.http.get>(this.baseUrl + 'book/' + chapterId + '/chapters');\n }\n\n getBookPage(chapterId: number, page: number) {\n return this.http.get(this.baseUrl + 'book/' + chapterId + '/book-page?page=' + page, TextResonse);\n }\n\n getBookInfo(chapterId: number) {\n return this.http.get(this.baseUrl + 'book/' + chapterId + '/book-info');\n }\n\n getBookPageUrl(chapterId: number, page: number) {\n return this.baseUrl + 'book/' + chapterId + '/book-page?page=' + page;\n }\n}\n"], "mappings": "uGAqBA,IAAaA,GAAW,IAAA,CAAlB,MAAOA,CAAW,CAItBC,YAAoBC,EAAgB,CAAhB,KAAAA,KAAAA,EAFpB,KAAAC,QAAUC,EAAYC,MAEkB,CAExCC,iBAAe,CACb,MAAO,CAAC,CAACC,MAAO,UAAWC,OAAQ,SAAS,EAAG,CAACD,MAAO,aAAcC,OAAQ,YAAY,EAAG,CAACD,MAAO,YAAaC,OAAQ,WAAW,EACpI,CAACD,MAAO,OAAQC,OAAQ,MAAM,EAAG,CAACD,MAAO,oBAAqBC,OAAQ,mBAAmB,EAAG,CAACD,MAAO,eAAgBC,OAAQ,cAAc,EAC1I,CAACD,MAAO,eAAgBC,OAAQ,cAAc,EAAG,CAACD,MAAO,gBAAiBC,OAAQ,eAAe,EAAG,CAACD,MAAO,gBAAiBC,OAAQ,eAAe,CAAC,CACvJ,CAEAC,gBAAgBC,EAAiB,CAC/B,OAAO,KAAKR,KAAKS,IAA4B,KAAKR,QAAU,QAAUO,EAAY,WAAW,CAC/F,CAEAE,YAAYF,EAAmBG,EAAY,CACzC,OAAO,KAAKX,KAAKS,IAAY,KAAKR,QAAU,QAAUO,EAAY,mBAAqBG,EAAMC,CAAW,CAC1G,CAEAC,YAAYL,EAAiB,CAC3B,OAAO,KAAKR,KAAKS,IAAc,KAAKR,QAAU,QAAUO,EAAY,YAAY,CAClF,CAEAM,eAAeN,EAAmBG,EAAY,CAC5C,OAAO,KAAKV,QAAU,QAAUO,EAAY,mBAAqBG,CACnE,iDA1BWb,GAAWiB,EAAAC,CAAA,CAAA,CAAA,CAAA,iCAAXlB,EAAWmB,QAAXnB,EAAWoB,UAAAC,WAFV,MAAM,CAAA,CAAA,SAEPrB,CAAW,GAAA", "names": ["BookService", "constructor", "http", "baseUrl", "environment", "apiUrl", "getFontFamilies", "title", "family", "getBookChapters", "chapterId", "get", "getBookPage", "page", "TextResonse", "getBookInfo", "getBookPageUrl", "\u0275\u0275inject", "HttpClient", "factory", "\u0275fac", "providedIn"] }