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kDAAkD,IAAM,6BAA6B,IAAM,6BAA6B,KAAO,8BAA8B,QAAU,iCAAiC,OAAS,gCAAgC,gBAAkB,2C,kBCAx/BD,EAAOC,QAAU,CAAC,0BAA4B,uDAAuD,qBAAuB,kDAAkD,qBAAuB,kDAAkD,eAAiB","sources":["webpack://_N_E/./public/icons/chat.svg","webpack://_N_E/./public/icons/chevron-down.svg","webpack://_N_E/./public/icons/copy-link.svg","webpack://_N_E/./public/icons/copy.svg","webpack://_N_E/./public/icons/love.svg","webpack://_N_E/./public/icons/menu_more_horiz.svg","webpack://_N_E/./node_modules/clipboard-copy/index.js","webpack://_N_E/./public/icons/verified.svg","webpack://_N_E/./src/components/QuranReader/ReflectionView/ReflectionDisclaimerMessage.tsx","webpack://_N_E/./public/icons/share.svg","webpack://_N_E/./src/components/QuranReader/ReflectionView/ReflectionItem/AuthorInfo/index.tsx","webpack://_N_E/./src/components/QuranReader/ReflectionView/ReflectionItem/HeaderMenu/index.tsx","webpack://_N_E/./types/QuranReflect/ReflectionLanguage.ts","webpack://_N_E/./src/components/QuranReader/ReflectionView/ReflectionItem/SocialInteraction/index.tsx","webpack://_N_E/./src/utils/quranReflect/string.ts","webpack://_N_E/./src/utils/quranReflect/locale.ts","webpack://_N_E/./src/utils/quranReflect/views.ts","webpack://_N_E/./src/components/QuranReader/ReflectionView/ReflectionItem/index.tsx","webpack://_N_E/./src/components/QuranReader/ReflectionView/ReflectionNotAvailableMessage.tsx","webpack://_N_E/./src/components/QuranReader/ReflectionView/ReflectionBodyContainer/ReflectionBody/index.tsx","webpack://_N_E/./src/components/QuranReader/TafsirView/TafsirEndOfScrollingActions.tsx","webpack://_N_E/./src/components/QuranReader/TranslationView/TranslationText/FootnoteText.tsx","webpack://_N_E/./src/components/QuranReader/TranslationView/TranslationText/index.tsx","webpack://_N_E/./src/utils/quranReflect/bodyParser.ts","webpack://_N_E/./src/components/QuranReflect/hooks/useReflectionBodyParser.ts","webpack://_N_E/./src/components/Verse/VerseAndTranslation.tsx","webpack://_N_E/./src/hooks/useObserveElement.ts","webpack://_N_E/./src/hooks/useQcfFont.ts","webpack://_N_E/./src/utils/html-truncate.ts","webpack://_N_E/./src/utils/quranReflect/navigation.ts","webpack://_N_E/./src/utils/string.ts","webpack://_N_E/./src/components/QuranReader/ReflectionView/ReflectionBodyContainer/ReflectionBody/ReflectionBody.module.scss","webpack://_N_E/./src/components/QuranReader/ReflectionView/ReflectionDisclaimerMessage.module.scss","webpack://_N_E/./src/components/QuranReader/ReflectionView/ReflectionItem/AuthorInfo/AuthorInfo.module.scss","webpack://_N_E/./src/components/QuranReader/ReflectionView/ReflectionItem/ReflectionItem.module.scss","webpack://_N_E/./src/components/QuranReader/ReflectionView/ReflectionItem/SocialInteraction/SocialInteraction.module.scss","webpack://_N_E/./src/components/QuranReader/TafsirView/TafsirEndOfScrollingActions.module.scss","webpack://_N_E/./src/components/QuranReader/TranslationView/TranslationText/FootnoteText.module.scss","webpack://_N_E/./src/components/QuranReader/TranslationView/TranslationText/TranslationText.module.scss","webpack://_N_E/./src/components/Verse/VerseAndTranslation.module.scss"],"sourcesContent":["var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nvar SvgChat = function SvgChat(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.379 8.379 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5Z\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })));\n};\nexport default SvgChat;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nvar SvgChevronDown = function SvgChevronDown(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 15,\n height: 15,\n viewBox: \"0 0 15 15\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M3.135 6.158a.5.5 0 0 1 .707-.023L7.5 9.565l3.658-3.43a.5.5 0 0 1 .684.73l-4 3.75a.5.5 0 0 1-.684 0l-4-3.75a.5.5 0 0 1-.023-.707Z\",\n fill: \"currentColor\",\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n })));\n};\nexport default SvgChevronDown;","var _path, _path2;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nvar SvgCopyLink = function SvgCopyLink(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M10 13a5.001 5.001 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })));\n};\nexport default SvgCopyLink;","var _rect, _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nvar SvgCopy = function SvgCopy(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n className: \"feather feather-copy\"\n }, props), _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n x: 9,\n y: 9,\n width: 13,\n height: 13,\n rx: 2,\n ry: 2\n })), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\"\n })));\n};\nexport default SvgCopy;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nvar SvgLove = function SvgLove(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n className: \"feather feather-heart\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z\"\n })));\n};\nexport default SvgLove;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nvar SvgMenuMoreHoriz = function SvgMenuMoreHoriz(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"currentColor\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM19 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM5 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })));\n};\nexport default SvgMenuMoreHoriz;","/*! clipboard-copy. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */\n/* global DOMException */\n\nmodule.exports = clipboardCopy\n\nfunction makeError () {\n return new DOMException('The request is not allowed', 'NotAllowedError')\n}\n\nasync function copyClipboardApi (text) {\n // Use the Async Clipboard API when available. Requires a secure browsing\n // context (i.e. HTTPS)\n if (!navigator.clipboard) {\n throw makeError()\n }\n return navigator.clipboard.writeText(text)\n}\n\nasync function copyExecCommand (text) {\n // Put the text to copy into a <span>\n const span = document.createElement('span')\n span.textContent = text\n\n // Preserve consecutive spaces and newlines\n span.style.whiteSpace = 'pre'\n span.style.webkitUserSelect = 'auto'\n span.style.userSelect = 'all'\n\n // Add the <span> to the page\n document.body.appendChild(span)\n\n // Make a selection object representing the range of text selected by the user\n const selection = window.getSelection()\n const range = window.document.createRange()\n selection.removeAllRanges()\n range.selectNode(span)\n selection.addRange(range)\n\n // Copy text to the clipboard\n let success = false\n try {\n success = window.document.execCommand('copy')\n } finally {\n // Cleanup\n selection.removeAllRanges()\n window.document.body.removeChild(span)\n }\n\n if (!success) throw makeError()\n}\n\nasync function clipboardCopy (text) {\n try {\n await copyClipboardApi(text)\n } catch (err) {\n // ...Otherwise, use document.execCommand() fallback\n try {\n await copyExecCommand(text)\n } catch (err2) {\n throw (err2 || err || makeError())\n }\n }\n}\n","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nvar SvgVerified = function SvgVerified(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 16,\n height: 16,\n viewBox: \"0 0 16 16\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M9.585.52a2.678 2.678 0 0 0-3.17 0l-.928.68c-.153.112-.33.186-.518.215L3.83 1.59a2.678 2.678 0 0 0-2.24 2.24l-.175 1.14a1.178 1.178 0 0 1-.215.518l-.68.928a2.678 2.678 0 0 0 0 3.17l.68.928c.113.153.186.33.215.518l.175 1.138a2.678 2.678 0 0 0 2.24 2.24l1.138.175c.187.029.365.102.518.215l.928.68a2.678 2.678 0 0 0 3.17 0l.928-.68a1.17 1.17 0 0 1 .518-.215l1.138-.175a2.677 2.677 0 0 0 2.241-2.241l.175-1.138c.029-.187.102-.365.215-.518l.68-.928a2.678 2.678 0 0 0 0-3.17l-.68-.928a1.18 1.18 0 0 1-.215-.518l-.174-1.14a2.678 2.678 0 0 0-2.24-2.24l-1.138-.174a1.18 1.18 0 0 1-.518-.215L9.585.52ZM7.303 1.728c.415-.305.98-.305 1.394 0l.928.68c.348.256.752.423 1.18.489l1.136.174c.51.078.909.478.987.987l.174 1.137c.066.427.233.83.489 1.18l.68.927c.305.415.305.98 0 1.394l-.68.928a2.679 2.679 0 0 0-.489 1.18l-.174 1.136a1.178 1.178 0 0 1-.987.987l-1.137.174a2.677 2.677 0 0 0-1.18.489l-.927.68c-.415.305-.98.305-1.394 0l-.928-.68a2.677 2.677 0 0 0-1.18-.49l-1.136-.173a1.177 1.177 0 0 1-.987-.987l-.174-1.137a2.678 2.678 0 0 0-.489-1.18l-.68-.927a1.178 1.178 0 0 1 0-1.394l.68-.928c.256-.348.423-.752.489-1.18l.174-1.136c.078-.51.478-.91.987-.987l1.137-.174a2.678 2.678 0 0 0 1.18-.49l.927-.68ZM11.28 6.78a.75.75 0 0 0-1.06-1.06L7 8.94 5.78 7.72a.75.75 0 0 0-1.06 1.06l1.75 1.75a.75.75 0 0 0 1.06 0l3.75-3.75Z\",\n fill: \"currentColor\"\n })));\n};\nexport default SvgVerified;","import useTranslation from 'next-translate/useTranslation';\n\nimport styles from './ReflectionDisclaimerMessage.module.scss';\n\nconst ReflectionDisclaimerMessage = () => {\n const { t } = useTranslation();\n return (\n <div className={styles.reflectionDisclaimerMessage}>\n {t('quran-reader:reflection-disclaimer')}\n </div>\n );\n};\n\nexport default ReflectionDisclaimerMessage;\n","var _circle, _circle2, _circle3, _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nvar SvgShare = function SvgShare(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n className: \"feather feather-share-2\"\n }, props), _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 18,\n cy: 5,\n r: 3\n })), _circle2 || (_circle2 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 6,\n cy: 12,\n r: 3\n })), _circle3 || (_circle3 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 18,\n cy: 19,\n r: 3\n })), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"m8.59 13.51 6.83 3.98M15.41 6.51l-6.82 3.98\"\n })));\n};\nexport default SvgShare;","import React, { useMemo } from 'react';\n\nimport classNames from 'classnames';\nimport useTranslation from 'next-translate/useTranslation';\n\nimport styles from './AuthorInfo.module.scss';\n\nimport Link, { LinkVariant } from '@/dls/Link/Link';\nimport ChevronDownIcon from '@/icons/chevron-down.svg';\nimport VerifiedIcon from '@/icons/verified.svg';\nimport { formatDateRelatively } from '@/utils/datetime';\nimport { logButtonClick } from '@/utils/eventLogger';\nimport { toLocalizedNumber } from '@/utils/locale';\nimport { getQuranReflectAuthorUrl } from '@/utils/quranReflect/navigation';\nimport { makeVerseKey } from '@/utils/verse';\nimport { ReflectionVerseReference } from 'types/QuranReflect/ReflectionVerseReference';\n\ntype Props = {\n authorUsername: string;\n authorName: string;\n avatarUrl: string;\n isAuthorVerified: boolean;\n shouldShowReferredVerses: boolean;\n date: string;\n verseReferences: ReflectionVerseReference[];\n nonChapterVerseReferences: ReflectionVerseReference[];\n reflectionGroup?: string;\n reflectionGroupLink?: string;\n onReferredVersesHeaderClicked: () => void;\n};\n\nconst SEPARATOR = ' · ';\nconst DEFAULT_IMAGE = '/images/quran-reflect.png';\n\nconst AuthorInfo: React.FC<Props> = ({\n authorUsername,\n authorName,\n avatarUrl,\n date,\n isAuthorVerified,\n verseReferences,\n nonChapterVerseReferences,\n onReferredVersesHeaderClicked,\n shouldShowReferredVerses,\n reflectionGroup,\n reflectionGroupLink,\n}) => {\n const { t, lang } = useTranslation();\n const formattedDate = formatDateRelatively(new Date(date), lang);\n\n const onReflectAuthorClicked = () => {\n logButtonClick('reflection_item_author');\n };\n\n const referredVerseText = useMemo(() => {\n let text = '';\n const chapters = verseReferences\n .filter((verse) => !verse.from || !verse.to)\n .map((verse) => toLocalizedNumber(verse.chapter, lang));\n\n if (chapters.length > 0) {\n text += `${t('common:surah')} ${chapters.join(',')}`;\n }\n\n const verses = nonChapterVerseReferences.map((verse) =>\n makeVerseKey(\n toLocalizedNumber(verse.chapter, lang),\n toLocalizedNumber(verse.from, lang),\n toLocalizedNumber(verse.to, lang),\n ),\n );\n\n if (verses.length > 0) {\n if (chapters.length > 0) text += ` ${t('common:and')} `;\n text += `${t('common:ayah')} ${verses.join(',')}`;\n }\n\n return text;\n }, [verseReferences, nonChapterVerseReferences, lang, t]);\n\n return (\n <div className={styles.authorInfo}>\n <Link isNewTab href={getQuranReflectAuthorUrl(authorUsername)} className={styles.author}>\n {/* eslint-disable-next-line @next/next/no-img-element */}\n <img alt={authorName} className={styles.avatar} src={avatarUrl || DEFAULT_IMAGE} />\n </Link>\n <div>\n <Link\n isNewTab\n href={getQuranReflectAuthorUrl(authorUsername)}\n variant={LinkVariant.Primary}\n className={styles.author}\n onClick={onReflectAuthorClicked}\n >\n {authorName}\n {isAuthorVerified && (\n <span className={styles.verifiedIcon}>\n <VerifiedIcon />\n </span>\n )}\n </Link>\n <div>\n <span className={styles.date}>{formattedDate}</span>\n {verseReferences.length !== 0 && (\n <>\n <span className={styles.separator}>{SEPARATOR}</span>\n <span\n tabIndex={0}\n role=\"button\"\n onKeyPress={onReferredVersesHeaderClicked}\n onClick={onReferredVersesHeaderClicked}\n className={classNames(styles.verseReferencesContainer, {\n [styles.clickable]: nonChapterVerseReferences.length > 0,\n })}\n >\n <span className={styles.referencedVersesPrefix}>\n {t('quran-reader:referencing')}{' '}\n </span>\n <span className={styles.verseReferences}>{referredVerseText}</span>\n <span\n className={classNames(styles.chevronContainer, {\n [styles.flipChevron]: shouldShowReferredVerses,\n })}\n >\n {nonChapterVerseReferences.length > 0 && <ChevronDownIcon />}\n </span>\n </span>\n </>\n )}\n </div>\n {reflectionGroup && (\n <div className={styles.groupContainer}>\n <p className={styles.postedIn}>{t('quran-reader:posted-in')}</p>\n <Link isNewTab href={reflectionGroupLink}>\n <p className={styles.groupName}>{reflectionGroup}</p>\n </Link>\n </div>\n )}\n </div>\n </div>\n );\n};\n\nexport default AuthorInfo;\n","import React from 'react';\n\nimport useTranslation from 'next-translate/useTranslation';\n\nimport Button, { ButtonShape, ButtonSize, ButtonVariant } from '@/dls/Button/Button';\nimport PopoverMenu from '@/dls/PopoverMenu/PopoverMenu';\nimport OverflowMenuIcon from '@/icons/menu_more_horiz.svg';\nimport { logButtonClick } from '@/utils/eventLogger';\nimport { getQuranReflectEditUrl, getQuranReflectPostUrl } from '@/utils/quranReflect/navigation';\nimport { navigateToExternalUrl } from '@/utils/url';\n\ntype Props = {\n postId: number;\n selectedChapterId: string;\n selectedVerseNumber: string;\n};\n\nconst HeaderMenu: React.FC<Props> = ({ postId, selectedChapterId, selectedVerseNumber }) => {\n const { t } = useTranslation();\n\n const onMoreMenuClicked = () => {\n logButtonClick('reflection_item_more_menu');\n };\n\n const onViewOnQuranReflectClicked = () => {\n logButtonClick('view_on_quran_reflect');\n navigateToExternalUrl(getQuranReflectPostUrl(postId));\n };\n\n const onShareYourReflectionClicked = () => {\n logButtonClick('share_your_reflections');\n navigateToExternalUrl(getQuranReflectEditUrl(selectedChapterId, selectedVerseNumber));\n };\n\n return (\n <div>\n <PopoverMenu\n isPortalled={false}\n trigger={\n <Button\n size={ButtonSize.Small}\n tooltip={t('common:more')}\n variant={ButtonVariant.Ghost}\n shape={ButtonShape.Circle}\n onClick={onMoreMenuClicked}\n >\n <OverflowMenuIcon />\n </Button>\n }\n >\n <PopoverMenu.Item onClick={onViewOnQuranReflectClicked}>\n {t('quran-reader:view-on-quran-reflect')}\n </PopoverMenu.Item>\n <PopoverMenu.Item onClick={onShareYourReflectionClicked}>\n {t('quran-reader:share-your-reflection')}\n </PopoverMenu.Item>\n </PopoverMenu>\n </div>\n );\n};\n\nexport default HeaderMenu;\n","enum ReflectionLanguage {\n ENGLISH = 'ENGLISH',\n SPANISH = 'SPANISH',\n FRENCH = 'FRENCH',\n MALAY = 'MALAY',\n URDU = 'URDU',\n ARABIC = 'ARABIC',\n}\nexport default ReflectionLanguage;\n","import React from 'react';\n\nimport clipboardCopy from 'clipboard-copy';\nimport useTranslation from 'next-translate/useTranslation';\n\nimport styles from './SocialInteraction.module.scss';\n\nimport Button, { ButtonSize, ButtonVariant } from '@/dls/Button/Button';\nimport PopoverMenu from '@/dls/PopoverMenu/PopoverMenu';\nimport { ToastStatus, useToast } from '@/dls/Toast/Toast';\nimport ChatIcon from '@/icons/chat.svg';\nimport CopyLinkIcon from '@/icons/copy-link.svg';\nimport CopyIcon from '@/icons/copy.svg';\nimport LoveIcon from '@/icons/love.svg';\nimport ShareIcon from '@/icons/share.svg';\nimport { logButtonClick } from '@/utils/eventLogger';\nimport { toLocalizedNumber } from '@/utils/locale';\nimport { getQuranReflectPostUrl } from '@/utils/quranReflect/navigation';\nimport { getCopyReflectionContent } from '@/utils/quranReflect/string';\nimport { stripHTMLTags } from '@/utils/string';\nimport ReflectionFilter from 'types/QuranReflect/ReflectionFilter';\nimport TrimmedCitationTexts from 'types/QuranReflect/TrimmedCitationTexts';\n\ntype Props = {\n likesCount: number;\n commentsCount: number;\n postId: number;\n reflectionText: string;\n trimmedCitationTexts: TrimmedCitationTexts;\n filters: ReflectionFilter[];\n};\n\nconst SocialInteraction: React.FC<Props> = ({\n likesCount,\n commentsCount,\n postId,\n reflectionText,\n trimmedCitationTexts,\n filters,\n}) => {\n const { t, lang } = useTranslation();\n const toast = useToast();\n\n const onLikesCountClicked = () => {\n logButtonClick('reflection_item_likes');\n };\n\n const onCommentsCountClicked = () => {\n logButtonClick('reflection_item_comments');\n };\n\n const onCopyTextClicked = () => {\n logButtonClick('reflection_item_copy_text');\n clipboardCopy(\n stripHTMLTags(\n // eslint-disable-next-line i18next/no-literal-string\n `${reflectionText}\\r\\n\\r\\n${getCopyReflectionContent(\n trimmedCitationTexts,\n filters,\n )}\\r\\n\\r\\n${getQuranReflectPostUrl(postId)}`,\n ),\n ).then(() => toast(t('quran-reader:text-copied'), { status: ToastStatus.Success }));\n };\n\n const onCopyLinkClicked = () => {\n logButtonClick('reflection_item_copy_link');\n clipboardCopy(getQuranReflectPostUrl(postId)).then(() =>\n toast(t('common:shared'), { status: ToastStatus.Success }),\n );\n };\n return (\n <div className={styles.socialInteractionContainer}>\n <Button\n className={styles.actionItemContainer}\n variant={ButtonVariant.Compact}\n href={getQuranReflectPostUrl(postId)}\n isNewTab\n prefix={<LoveIcon />}\n size={ButtonSize.Small}\n onClick={onLikesCountClicked}\n shouldFlipOnRTL={false}\n >\n {toLocalizedNumber(likesCount, lang)}\n </Button>\n <Button\n className={styles.actionItemContainer}\n variant={ButtonVariant.Compact}\n prefix={<ChatIcon />}\n href={getQuranReflectPostUrl(postId, true)}\n isNewTab\n size={ButtonSize.Small}\n onClick={onCommentsCountClicked}\n shouldFlipOnRTL={false}\n >\n {toLocalizedNumber(commentsCount, lang)}\n </Button>\n\n <PopoverMenu\n isPortalled={false}\n trigger={\n <Button\n className={styles.actionItemContainer}\n variant={ButtonVariant.Compact}\n size={ButtonSize.Small}\n tooltip={t('common:share')}\n shouldFlipOnRTL={false}\n >\n <ShareIcon />\n </Button>\n }\n >\n <PopoverMenu.Item\n shouldCloseMenuAfterClick\n icon={<CopyLinkIcon />}\n onClick={onCopyLinkClicked}\n className={styles.item}\n >\n {t('quran-reader:cpy-link')}\n </PopoverMenu.Item>\n <PopoverMenu.Item\n shouldCloseMenuAfterClick\n icon={<CopyIcon />}\n onClick={onCopyTextClicked}\n className={styles.item}\n >\n {t('quran-reader:copy-text')}\n </PopoverMenu.Item>\n </PopoverMenu>\n </div>\n );\n};\n\nexport default SocialInteraction;\n","import ReflectionFilter from 'types/QuranReflect/ReflectionFilter';\nimport { ReflectionVerseReference } from 'types/QuranReflect/ReflectionVerseReference';\nimport TrimmedCitationTexts from 'types/QuranReflect/TrimmedCitationTexts';\n\n/**\n * Extract the verse references from reflection data\n *\n * @param {any} filters\n * @returns {ReflectionVerseReference[]} verseReferences\n */\nexport const getVerseReferencesFromReflectionFilters = (\n filters: ReflectionFilter[],\n): ReflectionVerseReference[] => {\n return filters.map((filter) => {\n const { surahNumber, from, to } = filter;\n\n return {\n chapter: Number(surahNumber),\n from: Number(from),\n to: Number(to),\n };\n });\n};\n\nconst getSurahNameByGroupTranslationId = (\n filters: ReflectionFilter[],\n groupSurahNumber: number,\n groupTranslationId: number,\n) => {\n const matchedSurahFilters = filters.find((filter) => {\n const { surahNumber } = filter;\n return surahNumber === groupSurahNumber;\n });\n const {\n chapter: { citationNames },\n } = matchedSurahFilters;\n const defaultCitationName = citationNames.find((citationName) => {\n const { translationId } = citationName;\n return groupTranslationId === translationId;\n });\n return defaultCitationName.name;\n};\n\n/**\n * Get the summary of the citation e.g.\n * \"Chapter 1: The Opening, Verses: 1 - 7\"\n *\n * @param {number[]} groupAyahNumbers an array of verse numbers of the citation group.\n * @param {number} groupSurahNumber the Surah number of the group.\n * @param {string} surahName the Surah name\n * @returns {string}\n */\nexport const getCitationSummary = (\n groupAyahNumbers: number[],\n groupSurahNumber: number,\n surahName: string,\n): string => {\n const citationNumberOfAyahs = groupAyahNumbers.length;\n return `Chapter ${groupSurahNumber}: ${surahName}, Verse${\n citationNumberOfAyahs > 1\n ? `s: ${groupAyahNumbers[0]} - ${groupAyahNumbers[citationNumberOfAyahs - 1]}`\n : `: ${groupAyahNumbers[0]}`\n }`;\n};\n\nexport const getCopyReflectionContent = (\n trimmedCitationTexts: TrimmedCitationTexts,\n filters: ReflectionFilter[],\n) => {\n let copyReflectionContent = '';\n Object.keys(trimmedCitationTexts).forEach((index) => {\n const citationTextGroup = trimmedCitationTexts[index];\n if (citationTextGroup?.[0]) {\n let citationGroupText = '';\n let groupSurahNumber: number;\n let groupTranslationId: number;\n const groupAyahNumbers = [];\n citationTextGroup?.[0].forEach((citationDetails) => {\n const { citationId, number: ayahNumber, translationId } = citationDetails;\n groupTranslationId = translationId;\n groupSurahNumber = Number(citationId) - 1;\n groupAyahNumbers.push(ayahNumber);\n citationGroupText += `${citationDetails.text} (${citationDetails.number}) `;\n });\n const surahName = getSurahNameByGroupTranslationId(\n filters,\n groupSurahNumber,\n groupTranslationId,\n );\n copyReflectionContent += `${getCitationSummary(\n groupAyahNumbers,\n groupSurahNumber,\n surahName,\n )}\\r\\n${citationGroupText}\\r\\n\\r\\n`;\n }\n });\n return copyReflectionContent;\n};\n","/* eslint-disable import/prefer-default-export */\n\nimport ReflectionLanguage from 'types/QuranReflect/ReflectionLanguage';\n\n/**\n * Check whether the reflection is RTL or LTR.\n *\n * @param {string} language\n * @returns {boolean}\n */\nexport const isRTLReflection = (language: ReflectionLanguage): boolean => {\n switch (language) {\n case ReflectionLanguage.ARABIC:\n case ReflectionLanguage.URDU:\n return true;\n\n default:\n return false;\n }\n};\n\nconst LOCALE_TO_REFLECTION_LANGUAGE_MAP = {\n ms: ReflectionLanguage.MALAY,\n id: ReflectionLanguage.MALAY,\n ur: ReflectionLanguage.URDU,\n ar: ReflectionLanguage.ARABIC,\n fr: ReflectionLanguage.FRENCH,\n};\n\n/**\n * Convert Next.js's locale to an array of languages that posts\n * should only be in. E.g. if locale is 'ar', allowed posts' languages\n * should be ARABIC and ENGLISH only.\n *\n * @param {string} locale e.g. 'ar'\n * @returns {ReflectionLanguage[]} e.g. ['ENGLISH', 'ARABIC']\n */\nexport const localeToReflectionLanguages = (locale: string): ReflectionLanguage[] => {\n // by default English is always allowed\n const allowedReflectionLanguages = [ReflectionLanguage.ENGLISH];\n const currentLocaleReflectionLanguage = LOCALE_TO_REFLECTION_LANGUAGE_MAP[locale];\n // if the current locale has corresponding locale on QR side\n if (currentLocaleReflectionLanguage) {\n allowedReflectionLanguages.push(currentLocaleReflectionLanguage);\n }\n return allowedReflectionLanguages;\n};\n","export const MAX_REFLECTION_LENGTH = 450;\n\n/**\n * Get the percentage of the initial visible portion of the post which\n * will be used to calculate how long it would take on average to\n * mark it as read relative to the post's estimated average reading time.\n * The percentage will be 100% if the post is shorter than MAX_REFLECTION_LENGTH.\n *\n * @param {number} reflectionTextLength\n * @returns {number}\n */\nexport const getInitialVisiblePostPercentage = (reflectionTextLength: number): number => {\n if (reflectionTextLength > MAX_REFLECTION_LENGTH) {\n return (MAX_REFLECTION_LENGTH * 100) / reflectionTextLength;\n }\n return 100;\n};\n\n/**\n * Estimate how long it would take to read the initial visible\n * portion of the post knowing the estimated reading time of the\n * entire post.\n *\n * @param {number} initialVisiblePostPercentage\n * @param {number} estimatedReadingTimeOfEntirePost\n * @returns {number}\n */\nexport const estimateReadingTimeOfInitialVisiblePortion = (\n initialVisiblePostPercentage: number,\n estimatedReadingTimeOfEntirePost: number,\n): number => {\n // we need to calculate the value if the initial visible portion is not 100%\n if (initialVisiblePostPercentage !== 100) {\n return (initialVisiblePostPercentage * estimatedReadingTimeOfEntirePost) / 100;\n }\n // if 100% is initially visible, estimated time to read should be the same as estimated time to read the entire post\n return estimatedReadingTimeOfEntirePost;\n};\n","/* eslint-disable max-lines */\nimport { useCallback, useContext, useMemo, useRef, useState } from 'react';\n\nimport useTranslation from 'next-translate/useTranslation';\n\nimport AuthorInfo from './AuthorInfo';\nimport HeaderMenu from './HeaderMenu';\nimport styles from './ReflectionItem.module.scss';\nimport SocialInteraction from './SocialInteraction';\n\nimport { REFLECTIONS_OBSERVER_ID } from '@/components/QuranReader/observer';\nimport useReflectionBodyParser from '@/components/QuranReflect/hooks/useReflectionBodyParser';\nimport VerseAndTranslation from '@/components/Verse/VerseAndTranslation';\nimport DataContext from '@/contexts/DataContext';\nimport useIntersectionObserver from '@/hooks/useObserveElement';\nimport { getChapterData } from '@/utils/chapter';\nimport { logButtonClick } from '@/utils/eventLogger';\nimport truncate from '@/utils/html-truncate';\nimport { isRTLReflection } from '@/utils/quranReflect/locale';\nimport { getVerseReferencesFromReflectionFilters } from '@/utils/quranReflect/string';\nimport {\n MAX_REFLECTION_LENGTH,\n getInitialVisiblePostPercentage,\n estimateReadingTimeOfInitialVisiblePortion,\n} from '@/utils/quranReflect/views';\nimport { makeVerseKey } from '@/utils/verse';\nimport AyahReflection from 'types/QuranReflect/AyahReflection';\n\ntype Props = {\n reflection: AyahReflection;\n selectedChapterId: string;\n selectedVerseNumber: string;\n};\n\nconst ReflectionItem: React.FC<Props> = ({\n reflection,\n selectedChapterId,\n selectedVerseNumber,\n}) => {\n const { id, createdAt, author, estimatedReadingTime } = reflection;\n const reflectionText = reflection?.body;\n // TODO: here\n const verseReferences = getVerseReferencesFromReflectionFilters(reflection.filters);\n const [isExpanded, setIsExpanded] = useState(false);\n const { t } = useTranslation();\n const [shouldShowReferredVerses, setShouldShowReferredVerses] = useState(false);\n const chaptersData = useContext(DataContext);\n const reflectionBodyRef = useRef(null);\n useIntersectionObserver(reflectionBodyRef, REFLECTIONS_OBSERVER_ID);\n\n const onReferredVersesHeaderClicked = () => {\n setShouldShowReferredVerses((prevShouldShowReferredVerses) => {\n logButtonClick(\n // eslint-disable-next-line i18next/no-literal-string\n `reflection_item_reference_${prevShouldShowReferredVerses ? 'close' : 'open'}`,\n );\n return !prevShouldShowReferredVerses;\n });\n };\n\n const onMoreLessClicked = () => {\n setIsExpanded((prevIsExpanded) => {\n // eslint-disable-next-line i18next/no-literal-string\n logButtonClick(`reflection_item_show_${prevIsExpanded ? 'less' : 'more'}`);\n return !prevIsExpanded;\n });\n };\n\n // some reference, are referencing to the entire chapter (doesn't have from/to properties)\n // we only want to show the data for references that have from/to properties\n const nonChapterVerseReferences = useMemo(\n () => verseReferences.filter((verse) => !!verse.from && !!verse.to),\n [verseReferences],\n );\n\n const getSurahName = useCallback(\n (chapterNumber) => {\n const surahName = getChapterData(chaptersData, chapterNumber.toString())?.transliteratedName;\n return `${t('common:surah')} ${surahName} (${chapterNumber})`;\n },\n [chaptersData, t],\n );\n\n const reflectionTextLength = useMemo(() => {\n return reflectionText?.length;\n }, [reflectionText?.length]);\n const estimatedReadingTimeOfInitialVisiblePortion = useMemo(() => {\n return estimateReadingTimeOfInitialVisiblePortion(\n getInitialVisiblePostPercentage(reflectionTextLength),\n estimatedReadingTime,\n );\n }, [estimatedReadingTime, reflectionTextLength]);\n\n const formattedText = useReflectionBodyParser(reflectionText, styles.hashtag);\n\n return (\n <div className={styles.container}>\n <div className={styles.header}>\n <AuthorInfo\n authorUsername={author?.username}\n authorName={author?.name}\n avatarUrl={author?.profileImg}\n date={createdAt}\n isAuthorVerified={reflection?.author?.verified}\n reflectionGroup={reflection?.group}\n reflectionGroupLink={reflection?.groupLink}\n verseReferences={verseReferences}\n nonChapterVerseReferences={nonChapterVerseReferences}\n onReferredVersesHeaderClicked={onReferredVersesHeaderClicked}\n shouldShowReferredVerses={shouldShowReferredVerses}\n />\n <HeaderMenu\n postId={id}\n selectedChapterId={selectedChapterId}\n selectedVerseNumber={selectedVerseNumber}\n />\n </div>\n {shouldShowReferredVerses && nonChapterVerseReferences?.length > 0 && (\n <div className={styles.verseAndTranslationsListContainer}>\n {nonChapterVerseReferences.map(({ chapter, from, to }) => (\n <div\n className={styles.verseAndTranslationContainer}\n key={makeVerseKey(chapter, from, to)}\n >\n {verseReferences.length > 1 && (\n <span className={styles.surahName}>{getSurahName(chapter)}</span>\n )}\n <VerseAndTranslation chapter={chapter} from={from} to={to} />\n </div>\n ))}\n </div>\n )}\n <div\n ref={reflectionBodyRef}\n data-post-id={id}\n data-count-as-viewed-after={estimatedReadingTimeOfInitialVisiblePortion}\n className={isRTLReflection(reflection.language) ? styles.rtl : styles.ltr}\n >\n <p className=\"debugger\" />\n <span\n className={styles.body}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{\n __html: isExpanded ? formattedText : truncate(formattedText, MAX_REFLECTION_LENGTH),\n }}\n />\n {reflectionTextLength > MAX_REFLECTION_LENGTH && (\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events\n <span\n className={styles.moreOrLessText}\n tabIndex={0}\n role=\"button\"\n onClick={onMoreLessClicked}\n >\n {isExpanded ? t('quran-reader:see-less') : t('quran-reader:see-more')}\n </span>\n )}\n </div>\n <SocialInteraction\n filters={reflection.filters}\n reflectionText={reflectionText}\n likesCount={reflection?.likes}\n trimmedCitationTexts={reflection.trimmedCitationTexts}\n commentsCount={reflection?.commentsCount}\n postId={id}\n />\n </div>\n );\n};\n\nexport default ReflectionItem;\n","import useTranslation from 'next-translate/useTranslation';\n\nimport styles from './ReflectionDisclaimerMessage.module.scss';\n\nconst ReflectionNotAvailableMessage = () => {\n const { t } = useTranslation();\n return (\n <div className={styles.reflectionDisclaimerMessage}>\n {t('quran-reader:reflection-not-available')}\n </div>\n );\n};\n\nexport default ReflectionNotAvailableMessage;\n","import React, { useCallback, useContext, useMemo } from 'react';\n\nimport useTranslation from 'next-translate/useTranslation';\n\nimport styles from './ReflectionBody.module.scss';\n\nimport ReflectionDisclaimerMessage from '@/components/QuranReader/ReflectionView/ReflectionDisclaimerMessage';\nimport ReflectionItem from '@/components/QuranReader/ReflectionView/ReflectionItem';\nimport ReflectionNotAvailableMessage from '@/components/QuranReader/ReflectionView/ReflectionNotAvailableMessage';\nimport TafsirEndOfScrollingActions from '@/components/QuranReader/TafsirView/TafsirEndOfScrollingActions';\nimport VerseAndTranslation from '@/components/Verse/VerseAndTranslation';\nimport Button from '@/dls/Button/Button';\nimport Separator from '@/dls/Separator/Separator';\nimport { logButtonClick } from '@/utils/eventLogger';\nimport { fakeNavigate, getVerseReflectionNavigationUrl } from '@/utils/navigation';\nimport { localeToReflectionLanguages } from '@/utils/quranReflect/locale';\nimport { getQuranReflectVerseUrl } from '@/utils/quranReflect/navigation';\nimport { isFirstVerseOfSurah, isLastVerseOfSurah, makeVerseKey } from '@/utils/verse';\nimport DataContext from 'src/contexts/DataContext';\nimport AyahReflectionsResponse from 'types/QuranReflect/AyahReflectionsResponse';\n\ninterface Props {\n selectedChapterId: string;\n selectedVerseNumber: string;\n data: AyahReflectionsResponse;\n scrollToTop: () => void;\n setSelectedVerseNumber: (verseNumber: string) => void;\n}\n\nconst ReflectionBody: React.FC<Props> = ({\n selectedChapterId,\n selectedVerseNumber,\n data,\n scrollToTop,\n setSelectedVerseNumber,\n}) => {\n const { t, lang } = useTranslation('quran-reader');\n const chaptersData = useContext(DataContext);\n const hasNextVerse = !isLastVerseOfSurah(\n chaptersData,\n selectedChapterId,\n Number(selectedVerseNumber),\n );\n const hasPrevVerse = !isFirstVerseOfSurah(Number(selectedVerseNumber));\n\n const loadNextVerse = useCallback(() => {\n logButtonClick('reflection_next_verse');\n scrollToTop();\n const newVerseNumber = String(Number(selectedVerseNumber) + 1);\n fakeNavigate(\n getVerseReflectionNavigationUrl(\n makeVerseKey(Number(selectedChapterId), Number(newVerseNumber)),\n ),\n lang,\n );\n setSelectedVerseNumber(newVerseNumber);\n }, [lang, scrollToTop, selectedChapterId, selectedVerseNumber, setSelectedVerseNumber]);\n\n const loadPrevVerse = useCallback(() => {\n const newVerseNumber = String(Number(selectedVerseNumber) - 1);\n logButtonClick('reflection_prev_verse');\n scrollToTop();\n setSelectedVerseNumber(newVerseNumber);\n fakeNavigate(\n getVerseReflectionNavigationUrl(\n makeVerseKey(Number(selectedChapterId), Number(newVerseNumber)),\n ),\n lang,\n );\n }, [lang, scrollToTop, selectedChapterId, selectedVerseNumber, setSelectedVerseNumber]);\n const filteredPosts = useMemo(() => {\n return data?.posts?.filter((reflection) =>\n localeToReflectionLanguages(lang).includes(reflection.language),\n );\n }, [data?.posts, lang]);\n\n const onReadMoreClicked = () => {\n logButtonClick('read_more_reflections');\n };\n\n return (\n <div className={styles.container}>\n <VerseAndTranslation\n from={Number(selectedVerseNumber)}\n to={Number(selectedVerseNumber)}\n chapter={Number(selectedChapterId)}\n />\n <div className={styles.separatorContainer}>\n <Separator />\n </div>\n {filteredPosts?.length === 0 ? (\n <ReflectionNotAvailableMessage />\n ) : (\n <ReflectionDisclaimerMessage />\n )}\n {filteredPosts?.map((reflection) => (\n <ReflectionItem\n key={reflection.id}\n reflection={reflection}\n selectedChapterId={selectedChapterId}\n selectedVerseNumber={selectedVerseNumber}\n />\n ))}\n <div className={styles.readMoreButtonContainer}>\n <Button\n href={getQuranReflectVerseUrl(selectedChapterId, selectedVerseNumber)}\n onClick={onReadMoreClicked}\n isNewTab\n >\n {t('read-more-quran-reflect')}\n </Button>\n </div>\n\n <div className={styles.endOfScrollActionsContainer}>\n <TafsirEndOfScrollingActions\n hasNextVerseGroup={hasNextVerse}\n hasPrevVerseGroup={hasPrevVerse}\n onNextButtonClicked={loadNextVerse}\n onPreviousButtonClicked={loadPrevVerse}\n />\n </div>\n </div>\n );\n};\n\nexport default ReflectionBody;\n","import useTranslation from 'next-translate/useTranslation';\n\nimport styles from './TafsirEndOfScrollingActions.module.scss';\n\nimport Button, { ButtonType } from '@/dls/Button/Button';\n\ntype TafsirEndOfScrollingActionsProps = {\n hasNextVerseGroup: boolean;\n hasPrevVerseGroup: boolean;\n onNextButtonClicked: () => void;\n onPreviousButtonClicked: () => void;\n};\n\nconst TafsirEndOfScrollingActions = ({\n hasNextVerseGroup,\n hasPrevVerseGroup,\n onNextButtonClicked,\n onPreviousButtonClicked,\n}: TafsirEndOfScrollingActionsProps) => {\n const { t } = useTranslation('common');\n return (\n <div className={styles.container}>\n <div>\n {hasPrevVerseGroup && (\n <Button type={ButtonType.Secondary} onClick={onPreviousButtonClicked}>\n {t('previous-ayah')}\n </Button>\n )}\n </div>\n <div>\n {hasNextVerseGroup && (\n <Button type={ButtonType.Secondary} onClick={onNextButtonClicked}>\n {t('next-ayah')}\n </Button>\n )}\n </div>\n </div>\n );\n};\n\nexport default TafsirEndOfScrollingActions;\n","/* eslint-disable react/no-danger */\n\nimport React, { MouseEvent } from 'react';\n\nimport classNames from 'classnames';\nimport useTranslation from 'next-translate/useTranslation';\n\nimport styles from './FootnoteText.module.scss';\nimport transStyles from './TranslationText.module.scss';\n\nimport Button, { ButtonSize, ButtonShape, ButtonVariant } from '@/dls/Button/Button';\nimport Spinner from '@/dls/Spinner/Spinner';\nimport CloseIcon from '@/icons/close.svg';\nimport { getLanguageDataById, findLanguageIdByLocale } from '@/utils/locale';\nimport Footnote from 'types/Footnote';\n\ninterface FootnoteTextProps {\n footnoteName?: string; // can be a number or a string (e.g. \"sg\" or \"pl\")\n footnote: Footnote;\n onCloseClicked: () => void;\n onTextClicked?: (event: MouseEvent, isSubFootnote?: boolean) => void;\n isLoading?: boolean;\n}\n\nconst FootnoteText: React.FC<FootnoteTextProps> = ({\n footnoteName,\n footnote,\n onCloseClicked,\n onTextClicked,\n isLoading,\n}) => {\n const { t, lang } = useTranslation('quran-reader');\n\n const languageId = footnote?.languageId || findLanguageIdByLocale(lang);\n const landData = getLanguageDataById(languageId);\n\n return (\n <div className={styles.footnoteContainer}>\n <div className={styles.header}>\n <p>\n {t('footnote')} {footnoteName ? `- ${footnoteName}` : null}\n </p>\n <Button\n size={ButtonSize.Small}\n variant={ButtonVariant.Ghost}\n shape={ButtonShape.Circle}\n onClick={onCloseClicked}\n >\n <CloseIcon />\n </Button>\n </div>\n {isLoading ? (\n <Spinner />\n ) : (\n <div\n className={classNames(\n styles.text,\n transStyles[landData.direction],\n transStyles[landData.font],\n )}\n dangerouslySetInnerHTML={{ __html: footnote.text }}\n {...(onTextClicked && { onClick: onTextClicked })}\n />\n )}\n </div>\n );\n};\n\nexport default FootnoteText;\n","/* eslint-disable react-func/max-lines-per-function */\n/* eslint-disable jsx-a11y/no-static-element-interactions */\n/* eslint-disable jsx-a11y/click-events-have-key-events */\n/* eslint-disable react/no-danger */\n\nimport React, { MouseEvent, useState } from 'react';\n\nimport classNames from 'classnames';\nimport useTranslation from 'next-translate/useTranslation';\n\nimport FootnoteText from './FootnoteText';\nimport styles from './TranslationText.module.scss';\n\nimport { logButtonClick } from '@/utils/eventLogger';\nimport { getLanguageDataById } from '@/utils/locale';\nimport { getFootnote } from 'src/api';\nimport Footnote from 'types/Footnote';\n\ninterface Props {\n translationFontScale: number;\n text: string;\n resourceName?: string;\n languageId: number;\n}\n\nconst TranslationText: React.FC<Props> = ({\n translationFontScale,\n text,\n languageId,\n resourceName,\n}) => {\n const { t } = useTranslation('quran-reader');\n const [isLoading, setIsLoading] = useState(false);\n const [showFootnote, setShowFootnote] = useState(true);\n const [footnote, setFootnote] = useState<Footnote>(null);\n const [activeFootnoteName, setActiveFootnoteName] = useState<string | null>(null);\n const [activeSubFootnoteName, setActiveSubFootnoteName] = useState<string | null>(null);\n const [subFootnote, setSubFootnote] = useState<Footnote>(null);\n\n const PRE_DEFINED_FOOTNOTES = {\n sg: t('footnote-sg'),\n pl: t('footnote-pl'),\n dl: t('footnote-dl'),\n };\n\n const resetFootnote = () => {\n setFootnote(null);\n setSubFootnote(null);\n setIsLoading(false);\n setActiveFootnoteName(null);\n setActiveSubFootnoteName(null);\n };\n\n const resetSubFootnote = () => {\n setSubFootnote(null);\n setActiveSubFootnoteName(null);\n };\n\n /**\n * Handle when the translation text is clicked. This is needed to handle when a footnote\n * is clicked since we receive the translation text as HTML from BE. Any footnote will\n * be inside an <sup>...</sup> element. so when the translation container is clicked\n * we check whether the clicked element is of tag name SUP and if so, we handle showing the\n * footnote as following:\n *\n * 1. If it's not a sub-footnote (a footnote inside a footnote) which is all translations\n * except Bridge's Foundation translation:\n * 1. check if the sup element has foot_note attribute (the ID) and if it has:\n * 1. Check if we already have a footnote in the local state with the same ID:\n * 1. if yes, it means this is the second time the user clicks on the\n * footnote so we should close the footnote.\n * 2. if no, it means we need to call BE to fetch the footnote text by its ID.\n * 2. if not, it means it's a pre-defined footnote and in this case, we access the text\n * inside the element and check if it's in the list of pre-defined footnotes and if it\n * is, we get the value from the pre-defined footnotes and assign it as the footnote\n * text without having to call BE (only happens with Bridge's Foundation translation)\n * 2. If it's a sub-footnote it will only have pre-defined footnotes so we handle it the same\n * way as above (only happens with Bridge's Foundation translation, ex: Surah 30, Verse 11).\n *\n * @param {MouseEvent} event\n * @param {boolean} isSubFootnote whether we are handling a footnote or a sub-footnote (only happens\n * with Bridge's Foundation translation).\n */\n const onTextClicked = (event: MouseEvent, isSubFootnote = false) => {\n const target = event.target as HTMLElement;\n\n // if we just clicked on anything other than a footnote element, return early.\n if (target.tagName !== 'SUP') {\n return;\n }\n // we get the text inside the sup element and trim the extra spaces.\n const footnoteText = target.innerText.trim();\n\n // if it's the main footnote and not the sub footnote.\n if (!isSubFootnote) {\n const footNoteId = target.getAttribute('foot_note');\n\n // Set the activeFootnoteNumber to the current number of the footnote from the <sup> innerHTML\n setActiveFootnoteName(footnoteText);\n\n // if it's the normal case that needs us to call BE and not a fixed footnote like the ones found for Bridge's translation.\n if (footNoteId) {\n // if this is the second time to click the footnote, close it\n if (showFootnote && footnote && footnote.id === Number(footNoteId)) {\n logButtonClick('translation_footnote_double_click_to_close');\n resetFootnote();\n } else {\n logButtonClick('translation_show_footnote');\n resetSubFootnote();\n setShowFootnote(true);\n setIsLoading(true);\n getFootnote(footNoteId)\n .then((res) => {\n if (res.status !== 500) {\n setFootnote(res.footNote);\n }\n })\n .finally(() => {\n setIsLoading(false);\n });\n }\n } else if (footnote && footnote.id === footnoteText) {\n // if this is the second time we are clicking on the footnote, we close it.\n logButtonClick('translation_pre_defined_footnote_double_click_to_close');\n resetFootnote();\n } else if (PRE_DEFINED_FOOTNOTES[footnoteText]) {\n logButtonClick('translation_pre_defined_footnote');\n resetSubFootnote();\n setFootnote({\n id: footnoteText,\n text: PRE_DEFINED_FOOTNOTES[footnoteText],\n });\n }\n } else {\n // Set the activeSubFootnoteNumber to the current number of the footnote from the <sup> innerHTML\n setActiveSubFootnoteName(footnoteText);\n\n const subFootnoteId = `${footnote.id} - ${footnoteText}`;\n // if this is the second time we are clicking on the sub footnote, we close it.\n if (subFootnote && subFootnote.id === subFootnoteId) {\n logButtonClick('translation_sub_footnote_double_click_to_close');\n resetSubFootnote();\n } else if (PRE_DEFINED_FOOTNOTES[footnoteText]) {\n logButtonClick('translation_show_sub_footnote');\n setSubFootnote({\n id: subFootnoteId,\n text: PRE_DEFINED_FOOTNOTES[footnoteText],\n });\n }\n }\n };\n const hideFootnote = () => setShowFootnote(false);\n const langData = getLanguageDataById(languageId);\n\n const shouldShowFootnote = showFootnote && (footnote || isLoading);\n return (\n <div className={styles[`translation-font-size-${translationFontScale}`]}>\n <div\n onClick={(event) => onTextClicked(event)}\n className={classNames(styles.text, styles[langData.direction], styles[langData.font])}\n dangerouslySetInnerHTML={{ __html: text }}\n />\n {shouldShowFootnote && (\n <FootnoteText\n footnoteName={activeFootnoteName || undefined}\n footnote={footnote}\n isLoading={isLoading}\n onCloseClicked={() => {\n logButtonClick('translation_footnote_close');\n if (isLoading) {\n hideFootnote();\n } else {\n resetFootnote();\n }\n }}\n onTextClicked={(event) => onTextClicked(event, true)}\n />\n )}\n {subFootnote && (\n <FootnoteText\n footnoteName={activeSubFootnoteName || undefined}\n footnote={subFootnote}\n onCloseClicked={resetSubFootnote}\n />\n )}\n {resourceName && (\n <p\n className={classNames(\n styles.translationName,\n styles[langData.direction],\n styles[langData.font],\n )}\n // eslint-disable-next-line i18next/no-literal-string\n >\n — {resourceName}\n </p>\n )}\n </div>\n );\n};\n\nexport default TranslationText;\n","/* eslint-disable @typescript-eslint/naming-convention */\n/* eslint-disable import/prefer-default-export */\nimport { getQuranReflectTagUrl } from './navigation';\n\n/**\n * Wraps hashtags in links: It finds all hashtags starting with # followed\n * by one or more word characters (\\w+). The captured hashtag is then\n * used to create a link.\n *\n * @param {string} tag\n * @param {string} hashtagStyle\n * @returns {string}\n */\nconst tagToLink = (tag: string, hashtagStyle: string): string => {\n const tagWithHashTag = `#${tag}`;\n return `<a target=\"_blank\" href=\"${getQuranReflectTagUrl(\n tagWithHashTag,\n )}\" class=\"${hashtagStyle}\">${tagWithHashTag}</a>`;\n};\n\n/**\n * Replaces URLs in a given text with HTML anchor tags.\n *\n * @param {string} text - The input text containing URLs.\n * @returns {string} The text with URLs replaced by anchor tags.\n */\nconst replaceUrlsWithLinks = (text: string): string => {\n const regex = /(\\b(https?|ftp|file):\\/\\/[-A-Z0-9+&@#/%?=~_|!:,.;]*[-A-Z0-9+&@#/%=~_|])/gi;\n return text.replace(regex, (url) => {\n // Check if URL is already linked\n const surroundingLength = 100; // Number of characters around the URL to check for <a> tag\n const index = text.indexOf(url);\n\n const beforeText = text.slice(Math.max(0, index - surroundingLength), index);\n const afterText = text.slice(index + url.length, index + url.length + surroundingLength);\n\n if (beforeText.includes('<a href=') && afterText.includes('</a>')) {\n // URL is already inside an anchor tag, return as is\n return url;\n }\n\n // Convert URL to a link\n return `<a href='${url}' target='_blank'>${url}</a>`;\n });\n};\n\nexport const parseReflectionBody = (reflectionBody: string, hashtagStyle: string): string => {\n return (\n // 1. Wraps URLs in links: Find all URLs starting with http or https. The captured URL is then used to create a link.\n replaceUrlsWithLinks(reflectionBody)\n // 2. Replaces new lines: match all occurrences of new lines (\\n) and carriage returns (\\r) and replaces them with the <br> tag.\n .replace(/\\r?\\n/g, '<br>')\n // 3. Wraps hashtags in links: Find all hashtags starting with # followed by one or more word characters (\\w+). The captured hashtag is then used to create a link.\n .replace(/#(\\w+)/g, (_, tag) => tagToLink(tag, hashtagStyle))\n );\n};\n","import { useMemo } from 'react';\n\nimport { parseReflectionBody } from '@/utils/quranReflect/bodyParser';\n\n/**\n * A hook to parse the reflection body and replace the hashtags with links.\n *\n * TODO: make all usages of this hook DRY.\n *\n * @param {string} reflectionText\n * @param {string} hashtagStyle\n * @returns {string}\n */\nconst useReflectionBodyParser = (reflectionText: string, hashtagStyle: string): string => {\n const parsedBody = useMemo(\n () => parseReflectionBody(reflectionText, hashtagStyle),\n [hashtagStyle, reflectionText],\n );\n\n return parsedBody;\n};\n\nexport default useReflectionBodyParser;\n","import useTranslation from 'next-translate/useTranslation';\nimport { shallowEqual, useSelector } from 'react-redux';\nimport useSWR from 'swr/immutable';\n\nimport Spinner from '../dls/Spinner/Spinner';\nimport TranslationText from '../QuranReader/TranslationView/TranslationText';\n\nimport PlainVerseText from './PlainVerseText';\nimport styles from './VerseAndTranslation.module.scss';\n\nimport Error from '@/components/Error';\nimport useQcfFont from '@/hooks/useQcfFont';\nimport { selectQuranReaderStyles } from '@/redux/slices/QuranReader/styles';\nimport { selectSelectedTranslations } from '@/redux/slices/QuranReader/translations';\nimport { getDefaultWordFields, getMushafId } from '@/utils/api';\nimport { makeVersesUrl } from '@/utils/apiPaths';\nimport { areArraysEqual } from '@/utils/array';\nimport { getVerseWords } from '@/utils/verse';\nimport { fetcher } from 'src/api';\nimport { VersesResponse } from 'types/ApiResponses';\n\n/**\n * Given a verse range\n * - Fetch the verse + translations data\n * - and return it\n *\n * The use case of this component is mainly for Verse and Translation that needs to be fetched on client\n * dynamically (not SSR). For example, for the reflection's feature verse reference\n *\n */\ninterface Props {\n chapter: number;\n from: number;\n to: number;\n}\n\nconst VerseAndTranslation: React.FC<Props> = ({ chapter, from, to }) => {\n const { lang } = useTranslation();\n const translations = useSelector(selectSelectedTranslations, areArraysEqual);\n const { quranFont, mushafLines, translationFontScale } = useSelector(\n selectQuranReaderStyles,\n shallowEqual,\n );\n\n const mushafId = getMushafId(quranFont, mushafLines).mushaf;\n const apiParams = {\n ...getDefaultWordFields(quranFont),\n translationFields: 'resource_name,language_id',\n translations: translations.join(','),\n mushaf: mushafId,\n from: `${chapter}:${from}`,\n to: `${chapter}:${to}`,\n };\n\n const shouldFetchData = !!from;\n\n const { data, error, mutate } = useSWR<VersesResponse>(\n shouldFetchData ? makeVersesUrl(chapter, lang, apiParams) : null,\n fetcher,\n );\n\n useQcfFont(quranFont, data?.verses ? data.verses : []);\n\n if (error) return <Error error={error} onRetryClicked={mutate} />;\n\n if (!data) return <Spinner />;\n\n return (\n <div className={styles.container}>\n {data?.verses.map((verse) => (\n <div key={verse.verseKey} className={styles.verseContainer}>\n <div className={styles.arabicVerseContainer}>\n <PlainVerseText words={getVerseWords(verse)} />\n </div>\n <div className={styles.translationsListContainer}>\n {verse.translations?.map((translation) => (\n <div key={translation.id} className={styles.translationContainer}>\n <TranslationText\n languageId={translation.languageId}\n resourceName={translation.resourceName}\n translationFontScale={translationFontScale}\n text={translation.text}\n />\n </div>\n ))}\n </div>\n </div>\n ))}\n </div>\n );\n};\n\nexport default VerseAndTranslation;\n","import { RefObject, useEffect } from 'react';\n\n/**\n * This is a hook that is mean to be used in combination with {@see useGlobalIntersectionObserver}\n * that will use the global observer that had been created by the above hook to observe an element.\n *\n * @param {RefObject<Element>} elementRef the ref of the object that will be observed.\n * @param {string} observerId the name of the global observer that the element wants to use.\n */\nconst useObserveElement = (elementRef: RefObject<Element>, observerId: string) => {\n useEffect(() => {\n const node = elementRef?.current; // DOM Ref\n const hasIOSupport = !!window.IntersectionObserver;\n if (!hasIOSupport || !node) return undefined;\n\n // in-case useGlobalIntersectionObserver hasn't been used.\n if (window[observerId]) {\n window[observerId].observe(node);\n }\n return () => {\n if (window[observerId]) {\n window[observerId].unobserve(node);\n }\n };\n }, [elementRef, observerId]);\n};\n\nexport default useObserveElement;\n","import { useEffect, useCallback, useRef } from 'react';\n\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport { selectLoadedFontFaces, addLoadedFontFace } from '@/redux/slices/QuranReader/font-faces';\nimport { removeItemFromArray } from '@/utils/array';\nimport {\n getFontFaceNameForPage,\n getV1OrV2FontFaceSource,\n getPagesByVerses,\n isQCFFont,\n} from '@/utils/fontFaceHelper';\nimport { QuranFont } from 'types/QuranReader';\nimport Verse from 'types/Verse';\n\n/**\n * This hook manually request the browser to download the font for each page\n * of QCF's V1 and V2 Mushafs. After each resource has been downloaded, we\n * store it in redux so that VerseText can use it to determine whether the fallback\n * text and font should be font or not.\n *\n * Notes, loaded font is reset every time the user switch the font\n * see src/components/Navbar/SettingsDrawer/QuranFontSection.tsx\n *\n * @param {QuranFont} quranFont\n * @param {Verse[]} verses\n */\nconst useQcfFont = (quranFont: QuranFont, verses: Verse[]) => {\n const currentlyFetchingFonts = useRef([]);\n const dispatch = useDispatch();\n const isFontQCF = isQCFFont(quranFont);\n const loadedFonts = useSelector(selectLoadedFontFaces);\n const onFontLoaded = useCallback(\n (fontFace: string) => {\n dispatch(addLoadedFontFace(fontFace));\n },\n [dispatch],\n );\n\n // listen to changes in verses (this is due to infinite scrolling fetching more verses).\n useEffect(() => {\n if (isFontQCF && verses.length > 0) {\n // loop through unique page numbers of the current verses\n getPagesByVerses(verses).forEach((pageNumber) => {\n const isV1 = quranFont === QuranFont.MadaniV1;\n const fontFaceName = getFontFaceNameForPage(isV1, pageNumber);\n const fontFace = new FontFace(fontFaceName, getV1OrV2FontFaceSource(isV1, pageNumber));\n // we only want to load fonts that were not loaded and also are not currently being loaded\n if (\n !currentlyFetchingFonts.current.includes(fontFaceName) &&\n !loadedFonts.includes(fontFaceName)\n ) {\n currentlyFetchingFonts.current = [...currentlyFetchingFonts.current, fontFaceName];\n fontFace.display = 'block';\n document.fonts.add(fontFace);\n // load the font-face programmatically\n fontFace\n .load()\n .then(() => {\n // store the font face in Redux slice\n onFontLoaded(fontFaceName);\n })\n .finally(() => {\n // whether we failed or succeeded to fetch the fontFace, we remove it from currently fetching array\n currentlyFetchingFonts.current = removeItemFromArray(\n fontFaceName,\n currentlyFetchingFonts.current,\n );\n });\n }\n });\n }\n }, [quranFont, verses, loadedFonts, isFontQCF, currentlyFetchingFonts, onFontLoaded]);\n};\n\nexport default useQcfFont;\n","/* eslint-disable unicorn/no-abusive-eslint-disable */\n/* eslint-disable */\n// @ts-nocheck\n\n// Source: https://github.com/huang47/nodejs-html-truncate/blob/master/lib/truncate.js\n\nfunction truncate(string, maxLength, options?) {\n const EMPTY_OBJECT = {};\n const EMPTY_STRING = '';\n const DEFAULT_TRUNCATE_SYMBOL = '...';\n const DEFAULT_SLOP = maxLength < 10 ? maxLength : 10;\n const EXCLUDE_TAGS = ['img', 'br']; // non-closed tags\n const items = []; // stack for saving tags\n let total = 0; // record how many characters we traced so far\n let content = EMPTY_STRING; // truncated text storage\n const KEY_VALUE_REGEX = '([\\\\w|-]+\\\\s*=\\\\s*\"[^\"]*\"\\\\s*)*';\n const IS_CLOSE_REGEX = '\\\\s*\\\\/?\\\\s*';\n const CLOSE_REGEX = '\\\\s*\\\\/\\\\s*';\n const SELF_CLOSE_REGEX = new RegExp(`<\\\\/?\\\\w+\\\\s*${KEY_VALUE_REGEX}${CLOSE_REGEX}>`);\n const HTML_TAG_REGEX = new RegExp(`<\\\\/?\\\\w+\\\\s*${KEY_VALUE_REGEX}${IS_CLOSE_REGEX}>`);\n const URL_REGEX =\n /(((ftp|https?):\\/\\/)[\\-\\w@:%_\\+.~#?,&\\/\\/=]+)|((mailto:)?[_.\\w\\-]+@([\\w][\\w\\-]+\\.)+[a-zA-Z]{2,3})/g; // Simple regexp\n const IMAGE_TAG_REGEX = new RegExp(`<img\\\\s*${KEY_VALUE_REGEX}${IS_CLOSE_REGEX}>`);\n const WORD_BREAK_REGEX = new RegExp('\\\\W+', 'g');\n let matches = true;\n let result;\n let index;\n let tail;\n let tag;\n let selfClose;\n\n /**\n * Remove image tag\n *\n * @private\n * @function _removeImageTag\n * @param {string} string not-yet-processed string\n * @returns {string} string without image tags\n */\n function _removeImageTag(string) {\n const match = IMAGE_TAG_REGEX.exec(string);\n let index;\n let len;\n\n if (!match) {\n return string;\n }\n\n index = match.index;\n len = match[0].length;\n\n return string.substring(0, index) + string.substring(index + len);\n }\n\n /**\n * Dump all close tags and append to truncated content while reaching upperbound\n *\n * @private\n * @function _dumpCloseTag\n * @param {string[]} tags a list of tags which should be closed\n * @returns {string} well-formatted html\n */\n function _dumpCloseTag(tags) {\n let html = '';\n\n tags.reverse().forEach((tag, index) => {\n // dump non-excluded tags only\n if (EXCLUDE_TAGS.indexOf(tag) === -1) {\n html += `</${tag}>`;\n }\n });\n\n return html;\n }\n\n /**\n * Process tag string to get pure tag name\n *\n * @private\n * @function _getTag\n * @param {string} string original html\n * @returns {string} tag name\n */\n function _getTag(string) {\n let tail = string.indexOf(' ');\n\n // TODO:\n // we have to figure out how to handle non-well-formatted HTML case\n if (tail === -1) {\n tail = string.indexOf('>');\n if (tail === -1) {\n throw new Error(`HTML tag is not well-formed : ${string}`);\n }\n }\n\n return string.substring(1, tail);\n }\n\n /**\n * Get the end position for String#substring()\n *\n * If options.truncateLastWord is FALSE, we try to the end position up to\n * options.slop characters to avoid breaking in the middle of a word.\n *\n * @private\n * @function _getEndPosition\n * @param {string} string original html\n * @param {number} tailPos (optional) provided to avoid extending the slop into trailing HTML tag\n * @returns {number} maxLength\n */\n function _getEndPosition(string, tailPos) {\n const defaultPos = maxLength - total;\n let position = defaultPos;\n const isShort = defaultPos < options.slop;\n const slopPos = isShort ? defaultPos : options.slop - 1;\n let substr;\n const startSlice = isShort ? 0 : defaultPos - options.slop;\n const endSlice = tailPos || defaultPos + options.slop;\n let result;\n\n if (!options.truncateLastWord) {\n substr = string.slice(startSlice, endSlice);\n\n if (tailPos && substr.length <= tailPos) {\n position = substr.length;\n } else {\n while ((result = WORD_BREAK_REGEX.exec(substr)) !== null) {\n // a natural break position before the hard break position\n if (result.index < slopPos) {\n position = defaultPos - (slopPos - result.index);\n // keep seeking closer to the hard break position\n // unless a natural break is at position 0\n if (result.index === 0 && defaultPos <= 1) break;\n }\n // a natural break position exactly at the hard break position\n else if (result.index === slopPos) {\n position = defaultPos;\n break; // seek no more\n }\n // a natural break position after the hard break position\n else {\n position = defaultPos + (result.index - slopPos);\n break; // seek no more\n }\n }\n }\n if (string.charAt(position - 1).match(/\\s$/)) position--;\n }\n return position;\n }\n\n options = options || EMPTY_OBJECT;\n options.ellipsis = undefined !== options.ellipsis ? options.ellipsis : DEFAULT_TRUNCATE_SYMBOL;\n options.truncateLastWord =\n undefined !== options.truncateLastWord ? options.truncateLastWord : true;\n options.slop = undefined !== options.slop ? options.slop : DEFAULT_SLOP;\n\n while (matches) {\n matches = HTML_TAG_REGEX.exec(string);\n\n if (!matches) {\n if (total >= maxLength) {\n break;\n }\n\n matches = URL_REGEX.exec(string);\n if (!matches || matches.index >= maxLength) {\n content += string.substring(0, _getEndPosition(string));\n break;\n }\n\n while (matches) {\n result = matches[0];\n index = matches.index;\n content += string.substring(0, index + result.length - total);\n string = string.substring(index + result.length);\n matches = URL_REGEX.exec(string);\n }\n break;\n }\n\n result = matches[0];\n index = matches.index;\n\n if (total + index > maxLength) {\n // exceed given `maxLength`, dump everything to clear stack\n content += string.substring(0, _getEndPosition(string, index));\n break;\n } else {\n total += index;\n content += string.substring(0, index);\n }\n\n if (result[1] === '/') {\n // move out open tag\n items.pop();\n selfClose = null;\n } else {\n selfClose = SELF_CLOSE_REGEX.exec(result);\n if (!selfClose) {\n tag = _getTag(result);\n\n items.push(tag);\n }\n }\n\n if (selfClose) {\n content += selfClose[0];\n } else {\n content += result;\n }\n string = string.substring(index + result.length);\n }\n\n if (string.length > maxLength - total && options.ellipsis) {\n content += options.ellipsis;\n }\n content += _dumpCloseTag(items);\n\n if (!options.keepImageTag) {\n content = _removeImageTag(content);\n }\n\n return content;\n}\n\nexport default truncate;\n","import stringify from '@/utils/qs-stringify';\n\nconst STAGING_API_HOST = 'https://quranreflect.org';\nconst PRODUCTION_API_HOST = 'https://quranreflect.com';\n\n// env variables in Vercel can't be dynamic, we have to hardcode the urls here. https://stackoverflow.com/questions/44342226/next-js-error-only-absolute-urls-are-supported\nexport const API_HOST =\n process.env.NEXT_PUBLIC_VERCEL_ENV === 'production' ? PRODUCTION_API_HOST : STAGING_API_HOST;\n\nconst getQuranReflectFilteredVerseUrl = (chapterId: string, verseNumber: string, params) => {\n return `${API_HOST}?filters=${chapterId}:${verseNumber}&${stringify(params)}`;\n};\n\nexport const getQuranReflectVerseUrl = (chapterId: string, verseNumber: string) => {\n return getQuranReflectFilteredVerseUrl(chapterId, verseNumber, { feed: true });\n};\n\nexport const getQuranReflectEditUrl = (chapterId: string, verseNumber: string) => {\n return getQuranReflectFilteredVerseUrl(chapterId, verseNumber, { edit: true });\n};\n\nexport const getQuranReflectAuthorUrl = (username: string) => {\n return `${API_HOST}/${username}`;\n};\n\nexport const getQuranReflectPostUrl = (postId: number | string, viewComments = false) =>\n `${API_HOST}/posts/${postId}${viewComments ? '#comments' : ''}`;\n\nexport const getQuranReflectTagUrl = (tag: string) =>\n `${API_HOST}/?tags=${encodeURIComponent(tag)}`;\n","/**\n * Shorten a text by setting the maximum number of characters\n * by the value of the parameter and adding \"...\" at the end.\n *\n * @param {string} rawString\n * @param {number} length\n * @param {string} suffix\n * @returns {string}\n */\nexport const truncateString = (rawString: string, length: number, suffix = '...'): string => {\n const characters = rawString.split('', length);\n let shortenedText = '';\n for (let index = 0; index < characters.length; index += 1) {\n const character = characters[index];\n if (shortenedText.length === length - 1) {\n shortenedText = `${shortenedText}${character}${suffix}`;\n break;\n }\n shortenedText = `${shortenedText}${character}`;\n }\n return shortenedText;\n};\n\n/**\n * Strip HTML tags from a string.\n *\n * @param {string} rawString\n * @returns {string}\n */\nexport const stripHTMLTags = (rawString: string): string => rawString.replace(/(<([^>]+)>)/gi, '');\n\n/**\n * Convert a slugified collection id to collection id only after\n * removing the slug.\n *\n * @param {string} slugifiedCollectionId\n * @returns {string}\n */\nexport const slugifiedCollectionIdToCollectionId = (slugifiedCollectionId: string): string => {\n if (!slugifiedCollectionId) {\n return '';\n }\n const splits = slugifiedCollectionId.split('-');\n // if there is no slug in the url (collections with a name that cannot be slugified e.g. emoticons)\n if (splits.length === 1) {\n return splits[0];\n }\n return splits[splits.length - 1];\n};\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"separatorContainer\":\"ReflectionBody_separatorContainer__3hCH5\",\"container\":\"ReflectionBody_container__tXg7b\",\"verseContainer\":\"ReflectionBody_verseContainer__dBgAp\",\"readMoreButtonContainer\":\"ReflectionBody_readMoreButtonContainer__1N42J\",\"endOfScrollActionsContainer\":\"ReflectionBody_endOfScrollActionsContainer__pGZ8S\",\"ramadanReflectionContainer\":\"ReflectionBody_ramadanReflectionContainer__o695X\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"reflectionDisclaimerMessage\":\"ReflectionDisclaimerMessage_reflectionDisclaimerMessage__1RSvs\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"authorInfo\":\"AuthorInfo_authorInfo__O978G\",\"author\":\"AuthorInfo_author__zSL3x\",\"avatar\":\"AuthorInfo_avatar__7c8ya\",\"verifiedIcon\":\"AuthorInfo_verifiedIcon__x006_\",\"date\":\"AuthorInfo_date__JgJMC\",\"groupContainer\":\"AuthorInfo_groupContainer__ZQdR2\",\"groupName\":\"AuthorInfo_groupName__97c99\",\"postedIn\":\"AuthorInfo_postedIn__TaYU1\",\"separator\":\"AuthorInfo_separator__s5Qr9\",\"verseReferencesContainer\":\"AuthorInfo_verseReferencesContainer__4e8vU\",\"verseReferences\":\"AuthorInfo_verseReferences__RS3kw\",\"verseReferencesPrefix\":\"AuthorInfo_verseReferencesPrefix__U3WaW\",\"clickable\":\"AuthorInfo_clickable__wc69x\",\"chevronContainer\":\"AuthorInfo_chevronContainer__h0U5R\",\"flipChevron\":\"AuthorInfo_flipChevron__QSoXM\",\"referencedVersesPrefix\":\"AuthorInfo_referencedVersesPrefix__Hp6wL\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"header\":\"ReflectionItem_header__KeygZ\",\"container\":\"ReflectionItem_container__FBSNL\",\"body\":\"ReflectionItem_body__rxvk9\",\"moreOrLessText\":\"ReflectionItem_moreOrLessText__nP4pd\",\"hashtag\":\"ReflectionItem_hashtag__qFESN\",\"verseAndTranslationsListContainer\":\"ReflectionItem_verseAndTranslationsListContainer__uU7cq\",\"verseAndTranslationContainer\":\"ReflectionItem_verseAndTranslationContainer___YRPK\",\"surahName\":\"ReflectionItem_surahName__sZUs1\",\"item\":\"ReflectionItem_item__6LhdI\",\"rtl\":\"ReflectionItem_rtl__7fhPt\",\"ltr\":\"ReflectionItem_ltr__ppqNP\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"socialInteractionContainer\":\"SocialInteraction_socialInteractionContainer__Lac2F\",\"actionItemContainer\":\"SocialInteraction_actionItemContainer__F_o94\",\"actionItemText\":\"SocialInteraction_actionItemText__LII1Z\",\"socialStats\":\"SocialInteraction_socialStats__mHDDV\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"TafsirEndOfScrollingActions_container__tcWLj\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"footnoteContainer\":\"FootnoteText_footnoteContainer__2GrJa\",\"text\":\"FootnoteText_text__o_c03\",\"header\":\"FootnoteText_header__M_Q2C\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"text\":\"TranslationText_text__4atf8\",\"translation-font-size-1\":\"TranslationText_translation-font-size-1__TqSPj\",\"translation-font-size-2\":\"TranslationText_translation-font-size-2__AW2i1\",\"translation-font-size-3\":\"TranslationText_translation-font-size-3__ww3t4\",\"translation-font-size-4\":\"TranslationText_translation-font-size-4__TKdKv\",\"translation-font-size-5\":\"TranslationText_translation-font-size-5__5bjGX\",\"translation-font-size-6\":\"TranslationText_translation-font-size-6__6SMJi\",\"translation-font-size-7\":\"TranslationText_translation-font-size-7__03ez5\",\"translation-font-size-8\":\"TranslationText_translation-font-size-8__IA0Tr\",\"translation-font-size-9\":\"TranslationText_translation-font-size-9__tq3IG\",\"translation-font-size-10\":\"TranslationText_translation-font-size-10__A9YEa\",\"ltr\":\"TranslationText_ltr__146rZ\",\"rtl\":\"TranslationText_rtl__ytrpw\",\"urdu\":\"TranslationText_urdu__9N37Y\",\"kurdish\":\"TranslationText_kurdish__je0yf\",\"divehi\":\"TranslationText_divehi__e3rqQ\",\"translationName\":\"TranslationText_translationName__Vm9Sj\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"translationsListContainer\":\"VerseAndTranslation_translationsListContainer__n3W8A\",\"translationContainer\":\"VerseAndTranslation_translationContainer__h0X3S\",\"arabicVerseContainer\":\"VerseAndTranslation_arabicVerseContainer__VfIE8\",\"verseContainer\":\"VerseAndTranslation_verseContainer__nvg9w\"};"],"names":["_path","_extends","Object","assign","bind","n","e","arguments","length","t","r","hasOwnProperty","call","apply","props","width","height","viewBox","fill","xmlns","d","stroke","strokeWidth","strokeLinecap","strokeLinejoin","fillRule","clipRule","_path2","_rect","className","x","y","rx","ry","makeError","DOMException","module","exports","async","text","navigator","clipboard","writeText","copyClipboardApi","err","span","document","createElement","textContent","style","whiteSpace","webkitUserSelect","userSelect","body","appendChild","selection","window","getSelection","range","createRange","removeAllRanges","selectNode","addRange","success","execCommand","removeChild","copyExecCommand","err2","useTranslation","div","styles","_circle","_circle2","_circle3","authorUsername","authorName","avatarUrl","date","isAuthorVerified","verseReferences","nonChapterVerseReferences","onReferredVersesHeaderClicked","shouldShowReferredVerses","reflectionGroup","reflectionGroupLink","lang","formattedDate","formatDateRelatively","Date","referredVerseText","useMemo","chapters","filter","verse","from","to","map","toLocalizedNumber","chapter","join","verses","makeVerseKey","Link","isNewTab","href","getQuranReflectAuthorUrl","img","alt","src","variant","LinkVariant","onClick","logButtonClick","VerifiedIcon","tabIndex","role","onKeyPress","classNames","ChevronDownIcon","p","postId","selectedChapterId","selectedVerseNumber","PopoverMenu","isPortalled","trigger","Button","size","ButtonSize","tooltip","ButtonVariant","shape","ButtonShape","OverflowMenuIcon","navigateToExternalUrl","getQuranReflectPostUrl","getQuranReflectEditUrl","cx","cy","likesCount","commentsCount","reflectionText","trimmedCitationTexts","filters","toast","useToast","prefix","LoveIcon","shouldFlipOnRTL","ChatIcon","ShareIcon","shouldCloseMenuAfterClick","icon","CopyLinkIcon","clipboardCopy","then","status","ToastStatus","CopyIcon","stripHTMLTags","getCopyReflectionContent","copyReflectionContent","keys","forEach","index","citationTextGroup","groupSurahNumber","groupTranslationId","citationGroupText","groupAyahNumbers","citationDetails","citationId","number","translationId","Number","push","ayahNumber","surahName","find","surahNumber","citationNames","citationName","name","getSurahNameByGroupTranslationId","citationNumberOfAyahs","getCitationSummary","ReflectionLanguage","ENGLISH","SPANISH","FRENCH","MALAY","URDU","ARABIC","isRTLReflection","language","LOCALE_TO_REFLECTION_LANGUAGE_MAP","ms","id","ur","ar","fr","MAX_REFLECTION_LENGTH","reflection","createdAt","author","estimatedReadingTime","useState","isExpanded","setIsExpanded","setShouldShowReferredVerses","chaptersData","useContext","DataContext","reflectionBodyRef","useRef","useIntersectionObserver","REFLECTIONS_OBSERVER_ID","getSurahName","useCallback","chapterNumber","getChapterData","toString","transliteratedName","reflectionTextLength","estimatedReadingTimeOfInitialVisiblePortion","initialVisiblePostPercentage","getInitialVisiblePostPercentage","estimatedReadingTimeOfEntirePost","formattedText","useReflectionBodyParser","AuthorInfo","username","profileImg","verified","group","groupLink","prevShouldShowReferredVerses","HeaderMenu","VerseAndTranslation","ref","data-post-id","data-count-as-viewed-after","dangerouslySetInnerHTML","__html","truncate","prevIsExpanded","SocialInteraction","likes","data","scrollToTop","setSelectedVerseNumber","hasNextVerse","isLastVerseOfSurah","hasPrevVerse","isFirstVerseOfSurah","loadNextVerse","newVerseNumber","String","fakeNavigate","getVerseReflectionNavigationUrl","loadPrevVerse","filteredPosts","posts","locale","allowedReflectionLanguages","currentLocaleReflectionLanguage","localeToReflectionLanguages","includes","Separator","ReflectionNotAvailableMessage","ReflectionDisclaimerMessage","ReflectionItem","getQuranReflectVerseUrl","TafsirEndOfScrollingActions","hasNextVerseGroup","hasPrevVerseGroup","onNextButtonClicked","onPreviousButtonClicked","type","ButtonType","footnoteName","footnote","onCloseClicked","onTextClicked","isLoading","languageId","findLanguageIdByLocale","landData","getLanguageDataById","CloseIcon","Spinner","transStyles","direction","font","translationFontScale","resourceName","setIsLoading","showFootnote","setShowFootnote","setFootnote","activeFootnoteName","setActiveFootnoteName","activeSubFootnoteName","setActiveSubFootnoteName","subFootnote","setSubFootnote","PRE_DEFINED_FOOTNOTES","sg","pl","dl","resetFootnote","resetSubFootnote","event","isSubFootnote","target","tagName","footnoteText","innerText","trim","subFootnoteId","footNoteId","getAttribute","getFootnote","res","footNote","finally","langData","shouldShowFootnote","FootnoteText","undefined","parseReflectionBody","reflectionBody","hashtagStyle","replace","url","indexOf","beforeText","slice","Math","max","afterText","_","tag","tagWithHashTag","getQuranReflectTagUrl","tagToLink","translations","useSelector","selectSelectedTranslations","areArraysEqual","selectQuranReaderStyles","shallowEqual","quranFont","mushafLines","mushafId","getMushafId","mushaf","apiParams","getDefaultWordFields","translationFields","shouldFetchData","useSWR","makeVersesUrl","fetcher","error","mutate","useQcfFont","Error","onRetryClicked","PlainVerseText","words","getVerseWords","translation","TranslationText","verseKey","elementRef","observerId","useEffect","node","current","IntersectionObserver","observe","unobserve","currentlyFetchingFonts","dispatch","useDispatch","isFontQCF","isQCFFont","loadedFonts","selectLoadedFontFaces","onFontLoaded","fontFace","addLoadedFontFace","getPagesByVerses","pageNumber","isV1","QuranFont","fontFaceName","getFontFaceNameForPage","FontFace","getV1OrV2FontFaceSource","display","fonts","add","load","removeItemFromArray","string","maxLength","options","result","selfClose","_getTag","tail","substring","_getEndPosition","tailPos","substr","defaultPos","total","position","isShort","slop","slopPos","startSlice","endSlice","truncateLastWord","WORD_BREAK_REGEX","exec","charAt","match","DEFAULT_SLOP","EXCLUDE_TAGS","items","content","KEY_VALUE_REGEX","IS_CLOSE_REGEX","SELF_CLOSE_REGEX","RegExp","CLOSE_REGEX","HTML_TAG_REGEX","URL_REGEX","IMAGE_TAG_REGEX","matches","ellipsis","pop","tags","html","reverse","_dumpCloseTag","keepImageTag","len","_removeImageTag","API_HOST","env","NEXT_PUBLIC_VERCEL_ENV","getQuranReflectFilteredVerseUrl","chapterId","verseNumber","params","stringify","feed","edit","viewComments","encodeURIComponent","truncateString","rawString","suffix","characters","split","shortenedText","character","slugifiedCollectionIdToCollectionId","slugifiedCollectionId","splits"],"sourceRoot":""}
|