import { A as RangeMode, B as SurahInfo, C as Manzil, D as PageMeta, E as Page, F as RukuMeta, G as ThumunAlHizb, H as SurahListType, I as Surah, J as maxAyahsInSurah, K as ThumunAlHizbId, L as SurahAyah, M as RubAlHizbId, N as RubAlHizbMeta, O as QuranMeta, P as Ruku, R as SurahAyahPos, S as JuzPart, T as NumericRange, U as SurahMeta, V as SurahJuzMeta, W as SurahName, X as numSurahs, Y as numRubsInJuz, _ as AyahRange, b as JuzAndShift, g as AyahNo, h as AyahMeta, i as PartType, j as RubAlHizb, k as RangeMeta, l as Riwayas, m as AyahId, p as AyahCountBetweenJuzSurah, q as ThumunAlHizbMeta, s as RiwayaName, v as HizbId, w as ManzilMeta, x as JuzMeta, y as Juz, z as SurahAyahSegment } from "./types-lM7S_eMD.js"; import { _ as QuranRiwaya, a as string2NumberSplitterStrict, b as PartBlock, g as getRubAlHizb, i as string2NumberSplitter, n as formatSurahAyah, s as isValidAyahNo, v as AyahStepOptions } from "./formatSurahAyah-Cv9JGEG1.js"; //#region src/lists/DouriLists.d.ts export declare const DouriLists: Riwayas["Douri"]; //#endregion //#region src/douri.d.ts /** Douri metadata: number of ayahs, pages, juzs, ... */ export declare const meta: QuranMeta; export declare const HizbQuarterList: AyahId[]; export declare const JuzList: AyahId[]; export declare const ManzilList: AyahId[]; export declare const PageList: AyahId[]; export declare const RukuList: AyahId[]; export declare const SajdaList: AyahId[]; export declare const SurahList: SurahListType; /** Returns the raw boundary list for a kind of part */ export declare function getList(listName: PartType): AyahId[] | SurahListType; /** Returns the parts of a kind as `{ startAyahId, ayahCount }` blocks */ export declare function getListNormalised(listName: PartType): PartBlock[]; /** Like getListNormalised, but returns `null` when the riwaya has no such data */ export declare function generatePartBlocks(part: PartType): PartBlock[] | null; /** Parses `"2:255"` or `"1:1-7"` into `[surah, ayah]` or `[surah, [from, to]]` */ export declare function ayahStringSplitter(str: string, isStrict?: boolean): SurahAyahSegment; /** Parses a surah number from a string like `"2"` */ export declare function surahStringParser(str: string, isStrict?: boolean): Surah; /** Formats an ayah id as `"surah:ayah"` */ export declare function formatAyahId(ayahId: AyahId): string; /** Throws unless surah and ayah form a valid reference */ export declare function checkValidSurahAyah(surah: unknown, ayah: unknown): asserts ayah is AyahNo; /** Throws unless `[surah, ayah]` is a valid reference */ export declare function checkValidSurahAyahPair(pair: [unknown, unknown]): asserts pair is SurahAyah; /** Throws unless the value is a valid surah number */ export declare function checkValidSurah(surah: unknown): asserts surah is Surah; /** Throws unless the value is a valid ayah id */ export declare function checkValidAyahId(ayahId: unknown): asserts ayahId is AyahId; /** Throws unless the value is a valid page number */ export declare function checkValidPage(page: unknown): asserts page is Page; /** Throws unless the value is a valid juz number */ export declare function checkValidJuz(juz: unknown): asserts juz is Juz; /** Throws unless the value is a valid ruku number */ export declare function checkValidRuku(ruku: unknown): asserts ruku is Ruku; /** Throws unless the value is a valid manzil number */ export declare function checkValidManzil(manzil: unknown): asserts manzil is Manzil; /** Checks whether the value is a valid surah number */ export declare function isValidSurah(x: unknown): x is Surah; /** Checks whether the value is a valid ayah id */ export declare function isValidAyahId(x: unknown): x is AyahId; /** Checks whether `[surah, ayah]` is a valid reference */ export declare function isValidSurahAyah(x: [unknown, unknown]): x is SurahAyah; /** Checks whether the value is a valid page number */ export declare function isValidPage(x: unknown): x is Page; /** Checks whether the value is a valid juz number */ export declare function isValidJuz(x: unknown): x is Juz; /** Checks whether the value is a valid manzil number */ export declare function isValidManzil(x: unknown): x is Manzil; /** Checks whether the value is a valid ruku number */ export declare function isValidRuku(x: unknown): x is Ruku; /** Checks whether the value is a valid hizb number */ export declare function isValidHizb(x: unknown): x is HizbId; /** Checks whether the value is a valid rub' al-hizb number */ export declare function isValidRubAlHizb(x: unknown): x is RubAlHizbId; /** Returns the metadata of a surah */ export declare function getSurahMeta(surah: Surah): SurahMeta; /** Returns `[firstAyahId, ayahCount, surahOrder, rukuCount, name, isMeccan]` for a surah */ export declare function getSurahInfo(surah: Surah): SurahInfo; /** Returns the number of ayahs in a surah */ export declare function getAyahCountInSurah(surah: Surah): AyahNo; /** Converts `surah:ayah` to an ayah id */ export declare function findAyahIdBySurah(surah: Surah, ayah?: AyahNo): AyahId; /** Returns the surah an ayah id belongs to */ export declare function findSurahByAyahId(ayahId: AyahId): Surah; /** Converts an ayah id to `[surah, ayah]` */ export declare function findSurahAyahByAyahId(ayahId: AyahId): SurahAyah; /** Returns everything known about an ayah: juz, page, ruku, sajdah, ... */ export declare function getAyahMeta(ayahId: AyahId): AyahMeta; /** Returns getAyahMeta for every ayah of a surah */ export declare function getAyahMetasForSurah(surah: Surah): AyahMeta[]; /** Returns the juz of `surah:ayah` */ export declare function findJuz(surah: Surah, ayah?: AyahNo): Juz; /** Returns the juz of an ayah id */ export declare function findJuzByAyahId(ayahId: AyahId): Juz; /** Returns the first and last ayah of a juz */ export declare function getJuzMeta(juz: Juz): JuzMeta; /** Returns the juz boundaries around `surah:ayah` */ export declare function findJuzMetaBySurah(surah: Surah, ayah?: AyahNo): SurahJuzMeta; /** Returns the juz of `surah:ayah` and the distance from the juz start to the surah start */ export declare function findJuzAndShift(surah: Surah, ayah?: AyahNo): JuzAndShift; /** Like findJuzAndShift, for an ayah id */ export declare function findJuzAndShiftByAyahId(ayahId: AyahId): JuzAndShift; /** Returns the mushaf page of `surah:ayah` */ export declare function findPage(surah: Surah, ayah?: AyahNo): Page; /** Returns the mushaf page of an ayah id */ export declare function findPageByAyahId(ayahId: AyahId): Page; /** @deprecated Use {@link findPageByAyahId}, the same function */ export declare function findPagebyAyahId(ayahId: AyahId): Page; /** Returns the first and last ayah of a page */ export declare function getPageMeta(page: Page): PageMeta; /** Returns the manzil of `surah:ayah` */ export declare function findManzil(surah: Surah, ayah?: AyahNo): Manzil; /** Returns the manzil of an ayah id */ export declare function findManzilByAyahId(ayahId: AyahId): Manzil; /** Returns the first and last ayah of a manzil */ export declare function getManzilMeta(manzil: Manzil): ManzilMeta; /** Returns the ruku of an ayah id */ export declare function findRukuByAyahId(ayahId: AyahId): Ruku; /** Returns the first and last ayah of a ruku */ export declare function getRukuMeta(ruku: Ruku): RukuMeta; /** Returns the rub' al-hizb (quarter) of `surah:ayah` */ export declare function findRubAlHizb(surah: Surah, ayah?: AyahNo): RubAlHizbId; /** Returns the rub' al-hizb (quarter) of an ayah id */ export declare function findRubAlHizbByAyahId(ayahId: AyahId): RubAlHizbId; /** Returns juz, hizb and quarter numbers of an ayah id */ export declare function getRubAlHizbByAyahId(ayahId: AyahId): RubAlHizb; /** Returns the first and last ayah of a rub' al-hizb */ export declare function getRubAlHizbMeta(quarterIndex: RubAlHizbId): RubAlHizbMeta; /** Returns the rub' al-hizb containing an ayah id, with its first and last ayah */ export declare function getRubAlHizbMetaByAyahId(ayahId: AyahId): RubAlHizbMeta; /** Returns the ayah range of the juz/page/surah/... around an ayah id */ export declare function findRangeAroundAyah(ayahId: AyahId, mode: RangeMode): AyahRange; /** Returns the ayah range of the juz/page/surah/... around `surah:ayah` */ export declare function findRangeAroundSurahAyah(surah: Surah, ayah: AyahNo, mode: RangeMode): AyahRange; /** Returns `[firstAyahId, lastAyahId]` of a surah, juz, page, manzil, ruku or hizb part */ export declare function getPartRange(type: PartType, num: number): AyahRange; /** Iterates over every `[surah, ayah]` in a part of the Quran */ export declare function ayahsInPart(type: PartType, num: number): Generator; /** Iterates over every `[surah, ayah]` on a page */ export declare function ayahsInPage(page: Page): Generator; /** Iterates over every `[surah, ayah]` in a juz */ export declare function ayahsInJuz(juz: Juz): Generator; /** Returns the juz number if the ayah id starts a juz, a negative number otherwise */ export declare function isAyahJuzFirst(ayahId: AyahId): number; /** Returns the page number if the ayah id starts a page, a negative number otherwise */ export declare function isAyahPageFirst(ayahId: AyahId): number; /** Returns the juz number if `surah:ayah` starts a juz, a negative number otherwise */ export declare function isSurahAyahJuzFirst(surah: Surah, ayah: AyahNo): number; /** Returns the page number if `surah:ayah` starts a page, a negative number otherwise */ export declare function isSurahAyahPageFirst(surah: Surah, ayah: AyahNo): number; /** * Returns the ayah after `surah:ayah`. Wraps from the last ayah to 1:1 unless * `{ wrap: false }` is passed, in which case it returns `undefined` there. */ export declare function nextAyah(surah: Surah, ayah: AyahNo, options?: { wrap?: true; }): SurahAyah; export declare function nextAyah(surah: Surah, ayah: AyahNo, options: AyahStepOptions): SurahAyah | undefined; /** * Returns the ayah before `surah:ayah`. Wraps from 1:1 to the last ayah unless * `{ wrap: false }` is passed, in which case it returns `undefined` there. */ export declare function prevAyah(surah: Surah, ayah: AyahNo, options?: { wrap?: true; }): SurahAyah; export declare function prevAyah(surah: Surah, ayah: AyahNo, options: AyahStepOptions): SurahAyah | undefined; /** Converts a Douri `surah:ayah` to the numbering of another riwaya */ export declare function convertAyahTo(surah: Surah, ayah: AyahNo, to: RiwayaName): SurahAyah; /** Converts a Douri `surah:ayah` to every ayah of another riwaya that shares its text */ export declare function convertAyahSpanTo(surah: Surah, ayah: AyahNo, to: RiwayaName): SurahAyahSegment; /** * Creates a QuranRiwaya instance for Douri */ export declare function createDouri(): QuranRiwaya<"Douri">; /** * Pre-initialized QuranRiwaya instance for Douri * * @example * ```typescript * import { quran } from "quran-meta/douri" * * quran.getAyahMeta(1) * quran.findJuz(2, 142) * ``` */ export declare const quran: QuranRiwaya<"Douri">; //#endregion export { type AyahCountBetweenJuzSurah, type AyahId, type AyahMeta, type AyahNo, type AyahRange, type AyahStepOptions, type HizbId, type Juz, type JuzAndShift, type JuzMeta, type JuzPart, type Manzil, type ManzilMeta, type NumericRange, type Page, type PageMeta, type PartBlock, type PartType, type QuranMeta, type RangeMeta, type RangeMode, type RiwayaName, type RubAlHizb, type RubAlHizbId, type RubAlHizbMeta, type Ruku, type RukuMeta, type Surah, type SurahAyah, type SurahAyahPos, type SurahAyahSegment, type SurahInfo, type SurahJuzMeta, type SurahListType, type SurahMeta, type SurahName, type ThumunAlHizb, type ThumunAlHizbId, type ThumunAlHizbMeta, formatSurahAyah, getRubAlHizb, isValidAyahNo, type maxAyahsInSurah, type numRubsInJuz, type numSurahs, string2NumberSplitter, string2NumberSplitterStrict };