1 line
1.2 MiB
1 line
1.2 MiB
{"version":3,"file":"main-Oquos95D.js","sources":["../../node_modules/just-debounce-it/index.mjs","../../node_modules/swiped-events/src/swiped-events.js","../../src/utils/usePageVisibility.js","../../src/components/background-service.jsx","../../src/components/compose-button.jsx","../../src/components/keyboard-shortcuts-help.jsx","../../node_modules/@formkit/auto-animate/index.mjs","../../node_modules/@formkit/auto-animate/preact/index.mjs","../../src/pages/accounts.jsx","../../src/assets/logo.svg","../../src/components/lang-selector.jsx","../../src/utils/push-notifications.js","../../src/pages/settings.jsx","../../src/utils/focus-deck.js","../../src/utils/useLocationChange.js","../../src/utils/lists.js","../../src/components/list-add-edit.jsx","../../src/components/account-info.jsx","../../src/components/account-sheet.jsx","../../src/components/drafts.jsx","../../src/components/embed-modal.jsx","../../src/components/generic-accounts.jsx","../../src/components/media-alt-modal.jsx","../../node_modules/chroma-js/src/utils/limit.js","../../node_modules/chroma-js/src/utils/type.js","../../node_modules/chroma-js/src/utils/unpack.js","../../node_modules/chroma-js/src/utils/index.js","../../node_modules/chroma-js/src/utils/multiply-matrices.js","../../node_modules/chroma-js/src/io/lab/lab-constants.js","../../node_modules/chroma-js/src/io/lab/lab2rgb.js","../../node_modules/chroma-js/src/io/oklab/oklab2rgb.js","../../node_modules/chroma-js/src/io/lab/rgb2lab.js","../../node_modules/chroma-js/src/io/oklab/rgb2oklab.js","../../node_modules/chroma-js/src/io/lch/lch2lab.js","../../node_modules/chroma-js/src/io/oklch/oklch2rgb.js","../../node_modules/chroma-js/src/io/lch/lab2lch.js","../../node_modules/chroma-js/src/io/oklch/rgb2oklch.js","../../src/components/media-modal.jsx","../../src/components/report-modal.jsx","../../node_modules/lz-string/libs/lz-string.js","../../src/assets/floating-button.svg","../../src/assets/multi-column.svg","../../src/assets/tab-menu-bar.svg","../../src/utils/followed-tags.js","../../src/components/AsyncText.jsx","../../src/components/shortcuts-settings.jsx","../../src/components/modals.jsx","../../src/components/follow-request-buttons.jsx","../../src/components/notification.jsx","../../src/components/notification-service.jsx","../../src/components/search-form.jsx","../../src/components/search-command.jsx","../../src/components/shortcuts.jsx","../../src/utils/timeline-utils.js","../../src/utils/useScroll.js","../../src/utils/useScrollFn.js","../../src/components/media-post.jsx","../../src/components/nav-menu.jsx","../../src/components/timeline.jsx","../../src/pages/account-statuses.jsx","../../src/pages/bookmarks.jsx","../../src/assets/features/catch-up.png","../../src/pages/catchup.jsx","../../src/pages/favourites.jsx","../../src/pages/filters.jsx","../../src/pages/followed-hashtags.jsx","../../src/pages/following.jsx","../../src/pages/hashtag.jsx","../../src/pages/list.jsx","../../src/utils/group-notifications.js","../../src/pages/mentions.jsx","../../src/pages/notifications.jsx","../../src/pages/public.jsx","../../src/pages/search.jsx","../../src/pages/trending.jsx","../../src/components/columns.jsx","../../src/pages/home.jsx","../../src/utils/get-instance-status-url.js","../../src/pages/http-route.jsx","../../src/pages/lists.jsx","../../src/data/instances.json?url","../../src/utils/oauth-pkce.js","../../src/utils/auth.js","../../src/pages/login.jsx","../../src/pages/status.jsx","../../src/pages/status-route.jsx","../../src/assets/features/boosts-carousel.jpg","../../src/assets/features/grouped-notifications.jpg","../../src/assets/features/multi-column.jpg","../../src/assets/features/multi-hashtag-timeline.jpg","../../src/assets/features/nested-comments-thread.jpg","../../src/assets/logo-text.svg","../../src/pages/welcome.jsx","../../src/utils/toast-alert.js","../../src/app.jsx","../../src/main.jsx"],"sourcesContent":["var functionDebounce = debounce;\n\nfunction debounce(fn, wait, callFirst) {\n var timeout = null;\n var debouncedFn = null;\n\n var clear = function() {\n if (timeout) {\n clearTimeout(timeout);\n\n debouncedFn = null;\n timeout = null;\n }\n };\n\n var flush = function() {\n var call = debouncedFn;\n clear();\n\n if (call) {\n call();\n }\n };\n\n var debounceWrapper = function() {\n if (!wait) {\n return fn.apply(this, arguments);\n }\n\n var context = this;\n var args = arguments;\n var callNow = callFirst && !timeout;\n clear();\n\n debouncedFn = function() {\n fn.apply(context, args);\n };\n\n timeout = setTimeout(function() {\n timeout = null;\n\n if (!callNow) {\n var call = debouncedFn;\n debouncedFn = null;\n\n return call();\n }\n }, wait);\n\n if (callNow) {\n return debouncedFn();\n }\n };\n\n debounceWrapper.cancel = clear;\n debounceWrapper.flush = flush;\n\n return debounceWrapper;\n}\n\nexport {functionDebounce as default};\n","/*!\n * swiped-events.js - v@version@\n * Pure JavaScript swipe events\n * https://github.com/john-doherty/swiped-events\n * @inspiration https://stackoverflow.com/questions/16348031/disable-scrolling-when-touch-moving-certain-element\n * @author John Doherty <www.johndoherty.info>\n * @license MIT\n */\n(function (window, document) {\n\n 'use strict';\n\n // patch CustomEvent to allow constructor creation (IE/Chrome)\n if (typeof window.CustomEvent !== 'function') {\n\n window.CustomEvent = function (event, params) {\n\n params = params || { bubbles: false, cancelable: false, detail: undefined };\n\n var evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n return evt;\n };\n\n window.CustomEvent.prototype = window.Event.prototype;\n }\n\n document.addEventListener('touchstart', handleTouchStart, false);\n document.addEventListener('touchmove', handleTouchMove, false);\n document.addEventListener('touchend', handleTouchEnd, false);\n\n var xDown = null;\n var yDown = null;\n var xDiff = null;\n var yDiff = null;\n var timeDown = null;\n var startEl = null;\n var touchCount = 0;\n\n /**\n * Fires swiped event if swipe detected on touchend\n * @param {object} e - browser event object\n * @returns {void}\n */\n function handleTouchEnd(e) {\n\n // if the user released on a different target, cancel!\n if (startEl !== e.target) return;\n\n var swipeThreshold = parseInt(getNearestAttribute(startEl, 'data-swipe-threshold', '20'), 10); // default 20 units\n var swipeUnit = getNearestAttribute(startEl, 'data-swipe-unit', 'px'); // default px\n var swipeTimeout = parseInt(getNearestAttribute(startEl, 'data-swipe-timeout', '500'), 10); // default 500ms\n var timeDiff = Date.now() - timeDown;\n var eventType = '';\n var changedTouches = e.changedTouches || e.touches || [];\n\n if (swipeUnit === 'vh') {\n swipeThreshold = Math.round((swipeThreshold / 100) * document.documentElement.clientHeight); // get percentage of viewport height in pixels\n }\n if (swipeUnit === 'vw') {\n swipeThreshold = Math.round((swipeThreshold / 100) * document.documentElement.clientWidth); // get percentage of viewport height in pixels\n }\n\n if (Math.abs(xDiff) > Math.abs(yDiff)) { // most significant\n if (Math.abs(xDiff) > swipeThreshold && timeDiff < swipeTimeout) {\n if (xDiff > 0) {\n eventType = 'swiped-left';\n }\n else {\n eventType = 'swiped-right';\n }\n }\n }\n else if (Math.abs(yDiff) > swipeThreshold && timeDiff < swipeTimeout) {\n if (yDiff > 0) {\n eventType = 'swiped-up';\n }\n else {\n eventType = 'swiped-down';\n }\n }\n\n if (eventType !== '') {\n\n var eventData = {\n dir: eventType.replace(/swiped-/, ''),\n touchType: (changedTouches[0] || {}).touchType || 'direct',\n fingers: touchCount, // Number of fingers used\n xStart: parseInt(xDown, 10),\n xEnd: parseInt((changedTouches[0] || {}).clientX || -1, 10),\n yStart: parseInt(yDown, 10),\n yEnd: parseInt((changedTouches[0] || {}).clientY || -1, 10)\n };\n\n // fire `swiped` event event on the element that started the swipe\n startEl.dispatchEvent(new CustomEvent('swiped', { bubbles: true, cancelable: true, detail: eventData }));\n\n // fire `swiped-dir` event on the element that started the swipe\n startEl.dispatchEvent(new CustomEvent(eventType, { bubbles: true, cancelable: true, detail: eventData }));\n }\n\n // reset values\n xDown = null;\n yDown = null;\n timeDown = null;\n }\n /**\n * Records current location on touchstart event\n * @param {object} e - browser event object\n * @returns {void}\n */\n function handleTouchStart(e) {\n\n // if the element has data-swipe-ignore=\"true\" we stop listening for swipe events\n if (e.target.getAttribute('data-swipe-ignore') === 'true') return;\n\n startEl = e.target;\n\n timeDown = Date.now();\n xDown = e.touches[0].clientX;\n yDown = e.touches[0].clientY;\n xDiff = 0;\n yDiff = 0;\n touchCount = e.touches.length;\n }\n\n /**\n * Records location diff in px on touchmove event\n * @param {object} e - browser event object\n * @returns {void}\n */\n function handleTouchMove(e) {\n\n if (!xDown || !yDown) return;\n\n var xUp = e.touches[0].clientX;\n var yUp = e.touches[0].clientY;\n\n xDiff = xDown - xUp;\n yDiff = yDown - yUp;\n }\n\n /**\n * Gets attribute off HTML element or nearest parent\n * @param {object} el - HTML element to retrieve attribute from\n * @param {string} attributeName - name of the attribute\n * @param {any} defaultValue - default value to return if no match found\n * @returns {any} attribute value or defaultValue\n */\n function getNearestAttribute(el, attributeName, defaultValue) {\n\n // walk up the dom tree looking for attributeName\n while (el && el !== document.documentElement) {\n\n var attributeValue = el.getAttribute(attributeName);\n\n if (attributeValue) {\n return attributeValue;\n }\n\n el = el.parentNode;\n }\n\n return defaultValue;\n }\n\n}(window, document));\n","import { useEffect, useRef } from 'preact/hooks';\n\nexport default function usePageVisibility(fn = () => {}, deps = []) {\n const savedCallback = useRef(fn);\n useEffect(() => {\n savedCallback.current = fn;\n }, [deps]);\n\n useEffect(() => {\n const handleVisibilityChange = () => {\n const hidden = document.hidden || document.visibilityState === 'hidden';\n console.log('👀 Page visibility changed', hidden ? 'hidden' : 'visible');\n savedCallback.current(!hidden);\n };\n\n document.addEventListener('visibilitychange', handleVisibilityChange);\n return () =>\n document.removeEventListener('visibilitychange', handleVisibilityChange);\n }, []);\n}\n","import { t, Trans } from '@lingui/macro';\nimport { memo } from 'preact/compat';\nimport { useEffect, useRef, useState } from 'preact/hooks';\nimport { useHotkeys } from 'react-hotkeys-hook';\n\nimport { api } from '../utils/api';\nimport showToast from '../utils/show-toast';\nimport states, { saveStatus } from '../utils/states';\nimport useInterval from '../utils/useInterval';\nimport usePageVisibility from '../utils/usePageVisibility';\n\nconst STREAMING_TIMEOUT = 1000 * 3; // 3 seconds\nconst POLL_INTERVAL = 20_000; // 20 seconds\n\nexport default memo(function BackgroundService({ isLoggedIn }) {\n // Notifications service\n // - WebSocket to receive notifications when page is visible\n const [visible, setVisible] = useState(true);\n const visibleTimeout = useRef();\n usePageVisibility((visible) => {\n clearTimeout(visibleTimeout.current);\n if (visible) {\n setVisible(true);\n } else {\n visibleTimeout.current = setTimeout(() => {\n setVisible(false);\n }, POLL_INTERVAL);\n }\n });\n\n const checkLatestNotification = async (masto, instance, skipCheckMarkers) => {\n if (states.notificationsLast) {\n const notificationsIterator = masto.v1.notifications.list({\n limit: 1,\n sinceId: states.notificationsLast.id,\n });\n const { value: notifications } = await notificationsIterator.next();\n if (notifications?.length) {\n if (skipCheckMarkers) {\n states.notificationsShowNew = true;\n } else {\n let lastReadId;\n try {\n const markers = await masto.v1.markers.fetch({\n timeline: 'notifications',\n });\n lastReadId = markers?.notifications?.lastReadId;\n } catch (e) {}\n if (lastReadId) {\n states.notificationsShowNew = notifications[0].id !== lastReadId;\n } else {\n states.notificationsShowNew = true;\n }\n }\n }\n }\n };\n\n useEffect(() => {\n let sub;\n let streamTimeout;\n let pollNotifications;\n if (isLoggedIn && visible) {\n const { masto, streaming, instance } = api();\n (async () => {\n // 1. Get the latest notification\n await checkLatestNotification(masto, instance);\n\n let hasStreaming = false;\n // 2. Start streaming\n if (streaming) {\n streamTimeout = setTimeout(() => {\n (async () => {\n try {\n hasStreaming = true;\n sub = streaming.user.notification.subscribe();\n console.log('🎏 Streaming notification', sub);\n for await (const entry of sub) {\n if (!sub) break;\n if (!visible) break;\n console.log('🔔🔔 Notification entry', entry);\n if (entry.event === 'notification') {\n console.log('🔔🔔 Notification', entry);\n saveStatus(entry.payload, instance, {\n skipThreading: true,\n });\n }\n states.notificationsShowNew = true;\n }\n console.log('💥 Streaming notification loop STOPPED');\n } catch (e) {\n hasStreaming = false;\n console.error(e);\n }\n\n if (!hasStreaming) {\n console.log('🎏 Streaming failed, fallback to polling');\n pollNotifications = setInterval(() => {\n checkLatestNotification(masto, instance, true);\n }, POLL_INTERVAL);\n }\n })();\n }, STREAMING_TIMEOUT);\n }\n })();\n }\n return () => {\n sub?.unsubscribe?.();\n sub = null;\n clearTimeout(streamTimeout);\n clearInterval(pollNotifications);\n };\n }, [visible, isLoggedIn]);\n\n // Check for updates service\n const lastCheckDate = useRef();\n const checkForUpdates = () => {\n lastCheckDate.current = Date.now();\n console.log('✨ Check app update');\n fetch('./version.json')\n .then((r) => r.json())\n .then((info) => {\n if (info) states.appVersion = info;\n })\n .catch((e) => {\n console.error(e);\n });\n };\n useInterval(checkForUpdates, visible && 1000 * 60 * 30); // 30 minutes\n usePageVisibility((visible) => {\n if (visible) {\n if (!lastCheckDate.current) {\n checkForUpdates();\n } else {\n const diff = Date.now() - lastCheckDate.current;\n if (diff > 1000 * 60 * 60) {\n // 1 hour\n checkForUpdates();\n }\n }\n }\n });\n\n // Global keyboard shortcuts \"service\"\n useHotkeys('shift+alt+k', () => {\n const currentCloakMode = states.settings.cloakMode;\n states.settings.cloakMode = !currentCloakMode;\n showToast({\n text: currentCloakMode ? t`Cloak mode disabled` : t`Cloak mode enabled`,\n });\n });\n\n return null;\n});\n","import { t, Trans } from '@lingui/macro';\nimport { useHotkeys } from 'react-hotkeys-hook';\nimport { useSnapshot } from 'valtio';\n\nimport openCompose from '../utils/open-compose';\nimport openOSK from '../utils/open-osk';\nimport states from '../utils/states';\n\nimport Icon from './icon';\n\nexport default function ComposeButton() {\n const snapStates = useSnapshot(states);\n\n function handleButton(e) {\n if (snapStates.composerState.minimized) {\n states.composerState.minimized = false;\n openOSK();\n return;\n }\n\n if (e.shiftKey) {\n const newWin = openCompose();\n\n if (!newWin) {\n states.showCompose = true;\n }\n } else {\n openOSK();\n states.showCompose = true;\n }\n }\n\n useHotkeys('c, shift+c', handleButton, {\n ignoreEventWhen: (e) => {\n const hasModal = !!document.querySelector('#modal-container > *');\n return hasModal;\n },\n });\n\n return (\n <button\n type=\"button\"\n id=\"compose-button\"\n onClick={handleButton}\n class={`${snapStates.composerState.minimized ? 'min' : ''} ${\n snapStates.composerState.publishing ? 'loading' : ''\n } ${snapStates.composerState.publishingError ? 'error' : ''}`}\n >\n <Icon icon=\"quill\" size=\"xl\" alt={t`Compose`} />\n </button>\n );\n}\n","import './keyboard-shortcuts-help.css';\n\nimport { t, Trans } from '@lingui/macro';\nimport { memo } from 'preact/compat';\nimport { useHotkeys } from 'react-hotkeys-hook';\nimport { useSnapshot } from 'valtio';\n\nimport states from '../utils/states';\n\nimport Icon from './icon';\nimport Modal from './modal';\n\nexport default memo(function KeyboardShortcutsHelp() {\n const snapStates = useSnapshot(states);\n\n function onClose() {\n states.showKeyboardShortcutsHelp = false;\n }\n\n useHotkeys(\n '?, shift+?, shift+slash',\n (e) => {\n console.log('help');\n states.showKeyboardShortcutsHelp = true;\n },\n {\n ignoreEventWhen: (e) => {\n const hasModal = !!document.querySelector('#modal-container > *');\n return hasModal;\n },\n },\n );\n\n return (\n !!snapStates.showKeyboardShortcutsHelp && (\n <Modal onClose={onClose}>\n <div id=\"keyboard-shortcuts-help-container\" class=\"sheet\" tabindex=\"-1\">\n <button type=\"button\" class=\"sheet-close\" onClick={onClose}>\n <Icon icon=\"x\" alt={t`Close`} />\n </button>\n <header>\n <h2>\n <Trans>Keyboard shortcuts</Trans>\n </h2>\n </header>\n <main>\n <table>\n <tbody>\n {[\n {\n action: t`Keyboard shortcuts help`,\n keys: <kbd>?</kbd>,\n },\n {\n action: t`Next post`,\n keys: <kbd>j</kbd>,\n },\n {\n action: t`Previous post`,\n keys: <kbd>k</kbd>,\n },\n {\n action: t`Skip carousel to next post`,\n keys: (\n <Trans>\n <kbd>Shift</kbd> + <kbd>j</kbd>\n </Trans>\n ),\n },\n {\n action: t`Skip carousel to previous post`,\n keys: (\n <Trans>\n <kbd>Shift</kbd> + <kbd>k</kbd>\n </Trans>\n ),\n },\n {\n action: t`Load new posts`,\n keys: <kbd>.</kbd>,\n },\n {\n action: t`Open post details`,\n keys: (\n <Trans>\n <kbd>Enter</kbd> or <kbd>o</kbd>\n </Trans>\n ),\n },\n {\n action: (\n <Trans>\n Expand content warning or\n <br />\n toggle expanded/collapsed thread\n </Trans>\n ),\n keys: <kbd>x</kbd>,\n },\n {\n action: t`Close post or dialogs`,\n keys: (\n <Trans>\n <kbd>Esc</kbd> or <kbd>Backspace</kbd>\n </Trans>\n ),\n },\n {\n action: t`Focus column in multi-column mode`,\n keys: (\n <Trans>\n <kbd>1</kbd> to <kbd>9</kbd>\n </Trans>\n ),\n },\n {\n action: t`Focus next column in multi-column mode`,\n keys: <kbd>]</kbd>,\n },\n {\n action: t`Focus previous column in multi-column mode`,\n keys: <kbd>[</kbd>,\n },\n {\n action: t`Compose new post`,\n keys: <kbd>c</kbd>,\n },\n {\n action: t`Compose new post (new window)`,\n className: 'insignificant',\n keys: (\n <Trans>\n <kbd>Shift</kbd> + <kbd>c</kbd>\n </Trans>\n ),\n },\n {\n action: t`Send post`,\n keys: (\n <Trans>\n <kbd>Ctrl</kbd> + <kbd>Enter</kbd> or <kbd>⌘</kbd> +{' '}\n <kbd>Enter</kbd>\n </Trans>\n ),\n },\n {\n action: t`Search`,\n keys: <kbd>/</kbd>,\n },\n {\n action: t`Reply`,\n keys: <kbd>r</kbd>,\n },\n {\n action: t`Reply (new window)`,\n className: 'insignificant',\n keys: (\n <Trans>\n <kbd>Shift</kbd> + <kbd>r</kbd>\n </Trans>\n ),\n },\n {\n action: t`Like (favourite)`,\n keys: (\n <Trans>\n <kbd>l</kbd> or <kbd>f</kbd>\n </Trans>\n ),\n },\n {\n action: t`Boost`,\n keys: (\n <Trans>\n <kbd>Shift</kbd> + <kbd>b</kbd>\n </Trans>\n ),\n },\n {\n action: t`Bookmark`,\n keys: <kbd>d</kbd>,\n },\n {\n action: t`Toggle Cloak mode`,\n keys: (\n <Trans>\n <kbd>Shift</kbd> + <kbd>Alt</kbd> + <kbd>k</kbd>\n </Trans>\n ),\n },\n ].map(({ action, className, keys }) => (\n <tr key={action}>\n <th class={className}>{action}</th>\n <td>{keys}</td>\n </tr>\n ))}\n </tbody>\n </table>\n </main>\n </div>\n </Modal>\n )\n );\n});\n","/**\n * A set of all the parents currently being observe. This is the only non weak\n * registry.\n */\nconst parents = new Set();\n/**\n * Element coordinates that is constantly kept up to date.\n */\nconst coords = new WeakMap();\n/**\n * Siblings of elements that have been removed from the dom.\n */\nconst siblings = new WeakMap();\n/**\n * Animations that are currently running.\n */\nconst animations = new WeakMap();\n/**\n * A map of existing intersection observers used to track element movements.\n */\nconst intersections = new WeakMap();\n/**\n * Intervals for automatically checking the position of elements occasionally.\n */\nconst intervals = new WeakMap();\n/**\n * The configuration options for each group of elements.\n */\nconst options = new WeakMap();\n/**\n * Debounce counters by id, used to debounce calls to update positions.\n */\nconst debounces = new WeakMap();\n/**\n * All parents that are currently enabled are tracked here.\n */\nconst enabled = new WeakSet();\n/**\n * The document used to calculate transitions.\n */\nlet root;\n/**\n * The root’s XY scroll positions.\n */\nlet scrollX = 0;\nlet scrollY = 0;\n/**\n * Used to sign an element as the target.\n */\nconst TGT = \"__aa_tgt\";\n/**\n * Used to sign an element as being part of a removal.\n */\nconst DEL = \"__aa_del\";\n/**\n * Used to sign an element as being \"new\". When an element is removed from the\n * dom, but may cycle back in we can sign it with new to ensure the next time\n * it is recognized we consider it new.\n */\nconst NEW = \"__aa_new\";\n/**\n * Callback for handling all mutations.\n * @param mutations - A mutation list\n */\nconst handleMutations = (mutations) => {\n const elements = getElements(mutations);\n // If elements is \"false\" that means this mutation that should be ignored.\n if (elements) {\n elements.forEach((el) => animate(el));\n }\n};\n/**\n *\n * @param entries - Elements that have been resized.\n */\nconst handleResizes = (entries) => {\n entries.forEach((entry) => {\n if (entry.target === root)\n updateAllPos();\n if (coords.has(entry.target))\n updatePos(entry.target);\n });\n};\n/**\n * Observe this elements position.\n * @param el - The element to observe the position of.\n */\nfunction observePosition(el) {\n const oldObserver = intersections.get(el);\n oldObserver === null || oldObserver === void 0 ? void 0 : oldObserver.disconnect();\n let rect = coords.get(el);\n let invocations = 0;\n const buffer = 5;\n if (!rect) {\n rect = getCoords(el);\n coords.set(el, rect);\n }\n const { offsetWidth, offsetHeight } = root;\n const rootMargins = [\n rect.top - buffer,\n offsetWidth - (rect.left + buffer + rect.width),\n offsetHeight - (rect.top + buffer + rect.height),\n rect.left - buffer,\n ];\n const rootMargin = rootMargins\n .map((px) => `${-1 * Math.floor(px)}px`)\n .join(\" \");\n const observer = new IntersectionObserver(() => {\n ++invocations > 1 && updatePos(el);\n }, {\n root,\n threshold: 1,\n rootMargin,\n });\n observer.observe(el);\n intersections.set(el, observer);\n}\n/**\n * Update the exact position of a given element.\n * @param el - An element to update the position of.\n */\nfunction updatePos(el) {\n clearTimeout(debounces.get(el));\n const optionsOrPlugin = getOptions(el);\n const delay = isPlugin(optionsOrPlugin) ? 500 : optionsOrPlugin.duration;\n debounces.set(el, setTimeout(async () => {\n const currentAnimation = animations.get(el);\n try {\n await (currentAnimation === null || currentAnimation === void 0 ? void 0 : currentAnimation.finished);\n coords.set(el, getCoords(el));\n observePosition(el);\n }\n catch {\n // ignore errors as the `.finished` promise is rejected when animations were cancelled\n }\n }, delay));\n}\n/**\n * Updates all positions that are currently being tracked.\n */\nfunction updateAllPos() {\n clearTimeout(debounces.get(root));\n debounces.set(root, setTimeout(() => {\n parents.forEach((parent) => forEach(parent, (el) => lowPriority(() => updatePos(el))));\n }, 100));\n}\n/**\n * Its possible for a quick scroll or other fast events to get past the\n * intersection observer, so occasionally we need want \"cold-poll\" for the\n * latests and greatest position. We try to do this in the most non-disruptive\n * fashion possible. First we only do this ever couple seconds, staggard by a\n * random offset.\n * @param el - Element\n */\nfunction poll(el) {\n setTimeout(() => {\n intervals.set(el, setInterval(() => lowPriority(updatePos.bind(null, el)), 2000));\n }, Math.round(2000 * Math.random()));\n}\n/**\n * Perform some operation that is non critical at some point.\n * @param callback\n */\nfunction lowPriority(callback) {\n if (typeof requestIdleCallback === \"function\") {\n requestIdleCallback(() => callback());\n }\n else {\n requestAnimationFrame(() => callback());\n }\n}\n/**\n * The mutation observer responsible for watching each root element.\n */\nlet mutations;\n/**\n * A resize observer, responsible for recalculating elements on resize.\n */\nlet resize;\n/**\n * Ensure the browser is supported.\n */\nconst supportedBrowser = typeof window !== \"undefined\" && \"ResizeObserver\" in window;\n/**\n * If this is in a browser, initialize our Web APIs\n */\nif (supportedBrowser) {\n root = document.documentElement;\n mutations = new MutationObserver(handleMutations);\n resize = new ResizeObserver(handleResizes);\n window.addEventListener(\"scroll\", () => {\n scrollY = window.scrollY;\n scrollX = window.scrollX;\n });\n resize.observe(root);\n}\n/**\n * Retrieves all the elements that may have been affected by the last mutation\n * including ones that have been removed and are no longer in the DOM.\n * @param mutations - A mutation list.\n * @returns\n */\nfunction getElements(mutations) {\n const observedNodes = mutations.reduce((nodes, mutation) => {\n return [\n ...nodes,\n ...Array.from(mutation.addedNodes),\n ...Array.from(mutation.removedNodes),\n ];\n }, []);\n // Short circuit if _only_ comment nodes are observed\n const onlyCommentNodesObserved = observedNodes.every((node) => node.nodeName === \"#comment\");\n if (onlyCommentNodesObserved)\n return false;\n return mutations.reduce((elements, mutation) => {\n // Short circuit if we find a purposefully deleted node.\n if (elements === false)\n return false;\n if (mutation.target instanceof Element) {\n target(mutation.target);\n if (!elements.has(mutation.target)) {\n elements.add(mutation.target);\n for (let i = 0; i < mutation.target.children.length; i++) {\n const child = mutation.target.children.item(i);\n if (!child)\n continue;\n if (DEL in child) {\n return false;\n }\n target(mutation.target, child);\n elements.add(child);\n }\n }\n if (mutation.removedNodes.length) {\n for (let i = 0; i < mutation.removedNodes.length; i++) {\n const child = mutation.removedNodes[i];\n if (DEL in child) {\n return false;\n }\n if (child instanceof Element) {\n elements.add(child);\n target(mutation.target, child);\n siblings.set(child, [\n mutation.previousSibling,\n mutation.nextSibling,\n ]);\n }\n }\n }\n }\n return elements;\n }, new Set());\n}\n/**\n * Assign the target to an element.\n * @param el - The root element\n * @param child\n */\nfunction target(el, child) {\n if (!child && !(TGT in el))\n Object.defineProperty(el, TGT, { value: el });\n else if (child && !(TGT in child))\n Object.defineProperty(child, TGT, { value: el });\n}\n/**\n * Determines what kind of change took place on the given element and then\n * performs the proper animation based on that.\n * @param el - The specific element to animate.\n */\nfunction animate(el) {\n var _a;\n const isMounted = el.isConnected;\n const preExisting = coords.has(el);\n if (isMounted && siblings.has(el))\n siblings.delete(el);\n if (animations.has(el)) {\n (_a = animations.get(el)) === null || _a === void 0 ? void 0 : _a.cancel();\n }\n if (NEW in el) {\n add(el);\n }\n else if (preExisting && isMounted) {\n remain(el);\n }\n else if (preExisting && !isMounted) {\n remove(el);\n }\n else {\n add(el);\n }\n}\n/**\n * Removes all non-digits from a string and casts to a number.\n * @param str - A string containing a pixel value.\n * @returns\n */\nfunction raw(str) {\n return Number(str.replace(/[^0-9.\\-]/g, \"\"));\n}\n/**\n * Get the scroll offset of elements\n * @param el - Element\n * @returns\n */\nfunction getScrollOffset(el) {\n let p = el.parentElement;\n while (p) {\n if (p.scrollLeft || p.scrollTop) {\n return { x: p.scrollLeft, y: p.scrollTop };\n }\n p = p.parentElement;\n }\n return { x: 0, y: 0 };\n}\n/**\n * Get the coordinates of elements adjusted for scroll position.\n * @param el - Element\n * @returns\n */\nfunction getCoords(el) {\n const rect = el.getBoundingClientRect();\n const { x, y } = getScrollOffset(el);\n return {\n top: rect.top + y,\n left: rect.left + x,\n width: rect.width,\n height: rect.height,\n };\n}\n/**\n * Returns the width/height that the element should be transitioned between.\n * This takes into account box-sizing.\n * @param el - Element being animated\n * @param oldCoords - Old set of Coordinates coordinates\n * @param newCoords - New set of Coordinates coordinates\n * @returns\n */\nfunction getTransitionSizes(el, oldCoords, newCoords) {\n let widthFrom = oldCoords.width;\n let heightFrom = oldCoords.height;\n let widthTo = newCoords.width;\n let heightTo = newCoords.height;\n const styles = getComputedStyle(el);\n const sizing = styles.getPropertyValue(\"box-sizing\");\n if (sizing === \"content-box\") {\n const paddingY = raw(styles.paddingTop) +\n raw(styles.paddingBottom) +\n raw(styles.borderTopWidth) +\n raw(styles.borderBottomWidth);\n const paddingX = raw(styles.paddingLeft) +\n raw(styles.paddingRight) +\n raw(styles.borderRightWidth) +\n raw(styles.borderLeftWidth);\n widthFrom -= paddingX;\n widthTo -= paddingX;\n heightFrom -= paddingY;\n heightTo -= paddingY;\n }\n return [widthFrom, widthTo, heightFrom, heightTo].map(Math.round);\n}\n/**\n * Retrieves animation options for the current element.\n * @param el - Element to retrieve options for.\n * @returns\n */\nfunction getOptions(el) {\n return TGT in el && options.has(el[TGT])\n ? options.get(el[TGT])\n : { duration: 250, easing: \"ease-in-out\" };\n}\n/**\n * Returns the target of a given animation (generally the parent).\n * @param el - An element to check for a target\n * @returns\n */\nfunction getTarget(el) {\n if (TGT in el)\n return el[TGT];\n return undefined;\n}\n/**\n * Checks if animations are enabled or disabled for a given element.\n * @param el - Any element\n * @returns\n */\nfunction isEnabled(el) {\n const target = getTarget(el);\n return target ? enabled.has(target) : false;\n}\n/**\n * Iterate over the children of a given parent.\n * @param parent - A parent element\n * @param callback - A callback\n */\nfunction forEach(parent, ...callbacks) {\n callbacks.forEach((callback) => callback(parent, options.has(parent)));\n for (let i = 0; i < parent.children.length; i++) {\n const child = parent.children.item(i);\n if (child) {\n callbacks.forEach((callback) => callback(child, options.has(child)));\n }\n }\n}\n/**\n * Always return tuple to provide consistent interface\n */\nfunction getPluginTuple(pluginReturn) {\n if (Array.isArray(pluginReturn))\n return pluginReturn;\n return [pluginReturn];\n}\n/**\n * Determine if config is plugin\n */\nfunction isPlugin(config) {\n return typeof config === \"function\";\n}\n/**\n * The element in question is remaining in the DOM.\n * @param el - Element to flip\n * @returns\n */\nfunction remain(el) {\n const oldCoords = coords.get(el);\n const newCoords = getCoords(el);\n if (!isEnabled(el))\n return coords.set(el, newCoords);\n let animation;\n if (!oldCoords)\n return;\n const pluginOrOptions = getOptions(el);\n if (typeof pluginOrOptions !== \"function\") {\n const deltaX = oldCoords.left - newCoords.left;\n const deltaY = oldCoords.top - newCoords.top;\n const [widthFrom, widthTo, heightFrom, heightTo] = getTransitionSizes(el, oldCoords, newCoords);\n const start = {\n transform: `translate(${deltaX}px, ${deltaY}px)`,\n };\n const end = {\n transform: `translate(0, 0)`,\n };\n if (widthFrom !== widthTo) {\n start.width = `${widthFrom}px`;\n end.width = `${widthTo}px`;\n }\n if (heightFrom !== heightTo) {\n start.height = `${heightFrom}px`;\n end.height = `${heightTo}px`;\n }\n animation = el.animate([start, end], {\n duration: pluginOrOptions.duration,\n easing: pluginOrOptions.easing,\n });\n }\n else {\n const [keyframes] = getPluginTuple(pluginOrOptions(el, \"remain\", oldCoords, newCoords));\n animation = new Animation(keyframes);\n animation.play();\n }\n animations.set(el, animation);\n coords.set(el, newCoords);\n animation.addEventListener(\"finish\", updatePos.bind(null, el));\n}\n/**\n * Adds the element with a transition.\n * @param el - Animates the element being added.\n */\nfunction add(el) {\n if (NEW in el)\n delete el[NEW];\n const newCoords = getCoords(el);\n coords.set(el, newCoords);\n const pluginOrOptions = getOptions(el);\n if (!isEnabled(el))\n return;\n let animation;\n if (typeof pluginOrOptions !== \"function\") {\n animation = el.animate([\n { transform: \"scale(.98)\", opacity: 0 },\n { transform: \"scale(0.98)\", opacity: 0, offset: 0.5 },\n { transform: \"scale(1)\", opacity: 1 },\n ], {\n duration: pluginOrOptions.duration * 1.5,\n easing: \"ease-in\",\n });\n }\n else {\n const [keyframes] = getPluginTuple(pluginOrOptions(el, \"add\", newCoords));\n animation = new Animation(keyframes);\n animation.play();\n }\n animations.set(el, animation);\n animation.addEventListener(\"finish\", updatePos.bind(null, el));\n}\n/**\n * Clean up after removing an element from the dom.\n * @param el - Element being removed\n * @param styles - Optional styles that should be removed from the element.\n */\nfunction cleanUp(el, styles) {\n var _a;\n el.remove();\n coords.delete(el);\n siblings.delete(el);\n animations.delete(el);\n (_a = intersections.get(el)) === null || _a === void 0 ? void 0 : _a.disconnect();\n setTimeout(() => {\n if (DEL in el)\n delete el[DEL];\n Object.defineProperty(el, NEW, { value: true, configurable: true });\n if (styles && el instanceof HTMLElement) {\n for (const style in styles) {\n el.style[style] = \"\";\n }\n }\n }, 0);\n}\n/**\n * Animates the removal of an element.\n * @param el - Element to remove\n */\nfunction remove(el) {\n var _a;\n if (!siblings.has(el) || !coords.has(el))\n return;\n const [prev, next] = siblings.get(el);\n Object.defineProperty(el, DEL, { value: true, configurable: true });\n const finalX = window.scrollX;\n const finalY = window.scrollY;\n if (next && next.parentNode && next.parentNode instanceof Element) {\n next.parentNode.insertBefore(el, next);\n }\n else if (prev && prev.parentNode) {\n prev.parentNode.appendChild(el);\n }\n else {\n (_a = getTarget(el)) === null || _a === void 0 ? void 0 : _a.appendChild(el);\n }\n if (!isEnabled(el))\n return cleanUp(el);\n const [top, left, width, height] = deletePosition(el);\n const optionsOrPlugin = getOptions(el);\n const oldCoords = coords.get(el);\n if (finalX !== scrollX || finalY !== scrollY) {\n adjustScroll(el, finalX, finalY, optionsOrPlugin);\n }\n let animation;\n let styleReset = {\n position: \"absolute\",\n top: `${top}px`,\n left: `${left}px`,\n width: `${width}px`,\n height: `${height}px`,\n margin: \"0\",\n pointerEvents: \"none\",\n transformOrigin: \"center\",\n zIndex: \"100\",\n };\n if (!isPlugin(optionsOrPlugin)) {\n Object.assign(el.style, styleReset);\n animation = el.animate([\n {\n transform: \"scale(1)\",\n opacity: 1,\n },\n {\n transform: \"scale(.98)\",\n opacity: 0,\n },\n ], { duration: optionsOrPlugin.duration, easing: \"ease-out\" });\n }\n else {\n const [keyframes, options] = getPluginTuple(optionsOrPlugin(el, \"remove\", oldCoords));\n if ((options === null || options === void 0 ? void 0 : options.styleReset) !== false) {\n styleReset = (options === null || options === void 0 ? void 0 : options.styleReset) || styleReset;\n Object.assign(el.style, styleReset);\n }\n animation = new Animation(keyframes);\n animation.play();\n }\n animations.set(el, animation);\n animation.addEventListener(\"finish\", cleanUp.bind(null, el, styleReset));\n}\n/**\n * If the element being removed is at the very bottom of the page, and the\n * the page was scrolled into a space being \"made available\" by the element\n * that was removed, the page scroll will have jumped up some amount. We need\n * to offset the jump by the amount that the page was \"automatically\" scrolled\n * up. We can do this by comparing the scroll position before and after the\n * element was removed, and then offsetting by that amount.\n *\n * @param el - The element being deleted\n * @param finalX - The final X scroll position\n * @param finalY - The final Y scroll position\n * @param optionsOrPlugin - The options or plugin\n * @returns\n */\nfunction adjustScroll(el, finalX, finalY, optionsOrPlugin) {\n const scrollDeltaX = scrollX - finalX;\n const scrollDeltaY = scrollY - finalY;\n const scrollBefore = document.documentElement.style.scrollBehavior;\n const scrollBehavior = getComputedStyle(root).scrollBehavior;\n if (scrollBehavior === \"smooth\") {\n document.documentElement.style.scrollBehavior = \"auto\";\n }\n window.scrollTo(window.scrollX + scrollDeltaX, window.scrollY + scrollDeltaY);\n if (!el.parentElement)\n return;\n const parent = el.parentElement;\n let lastHeight = parent.clientHeight;\n let lastWidth = parent.clientWidth;\n const startScroll = performance.now();\n // Here we use a manual scroll animation to keep the element using the same\n // easing and timing as the parent’s scroll animation.\n function smoothScroll() {\n requestAnimationFrame(() => {\n if (!isPlugin(optionsOrPlugin)) {\n const deltaY = lastHeight - parent.clientHeight;\n const deltaX = lastWidth - parent.clientWidth;\n if (startScroll + optionsOrPlugin.duration > performance.now()) {\n window.scrollTo({\n left: window.scrollX - deltaX,\n top: window.scrollY - deltaY,\n });\n lastHeight = parent.clientHeight;\n lastWidth = parent.clientWidth;\n smoothScroll();\n }\n else {\n document.documentElement.style.scrollBehavior = scrollBefore;\n }\n }\n });\n }\n smoothScroll();\n}\n/**\n * Determines the position of the element being removed.\n * @param el - The element being deleted\n * @returns\n */\nfunction deletePosition(el) {\n const oldCoords = coords.get(el);\n const [width, , height] = getTransitionSizes(el, oldCoords, getCoords(el));\n let offsetParent = el.parentElement;\n while (offsetParent &&\n (getComputedStyle(offsetParent).position === \"static\" ||\n offsetParent instanceof HTMLBodyElement)) {\n offsetParent = offsetParent.parentElement;\n }\n if (!offsetParent)\n offsetParent = document.body;\n const parentStyles = getComputedStyle(offsetParent);\n const parentCoords = coords.get(offsetParent) || getCoords(offsetParent);\n const top = Math.round(oldCoords.top - parentCoords.top) -\n raw(parentStyles.borderTopWidth);\n const left = Math.round(oldCoords.left - parentCoords.left) -\n raw(parentStyles.borderLeftWidth);\n return [top, left, width, height];\n}\n/**\n * A function that automatically adds animation effects to itself and its\n * immediate children. Specifically it adds effects for adding, moving, and\n * removing DOM elements.\n * @param el - A parent element to add animations to.\n * @param options - An optional object of options.\n */\nfunction autoAnimate(el, config = {}) {\n if (mutations && resize) {\n const mediaQuery = window.matchMedia(\"(prefers-reduced-motion: reduce)\");\n const isDisabledDueToReduceMotion = mediaQuery.matches &&\n !isPlugin(config) &&\n !config.disrespectUserMotionPreference;\n if (!isDisabledDueToReduceMotion) {\n enabled.add(el);\n if (getComputedStyle(el).position === \"static\") {\n Object.assign(el.style, { position: \"relative\" });\n }\n forEach(el, updatePos, poll, (element) => resize === null || resize === void 0 ? void 0 : resize.observe(element));\n if (isPlugin(config)) {\n options.set(el, config);\n }\n else {\n options.set(el, { duration: 250, easing: \"ease-in-out\", ...config });\n }\n mutations.observe(el, { childList: true });\n parents.add(el);\n }\n }\n return Object.freeze({\n parent: el,\n enable: () => {\n enabled.add(el);\n },\n disable: () => {\n enabled.delete(el);\n },\n isEnabled: () => enabled.has(el),\n });\n}\n/**\n * The vue directive.\n */\nconst vAutoAnimate = {\n mounted: (el, binding) => {\n autoAnimate(el, binding.value || {});\n },\n // ignore ssr see #96:\n getSSRProps: () => ({}),\n};\n\nexport { autoAnimate as default, getTransitionSizes, vAutoAnimate };\n","import { useRef, useState, useEffect } from 'preact/hooks';\nimport autoAnimate from '../index.mjs';\n\n/**\n * AutoAnimate hook for adding dead-simple transitions and animations to preact.\n * @param options - Auto animate options or a plugin\n * @returns\n */\nfunction useAutoAnimate(options) {\n const element = useRef(null);\n const [controller, setController] = useState();\n const setEnabled = (enabled) => {\n if (controller) {\n enabled ? controller.enable() : controller.disable();\n }\n };\n useEffect(() => {\n if (element.current instanceof HTMLElement)\n setController(autoAnimate(element.current, options || {}));\n }, []);\n return [element, setEnabled];\n}\n\nexport { useAutoAnimate };\n","import './accounts.css';\n\nimport { useAutoAnimate } from '@formkit/auto-animate/preact';\nimport { t, Trans } from '@lingui/macro';\nimport { Menu, MenuDivider, MenuItem } from '@szhsin/react-menu';\nimport { useReducer } from 'preact/hooks';\n\nimport Avatar from '../components/avatar';\nimport Icon from '../components/icon';\nimport Link from '../components/link';\nimport MenuConfirm from '../components/menu-confirm';\nimport MenuLink from '../components/menu-link';\nimport Menu2 from '../components/menu2';\nimport NameText from '../components/name-text';\nimport { api } from '../utils/api';\nimport states from '../utils/states';\nimport store from '../utils/store';\nimport { getCurrentAccountID, setCurrentAccountID } from '../utils/store-utils';\n\nconst isStandalone = window.matchMedia('(display-mode: standalone)').matches;\n\nfunction Accounts({ onClose }) {\n const { masto } = api();\n // Accounts\n const accounts = store.local.getJSON('accounts');\n const currentAccount = getCurrentAccountID();\n const moreThanOneAccount = accounts.length > 1;\n\n const [_, reload] = useReducer((x) => x + 1, 0);\n const [accountsListParent] = useAutoAnimate();\n\n return (\n <div id=\"accounts-container\" class=\"sheet\" tabIndex=\"-1\">\n {!!onClose && (\n <button type=\"button\" class=\"sheet-close\" onClick={onClose}>\n <Icon icon=\"x\" alt={t`Close`} />\n </button>\n )}\n <header class=\"header-grid\">\n <h2>\n <Trans>Accounts</Trans>\n </h2>\n </header>\n <main>\n <section>\n <ul class=\"accounts-list\" ref={accountsListParent}>\n {accounts.map((account, i) => {\n const isCurrent = account.info.id === currentAccount;\n const isDefault = i === 0; // first account is always default\n return (\n <li key={account.info.id}>\n <div>\n {moreThanOneAccount && (\n <span class={`current ${isCurrent ? 'is-current' : ''}`}>\n <Icon icon=\"check-circle\" alt={t`Current`} />\n </span>\n )}\n <Avatar\n url={account.info.avatarStatic}\n size=\"xxl\"\n onDblClick={async () => {\n if (isCurrent) {\n try {\n const info = await masto.v1.accounts\n .$select(account.info.id)\n .fetch();\n console.log('fetched account info', info);\n account.info = info;\n store.local.setJSON('accounts', accounts);\n reload();\n } catch (e) {}\n }\n }}\n />\n <NameText\n account={\n moreThanOneAccount\n ? {\n ...account.info,\n acct: /@/.test(account.info.acct)\n ? account.info.acct\n : `${account.info.acct}@${account.instanceURL}`,\n }\n : account.info\n }\n showAcct\n onClick={() => {\n if (isCurrent) {\n states.showAccount = `${account.info.username}@${account.instanceURL}`;\n } else {\n setCurrentAccountID(account.info.id);\n location.reload();\n }\n }}\n />\n </div>\n <div class=\"actions\">\n {isDefault && moreThanOneAccount && (\n <>\n <span class=\"tag\">\n <Trans>Default</Trans>\n </span>{' '}\n </>\n )}\n <Menu2\n align=\"end\"\n menuButton={\n <button type=\"button\" class=\"plain more-button\">\n <Icon icon=\"more\" size=\"l\" alt={t`More`} />\n </button>\n }\n >\n {moreThanOneAccount && (\n <>\n <MenuItem\n disabled={isCurrent}\n onClick={() => {\n setCurrentAccountID(account.info.id);\n location.reload();\n }}\n >\n <Icon icon=\"transfer\" />{' '}\n <Trans>Switch to this account</Trans>\n </MenuItem>\n {!isStandalone && !isCurrent && (\n <MenuLink\n href={`./?account=${account.info.id}`}\n target=\"_blank\"\n >\n <Icon icon=\"external\" />\n <span>\n <Trans>Switch in new tab/window</Trans>\n </span>\n </MenuLink>\n )}\n <MenuDivider />\n </>\n )}\n <MenuItem\n onClick={() => {\n states.showAccount = `${account.info.username}@${account.instanceURL}`;\n }}\n >\n <Icon icon=\"user\" />\n <span>\n <Trans>View profile…</Trans>\n </span>\n </MenuItem>\n <MenuDivider />\n {moreThanOneAccount && (\n <MenuItem\n disabled={isDefault}\n onClick={() => {\n // Move account to the top of the list\n accounts.splice(i, 1);\n accounts.unshift(account);\n store.local.setJSON('accounts', accounts);\n reload();\n }}\n >\n <Icon icon=\"check-circle\" />\n <span>\n <Trans>Set as default</Trans>\n </span>\n </MenuItem>\n )}\n <MenuConfirm\n subMenu\n confirmLabel={\n <>\n <Icon icon=\"exit\" />\n <span>\n <Trans>\n Log out{' '}\n <span class=\"bidi-isolate\">\n @{account.info.acct}\n </span>\n ?\n </Trans>\n </span>\n </>\n }\n disabled={!isCurrent}\n menuItemClassName=\"danger\"\n onClick={() => {\n // const yes = confirm('Log out?');\n // if (!yes) return;\n accounts.splice(i, 1);\n store.local.setJSON('accounts', accounts);\n // location.reload();\n location.href = location.pathname || '/';\n }}\n >\n <Icon icon=\"exit\" />\n <span>\n <Trans>Log out…</Trans>\n </span>\n </MenuConfirm>\n </Menu2>\n </div>\n </li>\n );\n })}\n </ul>\n <p>\n <Link to=\"/login\" class=\"button plain2\" onClick={onClose}>\n <Icon icon=\"plus\" />{' '}\n <span>\n <Trans>Add an existing account</Trans>\n </span>\n </Link>\n </p>\n {moreThanOneAccount && (\n <p>\n <small>\n <Trans>\n Note: <i>Default</i> account will always be used for first\n load. Switched accounts will persist during the session.\n </Trans>\n </small>\n </p>\n )}\n </section>\n </main>\n </div>\n );\n}\n\nexport default Accounts;\n","export default \"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml:space='preserve'%20fill-rule='evenodd'%20stroke-linejoin='round'%20stroke-miterlimit='2'%20clip-rule='evenodd'%20viewBox='0%200%2064%2064'%3e%3cpath%20fill='none'%20d='M0%200h63.994v63.994H0z'/%3e%3cpath%20fill='%23a4bff7'%20d='M37.774%2011.471c14.639%203.752%2019.034%2016.557%2015.889%2031.304-.696%203.261-2.563%206.661-6.356%208.693-3.204%201.717-8.07%202.537-15.338.55l-9.634-2.404C11.651%2046.992%208.378%2038.733%2010.027%2031.823c3.627-15.201%2015.543-23.48%2027.747-20.352Z'/%3e%3cpath%20fill='%23d8e7fe'%20d='M36.76%2015.429c12.289%203.15%2015.547%2014.114%2012.907%2026.493-.947%204.44-4.937%209.365-16.664%206.143l-9.684-2.417c-7.854-1.923-10.53-7.8-9.318-12.877%203.016-12.639%2012.611-19.943%2022.759-17.342Z'/%3e%3cpath%20fill='%236081e6'%20d='M27.471%2024.991c-1.457-.698-7.229%203.213-7.663%208.926-.182%202.39%204.55%203.237%205.071-.169.725-4.743%203.715-8.218%202.592-8.757Zm10.746%202.005c-2.083.327-.382%205.901-.595%2010.727-.123%202.8%204.388%203.464%204.703%202.011%201.098-5.073-2.066-13.058-4.108-12.738Z'/%3e%3c/svg%3e\"","import { useLingui } from '@lingui/react';\nimport { useMemo } from 'preact/hooks';\n\nimport { CATALOGS, DEFAULT_LANG, DEV_LOCALES, LOCALES } from '../locales';\nimport { activateLang } from '../utils/lang';\nimport localeCode2Text from '../utils/localeCode2Text';\nimport store from '../utils/store';\n\nconst regionMaps = {\n 'zh-CN': 'zh-Hans',\n 'zh-TW': 'zh-Hant',\n 'pt-BR': 'pt-BR',\n};\n\nexport default function LangSelector() {\n const { i18n } = useLingui();\n\n // Sorted on render, so the order won't suddenly change based on current locale\n const populatedLocales = useMemo(() => {\n return LOCALES.map((lang) => {\n // Don't need regions for now, it makes text too noisy\n // Wait till there's too many languages and there are regional clashes\n const regionlessCode = regionMaps[lang] || lang.replace(/-[a-z]+$/i, '');\n\n const native = localeCode2Text({\n code: regionlessCode,\n locale: lang,\n fallback: CATALOGS.find((c) => c.code === lang)?.nativeName,\n });\n\n // Not used when rendering because it'll change based on current locale\n // Only used for sorting on render\n const _common = localeCode2Text({\n code: regionlessCode,\n locale: i18n.locale,\n fallback: CATALOGS.find((c) => c.code === lang)?.name,\n });\n\n return {\n code: lang,\n regionlessCode,\n _common,\n native,\n };\n }).sort((a, b) => {\n // Sort by common name\n const order = a._common.localeCompare(b._common, i18n.locale);\n if (order !== 0) return order;\n // Sort by code (fallback)\n if (a.code < b.code) return -1;\n if (a.code > b.code) return 1;\n return 0;\n });\n }, []);\n\n return (\n <label class=\"lang-selector\">\n 🌐{' '}\n <select\n class=\"small\"\n value={i18n.locale || DEFAULT_LANG}\n onChange={(e) => {\n store.local.set('lang', e.target.value);\n activateLang(e.target.value);\n }}\n >\n {populatedLocales.map(({ code, regionlessCode, native }) => {\n // Common name changes based on current locale\n const common = localeCode2Text({\n code: regionlessCode,\n locale: i18n.locale,\n fallback: CATALOGS.find((c) => c.code === code)?.name,\n });\n const showCommon = !!common && common !== native;\n return (\n <option\n value={code}\n data-regionless-code={regionlessCode}\n key={code}\n >\n {showCommon ? `${native} - ${common}` : native}\n </option>\n );\n })}\n {(import.meta.env.DEV || import.meta.env.PHANPY_SHOW_DEV_LOCALES) && (\n <optgroup label=\"🚧 Development (<50% translated)\">\n {DEV_LOCALES.map((code) => {\n if (code === 'pseudo-LOCALE') {\n return (\n <>\n <hr />\n <option value={code} key={code}>\n Pseudolocalization (test)\n </option>\n </>\n );\n }\n const nativeName = CATALOGS.find(\n (c) => c.code === code,\n )?.nativeName;\n const completion = CATALOGS.find(\n (c) => c.code === code,\n )?.completion;\n return (\n <option value={code} key={code}>\n {nativeName || code} ‎[{completion}%]\n </option>\n );\n })}\n </optgroup>\n )}\n </select>\n </label>\n );\n}\n","// Utils for push notifications\nimport { api } from './api';\nimport { getVapidKey } from './store-utils';\n\n// Subscription is an object with the following structure:\n// {\n// data: {\n// alerts: {\n// admin: {\n// report: boolean,\n// signUp: boolean,\n// },\n// favourite: boolean,\n// follow: boolean,\n// mention: boolean,\n// poll: boolean,\n// reblog: boolean,\n// status: boolean,\n// update: boolean,\n// }\n// },\n// policy: \"all\" | \"followed\" | \"follower\" | \"none\",\n// subscription: {\n// endpoint: string,\n// keys: {\n// auth: string,\n// p256dh: string,\n// },\n// },\n// }\n\n// Back-end CRUD\n// =============\n\nfunction createBackendPushSubscription(subscription) {\n const { masto } = api();\n return masto.v1.push.subscription.create(subscription);\n}\n\nfunction fetchBackendPushSubscription() {\n const { masto } = api();\n return masto.v1.push.subscription.fetch();\n}\n\nfunction updateBackendPushSubscription(subscription) {\n const { masto } = api();\n return masto.v1.push.subscription.update(subscription);\n}\n\nfunction removeBackendPushSubscription() {\n const { masto } = api();\n return masto.v1.push.subscription.remove();\n}\n\n// Front-end\n// =========\n\nexport function isPushSupported() {\n return 'serviceWorker' in navigator && 'PushManager' in window;\n}\n\nexport function getRegistration() {\n // return navigator.serviceWorker.ready;\n return navigator.serviceWorker.getRegistration();\n}\n\nasync function getSubscription() {\n const registration = await getRegistration();\n const subscription = registration\n ? await registration.pushManager.getSubscription()\n : undefined;\n return { registration, subscription };\n}\n\nfunction urlBase64ToUint8Array(base64String) {\n const padding = '='.repeat((4 - (base64String.length % 4)) % 4);\n const base64 = `${base64String}${padding}`\n .replace(/-/g, '+')\n .replace(/_/g, '/');\n\n const rawData = window.atob(base64);\n const outputArray = new Uint8Array(rawData.length);\n\n for (let i = 0; i < rawData.length; ++i) {\n outputArray[i] = rawData.charCodeAt(i);\n }\n\n return outputArray;\n}\n\n// Front-end <-> back-end\n// ======================\n\nexport async function initSubscription() {\n if (!isPushSupported()) return;\n const { subscription } = await getSubscription();\n let backendSubscription = null;\n try {\n backendSubscription = await fetchBackendPushSubscription();\n } catch (err) {\n if (/(not found|unknown)/i.test(err.message)) {\n // No subscription found\n } else {\n // Other error\n throw err;\n }\n }\n console.log('INIT subscription', {\n subscription,\n backendSubscription,\n });\n\n // Check if the subscription changed\n if (backendSubscription && subscription) {\n const sameEndpoint = backendSubscription.endpoint === subscription.endpoint;\n const vapidKey = getVapidKey();\n const sameKey = backendSubscription.serverKey === vapidKey;\n if (!sameEndpoint) {\n throw new Error('Backend subscription endpoint changed');\n }\n if (sameKey) {\n // Subscription didn't change\n } else {\n // Subscription changed\n console.error('🔔 Subscription changed', {\n sameEndpoint,\n serverKey: backendSubscription.serverKey,\n vapIdKey: vapidKey,\n endpoint1: backendSubscription.endpoint,\n endpoint2: subscription.endpoint,\n sameKey,\n key1: backendSubscription.serverKey,\n key2: vapidKey,\n });\n throw new Error('Backend subscription key and vapid key changed');\n // Only unsubscribe from backend, not from browser\n // await removeBackendPushSubscription();\n // // Now let's resubscribe\n // // NOTE: I have no idea if this works\n // return await updateSubscription({\n // data: backendSubscription.data,\n // policy: backendSubscription.policy,\n // });\n }\n }\n\n if (subscription && !backendSubscription) {\n // check if account's vapidKey is same as subscription's applicationServerKey\n const vapidKey = getVapidKey();\n if (vapidKey) {\n const { applicationServerKey } = subscription.options;\n const vapidKeyStr = urlBase64ToUint8Array(vapidKey).toString();\n const applicationServerKeyStr = new Uint8Array(\n applicationServerKey,\n ).toString();\n const sameKey = vapidKeyStr === applicationServerKeyStr;\n if (sameKey) {\n // Subscription didn't change\n } else {\n // Subscription changed\n console.error('🔔 Subscription changed', {\n vapidKeyStr,\n applicationServerKeyStr,\n sameKey,\n });\n // Unsubscribe since backend doesn't have a subscription\n await subscription.unsubscribe();\n throw new Error('Subscription key and vapid key changed');\n }\n } else {\n console.warn('No vapidKey found');\n }\n }\n\n // Check if backend subscription returns 404\n // if (subscription && !backendSubscription) {\n // // Re-subscribe to backend\n // backendSubscription = await createBackendPushSubscription({\n // subscription,\n // data: {},\n // policy: 'all',\n // });\n // }\n\n return { subscription, backendSubscription };\n}\n\nexport async function updateSubscription({ data, policy }) {\n console.log('🔔 Updating subscription', { data, policy });\n if (!isPushSupported()) return;\n let { registration, subscription } = await getSubscription();\n let backendSubscription = null;\n\n if (subscription) {\n try {\n backendSubscription = await updateBackendPushSubscription({\n data,\n policy,\n });\n // TODO: save subscription in user settings\n } catch (error) {\n // Backend doesn't have a subscription for this user\n // Create a new one\n backendSubscription = await createBackendPushSubscription({\n subscription,\n data,\n policy,\n });\n // TODO: save subscription in user settings\n }\n } else {\n // User is not subscribed\n const vapidKey = getVapidKey();\n if (!vapidKey) throw new Error('No server key found');\n subscription = await registration.pushManager.subscribe({\n userVisibleOnly: true,\n applicationServerKey: urlBase64ToUint8Array(vapidKey),\n });\n backendSubscription = await createBackendPushSubscription({\n subscription,\n data,\n policy,\n });\n // TODO: save subscription in user settings\n }\n\n return { subscription, backendSubscription };\n}\n\nexport async function removeSubscription() {\n if (!isPushSupported()) return;\n const { subscription } = await getSubscription();\n if (subscription) {\n await removeBackendPushSubscription();\n await subscription.unsubscribe();\n }\n}\n","import './settings.css';\n\nimport { Plural, t, Trans } from '@lingui/macro';\nimport { useEffect, useRef, useState } from 'preact/hooks';\nimport { useSnapshot } from 'valtio';\n\nimport logo from '../assets/logo.svg';\n\nimport Icon from '../components/icon';\nimport LangSelector from '../components/lang-selector';\nimport Link from '../components/link';\nimport RelativeTime from '../components/relative-time';\nimport targetLanguages from '../data/lingva-target-languages';\nimport { api } from '../utils/api';\nimport getTranslateTargetLanguage from '../utils/get-translate-target-language';\nimport localeCode2Text from '../utils/localeCode2Text';\nimport prettyBytes from '../utils/pretty-bytes';\nimport {\n initSubscription,\n isPushSupported,\n removeSubscription,\n updateSubscription,\n} from '../utils/push-notifications';\nimport showToast from '../utils/show-toast';\nimport states from '../utils/states';\nimport store from '../utils/store';\nimport supports from '../utils/supports';\n\nconst DEFAULT_TEXT_SIZE = 16;\nconst TEXT_SIZES = [14, 15, 16, 17, 18, 19, 20];\nconst {\n PHANPY_WEBSITE: WEBSITE,\n PHANPY_PRIVACY_POLICY_URL: PRIVACY_POLICY_URL,\n PHANPY_IMG_ALT_API_URL: IMG_ALT_API_URL,\n PHANPY_GIPHY_API_KEY: GIPHY_API_KEY,\n} = import.meta.env;\n\nfunction Settings({ onClose }) {\n const snapStates = useSnapshot(states);\n const currentTheme = store.local.get('theme') || 'auto';\n const themeFormRef = useRef();\n const targetLanguage =\n snapStates.settings.contentTranslationTargetLanguage || null;\n const systemTargetLanguage = getTranslateTargetLanguage();\n const systemTargetLanguageText = localeCode2Text(systemTargetLanguage);\n const currentTextSize = store.local.get('textSize') || DEFAULT_TEXT_SIZE;\n\n const [prefs, setPrefs] = useState(store.account.get('preferences') || {});\n const { masto, authenticated, instance } = api();\n // Get preferences every time Settings is opened\n // NOTE: Disabled for now because I don't expect this to change often. Also for some reason, the /api/v1/preferences endpoint is cached for a while and return old prefs if refresh immediately after changing them.\n // useEffect(() => {\n // const { masto } = api();\n // (async () => {\n // try {\n // const preferences = await masto.v1.preferences.fetch();\n // setPrefs(preferences);\n // store.account.set('preferences', preferences);\n // } catch (e) {\n // // Silently fail\n // console.error(e);\n // }\n // })();\n // }, []);\n\n return (\n <div\n id=\"settings-container\"\n class=\"sheet\"\n tabIndex=\"-1\"\n style={{\n '--current-text-size': `${currentTextSize}px`,\n }}\n >\n {!!onClose && (\n <button type=\"button\" class=\"sheet-close\" onClick={onClose}>\n <Icon icon=\"x\" alt={t`Close`} />\n </button>\n )}\n <header>\n <h2>\n <Trans>Settings</Trans>\n </h2>\n </header>\n <main>\n <section>\n <ul>\n <li>\n <div>\n <label>\n <Trans>Appearance</Trans>\n </label>\n </div>\n <div>\n <form\n ref={themeFormRef}\n onInput={(e) => {\n console.log(e);\n e.preventDefault();\n const formData = new FormData(themeFormRef.current);\n const theme = formData.get('theme');\n const html = document.documentElement;\n\n if (theme === 'auto') {\n html.classList.remove('is-light', 'is-dark');\n\n // Disable manual theme <meta>\n const $manualMeta = document.querySelector(\n 'meta[data-theme-setting=\"manual\"]',\n );\n if ($manualMeta) {\n $manualMeta.name = '';\n }\n // Enable auto theme <meta>s\n const $autoMetas = document.querySelectorAll(\n 'meta[data-theme-setting=\"auto\"]',\n );\n $autoMetas.forEach((m) => {\n m.name = 'theme-color';\n });\n } else {\n html.classList.toggle('is-light', theme === 'light');\n html.classList.toggle('is-dark', theme === 'dark');\n\n // Enable manual theme <meta>\n const $manualMeta = document.querySelector(\n 'meta[data-theme-setting=\"manual\"]',\n );\n if ($manualMeta) {\n $manualMeta.name = 'theme-color';\n $manualMeta.content =\n theme === 'light'\n ? $manualMeta.dataset.themeLightColor\n : $manualMeta.dataset.themeDarkColor;\n }\n // Disable auto theme <meta>s\n const $autoMetas = document.querySelectorAll(\n 'meta[data-theme-setting=\"auto\"]',\n );\n $autoMetas.forEach((m) => {\n m.name = '';\n });\n }\n document\n .querySelector('meta[name=\"color-scheme\"]')\n .setAttribute(\n 'content',\n theme === 'auto' ? 'dark light' : theme,\n );\n\n if (theme === 'auto') {\n store.local.del('theme');\n } else {\n store.local.set('theme', theme);\n }\n }}\n >\n <div class=\"radio-group\">\n <label>\n <input\n type=\"radio\"\n name=\"theme\"\n value=\"light\"\n defaultChecked={currentTheme === 'light'}\n />\n <span>\n <Trans>Light</Trans>\n </span>\n </label>\n <label>\n <input\n type=\"radio\"\n name=\"theme\"\n value=\"dark\"\n defaultChecked={currentTheme === 'dark'}\n />\n <span>\n <Trans>Dark</Trans>\n </span>\n </label>\n <label>\n <input\n type=\"radio\"\n name=\"theme\"\n value=\"auto\"\n defaultChecked={\n currentTheme !== 'light' && currentTheme !== 'dark'\n }\n />\n <span>\n <Trans>Auto</Trans>\n </span>\n </label>\n </div>\n </form>\n </div>\n </li>\n <li>\n <div>\n <label>\n <Trans>Text size</Trans>\n </label>\n </div>\n <div class=\"range-group\">\n <span style={{ fontSize: TEXT_SIZES[0] }}>\n <Trans comment=\"Preview of one character, in smallest size\">\n A\n </Trans>\n </span>{' '}\n <input\n type=\"range\"\n min={TEXT_SIZES[0]}\n max={TEXT_SIZES[TEXT_SIZES.length - 1]}\n step=\"1\"\n value={currentTextSize}\n list=\"sizes\"\n onChange={(e) => {\n const value = parseInt(e.target.value, 10);\n const html = document.documentElement;\n // set CSS variable\n html.style.setProperty('--text-size', `${value}px`);\n // save to local storage\n if (value === DEFAULT_TEXT_SIZE) {\n store.local.del('textSize');\n } else {\n store.local.set('textSize', e.target.value);\n }\n }}\n />{' '}\n <span style={{ fontSize: TEXT_SIZES[TEXT_SIZES.length - 1] }}>\n <Trans comment=\"Preview of one character, in largest size\">\n A\n </Trans>\n </span>\n <datalist id=\"sizes\">\n {TEXT_SIZES.map((size) => (\n <option value={size} />\n ))}\n </datalist>\n </div>\n </li>\n <li>\n <span>\n <label>\n <Trans>Display language</Trans>\n </label>\n <br />\n <small>\n <a\n href=\"https://crowdin.com/project/phanpy\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n <Trans>Volunteer translations</Trans>\n </a>\n </small>\n </span>\n <LangSelector />\n </li>\n </ul>\n </section>\n {authenticated && (\n <>\n <h3>\n <Trans>Posting</Trans>\n </h3>\n <section>\n <ul>\n <li>\n <div>\n <label for=\"posting-privacy-field\">\n <Trans>Default visibility</Trans>{' '}\n <Icon icon=\"cloud\" alt={t`Synced`} class=\"synced-icon\" />\n </label>\n </div>\n <div>\n <select\n id=\"posting-privacy-field\"\n value={prefs['posting:default:visibility'] || 'public'}\n onChange={(e) => {\n const { value } = e.target;\n (async () => {\n try {\n await masto.v1.accounts.updateCredentials({\n source: {\n privacy: value,\n },\n });\n setPrefs({\n ...prefs,\n 'posting:default:visibility': value,\n });\n store.account.set('preferences', {\n ...prefs,\n 'posting:default:visibility': value,\n });\n } catch (e) {\n alert(t`Failed to update posting privacy`);\n console.error(e);\n }\n })();\n }}\n >\n <option value=\"public\">\n <Trans>Public</Trans>\n </option>\n <option value=\"unlisted\">\n <Trans>Unlisted</Trans>\n </option>\n <option value=\"private\">\n <Trans>Followers only</Trans>\n </option>\n </select>\n </div>\n </li>\n </ul>\n </section>\n <p class=\"section-postnote\">\n <Icon icon=\"cloud\" alt={t`Synced`} class=\"synced-icon\" />{' '}\n <small>\n <Trans>\n Synced to your instance server's settings.{' '}\n <a\n href={`https://${instance}/`}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Go to your instance ({instance}) for more settings.\n </a>\n </Trans>\n </small>\n </p>\n </>\n )}\n <h3>\n <Trans>Experiments</Trans>\n </h3>\n <section>\n <ul>\n <li class=\"block\">\n <label>\n <input\n type=\"checkbox\"\n checked={snapStates.settings.autoRefresh}\n onChange={(e) => {\n states.settings.autoRefresh = e.target.checked;\n }}\n />{' '}\n <Trans>Auto refresh timeline posts</Trans>\n </label>\n </li>\n <li class=\"block\">\n <label>\n <input\n type=\"checkbox\"\n checked={snapStates.settings.boostsCarousel}\n onChange={(e) => {\n states.settings.boostsCarousel = e.target.checked;\n }}\n />{' '}\n <Trans>Boosts carousel</Trans>\n </label>\n </li>\n <li class=\"block\">\n <label>\n <input\n type=\"checkbox\"\n checked={snapStates.settings.contentTranslation}\n onChange={(e) => {\n const { checked } = e.target;\n states.settings.contentTranslation = checked;\n if (!checked) {\n states.settings.contentTranslationTargetLanguage = null;\n }\n }}\n />{' '}\n <Trans>Post translation</Trans>\n </label>\n <div\n class={`sub-section ${\n !snapStates.settings.contentTranslation\n ? 'more-insignificant'\n : ''\n }`}\n >\n <div>\n <label>\n <Trans>Translate to </Trans>{' '}\n <select\n value={targetLanguage || ''}\n disabled={!snapStates.settings.contentTranslation}\n style={{ width: '10em' }}\n onChange={(e) => {\n states.settings.contentTranslationTargetLanguage =\n e.target.value || null;\n }}\n >\n <option value=\"\">\n <Trans>\n System language ({systemTargetLanguageText})\n </Trans>\n </option>\n <option disabled>──────────</option>\n {targetLanguages.map((lang) => {\n const common = localeCode2Text({\n code: lang.code,\n fallback: lang.name,\n });\n const native = localeCode2Text({\n code: lang.code,\n locale: lang.code,\n });\n const showCommon = common !== native;\n return (\n <option value={lang.code}>\n {showCommon ? `${native} - ${common}` : common}\n </option>\n );\n })}\n </select>\n </label>\n </div>\n <hr />\n <div class=\"checkbox-fieldset\">\n <Plural\n value={\n snapStates.settings.contentTranslationHideLanguages.length\n }\n _0={`Hide \"Translate\" button for:`}\n other={`Hide \"Translate\" button for (#):`}\n />\n <div class=\"checkbox-fields\">\n {targetLanguages.map((lang) => {\n const common = localeCode2Text({\n code: lang.code,\n fallback: lang.name,\n });\n const native = localeCode2Text({\n code: lang.code,\n locale: lang.code,\n });\n const showCommon = common !== native;\n return (\n <label>\n <input\n type=\"checkbox\"\n checked={snapStates.settings.contentTranslationHideLanguages.includes(\n lang.code,\n )}\n onChange={(e) => {\n const { checked } = e.target;\n if (checked) {\n states.settings.contentTranslationHideLanguages.push(\n lang.code,\n );\n } else {\n states.settings.contentTranslationHideLanguages =\n snapStates.settings.contentTranslationHideLanguages.filter(\n (code) => code !== lang.code,\n );\n }\n }}\n />{' '}\n {showCommon ? (\n <span>\n {native}{' '}\n <span class=\"insignificant\">- {common}</span>\n </span>\n ) : (\n common\n )}\n </label>\n );\n })}\n </div>\n </div>\n <p class=\"insignificant\">\n <small>\n <Trans>\n Note: This feature uses external translation services,\n powered by{' '}\n <a\n href=\"https://github.com/cheeaun/lingva-api\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Lingva API\n </a>{' '}\n &{' '}\n <a\n href=\"https://github.com/thedaviddelta/lingva-translate\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Lingva Translate\n </a>\n .\n </Trans>\n </small>\n </p>\n <hr />\n <div>\n <label>\n <input\n type=\"checkbox\"\n checked={snapStates.settings.contentTranslationAutoInline}\n disabled={!snapStates.settings.contentTranslation}\n onChange={(e) => {\n states.settings.contentTranslationAutoInline =\n e.target.checked;\n }}\n />{' '}\n <Trans>Auto inline translation</Trans>\n </label>\n <p class=\"insignificant\">\n <small>\n <Trans>\n Automatically show translation for posts in timeline.\n Only works for <b>short</b> posts without content\n warning, media and poll.\n </Trans>\n </small>\n </p>\n </div>\n </div>\n </li>\n {!!GIPHY_API_KEY && authenticated && (\n <li class=\"block\">\n <label>\n <input\n type=\"checkbox\"\n checked={snapStates.settings.composerGIFPicker}\n onChange={(e) => {\n states.settings.composerGIFPicker = e.target.checked;\n }}\n />{' '}\n <Trans>GIF Picker for composer</Trans>\n </label>\n <div class=\"sub-section insignificant\">\n <small>\n <Trans>\n Note: This feature uses external GIF search service,\n powered by{' '}\n <a\n href=\"https://developers.giphy.com/\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n GIPHY\n </a>\n . G-rated (suitable for viewing by all ages), tracking\n parameters are stripped, referrer information is omitted\n from requests, but search queries and IP address\n information will still reach their servers.\n </Trans>\n </small>\n </div>\n </li>\n )}\n {!!IMG_ALT_API_URL && authenticated && (\n <li class=\"block\">\n <label>\n <input\n type=\"checkbox\"\n checked={snapStates.settings.mediaAltGenerator}\n onChange={(e) => {\n states.settings.mediaAltGenerator = e.target.checked;\n }}\n />{' '}\n <Trans>Image description generator</Trans>{' '}\n <Icon icon=\"sparkles2\" class=\"more-insignificant\" />\n </label>\n <div class=\"sub-section insignificant\">\n <small>\n <Trans>\n Only for new images while composing new posts.\n </Trans>\n </small>\n </div>\n <div class=\"sub-section insignificant\">\n <small>\n <Trans>\n Note: This feature uses external AI service, powered by{' '}\n <a\n href=\"https://github.com/cheeaun/img-alt-api\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n img-alt-api\n </a>\n . May not work well. Only for images and in English.\n </Trans>\n </small>\n </div>\n </li>\n )}\n {authenticated && supports('@mastodon/grouped-notifications') && (\n <li class=\"block\">\n <label>\n <input\n type=\"checkbox\"\n checked={snapStates.settings.groupedNotificationsAlpha}\n onChange={(e) => {\n states.settings.groupedNotificationsAlpha =\n e.target.checked;\n }}\n />{' '}\n <Trans>Server-side grouped notifications</Trans>\n </label>\n <div class=\"sub-section insignificant\">\n <small>\n <Trans>\n Alpha-stage feature. Potentially improved grouping window\n but basic grouping logic.\n </Trans>\n </small>\n </div>\n </li>\n )}\n {authenticated && (\n <li class=\"block\">\n <label>\n <input\n type=\"checkbox\"\n checked={\n snapStates.settings.shortcutSettingsCloudImportExport\n }\n onChange={(e) => {\n states.settings.shortcutSettingsCloudImportExport =\n e.target.checked;\n }}\n />{' '}\n <Trans>\"Cloud\" import/export for shortcuts settings</Trans>{' '}\n <Icon icon=\"cloud\" class=\"more-insignificant\" />\n </label>\n <div class=\"sub-section insignificant\">\n <small>\n <Trans>\n ⚠️⚠️⚠️ Very experimental.\n <br />\n Stored in your own profile’s notes. Profile (private)\n notes are mainly used for other profiles, and hidden for\n own profile.\n </Trans>\n </small>\n </div>\n <div class=\"sub-section insignificant\">\n <small>\n <Trans>\n Note: This feature uses currently-logged-in instance\n server API.\n </Trans>\n </small>\n </div>\n </li>\n )}\n <li class=\"block\">\n <label>\n <input\n type=\"checkbox\"\n checked={snapStates.settings.cloakMode}\n onChange={(e) => {\n states.settings.cloakMode = e.target.checked;\n }}\n />{' '}\n <Trans>\n Cloak mode{' '}\n <span class=\"insignificant\">\n (<samp>Text</samp> → <samp>████</samp>)\n </span>\n </Trans>\n </label>\n <div class=\"sub-section insignificant\">\n <small>\n <Trans>\n Replace text as blocks, useful when taking screenshots, for\n privacy reasons.\n </Trans>\n </small>\n </div>\n </li>\n {authenticated && (\n <li>\n <button\n type=\"button\"\n class=\"light\"\n onClick={() => {\n states.showDrafts = true;\n states.showSettings = false;\n }}\n >\n <Trans>Unsent drafts</Trans>\n </button>\n </li>\n )}\n </ul>\n </section>\n {authenticated && <PushNotificationsSection onClose={onClose} />}\n <h3>\n <Trans>About</Trans>\n </h3>\n <section>\n <div\n style={{\n display: 'flex',\n flexWrap: 'wrap',\n gap: 8,\n lineHeight: 1.25,\n alignItems: 'center',\n marginTop: 8,\n }}\n >\n <img\n src={logo}\n alt=\"\"\n width=\"64\"\n height=\"64\"\n style={{\n aspectRatio: '1/1',\n verticalAlign: 'middle',\n background: '#b7cdf9',\n borderRadius: 12,\n }}\n />\n <div>\n <b>Phanpy</b>{' '}\n <a\n href=\"https://hachyderm.io/@phanpy\"\n // target=\"_blank\"\n rel=\"noopener noreferrer\"\n onClick={(e) => {\n e.preventDefault();\n states.showAccount = 'phanpy@hachyderm.io';\n }}\n >\n @phanpy\n </a>\n <br />\n <Trans>\n <a\n href=\"https://github.com/cheeaun/phanpy\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Built\n </a>{' '}\n by{' '}\n <a\n href=\"https://mastodon.social/@cheeaun\"\n // target=\"_blank\"\n rel=\"noopener noreferrer\"\n onClick={(e) => {\n e.preventDefault();\n states.showAccount = 'cheeaun@mastodon.social';\n }}\n >\n @cheeaun\n </a>\n </Trans>\n </div>\n </div>\n <p>\n <a\n href=\"https://github.com/sponsors/cheeaun\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n <Trans>Sponsor</Trans>\n </a>{' '}\n ·{' '}\n <a\n href=\"https://www.buymeacoffee.com/cheeaun\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n <Trans>Donate</Trans>\n </a>{' '}\n ·{' '}\n <a\n href=\"https://patreon.com/cheeaun\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Patreon\n </a>{' '}\n ·{' '}\n <a\n href={PRIVACY_POLICY_URL}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n <Trans>Privacy Policy</Trans>\n </a>\n </p>\n {__BUILD_TIME__ && (\n <p>\n {WEBSITE && (\n <>\n <Trans>\n <span class=\"insignificant\">Site:</span>{' '}\n {WEBSITE.replace(/https?:\\/\\//g, '').replace(/\\/$/, '')}\n </Trans>\n <br />\n </>\n )}\n <Trans>\n <span class=\"insignificant\">Version:</span>{' '}\n <input\n type=\"text\"\n class=\"version-string\"\n readOnly\n size=\"18\" // Manually calculated here\n value={`${__BUILD_TIME__.slice(0, 10).replace(/-/g, '.')}${\n __COMMIT_HASH__ ? `.${__COMMIT_HASH__}` : ''\n }`}\n onClick={(e) => {\n e.target.select();\n // Copy to clipboard\n try {\n navigator.clipboard.writeText(e.target.value);\n showToast(t`Version string copied`);\n } catch (e) {\n console.warn(e);\n showToast(t`Unable to copy version string`);\n }\n }}\n />{' '}\n {!__FAKE_COMMIT_HASH__ && (\n <span class=\"ib insignificant\">\n (\n <a\n href={`https://github.com/cheeaun/phanpy/commit/${__COMMIT_HASH__}`}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n <RelativeTime datetime={new Date(__BUILD_TIME__)} />\n </a>\n )\n </span>\n )}\n </Trans>\n </p>\n )}\n </section>\n {(import.meta.env.DEV || import.meta.env.PHANPY_DEV) && (\n <details class=\"debug-info\">\n <summary></summary>\n <p>Debugging</p>\n {__BENCH_RESULTS?.size > 0 && (\n <ul>\n {Array.from(__BENCH_RESULTS.entries()).map(\n ([name, duration]) => (\n <li>\n <b>{name}</b>: {duration}ms\n </li>\n ),\n )}\n </ul>\n )}\n <p>Service Worker Cache</p>\n <button\n type=\"button\"\n class=\"plain2 small\"\n onClick={async () => alert(await getCachesKeys())}\n >\n Show keys count\n </button>{' '}\n <button\n type=\"button\"\n class=\"plain2 small\"\n onClick={async () => alert(await getCachesSize())}\n >\n Show cache size\n </button>{' '}\n <button\n type=\"button\"\n class=\"plain2 small\"\n onClick={() => {\n const key = prompt('Enter cache key');\n if (!key) return;\n try {\n clearCacheKey(key);\n } catch (e) {\n alert(e);\n }\n }}\n >\n Clear cache key\n </button>{' '}\n <button\n type=\"button\"\n class=\"plain2 small\"\n onClick={() => {\n try {\n clearCaches();\n } catch (e) {\n alert(e);\n }\n }}\n >\n Clear all caches\n </button>\n </details>\n )}\n </main>\n </div>\n );\n}\n\nasync function getCachesKeys() {\n const keys = await caches.keys();\n const total = {};\n for (const key of keys) {\n const cache = await caches.open(key);\n const k = await cache.keys();\n total[key] = k.length;\n }\n return total;\n}\n\nasync function getCachesSize() {\n const keys = await caches.keys();\n let total = {};\n let TOTAL = 0;\n for (const key of keys) {\n const cache = await caches.open(key);\n const k = await cache.keys();\n for (const item of k) {\n try {\n const response = await cache.match(item);\n const blob = await response.blob();\n total[key] = (total[key] || 0) + blob.size;\n TOTAL += blob.size;\n } catch (e) {\n alert('Failed to get cache size for ' + item);\n alert(e);\n }\n }\n }\n return {\n ...Object.fromEntries(\n Object.entries(total).map(([k, v]) => [k, prettyBytes(v)]),\n ),\n TOTAL: prettyBytes(TOTAL),\n };\n}\n\nfunction clearCacheKey(key) {\n return caches.delete(key);\n}\n\nasync function clearCaches() {\n const keys = await caches.keys();\n for (const key of keys) {\n await caches.delete(key);\n }\n}\n\nfunction PushNotificationsSection({ onClose }) {\n if (!isPushSupported()) return null;\n\n const { instance } = api();\n const [uiState, setUIState] = useState('default');\n const pushFormRef = useRef();\n const [allowNotifications, setAllowNotifications] = useState(false);\n const [needRelogin, setNeedRelogin] = useState(false);\n const previousPolicyRef = useRef();\n useEffect(() => {\n (async () => {\n setUIState('loading');\n try {\n const { subscription, backendSubscription } = await initSubscription();\n if (\n backendSubscription?.policy &&\n backendSubscription.policy !== 'none'\n ) {\n setAllowNotifications(true);\n const { alerts, policy } = backendSubscription;\n console.log('backendSubscription', backendSubscription);\n previousPolicyRef.current = policy;\n const { elements } = pushFormRef.current;\n const policyEl = elements.namedItem('policy');\n if (policyEl) policyEl.value = policy;\n // alerts is {}, iterate it\n Object.keys(alerts).forEach((alert) => {\n const el = elements.namedItem(alert);\n if (el?.type === 'checkbox') {\n el.checked = true;\n }\n });\n }\n setUIState('default');\n } catch (err) {\n console.warn(err);\n if (/outside.*authorized/i.test(err.message)) {\n setNeedRelogin(true);\n } else {\n alert(err?.message || err);\n }\n setUIState('error');\n }\n })();\n }, []);\n\n const isLoading = uiState === 'loading';\n\n return (\n <form\n ref={pushFormRef}\n onChange={() => {\n setTimeout(() => {\n const values = Object.fromEntries(new FormData(pushFormRef.current));\n const allowNotifications = !!values['policy-allow'];\n const params = {\n data: {\n policy: values.policy,\n alerts: {\n mention: !!values.mention,\n favourite: !!values.favourite,\n reblog: !!values.reblog,\n follow: !!values.follow,\n follow_request: !!values.followRequest,\n poll: !!values.poll,\n update: !!values.update,\n status: !!values.status,\n },\n },\n };\n\n let alertsCount = 0;\n // Remove false values from data.alerts\n // API defaults to false anyway\n Object.keys(params.data.alerts).forEach((key) => {\n if (!params.data.alerts[key]) {\n delete params.data.alerts[key];\n } else {\n alertsCount++;\n }\n });\n const policyChanged =\n previousPolicyRef.current !== params.data.policy;\n\n console.log('PN Form', {\n values,\n allowNotifications: allowNotifications,\n params,\n });\n\n if (allowNotifications && alertsCount > 0) {\n if (policyChanged) {\n console.debug('Policy changed.');\n removeSubscription()\n .then(() => {\n updateSubscription(params);\n })\n .catch((err) => {\n console.warn(err);\n alert(t`Failed to update subscription. Please try again.`);\n });\n } else {\n updateSubscription(params).catch((err) => {\n console.warn(err);\n alert(t`Failed to update subscription. Please try again.`);\n });\n }\n } else {\n removeSubscription().catch((err) => {\n console.warn(err);\n alert(t`Failed to remove subscription. Please try again.`);\n });\n }\n }, 100);\n }}\n >\n <h3>\n <Trans>Push Notifications (beta)</Trans>\n </h3>\n <section>\n <ul>\n <li>\n <label>\n <input\n type=\"checkbox\"\n disabled={isLoading || needRelogin}\n name=\"policy-allow\"\n checked={allowNotifications}\n onChange={async (e) => {\n const { checked } = e.target;\n if (checked) {\n // Request permission\n const permission = await Notification.requestPermission();\n if (permission === 'granted') {\n setAllowNotifications(true);\n } else {\n setAllowNotifications(false);\n if (permission === 'denied') {\n alert(\n t`Push notifications are blocked. Please enable them in your browser settings.`,\n );\n }\n }\n } else {\n setAllowNotifications(false);\n }\n }}\n />{' '}\n <Trans>\n Allow from{' '}\n <select\n name=\"policy\"\n disabled={isLoading || needRelogin || !allowNotifications}\n >\n {[\n {\n value: 'all',\n label: t`anyone`,\n },\n {\n value: 'followed',\n label: t`people I follow`,\n },\n {\n value: 'follower',\n label: t`followers`,\n },\n ].map((type) => (\n <option value={type.value}>{type.label}</option>\n ))}\n </select>\n </Trans>\n </label>\n <div\n class=\"shazam-container no-animation\"\n style={{\n width: '100%',\n }}\n hidden={!allowNotifications}\n >\n <div class=\"shazam-container-inner\">\n <div class=\"sub-section\">\n <ul>\n {[\n {\n value: 'mention',\n label: t`Mentions`,\n },\n {\n value: 'favourite',\n label: t`Likes`,\n },\n {\n value: 'reblog',\n label: t`Boosts`,\n },\n {\n value: 'follow',\n label: t`Follows`,\n },\n {\n value: 'followRequest',\n label: t`Follow requests`,\n },\n {\n value: 'poll',\n label: t`Polls`,\n },\n {\n value: 'update',\n label: t`Post edits`,\n },\n {\n value: 'status',\n label: t`New posts`,\n },\n ].map((alert) => (\n <li>\n <label>\n <input type=\"checkbox\" name={alert.value} />{' '}\n {alert.label}\n </label>\n </li>\n ))}\n </ul>\n </div>\n </div>\n </div>\n {needRelogin && (\n <div class=\"sub-section\">\n <p>\n <Trans>\n Push permission was not granted since your last login.\n You'll need to{' '}\n <Link to={`/login?instance=${instance}`} onClick={onClose}>\n <b>log in</b> again to grant push permission\n </Link>\n .\n </Trans>\n </p>\n </div>\n )}\n </li>\n </ul>\n </section>\n <p class=\"section-postnote\">\n <small>\n <Trans>\n NOTE: Push notifications only work for <b>one account</b>.\n </Trans>\n </small>\n </p>\n </form>\n );\n}\n\nexport default Settings;\n","const focusDeck = () => {\n let timer = setTimeout(() => {\n const columns = document.getElementById('columns');\n if (columns) {\n // Focus first column\n columns.querySelector('.deck-container')?.focus?.();\n } else {\n const modals = document.querySelectorAll('#modal-container > *');\n if (modals?.length) {\n // Focus last modal\n const modal = modals[modals.length - 1]; // last one\n const modalFocusElement =\n modal.querySelector('[tabindex=\"-1\"]') || modal;\n if (modalFocusElement) {\n modalFocusElement.focus();\n return;\n }\n }\n const backDrop = document.querySelector('.deck-backdrop');\n if (backDrop) return;\n // Focus last deck\n const pages = document.querySelectorAll('.deck-container');\n const page = pages[pages.length - 1]; // last one\n if (page && page.tabIndex === -1) {\n console.log('FOCUS', page);\n page.focus();\n }\n }\n }, 100);\n return () => clearTimeout(timer);\n};\n\nexport default focusDeck;\n","import { useEffect, useRef } from 'preact/hooks';\nimport { useLocation } from 'react-router-dom';\n\n// Hook that runs a callback when the location changes\n// Won't run on the first render\n\nexport default function useLocationChange(fn) {\n if (!fn) return;\n const location = useLocation();\n const currentLocationRef = useRef(location.pathname);\n useEffect(() => {\n // console.log('location', {\n // current: currentLocationRef.current,\n // next: location.pathname,\n // });\n if (\n currentLocationRef.current &&\n location.pathname !== currentLocationRef.current\n ) {\n fn?.();\n }\n }, [location.pathname, fn]);\n}\n","import { api } from './api';\nimport pmem from './pmem';\nimport store from './store';\n\nconst FETCH_MAX_AGE = 1000 * 60; // 1 minute\nconst MAX_AGE = 24 * 60 * 60 * 1000; // 1 day\n\nexport const fetchLists = pmem(\n async () => {\n const { masto } = api();\n const lists = await masto.v1.lists.list();\n lists.sort((a, b) => a.title.localeCompare(b.title));\n\n if (lists.length) {\n setTimeout(() => {\n // Save to local storage, with saved timestamp\n store.account.set('lists', {\n lists,\n updatedAt: Date.now(),\n });\n }, 1);\n }\n\n return lists;\n },\n {\n maxAge: FETCH_MAX_AGE,\n },\n);\n\nexport async function getLists() {\n try {\n const { lists, updatedAt } = store.account.get('lists') || {};\n if (!lists?.length) return await fetchLists();\n if (Date.now() - updatedAt > MAX_AGE) {\n // Stale-while-revalidate\n fetchLists();\n return lists;\n }\n return lists;\n } catch (e) {\n return [];\n }\n}\n\nexport const fetchList = pmem(\n (id) => {\n const { masto } = api();\n return masto.v1.lists.$select(id).fetch();\n },\n {\n maxAge: FETCH_MAX_AGE,\n },\n);\n\nexport async function getList(id) {\n const { lists } = store.account.get('lists') || {};\n console.log({ lists });\n if (lists?.length) {\n const theList = lists.find((l) => l.id === id);\n if (theList) return theList;\n }\n try {\n return fetchList(id);\n } catch (e) {\n return null;\n }\n}\n\nexport async function getListTitle(id) {\n const list = await getList(id);\n return list?.title || '';\n}\n\nexport function addListStore(list) {\n const { lists } = store.account.get('lists') || {};\n if (lists?.length) {\n lists.push(list);\n lists.sort((a, b) => a.title.localeCompare(b.title));\n store.account.set('lists', {\n lists,\n updatedAt: Date.now(),\n });\n }\n}\n\nexport function updateListStore(list) {\n const { lists } = store.account.get('lists') || {};\n if (lists?.length) {\n const index = lists.findIndex((l) => l.id === list.id);\n if (index !== -1) {\n lists[index] = list;\n lists.sort((a, b) => a.title.localeCompare(b.title));\n store.account.set('lists', {\n lists,\n updatedAt: Date.now(),\n });\n }\n }\n}\n\nexport function deleteListStore(listID) {\n const { lists } = store.account.get('lists') || {};\n if (lists?.length) {\n const index = lists.findIndex((l) => l.id === listID);\n if (index !== -1) {\n lists.splice(index, 1);\n store.account.set('lists', {\n lists,\n updatedAt: Date.now(),\n });\n }\n }\n}\n","import { t, Trans } from '@lingui/macro';\nimport { useEffect, useRef, useState } from 'preact/hooks';\n\nimport { api } from '../utils/api';\nimport { addListStore, deleteListStore, updateListStore } from '../utils/lists';\nimport supports from '../utils/supports';\n\nimport Icon from './icon';\nimport MenuConfirm from './menu-confirm';\n\nfunction ListAddEdit({ list, onClose }) {\n const { masto } = api();\n const [uiState, setUIState] = useState('default');\n const editMode = !!list;\n const nameFieldRef = useRef();\n const repliesPolicyFieldRef = useRef();\n const exclusiveFieldRef = useRef();\n useEffect(() => {\n if (editMode) {\n nameFieldRef.current.value = list.title;\n repliesPolicyFieldRef.current.value = list.repliesPolicy;\n if (exclusiveFieldRef.current) {\n exclusiveFieldRef.current.checked = list.exclusive;\n }\n }\n }, [editMode]);\n const supportsExclusive =\n supports('@mastodon/list-exclusive') ||\n supports('@gotosocial/list-exclusive');\n\n return (\n <div class=\"sheet\">\n {!!onClose && (\n <button type=\"button\" class=\"sheet-close\" onClick={onClose}>\n <Icon icon=\"x\" alt={t`Close`} />\n </button>\n )}{' '}\n <header>\n <h2>{editMode ? t`Edit list` : t`New list`}</h2>\n </header>\n <main>\n <form\n class=\"list-form\"\n onSubmit={(e) => {\n e.preventDefault(); // Get form values\n\n const formData = new FormData(e.target);\n const title = formData.get('title');\n const repliesPolicy = formData.get('replies_policy');\n const exclusive = formData.get('exclusive') === 'on';\n console.log({\n title,\n repliesPolicy,\n exclusive,\n });\n setUIState('loading');\n\n (async () => {\n try {\n let listResult;\n\n if (editMode) {\n listResult = await masto.v1.lists.$select(list.id).update({\n title,\n replies_policy: repliesPolicy,\n exclusive,\n });\n } else {\n listResult = await masto.v1.lists.create({\n title,\n replies_policy: repliesPolicy,\n exclusive,\n });\n }\n\n console.log(listResult);\n setUIState('default');\n onClose?.({\n state: 'success',\n list: listResult,\n });\n\n setTimeout(() => {\n if (editMode) {\n updateListStore(listResult);\n } else {\n addListStore(listResult);\n }\n }, 1);\n } catch (e) {\n console.error(e);\n setUIState('error');\n alert(\n editMode\n ? t`Unable to edit list.`\n : t`Unable to create list.`,\n );\n }\n })();\n }}\n >\n <div class=\"list-form-row\">\n <label for=\"list-title\">\n <Trans>Name</Trans>{' '}\n <input\n ref={nameFieldRef}\n type=\"text\"\n id=\"list-title\"\n name=\"title\"\n required\n disabled={uiState === 'loading'}\n dir=\"auto\"\n />\n </label>\n </div>\n <div class=\"list-form-row\">\n <select\n ref={repliesPolicyFieldRef}\n name=\"replies_policy\"\n required\n disabled={uiState === 'loading'}\n >\n <option value=\"list\">\n <Trans>Show replies to list members</Trans>\n </option>\n <option value=\"followed\">\n <Trans>Show replies to people I follow</Trans>\n </option>\n <option value=\"none\">\n <Trans>Don't show replies</Trans>\n </option>\n </select>\n </div>\n {supportsExclusive && (\n <div class=\"list-form-row\">\n <label class=\"label-block\">\n <input\n ref={exclusiveFieldRef}\n type=\"checkbox\"\n name=\"exclusive\"\n disabled={uiState === 'loading'}\n />{' '}\n <Trans>Hide posts on this list from Home/Following</Trans>\n </label>\n </div>\n )}\n <div class=\"list-form-footer\">\n <button type=\"submit\" disabled={uiState === 'loading'}>\n {editMode ? t`Save` : t`Create`}\n </button>\n {editMode && (\n <MenuConfirm\n disabled={uiState === 'loading'}\n align=\"end\"\n menuItemClassName=\"danger\"\n confirmLabel={t`Delete this list?`}\n onClick={() => {\n // const yes = confirm('Delete this list?');\n // if (!yes) return;\n setUIState('loading');\n\n (async () => {\n try {\n await masto.v1.lists.$select(list.id).remove();\n setUIState('default');\n onClose?.({\n state: 'deleted',\n });\n setTimeout(() => {\n deleteListStore(list.id);\n }, 1);\n } catch (e) {\n console.error(e);\n setUIState('error');\n alert(t`Unable to delete list.`);\n }\n })();\n }}\n >\n <button\n type=\"button\"\n class=\"light danger\"\n disabled={uiState === 'loading'}\n >\n <Trans>Delete…</Trans>\n </button>\n </MenuConfirm>\n )}\n </div>\n </form>\n </main>\n </div>\n );\n}\n\nexport default ListAddEdit;\n","import './account-info.css';\n\nimport { msg, plural, t, Trans } from '@lingui/macro';\nimport { useLingui } from '@lingui/react';\nimport { MenuDivider, MenuItem } from '@szhsin/react-menu';\nimport {\n useCallback,\n useEffect,\n useMemo,\n useReducer,\n useRef,\n useState,\n} from 'preact/hooks';\nimport punycode from 'punycode/';\n\nimport { api } from '../utils/api';\nimport enhanceContent from '../utils/enhance-content';\nimport getHTMLText from '../utils/getHTMLText';\nimport handleContentLinks from '../utils/handle-content-links';\nimport i18nDuration from '../utils/i18n-duration';\nimport { getLists } from '../utils/lists';\nimport niceDateTime from '../utils/nice-date-time';\nimport pmem from '../utils/pmem';\nimport shortenNumber from '../utils/shorten-number';\nimport showCompose from '../utils/show-compose';\nimport showToast from '../utils/show-toast';\nimport states, { hideAllModals } from '../utils/states';\nimport store from '../utils/store';\nimport { getCurrentAccountID, updateAccount } from '../utils/store-utils';\nimport supports from '../utils/supports';\n\nimport AccountBlock from './account-block';\nimport Avatar from './avatar';\nimport EmojiText from './emoji-text';\nimport Icon from './icon';\nimport Link from './link';\nimport ListAddEdit from './list-add-edit';\nimport Loader from './loader';\nimport MenuConfirm from './menu-confirm';\nimport MenuLink from './menu-link';\nimport Menu2 from './menu2';\nimport Modal from './modal';\nimport SubMenu2 from './submenu2';\nimport TranslationBlock from './translation-block';\n\nconst MUTE_DURATIONS = [\n 60 * 5, // 5 minutes\n 60 * 30, // 30 minutes\n 60 * 60, // 1 hour\n 60 * 60 * 6, // 6 hours\n 60 * 60 * 24, // 1 day\n 60 * 60 * 24 * 3, // 3 days\n 60 * 60 * 24 * 7, // 1 week\n 0, // forever\n];\nconst MUTE_DURATIONS_LABELS = {\n 0: msg`Forever`,\n 300: i18nDuration(5, 'minute'),\n 1_800: i18nDuration(30, 'minute'),\n 3_600: i18nDuration(1, 'hour'),\n 21_600: i18nDuration(6, 'hour'),\n 86_400: i18nDuration(1, 'day'),\n 259_200: i18nDuration(3, 'day'),\n 604_800: i18nDuration(1, 'week'),\n};\n\nconst LIMIT = 80;\n\nconst ACCOUNT_INFO_MAX_AGE = 1000 * 60 * 10; // 10 mins\n\nfunction fetchFamiliarFollowers(currentID, masto) {\n return masto.v1.accounts.familiarFollowers.fetch({\n id: [currentID],\n });\n}\nconst memFetchFamiliarFollowers = pmem(fetchFamiliarFollowers, {\n maxAge: ACCOUNT_INFO_MAX_AGE,\n});\n\nasync function fetchPostingStats(accountID, masto) {\n const fetchStatuses = masto.v1.accounts\n .$select(accountID)\n .statuses.list({\n limit: 20,\n })\n .next();\n\n const { value: statuses } = await fetchStatuses;\n console.log('fetched statuses', statuses);\n const stats = {\n total: statuses.length,\n originals: 0,\n replies: 0,\n boosts: 0,\n };\n // Categories statuses by type\n // - Original posts (not replies to others)\n // - Threads (self-replies + 1st original post)\n // - Boosts (reblogs)\n // - Replies (not-self replies)\n statuses.forEach((status) => {\n if (status.reblog) {\n stats.boosts++;\n } else if (\n !!status.inReplyToId &&\n status.inReplyToAccountId !== status.account.id // Not self-reply\n ) {\n stats.replies++;\n } else {\n stats.originals++;\n }\n });\n\n // Count days since last post\n if (statuses.length) {\n stats.daysSinceLastPost = Math.ceil(\n (Date.now() - new Date(statuses[statuses.length - 1].createdAt)) /\n 86400000,\n );\n }\n\n console.log('posting stats', stats);\n return stats;\n}\nconst memFetchPostingStats = pmem(fetchPostingStats, {\n maxAge: ACCOUNT_INFO_MAX_AGE,\n});\n\nfunction AccountInfo({\n account,\n fetchAccount = () => {},\n standalone,\n instance,\n authenticated,\n}) {\n const { i18n } = useLingui();\n const { masto } = api({\n instance,\n });\n const { masto: currentMasto, instance: currentInstance } = api();\n const [uiState, setUIState] = useState('default');\n const isString = typeof account === 'string';\n const [info, setInfo] = useState(isString ? null : account);\n\n const sameCurrentInstance = useMemo(\n () => instance === currentInstance,\n [instance, currentInstance],\n );\n\n useEffect(() => {\n if (!isString) {\n setInfo(account);\n return;\n }\n setUIState('loading');\n (async () => {\n try {\n const info = await fetchAccount();\n states.accounts[`${info.id}@${instance}`] = info;\n setInfo(info);\n setUIState('default');\n } catch (e) {\n console.error(e);\n setInfo(null);\n setUIState('error');\n }\n })();\n }, [isString, account, fetchAccount]);\n\n const {\n acct,\n avatar,\n avatarStatic,\n bot,\n createdAt,\n displayName,\n emojis,\n fields,\n followersCount,\n followingCount,\n group,\n // header,\n // headerStatic,\n id,\n lastStatusAt,\n locked,\n note,\n statusesCount,\n url,\n username,\n memorial,\n moved,\n roles,\n hideCollections,\n } = info || {};\n let headerIsAvatar = false;\n let { header, headerStatic } = info || {};\n if (!header || /missing\\.png$/.test(header)) {\n if (avatar && !/missing\\.png$/.test(avatar)) {\n header = avatar;\n headerIsAvatar = true;\n if (avatarStatic && !/missing\\.png$/.test(avatarStatic)) {\n headerStatic = avatarStatic;\n }\n }\n }\n\n const isSelf = useMemo(() => id === getCurrentAccountID(), [id]);\n\n useEffect(() => {\n const infoHasEssentials = !!(\n info?.id &&\n info?.username &&\n info?.acct &&\n info?.avatar &&\n info?.avatarStatic &&\n info?.displayName &&\n info?.url\n );\n if (isSelf && instance && infoHasEssentials) {\n const accounts = store.local.getJSON('accounts');\n let updated = false;\n accounts.forEach((account) => {\n if (account.info.id === info.id && account.instanceURL === instance) {\n account.info = info;\n updated = true;\n }\n });\n if (updated) {\n console.log('Updated account info', info);\n store.local.setJSON('accounts', accounts);\n }\n }\n }, [isSelf, info, instance]);\n\n const accountInstance = useMemo(() => {\n if (!url) return null;\n const domain = punycode.toUnicode(URL.parse(url).hostname);\n return domain;\n }, [url]);\n\n const [headerCornerColors, setHeaderCornerColors] = useState([]);\n\n const followersIterator = useRef();\n const familiarFollowersCache = useRef([]);\n async function fetchFollowers(firstLoad) {\n if (firstLoad || !followersIterator.current) {\n followersIterator.current = masto.v1.accounts.$select(id).followers.list({\n limit: LIMIT,\n });\n }\n const results = await followersIterator.current.next();\n if (isSelf) return results;\n if (!sameCurrentInstance) return results;\n\n const { value } = results;\n let newValue = [];\n // On first load, fetch familiar followers, merge to top of results' `value`\n // Remove dups on every fetch\n if (firstLoad) {\n let familiarFollowers = [];\n try {\n familiarFollowers = await masto.v1.accounts.familiarFollowers.fetch({\n id: [id],\n });\n } catch (e) {}\n familiarFollowersCache.current = familiarFollowers?.[0]?.accounts || [];\n newValue = [\n ...familiarFollowersCache.current,\n ...value.filter(\n (account) =>\n !familiarFollowersCache.current.some(\n (familiar) => familiar.id === account.id,\n ),\n ),\n ];\n } else if (value?.length) {\n newValue = value.filter(\n (account) =>\n !familiarFollowersCache.current.some(\n (familiar) => familiar.id === account.id,\n ),\n );\n }\n\n return {\n ...results,\n value: newValue,\n };\n }\n\n const followingIterator = useRef();\n async function fetchFollowing(firstLoad) {\n if (firstLoad || !followingIterator.current) {\n followingIterator.current = masto.v1.accounts.$select(id).following.list({\n limit: LIMIT,\n });\n }\n const results = await followingIterator.current.next();\n return results;\n }\n\n const LinkOrDiv = standalone ? 'div' : Link;\n const accountLink = instance ? `/${instance}/a/${id}` : `/a/${id}`;\n\n const [familiarFollowers, setFamiliarFollowers] = useState([]);\n const [postingStats, setPostingStats] = useState();\n const [postingStatsUIState, setPostingStatsUIState] = useState('default');\n const hasPostingStats = !!postingStats?.total;\n\n const renderFamiliarFollowers = async (currentID) => {\n try {\n const followers = await memFetchFamiliarFollowers(\n currentID,\n currentMasto,\n );\n console.log('fetched familiar followers', followers);\n setFamiliarFollowers(\n followers[0].accounts.slice(0, FAMILIAR_FOLLOWERS_LIMIT),\n );\n } catch (e) {\n console.error(e);\n }\n };\n\n const renderPostingStats = async () => {\n if (!id) return;\n setPostingStatsUIState('loading');\n try {\n const stats = await memFetchPostingStats(id, masto);\n setPostingStats(stats);\n setPostingStatsUIState('default');\n } catch (e) {\n console.error(e);\n setPostingStatsUIState('error');\n }\n };\n\n const onRelationshipChange = useCallback(\n ({ relationship, currentID }) => {\n if (!relationship.following) {\n renderFamiliarFollowers(currentID);\n if (!standalone && statusesCount > 0) {\n // Only render posting stats if not standalone and has posts\n renderPostingStats();\n }\n }\n },\n [standalone, id, statusesCount],\n );\n\n const onProfileUpdate = useCallback(\n (newAccount) => {\n if (newAccount.id === id) {\n console.log('Updated account info', newAccount);\n setInfo(newAccount);\n states.accounts[`${newAccount.id}@${instance}`] = newAccount;\n }\n },\n [id, instance],\n );\n\n return (\n <div\n tabIndex=\"-1\"\n class={`account-container ${uiState === 'loading' ? 'skeleton' : ''}`}\n style={{\n '--header-color-1': headerCornerColors[0],\n '--header-color-2': headerCornerColors[1],\n '--header-color-3': headerCornerColors[2],\n '--header-color-4': headerCornerColors[3],\n }}\n >\n {uiState === 'error' && (\n <div class=\"ui-state\">\n <p>\n <Trans>Unable to load account.</Trans>\n </p>\n <p>\n <a\n href={isString ? account : url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n <Trans>Go to account page</Trans> <Icon icon=\"external\" />\n </a>\n </p>\n </div>\n )}\n {uiState === 'loading' ? (\n <>\n <header>\n <AccountBlock avatarSize=\"xxxl\" skeleton />\n </header>\n <main>\n <div class=\"note\">\n <p>███████ ████ ████</p>\n <p>████ ████████ ██████ █████████ ████ ██</p>\n </div>\n <div class=\"account-metadata-box\">\n <div class=\"profile-metadata\">\n <div class=\"profile-field\">\n <b class=\"more-insignificant\">███</b>\n <p>██████</p>\n </div>\n <div class=\"profile-field\">\n <b class=\"more-insignificant\">████</b>\n <p>███████████</p>\n </div>\n </div>\n <div class=\"stats\">\n <div>\n <span>██</span> <Trans>Followers</Trans>\n </div>\n <div>\n <span>██</span> <Trans id=\"following.stats\">Following</Trans>\n </div>\n <div>\n <span>██</span> <Trans>Posts</Trans>\n </div>\n </div>\n </div>\n <div class=\"actions\">\n <span />\n <span class=\"buttons\">\n <button type=\"button\" class=\"plain\" disabled>\n <Icon icon=\"more\" size=\"l\" alt={t`More`} />\n </button>\n </span>\n </div>\n </main>\n </>\n ) : (\n info && (\n <>\n {!!moved && (\n <div class=\"account-moved\">\n <p>\n <Trans>\n <b>{displayName}</b> has indicated that their new account is\n now:\n </Trans>\n </p>\n <AccountBlock\n account={moved}\n instance={instance}\n onClick={(e) => {\n e.stopPropagation();\n states.showAccount = moved;\n }}\n />\n </div>\n )}\n {!!header && !/missing\\.png$/.test(header) && (\n <img\n src={header}\n alt=\"\"\n class={`header-banner ${\n headerIsAvatar ? 'header-is-avatar' : ''\n }`}\n onError={(e) => {\n if (e.target.crossOrigin) {\n if (e.target.src !== headerStatic) {\n e.target.src = headerStatic;\n } else {\n e.target.removeAttribute('crossorigin');\n e.target.src = header;\n }\n } else if (e.target.src !== headerStatic) {\n e.target.src = headerStatic;\n } else {\n e.target.remove();\n }\n }}\n crossOrigin=\"anonymous\"\n onLoad={(e) => {\n e.target.classList.add('loaded');\n try {\n // Get color from four corners of image\n const canvas = window.OffscreenCanvas\n ? new OffscreenCanvas(1, 1)\n : document.createElement('canvas');\n const ctx = canvas.getContext('2d', {\n willReadFrequently: true,\n });\n canvas.width = e.target.width;\n canvas.height = e.target.height;\n ctx.imageSmoothingEnabled = false;\n ctx.drawImage(e.target, 0, 0);\n // const colors = [\n // ctx.getImageData(0, 0, 1, 1).data,\n // ctx.getImageData(e.target.width - 1, 0, 1, 1).data,\n // ctx.getImageData(0, e.target.height - 1, 1, 1).data,\n // ctx.getImageData(\n // e.target.width - 1,\n // e.target.height - 1,\n // 1,\n // 1,\n // ).data,\n // ];\n // Get 10x10 pixels from corners, get average color from each\n const pixelDimension = 10;\n const colors = [\n ctx.getImageData(0, 0, pixelDimension, pixelDimension)\n .data,\n ctx.getImageData(\n e.target.width - pixelDimension,\n 0,\n pixelDimension,\n pixelDimension,\n ).data,\n ctx.getImageData(\n 0,\n e.target.height - pixelDimension,\n pixelDimension,\n pixelDimension,\n ).data,\n ctx.getImageData(\n e.target.width - pixelDimension,\n e.target.height - pixelDimension,\n pixelDimension,\n pixelDimension,\n ).data,\n ].map((data) => {\n let r = 0;\n let g = 0;\n let b = 0;\n let a = 0;\n for (let i = 0; i < data.length; i += 4) {\n r += data[i];\n g += data[i + 1];\n b += data[i + 2];\n a += data[i + 3];\n }\n const dataLength = data.length / 4;\n return [\n r / dataLength,\n g / dataLength,\n b / dataLength,\n a / dataLength,\n ];\n });\n const rgbColors = colors.map((color) => {\n const [r, g, b, a] = lightenRGB(color);\n return `rgba(${r}, ${g}, ${b}, ${a})`;\n });\n setHeaderCornerColors(rgbColors);\n console.log({ colors, rgbColors });\n } catch (e) {\n // Silently fail\n }\n }}\n />\n )}\n <header>\n {standalone ? (\n <Menu2\n shift={\n window.matchMedia('(min-width: calc(40em))').matches\n ? 114\n : 64\n }\n menuButton={\n <div>\n <AccountBlock\n account={info}\n instance={instance}\n avatarSize=\"xxxl\"\n onClick={() => {}}\n />\n </div>\n }\n >\n <div class=\"szh-menu__header\">\n <AccountHandleInfo acct={acct} instance={instance} />\n </div>\n <MenuItem\n onClick={() => {\n const handleWithInstance = acct.includes('@')\n ? `@${acct}`\n : `@${acct}@${instance}`;\n try {\n navigator.clipboard.writeText(handleWithInstance);\n showToast(t`Handle copied`);\n } catch (e) {\n console.error(e);\n showToast(t`Unable to copy handle`);\n }\n }}\n >\n <Icon icon=\"link\" />\n <span>\n <Trans>Copy handle</Trans>\n </span>\n </MenuItem>\n <MenuItem href={url} target=\"_blank\">\n <Icon icon=\"external\" />\n <span>\n <Trans>Go to original profile page</Trans>\n </span>\n </MenuItem>\n <MenuDivider />\n <MenuLink href={info.avatar} target=\"_blank\">\n <Icon icon=\"user\" />\n <span>\n <Trans>View profile image</Trans>\n </span>\n </MenuLink>\n <MenuLink href={info.header} target=\"_blank\">\n <Icon icon=\"media\" />\n <span>\n <Trans>View profile header</Trans>\n </span>\n </MenuLink>\n </Menu2>\n ) : (\n <AccountBlock\n account={info}\n instance={instance}\n avatarSize=\"xxxl\"\n internal\n />\n )}\n </header>\n <div class=\"faux-header-bg\" aria-hidden=\"true\" />\n <main>\n {!!memorial && (\n <span class=\"tag\">\n <Trans>In Memoriam</Trans>\n </span>\n )}\n {!!bot && (\n <span class=\"tag\">\n <Icon icon=\"bot\" /> <Trans>Automated</Trans>\n </span>\n )}\n {!!group && (\n <span class=\"tag\">\n <Icon icon=\"group\" /> <Trans>Group</Trans>\n </span>\n )}\n {roles?.map((role) => (\n <span class=\"tag\">\n {role.name}\n {!!accountInstance && (\n <>\n {' '}\n <span class=\"more-insignificant\">{accountInstance}</span>\n </>\n )}\n </span>\n ))}\n <div\n class=\"note\"\n dir=\"auto\"\n onClick={handleContentLinks({\n instance: currentInstance,\n })}\n dangerouslySetInnerHTML={{\n __html: enhanceContent(note, { emojis }),\n }}\n />\n <div class=\"account-metadata-box\">\n {fields?.length > 0 && (\n <div class=\"profile-metadata\">\n {fields.map(({ name, value, verifiedAt }, i) => (\n <div\n class={`profile-field ${\n verifiedAt ? 'profile-verified' : ''\n }`}\n key={name + i}\n dir=\"auto\"\n >\n <b>\n <EmojiText text={name} emojis={emojis} />{' '}\n {!!verifiedAt && (\n <Icon\n icon=\"check-circle\"\n size=\"s\"\n alt={t`Verified`}\n />\n )}\n </b>\n <p\n dangerouslySetInnerHTML={{\n __html: enhanceContent(value, { emojis }),\n }}\n />\n </div>\n ))}\n </div>\n )}\n <div class=\"stats\">\n <LinkOrDiv\n tabIndex={0}\n to={accountLink}\n onClick={() => {\n // states.showAccount = false;\n setTimeout(() => {\n states.showGenericAccounts = {\n id: 'followers',\n heading: t`Followers`,\n fetchAccounts: fetchFollowers,\n instance,\n excludeRelationshipAttrs: isSelf\n ? ['followedBy']\n : [],\n blankCopy: hideCollections\n ? t`This user has chosen to not make this information available.`\n : undefined,\n };\n }, 0);\n }}\n >\n {!!familiarFollowers.length && (\n <span class=\"shazam-container-horizontal\">\n <span class=\"shazam-container-inner stats-avatars-bunch\">\n {familiarFollowers.map((follower) => (\n <Avatar\n url={follower.avatarStatic}\n size=\"s\"\n alt={`${follower.displayName} @${follower.acct}`}\n squircle={follower?.bot}\n />\n ))}\n </span>\n </span>\n )}\n <span title={followersCount}>\n {shortenNumber(followersCount)}\n </span>{' '}\n <Trans>Followers</Trans>\n </LinkOrDiv>\n <LinkOrDiv\n class=\"insignificant\"\n tabIndex={0}\n to={accountLink}\n onClick={() => {\n // states.showAccount = false;\n setTimeout(() => {\n states.showGenericAccounts = {\n heading: t({\n id: 'following.stats',\n message: 'Following',\n }),\n fetchAccounts: fetchFollowing,\n instance,\n excludeRelationshipAttrs: isSelf ? ['following'] : [],\n blankCopy: hideCollections\n ? t`This user has chosen to not make this information available.`\n : undefined,\n };\n }, 0);\n }}\n >\n <span title={followingCount}>\n {shortenNumber(followingCount)}\n </span>{' '}\n <Trans id=\"following.stats\">Following</Trans>\n <br />\n </LinkOrDiv>\n <LinkOrDiv\n class=\"insignificant\"\n to={accountLink}\n // onClick={\n // standalone\n // ? undefined\n // : () => {\n // hideAllModals();\n // }\n // }\n >\n <span title={statusesCount}>\n {shortenNumber(statusesCount)}\n </span>{' '}\n <Trans>Posts</Trans>\n </LinkOrDiv>\n {!!createdAt && (\n <div class=\"insignificant\">\n <Trans>\n Joined{' '}\n <time datetime={createdAt}>\n {niceDateTime(createdAt, {\n hideTime: true,\n })}\n </time>\n </Trans>\n </div>\n )}\n </div>\n </div>\n {!!postingStats && (\n <LinkOrDiv\n to={accountLink}\n class=\"account-metadata-box\"\n // onClick={() => {\n // states.showAccount = false;\n // }}\n >\n <div class=\"shazam-container\">\n <div class=\"shazam-container-inner\">\n {hasPostingStats ? (\n <div\n class=\"posting-stats\"\n title={t`${(\n postingStats.originals / postingStats.total\n ).toLocaleString(i18n.locale || undefined, {\n style: 'percent',\n })} original posts, ${(\n postingStats.replies / postingStats.total\n ).toLocaleString(i18n.locale || undefined, {\n style: 'percent',\n })} replies, ${(\n postingStats.boosts / postingStats.total\n ).toLocaleString(i18n.locale || undefined, {\n style: 'percent',\n })} boosts`}\n >\n <div>\n {postingStats.daysSinceLastPost < 365\n ? plural(postingStats.total, {\n one: plural(postingStats.daysSinceLastPost, {\n one: `Last 1 post in the past 1 day`,\n other: `Last 1 post in the past ${postingStats.daysSinceLastPost} days`,\n }),\n other: plural(\n postingStats.daysSinceLastPost,\n {\n one: `Last ${postingStats.total} posts in the past 1 day`,\n other: `Last ${postingStats.total} posts in the past ${postingStats.daysSinceLastPost} days`,\n },\n ),\n })\n : plural(postingStats.total, {\n one: 'Last 1 post in the past year(s)',\n other: `Last ${postingStats.total} posts in the past year(s)`,\n })}\n </div>\n <div\n class=\"posting-stats-bar\"\n style={{\n // [originals | replies | boosts]\n '--originals-percentage': `${\n (postingStats.originals / postingStats.total) *\n 100\n }%`,\n '--replies-percentage': `${\n ((postingStats.originals +\n postingStats.replies) /\n postingStats.total) *\n 100\n }%`,\n }}\n />\n <div class=\"posting-stats-legends\">\n <span class=\"ib\">\n <span class=\"posting-stats-legend-item posting-stats-legend-item-originals\" />{' '}\n <Trans>Original</Trans>\n </span>{' '}\n <span class=\"ib\">\n <span class=\"posting-stats-legend-item posting-stats-legend-item-replies\" />{' '}\n <Trans>Replies</Trans>\n </span>{' '}\n <span class=\"ib\">\n <span class=\"posting-stats-legend-item posting-stats-legend-item-boosts\" />{' '}\n <Trans>Boosts</Trans>\n </span>\n </div>\n </div>\n ) : (\n <div class=\"posting-stats\">\n <Trans>Post stats unavailable.</Trans>\n </div>\n )}\n </div>\n </div>\n </LinkOrDiv>\n )}\n {!moved && (\n <div class=\"account-metadata-box\">\n <div\n class=\"shazam-container no-animation\"\n hidden={!!postingStats}\n >\n <div class=\"shazam-container-inner\">\n <button\n type=\"button\"\n class=\"posting-stats-button\"\n disabled={postingStatsUIState === 'loading'}\n onClick={() => {\n renderPostingStats();\n }}\n >\n <div\n class={`posting-stats-bar posting-stats-icon ${\n postingStatsUIState === 'loading' ? 'loading' : ''\n }`}\n style={{\n '--originals-percentage': '33%',\n '--replies-percentage': '66%',\n }}\n />\n <Trans>View post stats</Trans>{' '}\n {/* <Loader\n abrupt\n hidden={postingStatsUIState !== 'loading'}\n /> */}\n </button>\n </div>\n </div>\n </div>\n )}\n </main>\n <footer>\n <RelatedActions\n info={info}\n instance={instance}\n standalone={standalone}\n authenticated={authenticated}\n onRelationshipChange={onRelationshipChange}\n onProfileUpdate={onProfileUpdate}\n />\n </footer>\n </>\n )\n )}\n </div>\n );\n}\n\nconst FAMILIAR_FOLLOWERS_LIMIT = 3;\n\nfunction RelatedActions({\n info,\n instance,\n standalone,\n authenticated,\n onRelationshipChange = () => {},\n onProfileUpdate = () => {},\n}) {\n if (!info) return null;\n const { _ } = useLingui();\n const {\n masto: currentMasto,\n instance: currentInstance,\n authenticated: currentAuthenticated,\n } = api();\n const sameInstance = instance === currentInstance;\n\n const [relationshipUIState, setRelationshipUIState] = useState('default');\n const [relationship, setRelationship] = useState(null);\n\n const { id, acct, url, username, locked, lastStatusAt, note, fields, moved } =\n info;\n const accountID = useRef(id);\n\n const {\n following,\n showingReblogs,\n notifying,\n followedBy,\n blocking,\n blockedBy,\n muting,\n mutingNotifications,\n requested,\n domainBlocking,\n endorsed,\n note: privateNote,\n } = relationship || {};\n\n const [currentInfo, setCurrentInfo] = useState(null);\n const [isSelf, setIsSelf] = useState(false);\n\n const acctWithInstance = acct.includes('@') ? acct : `${acct}@${instance}`;\n\n useEffect(() => {\n if (info) {\n const currentAccount = getCurrentAccountID();\n let currentID;\n (async () => {\n if (sameInstance && authenticated) {\n currentID = id;\n } else if (!sameInstance && currentAuthenticated) {\n // Grab this account from my logged-in instance\n const acctHasInstance = info.acct.includes('@');\n try {\n const results = await currentMasto.v2.search.fetch({\n q: acctHasInstance ? info.acct : `${info.username}@${instance}`,\n type: 'accounts',\n limit: 1,\n resolve: true,\n });\n console.log('🥏 Fetched account from logged-in instance', results);\n if (results.accounts.length) {\n currentID = results.accounts[0].id;\n setCurrentInfo(results.accounts[0]);\n }\n } catch (e) {\n console.error(e);\n }\n }\n\n if (!currentID) return;\n\n if (currentAccount === currentID) {\n // It's myself!\n setIsSelf(true);\n return;\n }\n\n accountID.current = currentID;\n\n // if (moved) return;\n\n setRelationshipUIState('loading');\n\n const fetchRelationships = currentMasto.v1.accounts.relationships.fetch(\n {\n id: [currentID],\n },\n );\n\n try {\n const relationships = await fetchRelationships;\n console.log('fetched relationship', relationships);\n setRelationshipUIState('default');\n\n if (relationships.length) {\n const relationship = relationships[0];\n setRelationship(relationship);\n onRelationshipChange({ relationship, currentID });\n }\n } catch (e) {\n console.error(e);\n setRelationshipUIState('error');\n }\n })();\n }\n }, [info, authenticated]);\n\n useEffect(() => {\n if (info && isSelf) {\n updateAccount(info);\n }\n }, [info, isSelf]);\n\n const loading = relationshipUIState === 'loading';\n\n const [showTranslatedBio, setShowTranslatedBio] = useState(false);\n const [showAddRemoveLists, setShowAddRemoveLists] = useState(false);\n const [showPrivateNoteModal, setShowPrivateNoteModal] = useState(false);\n const [showEditProfile, setShowEditProfile] = useState(false);\n const [lists, setLists] = useState([]);\n\n return (\n <>\n <div class=\"actions\">\n <span>\n {followedBy ? (\n <span class=\"tag\">\n <Trans>Follows you</Trans>\n </span>\n ) : !!lastStatusAt ? (\n <small class=\"insignificant\">\n <Trans>\n Last post:{' '}\n <span class=\"ib\">\n {niceDateTime(lastStatusAt, {\n hideTime: true,\n })}\n </span>\n </Trans>\n </small>\n ) : (\n <span />\n )}\n {muting && (\n <span class=\"tag danger\">\n <Trans>Muted</Trans>\n </span>\n )}\n {blocking && (\n <span class=\"tag danger\">\n <Trans>Blocked</Trans>\n </span>\n )}\n </span>{' '}\n <span class=\"buttons\">\n {!!privateNote && (\n <button\n type=\"button\"\n class=\"private-note-tag\"\n title={t`Private note`}\n onClick={() => {\n setShowPrivateNoteModal(true);\n }}\n dir=\"auto\"\n >\n <span>{privateNote}</span>\n </button>\n )}\n <Menu2\n portal={{\n target: document.body,\n }}\n containerProps={{\n style: {\n // Higher than the backdrop\n zIndex: 1001,\n },\n }}\n align=\"center\"\n position=\"anchor\"\n overflow=\"auto\"\n menuButton={\n <button type=\"button\" class=\"plain\" disabled={loading}>\n <Icon icon=\"more\" size=\"l\" alt={t`More`} />\n </button>\n }\n onMenuChange={(e) => {\n if (following && e.open) {\n // Fetch lists that have this account\n (async () => {\n try {\n const lists = await currentMasto.v1.accounts\n .$select(accountID.current)\n .lists.list();\n console.log('fetched account lists', lists);\n setLists(lists);\n } catch (e) {\n console.error(e);\n }\n })();\n }\n }}\n >\n {currentAuthenticated && !isSelf && (\n <>\n <MenuItem\n onClick={() => {\n showCompose({\n draftStatus: {\n status: `@${currentInfo?.acct || acct} `,\n },\n });\n }}\n >\n <Icon icon=\"at\" />\n <span>\n <Trans>\n Mention <span class=\"bidi-isolate\">@{username}</span>\n </Trans>\n </span>\n </MenuItem>\n <MenuItem\n onClick={() => {\n setShowTranslatedBio(true);\n }}\n >\n <Icon icon=\"translate\" />\n <span>\n <Trans>Translate bio</Trans>\n </span>\n </MenuItem>\n {supports('@mastodon/profile-private-note') && (\n <MenuItem\n onClick={() => {\n setShowPrivateNoteModal(true);\n }}\n >\n <Icon icon=\"pencil\" />\n <span>\n {privateNote ? t`Edit private note` : t`Add private note`}\n </span>\n </MenuItem>\n )}\n {following && !!relationship && (\n <>\n <MenuItem\n onClick={() => {\n setRelationshipUIState('loading');\n (async () => {\n try {\n const rel = await currentMasto.v1.accounts\n .$select(accountID.current)\n .follow({\n notify: !notifying,\n });\n if (rel) setRelationship(rel);\n setRelationshipUIState('default');\n showToast(\n rel.notifying\n ? t`Notifications enabled for @${username}'s posts.`\n : t` Notifications disabled for @${username}'s posts.`,\n );\n } catch (e) {\n alert(e);\n setRelationshipUIState('error');\n }\n })();\n }}\n >\n <Icon icon=\"notification\" />\n <span>\n {notifying\n ? t`Disable notifications`\n : t`Enable notifications`}\n </span>\n </MenuItem>\n <MenuItem\n onClick={() => {\n setRelationshipUIState('loading');\n (async () => {\n try {\n const rel = await currentMasto.v1.accounts\n .$select(accountID.current)\n .follow({\n reblogs: !showingReblogs,\n });\n if (rel) setRelationship(rel);\n setRelationshipUIState('default');\n showToast(\n rel.showingReblogs\n ? t`Boosts from @${username} enabled.`\n : t`Boosts from @${username} disabled.`,\n );\n } catch (e) {\n alert(e);\n setRelationshipUIState('error');\n }\n })();\n }}\n >\n <Icon icon=\"rocket\" />\n <span>\n {showingReblogs ? t`Disable boosts` : t`Enable boosts`}\n </span>\n </MenuItem>\n </>\n )}\n {/* Add/remove from lists is only possible if following the account */}\n {following && (\n <MenuItem\n onClick={() => {\n setShowAddRemoveLists(true);\n }}\n >\n <Icon icon=\"list\" />\n {lists.length ? (\n <>\n <small class=\"menu-grow\">\n <Trans>Add/Remove from Lists</Trans>\n <br />\n <span class=\"more-insignificant\">\n {lists.map((list) => list.title).join(', ')}\n </span>\n </small>\n <small class=\"more-insignificant\">{lists.length}</small>\n </>\n ) : (\n <span>\n <Trans>Add/Remove from Lists</Trans>\n </span>\n )}\n </MenuItem>\n )}\n <MenuDivider />\n </>\n )}\n <MenuItem\n onClick={() => {\n const handle = `@${currentInfo?.acct || acctWithInstance}`;\n try {\n navigator.clipboard.writeText(handle);\n showToast(t`Handle copied`);\n } catch (e) {\n console.error(e);\n showToast(t`Unable to copy handle`);\n }\n }}\n >\n <Icon icon=\"copy\" />\n <small>\n <Trans>Copy handle</Trans>\n <br />\n <span class=\"more-insignificant bidi-isolate\">\n @{currentInfo?.acct || acctWithInstance}\n </span>\n </small>\n </MenuItem>\n <MenuItem href={url} target=\"_blank\">\n <Icon icon=\"external\" />\n <small class=\"menu-double-lines\">{niceAccountURL(url)}</small>\n </MenuItem>\n <div class=\"menu-horizontal\">\n <MenuItem\n onClick={() => {\n // Copy url to clipboard\n try {\n navigator.clipboard.writeText(url);\n showToast(t`Link copied`);\n } catch (e) {\n console.error(e);\n showToast(t`Unable to copy link`);\n }\n }}\n >\n <Icon icon=\"link\" />\n <span>\n <Trans>Copy</Trans>\n </span>\n </MenuItem>\n {navigator?.share &&\n navigator?.canShare?.({\n url,\n }) && (\n <MenuItem\n onClick={() => {\n try {\n navigator.share({\n url,\n });\n } catch (e) {\n console.error(e);\n alert(t`Sharing doesn't seem to work.`);\n }\n }}\n >\n <Icon icon=\"share\" />\n <span>\n <Trans>Share…</Trans>\n </span>\n </MenuItem>\n )}\n </div>\n {!!relationship && (\n <>\n <MenuDivider />\n {muting ? (\n <MenuItem\n onClick={() => {\n setRelationshipUIState('loading');\n (async () => {\n try {\n const newRelationship = await currentMasto.v1.accounts\n .$select(currentInfo?.id || id)\n .unmute();\n console.log('unmuting', newRelationship);\n setRelationship(newRelationship);\n setRelationshipUIState('default');\n showToast(t`Unmuted @${username}`);\n states.reloadGenericAccounts.id = 'mute';\n states.reloadGenericAccounts.counter++;\n } catch (e) {\n console.error(e);\n setRelationshipUIState('error');\n }\n })();\n }}\n >\n <Icon icon=\"unmute\" />\n <span>\n <Trans>\n Unmute <span class=\"bidi-isolate\">@{username}</span>\n </Trans>\n </span>\n </MenuItem>\n ) : (\n <SubMenu2\n menuClassName=\"menu-blur\"\n openTrigger=\"clickOnly\"\n direction=\"bottom\"\n overflow=\"auto\"\n shift={16}\n label={\n <>\n <Icon icon=\"mute\" />\n <span class=\"menu-grow\">\n <Trans>\n Mute <span class=\"bidi-isolate\">@{username}</span>…\n </Trans>\n </span>\n <span\n style={{\n textOverflow: 'clip',\n }}\n >\n <Icon icon=\"time\" />\n <Icon icon=\"chevron-right\" />\n </span>\n </>\n }\n >\n <div class=\"menu-wrap\">\n {MUTE_DURATIONS.map((duration) => (\n <MenuItem\n onClick={() => {\n setRelationshipUIState('loading');\n (async () => {\n try {\n const newRelationship =\n await currentMasto.v1.accounts\n .$select(currentInfo?.id || id)\n .mute({\n duration,\n });\n console.log('muting', newRelationship);\n setRelationship(newRelationship);\n setRelationshipUIState('default');\n showToast(\n t`Muted @${username} for ${\n typeof MUTE_DURATIONS_LABELS[duration] ===\n 'function'\n ? MUTE_DURATIONS_LABELS[duration]()\n : _(MUTE_DURATIONS_LABELS[duration])\n }`,\n );\n states.reloadGenericAccounts.id = 'mute';\n states.reloadGenericAccounts.counter++;\n } catch (e) {\n console.error(e);\n setRelationshipUIState('error');\n showToast(t`Unable to mute @${username}`);\n }\n })();\n }}\n >\n {typeof MUTE_DURATIONS_LABELS[duration] === 'function'\n ? MUTE_DURATIONS_LABELS[duration]()\n : _(MUTE_DURATIONS_LABELS[duration])}\n </MenuItem>\n ))}\n </div>\n </SubMenu2>\n )}\n {followedBy && (\n <MenuConfirm\n subMenu\n menuItemClassName=\"danger\"\n confirmLabel={\n <>\n <Icon icon=\"user-x\" />\n <span>\n <Trans>\n Remove <span class=\"bidi-isolate\">@{username}</span>{' '}\n from followers?\n </Trans>\n </span>\n </>\n }\n onClick={() => {\n setRelationshipUIState('loading');\n (async () => {\n try {\n const newRelationship = await currentMasto.v1.accounts\n .$select(currentInfo?.id || id)\n .removeFromFollowers();\n console.log(\n 'removing from followers',\n newRelationship,\n );\n setRelationship(newRelationship);\n setRelationshipUIState('default');\n showToast(t`@${username} removed from followers`);\n states.reloadGenericAccounts.id = 'followers';\n states.reloadGenericAccounts.counter++;\n } catch (e) {\n console.error(e);\n setRelationshipUIState('error');\n }\n })();\n }}\n >\n <Icon icon=\"user-x\" />\n <span>\n <Trans>Remove follower…</Trans>\n </span>\n </MenuConfirm>\n )}\n <MenuConfirm\n subMenu\n confirm={!blocking}\n confirmLabel={\n <>\n <Icon icon=\"block\" />\n <span>\n <Trans>\n Block <span class=\"bidi-isolate\">@{username}</span>?\n </Trans>\n </span>\n </>\n }\n itemProps={{\n className: 'danger',\n }}\n menuItemClassName=\"danger\"\n onClick={() => {\n // if (!blocking && !confirm(`Block @${username}?`)) {\n // return;\n // }\n setRelationshipUIState('loading');\n (async () => {\n try {\n if (blocking) {\n const newRelationship = await currentMasto.v1.accounts\n .$select(currentInfo?.id || id)\n .unblock();\n console.log('unblocking', newRelationship);\n setRelationship(newRelationship);\n setRelationshipUIState('default');\n showToast(t`Unblocked @${username}`);\n } else {\n const newRelationship = await currentMasto.v1.accounts\n .$select(currentInfo?.id || id)\n .block();\n console.log('blocking', newRelationship);\n setRelationship(newRelationship);\n setRelationshipUIState('default');\n showToast(t`Blocked @${username}`);\n }\n states.reloadGenericAccounts.id = 'block';\n states.reloadGenericAccounts.counter++;\n } catch (e) {\n console.error(e);\n setRelationshipUIState('error');\n if (blocking) {\n showToast(t`Unable to unblock @${username}`);\n } else {\n showToast(t`Unable to block @${username}`);\n }\n }\n })();\n }}\n >\n {blocking ? (\n <>\n <Icon icon=\"unblock\" />\n <span>\n <Trans>\n Unblock <span class=\"bidi-isolate\">@{username}</span>\n </Trans>\n </span>\n </>\n ) : (\n <>\n <Icon icon=\"block\" />\n <span>\n <Trans>\n Block <span class=\"bidi-isolate\">@{username}</span>…\n </Trans>\n </span>\n </>\n )}\n </MenuConfirm>\n <MenuItem\n className=\"danger\"\n onClick={() => {\n states.showReportModal = {\n account: currentInfo || info,\n };\n }}\n >\n <Icon icon=\"flag\" />\n <span>\n <Trans>\n Report <span class=\"bidi-isolate\">@{username}</span>…\n </Trans>\n </span>\n </MenuItem>\n </>\n )}\n {currentAuthenticated &&\n isSelf &&\n standalone &&\n supports('@mastodon/profile-edit') && (\n <>\n <MenuDivider />\n <MenuItem\n onClick={() => {\n setShowEditProfile(true);\n }}\n >\n <Icon icon=\"pencil\" />\n <span>\n <Trans>Edit profile</Trans>\n </span>\n </MenuItem>\n </>\n )}\n {import.meta.env.DEV && currentAuthenticated && isSelf && (\n <>\n <MenuDivider />\n <MenuItem\n onClick={async () => {\n const relationships =\n await currentMasto.v1.accounts.relationships.fetch({\n id: [accountID.current],\n });\n const { note } = relationships[0] || {};\n if (note) {\n alert(note);\n console.log(note);\n }\n }}\n >\n <Icon icon=\"pencil\" />\n <span>See note</span>\n </MenuItem>\n </>\n )}\n </Menu2>\n {!relationship && relationshipUIState === 'loading' && (\n <Loader abrupt />\n )}\n {!!relationship && !moved && (\n <MenuConfirm\n confirm={following || requested}\n confirmLabel={\n <span>\n {requested\n ? t`Withdraw follow request?`\n : t`Unfollow @${info.acct || info.username}?`}\n </span>\n }\n menuItemClassName=\"danger\"\n align=\"end\"\n disabled={loading}\n onClick={() => {\n setRelationshipUIState('loading');\n (async () => {\n try {\n let newRelationship;\n\n if (following || requested) {\n // const yes = confirm(\n // requested\n // ? 'Withdraw follow request?'\n // : `Unfollow @${info.acct || info.username}?`,\n // );\n\n // if (yes) {\n newRelationship = await currentMasto.v1.accounts\n .$select(accountID.current)\n .unfollow();\n // }\n } else {\n newRelationship = await currentMasto.v1.accounts\n .$select(accountID.current)\n .follow();\n }\n\n if (newRelationship) setRelationship(newRelationship);\n setRelationshipUIState('default');\n } catch (e) {\n alert(e);\n setRelationshipUIState('error');\n }\n })();\n }}\n >\n <button\n type=\"button\"\n class={`${following || requested ? 'light swap' : ''}`}\n data-swap-state={following || requested ? 'danger' : ''}\n disabled={loading}\n >\n {following ? (\n <>\n <span>\n <Trans>Following</Trans>\n </span>\n <span>\n <Trans>Unfollow…</Trans>\n </span>\n </>\n ) : requested ? (\n <>\n <span>\n <Trans>Requested</Trans>\n </span>\n <span>\n <Trans>Withdraw…</Trans>\n </span>\n </>\n ) : locked ? (\n <>\n <Icon icon=\"lock\" />{' '}\n <span>\n <Trans>Follow</Trans>\n </span>\n </>\n ) : (\n t`Follow`\n )}\n </button>\n </MenuConfirm>\n )}\n </span>\n </div>\n {!!showTranslatedBio && (\n <Modal\n onClose={() => {\n setShowTranslatedBio(false);\n }}\n >\n <TranslatedBioSheet\n note={note}\n fields={fields}\n onClose={() => setShowTranslatedBio(false)}\n />\n </Modal>\n )}\n {!!showAddRemoveLists && (\n <Modal\n onClose={() => {\n setShowAddRemoveLists(false);\n }}\n >\n <AddRemoveListsSheet\n accountID={accountID.current}\n onClose={() => setShowAddRemoveLists(false)}\n />\n </Modal>\n )}\n {!!showPrivateNoteModal && (\n <Modal\n onClose={() => {\n setShowPrivateNoteModal(false);\n }}\n >\n <PrivateNoteSheet\n account={info}\n note={privateNote}\n onRelationshipChange={(relationship) => {\n setRelationship(relationship);\n // onRelationshipChange({ relationship, currentID: accountID.current });\n }}\n onClose={() => setShowPrivateNoteModal(false)}\n />\n </Modal>\n )}\n {!!showEditProfile && (\n <Modal\n onClose={() => {\n setShowEditProfile(false);\n }}\n >\n <EditProfileSheet\n onClose={({ state, account } = {}) => {\n setShowEditProfile(false);\n if (state === 'success' && account) {\n onProfileUpdate(account);\n }\n }}\n />\n </Modal>\n )}\n </>\n );\n}\n\n// Apply more alpha if high luminence\nfunction lightenRGB([r, g, b]) {\n const luminence = 0.2126 * r + 0.7152 * g + 0.0722 * b;\n console.log('luminence', luminence);\n let alpha;\n if (luminence >= 220) {\n alpha = 1;\n } else if (luminence <= 50) {\n alpha = 0.1;\n } else {\n alpha = luminence / 255;\n }\n alpha = Math.min(1, alpha);\n return [r, g, b, alpha];\n}\n\nfunction niceAccountURL(url) {\n if (!url) return;\n const urlObj = URL.parse(url);\n const { host, pathname } = urlObj;\n const path = pathname.replace(/\\/$/, '').replace(/^\\//, '');\n return (\n <>\n <span class=\"more-insignificant\">{punycode.toUnicode(host)}/</span>\n <wbr />\n <span>{path}</span>\n </>\n );\n}\n\nfunction TranslatedBioSheet({ note, fields, onClose }) {\n const fieldsText =\n fields\n ?.map(({ name, value }) => `${name}\\n${getHTMLText(value)}`)\n .join('\\n\\n') || '';\n\n const text = getHTMLText(note) + (fieldsText ? `\\n\\n${fieldsText}` : '');\n\n return (\n <div class=\"sheet\">\n {!!onClose && (\n <button type=\"button\" class=\"sheet-close\" onClick={onClose}>\n <Icon icon=\"x\" alt={t`Close`} />\n </button>\n )}\n <header>\n <h2>\n <Trans>Translated Bio</Trans>\n </h2>\n </header>\n <main>\n <p\n style={{\n whiteSpace: 'pre-wrap',\n }}\n >\n {text}\n </p>\n <TranslationBlock forceTranslate text={text} />\n </main>\n </div>\n );\n}\n\nfunction AddRemoveListsSheet({ accountID, onClose }) {\n const { masto } = api();\n const [uiState, setUIState] = useState('default');\n const [lists, setLists] = useState([]);\n const [listsContainingAccount, setListsContainingAccount] = useState([]);\n const [reloadCount, reload] = useReducer((c) => c + 1, 0);\n\n useEffect(() => {\n setUIState('loading');\n (async () => {\n try {\n const lists = await getLists();\n setLists(lists);\n const listsContainingAccount = await masto.v1.accounts\n .$select(accountID)\n .lists.list();\n console.log({ lists, listsContainingAccount });\n setListsContainingAccount(listsContainingAccount);\n setUIState('default');\n } catch (e) {\n console.error(e);\n setUIState('error');\n }\n })();\n }, [reloadCount]);\n\n const [showListAddEditModal, setShowListAddEditModal] = useState(false);\n\n return (\n <div class=\"sheet\" id=\"list-add-remove-container\">\n {!!onClose && (\n <button type=\"button\" class=\"sheet-close\" onClick={onClose}>\n <Icon icon=\"x\" alt={t`Close`} />\n </button>\n )}\n <header>\n <h2>\n <Trans>Add/Remove from Lists</Trans>\n </h2>\n </header>\n <main>\n {lists.length > 0 ? (\n <ul class=\"list-add-remove\">\n {lists.map((list) => {\n const inList = listsContainingAccount.some(\n (l) => l.id === list.id,\n );\n return (\n <li>\n <button\n type=\"button\"\n class={`light ${inList ? 'checked' : ''}`}\n disabled={uiState === 'loading'}\n onClick={() => {\n setUIState('loading');\n (async () => {\n try {\n if (inList) {\n await masto.v1.lists\n .$select(list.id)\n .accounts.remove({\n accountIds: [accountID],\n });\n } else {\n await masto.v1.lists\n .$select(list.id)\n .accounts.create({\n accountIds: [accountID],\n });\n }\n // setUIState('default');\n reload();\n } catch (e) {\n console.error(e);\n setUIState('error');\n alert(\n inList\n ? t`Unable to remove from list.`\n : t`Unable to add to list.`,\n );\n }\n })();\n }}\n >\n <Icon icon=\"check-circle\" alt=\"☑️\" />\n <span>{list.title}</span>\n </button>\n </li>\n );\n })}\n </ul>\n ) : uiState === 'loading' ? (\n <p class=\"ui-state\">\n <Loader abrupt />\n </p>\n ) : uiState === 'error' ? (\n <p class=\"ui-state\">\n <Trans>Unable to load lists.</Trans>\n </p>\n ) : (\n <p class=\"ui-state\">\n <Trans>No lists.</Trans>\n </p>\n )}\n <button\n type=\"button\"\n class=\"plain2\"\n onClick={() => setShowListAddEditModal(true)}\n disabled={uiState !== 'default'}\n >\n <Icon icon=\"plus\" size=\"l\" />{' '}\n <span>\n <Trans>New list</Trans>\n </span>\n </button>\n </main>\n {showListAddEditModal && (\n <Modal\n onClick={(e) => {\n if (e.target === e.currentTarget) {\n setShowListAddEditModal(false);\n }\n }}\n >\n <ListAddEdit\n list={showListAddEditModal?.list}\n onClose={(result) => {\n if (result.state === 'success') {\n reload();\n }\n setShowListAddEditModal(false);\n }}\n />\n </Modal>\n )}\n </div>\n );\n}\n\nfunction PrivateNoteSheet({\n account,\n note: initialNote,\n onRelationshipChange = () => {},\n onClose = () => {},\n}) {\n const { masto } = api();\n const [uiState, setUIState] = useState('default');\n const textareaRef = useRef(null);\n\n useEffect(() => {\n let timer;\n if (textareaRef.current && !initialNote) {\n timer = setTimeout(() => {\n textareaRef.current.focus?.();\n }, 100);\n }\n return () => {\n clearTimeout(timer);\n };\n }, []);\n\n return (\n <div class=\"sheet\" id=\"private-note-container\">\n {!!onClose && (\n <button type=\"button\" class=\"sheet-close\" onClick={onClose}>\n <Icon icon=\"x\" alt={t`Close`} />\n </button>\n )}\n <header>\n <b>\n <Trans>\n Private note about{' '}\n <span class=\"bidi-isolate\">\n @{account?.username || account?.acct}\n </span>\n </Trans>\n </b>\n </header>\n <main>\n <form\n onSubmit={(e) => {\n e.preventDefault();\n const formData = new FormData(e.target);\n const note = formData.get('note');\n if (note?.trim() !== initialNote?.trim()) {\n setUIState('loading');\n (async () => {\n try {\n const newRelationship = await masto.v1.accounts\n .$select(account?.id)\n .note.create({\n comment: note,\n });\n console.log('updated relationship', newRelationship);\n setUIState('default');\n onRelationshipChange(newRelationship);\n onClose();\n } catch (e) {\n console.error(e);\n setUIState('error');\n alert(e?.message || t`Unable to update private note.`);\n }\n })();\n }\n }}\n >\n <textarea\n ref={textareaRef}\n name=\"note\"\n disabled={uiState === 'loading'}\n dir=\"auto\"\n >\n {initialNote}\n </textarea>\n <footer>\n <button\n type=\"button\"\n class=\"light\"\n disabled={uiState === 'loading'}\n onClick={() => {\n onClose?.();\n }}\n >\n <Trans>Cancel</Trans>\n </button>\n <span>\n <Loader abrupt hidden={uiState !== 'loading'} />\n <button disabled={uiState === 'loading'} type=\"submit\">\n <Trans>Save & close</Trans>\n </button>\n </span>\n </footer>\n </form>\n </main>\n </div>\n );\n}\n\nfunction EditProfileSheet({ onClose = () => {} }) {\n const { masto } = api();\n const [uiState, setUIState] = useState('loading');\n const [account, setAccount] = useState(null);\n\n useEffect(() => {\n (async () => {\n try {\n const acc = await masto.v1.accounts.verifyCredentials();\n setAccount(acc);\n setUIState('default');\n } catch (e) {\n console.error(e);\n setUIState('error');\n }\n })();\n }, []);\n\n console.log('EditProfileSheet', account);\n const { displayName, source } = account || {};\n const { note, fields } = source || {};\n const fieldsAttributesRef = useRef(null);\n\n return (\n <div class=\"sheet\" id=\"edit-profile-container\">\n {!!onClose && (\n <button type=\"button\" class=\"sheet-close\" onClick={onClose}>\n <Icon icon=\"x\" alt={t`Close`} />\n </button>\n )}\n <header>\n <b>\n <Trans>Edit profile</Trans>\n </b>\n </header>\n <main>\n {uiState === 'loading' ? (\n <p class=\"ui-state\">\n <Loader abrupt />\n </p>\n ) : (\n <form\n onSubmit={(e) => {\n e.preventDefault();\n const formData = new FormData(e.target);\n const displayName = formData.get('display_name');\n const note = formData.get('note');\n const fieldsAttributesFields =\n fieldsAttributesRef.current.querySelectorAll(\n 'input[name^=\"fields_attributes\"]',\n );\n const fieldsAttributes = [];\n fieldsAttributesFields.forEach((field) => {\n const name = field.name;\n const [_, index, key] =\n name.match(/fields_attributes\\[(\\d+)\\]\\[(.+)\\]/) || [];\n const value = field.value ? field.value.trim() : '';\n if (index && key && value) {\n if (!fieldsAttributes[index]) fieldsAttributes[index] = {};\n fieldsAttributes[index][key] = value;\n }\n });\n // Fill in the blanks\n fieldsAttributes.forEach((field) => {\n if (field.name && !field.value) {\n field.value = '';\n }\n });\n\n (async () => {\n try {\n const newAccount = await masto.v1.accounts.updateCredentials({\n displayName,\n note,\n fieldsAttributes,\n });\n console.log('updated account', newAccount);\n onClose?.({\n state: 'success',\n account: newAccount,\n });\n } catch (e) {\n console.error(e);\n alert(e?.message || t`Unable to update profile.`);\n }\n })();\n }}\n >\n <p>\n <label>\n <Trans>Name</Trans>{' '}\n <input\n type=\"text\"\n name=\"display_name\"\n defaultValue={displayName}\n maxLength={30}\n disabled={uiState === 'loading'}\n dir=\"auto\"\n />\n </label>\n </p>\n <p>\n <label>\n <Trans>Bio</Trans>\n <textarea\n defaultValue={note}\n name=\"note\"\n maxLength={500}\n rows=\"5\"\n disabled={uiState === 'loading'}\n dir=\"auto\"\n />\n </label>\n </p>\n {/* Table for fields; name and values are in fields, min 4 rows */}\n <p>\n <Trans>Extra fields</Trans>\n </p>\n <table ref={fieldsAttributesRef}>\n <thead>\n <tr>\n <th>\n <Trans>Label</Trans>\n </th>\n <th>\n <Trans>Content</Trans>\n </th>\n </tr>\n </thead>\n <tbody>\n {Array.from({ length: Math.max(4, fields.length) }).map(\n (_, i) => {\n const { name = '', value = '' } = fields[i] || {};\n return (\n <FieldsAttributesRow\n key={i}\n name={name}\n value={value}\n index={i}\n disabled={uiState === 'loading'}\n />\n );\n },\n )}\n </tbody>\n </table>\n <footer>\n <button\n type=\"button\"\n class=\"light\"\n disabled={uiState === 'loading'}\n onClick={() => {\n onClose?.();\n }}\n >\n <Trans>Cancel</Trans>\n </button>\n <button type=\"submit\" disabled={uiState === 'loading'}>\n <Trans>Save</Trans>\n </button>\n </footer>\n </form>\n )}\n </main>\n </div>\n );\n}\n\nfunction FieldsAttributesRow({ name, value, disabled, index: i }) {\n const [hasValue, setHasValue] = useState(!!value);\n return (\n <tr>\n <td>\n <input\n type=\"text\"\n name={`fields_attributes[${i}][name]`}\n defaultValue={name}\n disabled={disabled}\n maxLength={255}\n required={hasValue}\n dir=\"auto\"\n />\n </td>\n <td>\n <input\n type=\"text\"\n name={`fields_attributes[${i}][value]`}\n defaultValue={value}\n disabled={disabled}\n maxLength={255}\n onChange={(e) => setHasValue(!!e.currentTarget.value)}\n dir=\"auto\"\n />\n </td>\n </tr>\n );\n}\n\nfunction AccountHandleInfo({ acct, instance }) {\n // acct = username or username@server\n let [username, server] = acct.split('@');\n if (!server) server = instance;\n return (\n <div class=\"handle-info\">\n <span class=\"handle-handle\">\n <b class=\"handle-username\">{username}</b>\n <span class=\"handle-at\">@</span>\n <b class=\"handle-server\">{server}</b>\n </span>\n <div class=\"handle-legend\">\n <span class=\"ib\">\n <span class=\"handle-legend-icon username\" /> <Trans>username</Trans>\n </span>{' '}\n <span class=\"ib\">\n <span class=\"handle-legend-icon server\" />{' '}\n <Trans>server domain name</Trans>\n </span>\n </div>\n </div>\n );\n}\n\nexport default AccountInfo;\n","import { t } from '@lingui/macro';\nimport { useEffect } from 'preact/hooks';\n\nimport { api } from '../utils/api';\nimport states from '../utils/states';\nimport useLocationChange from '../utils/useLocationChange';\n\nimport AccountInfo from './account-info';\nimport Icon from './icon';\n\nfunction AccountSheet({ account, instance: propInstance, onClose }) {\n const { masto, instance, authenticated } = api({ instance: propInstance });\n const isString = typeof account === 'string';\n\n useEffect(() => {\n if (!isString) {\n states.accounts[`${account.id}@${instance}`] = account;\n }\n }, [account]);\n\n useLocationChange(onClose);\n\n return (\n <div\n class=\"sheet\"\n // onClick={(e) => {\n // const accountBlock = e.target.closest('.account-block');\n // if (accountBlock) {\n // onClose({\n // destination: 'account-statuses',\n // });\n // }\n // }}\n >\n {!!onClose && (\n <button type=\"button\" class=\"sheet-close outer\" onClick={onClose}>\n <Icon icon=\"x\" alt={t`Close`} />\n </button>\n )}\n <AccountInfo\n instance={instance}\n authenticated={authenticated}\n account={account}\n fetchAccount={async () => {\n if (isString) {\n try {\n const info = await masto.v1.accounts.lookup({\n acct: account,\n skip_webfinger: false,\n });\n return info;\n } catch (e) {\n const result = await masto.v2.search.fetch({\n q: account,\n type: 'accounts',\n limit: 1,\n resolve: authenticated,\n });\n if (result.accounts.length) {\n return result.accounts[0];\n } else if (/https?:\\/\\/[^/]+\\/@/.test(account)) {\n const accountURL = URL.parse(account);\n const { hostname, pathname } = accountURL;\n const acct =\n pathname.replace(/^\\//, '').replace(/\\/$/, '') +\n '@' +\n hostname;\n const result = await masto.v2.search.fetch({\n q: acct,\n type: 'accounts',\n limit: 1,\n resolve: authenticated,\n });\n if (result.accounts.length) {\n return result.accounts[0];\n }\n }\n }\n } else {\n return account;\n }\n }}\n />\n </div>\n );\n}\n\nexport default AccountSheet;\n","import './drafts.css';\n\nimport { t, Trans } from '@lingui/macro';\nimport { useEffect, useMemo, useReducer, useState } from 'react';\n\nimport { api } from '../utils/api';\nimport db from '../utils/db';\nimport niceDateTime from '../utils/nice-date-time';\nimport states from '../utils/states';\nimport { getCurrentAccountNS } from '../utils/store-utils';\n\nimport Icon from './icon';\nimport Loader from './loader';\nimport MenuConfirm from './menu-confirm';\n\nfunction Drafts({ onClose }) {\n const { masto } = api();\n const [uiState, setUIState] = useState('default');\n const [drafts, setDrafts] = useState([]);\n const [reloadCount, reload] = useReducer((c) => c + 1, 0);\n\n useEffect(() => {\n setUIState('loading');\n (async () => {\n try {\n const keys = await db.drafts.keys();\n if (keys.length) {\n const ns = getCurrentAccountNS();\n const ownKeys = keys.filter((key) => key.startsWith(ns));\n if (ownKeys.length) {\n const drafts = await db.drafts.getMany(ownKeys);\n drafts.sort(\n (a, b) =>\n new Date(b.updatedAt).getTime() -\n new Date(a.updatedAt).getTime(),\n );\n setDrafts(drafts);\n } else {\n setDrafts([]);\n }\n } else {\n setDrafts([]);\n }\n setUIState('default');\n } catch (e) {\n console.error(e);\n setUIState('error');\n }\n })();\n }, [reloadCount]);\n\n const hasDrafts = drafts?.length > 0;\n\n return (\n <div class=\"sheet\">\n {!!onClose && (\n <button type=\"button\" class=\"sheet-close\" onClick={onClose}>\n <Icon icon=\"x\" alt={t`Close`} />\n </button>\n )}\n <header>\n <h2>\n <Trans>Unsent drafts</Trans>{' '}\n <Loader abrupt hidden={uiState !== 'loading'} />\n </h2>\n {hasDrafts && (\n <div class=\"insignificant\">\n <Trans>\n Looks like you have unsent drafts. Let's continue where you left\n off.\n </Trans>\n </div>\n )}\n </header>\n <main>\n {hasDrafts ? (\n <>\n <ul class=\"drafts-list\">\n {drafts.map((draft) => {\n const { updatedAt, key, draftStatus, replyTo } = draft;\n const updatedAtDate = new Date(updatedAt);\n return (\n <li key={updatedAt}>\n <div class=\"mini-draft-meta\">\n <b>\n <Icon icon={replyTo ? 'reply' : 'quill'} size=\"s\" />{' '}\n <time>\n {!!replyTo && (\n <>\n <span class=\"bidi-isolate\">\n @{replyTo.account.acct}\n </span>\n <br />\n </>\n )}\n {niceDateTime(updatedAtDate)}\n </time>\n </b>\n <MenuConfirm\n confirmLabel={\n <span>\n <Trans>Delete this draft?</Trans>\n </span>\n }\n menuItemClassName=\"danger\"\n align=\"end\"\n disabled={uiState === 'loading'}\n onClick={() => {\n (async () => {\n try {\n // const yes = confirm('Delete this draft?');\n // if (yes) {\n await db.drafts.del(key);\n reload();\n // }\n } catch (e) {\n alert(t`Error deleting draft! Please try again.`);\n }\n })();\n }}\n >\n <button\n type=\"button\"\n class=\"small light\"\n disabled={uiState === 'loading'}\n >\n <Trans>Delete…</Trans>\n </button>\n </MenuConfirm>\n </div>\n <button\n type=\"button\"\n disabled={uiState === 'loading'}\n class=\"draft-item\"\n onClick={async () => {\n // console.log({ draftStatus });\n let replyToStatus;\n if (replyTo) {\n setUIState('loading');\n try {\n replyToStatus = await masto.v1.statuses\n .$select(replyTo.id)\n .fetch();\n } catch (e) {\n console.error(e);\n alert(t`Error fetching reply-to status!`);\n setUIState('default');\n return;\n }\n setUIState('default');\n }\n window.__COMPOSE__ = {\n draftStatus,\n replyToStatus,\n };\n states.showCompose = true;\n states.showDrafts = false;\n }}\n >\n <MiniDraft draft={draft} />\n </button>\n </li>\n );\n })}\n </ul>\n {drafts.length > 1 && (\n <p>\n <MenuConfirm\n confirmLabel={\n <span>\n <Trans>Delete all drafts?</Trans>\n </span>\n }\n menuItemClassName=\"danger\"\n disabled={uiState === 'loading'}\n onClick={() => {\n (async () => {\n // const yes = confirm('Delete all drafts?');\n // if (yes) {\n setUIState('loading');\n try {\n await db.drafts.delMany(\n drafts.map((draft) => draft.key),\n );\n setUIState('default');\n reload();\n } catch (e) {\n console.error(e);\n alert(t`Error deleting drafts! Please try again.`);\n setUIState('error');\n }\n // }\n })();\n }}\n >\n <button\n type=\"button\"\n class=\"light danger\"\n disabled={uiState === 'loading'}\n >\n <Trans>Delete all…</Trans>\n </button>\n </MenuConfirm>\n </p>\n )}\n </>\n ) : (\n <p>\n <Trans>No drafts found.</Trans>\n </p>\n )}\n </main>\n </div>\n );\n}\n\nfunction MiniDraft({ draft }) {\n const { draftStatus, replyTo } = draft;\n const { status, spoilerText, poll, mediaAttachments } = draftStatus;\n const hasPoll = poll?.options?.length > 0;\n const hasMedia = mediaAttachments?.length > 0;\n const hasPollOrMedia = hasPoll || hasMedia;\n const firstImageMedia = useMemo(() => {\n if (!hasMedia) return;\n const image = mediaAttachments.find((media) => /image/.test(media.type));\n if (!image) return;\n const { file } = image;\n const objectURL = URL.createObjectURL(file);\n return objectURL;\n }, [hasMedia, mediaAttachments]);\n return (\n <>\n <div class=\"mini-draft\">\n {hasPollOrMedia && (\n <div\n class={`mini-draft-aside ${firstImageMedia ? 'has-image' : ''}`}\n style={\n firstImageMedia\n ? {\n '--bg-image': `url(${firstImageMedia})`,\n }\n : {}\n }\n >\n {hasPoll && <Icon icon=\"poll\" alt={t`Poll`} />}\n {hasMedia && (\n <span>\n <Icon icon=\"attachment\" alt={t`Media`} />{' '}\n <small>{mediaAttachments?.length}</small>\n </span>\n )}\n </div>\n )}\n <div class=\"mini-draft-main\">\n {!!spoilerText && <div class=\"mini-draft-spoiler\">{spoilerText}</div>}\n {!!status && <div class=\"mini-draft-status\">{status}</div>}\n </div>\n </div>\n </>\n );\n}\n\nexport default Drafts;\n","import './embed-modal.css';\n\nimport { t, Trans } from '@lingui/macro';\n\nimport Icon from './icon';\n\nfunction EmbedModal({ html, url, width, height, onClose = () => {} }) {\n return (\n <div class=\"embed-modal-container\">\n <div class=\"top-controls\">\n <button type=\"button\" class=\"light\" onClick={() => onClose()}>\n <Icon icon=\"x\" alt={t`Close`} />\n </button>\n {url && (\n <a\n href={url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class=\"button plain\"\n >\n <span>\n <Trans>Open in new window</Trans>\n </span>{' '}\n <Icon icon=\"external\" />\n </a>\n )}\n </div>\n <div\n class=\"embed-content\"\n dangerouslySetInnerHTML={{ __html: html }}\n style={{\n '--width': width + 'px',\n '--height': height + 'px',\n '--aspect-ratio': `${width}/${height}`,\n }}\n />\n </div>\n );\n}\n\nexport default EmbedModal;\n","import './generic-accounts.css';\n\nimport { t, Trans } from '@lingui/macro';\nimport { useEffect, useRef, useState } from 'preact/hooks';\nimport { InView } from 'react-intersection-observer';\nimport { useSnapshot } from 'valtio';\n\nimport { api } from '../utils/api';\nimport { fetchRelationships } from '../utils/relationships';\nimport states from '../utils/states';\nimport useLocationChange from '../utils/useLocationChange';\n\nimport AccountBlock from './account-block';\nimport Icon from './icon';\nimport Link from './link';\nimport Loader from './loader';\nimport Status from './status';\n\nexport default function GenericAccounts({\n instance,\n excludeRelationshipAttrs = [],\n postID,\n onClose = () => {},\n blankCopy = t`Nothing to show`,\n}) {\n const { masto, instance: currentInstance } = api();\n const isCurrentInstance = instance ? instance === currentInstance : true;\n const snapStates = useSnapshot(states);\n ``;\n const [uiState, setUIState] = useState('default');\n const [accounts, setAccounts] = useState([]);\n const [showMore, setShowMore] = useState(false);\n\n useLocationChange(onClose);\n\n if (!snapStates.showGenericAccounts) {\n return null;\n }\n\n const {\n id,\n heading,\n fetchAccounts,\n accounts: staticAccounts,\n showReactions,\n } = snapStates.showGenericAccounts;\n\n const [relationshipsMap, setRelationshipsMap] = useState({});\n\n const loadRelationships = async (accounts) => {\n if (!accounts?.length) return;\n if (!isCurrentInstance) return;\n const relationships = await fetchRelationships(accounts, relationshipsMap);\n if (relationships) {\n setRelationshipsMap({\n ...relationshipsMap,\n ...relationships,\n });\n }\n };\n\n const loadAccounts = (firstLoad) => {\n if (!fetchAccounts) return;\n if (firstLoad) setAccounts([]);\n setUIState('loading');\n (async () => {\n try {\n const { done, value } = await fetchAccounts(firstLoad);\n if (Array.isArray(value)) {\n if (firstLoad) {\n const accounts = [];\n for (let i = 0; i < value.length; i++) {\n const account = value[i];\n const theAccount = accounts.find(\n (a, j) => a.id === account.id && i !== j,\n );\n if (!theAccount) {\n accounts.push({\n _types: [],\n ...account,\n });\n } else {\n theAccount._types.push(...account._types);\n }\n }\n setAccounts(accounts);\n } else {\n // setAccounts((prev) => [...prev, ...value]);\n // Merge accounts by id and _types\n setAccounts((prev) => {\n const newAccounts = prev;\n for (const account of value) {\n const theAccount = newAccounts.find((a) => a.id === account.id);\n if (!theAccount) {\n newAccounts.push(account);\n } else {\n theAccount._types.push(...account._types);\n }\n }\n return newAccounts;\n });\n }\n setShowMore(!done);\n\n loadRelationships(value);\n } else {\n setShowMore(false);\n }\n setUIState('default');\n } catch (e) {\n console.error(e);\n setUIState('error');\n }\n })();\n };\n\n const firstLoad = useRef(true);\n useEffect(() => {\n if (staticAccounts?.length > 0) {\n setAccounts(staticAccounts);\n loadRelationships(staticAccounts);\n } else {\n loadAccounts(true);\n firstLoad.current = false;\n }\n }, [staticAccounts, fetchAccounts]);\n\n useEffect(() => {\n if (firstLoad.current) return;\n // reloadGenericAccounts contains value like {id: 'mute', counter: 1}\n // We only need to reload if the id matches\n if (snapStates.reloadGenericAccounts?.id === id) {\n loadAccounts(true);\n }\n }, [snapStates.reloadGenericAccounts.counter]);\n\n const post = states.statuses[postID];\n\n return (\n <div id=\"generic-accounts-container\" class=\"sheet\" tabindex=\"-1\">\n <button type=\"button\" class=\"sheet-close\" onClick={onClose}>\n <Icon icon=\"x\" alt={t`Close`} />\n </button>\n <header>\n <h2>{heading || t`Accounts`}</h2>\n </header>\n <main>\n {post && (\n <Link\n to={`/${instance || currentInstance}/s/${post.id}`}\n class=\"post-preview\"\n >\n <Status status={post} size=\"s\" readOnly />\n </Link>\n )}\n {accounts.length > 0 ? (\n <>\n <ul class=\"accounts-list\">\n {accounts.map((account) => {\n const relationship = relationshipsMap[account.id];\n const key = `${account.id}-${account._types?.length || ''}`;\n return (\n <li key={key}>\n {showReactions && account._types?.length > 0 && (\n <div class=\"reactions-block\">\n {account._types.map((type) => (\n <Icon\n icon={\n {\n reblog: 'rocket',\n favourite: 'heart',\n }[type]\n }\n class={`${type}-icon`}\n />\n ))}\n </div>\n )}\n <div class=\"account-relationships\">\n <AccountBlock\n account={account}\n showStats\n relationship={relationship}\n excludeRelationshipAttrs={excludeRelationshipAttrs}\n />\n </div>\n </li>\n );\n })}\n </ul>\n {uiState === 'default' ? (\n showMore ? (\n <InView\n onChange={(inView) => {\n if (inView) {\n loadAccounts();\n }\n }}\n >\n <button\n type=\"button\"\n class=\"plain block\"\n onClick={() => loadAccounts()}\n >\n <Trans>Show more…</Trans>\n </button>\n </InView>\n ) : (\n <p class=\"ui-state insignificant\">\n <Trans>The end.</Trans>\n </p>\n )\n ) : (\n uiState === 'loading' && (\n <p class=\"ui-state\">\n <Loader abrupt />\n </p>\n )\n )}\n </>\n ) : uiState === 'loading' ? (\n <p class=\"ui-state\">\n <Loader abrupt />\n </p>\n ) : uiState === 'error' ? (\n <p class=\"ui-state\">\n <Trans>Error loading accounts</Trans>\n </p>\n ) : (\n <p class=\"ui-state insignificant\">{blankCopy}</p>\n )}\n </main>\n </div>\n );\n}\n","import { t, Trans } from '@lingui/macro';\nimport { Menu, MenuItem } from '@szhsin/react-menu';\nimport { useState } from 'preact/hooks';\nimport { useSnapshot } from 'valtio';\n\nimport getTranslateTargetLanguage from '../utils/get-translate-target-language';\nimport localeMatch from '../utils/locale-match';\nimport { speak, supportsTTS } from '../utils/speech';\nimport states from '../utils/states';\n\nimport Icon from './icon';\nimport Menu2 from './menu2';\nimport TranslationBlock from './translation-block';\n\nexport default function MediaAltModal({ alt, lang, onClose }) {\n const snapStates = useSnapshot(states);\n const [forceTranslate, setForceTranslate] = useState(false);\n const targetLanguage = getTranslateTargetLanguage(true);\n const contentTranslationHideLanguages =\n snapStates.settings.contentTranslationHideLanguages || [];\n const differentLanguage =\n !!lang &&\n lang !== targetLanguage &&\n !localeMatch([lang], [targetLanguage]) &&\n !contentTranslationHideLanguages.find(\n (l) => lang === l || localeMatch([lang], [l]),\n );\n\n return (\n <div class=\"sheet\" tabindex=\"-1\">\n {!!onClose && (\n <button type=\"button\" class=\"sheet-close outer\" onClick={onClose}>\n <Icon icon=\"x\" alt={t`Close`} />\n </button>\n )}\n <header class=\"header-grid\">\n <h2>\n <Trans>Media description</Trans>\n </h2>\n <div class=\"header-side\">\n <Menu2\n align=\"end\"\n menuButton={\n <button type=\"button\" class=\"plain4\">\n <Icon icon=\"more\" alt={t`More`} size=\"xl\" />\n </button>\n }\n >\n <MenuItem\n disabled={forceTranslate}\n onClick={() => {\n setForceTranslate(true);\n }}\n >\n <Icon icon=\"translate\" />\n <span>\n <Trans>Translate</Trans>\n </span>\n </MenuItem>\n {supportsTTS && (\n <MenuItem\n onClick={() => {\n speak(alt, lang);\n }}\n >\n <Icon icon=\"speak\" />\n <span>\n <Trans>Speak</Trans>\n </span>\n </MenuItem>\n )}\n </Menu2>\n </div>\n </header>\n <main lang={lang} dir=\"auto\">\n <p\n style={{\n whiteSpace: 'pre-wrap',\n textWrap: 'pretty',\n }}\n >\n {alt}\n </p>\n {(differentLanguage || forceTranslate) && (\n <TranslationBlock\n forceTranslate={forceTranslate}\n sourceLanguage={lang}\n text={alt}\n />\n )}\n </main>\n </div>\n );\n}\n","const { min, max } = Math;\n\nexport default (x, low = 0, high = 1) => {\n return min(max(low, x), high);\n};\n","// ported from jQuery's $.type\nconst classToType = {};\nfor (let name of [\n 'Boolean',\n 'Number',\n 'String',\n 'Function',\n 'Array',\n 'Date',\n 'RegExp',\n 'Undefined',\n 'Null'\n]) {\n classToType[`[object ${name}]`] = name.toLowerCase();\n}\nexport default function (obj) {\n return classToType[Object.prototype.toString.call(obj)] || 'object';\n}\n","import type from './type.js';\n\nexport default (args, keyOrder = null) => {\n // if called with more than 3 arguments, we return the arguments\n if (args.length >= 3) return Array.prototype.slice.call(args);\n // with less than 3 args we check if first arg is object\n // and use the keyOrder string to extract and sort properties\n if (type(args[0]) == 'object' && keyOrder) {\n return keyOrder\n .split('')\n .filter((k) => args[0][k] !== undefined)\n .map((k) => args[0][k]);\n }\n // otherwise we just return the first argument\n // (which we suppose is an array of args)\n return args[0].slice(0);\n};\n","const { PI, min, max } = Math;\n\nconst rnd2 = (a) => Math.round(a * 100) / 100;\nconst rnd3 = (a) => Math.round(a * 100) / 100;\n\nexport { default as clip_rgb } from './clip_rgb.js';\nexport { default as limit } from './limit.js';\nexport { default as type } from './type.js';\nexport { default as unpack } from './unpack.js';\nexport { default as last } from './last.js';\n\nconst TWOPI = PI * 2;\nconst PITHIRD = PI / 3;\nconst DEG2RAD = PI / 180;\nconst RAD2DEG = 180 / PI;\n\n/**\n * Reverse the first three elements of an array\n *\n * @param {any[]} arr\n * @returns {any[]}\n */\nfunction reverse3(arr) {\n return [...arr.slice(0, 3).reverse(), ...arr.slice(3)];\n}\n\nexport { PI, TWOPI, PITHIRD, DEG2RAD, RAD2DEG, min, max, rnd2, rnd3, reverse3 };\n","// from https://www.w3.org/TR/css-color-4/multiply-matrices.js\nexport default function multiplyMatrices(A, B) {\n let m = A.length;\n\n if (!Array.isArray(A[0])) {\n // A is vector, convert to [[a, b, c, ...]]\n A = [A];\n }\n\n if (!Array.isArray(B[0])) {\n // B is vector, convert to [[a], [b], [c], ...]]\n B = B.map((x) => [x]);\n }\n\n let p = B[0].length;\n let B_cols = B[0].map((_, i) => B.map((x) => x[i])); // transpose B\n let product = A.map((row) =>\n B_cols.map((col) => {\n if (!Array.isArray(row)) {\n return col.reduce((a, c) => a + c * row, 0);\n }\n\n return row.reduce((a, c, i) => a + c * (col[i] || 0), 0);\n })\n );\n\n if (m === 1) {\n product = product[0]; // Avoid [[a, b, c, ...]]\n }\n\n if (p === 1) {\n return product.map((x) => x[0]); // Avoid [[a], [b], [c], ...]]\n }\n\n return product;\n}\n","const labConstants = {\n // Corresponds roughly to RGB brighter/darker\n Kn: 18,\n\n // D65 standard referent\n labWhitePoint: 'd65',\n Xn: 0.95047,\n Yn: 1,\n Zn: 1.08883,\n\n t0: 0.137931034, // 4 / 29\n t1: 0.206896552, // 6 / 29\n t2: 0.12841855, // 3 * t1 * t1\n t3: 0.008856452, // t1 * t1 * t1,\n\n kE: 216.0 / 24389.0,\n kKE: 8.0,\n kK: 24389.0 / 27.0,\n\n RefWhiteRGB: {\n // sRGB\n X: 0.95047,\n Y: 1,\n Z: 1.08883\n },\n\n MtxRGB2XYZ: {\n m00: 0.4124564390896922,\n m01: 0.21267285140562253,\n m02: 0.0193338955823293,\n m10: 0.357576077643909,\n m11: 0.715152155287818,\n m12: 0.11919202588130297,\n m20: 0.18043748326639894,\n m21: 0.07217499330655958,\n m22: 0.9503040785363679\n },\n\n MtxXYZ2RGB: {\n m00: 3.2404541621141045,\n m01: -0.9692660305051868,\n m02: 0.055643430959114726,\n m10: -1.5371385127977166,\n m11: 1.8760108454466942,\n m12: -0.2040259135167538,\n m20: -0.498531409556016,\n m21: 0.041556017530349834,\n m22: 1.0572251882231791\n },\n\n // used in rgb2xyz\n As: 0.9414285350000001,\n Bs: 1.040417467,\n Cs: 1.089532651,\n\n MtxAdaptMa: {\n m00: 0.8951,\n m01: -0.7502,\n m02: 0.0389,\n m10: 0.2664,\n m11: 1.7135,\n m12: -0.0685,\n m20: -0.1614,\n m21: 0.0367,\n m22: 1.0296\n },\n\n MtxAdaptMaI: {\n m00: 0.9869929054667123,\n m01: 0.43230526972339456,\n m02: -0.008528664575177328,\n m10: -0.14705425642099013,\n m11: 0.5183602715367776,\n m12: 0.04004282165408487,\n m20: 0.15996265166373125,\n m21: 0.0492912282128556,\n m22: 0.9684866957875502\n }\n};\n\nexport default labConstants;\n\n// taken from https://de.mathworks.com/help/images/ref/whitepoint.html\nconst ILLUMINANTS = new Map([\n // ASTM E308-01\n ['a', [1.0985, 0.35585]],\n // Wyszecki & Stiles, p. 769\n ['b', [1.0985, 0.35585]],\n // C ASTM E308-01\n ['c', [0.98074, 1.18232]],\n // D50 (ASTM E308-01)\n ['d50', [0.96422, 0.82521]],\n // D55 (ASTM E308-01)\n ['d55', [0.95682, 0.92149]],\n // D65 (ASTM E308-01)\n ['d65', [0.95047, 1.08883]],\n // E (ASTM E308-01)\n ['e', [1, 1, 1]],\n // F2 (ASTM E308-01)\n ['f2', [0.99186, 0.67393]],\n // F7 (ASTM E308-01)\n ['f7', [0.95041, 1.08747]],\n // F11 (ASTM E308-01)\n ['f11', [1.00962, 0.6435]],\n ['icc', [0.96422, 0.82521]]\n]);\n\nexport function setLabWhitePoint(name) {\n const ill = ILLUMINANTS.get(String(name).toLowerCase());\n if (!ill) {\n throw new Error('unknown Lab illuminant ' + name);\n }\n labConstants.labWhitePoint = name;\n labConstants.Xn = ill[0];\n labConstants.Zn = ill[1];\n}\n\nexport function getLabWhitePoint() {\n return labConstants.labWhitePoint;\n}\n","import LAB_CONSTANTS from './lab-constants.js';\nimport { unpack } from '../../utils/index.js';\n\n/*\n * L* [0..100]\n * a [-100..100]\n * b [-100..100]\n */\nconst lab2rgb = (...args) => {\n args = unpack(args, 'lab');\n const [L, a, b] = args;\n const [x, y, z] = lab2xyz(L, a, b);\n const [r, g, b_] = xyz2rgb(x, y, z);\n return [r, g, b_, args.length > 3 ? args[3] : 1];\n};\n\nconst lab2xyz = (L, a, b) => {\n const { kE, kK, kKE, Xn, Yn, Zn } = LAB_CONSTANTS;\n\n const fy = (L + 16.0) / 116.0;\n const fx = 0.002 * a + fy;\n const fz = fy - 0.005 * b;\n\n const fx3 = fx * fx * fx;\n const fz3 = fz * fz * fz;\n\n const xr = fx3 > kE ? fx3 : (116.0 * fx - 16.0) / kK;\n const yr = L > kKE ? Math.pow((L + 16.0) / 116.0, 3.0) : L / kK;\n const zr = fz3 > kE ? fz3 : (116.0 * fz - 16.0) / kK;\n\n const x = xr * Xn;\n const y = yr * Yn;\n const z = zr * Zn;\n\n return [x, y, z];\n};\n\nconst compand = (linear) => {\n /* sRGB */\n const sign = Math.sign(linear);\n linear = Math.abs(linear);\n return (\n (linear <= 0.0031308\n ? linear * 12.92\n : 1.055 * Math.pow(linear, 1.0 / 2.4) - 0.055) * sign\n );\n};\n\nconst xyz2rgb = (x, y, z) => {\n const { MtxAdaptMa, MtxAdaptMaI, MtxXYZ2RGB, RefWhiteRGB, Xn, Yn, Zn } =\n LAB_CONSTANTS;\n\n const As = Xn * MtxAdaptMa.m00 + Yn * MtxAdaptMa.m10 + Zn * MtxAdaptMa.m20;\n const Bs = Xn * MtxAdaptMa.m01 + Yn * MtxAdaptMa.m11 + Zn * MtxAdaptMa.m21;\n const Cs = Xn * MtxAdaptMa.m02 + Yn * MtxAdaptMa.m12 + Zn * MtxAdaptMa.m22;\n\n const Ad =\n RefWhiteRGB.X * MtxAdaptMa.m00 +\n RefWhiteRGB.Y * MtxAdaptMa.m10 +\n RefWhiteRGB.Z * MtxAdaptMa.m20;\n const Bd =\n RefWhiteRGB.X * MtxAdaptMa.m01 +\n RefWhiteRGB.Y * MtxAdaptMa.m11 +\n RefWhiteRGB.Z * MtxAdaptMa.m21;\n const Cd =\n RefWhiteRGB.X * MtxAdaptMa.m02 +\n RefWhiteRGB.Y * MtxAdaptMa.m12 +\n RefWhiteRGB.Z * MtxAdaptMa.m22;\n\n const X1 =\n (x * MtxAdaptMa.m00 + y * MtxAdaptMa.m10 + z * MtxAdaptMa.m20) *\n (Ad / As);\n const Y1 =\n (x * MtxAdaptMa.m01 + y * MtxAdaptMa.m11 + z * MtxAdaptMa.m21) *\n (Bd / Bs);\n const Z1 =\n (x * MtxAdaptMa.m02 + y * MtxAdaptMa.m12 + z * MtxAdaptMa.m22) *\n (Cd / Cs);\n\n const X2 =\n X1 * MtxAdaptMaI.m00 + Y1 * MtxAdaptMaI.m10 + Z1 * MtxAdaptMaI.m20;\n const Y2 =\n X1 * MtxAdaptMaI.m01 + Y1 * MtxAdaptMaI.m11 + Z1 * MtxAdaptMaI.m21;\n const Z2 =\n X1 * MtxAdaptMaI.m02 + Y1 * MtxAdaptMaI.m12 + Z1 * MtxAdaptMaI.m22;\n\n const r = compand(\n X2 * MtxXYZ2RGB.m00 + Y2 * MtxXYZ2RGB.m10 + Z2 * MtxXYZ2RGB.m20\n );\n const g = compand(\n X2 * MtxXYZ2RGB.m01 + Y2 * MtxXYZ2RGB.m11 + Z2 * MtxXYZ2RGB.m21\n );\n const b = compand(\n X2 * MtxXYZ2RGB.m02 + Y2 * MtxXYZ2RGB.m12 + Z2 * MtxXYZ2RGB.m22\n );\n\n return [r * 255, g * 255, b * 255];\n};\n\nexport default lab2rgb;\nexport { xyz2rgb };\n","import { unpack } from '../../utils/index.js';\nimport multiplyMatrices from '../../utils/multiply-matrices.js';\nimport { xyz2rgb } from '../lab/lab2rgb.js';\n\nconst oklab2rgb = (...args) => {\n args = unpack(args, 'lab');\n const [L, a, b, ...rest] = args;\n const [X, Y, Z] = OKLab_to_XYZ([L, a, b]);\n const [r, g, b_] = xyz2rgb(X, Y, Z);\n return [r, g, b_, ...(rest.length > 0 && rest[0] < 1 ? [rest[0]] : [])];\n};\n\n// from https://www.w3.org/TR/css-color-4/#color-conversion-code\nfunction OKLab_to_XYZ(OKLab) {\n // Given OKLab, convert to XYZ relative to D65\n var LMStoXYZ = [\n [1.2268798758459243, -0.5578149944602171, 0.2813910456659647],\n [-0.0405757452148008, 1.112286803280317, -0.0717110580655164],\n [-0.0763729366746601, -0.4214933324022432, 1.5869240198367816]\n ];\n var OKLabtoLMS = [\n [1.0, 0.3963377773761749, 0.2158037573099136],\n [1.0, -0.1055613458156586, -0.0638541728258133],\n [1.0, -0.0894841775298119, -1.2914855480194092]\n ];\n\n var LMSnl = multiplyMatrices(OKLabtoLMS, OKLab);\n return multiplyMatrices(\n LMStoXYZ,\n LMSnl.map((c) => c ** 3)\n );\n}\n\nexport default oklab2rgb;\n","import LAB_CONSTANTS from './lab-constants.js';\nimport { unpack } from '../../utils/index.js';\n\nconst rgb2lab = (...args) => {\n const [r, g, b, ...rest] = unpack(args, 'rgb');\n const [x, y, z] = rgb2xyz(r, g, b);\n const [L, a, b_] = xyz2lab(x, y, z);\n return [L, a, b_, ...(rest.length > 0 && rest[0] < 1 ? [rest[0]] : [])];\n};\n\nfunction xyz2lab(x, y, z) {\n const { Xn, Yn, Zn, kE, kK } = LAB_CONSTANTS;\n const xr = x / Xn;\n const yr = y / Yn;\n const zr = z / Zn;\n\n const fx = xr > kE ? Math.pow(xr, 1.0 / 3.0) : (kK * xr + 16.0) / 116.0;\n const fy = yr > kE ? Math.pow(yr, 1.0 / 3.0) : (kK * yr + 16.0) / 116.0;\n const fz = zr > kE ? Math.pow(zr, 1.0 / 3.0) : (kK * zr + 16.0) / 116.0;\n\n return [116.0 * fy - 16.0, 500.0 * (fx - fy), 200.0 * (fy - fz)];\n}\n\nfunction gammaAdjustSRGB(companded) {\n const sign = Math.sign(companded);\n companded = Math.abs(companded);\n const linear =\n companded <= 0.04045\n ? companded / 12.92\n : Math.pow((companded + 0.055) / 1.055, 2.4);\n return linear * sign;\n}\n\nconst rgb2xyz = (r, g, b) => {\n // normalize and gamma adjust\n r = gammaAdjustSRGB(r / 255);\n g = gammaAdjustSRGB(g / 255);\n b = gammaAdjustSRGB(b / 255);\n\n const { MtxRGB2XYZ, MtxAdaptMa, MtxAdaptMaI, Xn, Yn, Zn, As, Bs, Cs } =\n LAB_CONSTANTS;\n\n let x = r * MtxRGB2XYZ.m00 + g * MtxRGB2XYZ.m10 + b * MtxRGB2XYZ.m20;\n let y = r * MtxRGB2XYZ.m01 + g * MtxRGB2XYZ.m11 + b * MtxRGB2XYZ.m21;\n let z = r * MtxRGB2XYZ.m02 + g * MtxRGB2XYZ.m12 + b * MtxRGB2XYZ.m22;\n\n const Ad = Xn * MtxAdaptMa.m00 + Yn * MtxAdaptMa.m10 + Zn * MtxAdaptMa.m20;\n const Bd = Xn * MtxAdaptMa.m01 + Yn * MtxAdaptMa.m11 + Zn * MtxAdaptMa.m21;\n const Cd = Xn * MtxAdaptMa.m02 + Yn * MtxAdaptMa.m12 + Zn * MtxAdaptMa.m22;\n\n let X = x * MtxAdaptMa.m00 + y * MtxAdaptMa.m10 + z * MtxAdaptMa.m20;\n let Y = x * MtxAdaptMa.m01 + y * MtxAdaptMa.m11 + z * MtxAdaptMa.m21;\n let Z = x * MtxAdaptMa.m02 + y * MtxAdaptMa.m12 + z * MtxAdaptMa.m22;\n\n X *= Ad / As;\n Y *= Bd / Bs;\n Z *= Cd / Cs;\n\n x = X * MtxAdaptMaI.m00 + Y * MtxAdaptMaI.m10 + Z * MtxAdaptMaI.m20;\n y = X * MtxAdaptMaI.m01 + Y * MtxAdaptMaI.m11 + Z * MtxAdaptMaI.m21;\n z = X * MtxAdaptMaI.m02 + Y * MtxAdaptMaI.m12 + Z * MtxAdaptMaI.m22;\n\n return [x, y, z];\n};\n\nexport default rgb2lab;\nexport { rgb2xyz };\n","import { unpack } from '../../utils/index.js';\nimport multiplyMatrices from '../../utils/multiply-matrices.js';\nimport { rgb2xyz } from '../lab/rgb2lab.js';\n\nconst rgb2oklab = (...args) => {\n const [r, g, b, ...rest] = unpack(args, 'rgb');\n const xyz = rgb2xyz(r, g, b);\n const oklab = XYZ_to_OKLab(xyz);\n return [...oklab, ...(rest.length > 0 && rest[0] < 1 ? [rest[0]] : [])];\n};\n\n// from https://www.w3.org/TR/css-color-4/#color-conversion-code\nfunction XYZ_to_OKLab(XYZ) {\n // Given XYZ relative to D65, convert to OKLab\n const XYZtoLMS = [\n [0.819022437996703, 0.3619062600528904, -0.1288737815209879],\n [0.0329836539323885, 0.9292868615863434, 0.0361446663506424],\n [0.0481771893596242, 0.2642395317527308, 0.6335478284694309]\n ];\n const LMStoOKLab = [\n [0.210454268309314, 0.7936177747023054, -0.0040720430116193],\n [1.9779985324311684, -2.4285922420485799, 0.450593709617411],\n [0.0259040424655478, 0.7827717124575296, -0.8086757549230774]\n ];\n\n const LMS = multiplyMatrices(XYZtoLMS, XYZ);\n // JavaScript Math.cbrt returns a sign-matched cube root\n // beware if porting to other languages\n // especially if tempted to use a general power function\n return multiplyMatrices(\n LMStoOKLab,\n LMS.map((c) => Math.cbrt(c))\n );\n // L in range [0,1]. For use in CSS, multiply by 100 and add a percent\n}\n\nexport default rgb2oklab;\n","import { unpack, DEG2RAD } from '../../utils/index.js';\nconst { sin, cos } = Math;\n\nconst lch2lab = (...args) => {\n /*\n Convert from a qualitative parameter h and a quantitative parameter l to a 24-bit pixel.\n These formulas were invented by David Dalrymple to obtain maximum contrast without going\n out of gamut if the parameters are in the range 0-1.\n\n A saturation multiplier was added by Gregor Aisch\n */\n let [l, c, h] = unpack(args, 'lch');\n if (isNaN(h)) h = 0;\n h = h * DEG2RAD;\n return [l, cos(h) * c, sin(h) * c];\n};\n\nexport default lch2lab;\n","import { unpack } from '../../utils/index.js';\nimport lch2lab from '../lch/lch2lab.js';\nimport oklab2rgb from '../oklab/oklab2rgb.js';\n\nconst oklch2rgb = (...args) => {\n args = unpack(args, 'lch');\n const [l, c, h, ...rest] = args;\n const [L, a, b_] = lch2lab(l, c, h);\n const [r, g, b] = oklab2rgb(L, a, b_);\n return [r, g, b, ...(rest.length > 0 && rest[0] < 1 ? [rest[0]] : [])];\n};\n\nexport default oklch2rgb;\n","import { unpack, RAD2DEG } from '../../utils/index.js';\nconst { sqrt, atan2, round } = Math;\n\nconst lab2lch = (...args) => {\n const [l, a, b] = unpack(args, 'lab');\n const c = sqrt(a * a + b * b);\n let h = (atan2(b, a) * RAD2DEG + 360) % 360;\n if (round(c * 10000) === 0) h = Number.NaN;\n return [l, c, h];\n};\n\nexport default lab2lch;\n","import { unpack } from '../../utils/index.js';\nimport rgb2oklab from '../oklab/rgb2oklab.js';\nimport lab2lch from '../lch/lab2lch.js';\n\nconst rgb2oklch = (...args) => {\n const [r, g, b, ...rest] = unpack(args, 'rgb');\n const [l, a, b_] = rgb2oklab(r, g, b);\n const [L, c, h] = lab2lch(l, a, b_);\n return [L, c, h, ...(rest.length > 0 && rest[0] < 1 ? [rest[0]] : [])];\n};\n\nexport default rgb2oklch;\n","import { t, Trans } from '@lingui/macro';\nimport { MenuDivider, MenuItem } from '@szhsin/react-menu';\nimport { getBlurHashAverageColor } from 'fast-blurhash';\nimport {\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'preact/hooks';\nimport { useHotkeys } from 'react-hotkeys-hook';\n\nimport { oklch2rgb, rgb2oklch } from '../utils/color-utils';\nimport isRTL from '../utils/is-rtl';\nimport showToast from '../utils/show-toast';\nimport states from '../utils/states';\nimport store from '../utils/store';\n\nimport Icon from './icon';\nimport Link from './link';\nimport Media from './media';\nimport MenuLink from './menu-link';\nimport Menu2 from './menu2';\n\nconst { PHANPY_IMG_ALT_API_URL: IMG_ALT_API_URL } = import.meta.env;\n\nfunction MediaModal({\n mediaAttachments,\n statusID,\n instance,\n lang,\n index = 0,\n onClose = () => {},\n}) {\n const [uiState, setUIState] = useState('default');\n const carouselRef = useRef(null);\n\n const [currentIndex, setCurrentIndex] = useState(index);\n const carouselFocusItem = useRef(null);\n useLayoutEffect(() => {\n carouselFocusItem.current?.scrollIntoView();\n\n // history.pushState({ mediaModal: true }, '');\n // const handlePopState = (e) => {\n // if (e.state?.mediaModal) {\n // onClose();\n // }\n // };\n // window.addEventListener('popstate', handlePopState);\n // return () => {\n // window.removeEventListener('popstate', handlePopState);\n // };\n }, []);\n const prevStatusID = useRef(statusID);\n useEffect(() => {\n const scrollLeft = index * carouselRef.current.clientWidth;\n const differentStatusID = prevStatusID.current !== statusID;\n if (differentStatusID) prevStatusID.current = statusID;\n carouselRef.current.focus();\n carouselRef.current.scrollTo({\n left: scrollLeft * (isRTL() ? -1 : 1),\n behavior: differentStatusID ? 'auto' : 'smooth',\n });\n }, [index, statusID]);\n\n const [showControls, setShowControls] = useState(true);\n\n useEffect(() => {\n let handleSwipe = () => {\n onClose();\n };\n if (carouselRef.current) {\n carouselRef.current.addEventListener('swiped-down', handleSwipe);\n }\n return () => {\n if (carouselRef.current) {\n carouselRef.current.removeEventListener('swiped-down', handleSwipe);\n }\n };\n }, []);\n\n useHotkeys(\n 'esc',\n onClose,\n {\n ignoreEventWhen: (e) => {\n const hasModal = !!document.querySelector('#modal-container > *');\n return hasModal;\n },\n },\n [onClose],\n );\n\n useEffect(() => {\n let handleScroll = () => {\n const { clientWidth, scrollLeft } = carouselRef.current;\n const index = Math.round(Math.abs(scrollLeft) / clientWidth);\n setCurrentIndex(index);\n };\n if (carouselRef.current) {\n carouselRef.current.addEventListener('scroll', handleScroll, {\n passive: true,\n });\n }\n return () => {\n if (carouselRef.current) {\n carouselRef.current.removeEventListener('scroll', handleScroll);\n }\n };\n }, []);\n\n useEffect(() => {\n let timer = setTimeout(() => {\n carouselRef.current?.focus?.();\n }, 100);\n return () => clearTimeout(timer);\n }, []);\n\n const mediaOkColors = useMemo(() => {\n return mediaAttachments?.map((media) => {\n const { blurhash } = media;\n if (blurhash) {\n const averageColor = getBlurHashAverageColor(blurhash);\n return rgb2oklch(averageColor);\n }\n return null;\n });\n }, [mediaAttachments]);\n const mediaAccentColors = useMemo(() => {\n return mediaOkColors?.map((okColor) => {\n if (okColor) {\n return {\n light: oklch2rgb([0.95, 0.01, okColor[2]]),\n dark: oklch2rgb([0.35, 0.01, okColor[2]]),\n default: oklch2rgb([0.6, okColor[1], okColor[2]]),\n };\n }\n return {};\n });\n });\n const mediaAccentGradients = useMemo(() => {\n const gap = 5;\n const range = 100 / mediaAccentColors.length;\n const colors = mediaAccentColors.map((color, i) => {\n const start = i * range + gap;\n const end = (i + 1) * range - gap;\n if (color?.light && color?.dark) {\n return {\n light: `\n rgb(${color.light?.join(',')}) ${start}%, \n rgb(${color.light?.join(',')}) ${end}%\n `,\n dark: `\n rgb(${color.dark?.join(',')}) ${start}%, \n rgb(${color.dark?.join(',')}) ${end}%\n `,\n };\n }\n\n return {\n light: `\n transparent ${start}%, \n transparent ${end}%\n `,\n dark: `\n transparent ${start}%, \n transparent ${end}%\n `,\n };\n });\n const lightGradient = colors.map((color) => color.light).join(', ');\n const darkGradient = colors.map((color) => color.dark).join(', ');\n return {\n light: lightGradient,\n dark: darkGradient,\n };\n }, [mediaAccentColors]);\n\n let toastRef = useRef(null);\n useEffect(() => {\n return () => {\n toastRef.current?.hideToast?.();\n };\n }, []);\n\n useLayoutEffect(() => {\n const currentColor = mediaAccentColors[currentIndex];\n let $meta;\n let metaColor;\n if (currentColor) {\n const theme = store.local.get('theme');\n if (theme) {\n const mediaColor = `rgb(${currentColor[theme].join(',')})`;\n console.log({ mediaColor });\n $meta = document.querySelector(\n `meta[name=\"theme-color\"][data-theme-setting=\"manual\"]`,\n );\n if ($meta) {\n metaColor = $meta.content;\n $meta.content = mediaColor;\n }\n } else {\n const colorScheme = window.matchMedia('(prefers-color-scheme: dark)')\n .matches\n ? 'dark'\n : 'light';\n const mediaColor = `rgb(${currentColor[colorScheme].join(',')})`;\n console.log({ mediaColor });\n $meta = document.querySelector(\n `meta[name=\"theme-color\"][media*=\"${colorScheme}\"]`,\n );\n if ($meta) {\n metaColor = $meta.content;\n $meta.content = mediaColor;\n }\n }\n }\n return () => {\n // Reset meta color\n if ($meta && metaColor) {\n $meta.content = metaColor;\n }\n };\n }, [currentIndex, mediaAccentColors]);\n\n return (\n <div\n class={`media-modal-container media-modal-count-${mediaAttachments?.length}`}\n >\n <div\n ref={carouselRef}\n tabIndex=\"0\"\n data-swipe-threshold=\"44\"\n class=\"carousel\"\n onClick={(e) => {\n if (\n e.target.classList.contains('carousel-item') ||\n e.target.classList.contains('media') ||\n e.target.classList.contains('media-zoom')\n ) {\n onClose();\n }\n }}\n style={\n mediaAttachments.length > 1\n ? {\n backgroundAttachment: 'local',\n '--accent-gradient-light': mediaAccentGradients?.light,\n '--accent-gradient-dark': mediaAccentGradients?.dark,\n // backgroundImage: `linear-gradient(\n // to ${isRTL() ? 'left' : 'right'}, ${mediaAccentGradient})`,\n }\n : {}\n }\n >\n {mediaAttachments?.map((media, i) => {\n const accentColor =\n mediaAttachments.length === 1 ? mediaAccentColors[i] : null;\n return (\n <div\n class=\"carousel-item\"\n style={\n accentColor\n ? {\n '--accent-color': `rgb(${accentColor.default.join(',')})`,\n '--accent-light-color': `rgb(${accentColor.light?.join(\n ',',\n )})`,\n '--accent-dark-color': `rgb(${accentColor.dark?.join(\n ',',\n )})`,\n '--accent-alpha-color': `rgba(${accentColor.default.join(\n ',',\n )}, 0.4)`,\n }\n : {}\n }\n tabindex=\"0\"\n key={media.id}\n ref={i === currentIndex ? carouselFocusItem : null}\n onClick={(e) => {\n // console.log(e);\n // if (e.target !== e.currentTarget) {\n // setShowControls(!showControls);\n // }\n if (!e.target.classList.contains('media')) {\n setShowControls(!showControls);\n }\n }}\n >\n {!!media.description && (\n <button\n type=\"button\"\n class=\"media-alt\"\n hidden={!showControls}\n onClick={() => {\n states.showMediaAlt = {\n alt: media.description,\n lang,\n };\n }}\n >\n <span class=\"alt-badge\">ALT</span>\n <span class=\"media-alt-desc\" lang={lang} dir=\"auto\">\n {media.description}\n </span>\n </button>\n )}\n <Media media={media} showOriginal lang={lang} />\n </div>\n );\n })}\n </div>\n <div class=\"carousel-top-controls\" hidden={!showControls}>\n <span>\n <button\n type=\"button\"\n class=\"carousel-button\"\n onClick={() => onClose()}\n >\n <Icon icon=\"x\" alt={t`Close`} />\n </button>\n </span>\n {mediaAttachments?.length > 1 ? (\n <span class=\"carousel-dots\">\n {mediaAttachments?.map((media, i) => (\n <button\n key={media.id}\n type=\"button\"\n disabled={i === currentIndex}\n class={`carousel-dot ${i === currentIndex ? 'active' : ''}`}\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n const left =\n carouselRef.current.clientWidth * i * (isRTL() ? -1 : 1);\n carouselRef.current.focus();\n carouselRef.current.scrollTo({ left, behavior: 'smooth' });\n }}\n >\n <Icon icon=\"round\" size=\"s\" alt=\"⸱\" />\n </button>\n ))}\n </span>\n ) : (\n <span />\n )}\n <span>\n <Menu2\n overflow=\"auto\"\n align=\"end\"\n position=\"anchor\"\n gap={4}\n menuClassName=\"glass-menu\"\n menuButton={\n <button type=\"button\" class=\"carousel-button\">\n <Icon icon=\"more\" alt={t`More`} />\n </button>\n }\n >\n <MenuLink\n href={\n mediaAttachments[currentIndex]?.remoteUrl ||\n mediaAttachments[currentIndex]?.url\n }\n class=\"carousel-button\"\n target=\"_blank\"\n title={t`Open original media in new window`}\n >\n <Icon icon=\"popout\" />\n <span>\n <Trans>Open original media</Trans>\n </span>\n </MenuLink>\n {import.meta.env.DEV && // Only dev for now\n !!states.settings.mediaAltGenerator &&\n !!IMG_ALT_API_URL &&\n !!mediaAttachments[currentIndex]?.url &&\n !mediaAttachments[currentIndex]?.description &&\n mediaAttachments[currentIndex]?.type === 'image' && (\n <>\n <MenuDivider />\n <MenuItem\n disabled={uiState === 'loading'}\n onClick={() => {\n setUIState('loading');\n toastRef.current = showToast({\n text: t`Attempting to describe image. Please wait…`,\n duration: -1,\n });\n (async function () {\n try {\n const response = await fetch(\n `${IMG_ALT_API_URL}?image=${encodeURIComponent(\n mediaAttachments[currentIndex]?.url,\n )}`,\n ).then((r) => r.json());\n states.showMediaAlt = {\n alt: response.description,\n };\n } catch (e) {\n console.error(e);\n showToast(t`Failed to describe image`);\n } finally {\n setUIState('default');\n toastRef.current?.hideToast?.();\n }\n })();\n }}\n >\n <Icon icon=\"sparkles2\" />\n <span>\n <Trans>Describe image…</Trans>\n </span>\n </MenuItem>\n </>\n )}\n </Menu2>{' '}\n <Link\n to={`${instance ? `/${instance}` : ''}/s/${statusID}${\n window.matchMedia('(min-width: calc(40em + 350px))').matches\n ? `?media=${currentIndex + 1}`\n : ''\n }`}\n class=\"button carousel-button media-post-link\"\n // onClick={() => {\n // // if small screen (not media query min-width 40em + 350px), run onClose\n // if (\n // !window.matchMedia('(min-width: calc(40em + 350px))').matches\n // ) {\n // onClose();\n // }\n // }}\n >\n <span class=\"button-label\">\n <Trans>View post</Trans>{' '}\n </span>\n »\n </Link>\n </span>\n </div>\n {mediaAttachments?.length > 1 && (\n <div class=\"carousel-controls\" hidden={!showControls}>\n <button\n type=\"button\"\n class=\"carousel-button\"\n hidden={currentIndex === 0}\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n carouselRef.current.focus();\n carouselRef.current.scrollTo({\n left:\n carouselRef.current.clientWidth *\n (currentIndex - 1) *\n (isRTL() ? -1 : 1),\n behavior: 'smooth',\n });\n }}\n >\n <Icon icon=\"arrow-left\" alt={t`Previous`} />\n </button>\n <button\n type=\"button\"\n class=\"carousel-button\"\n hidden={currentIndex === mediaAttachments.length - 1}\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n carouselRef.current.focus();\n carouselRef.current.scrollTo({\n left:\n carouselRef.current.clientWidth *\n (currentIndex + 1) *\n (isRTL() ? -1 : 1),\n behavior: 'smooth',\n });\n }}\n >\n <Icon icon=\"arrow-right\" alt={t`Next`} />\n </button>\n </div>\n )}\n </div>\n );\n}\n\nexport default MediaModal;\n","import './report-modal.css';\n\nimport { msg, t, Trans } from '@lingui/macro';\nimport { useLingui } from '@lingui/react';\nimport { Fragment } from 'preact';\nimport { useMemo, useRef, useState } from 'preact/hooks';\n\nimport { api } from '../utils/api';\nimport showToast from '../utils/show-toast';\nimport { getCurrentInstance } from '../utils/store-utils';\n\nimport AccountBlock from './account-block';\nimport Icon from './icon';\nimport Loader from './loader';\nimport Status from './status';\n\n// NOTE: `dislike` hidden for now, it's actually not used for reporting\n// Mastodon shows another screen for unfollowing, muting or blocking instead of reporting\n\nconst CATEGORIES = [, /*'dislike'*/ 'spam', 'legal', 'violation', 'other'];\n// `violation` will be set if there are `rule_ids[]`\n\nconst CATEGORIES_INFO = {\n // dislike: {\n // label: 'Dislike',\n // description: 'Not something you want to see',\n // },\n spam: {\n label: msg`Spam`,\n description: msg`Malicious links, fake engagement, or repetitive replies`,\n },\n legal: {\n label: msg`Illegal`,\n description: msg`Violates the law of your or the server's country`,\n },\n violation: {\n label: msg`Server rule violation`,\n description: msg`Breaks specific server rules`,\n stampLabel: msg`Violation`,\n },\n other: {\n label: msg`Other`,\n description: msg`Issue doesn't fit other categories`,\n excludeStamp: true,\n },\n};\n\nfunction ReportModal({ account, post, onClose }) {\n const { _ } = useLingui();\n const { masto } = api();\n const [uiState, setUIState] = useState('default');\n const [username, domain] = account.acct.split('@');\n\n const [rules, currentDomain] = useMemo(() => {\n const { rules, domain } = getCurrentInstance();\n return [rules || [], domain];\n });\n\n const [selectedCategory, setSelectedCategory] = useState(null);\n const [showRules, setShowRules] = useState(false);\n\n const rulesRef = useRef(null);\n const [hasRules, setHasRules] = useState(false);\n\n return (\n <div class=\"report-modal-container\">\n <div class=\"top-controls\">\n <h1>{post ? t`Report Post` : t`Report @${username}`}</h1>\n <button\n type=\"button\"\n class=\"plain4 small\"\n disabled={uiState === 'loading'}\n onClick={() => onClose()}\n >\n <Icon icon=\"x\" size=\"xl\" alt={t`Close`} />\n </button>\n </div>\n <main>\n <div class=\"report-preview\">\n {post ? (\n <Status status={post} size=\"s\" previewMode />\n ) : (\n <AccountBlock\n account={account}\n avatarSize=\"xxl\"\n useAvatarStatic\n showStats\n showActivity\n />\n )}\n </div>\n {!!selectedCategory &&\n !CATEGORIES_INFO[selectedCategory].excludeStamp && (\n <span\n class=\"rubber-stamp\"\n key={selectedCategory}\n aria-hidden=\"true\"\n >\n {_(\n CATEGORIES_INFO[selectedCategory].stampLabel ||\n _(CATEGORIES_INFO[selectedCategory].label),\n )}\n <small>\n <Trans>Pending review</Trans>\n </small>\n </span>\n )}\n <form\n onSubmit={(e) => {\n e.preventDefault();\n\n const formData = new FormData(e.target);\n const entries = Object.fromEntries(formData.entries());\n console.log('ENTRIES', entries);\n\n let { category, comment, forward } = entries;\n if (!comment) comment = undefined;\n if (forward === 'on') forward = true;\n const ruleIds =\n category === 'violation'\n ? Object.entries(entries)\n .filter(([key]) => key.startsWith('rule_ids'))\n .map(([key, value]) => value)\n : undefined;\n\n const params = {\n category,\n comment,\n forward,\n ruleIds,\n };\n console.log('PARAMS', params);\n\n setUIState('loading');\n (async () => {\n try {\n await masto.v1.reports.create({\n accountId: account.id,\n statusIds: post?.id ? [post.id] : undefined,\n category,\n comment,\n ruleIds,\n forward,\n });\n setUIState('success');\n showToast(post ? t`Post reported` : t`Profile reported`);\n onClose();\n } catch (error) {\n console.error(error);\n setUIState('error');\n showToast(\n error?.message ||\n (post\n ? t`Unable to report post`\n : t`Unable to report profile`),\n );\n }\n })();\n }}\n >\n <p>\n {post\n ? t`What's the issue with this post?`\n : t`What's the issue with this profile?`}\n </p>\n <section class=\"report-categories\">\n {CATEGORIES.map((category) =>\n category === 'violation' && !rules?.length ? null : (\n <Fragment key={category}>\n <label class=\"report-category\">\n <input\n type=\"radio\"\n name=\"category\"\n value={category}\n required\n disabled={uiState === 'loading'}\n onChange={(e) => {\n setSelectedCategory(e.target.value);\n setShowRules(e.target.value === 'violation');\n }}\n />\n <span>\n {_(CATEGORIES_INFO[category].label)} \n <small class=\"ib insignificant\">\n {_(CATEGORIES_INFO[category].description)}\n </small>\n </span>\n </label>\n {category === 'violation' && !!rules?.length && (\n <div\n class=\"shazam-container no-animation\"\n hidden={!showRules}\n >\n <div class=\"shazam-container-inner\">\n <div class=\"report-rules\" ref={rulesRef}>\n {rules.map((rule, i) => (\n <label class=\"report-rule\" key={rule.id}>\n <input\n type=\"checkbox\"\n name={`rule_ids[${i}]`}\n value={rule.id}\n required={showRules && !hasRules}\n disabled={uiState === 'loading'}\n onChange={(e) => {\n const { checked } = e.target;\n if (checked) {\n setHasRules(true);\n } else {\n const checkedInputs =\n rulesRef.current.querySelectorAll(\n 'input:checked',\n );\n if (!checkedInputs.length) {\n setHasRules(false);\n }\n }\n }}\n />\n <span>{rule.text}</span>\n </label>\n ))}\n </div>\n </div>\n </div>\n )}\n </Fragment>\n ),\n )}\n </section>\n <section class=\"report-comment\">\n <p>\n <label for=\"report-comment\">\n <Trans>Additional info</Trans>\n </label>\n </p>\n <textarea\n maxlength=\"1000\"\n rows=\"1\"\n name=\"comment\"\n id=\"report-comment\"\n disabled={uiState === 'loading'}\n required={!post} // Required if not reporting a post\n />\n </section>\n {!!domain && domain !== currentDomain && (\n <section>\n <p>\n <label>\n <input\n type=\"checkbox\"\n switch\n name=\"forward\"\n disabled={uiState === 'loading'}\n />{' '}\n <span>\n <Trans>\n Forward to <i>{domain}</i>\n </Trans>\n </span>\n </label>\n </p>\n </section>\n )}\n <footer>\n <button type=\"submit\" disabled={uiState === 'loading'}>\n <Trans>Send Report</Trans>\n </button>{' '}\n <button\n type=\"submit\"\n class=\"plain2\"\n disabled={uiState === 'loading'}\n onClick={async () => {\n try {\n await masto.v1.accounts.$select(account.id).mute(); // Infinite duration\n showToast(t`Muted ${username}`);\n } catch (e) {\n console.error(e);\n showToast(t`Unable to mute ${username}`);\n }\n // onSubmit will still run\n }}\n >\n <Trans>\n Send Report <small class=\"ib\">+ Mute profile</small>\n </Trans>\n </button>{' '}\n <button\n type=\"submit\"\n class=\"plain2\"\n disabled={uiState === 'loading'}\n onClick={async () => {\n try {\n await masto.v1.accounts.$select(account.id).block();\n showToast(t`Blocked ${username}`);\n } catch (e) {\n console.error(e);\n showToast(t`Unable to block ${username}`);\n }\n // onSubmit will still run\n }}\n >\n <Trans>\n Send Report <small class=\"ib\">+ Block profile</small>\n </Trans>\n </button>\n <Loader hidden={uiState !== 'loading'} />\n </footer>\n </form>\n </main>\n </div>\n );\n}\n\nexport default ReportModal;\n","// Copyright (c) 2013 Pieroxy <pieroxy@pieroxy.net>\n// This work is free. You can redistribute it and/or modify it\n// under the terms of the WTFPL, Version 2\n// For more information see LICENSE.txt or http://www.wtfpl.net/\n//\n// For more information, the home page:\n// http://pieroxy.net/blog/pages/lz-string/testing.html\n//\n// LZ-based compression algorithm, version 1.4.5\nvar LZString = (function() {\n\n// private property\nvar f = String.fromCharCode;\nvar keyStrBase64 = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\nvar keyStrUriSafe = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$\";\nvar baseReverseDic = {};\n\nfunction getBaseValue(alphabet, character) {\n if (!baseReverseDic[alphabet]) {\n baseReverseDic[alphabet] = {};\n for (var i=0 ; i<alphabet.length ; i++) {\n baseReverseDic[alphabet][alphabet.charAt(i)] = i;\n }\n }\n return baseReverseDic[alphabet][character];\n}\n\nvar LZString = {\n compressToBase64 : function (input) {\n if (input == null) return \"\";\n var res = LZString._compress(input, 6, function(a){return keyStrBase64.charAt(a);});\n switch (res.length % 4) { // To produce valid Base64\n default: // When could this happen ?\n case 0 : return res;\n case 1 : return res+\"===\";\n case 2 : return res+\"==\";\n case 3 : return res+\"=\";\n }\n },\n\n decompressFromBase64 : function (input) {\n if (input == null) return \"\";\n if (input == \"\") return null;\n return LZString._decompress(input.length, 32, function(index) { return getBaseValue(keyStrBase64, input.charAt(index)); });\n },\n\n compressToUTF16 : function (input) {\n if (input == null) return \"\";\n return LZString._compress(input, 15, function(a){return f(a+32);}) + \" \";\n },\n\n decompressFromUTF16: function (compressed) {\n if (compressed == null) return \"\";\n if (compressed == \"\") return null;\n return LZString._decompress(compressed.length, 16384, function(index) { return compressed.charCodeAt(index) - 32; });\n },\n\n //compress into uint8array (UCS-2 big endian format)\n compressToUint8Array: function (uncompressed) {\n var compressed = LZString.compress(uncompressed);\n var buf=new Uint8Array(compressed.length*2); // 2 bytes per character\n\n for (var i=0, TotalLen=compressed.length; i<TotalLen; i++) {\n var current_value = compressed.charCodeAt(i);\n buf[i*2] = current_value >>> 8;\n buf[i*2+1] = current_value % 256;\n }\n return buf;\n },\n\n //decompress from uint8array (UCS-2 big endian format)\n decompressFromUint8Array:function (compressed) {\n if (compressed===null || compressed===undefined){\n return LZString.decompress(compressed);\n } else {\n var buf=new Array(compressed.length/2); // 2 bytes per character\n for (var i=0, TotalLen=buf.length; i<TotalLen; i++) {\n buf[i]=compressed[i*2]*256+compressed[i*2+1];\n }\n\n var result = [];\n buf.forEach(function (c) {\n result.push(f(c));\n });\n return LZString.decompress(result.join(''));\n\n }\n\n },\n\n\n //compress into a string that is already URI encoded\n compressToEncodedURIComponent: function (input) {\n if (input == null) return \"\";\n return LZString._compress(input, 6, function(a){return keyStrUriSafe.charAt(a);});\n },\n\n //decompress from an output of compressToEncodedURIComponent\n decompressFromEncodedURIComponent:function (input) {\n if (input == null) return \"\";\n if (input == \"\") return null;\n input = input.replace(/ /g, \"+\");\n return LZString._decompress(input.length, 32, function(index) { return getBaseValue(keyStrUriSafe, input.charAt(index)); });\n },\n\n compress: function (uncompressed) {\n return LZString._compress(uncompressed, 16, function(a){return f(a);});\n },\n _compress: function (uncompressed, bitsPerChar, getCharFromInt) {\n if (uncompressed == null) return \"\";\n var i, value,\n context_dictionary= {},\n context_dictionaryToCreate= {},\n context_c=\"\",\n context_wc=\"\",\n context_w=\"\",\n context_enlargeIn= 2, // Compensate for the first entry which should not count\n context_dictSize= 3,\n context_numBits= 2,\n context_data=[],\n context_data_val=0,\n context_data_position=0,\n ii;\n\n for (ii = 0; ii < uncompressed.length; ii += 1) {\n context_c = uncompressed.charAt(ii);\n if (!Object.prototype.hasOwnProperty.call(context_dictionary,context_c)) {\n context_dictionary[context_c] = context_dictSize++;\n context_dictionaryToCreate[context_c] = true;\n }\n\n context_wc = context_w + context_c;\n if (Object.prototype.hasOwnProperty.call(context_dictionary,context_wc)) {\n context_w = context_wc;\n } else {\n if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate,context_w)) {\n if (context_w.charCodeAt(0)<256) {\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<8 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n } else {\n value = 1;\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | value;\n if (context_data_position ==bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = 0;\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<16 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n delete context_dictionaryToCreate[context_w];\n } else {\n value = context_dictionary[context_w];\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n\n\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n // Add wc to the dictionary.\n context_dictionary[context_wc] = context_dictSize++;\n context_w = String(context_c);\n }\n }\n\n // Output the code for w.\n if (context_w !== \"\") {\n if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate,context_w)) {\n if (context_w.charCodeAt(0)<256) {\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<8 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n } else {\n value = 1;\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | value;\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = 0;\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<16 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n delete context_dictionaryToCreate[context_w];\n } else {\n value = context_dictionary[context_w];\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n\n\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n }\n\n // Mark the end of the stream\n value = 2;\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n\n // Flush the last char\n while (true) {\n context_data_val = (context_data_val << 1);\n if (context_data_position == bitsPerChar-1) {\n context_data.push(getCharFromInt(context_data_val));\n break;\n }\n else context_data_position++;\n }\n return context_data.join('');\n },\n\n decompress: function (compressed) {\n if (compressed == null) return \"\";\n if (compressed == \"\") return null;\n return LZString._decompress(compressed.length, 32768, function(index) { return compressed.charCodeAt(index); });\n },\n\n _decompress: function (length, resetValue, getNextValue) {\n var dictionary = [],\n next,\n enlargeIn = 4,\n dictSize = 4,\n numBits = 3,\n entry = \"\",\n result = [],\n i,\n w,\n bits, resb, maxpower, power,\n c,\n data = {val:getNextValue(0), position:resetValue, index:1};\n\n for (i = 0; i < 3; i += 1) {\n dictionary[i] = i;\n }\n\n bits = 0;\n maxpower = Math.pow(2,2);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n switch (next = bits) {\n case 0:\n bits = 0;\n maxpower = Math.pow(2,8);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n c = f(bits);\n break;\n case 1:\n bits = 0;\n maxpower = Math.pow(2,16);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n c = f(bits);\n break;\n case 2:\n return \"\";\n }\n dictionary[3] = c;\n w = c;\n result.push(c);\n while (true) {\n if (data.index > length) {\n return \"\";\n }\n\n bits = 0;\n maxpower = Math.pow(2,numBits);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n switch (c = bits) {\n case 0:\n bits = 0;\n maxpower = Math.pow(2,8);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n dictionary[dictSize++] = f(bits);\n c = dictSize-1;\n enlargeIn--;\n break;\n case 1:\n bits = 0;\n maxpower = Math.pow(2,16);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n dictionary[dictSize++] = f(bits);\n c = dictSize-1;\n enlargeIn--;\n break;\n case 2:\n return result.join('');\n }\n\n if (enlargeIn == 0) {\n enlargeIn = Math.pow(2, numBits);\n numBits++;\n }\n\n if (dictionary[c]) {\n entry = dictionary[c];\n } else {\n if (c === dictSize) {\n entry = w + w.charAt(0);\n } else {\n return null;\n }\n }\n result.push(entry);\n\n // Add w+entry[0] to the dictionary.\n dictionary[dictSize++] = w + entry.charAt(0);\n enlargeIn--;\n\n w = entry;\n\n if (enlargeIn == 0) {\n enlargeIn = Math.pow(2, numBits);\n numBits++;\n }\n\n }\n }\n};\n return LZString;\n})();\n\nif (typeof define === 'function' && define.amd) {\n define(function () { return LZString; });\n} else if( typeof module !== 'undefined' && module != null ) {\n module.exports = LZString\n} else if( typeof angular !== 'undefined' && angular != null ) {\n angular.module('LZString', [])\n .factory('LZString', function () {\n return LZString;\n });\n}\n","export default \"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='none'%20viewBox='0%200%2084%2062'%3e%3crect%20width='64'%20height='48'%20x='18'%20y='2'%20fill='%23fff'%20stroke='%23999'%20stroke-width='3'%20rx='4'/%3e%3crect%20width='32'%20height='48'%20x='2'%20y='12'%20fill='%23fff'%20stroke='%23999'%20stroke-width='3'%20rx='4'/%3e%3cpath%20fill='%234169E1'%20d='M14%2052a4%204%200%201%201-8%200%204%204%200%200%201%208%200Zm64-42a4%204%200%201%201-8%200%204%204%200%200%201%208%200Z'/%3e%3c/svg%3e\"","export default \"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='none'%20viewBox='0%200%2082%2062'%3e%3crect%20width='78'%20height='58'%20x='2'%20y='2'%20fill='%23999'%20fill-opacity='.3'%20stroke='%23999'%20stroke-width='3'%20rx='4'/%3e%3crect%20width='18'%20height='46'%20x='8'%20y='8'%20fill='%23fff'%20stroke='%23999'%20stroke-width='2'%20rx='1'/%3e%3crect%20width='18'%20height='46'%20x='32'%20y='8'%20fill='%23fff'%20stroke='%23999'%20stroke-width='2'%20rx='1'/%3e%3crect%20width='18'%20height='46'%20x='56'%20y='8'%20fill='%23fff'%20stroke='%23999'%20stroke-width='2'%20rx='1'/%3e%3c/svg%3e\"","export default \"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='none'%20viewBox='0%200%2084%2062'%3e%3crect%20width='64'%20height='48'%20x='18'%20y='2'%20fill='%23fff'%20stroke='%23999'%20stroke-width='3'%20rx='4'/%3e%3cpath%20fill='%23999'%20fill-opacity='.3'%20d='M19%203h62v10H19z'/%3e%3cpath%20stroke='%234169E1'%20stroke-width='2'%20d='M43%208a2%202%200%201%201-4%200%202%202%200%200%201%204%200Z'/%3e%3cpath%20stroke='%23999'%20stroke-width='2'%20d='M52%208a2%202%200%201%201-4%200%202%202%200%200%201%204%200Zm9%200a2%202%200%201%201-4%200%202%202%200%200%201%204%200Z'/%3e%3crect%20width='32'%20height='48'%20x='2'%20y='12'%20fill='%23fff'%20stroke='%23999'%20stroke-width='3'%20rx='4'/%3e%3cpath%20fill='%23999'%20fill-opacity='.3'%20d='M3%2049h30v10H3z'/%3e%3cpath%20stroke='%234169E1'%20stroke-width='2'%20d='M11%2054a2%202%200%201%201-4%200%202%202%200%200%201%204%200Z'/%3e%3cpath%20stroke='%23999'%20stroke-width='2'%20d='M20%2054a2%202%200%201%201-4%200%202%202%200%200%201%204%200Zm9%200a2%202%200%201%201-4%200%202%202%200%200%201%204%200Z'/%3e%3c/svg%3e\"","import { api } from '../utils/api';\nimport store from '../utils/store';\n\nconst LIMIT = 200;\nconst MAX_FETCH = 10;\n\nexport async function fetchFollowedTags() {\n const { masto } = api();\n const iterator = masto.v1.followedTags.list({\n limit: LIMIT,\n });\n const tags = [];\n let fetchCount = 0;\n do {\n const { value, done } = await iterator.next();\n if (done || value?.length === 0) break;\n tags.push(...value);\n fetchCount++;\n } while (fetchCount < MAX_FETCH);\n tags.sort((a, b) => a.name.localeCompare(b.name));\n console.log(tags);\n\n if (tags.length) {\n setTimeout(() => {\n // Save to local storage, with saved timestamp\n store.account.set('followedTags', {\n tags,\n updatedAt: Date.now(),\n });\n }, 1);\n }\n\n return tags;\n}\n\nconst MAX_AGE = 24 * 60 * 60 * 1000; // 1 day\nexport async function getFollowedTags() {\n try {\n const { tags, updatedAt } = store.account.get('followedTags') || {};\n if (!tags?.length) return await fetchFollowedTags();\n if (Date.now() - updatedAt > MAX_AGE) {\n // Stale-while-revalidate\n fetchFollowedTags();\n return tags;\n }\n return tags;\n } catch (e) {\n return [];\n }\n}\n\nconst fauxDiv = document.createElement('div');\nexport const extractTagsFromStatus = (content) => {\n if (!content) return [];\n if (content.indexOf('#') === -1) return [];\n fauxDiv.innerHTML = content;\n const hashtagLinks = fauxDiv.querySelectorAll('a.hashtag');\n if (!hashtagLinks.length) return [];\n return Array.from(hashtagLinks).map((a) =>\n a.innerText.trim().replace(/^[^#]*#+/, ''),\n );\n};\n","import { useEffect, useState } from 'preact/hooks';\n\nfunction AsyncText({ children }) {\n if (typeof children === 'string') return children;\n const [text, setText] = useState('');\n useEffect(() => {\n Promise.resolve(children).then(setText);\n }, [children]);\n return text;\n}\n\nexport default AsyncText;\n","import './shortcuts-settings.css';\n\nimport { useAutoAnimate } from '@formkit/auto-animate/preact';\nimport { msg, Plural, t, Trans } from '@lingui/macro';\nimport { useLingui } from '@lingui/react';\nimport {\n compressToEncodedURIComponent,\n decompressFromEncodedURIComponent,\n} from 'lz-string';\nimport { useEffect, useMemo, useRef, useState } from 'preact/hooks';\nimport { useSnapshot } from 'valtio';\n\nimport floatingButtonUrl from '../assets/floating-button.svg';\nimport multiColumnUrl from '../assets/multi-column.svg';\nimport tabMenuBarUrl from '../assets/tab-menu-bar.svg';\n\nimport { api } from '../utils/api';\nimport { fetchFollowedTags } from '../utils/followed-tags';\nimport { getLists, getListTitle } from '../utils/lists';\nimport pmem from '../utils/pmem';\nimport showToast from '../utils/show-toast';\nimport states from '../utils/states';\nimport store from '../utils/store';\nimport { getCurrentAccountID } from '../utils/store-utils';\n\nimport AsyncText from './AsyncText';\nimport Icon from './icon';\nimport MenuConfirm from './menu-confirm';\nimport Modal from './modal';\n\nexport const SHORTCUTS_LIMIT = 9;\n\nconst TYPES = [\n 'following',\n 'mentions',\n 'notifications',\n 'list',\n 'public',\n 'trending',\n 'search',\n 'hashtag',\n 'bookmarks',\n 'favourites',\n // NOTE: Hide for now\n // 'account-statuses', // Need @acct search first\n];\nconst TYPE_TEXT = {\n following: msg`Home / Following`,\n notifications: msg`Notifications`,\n list: msg`Lists`,\n public: msg`Public (Local / Federated)`,\n search: msg`Search`,\n 'account-statuses': msg`Account`,\n bookmarks: msg`Bookmarks`,\n favourites: msg`Likes`,\n hashtag: msg`Hashtag`,\n trending: msg`Trending`,\n mentions: msg`Mentions`,\n};\nconst TYPE_PARAMS = {\n list: [\n {\n text: msg`List ID`,\n name: 'id',\n notRequired: true,\n },\n ],\n public: [\n {\n text: msg`Local only`,\n name: 'local',\n type: 'checkbox',\n },\n {\n text: msg`Instance`,\n name: 'instance',\n type: 'text',\n placeholder: msg`Optional, e.g. mastodon.social`,\n notRequired: true,\n },\n ],\n trending: [\n {\n text: msg`Instance`,\n name: 'instance',\n type: 'text',\n placeholder: msg`Optional, e.g. mastodon.social`,\n notRequired: true,\n },\n ],\n search: [\n {\n text: msg`Search term`,\n name: 'query',\n type: 'text',\n placeholder: msg`Optional, unless for multi-column mode`,\n notRequired: true,\n },\n ],\n 'account-statuses': [\n {\n text: '@',\n name: 'id',\n type: 'text',\n placeholder: 'cheeaun@mastodon.social',\n },\n ],\n hashtag: [\n {\n text: '#',\n name: 'hashtag',\n type: 'text',\n placeholder: msg`e.g. PixelArt (Max 5, space-separated)`,\n pattern: '[^#]+',\n },\n {\n text: msg`Media only`,\n name: 'media',\n type: 'checkbox',\n },\n {\n text: msg`Instance`,\n name: 'instance',\n type: 'text',\n placeholder: msg`Optional, e.g. mastodon.social`,\n notRequired: true,\n },\n ],\n};\nconst fetchAccountTitle = pmem(async ({ id }) => {\n const account = await api().masto.v1.accounts.$select(id).fetch();\n return account.username || account.acct || account.displayName;\n});\nexport const SHORTCUTS_META = {\n following: {\n id: 'home',\n title: (_, index) =>\n index === 0\n ? t`Home`\n : t({ id: 'following.title', message: 'Following' }),\n path: '/',\n icon: 'home',\n },\n mentions: {\n id: 'mentions',\n title: msg`Mentions`,\n path: '/mentions',\n icon: 'at',\n },\n notifications: {\n id: 'notifications',\n title: msg`Notifications`,\n path: '/notifications',\n icon: 'notification',\n },\n list: {\n id: ({ id }) => (id ? 'list' : 'lists'),\n title: ({ id }) => (id ? getListTitle(id) : t`Lists`),\n path: ({ id }) => (id ? `/l/${id}` : '/l'),\n icon: 'list',\n excludeViewMode: ({ id }) => (!id ? ['multi-column'] : []),\n },\n public: {\n id: 'public',\n title: ({ local }) => (local ? t`Local` : t`Federated`),\n subtitle: ({ instance }) => instance || api().instance,\n path: ({ local, instance }) => `/${instance}/p${local ? '/l' : ''}`,\n icon: ({ local }) => (local ? 'building' : 'earth'),\n },\n trending: {\n id: 'trending',\n title: msg`Trending`,\n subtitle: ({ instance }) => instance || api().instance,\n path: ({ instance }) => `/${instance}/trending`,\n icon: 'chart',\n },\n search: {\n id: 'search',\n title: ({ query }) => (query ? `“${query}”` : t`Search`),\n path: ({ query }) =>\n query\n ? `/search?q=${encodeURIComponent(query)}&type=statuses`\n : '/search',\n icon: 'search',\n excludeViewMode: ({ query }) => (!query ? ['multi-column'] : []),\n },\n 'account-statuses': {\n id: 'account-statuses',\n title: fetchAccountTitle,\n path: ({ id }) => `/a/${id}`,\n icon: 'user',\n },\n bookmarks: {\n id: 'bookmarks',\n title: msg`Bookmarks`,\n path: '/b',\n icon: 'bookmark',\n },\n favourites: {\n id: 'favourites',\n title: msg`Likes`,\n path: '/f',\n icon: 'heart',\n },\n hashtag: {\n id: 'hashtag',\n title: ({ hashtag }) => hashtag,\n subtitle: ({ instance }) => instance || api().instance,\n path: ({ hashtag, instance, media }) =>\n `${instance ? `/${instance}` : ''}/t/${hashtag.split(/\\s+/).join('+')}${\n media ? '?media=1' : ''\n }`,\n icon: 'hashtag',\n },\n};\n\nfunction ShortcutsSettings({ onClose }) {\n const { _ } = useLingui();\n const snapStates = useSnapshot(states);\n const { shortcuts } = snapStates;\n const [showForm, setShowForm] = useState(false);\n const [showImportExport, setShowImportExport] = useState(false);\n\n const [shortcutsListParent] = useAutoAnimate();\n\n return (\n <div id=\"shortcuts-settings-container\" class=\"sheet\" tabindex=\"-1\">\n {!!onClose && (\n <button type=\"button\" class=\"sheet-close\" onClick={onClose}>\n <Icon icon=\"x\" alt={t`Close`} />\n </button>\n )}\n <header>\n <h2>\n <Icon icon=\"shortcut\" /> <Trans>Shortcuts</Trans>{' '}\n <sup\n style={{\n fontSize: 12,\n opacity: 0.5,\n textTransform: 'uppercase',\n }}\n >\n <Trans>beta</Trans>\n </sup>\n </h2>\n </header>\n <main>\n <p>\n <Trans>Specify a list of shortcuts that'll appear as:</Trans>\n </p>\n <div class=\"shortcuts-view-mode\">\n {[\n {\n value: 'float-button',\n label: t`Floating button`,\n imgURL: floatingButtonUrl,\n },\n {\n value: 'tab-menu-bar',\n label: t`Tab/Menu bar`,\n imgURL: tabMenuBarUrl,\n },\n {\n value: 'multi-column',\n label: t`Multi-column`,\n imgURL: multiColumnUrl,\n },\n ].map(({ value, label, imgURL }) => {\n const checked =\n snapStates.settings.shortcutsViewMode === value ||\n (value === 'float-button' &&\n !snapStates.settings.shortcutsViewMode);\n return (\n <label key={value} class={checked ? 'checked' : ''}>\n <input\n type=\"radio\"\n name=\"shortcuts-view-mode\"\n value={value}\n checked={checked}\n onChange={(e) => {\n states.settings.shortcutsViewMode = e.target.value;\n }}\n />{' '}\n <img src={imgURL} alt=\"\" width=\"80\" height=\"58\" />{' '}\n <span>{label}</span>\n </label>\n );\n })}\n </div>\n {shortcuts.length > 0 ? (\n <>\n <ol class=\"shortcuts-list\" ref={shortcutsListParent}>\n {shortcuts.filter(Boolean).map((shortcut, i) => {\n // const key = i + Object.values(shortcut);\n const key = Object.values(shortcut).join('-');\n const { type } = shortcut;\n if (!SHORTCUTS_META[type]) return null;\n let { icon, title, subtitle, excludeViewMode } =\n SHORTCUTS_META[type];\n if (typeof title === 'function') {\n title = title(shortcut, i);\n } else {\n title = _(title);\n }\n if (typeof subtitle === 'function') {\n subtitle = subtitle(shortcut, i);\n } else {\n subtitle = _(subtitle);\n }\n if (typeof icon === 'function') {\n icon = icon(shortcut, i);\n }\n if (typeof excludeViewMode === 'function') {\n excludeViewMode = excludeViewMode(shortcut, i);\n }\n const excludedViewMode = excludeViewMode?.includes(\n snapStates.settings.shortcutsViewMode,\n );\n return (\n <li key={key}>\n <Icon icon={icon} />\n <span class=\"shortcut-text\">\n <AsyncText>{title}</AsyncText>\n {subtitle && (\n <>\n {' '}\n <small class=\"ib insignificant\">{subtitle}</small>\n </>\n )}\n {excludedViewMode && (\n <span class=\"tag\">\n <Trans>Not available in current view mode</Trans>\n </span>\n )}\n </span>\n <span class=\"shortcut-actions\">\n <button\n type=\"button\"\n class=\"plain small\"\n disabled={i === 0}\n onClick={() => {\n const shortcutsArr = Array.from(states.shortcuts);\n if (i > 0) {\n const temp = states.shortcuts[i - 1];\n shortcutsArr[i - 1] = shortcut;\n shortcutsArr[i] = temp;\n states.shortcuts = shortcutsArr;\n }\n }}\n >\n <Icon icon=\"arrow-up\" alt={t`Move up`} />\n </button>\n <button\n type=\"button\"\n class=\"plain small\"\n disabled={i === shortcuts.length - 1}\n onClick={() => {\n const shortcutsArr = Array.from(states.shortcuts);\n if (i < states.shortcuts.length - 1) {\n const temp = states.shortcuts[i + 1];\n shortcutsArr[i + 1] = shortcut;\n shortcutsArr[i] = temp;\n states.shortcuts = shortcutsArr;\n }\n }}\n >\n <Icon icon=\"arrow-down\" alt={t`Move down`} />\n </button>\n <button\n type=\"button\"\n class=\"plain small\"\n onClick={() => {\n setShowForm({\n shortcut,\n shortcutIndex: i,\n });\n }}\n >\n <Icon icon=\"pencil\" alt={t`Edit`} />\n </button>\n {/* <button\n type=\"button\"\n class=\"plain small\"\n onClick={() => {\n states.shortcuts.splice(i, 1);\n }}\n >\n <Icon icon=\"x\" alt=\"Remove\" />\n </button> */}\n </span>\n </li>\n );\n })}\n </ol>\n {shortcuts.length === 1 &&\n snapStates.settings.shortcutsViewMode !== 'float-button' && (\n <div class=\"ui-state insignificant\">\n <Icon icon=\"info\" />{' '}\n <small>\n <Trans>\n Add more than one shortcut/column to make this work.\n </Trans>\n </small>\n </div>\n )}\n </>\n ) : (\n <div class=\"ui-state insignificant\">\n <p>\n {snapStates.settings.shortcutsViewMode === 'multi-column'\n ? t`No columns yet. Tap on the Add column button.`\n : t`No shortcuts yet. Tap on the Add shortcut button.`}\n </p>\n <p>\n <Trans>\n Not sure what to add?\n <br />\n Try adding{' '}\n <a\n href=\"#\"\n onClick={(e) => {\n e.preventDefault();\n states.shortcuts = [\n {\n type: 'following',\n },\n {\n type: 'notifications',\n },\n ];\n }}\n >\n Home / Following and Notifications\n </a>{' '}\n first.\n </Trans>\n </p>\n </div>\n )}\n <p class=\"insignificant\">\n {shortcuts.length >= SHORTCUTS_LIMIT &&\n (snapStates.settings.shortcutsViewMode === 'multi-column'\n ? t`Max ${SHORTCUTS_LIMIT} columns`\n : t`Max ${SHORTCUTS_LIMIT} shortcuts`)}\n </p>\n <p\n style={{\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n }}\n >\n <button\n type=\"button\"\n class=\"light\"\n onClick={() => setShowImportExport(true)}\n >\n <Trans>Import/export</Trans>\n </button>\n <button\n type=\"button\"\n disabled={shortcuts.length >= SHORTCUTS_LIMIT}\n onClick={() => setShowForm(true)}\n >\n <Icon icon=\"plus\" />{' '}\n <span>\n {snapStates.settings.shortcutsViewMode === 'multi-column'\n ? t`Add column…`\n : t`Add shortcut…`}\n </span>\n </button>\n </p>\n </main>\n {showForm && (\n <Modal\n onClick={(e) => {\n if (e.target === e.currentTarget) {\n setShowForm(false);\n }\n }}\n >\n <ShortcutForm\n shortcut={showForm.shortcut}\n shortcutIndex={showForm.shortcutIndex}\n onSubmit={({ result, mode }) => {\n console.log('onSubmit', result);\n if (mode === 'edit') {\n states.shortcuts[showForm.shortcutIndex] = result;\n } else {\n states.shortcuts.push(result);\n }\n }}\n onClose={() => setShowForm(false)}\n />\n </Modal>\n )}\n {showImportExport && (\n <Modal\n onClick={(e) => {\n if (e.target === e.currentTarget) {\n setShowImportExport(false);\n }\n }}\n >\n <ImportExport\n shortcuts={shortcuts}\n onClose={() => setShowImportExport(false)}\n />\n </Modal>\n )}\n </div>\n );\n}\n\nconst FORM_NOTES = {\n list: msg`Specific list is optional. For multi-column mode, list is required, else the column will not be shown.`,\n search: msg`For multi-column mode, search term is required, else the column will not be shown.`,\n hashtag: msg`Multiple hashtags are supported. Space-separated.`,\n};\n\nfunction ShortcutForm({\n onSubmit,\n disabled,\n shortcut,\n shortcutIndex,\n onClose,\n}) {\n const { _ } = useLingui();\n console.log('shortcut', shortcut);\n const editMode = !!shortcut;\n const [currentType, setCurrentType] = useState(shortcut?.type || null);\n\n const [uiState, setUIState] = useState('default');\n const [lists, setLists] = useState([]);\n const [followedHashtags, setFollowedHashtags] = useState([]);\n useEffect(() => {\n (async () => {\n if (currentType !== 'list') return;\n try {\n setUIState('loading');\n const lists = await getLists();\n setLists(lists);\n setUIState('default');\n } catch (e) {\n console.error(e);\n setUIState('error');\n }\n })();\n\n (async () => {\n if (currentType !== 'hashtag') return;\n try {\n const tags = await fetchFollowedTags();\n setFollowedHashtags(tags);\n } catch (e) {\n console.error(e);\n }\n })();\n }, [currentType]);\n\n const formRef = useRef();\n useEffect(() => {\n if (editMode && currentType && TYPE_PARAMS[currentType]) {\n // Populate form\n const form = formRef.current;\n TYPE_PARAMS[currentType].forEach(({ name, type }) => {\n const input = form.querySelector(`[name=\"${name}\"]`);\n if (input && shortcut[name]) {\n if (type === 'checkbox') {\n input.checked = shortcut[name] === 'on' ? true : false;\n } else {\n input.value = shortcut[name];\n }\n }\n });\n }\n }, [editMode, currentType]);\n\n return (\n <div id=\"shortcut-settings-form\" class=\"sheet\">\n {!!onClose && (\n <button type=\"button\" class=\"sheet-close\" onClick={onClose}>\n <Icon icon=\"x\" alt={t`Close`} />\n </button>\n )}\n <header>\n <h2>{editMode ? t`Edit shortcut` : t`Add shortcut`}</h2>\n </header>\n <main tabindex=\"-1\">\n <form\n ref={formRef}\n onSubmit={(e) => {\n // Construct a nice object from form\n e.preventDefault();\n const data = new FormData(e.target);\n const result = {};\n data.forEach((value, key) => {\n result[key] = value?.trim();\n if (key === 'instance') {\n // Remove protocol and trailing slash\n result[key] = result[key]\n .replace(/^https?:\\/\\//, '')\n .replace(/\\/+$/, '');\n // Remove @acct@ or acct@ from instance URL\n result[key] = result[key].replace(/^@?[^@]+@/, '');\n }\n });\n console.log('result', result);\n if (!result.type) return;\n onSubmit({\n result,\n mode: editMode ? 'edit' : 'add',\n });\n // Reset\n e.target.reset();\n setCurrentType(null);\n onClose?.();\n }}\n >\n <p>\n <label>\n <span>\n <Trans>Timeline</Trans>\n </span>\n <select\n required\n disabled={disabled}\n onChange={(e) => {\n setCurrentType(e.target.value);\n }}\n defaultValue={editMode ? shortcut.type : undefined}\n name=\"type\"\n dir=\"auto\"\n >\n <option></option>\n {TYPES.map((type) => (\n <option value={type}>{_(TYPE_TEXT[type])}</option>\n ))}\n </select>\n </label>\n </p>\n {TYPE_PARAMS[currentType]?.map?.(\n ({ text, name, type, placeholder, pattern, notRequired }) => {\n if (currentType === 'list') {\n return (\n <p>\n <label>\n <span>\n <Trans>List</Trans>\n </span>\n <select\n name=\"id\"\n required={!notRequired}\n disabled={disabled || uiState === 'loading'}\n defaultValue={editMode ? shortcut.id : undefined}\n dir=\"auto\"\n >\n <option value=\"\"></option>\n {lists.map((list) => (\n <option value={list.id}>{list.title}</option>\n ))}\n </select>\n </label>\n </p>\n );\n }\n\n return (\n <p>\n <label>\n <span>{_(text)}</span>{' '}\n <input\n type={type}\n switch={type === 'checkbox' || undefined}\n name={name}\n placeholder={_(placeholder)}\n required={type === 'text' && !notRequired}\n disabled={disabled}\n list={\n currentType === 'hashtag'\n ? 'followed-hashtags-datalist'\n : null\n }\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellCheck={false}\n pattern={pattern}\n dir=\"auto\"\n />\n {currentType === 'hashtag' &&\n followedHashtags.length > 0 && (\n <datalist id=\"followed-hashtags-datalist\">\n {followedHashtags.map((tag) => (\n <option value={tag.name} />\n ))}\n </datalist>\n )}\n </label>\n </p>\n );\n },\n )}\n {!!FORM_NOTES[currentType] && (\n <p class=\"form-note insignificant\">\n <Icon icon=\"info\" />\n {_(FORM_NOTES[currentType])}\n </p>\n )}\n <footer>\n <button\n type=\"submit\"\n class=\"block\"\n disabled={disabled || uiState === 'loading'}\n >\n {editMode ? t`Save` : t`Add`}\n </button>\n {editMode && (\n <button\n type=\"button\"\n class=\"light danger\"\n onClick={() => {\n states.shortcuts.splice(shortcutIndex, 1);\n onClose?.();\n }}\n >\n <Trans>Remove</Trans>\n </button>\n )}\n </footer>\n </form>\n </main>\n </div>\n );\n}\n\nfunction ImportExport({ shortcuts, onClose }) {\n const { _ } = useLingui();\n const { masto } = api();\n const shortcutsStr = useMemo(() => {\n if (!shortcuts) return '';\n if (!shortcuts.filter(Boolean).length) return '';\n return compressToEncodedURIComponent(\n JSON.stringify(shortcuts.filter(Boolean)),\n );\n }, [shortcuts]);\n const [importShortcutStr, setImportShortcutStr] = useState('');\n const [importUIState, setImportUIState] = useState('default');\n const parsedImportShortcutStr = useMemo(() => {\n if (!importShortcutStr) {\n setImportUIState('default');\n return null;\n }\n try {\n const parsed = JSON.parse(\n decompressFromEncodedURIComponent(importShortcutStr),\n );\n // Very basic validation, I know\n if (!Array.isArray(parsed)) throw new Error('Not an array');\n setImportUIState('default');\n return parsed;\n } catch (err) {\n // Fallback to JSON string parsing\n // There's a chance that someone might want to import a JSON string instead of the compressed version\n try {\n const parsed = JSON.parse(importShortcutStr);\n if (!Array.isArray(parsed)) throw new Error('Not an array');\n setImportUIState('default');\n return parsed;\n } catch (err) {\n setImportUIState('error');\n return null;\n }\n }\n }, [importShortcutStr]);\n const hasCurrentSettings = states.shortcuts.length > 0;\n\n const shortcutsImportFieldRef = useRef();\n\n return (\n <div id=\"import-export-container\" class=\"sheet\">\n {!!onClose && (\n <button type=\"button\" class=\"sheet-close\" onClick={onClose}>\n <Icon icon=\"x\" alt={t`Close`} />\n </button>\n )}\n <header>\n <h2>\n <Trans>\n Import/Export <small class=\"ib insignificant\">Shortcuts</small>\n </Trans>\n </h2>\n </header>\n <main tabindex=\"-1\">\n <section>\n <h3>\n <Icon icon=\"arrow-down-circle\" size=\"l\" class=\"insignificant\" />{' '}\n <span>\n <Trans>Import</Trans>\n </span>\n </h3>\n <p class=\"field-button\">\n <input\n ref={shortcutsImportFieldRef}\n type=\"text\"\n name=\"import\"\n placeholder={t`Paste shortcuts here`}\n class=\"block\"\n onInput={(e) => {\n setImportShortcutStr(e.target.value);\n }}\n dir=\"auto\"\n />\n {states.settings.shortcutSettingsCloudImportExport && (\n <button\n type=\"button\"\n class=\"plain2 small\"\n disabled={importUIState === 'cloud-downloading'}\n onClick={async () => {\n setImportUIState('cloud-downloading');\n const currentAccount = getCurrentAccountID();\n showToast(\n t`Downloading saved shortcuts from instance server…`,\n );\n try {\n const relationships =\n await masto.v1.accounts.relationships.fetch({\n id: [currentAccount],\n });\n const relationship = relationships[0];\n if (relationship) {\n const { note = '' } = relationship;\n if (\n /<phanpy-shortcuts-settings>(.*)<\\/phanpy-shortcuts-settings>/.test(\n note,\n )\n ) {\n const settings = note.match(\n /<phanpy-shortcuts-settings>(.*)<\\/phanpy-shortcuts-settings>/,\n )[1];\n const { v, dt, data } = JSON.parse(settings);\n shortcutsImportFieldRef.current.value = data;\n shortcutsImportFieldRef.current.dispatchEvent(\n new Event('input'),\n );\n }\n }\n setImportUIState('default');\n } catch (e) {\n console.error(e);\n setImportUIState('error');\n showToast(t`Unable to download shortcuts`);\n }\n }}\n title={t`Download shortcuts from instance server`}\n >\n <Icon icon=\"cloud\" />\n <Icon icon=\"arrow-down\" />\n </button>\n )}\n </p>\n {!!parsedImportShortcutStr &&\n Array.isArray(parsedImportShortcutStr) && (\n <>\n <p>\n <b>{parsedImportShortcutStr.length}</b> shortcut\n {parsedImportShortcutStr.length > 1 ? 's' : ''}{' '}\n <small class=\"insignificant\">\n ({importShortcutStr.length} characters)\n </small>\n </p>\n <ol class=\"import-settings-list\">\n {parsedImportShortcutStr.map((shortcut) => (\n <li>\n <span\n style={{\n opacity: shortcuts.some((s) =>\n // Compare all properties\n Object.keys(s).every(\n (key) => s[key] === shortcut[key],\n ),\n )\n ? 1\n : 0,\n }}\n >\n *\n </span>\n <span>\n {_(TYPE_TEXT[shortcut.type])}\n {shortcut.type === 'list' && ' ⚠️'}{' '}\n {TYPE_PARAMS[shortcut.type]?.map?.(\n ({ text, name, type }) =>\n shortcut[name] ? (\n <>\n <span class=\"tag collapsed insignificant\">\n {text}:{' '}\n {type === 'checkbox'\n ? shortcut[name] === 'on'\n ? '✅'\n : '❌'\n : shortcut[name]}\n </span>{' '}\n </>\n ) : null,\n )}\n </span>\n </li>\n ))}\n </ol>\n <p>\n <small>\n <Trans>* Exists in current shortcuts</Trans>\n </small>\n <br />\n <small>\n ⚠️{' '}\n <Trans>\n List may not work if it's from a different account.\n </Trans>\n </small>\n </p>\n </>\n )}\n {importUIState === 'error' && (\n <p class=\"error\">\n <small>\n ⚠️ <Trans>Invalid settings format</Trans>\n </small>\n </p>\n )}\n <p>\n {hasCurrentSettings && (\n <>\n <MenuConfirm\n confirmLabel={t`Append to current shortcuts?`}\n menuFooter={\n <div class=\"footer\">\n <Trans>\n Only shortcuts that don’t exist in current shortcuts\n will be appended.\n </Trans>\n </div>\n }\n onClick={() => {\n // states.shortcuts = [\n // ...states.shortcuts,\n // ...parsedImportShortcutStr,\n // ];\n // Append non-unique shortcuts only\n const nonUniqueShortcuts = parsedImportShortcutStr.filter(\n (shortcut) =>\n !states.shortcuts.some((s) =>\n // Compare all properties\n Object.keys(s).every(\n (key) => s[key] === shortcut[key],\n ),\n ),\n );\n if (!nonUniqueShortcuts.length) {\n showToast(t`No new shortcuts to import`);\n return;\n }\n let newShortcuts = [\n ...states.shortcuts,\n ...nonUniqueShortcuts,\n ];\n const exceededLimit = newShortcuts.length > SHORTCUTS_LIMIT;\n if (exceededLimit) {\n // If exceeded, trim it\n newShortcuts = newShortcuts.slice(0, SHORTCUTS_LIMIT);\n }\n states.shortcuts = newShortcuts;\n showToast(\n exceededLimit\n ? t`Shortcuts imported. Exceeded max ${SHORTCUTS_LIMIT}, so the rest are not imported.`\n : t`Shortcuts imported`,\n );\n onClose?.();\n }}\n >\n <button\n type=\"button\"\n class=\"plain2\"\n disabled={!parsedImportShortcutStr}\n >\n <Trans>Import & append…</Trans>\n </button>\n </MenuConfirm>{' '}\n </>\n )}\n <MenuConfirm\n confirmLabel={\n hasCurrentSettings\n ? t`Override current shortcuts?`\n : t`Import shortcuts?`\n }\n menuItemClassName={hasCurrentSettings ? 'danger' : undefined}\n onClick={() => {\n states.shortcuts = parsedImportShortcutStr;\n showToast(t`Shortcuts imported`);\n onClose?.();\n }}\n >\n <button\n type=\"button\"\n class=\"plain2\"\n disabled={!parsedImportShortcutStr}\n >\n {hasCurrentSettings ? t`or override…` : t`Import…`}\n </button>\n </MenuConfirm>\n </p>\n </section>\n <section>\n <h3>\n <Icon icon=\"arrow-up-circle\" size=\"l\" class=\"insignificant\" />{' '}\n <span>\n <Trans>Export</Trans>\n </span>\n </h3>\n <p>\n <input\n style={{ width: '100%' }}\n type=\"text\"\n value={shortcutsStr}\n readOnly\n onClick={(e) => {\n if (!e.target.value) return;\n e.target.select();\n // Copy url to clipboard\n try {\n navigator.clipboard.writeText(e.target.value);\n showToast(t`Shortcuts copied`);\n } catch (e) {\n console.error(e);\n showToast(t`Unable to copy shortcuts`);\n }\n }}\n dir=\"auto\"\n />\n </p>\n <p>\n <button\n type=\"button\"\n class=\"plain2\"\n disabled={!shortcutsStr}\n onClick={() => {\n try {\n navigator.clipboard.writeText(shortcutsStr);\n showToast(t`Shortcut settings copied`);\n } catch (e) {\n console.error(e);\n showToast(t`Unable to copy shortcut settings`);\n }\n }}\n >\n <Icon icon=\"clipboard\" />{' '}\n <span>\n <Trans>Copy</Trans>\n </span>\n </button>{' '}\n {navigator?.share &&\n navigator?.canShare?.({\n text: shortcutsStr,\n }) && (\n <button\n type=\"button\"\n class=\"plain2\"\n disabled={!shortcutsStr}\n onClick={() => {\n try {\n navigator.share({\n text: shortcutsStr,\n });\n } catch (e) {\n console.error(e);\n alert(t`Sharing doesn't seem to work.`);\n }\n }}\n >\n <Icon icon=\"share\" />{' '}\n <span>\n <Trans>Share</Trans>\n </span>\n </button>\n )}{' '}\n {states.settings.shortcutSettingsCloudImportExport && (\n <button\n type=\"button\"\n class=\"plain2\"\n disabled={importUIState === 'cloud-uploading'}\n onClick={async () => {\n setImportUIState('cloud-uploading');\n const currentAccount = getCurrentAccountID();\n try {\n const relationships =\n await masto.v1.accounts.relationships.fetch({\n id: [currentAccount],\n });\n const relationship = relationships[0];\n if (relationship) {\n const { note = '' } = relationship;\n // const newNote = `${note}\\n\\n\\n$<phanpy-shortcuts-settings>{shortcutsStr}</phanpy-shortcuts-settings>`;\n let newNote = '';\n const settingsJSON = JSON.stringify({\n v: '1', // version\n dt: Date.now(), // datetime stamp\n data: shortcutsStr, // shortcuts settings string\n });\n if (\n /<phanpy-shortcuts-settings>(.*)<\\/phanpy-shortcuts-settings>/.test(\n note,\n )\n ) {\n newNote = note.replace(\n /<phanpy-shortcuts-settings>(.*)<\\/phanpy-shortcuts-settings>/,\n `<phanpy-shortcuts-settings>${settingsJSON}</phanpy-shortcuts-settings>`,\n );\n } else {\n newNote = `${note}\\n\\n\\n<phanpy-shortcuts-settings>${settingsJSON}</phanpy-shortcuts-settings>`;\n }\n showToast(t`Saving shortcuts to instance server…`);\n await masto.v1.accounts\n .$select(currentAccount)\n .note.create({\n comment: newNote,\n });\n setImportUIState('default');\n showToast(t`Shortcuts saved`);\n }\n } catch (e) {\n console.error(e);\n setImportUIState('error');\n showToast(t`Unable to save shortcuts`);\n }\n }}\n title={t`Sync to instance server`}\n >\n <Icon icon=\"cloud\" />\n <Icon icon=\"arrow-up\" />\n </button>\n )}{' '}\n {shortcutsStr.length > 0 && (\n <small class=\"insignificant ib\">\n <Plural\n value={shortcutsStr.length}\n one=\"# character\"\n other=\"# characters\"\n />\n </small>\n )}\n </p>\n {!!shortcutsStr && (\n <details>\n <summary class=\"insignificant\">\n <small>\n <Trans>Raw Shortcuts JSON</Trans>\n </small>\n </summary>\n <textarea style={{ width: '100%' }} rows={10} readOnly>\n {JSON.stringify(shortcuts.filter(Boolean), null, 2)}\n </textarea>\n </details>\n )}\n </section>\n {states.settings.shortcutSettingsCloudImportExport && (\n <footer>\n <p>\n <Icon icon=\"cloud\" />{' '}\n <Trans>\n Import/export settings from/to instance server (Very\n experimental)\n </Trans>\n </p>\n </footer>\n )}\n </main>\n </div>\n );\n}\n\nexport default ShortcutsSettings;\n","import { t, Trans } from '@lingui/macro';\nimport { useEffect } from 'preact/hooks';\nimport { useLocation, useNavigate } from 'react-router-dom';\nimport { subscribe, useSnapshot } from 'valtio';\n\nimport Accounts from '../pages/accounts';\nimport Settings from '../pages/settings';\nimport focusDeck from '../utils/focus-deck';\nimport showToast from '../utils/show-toast';\nimport states from '../utils/states';\n\nimport AccountSheet from './account-sheet';\nimport ComposeSuspense, { preload } from './compose-suspense';\nimport Drafts from './drafts';\nimport EmbedModal from './embed-modal';\nimport GenericAccounts from './generic-accounts';\nimport MediaAltModal from './media-alt-modal';\nimport MediaModal from './media-modal';\nimport Modal from './modal';\nimport ReportModal from './report-modal';\nimport ShortcutsSettings from './shortcuts-settings';\n\nsubscribe(states, (changes) => {\n for (const [action, path, value, prevValue] of changes) {\n // When closing modal, focus on deck\n if (/^show/i.test(path) && !value) {\n focusDeck();\n }\n }\n});\n\nexport default function Modals() {\n const snapStates = useSnapshot(states);\n const navigate = useNavigate();\n const location = useLocation();\n\n useEffect(() => {\n setTimeout(preload, 1000);\n }, []);\n\n return (\n <>\n {!!snapStates.showCompose && (\n <Modal\n class={`solid ${snapStates.composerState.minimized ? 'min' : ''}`}\n minimized={!!snapStates.composerState.minimized}\n >\n <ComposeSuspense\n replyToStatus={\n typeof snapStates.showCompose !== 'boolean'\n ? snapStates.showCompose.replyToStatus\n : window.__COMPOSE__?.replyToStatus || null\n }\n editStatus={\n states.showCompose?.editStatus ||\n window.__COMPOSE__?.editStatus ||\n null\n }\n draftStatus={\n states.showCompose?.draftStatus ||\n window.__COMPOSE__?.draftStatus ||\n null\n }\n onClose={(results) => {\n const { newStatus, instance, type } = results || {};\n states.showCompose = false;\n window.__COMPOSE__ = null;\n if (newStatus) {\n states.reloadStatusPage++;\n showToast({\n text: {\n post: t`Post published. Check it out.`,\n reply: t`Reply posted. Check it out.`,\n edit: t`Post updated. Check it out.`,\n }[type || 'post'],\n delay: 1000,\n duration: 10_000, // 10 seconds\n onClick: (toast) => {\n toast.hideToast();\n states.prevLocation = location;\n navigate(\n instance\n ? `/${instance}/s/${newStatus.id}`\n : `/s/${newStatus.id}`,\n );\n },\n });\n }\n }}\n />\n </Modal>\n )}\n {!!snapStates.showSettings && (\n <Modal\n onClose={() => {\n states.showSettings = false;\n }}\n >\n <Settings\n onClose={() => {\n states.showSettings = false;\n }}\n />\n </Modal>\n )}\n {!!snapStates.showAccounts && (\n <Modal\n onClose={() => {\n states.showAccounts = false;\n }}\n >\n <Accounts\n onClose={() => {\n states.showAccounts = false;\n }}\n />\n </Modal>\n )}\n {!!snapStates.showAccount && (\n <Modal\n onClose={() => {\n states.showAccount = false;\n }}\n >\n <AccountSheet\n account={snapStates.showAccount?.account || snapStates.showAccount}\n instance={snapStates.showAccount?.instance}\n onClose={({ destination } = {}) => {\n states.showAccount = false;\n // states.showGenericAccounts = false;\n // if (destination) {\n // states.showAccounts = false;\n // }\n }}\n />\n </Modal>\n )}\n {!!snapStates.showDrafts && (\n <Modal\n onClose={() => {\n states.showDrafts = false;\n }}\n >\n <Drafts onClose={() => (states.showDrafts = false)} />\n </Modal>\n )}\n {!!snapStates.showMediaModal && (\n <Modal\n onClick={(e) => {\n if (\n e.target === e.currentTarget ||\n e.target.classList.contains('media')\n ) {\n states.showMediaModal = false;\n }\n }}\n >\n <MediaModal\n mediaAttachments={snapStates.showMediaModal.mediaAttachments}\n instance={snapStates.showMediaModal.instance}\n index={snapStates.showMediaModal.index}\n statusID={snapStates.showMediaModal.statusID}\n onClose={() => {\n states.showMediaModal = false;\n }}\n />\n </Modal>\n )}\n {!!snapStates.showShortcutsSettings && (\n <Modal\n onClose={() => {\n states.showShortcutsSettings = false;\n }}\n >\n <ShortcutsSettings\n onClose={() => (states.showShortcutsSettings = false)}\n />\n </Modal>\n )}\n {!!snapStates.showGenericAccounts && (\n <Modal\n onClose={() => {\n states.showGenericAccounts = false;\n }}\n >\n <GenericAccounts\n instance={snapStates.showGenericAccounts.instance}\n excludeRelationshipAttrs={\n snapStates.showGenericAccounts.excludeRelationshipAttrs\n }\n postID={snapStates.showGenericAccounts.postID}\n onClose={() => (states.showGenericAccounts = false)}\n blankCopy={snapStates.showGenericAccounts.blankCopy}\n />\n </Modal>\n )}\n {!!snapStates.showMediaAlt && (\n <Modal\n onClose={(e) => {\n states.showMediaAlt = false;\n }}\n >\n <MediaAltModal\n alt={snapStates.showMediaAlt.alt || snapStates.showMediaAlt}\n lang={snapStates.showMediaAlt?.lang}\n onClose={() => {\n states.showMediaAlt = false;\n }}\n />\n </Modal>\n )}\n {!!snapStates.showEmbedModal && (\n <Modal\n class=\"solid\"\n onClose={() => {\n states.showEmbedModal = false;\n }}\n >\n <EmbedModal\n html={snapStates.showEmbedModal.html}\n url={snapStates.showEmbedModal.url}\n width={snapStates.showEmbedModal.width}\n height={snapStates.showEmbedModal.height}\n onClose={() => {\n states.showEmbedModal = false;\n }}\n />\n </Modal>\n )}\n {!!snapStates.showReportModal && (\n <Modal\n onClose={() => {\n states.showReportModal = false;\n }}\n >\n <ReportModal\n account={snapStates.showReportModal.account}\n post={snapStates.showReportModal.post}\n onClose={() => {\n states.showReportModal = false;\n }}\n />\n </Modal>\n )}\n </>\n );\n}\n","import { t, Trans } from '@lingui/macro';\nimport { useState } from 'preact/hooks';\n\nimport { api } from '../utils/api';\n\nimport Icon from './icon';\nimport Loader from './loader';\n\nfunction FollowRequestButtons({ accountID, onChange }) {\n const { masto } = api();\n const [uiState, setUIState] = useState('default');\n const [requestState, setRequestState] = useState(null); // accept, reject\n const [relationship, setRelationship] = useState(null);\n\n const hasRelationship = relationship !== null;\n\n return (\n <p class=\"follow-request-buttons\">\n <button\n type=\"button\"\n disabled={uiState === 'loading' || hasRelationship}\n onClick={() => {\n setUIState('loading');\n setRequestState('accept');\n (async () => {\n try {\n const rel = await masto.v1.followRequests\n .$select(accountID)\n .authorize();\n if (!rel?.followedBy) {\n throw new Error('Follow request not accepted');\n }\n setRelationship(rel);\n onChange();\n } catch (e) {\n console.error(e);\n }\n setUIState('default');\n })();\n }}\n >\n <Trans>Accept</Trans>\n </button>{' '}\n <button\n type=\"button\"\n disabled={uiState === 'loading' || hasRelationship}\n class=\"light danger\"\n onClick={() => {\n setUIState('loading');\n setRequestState('reject');\n (async () => {\n try {\n const rel = await masto.v1.followRequests\n .$select(accountID)\n .reject();\n if (rel?.followedBy) {\n throw new Error('Follow request not rejected');\n }\n setRelationship(rel);\n onChange();\n } catch (e) {\n console.error(e);\n setUIState('default');\n }\n })();\n }}\n >\n <Trans>Reject</Trans>\n </button>\n <span class=\"follow-request-states\">\n {hasRelationship && requestState ? (\n requestState === 'accept' ? (\n <Icon\n icon=\"check-circle\"\n alt={t`Accepted`}\n class=\"follow-accepted\"\n />\n ) : (\n <Icon icon=\"x-circle\" alt={t`Rejected`} class=\"follow-rejected\" />\n )\n ) : (\n <Loader hidden={uiState !== 'loading'} />\n )}\n </span>\n </p>\n );\n}\n\nexport default FollowRequestButtons;\n","import { msg, Plural, Select, t, Trans } from '@lingui/macro';\nimport { useLingui } from '@lingui/react';\nimport { Fragment } from 'preact';\nimport { memo } from 'preact/compat';\n\nimport { api } from '../utils/api';\nimport { isFiltered } from '../utils/filters';\nimport shortenNumber from '../utils/shorten-number';\nimport states, { statusKey } from '../utils/states';\nimport { getCurrentAccountID } from '../utils/store-utils';\nimport useTruncated from '../utils/useTruncated';\n\nimport Avatar from './avatar';\nimport CustomEmoji from './custom-emoji';\nimport FollowRequestButtons from './follow-request-buttons';\nimport Icon from './icon';\nimport Link from './link';\nimport NameText from './name-text';\nimport Status from './status';\n\nconst NOTIFICATION_ICONS = {\n mention: 'comment',\n status: 'notification',\n reblog: 'rocket',\n follow: 'follow',\n follow_request: 'follow-add',\n favourite: 'heart',\n poll: 'poll',\n update: 'pencil',\n 'admin.signup': 'account-edit',\n 'admin.report': 'account-warning',\n severed_relationships: 'heart-break',\n moderation_warning: 'alert',\n emoji_reaction: 'emoji2',\n 'pleroma:emoji_reaction': 'emoji2',\n};\n\n/*\nNotification types\n==================\nmention = Someone mentioned you in their status\nstatus = Someone you enabled notifications for has posted a status\nreblog = Someone boosted one of your statuses\nfollow = Someone followed you\nfollow_request = Someone requested to follow you\nfavourite = Someone favourited one of your statuses\npoll = A poll you have voted in or created has ended\nupdate = A status you interacted with has been edited\nadmin.sign_up = Someone signed up (optionally sent to admins)\nadmin.report = A new report has been filed\nsevered_relationships = Severed relationships\nmoderation_warning = Moderation warning\n*/\n\nfunction emojiText({ account, emoji, emoji_url }) {\n let url;\n let staticUrl;\n if (typeof emoji_url === 'string') {\n url = emoji_url;\n } else {\n url = emoji_url?.url;\n staticUrl = emoji_url?.staticUrl;\n }\n const emojiObject = url ? (\n <CustomEmoji url={url} staticUrl={staticUrl} alt={emoji} />\n ) : (\n emoji\n );\n return (\n <Trans>\n {account} reacted to your post with {emojiObject}\n </Trans>\n );\n}\n\nconst contentText = {\n status: ({ account }) => <Trans>{account} published a post.</Trans>,\n reblog: ({\n count,\n account,\n postsCount,\n postType,\n components: { Subject },\n }) => (\n <Plural\n value={count}\n _1={\n <Plural\n value={postsCount}\n _1={\n <Select\n value={postType}\n _reply={<Trans>{account} boosted your reply.</Trans>}\n other={<Trans>{account} boosted your post.</Trans>}\n />\n }\n other={\n <Trans>\n {account} boosted {postsCount} of your posts.\n </Trans>\n }\n />\n }\n other={\n <Select\n value={postType}\n _reply={\n <Trans>\n <Subject clickable={count > 1}>\n <span title={count}>{shortenNumber(count)}</span> people\n </Subject>{' '}\n boosted your reply.\n </Trans>\n }\n other={\n <Trans>\n <Subject clickable={count > 1}>\n <span title={count}>{shortenNumber(count)}</span> people\n </Subject>{' '}\n boosted your post.\n </Trans>\n }\n />\n }\n />\n ),\n follow: ({ account, count, components: { Subject } }) => (\n <Plural\n value={count}\n _1={<Trans>{account} followed you.</Trans>}\n other={\n <Trans>\n <Subject clickable={count > 1}>\n <span title={count}>{shortenNumber(count)}</span> people\n </Subject>{' '}\n followed you.\n </Trans>\n }\n />\n ),\n follow_request: ({ account }) => (\n <Trans>{account} requested to follow you.</Trans>\n ),\n favourite: ({\n account,\n count,\n postsCount,\n postType,\n components: { Subject },\n }) => (\n <Plural\n value={count}\n _1={\n <Plural\n value={postsCount}\n _1={\n <Select\n value={postType}\n _reply={<Trans>{account} liked your reply.</Trans>}\n other={<Trans>{account} liked your post.</Trans>}\n />\n }\n other={\n <Trans>\n {account} liked {postsCount} of your posts.\n </Trans>\n }\n />\n }\n other={\n <Select\n value={postType}\n _reply={\n <Trans>\n <Subject clickable={count > 1}>\n <span title={count}>{shortenNumber(count)}</span> people\n </Subject>{' '}\n liked your reply.\n </Trans>\n }\n other={\n <Trans>\n <Subject clickable={count > 1}>\n <span title={count}>{shortenNumber(count)}</span> people\n </Subject>{' '}\n liked your post.\n </Trans>\n }\n />\n }\n />\n ),\n poll: () => t`A poll you have voted in or created has ended.`,\n 'poll-self': () => t`A poll you have created has ended.`,\n 'poll-voted': () => t`A poll you have voted in has ended.`,\n update: () => t`A post you interacted with has been edited.`,\n 'favourite+reblog': ({\n count,\n account,\n postsCount,\n postType,\n components: { Subject },\n }) => (\n <Plural\n value={count}\n _1={\n <Plural\n value={postsCount}\n _1={\n <Select\n value={postType}\n _reply={<Trans>{account} boosted & liked your reply.</Trans>}\n other={<Trans>{account} boosted & liked your post.</Trans>}\n />\n }\n other={\n <Trans>\n {account} boosted & liked {postsCount} of your posts.\n </Trans>\n }\n />\n }\n other={\n <Select\n value={postType}\n _reply={\n <Trans>\n <Subject clickable={count > 1}>\n <span title={count}>{shortenNumber(count)}</span> people\n </Subject>{' '}\n boosted & liked your reply.\n </Trans>\n }\n other={\n <Trans>\n <Subject clickable={count > 1}>\n <span title={count}>{shortenNumber(count)}</span> people\n </Subject>{' '}\n boosted & liked your post.\n </Trans>\n }\n />\n }\n />\n ),\n 'admin.sign_up': ({ account }) => <Trans>{account} signed up.</Trans>,\n 'admin.report': ({ account, targetAccount }) => (\n <Trans>\n {account} reported {targetAccount}\n </Trans>\n ),\n severed_relationships: ({ name }) => (\n <Trans>\n Lost connections with <i>{name}</i>.\n </Trans>\n ),\n moderation_warning: () => (\n <b>\n <Trans>Moderation warning</Trans>\n </b>\n ),\n emoji_reaction: emojiText,\n 'pleroma:emoji_reaction': emojiText,\n};\n\n// account_suspension, domain_block, user_domain_block\nconst SEVERED_RELATIONSHIPS_TEXT = {\n account_suspension: ({ from, targetName }) => (\n <Trans>\n An admin from <i>{from}</i> has suspended <i>{targetName}</i>, which means\n you can no longer receive updates from them or interact with them.\n </Trans>\n ),\n domain_block: ({ from, targetName, followersCount, followingCount }) => (\n <Trans>\n An admin from <i>{from}</i> has blocked <i>{targetName}</i>. Affected\n followers: {followersCount}, followings: {followingCount}.\n </Trans>\n ),\n user_domain_block: ({ targetName, followersCount, followingCount }) => (\n <Trans>\n You have blocked <i>{targetName}</i>. Removed followers: {followersCount},\n followings: {followingCount}.\n </Trans>\n ),\n};\n\nconst MODERATION_WARNING_TEXT = {\n none: msg`Your account has received a moderation warning.`,\n disable: msg`Your account has been disabled.`,\n mark_statuses_as_sensitive: msg`Some of your posts have been marked as sensitive.`,\n delete_statuses: msg`Some of your posts have been deleted.`,\n sensitive: msg`Your posts will be marked as sensitive from now on.`,\n silence: msg`Your account has been limited.`,\n suspend: msg`Your account has been suspended.`,\n};\n\nconst AVATARS_LIMIT = 30;\n\nfunction Notification({\n notification,\n instance,\n isStatic,\n disableContextMenu,\n}) {\n const { _ } = useLingui();\n const { masto } = api();\n const {\n id,\n status,\n account,\n report,\n event,\n moderation_warning,\n // Client-side grouped notification\n _ids,\n _accounts,\n _statuses,\n _groupKeys,\n // Server-side grouped notification\n sampleAccounts,\n notificationsCount,\n groupKey,\n } = notification;\n let { type } = notification;\n\n if (type === 'mention' && !status) {\n // Could be deleted\n return null;\n }\n\n // status = Attached when type of the notification is favourite, reblog, status, mention, poll, or update\n const actualStatus = status?.reblog || status;\n const actualStatusID = actualStatus?.id;\n\n const currentAccount = getCurrentAccountID();\n const isSelf = currentAccount === account?.id;\n const isVoted = status?.poll?.voted;\n const isReplyToOthers =\n !!status?.inReplyToAccountId &&\n status?.inReplyToAccountId !== currentAccount &&\n status?.account?.id === currentAccount;\n\n let favsCount = 0;\n let reblogsCount = 0;\n if (type === 'favourite+reblog') {\n if (_accounts) {\n for (const account of _accounts) {\n if (account._types?.includes('favourite')) {\n favsCount++;\n }\n if (account._types?.includes('reblog')) {\n reblogsCount++;\n }\n }\n }\n if (!reblogsCount && favsCount) type = 'favourite';\n if (!favsCount && reblogsCount) type = 'reblog';\n }\n\n let text;\n if (type === 'poll') {\n text = contentText[isSelf ? 'poll-self' : isVoted ? 'poll-voted' : 'poll'];\n } else if (contentText[type]) {\n text = contentText[type];\n } else {\n // Anticipate unhandled notification types, possibly from Mastodon forks or non-Mastodon instances\n // This surfaces the error to the user, hoping that users will report it\n text = t`[Unknown notification type: ${type}]`;\n }\n\n const Subject = ({ clickable, ...props }) =>\n clickable ? (\n <b tabIndex=\"0\" onClick={handleOpenGenericAccounts} {...props} />\n ) : (\n <b {...props} />\n );\n\n if (typeof text === 'function') {\n const count =\n _accounts?.length || sampleAccounts?.length || (account ? 1 : 0);\n const postsCount = _statuses?.length || (status ? 1 : 0);\n if (type === 'admin.report') {\n const targetAccount = report?.targetAccount;\n if (targetAccount) {\n text = text({\n account: <NameText account={account} showAvatar />,\n targetAccount: <NameText account={targetAccount} showAvatar />,\n });\n }\n } else if (type === 'severed_relationships') {\n const targetName = event?.targetName;\n if (targetName) {\n text = text({ name: targetName });\n }\n } else if (\n (type === 'emoji_reaction' || type === 'pleroma:emoji_reaction') &&\n notification.emoji\n ) {\n const emojiURL =\n notification.emoji_url || // This is string\n status?.emojis?.find?.(\n (emoji) =>\n emoji?.shortcode ===\n notification.emoji.replace(/^:/, '').replace(/:$/, ''),\n ); // Emoji object instead of string\n text = text({\n account: <NameText account={account} showAvatar />,\n emoji: notification.emoji,\n emojiURL,\n });\n } else {\n text = text({\n account: account ? (\n <NameText account={account} showAvatar />\n ) : (\n sampleAccounts?.[0] && (\n <NameText account={sampleAccounts[0]} showAvatar />\n )\n ),\n count,\n postsCount,\n postType: isReplyToOthers ? 'reply' : 'post',\n components: { Subject },\n });\n }\n }\n\n const formattedCreatedAt =\n notification.createdAt && new Date(notification.createdAt).toLocaleString();\n\n const genericAccountsHeading =\n {\n 'favourite+reblog': t`Boosted/Liked by…`,\n favourite: t`Liked by…`,\n reblog: t`Boosted by…`,\n follow: t`Followed by…`,\n }[type] || t`Accounts`;\n const handleOpenGenericAccounts = () => {\n states.showGenericAccounts = {\n heading: genericAccountsHeading,\n accounts: _accounts,\n showReactions: type === 'favourite+reblog',\n excludeRelationshipAttrs: type === 'follow' ? ['followedBy'] : [],\n postID: statusKey(actualStatusID, instance),\n };\n };\n\n console.debug('RENDER Notification', notification.id);\n\n const diffCount =\n notificationsCount > 0 && notificationsCount > sampleAccounts?.length;\n const expandAccounts = diffCount ? 'remote' : 'local';\n\n // If there's a status and filter action is 'hide', then the notification is hidden\n // TODO: Handle 'warn' action one day\n if (!!status?.filtered) {\n const isOwnPost = status?.account?.id === currentAccount;\n const filterInfo = isFiltered(status.filtered, 'notifications');\n if (!isSelf && !isOwnPost && filterInfo?.action === 'hide') {\n return null;\n }\n }\n\n return (\n <div\n class={`notification notification-${type}`}\n data-notification-id={_ids || id}\n data-group-key={_groupKeys?.join(' ') || groupKey}\n tabIndex=\"0\"\n >\n <div\n class={`notification-type notification-${type}`}\n title={formattedCreatedAt}\n >\n {type === 'favourite+reblog' ? (\n <>\n <Icon icon=\"rocket\" size=\"xl\" alt={type} class=\"reblog-icon\" />\n <Icon icon=\"heart\" size=\"xl\" alt={type} class=\"favourite-icon\" />\n </>\n ) : (\n <Icon\n icon={NOTIFICATION_ICONS[type] || 'notification'}\n size=\"xl\"\n alt={type}\n />\n )}\n </div>\n <div class=\"notification-content\">\n {type !== 'mention' && (\n <>\n <p>{text}</p>\n {type === 'follow_request' && (\n <FollowRequestButtons accountID={account.id} />\n )}\n {type === 'severed_relationships' && (\n <div>\n {SEVERED_RELATIONSHIPS_TEXT[event.type]({\n from: instance,\n ...event,\n })}\n <br />\n <a\n href={`https://${instance}/severed_relationships`}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n <Trans>\n Learn more <Icon icon=\"external\" size=\"s\" />\n </Trans>\n </a>\n .\n </div>\n )}\n {type === 'moderation_warning' && !!moderation_warning && (\n <div>\n {_(MODERATION_WARNING_TEXT[moderation_warning.action]())}\n <br />\n <a\n href={`/disputes/strikes/${moderation_warning.id}`}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n <Trans>\n Learn more <Icon icon=\"external\" size=\"s\" />\n </Trans>\n </a>\n </div>\n )}\n </>\n )}\n {_accounts?.length > 1 && (\n <p class=\"avatars-stack\">\n {_accounts.slice(0, AVATARS_LIMIT).map((account) => (\n <Fragment key={account.id}>\n <a\n key={account.id}\n href={account.url}\n rel=\"noopener noreferrer\"\n class=\"account-avatar-stack\"\n onClick={(e) => {\n e.preventDefault();\n states.showAccount = account;\n }}\n >\n <Avatar\n url={account.avatarStatic}\n size={\n _accounts.length <= 10\n ? 'xxl'\n : _accounts.length < 20\n ? 'xl'\n : 'l'\n }\n key={account.id}\n alt={`${account.displayName} @${account.acct}`}\n squircle={account?.bot}\n />\n {type === 'favourite+reblog' && (\n <div class=\"account-sub-icons\">\n {account._types.map((type) => (\n <Icon\n icon={NOTIFICATION_ICONS[type]}\n size=\"s\"\n class={`${type}-icon`}\n />\n ))}\n </div>\n )}\n </a>{' '}\n </Fragment>\n ))}\n {type === 'favourite+reblog' && expandAccounts === 'remote' ? (\n <button\n type=\"button\"\n class=\"small plain\"\n data-group-keys={_groupKeys?.join(' ')}\n onClick={() => {\n states.showGenericAccounts = {\n heading: genericAccountsHeading,\n fetchAccounts: async () => {\n const keyAccounts = await Promise.allSettled(\n _groupKeys.map(async (gKey) => {\n const iterator = masto.v2.notifications\n .$select(gKey)\n .accounts.list();\n return [gKey, (await iterator.next()).value];\n }),\n );\n const accounts = [];\n for (const keyAccount of keyAccounts) {\n const [key, _accounts] = keyAccount.value;\n const type = /^favourite/.test(key)\n ? 'favourite'\n : /^reblog/.test(key)\n ? 'reblog'\n : null;\n if (!type) continue;\n for (const account of _accounts) {\n const theAccount = accounts.find(\n (a) => a.id === account.id,\n );\n if (theAccount) {\n theAccount._types.push(type);\n } else {\n account._types = [type];\n accounts.push(account);\n }\n }\n }\n return {\n done: true,\n value: accounts,\n };\n },\n showReactions: true,\n postID: statusKey(actualStatusID, instance),\n };\n }}\n >\n <Icon icon=\"chevron-down\" />\n </button>\n ) : (\n <button\n type=\"button\"\n class=\"small plain\"\n onClick={handleOpenGenericAccounts}\n >\n {_accounts.length > AVATARS_LIMIT &&\n `+${_accounts.length - AVATARS_LIMIT}`}\n <Icon icon=\"chevron-down\" />\n </button>\n )}\n </p>\n )}\n {!_accounts?.length && sampleAccounts?.length > 1 && (\n <p class=\"avatars-stack\">\n {sampleAccounts.map((account) => (\n <Fragment key={account.id}>\n <a\n key={account.id}\n href={account.url}\n rel=\"noopener noreferrer\"\n class=\"account-avatar-stack\"\n onClick={(e) => {\n e.preventDefault();\n states.showAccount = account;\n }}\n >\n <Avatar\n url={account.avatarStatic}\n size=\"xxl\"\n key={account.id}\n alt={`${account.displayName} @${account.acct}`}\n squircle={account?.bot}\n />\n {/* {type === 'favourite+reblog' && (\n <div class=\"account-sub-icons\">\n {account._types.map((type) => (\n <Icon\n icon={NOTIFICATION_ICONS[type]}\n size=\"s\"\n class={`${type}-icon`}\n />\n ))}\n </div>\n )} */}\n </a>{' '}\n </Fragment>\n ))}\n {notificationsCount > sampleAccounts.length && (\n <Link\n to={\n instance ? `/${instance}/s/${status.id}` : `/s/${status.id}`\n }\n class=\"button small plain centered\"\n >\n +{notificationsCount - sampleAccounts.length}\n <Icon icon=\"chevron-right\" />\n </Link>\n )}\n </p>\n )}\n {_statuses?.length > 1 && (\n <ul class=\"notification-group-statuses\">\n {_statuses.map((status) => (\n <li key={status.id}>\n <TruncatedLink\n class={`status-link status-type-${type}`}\n to={\n instance ? `/${instance}/s/${status.id}` : `/s/${status.id}`\n }\n >\n <Status\n status={status}\n size=\"s\"\n previewMode\n allowContextMenu\n />\n </TruncatedLink>\n </li>\n ))}\n </ul>\n )}\n {status && (!_statuses?.length || _statuses?.length <= 1) && (\n <TruncatedLink\n class={`status-link status-type-${type}`}\n to={\n instance\n ? `/${instance}/s/${actualStatusID}`\n : `/s/${actualStatusID}`\n }\n onContextMenu={\n !disableContextMenu\n ? (e) => {\n const post = e.target.querySelector('.status');\n if (post) {\n // Fire a custom event to open the context menu\n if (e.metaKey) return;\n e.preventDefault();\n post.dispatchEvent(\n new MouseEvent('contextmenu', {\n clientX: e.clientX,\n clientY: e.clientY,\n }),\n );\n }\n }\n : undefined\n }\n >\n {isStatic ? (\n <Status\n status={actualStatus}\n size=\"s\"\n readOnly\n allowContextMenu\n />\n ) : (\n <Status\n statusID={actualStatusID}\n size=\"s\"\n readOnly\n allowContextMenu\n />\n )}\n </TruncatedLink>\n )}\n </div>\n </div>\n );\n}\n\nfunction TruncatedLink(props) {\n const ref = useTruncated();\n return <Link {...props} data-read-more={t`Read more →`} ref={ref} />;\n}\n\nexport default memo(Notification, (oldProps, newProps) => {\n return oldProps.notification?.id === newProps.notification?.id;\n});\n","import { t, Trans } from '@lingui/macro';\nimport { memo } from 'preact/compat';\nimport { useLayoutEffect, useState } from 'preact/hooks';\nimport { useSnapshot } from 'valtio';\n\nimport { api } from '../utils/api';\nimport states from '../utils/states';\nimport {\n getAccountByAccessToken,\n getCurrentAccount,\n} from '../utils/store-utils';\nimport usePageVisibility from '../utils/usePageVisibility';\n\nimport Icon from './icon';\nimport Link from './link';\nimport Modal from './modal';\nimport Notification from './notification';\n\n{\n if ('serviceWorker' in navigator) {\n console.log('👂👂👂 Listen to message');\n navigator.serviceWorker.addEventListener('message', (event) => {\n console.log('💥💥💥 Message event', event);\n const { type, id, accessToken } = event?.data || {};\n if (type === 'notification') {\n states.routeNotification = {\n id,\n accessToken,\n };\n }\n });\n }\n}\n\nexport default memo(function NotificationService() {\n if (!('serviceWorker' in navigator)) return null;\n\n const snapStates = useSnapshot(states);\n const { routeNotification } = snapStates;\n\n console.log('🛎️ Notification service', routeNotification);\n\n const { id, accessToken } = routeNotification || {};\n const [showNotificationSheet, setShowNotificationSheet] = useState(false);\n\n useLayoutEffect(() => {\n if (!id || !accessToken) return;\n const { instance: currentInstance } = api();\n const { masto, instance } = api({\n accessToken,\n });\n console.log('API', { accessToken, currentInstance, instance });\n const sameInstance = currentInstance === instance;\n const account = accessToken\n ? getAccountByAccessToken(accessToken)\n : getCurrentAccount();\n (async () => {\n const notification = await masto.v1.notifications.$select(id).fetch();\n if (notification && account) {\n console.log('🛎️ Notification', { id, notification, account });\n const accountInstance = account.instanceURL;\n const { type, status, account: notificationAccount } = notification;\n const hasModal = !!document.querySelector('#modal-container > *');\n const isFollow = type === 'follow' && !!notificationAccount?.id;\n const hasAccount = !!notificationAccount?.id;\n const hasStatus = !!status?.id;\n if (isFollow && sameInstance) {\n // Show account sheet, can handle different instances\n states.showAccount = {\n account: notificationAccount,\n instance: accountInstance,\n };\n } else if (hasModal || !sameInstance || (hasAccount && hasStatus)) {\n // Show sheet of notification, if\n // - there is a modal open\n // - the notification is from another instance\n // - the notification has both account and status, gives choice for users to go to account or status\n setShowNotificationSheet({\n id,\n account,\n notification,\n sameInstance,\n });\n } else {\n if (hasStatus) {\n // Go to status page\n location.hash = `/${currentInstance}/s/${status.id}`;\n } else if (isFollow) {\n // Go to profile page\n location.hash = `/${currentInstance}/a/${notificationAccount.id}`;\n } else {\n // Go to notifications page\n location.hash = '/notifications';\n }\n }\n } else {\n console.warn('🛎️ Notification not found', id);\n }\n })();\n }, [id, accessToken]);\n\n // useLayoutEffect(() => {\n // // Listen to message from service worker\n // const handleMessage = (event) => {\n // console.log('💥💥💥 Message event', event);\n // const { type, id, accessToken } = event?.data || {};\n // if (type === 'notification') {\n // states.routeNotification = {\n // id,\n // accessToken,\n // };\n // }\n // };\n // console.log('👂👂👂 Listen to message');\n // navigator.serviceWorker.addEventListener('message', handleMessage);\n // return () => {\n // console.log('👂👂👂 Remove listen to message');\n // navigator.serviceWorker.removeEventListener('message', handleMessage);\n // };\n // }, []);\n\n useLayoutEffect(() => {\n if (navigator?.clearAppBadge) {\n navigator.clearAppBadge();\n }\n }, []);\n usePageVisibility((visible) => {\n if (visible && navigator?.clearAppBadge) {\n console.log('🔰 Clear app badge');\n navigator.clearAppBadge();\n }\n });\n\n const onClose = () => {\n setShowNotificationSheet(false);\n states.routeNotification = null;\n\n // If url is #/notifications?id=123, go to #/notifications\n if (/\\/notifications\\?id=/i.test(location.hash)) {\n location.hash = '/notifications';\n }\n };\n\n if (showNotificationSheet) {\n const { id, account, notification, sameInstance } = showNotificationSheet;\n return (\n <Modal\n onClick={(e) => {\n if (e.target === e.currentTarget) {\n onClose();\n }\n }}\n >\n <div class=\"sheet\" tabIndex=\"-1\">\n <button type=\"button\" class=\"sheet-close\" onClick={onClose}>\n <Icon icon=\"x\" alt={t`Close`} />\n </button>\n <header>\n <b>\n <Trans>Notification</Trans>\n </b>\n </header>\n <main>\n {!sameInstance && (\n <p>\n <Trans>This notification is from your other account.</Trans>\n </p>\n )}\n <div\n class=\"notification-peek\"\n // style={{\n // pointerEvents: sameInstance ? '' : 'none',\n // }}\n onClick={(e) => {\n const { target } = e;\n // If button or links\n if (e.target.tagName === 'BUTTON' || e.target.tagName === 'A') {\n onClose();\n }\n }}\n >\n <Notification\n instance={account.instanceURL}\n notification={notification}\n isStatic\n />\n </div>\n <div\n style={{\n textAlign: 'end',\n }}\n >\n <Link to=\"/notifications\" class=\"button light\" onClick={onClose}>\n <span>\n <Trans>View all notifications</Trans>\n </span>{' '}\n <Icon icon=\"arrow-right\" />\n </Link>\n </div>\n </main>\n </div>\n </Modal>\n );\n }\n\n return null;\n});\n","import { t, Trans } from '@lingui/macro';\nimport { forwardRef } from 'preact/compat';\nimport { useImperativeHandle, useRef, useState } from 'preact/hooks';\nimport { useSearchParams } from 'react-router-dom';\n\nimport { api } from '../utils/api';\n\nimport Icon from './icon';\nimport Link from './link';\n\nconst SearchForm = forwardRef((props, ref) => {\n const { instance } = api();\n const [searchParams, setSearchParams] = useSearchParams();\n const [searchMenuOpen, setSearchMenuOpen] = useState(false);\n const [query, setQuery] = useState(searchParams.get('q') || '');\n const type = searchParams.get('type');\n const formRef = useRef(null);\n\n const searchFieldRef = useRef(null);\n useImperativeHandle(ref, () => ({\n setValue: (value) => {\n setQuery(value);\n },\n focus: () => {\n searchFieldRef.current.focus();\n },\n select: () => {\n searchFieldRef.current.select();\n },\n blur: () => {\n searchFieldRef.current.blur();\n },\n }));\n\n return (\n <form\n ref={formRef}\n class=\"search-popover-container\"\n onSubmit={(e) => {\n e.preventDefault();\n\n const isSearchPage = /\\/search/.test(location.hash);\n if (isSearchPage) {\n if (query) {\n const params = {\n q: query,\n };\n if (type) params.type = type; // Preserve type\n setSearchParams(params);\n } else {\n setSearchParams({});\n }\n } else {\n if (query) {\n location.hash = `/search?q=${encodeURIComponent(query)}${\n type ? `&type=${type}` : ''\n }`;\n } else {\n location.hash = `/search`;\n }\n }\n\n props?.onSubmit?.(e);\n }}\n >\n <input\n ref={searchFieldRef}\n value={query}\n name=\"q\"\n type=\"search\"\n // autofocus\n placeholder={t`Search`}\n dir=\"auto\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellCheck=\"false\"\n onSearch={(e) => {\n if (!e.target.value) {\n setSearchParams({});\n }\n }}\n onInput={(e) => {\n setQuery(e.target.value);\n setSearchMenuOpen(true);\n }}\n onFocus={() => {\n setSearchMenuOpen(true);\n formRef.current\n ?.querySelector('.search-popover-item')\n ?.classList.add('focus');\n }}\n onBlur={() => {\n setTimeout(() => {\n setSearchMenuOpen(false);\n }, 100);\n formRef.current\n ?.querySelector('.search-popover-item.focus')\n ?.classList.remove('focus');\n }}\n onKeyDown={(e) => {\n const { key } = e;\n switch (key) {\n case 'Escape':\n setSearchMenuOpen(false);\n break;\n case 'Down':\n case 'ArrowDown':\n e.preventDefault();\n if (searchMenuOpen) {\n const focusItem = formRef.current.querySelector(\n '.search-popover-item.focus',\n );\n if (focusItem) {\n let nextItem = focusItem.nextElementSibling;\n while (nextItem && nextItem.hidden) {\n nextItem = nextItem.nextElementSibling;\n }\n if (nextItem) {\n nextItem.classList.add('focus');\n const siblings = Array.from(\n nextItem.parentElement.children,\n ).filter((el) => el !== nextItem);\n siblings.forEach((el) => {\n el.classList.remove('focus');\n });\n }\n } else {\n const firstItem = formRef.current.querySelector(\n '.search-popover-item',\n );\n if (firstItem) {\n firstItem.classList.add('focus');\n }\n }\n }\n break;\n case 'Up':\n case 'ArrowUp':\n e.preventDefault();\n if (searchMenuOpen) {\n const focusItem = document.querySelector(\n '.search-popover-item.focus',\n );\n if (focusItem) {\n let prevItem = focusItem.previousElementSibling;\n while (prevItem && prevItem.hidden) {\n prevItem = prevItem.previousElementSibling;\n }\n if (prevItem) {\n prevItem.classList.add('focus');\n const siblings = Array.from(\n prevItem.parentElement.children,\n ).filter((el) => el !== prevItem);\n siblings.forEach((el) => {\n el.classList.remove('focus');\n });\n }\n } else {\n const lastItem = document.querySelector(\n '.search-popover-item:last-child',\n );\n if (lastItem) {\n lastItem.classList.add('focus');\n }\n }\n }\n break;\n case 'Enter':\n if (searchMenuOpen) {\n const focusItem = document.querySelector(\n '.search-popover-item.focus',\n );\n if (focusItem) {\n e.preventDefault();\n focusItem.click();\n }\n setSearchMenuOpen(false);\n props?.onSubmit?.(e);\n }\n break;\n }\n }}\n />\n <div class=\"search-popover\" hidden={!searchMenuOpen || !query}>\n {/* {!!query && (\n <Link\n to={`/search?q=${encodeURIComponent(query)}`}\n class=\"search-popover-item focus\"\n onClick={(e) => {\n props?.onSubmit?.(e);\n }}\n >\n <Icon icon=\"search\" />\n <span>{query}</span>\n </Link>\n )} */}\n {!!query &&\n [\n {\n label: (\n <Trans>\n {query}{' '}\n <small class=\"insignificant\">\n ‒ accounts, hashtags & posts\n </small>\n </Trans>\n ),\n to: `/search?q=${encodeURIComponent(query)}`,\n top: !type && !/\\s/.test(query),\n hidden: !!type,\n },\n {\n label: (\n <Trans>\n Posts with <q>{query}</q>\n </Trans>\n ),\n to: `/search?q=${encodeURIComponent(query)}&type=statuses`,\n hidden: /^https?:/.test(query),\n top: /\\s/.test(query),\n icon: 'document',\n queryType: 'statuses',\n },\n {\n label: (\n <Trans>\n Posts tagged with <mark>#{query.replace(/^#/, '')}</mark>\n </Trans>\n ),\n to: `/${instance}/t/${query.replace(/^#/, '')}`,\n hidden:\n /^@/.test(query) || /^https?:/.test(query) || /\\s/.test(query),\n top: /^#/.test(query),\n type: 'link',\n icon: 'hashtag',\n queryType: 'hashtags',\n },\n {\n label: (\n <Trans>\n Look up <mark>{query}</mark>\n </Trans>\n ),\n to: `/${query}`,\n hidden: !/^https?:/.test(query),\n top: /^https?:/.test(query),\n type: 'link',\n },\n {\n label: (\n <Trans>\n Accounts with <q>{query}</q>\n </Trans>\n ),\n to: `/search?q=${encodeURIComponent(query)}&type=accounts`,\n icon: 'group',\n queryType: 'accounts',\n },\n ]\n .sort((a, b) => {\n if (type) {\n if (a.queryType === type) return -1;\n if (b.queryType === type) return 1;\n }\n if (a.top && !b.top) return -1;\n if (!a.top && b.top) return 1;\n return 0;\n })\n .filter(({ hidden }) => !hidden)\n .map(({ label, to, icon, type }, i) => (\n <Link\n to={to}\n class={`search-popover-item ${i === 0 ? 'focus' : ''}`}\n // hidden={hidden}\n onClick={(e) => {\n console.log('onClick', e);\n props?.onSubmit?.(e);\n }}\n >\n <Icon\n icon={icon || (type === 'link' ? 'arrow-right' : 'search')}\n class=\"more-insignificant\"\n />\n <span>{label}</span>{' '}\n </Link>\n ))}\n </div>\n </form>\n );\n});\n\nexport default SearchForm;\n","import './search-command.css';\n\nimport { memo } from 'preact/compat';\nimport { useRef, useState } from 'preact/hooks';\nimport { useHotkeys } from 'react-hotkeys-hook';\n\nimport SearchForm from './search-form';\n\nexport default memo(function SearchCommand({ onClose = () => {} }) {\n const [showSearch, setShowSearch] = useState(false);\n const searchFormRef = useRef(null);\n\n useHotkeys(\n ['Slash', '/'],\n (e) => {\n setShowSearch(true);\n setTimeout(() => {\n searchFormRef.current?.focus?.();\n searchFormRef.current?.select?.();\n }, 0);\n },\n {\n preventDefault: true,\n ignoreEventWhen: (e) => {\n const isSearchPage = /\\/search/.test(location.hash);\n const hasModal = !!document.querySelector('#modal-container > *');\n return isSearchPage || hasModal;\n },\n },\n );\n\n const closeSearch = () => {\n setShowSearch(false);\n onClose();\n };\n\n useHotkeys(\n 'esc',\n (e) => {\n searchFormRef.current?.blur?.();\n closeSearch();\n },\n {\n enabled: showSearch,\n enableOnFormTags: true,\n preventDefault: true,\n },\n );\n\n return (\n <div\n id=\"search-command-container\"\n hidden={!showSearch}\n onClick={(e) => {\n console.log(e);\n if (e.target === e.currentTarget) {\n closeSearch();\n }\n }}\n >\n <SearchForm\n ref={searchFormRef}\n onSubmit={() => {\n closeSearch();\n }}\n />\n </div>\n );\n});\n","import './shortcuts.css';\n\nimport { t, Trans } from '@lingui/macro';\nimport { useLingui } from '@lingui/react';\nimport { MenuDivider } from '@szhsin/react-menu';\nimport { memo } from 'preact/compat';\nimport { useRef, useState } from 'preact/hooks';\nimport { useHotkeys } from 'react-hotkeys-hook';\nimport { useNavigate } from 'react-router-dom';\nimport { useSnapshot } from 'valtio';\n\nimport { SHORTCUTS_META } from '../components/shortcuts-settings';\nimport { api } from '../utils/api';\nimport { getLists } from '../utils/lists';\nimport states from '../utils/states';\n\nimport AsyncText from './AsyncText';\nimport Icon from './icon';\nimport Link from './link';\nimport MenuLink from './menu-link';\nimport Menu2 from './menu2';\nimport SubMenu2 from './submenu2';\n\nfunction Shortcuts() {\n const { _ } = useLingui();\n const { instance } = api();\n const snapStates = useSnapshot(states);\n const { shortcuts, settings } = snapStates;\n\n if (!shortcuts.length) {\n return null;\n }\n const isMultiColumnMode =\n settings.shortcutsViewMode === 'multi-column' ||\n (!settings.shortcutsViewMode && settings.shortcutsColumnsMode);\n if (isMultiColumnMode) {\n return null;\n }\n\n const menuRef = useRef();\n\n const hasLists = useRef(false);\n const formattedShortcuts = shortcuts\n .map((pin, i) => {\n const { type, ...data } = pin;\n if (!SHORTCUTS_META[type]) return null;\n let { id, path, title, subtitle, icon } = SHORTCUTS_META[type];\n\n if (typeof id === 'function') {\n id = id(data, i);\n }\n if (typeof path === 'function') {\n path = path(\n {\n ...data,\n instance: data.instance || instance,\n },\n i,\n );\n }\n if (typeof title === 'function') {\n title = title(data, i);\n } else {\n title = _(title);\n }\n if (typeof subtitle === 'function') {\n subtitle = subtitle(data, i);\n } else {\n subtitle = _(subtitle);\n }\n if (typeof icon === 'function') {\n icon = icon(data, i);\n }\n\n if (id === 'lists') {\n hasLists.current = true;\n }\n\n return {\n id,\n path,\n title,\n subtitle,\n icon,\n };\n })\n .filter(Boolean);\n\n const navigate = useNavigate();\n useHotkeys(\n ['1', '2', '3', '4', '5', '6', '7', '8', '9'],\n (e, handler) => {\n const index = parseInt(handler.keys[0], 10) - 1;\n if (index < formattedShortcuts.length) {\n const { path } = formattedShortcuts[index];\n if (path) {\n navigate(path);\n menuRef.current?.closeMenu?.();\n }\n }\n },\n {\n enabled: !isMultiColumnMode,\n },\n );\n\n const [lists, setLists] = useState([]);\n\n return (\n <div id=\"shortcuts\">\n {snapStates.settings.shortcutsViewMode === 'tab-menu-bar' ? (\n <nav\n class=\"tab-bar\"\n onContextMenu={(e) => {\n e.preventDefault();\n states.showShortcutsSettings = true;\n }}\n >\n <ul>\n {formattedShortcuts.map(\n ({ id, path, title, subtitle, icon }, i) => {\n return (\n <li key={`${i}-${id}-${title}-${subtitle}-${path}`}>\n <Link\n class={subtitle ? 'has-subtitle' : ''}\n to={path}\n onClick={(e) => {\n if (e.target.classList.contains('is-active')) {\n e.preventDefault();\n const page = document.getElementById(`${id}-page`);\n console.log(id, page);\n if (page) {\n page.scrollTop = 0;\n const updatesButton =\n page.querySelector('.updates-button');\n if (updatesButton) {\n updatesButton.click();\n }\n }\n }\n }}\n >\n <Icon icon={icon} size=\"xl\" alt={title} />\n <span>\n <AsyncText>{title}</AsyncText>\n {subtitle && (\n <>\n <br />\n <small>{subtitle}</small>\n </>\n )}\n </span>\n </Link>\n </li>\n );\n },\n )}\n </ul>\n </nav>\n ) : (\n <Menu2\n instanceRef={menuRef}\n overflow=\"auto\"\n viewScroll=\"close\"\n menuClassName=\"glass-menu shortcuts-menu\"\n gap={8}\n position=\"anchor\"\n onMenuChange={(e) => {\n if (e.open && hasLists.current) {\n getLists().then(setLists);\n }\n }}\n menuButton={\n <button\n type=\"button\"\n id=\"shortcuts-button\"\n class=\"plain\"\n onContextMenu={(e) => {\n e.preventDefault();\n states.showShortcutsSettings = true;\n }}\n onTransitionStart={(e) => {\n // Close menu if the button disappears\n try {\n const { target } = e;\n if (getComputedStyle(target).pointerEvents === 'none') {\n menuRef.current?.closeMenu?.();\n }\n } catch (e) {}\n }}\n >\n <Icon icon=\"shortcut\" size=\"xl\" alt={t`Shortcuts`} />\n </button>\n }\n >\n {formattedShortcuts.map(({ id, path, title, subtitle, icon }, i) => {\n if (id === 'lists') {\n return (\n <SubMenu2\n menuClassName=\"glass-menu\"\n overflow=\"auto\"\n gap={-8}\n label={\n <>\n <Icon icon={icon} size=\"l\" />\n <span class=\"menu-grow\">\n <AsyncText>{title}</AsyncText>\n </span>\n <Icon icon=\"chevron-right\" />\n </>\n }\n >\n <MenuLink to=\"/l\">\n <span>\n <Trans>All Lists</Trans>\n </span>\n </MenuLink>\n <MenuDivider />\n {lists?.map((list) => (\n <MenuLink key={list.id} to={`/l/${list.id}`}>\n <span>{list.title}</span>\n </MenuLink>\n ))}\n </SubMenu2>\n );\n }\n\n return (\n <MenuLink\n to={path}\n key={`${i}-${id}-${title}-${subtitle}-${path}`}\n class=\"glass-menu-item\"\n >\n <Icon icon={icon} size=\"l\" />{' '}\n <span class=\"menu-grow\">\n <span>\n <AsyncText>{title}</AsyncText>\n </span>\n {subtitle && (\n <>\n {' '}\n <small class=\"more-insignificant\">{subtitle}</small>\n </>\n )}\n </span>\n <span class=\"menu-shortcut hide-until-focus-visible\">\n {i + 1}\n </span>\n </MenuLink>\n );\n })}\n </Menu2>\n )}\n </div>\n );\n}\n\nexport default memo(Shortcuts);\n","import { api } from './api';\nimport { extractTagsFromStatus, getFollowedTags } from './followed-tags';\nimport pmem from './pmem';\nimport { fetchRelationships } from './relationships';\nimport states, { saveStatus, statusKey } from './states';\nimport store from './store';\nimport supports from './supports';\n\nexport function groupBoosts(values) {\n let newValues = [];\n let boostStash = [];\n let serialBoosts = 0;\n for (let i = 0; i < values.length; i++) {\n const item = values[i];\n if (item.reblog && !item.account?.group) {\n boostStash.push(item);\n serialBoosts++;\n } else {\n newValues.push(item);\n if (serialBoosts < 3) {\n serialBoosts = 0;\n }\n }\n }\n // if boostStash is more than quarter of values\n // or if there are 3 or more boosts in a row\n if (\n values.length > 10 &&\n (boostStash.length > values.length / 4 || serialBoosts >= 3)\n ) {\n // if boostStash is more than 3 quarter of values\n const boostStashID = boostStash.map((status) => status.id);\n if (boostStash.length > (values.length * 3) / 4) {\n // insert boost array at the end of specialHome list\n newValues = [\n ...newValues,\n { id: boostStashID, items: boostStash, type: 'boosts' },\n ];\n } else {\n // insert boosts array in the middle of specialHome list\n const half = Math.floor(newValues.length / 2);\n newValues = [\n ...newValues.slice(0, half),\n {\n id: boostStashID,\n items: boostStash,\n type: 'boosts',\n },\n ...newValues.slice(half),\n ];\n }\n return newValues;\n } else {\n return values;\n }\n}\n\nexport function dedupeBoosts(items, instance) {\n const boostedStatusIDs = store.account.get('boostedStatusIDs') || {};\n const filteredItems = items.filter((item) => {\n if (!item.reblog) return true;\n const statusKey = `${instance}-${item.reblog.id}`;\n const boosterID = boostedStatusIDs[statusKey];\n if (boosterID && boosterID !== item.id) {\n console.warn(\n `🚫 Duplicate boost by ${item.account.displayName}`,\n item,\n item.reblog,\n );\n return false;\n } else {\n boostedStatusIDs[statusKey] = item.id;\n }\n return true;\n });\n // Limit to 50\n const keys = Object.keys(boostedStatusIDs);\n if (keys.length > 50) {\n keys.slice(0, keys.length - 50).forEach((key) => {\n delete boostedStatusIDs[key];\n });\n }\n store.account.set('boostedStatusIDs', boostedStatusIDs);\n return filteredItems;\n}\n\nexport function groupContext(items, instance) {\n const contexts = [];\n let contextIndex = 0;\n items.forEach((item) => {\n for (let i = 0; i < contexts.length; i++) {\n if (contexts[i].find((t) => t.id === item.id)) return;\n if (\n contexts[i].find((t) => t.id === item.inReplyToId) ||\n contexts[i].find((t) => t.inReplyToId === item.id)\n ) {\n contexts[i].push(item);\n return;\n }\n }\n const repliedItem = items.find((i) => i.id === item.inReplyToId);\n if (repliedItem) {\n contexts[contextIndex++] = [item, repliedItem];\n }\n });\n\n // Check for cross-item contexts\n // Merge contexts into one if they have a common item (same id)\n for (let i = 0; i < contexts.length; i++) {\n for (let j = i + 1; j < contexts.length; j++) {\n const commonItem = contexts[i].find((t) => contexts[j].includes(t));\n if (commonItem) {\n contexts[i] = [...contexts[i], ...contexts[j]];\n // Remove duplicate items\n contexts[i] = contexts[i].filter(\n (item, index, self) =>\n self.findIndex((t) => t.id === item.id) === index,\n );\n contexts.splice(j, 1);\n j--;\n }\n }\n }\n\n // Sort items by checking inReplyToId\n contexts.forEach((context) => {\n context.sort((a, b) => {\n if (!a.inReplyToId && !b.inReplyToId) {\n return new Date(a.createdAt) - new Date(b.createdAt);\n }\n if (a.inReplyToId === b.id) return 1;\n if (b.inReplyToId === a.id) return -1;\n if (!a.inReplyToId) return -1;\n if (!b.inReplyToId) return 1;\n return new Date(a.createdAt) - new Date(b.createdAt);\n });\n });\n\n // Tag items that has different author than first post's author\n contexts.forEach((context) => {\n const firstItemAccountID = context[0].account.id;\n context.forEach((item) => {\n if (item.account.id !== firstItemAccountID) {\n item._differentAuthor = true;\n }\n });\n });\n\n if (contexts.length) console.log('🧵 Contexts', contexts);\n\n const newItems = [];\n const appliedContextIndices = [];\n const inReplyToIds = [];\n items.forEach((item) => {\n if (item.reblog) {\n newItems.push(item);\n return;\n }\n for (let i = 0; i < contexts.length; i++) {\n if (contexts[i].find((t) => t.id === item.id)) {\n if (appliedContextIndices.includes(i)) return;\n const contextItems = contexts[i];\n contextItems.sort((a, b) => {\n const aDate = new Date(a.createdAt);\n const bDate = new Date(b.createdAt);\n return aDate - bDate;\n });\n const firstItemAccountID = contextItems[0].account.id;\n newItems.push({\n id: contextItems.map((i) => i.id),\n items: contextItems,\n type: contextItems.every((it) => it.account.id === firstItemAccountID)\n ? 'thread'\n : 'conversation',\n });\n appliedContextIndices.push(i);\n return;\n }\n }\n\n // PREPARE FOR REPLY HINTS\n if (item.inReplyToId && item.inReplyToAccountId !== item.account.id) {\n const sKey = statusKey(item.id, instance);\n if (!states.statusReply[sKey]) {\n // If it's a reply and not a thread\n inReplyToIds.push({\n sKey,\n inReplyToId: item.inReplyToId,\n });\n // queueMicrotask(async () => {\n // try {\n // const { masto } = api({ instance });\n // // const replyToStatus = await masto.v1.statuses\n // // .$select(item.inReplyToId)\n // // .fetch();\n // const replyToStatus = await fetchStatus(item.inReplyToId, masto);\n // saveStatus(replyToStatus, instance, {\n // skipThreading: true,\n // skipUnfurling: true,\n // });\n // states.statusReply[sKey] = {\n // id: replyToStatus.id,\n // instance,\n // };\n // } catch (e) {\n // // Silently fail\n // console.error(e);\n // }\n // });\n }\n }\n\n newItems.push(item);\n });\n\n // FETCH AND SHOW REPLY HINTS\n if (inReplyToIds?.length) {\n queueMicrotask(() => {\n const { masto } = api({ instance });\n console.log('REPLYHINT', inReplyToIds);\n\n // Fallback if batch fetch fails or returns nothing or not supported\n async function fallbackFetch() {\n for (let i = 0; i < inReplyToIds.length; i++) {\n const { sKey, inReplyToId } = inReplyToIds[i];\n try {\n const replyToStatus = await fetchStatus(inReplyToId, masto);\n saveStatus(replyToStatus, instance, {\n skipThreading: true,\n });\n states.statusReply[sKey] = {\n id: replyToStatus.id,\n instance,\n };\n // Pause 1s\n await new Promise((resolve) => setTimeout(resolve, 1000));\n } catch (e) {\n // Silently fail\n console.error(e);\n }\n }\n }\n\n if (supports('@mastodon/fetch-multiple-statuses')) {\n // This is batch fetching yooo, woot\n // Limit 20, returns 422 if exceeded https://github.com/mastodon/mastodon/pull/27871\n const ids = inReplyToIds.map(({ inReplyToId }) => inReplyToId);\n (async () => {\n try {\n const replyToStatuses = await masto.v1.statuses.list({ id: ids });\n if (replyToStatuses?.length) {\n for (const replyToStatus of replyToStatuses) {\n saveStatus(replyToStatus, instance, {\n skipThreading: true,\n });\n const sKey = inReplyToIds.find(\n ({ inReplyToId }) => inReplyToId === replyToStatus.id,\n )?.sKey;\n if (sKey) {\n states.statusReply[sKey] = {\n id: replyToStatus.id,\n instance,\n };\n }\n }\n } else {\n fallbackFetch();\n }\n } catch (e) {\n // Silently fail\n console.error(e);\n fallbackFetch();\n }\n })();\n } else {\n fallbackFetch();\n }\n });\n }\n\n return newItems;\n}\n\nconst fetchStatus = pmem((statusID, masto) => {\n return masto.v1.statuses.$select(statusID).fetch();\n});\n\nexport async function assignFollowedTags(items, instance) {\n const followedTags = await getFollowedTags(); // [{name: 'tag'}, {...}]\n if (!followedTags.length) return;\n const { statusFollowedTags } = states;\n console.log('statusFollowedTags', statusFollowedTags);\n const statusWithFollowedTags = [];\n items.forEach((item) => {\n if (item.reblog) return;\n const { id, content, tags = [] } = item;\n const sKey = statusKey(id, instance);\n if (statusFollowedTags[sKey]?.length) return;\n const extractedTags = extractTagsFromStatus(content);\n if (!extractedTags.length && !tags.length) return;\n const itemFollowedTags = followedTags.reduce((acc, tag) => {\n if (\n extractedTags.some((t) => t.toLowerCase() === tag.name.toLowerCase()) ||\n tags.some((t) => t.name.toLowerCase() === tag.name.toLowerCase())\n ) {\n acc.push(tag.name);\n }\n return acc;\n }, []);\n if (itemFollowedTags.length) {\n // statusFollowedTags[sKey] = itemFollowedTags;\n statusWithFollowedTags.push({\n item,\n sKey,\n followedTags: itemFollowedTags,\n });\n }\n });\n\n if (statusWithFollowedTags.length) {\n const accounts = statusWithFollowedTags.map((s) => s.item.account);\n const relationships = await fetchRelationships(accounts);\n if (!relationships) return;\n\n statusWithFollowedTags.forEach((s) => {\n const { item, sKey, followedTags } = s;\n const r = relationships[item.account.id];\n if (r && !r.following) {\n statusFollowedTags[sKey] = followedTags;\n }\n });\n }\n}\n\nexport function clearFollowedTagsState() {\n states.statusFollowedTags = {};\n}\n","import { useLayoutEffect, useState } from 'preact/hooks';\n\nexport default function useScroll({\n scrollableRef,\n distanceFromStart = 1, // ratio of clientHeight/clientWidth\n distanceFromEnd = 1, // ratio of clientHeight/clientWidth\n scrollThresholdStart = 10,\n scrollThresholdEnd = 10,\n direction = 'vertical',\n distanceFromStartPx: _distanceFromStartPx,\n distanceFromEndPx: _distanceFromEndPx,\n} = {}) {\n const [scrollDirection, setScrollDirection] = useState(null);\n const [reachStart, setReachStart] = useState(false);\n const [reachEnd, setReachEnd] = useState(false);\n const [nearReachStart, setNearReachStart] = useState(false);\n const [nearReachEnd, setNearReachEnd] = useState(false);\n const isVertical = direction === 'vertical';\n\n useLayoutEffect(() => {\n const scrollableElement = scrollableRef.current;\n if (!scrollableElement) return {};\n let previousScrollStart = isVertical\n ? scrollableElement.scrollTop\n : scrollableElement.scrollLeft;\n\n function onScroll() {\n const {\n scrollTop,\n scrollLeft,\n scrollHeight,\n scrollWidth,\n clientHeight,\n clientWidth,\n } = scrollableElement;\n const scrollStart = isVertical ? scrollTop : scrollLeft;\n const scrollDimension = isVertical ? scrollHeight : scrollWidth;\n const clientDimension = isVertical ? clientHeight : clientWidth;\n const scrollDistance = Math.abs(scrollStart - previousScrollStart);\n const distanceFromStartPx =\n _distanceFromStartPx ||\n Math.min(\n clientDimension * distanceFromStart,\n scrollDimension,\n scrollStart,\n );\n const distanceFromEndPx =\n _distanceFromEndPx ||\n Math.min(\n clientDimension * distanceFromEnd,\n scrollDimension,\n scrollDimension - scrollStart - clientDimension,\n );\n\n if (\n scrollDistance >=\n (previousScrollStart < scrollStart\n ? scrollThresholdEnd\n : scrollThresholdStart)\n ) {\n setScrollDirection(previousScrollStart < scrollStart ? 'end' : 'start');\n previousScrollStart = scrollStart;\n }\n\n setReachStart(scrollStart <= 0);\n setReachEnd(scrollStart + clientDimension >= scrollDimension);\n setNearReachStart(scrollStart <= distanceFromStartPx);\n setNearReachEnd(\n scrollStart + clientDimension >= scrollDimension - distanceFromEndPx,\n );\n }\n\n scrollableElement.addEventListener('scroll', onScroll, { passive: true });\n\n return () => scrollableElement.removeEventListener('scroll', onScroll);\n }, [\n distanceFromStart,\n distanceFromEnd,\n scrollThresholdStart,\n scrollThresholdEnd,\n ]);\n\n return {\n scrollDirection,\n reachStart,\n reachEnd,\n nearReachStart,\n nearReachEnd,\n init: () => {\n if (scrollableRef.current) {\n scrollableRef.current.dispatchEvent(new Event('scroll'));\n }\n },\n };\n}\n","import { useEffect, useLayoutEffect, useRef, useState } from 'preact/hooks';\nimport { useThrottledCallback } from 'use-debounce';\n\nexport default function useScrollFn(\n {\n scrollableRef,\n distanceFromStart = 1, // ratio of clientHeight/clientWidth\n distanceFromEnd = 1, // ratio of clientHeight/clientWidth\n scrollThresholdStart = 10,\n scrollThresholdEnd = 10,\n direction = 'vertical',\n distanceFromStartPx: _distanceFromStartPx,\n distanceFromEndPx: _distanceFromEndPx,\n init,\n } = {},\n callback,\n deps,\n) {\n if (!callback) return;\n // const [scrollDirection, setScrollDirection] = useState(null);\n // const [reachStart, setReachStart] = useState(false);\n // const [reachEnd, setReachEnd] = useState(false);\n // const [nearReachStart, setNearReachStart] = useState(false);\n // const [nearReachEnd, setNearReachEnd] = useState(false);\n const isVertical = direction === 'vertical';\n const previousScrollStart = useRef(null);\n const scrollDirection = useRef(null);\n\n const onScroll = useThrottledCallback(() => {\n // let scrollDirection = null;\n let reachStart = false;\n let reachEnd = false;\n let nearReachStart = false;\n let nearReachEnd = false;\n\n const scrollableElement = scrollableRef.current;\n const {\n scrollTop,\n scrollLeft,\n scrollHeight,\n scrollWidth,\n clientHeight,\n clientWidth,\n } = scrollableElement;\n const scrollStart = isVertical ? scrollTop : scrollLeft;\n const scrollDimension = isVertical ? scrollHeight : scrollWidth;\n const clientDimension = isVertical ? clientHeight : clientWidth;\n const scrollDistance = Math.abs(scrollStart - previousScrollStart.current);\n const distanceFromStartPx =\n _distanceFromStartPx ||\n Math.min(\n clientDimension * distanceFromStart,\n scrollDimension,\n scrollStart,\n );\n const distanceFromEndPx =\n _distanceFromEndPx ||\n Math.min(\n clientDimension * distanceFromEnd,\n scrollDimension,\n scrollDimension - scrollStart - clientDimension,\n );\n\n if (\n scrollDistance >=\n (previousScrollStart.current < scrollStart\n ? scrollThresholdEnd\n : scrollThresholdStart)\n ) {\n // setScrollDirection(\n // previousScrollStart.current < scrollStart ? 'end' : 'start',\n // );\n scrollDirection.current =\n previousScrollStart.current < scrollStart ? 'end' : 'start';\n previousScrollStart.current = scrollStart;\n }\n\n // setReachStart(scrollStart <= 0);\n // setReachEnd(scrollStart + clientDimension >= scrollDimension);\n // setNearReachStart(scrollStart <= distanceFromStartPx);\n // setNearReachEnd(\n // scrollStart + clientDimension >= scrollDimension - distanceFromEndPx,\n // );\n reachStart = scrollStart <= 0;\n reachEnd = scrollStart + clientDimension >= scrollDimension;\n nearReachStart = scrollStart <= distanceFromStartPx;\n nearReachEnd =\n scrollStart + clientDimension >= scrollDimension - distanceFromEndPx;\n\n callback({\n scrollDirection: scrollDirection.current,\n reachStart,\n reachEnd,\n nearReachStart,\n nearReachEnd,\n });\n }, 500);\n\n useLayoutEffect(() => {\n const scrollableElement = scrollableRef.current;\n if (!scrollableElement) return {};\n previousScrollStart.current =\n scrollableElement[isVertical ? 'scrollTop' : 'scrollLeft'];\n\n scrollableElement.addEventListener('scroll', onScroll, { passive: true });\n\n return () => scrollableElement.removeEventListener('scroll', onScroll);\n }, [\n distanceFromStart,\n distanceFromEnd,\n scrollThresholdStart,\n scrollThresholdEnd,\n ...deps,\n ]);\n\n // useEffect(() => {\n // callback({\n // scrollDirection,\n // reachStart,\n // reachEnd,\n // nearReachStart,\n // nearReachEnd,\n // });\n // }, [\n // scrollDirection,\n // reachStart,\n // reachEnd,\n // nearReachStart,\n // nearReachEnd,\n // ...deps,\n // ]);\n\n useEffect(() => {\n if (init && scrollableRef.current) {\n queueMicrotask(() => {\n scrollableRef.current.dispatchEvent(new Event('scroll'));\n });\n }\n }, [init]);\n\n // return {\n // scrollDirection,\n // reachStart,\n // reachEnd,\n // nearReachStart,\n // nearReachEnd,\n // init: () => {\n // if (scrollableRef.current) {\n // scrollableRef.current.dispatchEvent(new Event('scroll'));\n // }\n // },\n // };\n}\n","import './media-post.css';\n\nimport { t, Trans } from '@lingui/macro';\nimport { memo } from 'preact/compat';\nimport { useContext, useMemo } from 'preact/hooks';\nimport { useSnapshot } from 'valtio';\n\nimport FilterContext from '../utils/filter-context';\nimport { isFiltered } from '../utils/filters';\nimport states, { statusKey } from '../utils/states';\nimport store from '../utils/store';\nimport { getCurrentAccountID } from '../utils/store-utils';\n\nimport Media from './media';\n\nfunction MediaPost({\n class: className,\n statusID,\n status,\n instance,\n parent,\n // allowFilters,\n onMediaClick,\n}) {\n let sKey = statusKey(statusID, instance);\n const snapStates = useSnapshot(states);\n if (!status) {\n status = snapStates.statuses[sKey] || snapStates.statuses[statusID];\n sKey = statusKey(status?.id, instance);\n }\n if (!status) {\n return null;\n }\n\n const {\n account: {\n acct,\n avatar,\n avatarStatic,\n id: accountId,\n url: accountURL,\n displayName,\n username,\n emojis: accountEmojis,\n bot,\n group,\n },\n id,\n repliesCount,\n reblogged,\n reblogsCount,\n favourited,\n favouritesCount,\n bookmarked,\n poll,\n muted,\n sensitive,\n spoilerText,\n visibility, // public, unlisted, private, direct\n language,\n editedAt,\n filtered,\n card,\n createdAt,\n inReplyToId,\n inReplyToAccountId,\n content,\n mentions,\n mediaAttachments,\n reblog,\n uri,\n url,\n emojis,\n // Non-API props\n _deleted,\n _pinned,\n // _filtered,\n } = status;\n\n if (!mediaAttachments?.length) {\n return null;\n }\n\n const debugHover = (e) => {\n if (e.shiftKey) {\n console.log({\n ...status,\n });\n }\n };\n\n const currentAccount = useMemo(() => {\n return getCurrentAccountID();\n }, []);\n const isSelf = useMemo(() => {\n return currentAccount && currentAccount === accountId;\n }, [accountId, currentAccount]);\n\n const filterContext = useContext(FilterContext);\n const filterInfo = !isSelf && isFiltered(filtered, filterContext);\n\n if (filterInfo?.action === 'hide') {\n return null;\n }\n\n console.debug('RENDER Media post', id, status?.account.displayName);\n\n const hasSpoiler = sensitive;\n const readingExpandMedia = useMemo(() => {\n // default | show_all | hide_all\n const prefs = store.account.get('preferences') || {};\n return prefs['reading:expand:media']?.toLowerCase() || 'default';\n }, []);\n const showSpoilerMedia = readingExpandMedia === 'show_all';\n\n const Parent = parent || 'div';\n\n return mediaAttachments.map((media, i) => {\n const mediaKey = `${sKey}-${media.id}`;\n const filterTitleStr = filterInfo?.titlesStr;\n return (\n <Parent\n data-state-post-id={sKey}\n onMouseEnter={debugHover}\n key={mediaKey}\n data-spoiler-text={\n spoilerText || (sensitive ? t`Sensitive media` : undefined)\n }\n data-filtered-text={\n filterInfo\n ? filterTitleStr\n ? t`Filtered: ${filterTitleStr}`\n : t`Filtered`\n : undefined\n }\n class={`\n media-post\n ${filterInfo ? 'filtered' : ''}\n ${hasSpoiler ? 'has-spoiler' : ''}\n ${showSpoilerMedia ? 'show-media' : ''}\n `}\n >\n <Media\n class={className}\n media={media}\n lang={language}\n to={`/${instance}/s/${id}?media-only=${i + 1}`}\n onClick={\n onMediaClick ? (e) => onMediaClick(e, i, media, status) : undefined\n }\n />\n </Parent>\n );\n });\n}\n\nexport default memo(MediaPost);\n","import './nav-menu.css';\n\nimport { t, Trans } from '@lingui/macro';\nimport { ControlledMenu, MenuDivider, MenuItem } from '@szhsin/react-menu';\nimport { memo } from 'preact/compat';\nimport { useEffect, useMemo, useRef, useState } from 'preact/hooks';\nimport { useLongPress } from 'use-long-press';\nimport { useSnapshot } from 'valtio';\n\nimport { api } from '../utils/api';\nimport { getLists } from '../utils/lists';\nimport safeBoundingBoxPadding from '../utils/safe-bounding-box-padding';\nimport states from '../utils/states';\nimport store from '../utils/store';\nimport { getCurrentAccountID } from '../utils/store-utils';\nimport supports from '../utils/supports';\n\nimport Avatar from './avatar';\nimport Icon from './icon';\nimport MenuLink from './menu-link';\nimport SubMenu2 from './submenu2';\n\nfunction NavMenu(props) {\n const snapStates = useSnapshot(states);\n const { masto, instance, authenticated } = api();\n\n const [currentAccount, moreThanOneAccount] = useMemo(() => {\n const accounts = store.local.getJSON('accounts') || [];\n const acc =\n accounts.find((account) => account.info.id === getCurrentAccountID()) ||\n accounts[0];\n return [acc, accounts.length > 1];\n }, []);\n\n // Home = Following\n // But when in multi-column mode, Home becomes columns of anything\n // User may choose pin or not to pin Following\n // If user doesn't pin Following, we show it in the menu\n const showFollowing =\n (snapStates.settings.shortcutsViewMode === 'multi-column' ||\n (!snapStates.settings.shortcutsViewMode &&\n snapStates.settings.shortcutsColumnsMode)) &&\n !snapStates.shortcuts.find((pin) => pin.type === 'following');\n\n const bindLongPress = useLongPress(\n () => {\n states.showAccounts = true;\n },\n {\n threshold: 600,\n detect: 'touch',\n cancelOnMovement: true,\n },\n );\n\n const buttonRef = useRef();\n const [menuState, setMenuState] = useState(undefined);\n\n const boundingBoxPadding = safeBoundingBoxPadding([\n 0,\n 0,\n snapStates.settings.shortcutsViewMode === 'tab-menu-bar' ? 50 : 0,\n 0,\n ]);\n\n const mutesIterator = useRef();\n async function fetchMutes(firstLoad) {\n if (firstLoad || !mutesIterator.current) {\n mutesIterator.current = masto.v1.mutes.list({\n limit: 80,\n });\n }\n const results = await mutesIterator.current.next();\n return results;\n }\n\n const blocksIterator = useRef();\n async function fetchBlocks(firstLoad) {\n if (firstLoad || !blocksIterator.current) {\n blocksIterator.current = masto.v1.blocks.list({\n limit: 80,\n });\n }\n const results = await blocksIterator.current.next();\n return results;\n }\n\n const supportsLists = supports('@mastodon/lists');\n const [lists, setLists] = useState([]);\n useEffect(() => {\n if (!supportsLists) return;\n if (menuState === 'open') {\n getLists().then(setLists);\n }\n }, [menuState === 'open']);\n\n const buttonClickTS = useRef();\n return (\n <>\n <button\n ref={buttonRef}\n type=\"button\"\n class={`button plain nav-menu-button ${\n moreThanOneAccount ? 'with-avatar' : ''\n } ${menuState === 'open' ? 'active' : ''}`}\n style={{ position: 'relative' }}\n onClick={() => {\n buttonClickTS.current = Date.now();\n setMenuState((state) => (!state ? 'open' : undefined));\n }}\n onContextMenu={(e) => {\n e.preventDefault();\n states.showAccounts = true;\n }}\n {...bindLongPress()}\n >\n {moreThanOneAccount && (\n <Avatar\n url={\n currentAccount?.info?.avatar || currentAccount?.info?.avatarStatic\n }\n size=\"l\"\n squircle={currentAccount?.info?.bot}\n />\n )}\n <Icon icon=\"menu\" size={moreThanOneAccount ? 's' : 'l'} alt={t`Menu`} />\n </button>\n <ControlledMenu\n menuClassName=\"nav-menu\"\n state={menuState}\n anchorRef={buttonRef}\n onClose={() => {\n setMenuState(undefined);\n }}\n containerProps={{\n style: {\n zIndex: 10,\n },\n onClick: () => {\n if (Date.now() - buttonClickTS.current < 300) {\n return;\n }\n // setMenuState(undefined);\n },\n }}\n portal={{\n target: document.body,\n }}\n {...props}\n overflow=\"auto\"\n viewScroll=\"close\"\n position=\"anchor\"\n align=\"center\"\n boundingBoxPadding={boundingBoxPadding}\n unmountOnClose\n >\n {!!snapStates.appVersion?.commitHash &&\n __COMMIT_HASH__ !== snapStates.appVersion.commitHash && (\n <div class=\"top-menu\">\n <MenuItem\n onClick={() => {\n const yes = confirm(t`Reload page now to update?`);\n if (yes) {\n (async () => {\n try {\n location.reload();\n } catch (e) {}\n })();\n }\n }}\n >\n <Icon icon=\"sparkles\" class=\"sparkle-icon\" size=\"l\" />{' '}\n <span>\n <Trans>New update available…</Trans>\n </span>\n </MenuItem>\n <MenuDivider />\n </div>\n )}\n <section>\n <MenuLink to=\"/\">\n <Icon icon=\"home\" size=\"l\" />{' '}\n <span>\n <Trans>Home</Trans>\n </span>\n </MenuLink>\n {authenticated ? (\n <>\n {showFollowing && (\n <MenuLink to=\"/following\">\n <Icon icon=\"following\" size=\"l\" />{' '}\n <span>\n <Trans id=\"following.title\">Following</Trans>\n </span>\n </MenuLink>\n )}\n <MenuLink to=\"/catchup\">\n <Icon icon=\"history2\" size=\"l\" />\n <span>\n <Trans>Catch-up</Trans>\n </span>\n </MenuLink>\n {supports('@mastodon/mentions') && (\n <MenuLink to=\"/mentions\">\n <Icon icon=\"at\" size=\"l\" />{' '}\n <span>\n <Trans>Mentions</Trans>\n </span>\n </MenuLink>\n )}\n <MenuLink to=\"/notifications\">\n <Icon icon=\"notification\" size=\"l\" />{' '}\n <span>\n <Trans>Notifications</Trans>\n </span>\n {snapStates.notificationsShowNew && (\n <sup title={t`New`} style={{ opacity: 0.5 }}>\n {' '}\n •\n </sup>\n )}\n </MenuLink>\n <MenuDivider />\n {currentAccount?.info?.id && (\n <MenuLink to={`/${instance}/a/${currentAccount.info.id}`}>\n <Icon icon=\"user\" size=\"l\" />{' '}\n <span>\n <Trans>Profile</Trans>\n </span>\n </MenuLink>\n )}\n {lists?.length > 0 ? (\n <SubMenu2\n menuClassName=\"nav-submenu\"\n overflow=\"auto\"\n gap={-8}\n label={\n <>\n <Icon icon=\"list\" size=\"l\" />\n <span class=\"menu-grow\">\n <Trans>Lists</Trans>\n </span>\n <Icon icon=\"chevron-right\" />\n </>\n }\n >\n <MenuLink to=\"/l\">\n <span>\n <Trans>All Lists</Trans>\n </span>\n </MenuLink>\n {lists?.length > 0 && (\n <>\n <MenuDivider />\n {lists.map((list) => (\n <MenuLink key={list.id} to={`/l/${list.id}`}>\n <span>{list.title}</span>\n </MenuLink>\n ))}\n </>\n )}\n </SubMenu2>\n ) : (\n supportsLists && (\n <MenuLink to=\"/l\">\n <Icon icon=\"list\" size=\"l\" />\n <span>\n <Trans>Lists</Trans>\n </span>\n </MenuLink>\n )\n )}\n <MenuLink to=\"/b\">\n <Icon icon=\"bookmark\" size=\"l\" />{' '}\n <span>\n <Trans>Bookmarks</Trans>\n </span>\n </MenuLink>\n <SubMenu2\n menuClassName=\"nav-submenu\"\n overflow=\"auto\"\n gap={-8}\n label={\n <>\n <Icon icon=\"more\" size=\"l\" />\n <span class=\"menu-grow\">\n <Trans>More…</Trans>\n </span>\n <Icon icon=\"chevron-right\" />\n </>\n }\n >\n <MenuLink to=\"/f\">\n <Icon icon=\"heart\" size=\"l\" />{' '}\n <span>\n <Trans>Likes</Trans>\n </span>\n </MenuLink>\n <MenuLink to=\"/fh\">\n <Icon icon=\"hashtag\" size=\"l\" />{' '}\n <span>\n <Trans>Followed Hashtags</Trans>\n </span>\n </MenuLink>\n <MenuDivider />\n {supports('@mastodon/filters') && (\n <MenuLink to=\"/ft\">\n <Icon icon=\"filters\" size=\"l\" />{' '}\n <span>\n <Trans>Filters</Trans>\n </span>\n </MenuLink>\n )}\n <MenuItem\n onClick={() => {\n states.showGenericAccounts = {\n id: 'mute',\n heading: t`Muted users`,\n fetchAccounts: fetchMutes,\n excludeRelationshipAttrs: ['muting'],\n };\n }}\n >\n <Icon icon=\"mute\" size=\"l\" />{' '}\n <span>\n <Trans>Muted users…</Trans>\n </span>\n </MenuItem>\n <MenuItem\n onClick={() => {\n states.showGenericAccounts = {\n id: 'block',\n heading: t`Blocked users`,\n fetchAccounts: fetchBlocks,\n excludeRelationshipAttrs: ['blocking'],\n };\n }}\n >\n <Icon icon=\"block\" size=\"l\" />{' '}\n <span>\n <Trans>Blocked users…</Trans>\n </span>\n </MenuItem>{' '}\n </SubMenu2>\n <MenuDivider />\n <MenuItem\n onClick={() => {\n states.showAccounts = true;\n }}\n >\n <Icon icon=\"group\" size=\"l\" />{' '}\n <span>\n <Trans>Accounts…</Trans>\n </span>\n </MenuItem>\n </>\n ) : (\n <>\n <MenuDivider />\n <MenuLink to=\"/login\">\n <Icon icon=\"user\" size=\"l\" />{' '}\n <span>\n <Trans>Log in</Trans>\n </span>\n </MenuLink>\n </>\n )}\n </section>\n <section>\n <MenuDivider />\n <MenuLink to={`/search`}>\n <Icon icon=\"search\" size=\"l\" />{' '}\n <span>\n <Trans>Search</Trans>\n </span>\n </MenuLink>\n <MenuLink to={`/${instance}/trending`}>\n <Icon icon=\"chart\" size=\"l\" />{' '}\n <span>\n <Trans>Trending</Trans>\n </span>\n </MenuLink>\n <MenuLink to={`/${instance}/p/l`}>\n <Icon icon=\"building\" size=\"l\" />{' '}\n <span>\n <Trans>Local</Trans>\n </span>\n </MenuLink>\n <MenuLink to={`/${instance}/p`}>\n <Icon icon=\"earth\" size=\"l\" />{' '}\n <span>\n <Trans>Federated</Trans>\n </span>\n </MenuLink>\n {authenticated ? (\n <>\n <MenuDivider className=\"divider-grow\" />\n <MenuItem\n onClick={() => {\n states.showKeyboardShortcutsHelp = true;\n }}\n >\n <Icon icon=\"keyboard\" size=\"l\" />{' '}\n <span>\n <Trans>Keyboard shortcuts</Trans>\n </span>\n </MenuItem>\n <MenuItem\n onClick={() => {\n states.showShortcutsSettings = true;\n }}\n >\n <Icon icon=\"shortcut\" size=\"l\" />{' '}\n <span>\n <Trans>Shortcuts / Columns…</Trans>\n </span>\n </MenuItem>\n <MenuItem\n onClick={() => {\n states.showSettings = true;\n }}\n >\n <Icon icon=\"gear\" size=\"l\" />{' '}\n <span>\n <Trans>Settings…</Trans>\n </span>\n </MenuItem>\n </>\n ) : (\n <>\n <MenuDivider />\n <MenuItem\n onClick={() => {\n states.showSettings = true;\n }}\n >\n <Icon icon=\"gear\" size=\"l\" />{' '}\n <span>\n <Trans>Settings…</Trans>\n </span>\n </MenuItem>\n </>\n )}\n </section>\n </ControlledMenu>\n </>\n );\n}\n\nexport default memo(NavMenu);\n","import { plural, t, Trans } from '@lingui/macro';\nimport { memo } from 'preact/compat';\nimport {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'preact/hooks';\nimport { useHotkeys } from 'react-hotkeys-hook';\nimport { InView } from 'react-intersection-observer';\nimport { useDebouncedCallback } from 'use-debounce';\nimport { useSnapshot } from 'valtio';\n\nimport FilterContext from '../utils/filter-context';\nimport { filteredItems, isFiltered } from '../utils/filters';\nimport isRTL from '../utils/is-rtl';\nimport showToast from '../utils/show-toast';\nimport states, { statusKey } from '../utils/states';\nimport statusPeek from '../utils/status-peek';\nimport { isMediaFirstInstance } from '../utils/store-utils';\nimport { groupBoosts, groupContext } from '../utils/timeline-utils';\nimport useInterval from '../utils/useInterval';\nimport usePageVisibility from '../utils/usePageVisibility';\nimport useScroll from '../utils/useScroll';\nimport useScrollFn from '../utils/useScrollFn';\n\nimport Icon from './icon';\nimport Link from './link';\nimport MediaPost from './media-post';\nimport NavMenu from './nav-menu';\nimport Status from './status';\n\nconst scrollIntoViewOptions = {\n block: 'nearest',\n inline: 'center',\n behavior: 'smooth',\n};\n\nfunction Timeline({\n title,\n titleComponent,\n id,\n instance,\n emptyText,\n errorText,\n useItemID, // use statusID instead of status object, assuming it's already in states\n boostsCarousel,\n fetchItems = () => {},\n checkForUpdates = () => {},\n checkForUpdatesInterval = 15_000, // 15 seconds\n headerStart,\n headerEnd,\n timelineStart,\n // allowFilters,\n refresh,\n view,\n filterContext,\n showFollowedTags,\n showReplyParent,\n clearWhenRefresh,\n}) {\n const snapStates = useSnapshot(states);\n const [items, setItems] = useState([]);\n const [uiState, setUIState] = useState('start');\n const [showMore, setShowMore] = useState(false);\n const [showNew, setShowNew] = useState(false);\n const [visible, setVisible] = useState(true);\n const scrollableRef = useRef();\n\n console.debug('RENDER Timeline', id, refresh);\n __BENCHMARK.start(`timeline-${id}-load`);\n\n const mediaFirst = useMemo(() => isMediaFirstInstance(), []);\n\n const allowGrouping = view !== 'media';\n const loadItemsTS = useRef(0); // Ensures only one loadItems at a time\n const loadItems = useDebouncedCallback(\n (firstLoad) => {\n setShowNew(false);\n // if (uiState === 'loading') return;\n setUIState('loading');\n (async () => {\n try {\n const ts = (loadItemsTS.current = Date.now());\n let { done, value } = await fetchItems(firstLoad);\n if (ts !== loadItemsTS.current) return;\n if (Array.isArray(value)) {\n // Avoid grouping for pinned posts\n const [pinnedPosts, otherPosts] = value.reduce(\n (acc, item) => {\n if (item._pinned) {\n acc[0].push(item);\n } else {\n acc[1].push(item);\n }\n return acc;\n },\n [[], []],\n );\n value = otherPosts;\n if (allowGrouping) {\n if (boostsCarousel) {\n value = groupBoosts(value);\n }\n value = groupContext(value, instance);\n }\n if (pinnedPosts.length) {\n value = pinnedPosts.concat(value);\n }\n console.log(value);\n if (firstLoad) {\n setItems(value);\n } else {\n setItems((items) => [...items, ...value]);\n }\n if (!value.length) done = true;\n setShowMore(!done);\n } else {\n setShowMore(false);\n }\n setUIState('default');\n __BENCHMARK.end(`timeline-${id}-load`);\n } catch (e) {\n console.error(e);\n setUIState('error');\n if (firstLoad && !items.length && errorText) {\n showToast(errorText);\n }\n } finally {\n loadItems.cancel();\n }\n })();\n },\n 1_000,\n {\n leading: true,\n // trailing: false,\n },\n );\n\n const itemsSelector = '.timeline-item, .timeline-item-alt';\n\n const jRef = useHotkeys('j, shift+j', (_, handler) => {\n // focus on next status after active item\n const activeItem = document.activeElement.closest(itemsSelector);\n const activeItemRect = activeItem?.getBoundingClientRect();\n const allItems = Array.from(\n scrollableRef.current.querySelectorAll(itemsSelector),\n );\n if (\n activeItem &&\n activeItemRect.top < scrollableRef.current.clientHeight &&\n activeItemRect.bottom > 0\n ) {\n const activeItemIndex = allItems.indexOf(activeItem);\n let nextItem = allItems[activeItemIndex + 1];\n if (handler.shift) {\n // get next status that's not .timeline-item-alt\n nextItem = allItems.find(\n (item, index) =>\n index > activeItemIndex &&\n !item.classList.contains('timeline-item-alt'),\n );\n }\n if (nextItem) {\n nextItem.focus();\n nextItem.scrollIntoView(scrollIntoViewOptions);\n }\n } else {\n // If active status is not in viewport, get the topmost status-link in viewport\n const topmostItem = allItems.find((item) => {\n const itemRect = item.getBoundingClientRect();\n return itemRect.top >= 44 && itemRect.left >= 0; // 44 is the magic number for header height, not real\n });\n if (topmostItem) {\n topmostItem.focus();\n topmostItem.scrollIntoView(scrollIntoViewOptions);\n }\n }\n });\n\n const kRef = useHotkeys('k, shift+k', (_, handler) => {\n // focus on previous status after active item\n const activeItem = document.activeElement.closest(itemsSelector);\n const activeItemRect = activeItem?.getBoundingClientRect();\n const allItems = Array.from(\n scrollableRef.current.querySelectorAll(itemsSelector),\n );\n if (\n activeItem &&\n activeItemRect.top < scrollableRef.current.clientHeight &&\n activeItemRect.bottom > 0\n ) {\n const activeItemIndex = allItems.indexOf(activeItem);\n let prevItem = allItems[activeItemIndex - 1];\n if (handler.shift) {\n // get prev status that's not .timeline-item-alt\n prevItem = allItems.findLast(\n (item, index) =>\n index < activeItemIndex &&\n !item.classList.contains('timeline-item-alt'),\n );\n }\n if (prevItem) {\n prevItem.focus();\n prevItem.scrollIntoView(scrollIntoViewOptions);\n }\n } else {\n // If active status is not in viewport, get the topmost status-link in viewport\n const topmostItem = allItems.find((item) => {\n const itemRect = item.getBoundingClientRect();\n return itemRect.top >= 44 && itemRect.left >= 0; // 44 is the magic number for header height, not real\n });\n if (topmostItem) {\n topmostItem.focus();\n topmostItem.scrollIntoView(scrollIntoViewOptions);\n }\n }\n });\n\n const oRef = useHotkeys(['enter', 'o'], () => {\n // open active status\n const activeItem = document.activeElement;\n if (activeItem?.matches(itemsSelector)) {\n activeItem.click();\n }\n });\n\n const showNewPostsIndicator =\n items.length > 0 && uiState !== 'loading' && showNew;\n const handleLoadNewPosts = useCallback(() => {\n if (showNewPostsIndicator) loadItems(true);\n scrollableRef.current?.scrollTo({\n top: 0,\n behavior: 'smooth',\n });\n }, [loadItems, showNewPostsIndicator]);\n const dotRef = useHotkeys('.', handleLoadNewPosts);\n\n // const {\n // scrollDirection,\n // nearReachStart,\n // nearReachEnd,\n // reachStart,\n // reachEnd,\n // } = useScroll({\n // scrollableRef,\n // distanceFromEnd: 2,\n // scrollThresholdStart: 44,\n // });\n const headerRef = useRef();\n // const [hiddenUI, setHiddenUI] = useState(false);\n const [nearReachStart, setNearReachStart] = useState(false);\n useScrollFn(\n {\n scrollableRef,\n distanceFromEnd: 2,\n scrollThresholdStart: 44,\n },\n ({\n scrollDirection,\n nearReachStart,\n // nearReachEnd,\n reachStart,\n // reachEnd,\n }) => {\n // setHiddenUI(scrollDirection === 'end' && !nearReachEnd);\n if (headerRef.current) {\n const hiddenUI = scrollDirection === 'end' && !nearReachStart;\n headerRef.current.hidden = hiddenUI;\n }\n setNearReachStart(nearReachStart);\n if (reachStart) {\n loadItems(true);\n }\n // else if (nearReachEnd || (reachEnd && showMore)) {\n // loadItems();\n // }\n },\n [],\n );\n\n useEffect(() => {\n scrollableRef.current?.scrollTo({ top: 0 });\n loadItems(true);\n }, []);\n const firstLoad = useRef(true);\n useEffect(() => {\n if (firstLoad.current) {\n firstLoad.current = false;\n return;\n }\n if (clearWhenRefresh && items?.length) {\n loadItems.cancel?.();\n setItems([]);\n }\n loadItems(true);\n }, [clearWhenRefresh, refresh]);\n\n // useEffect(() => {\n // if (reachStart) {\n // loadItems(true);\n // }\n // }, [reachStart]);\n\n // useEffect(() => {\n // if (nearReachEnd || (reachEnd && showMore)) {\n // loadItems();\n // }\n // }, [nearReachEnd, showMore]);\n\n const prevView = useRef(view);\n useEffect(() => {\n if (prevView.current !== view) {\n prevView.current = view;\n setItems([]);\n }\n }, [view]);\n\n const loadOrCheckUpdates = useCallback(\n async ({ disableIdleCheck = false } = {}) => {\n const noPointers = scrollableRef.current\n ? getComputedStyle(scrollableRef.current).pointerEvents === 'none'\n : false;\n console.log('✨ Load or check updates', id, {\n autoRefresh: snapStates.settings.autoRefresh,\n scrollTop: scrollableRef.current.scrollTop,\n disableIdleCheck,\n idle: window.__IDLE__,\n inBackground: inBackground(),\n noPointers,\n });\n if (\n snapStates.settings.autoRefresh &&\n scrollableRef.current.scrollTop < 16 &&\n (disableIdleCheck || window.__IDLE__) &&\n !inBackground() &&\n !noPointers\n ) {\n console.log('✨ Load updates', id, snapStates.settings.autoRefresh);\n loadItems(true);\n } else {\n console.log('✨ Check updates', id, snapStates.settings.autoRefresh);\n const hasUpdate = await checkForUpdates();\n if (hasUpdate) {\n console.log('✨ Has new updates', id);\n setShowNew(true);\n }\n }\n },\n [id, loadItems, checkForUpdates, snapStates.settings.autoRefresh],\n );\n\n const lastHiddenTime = useRef();\n usePageVisibility(\n (visible) => {\n if (visible) {\n const timeDiff = Date.now() - lastHiddenTime.current;\n if (!lastHiddenTime.current || timeDiff > 1000 * 3) {\n // 3 seconds\n loadOrCheckUpdates({\n disableIdleCheck: true,\n });\n }\n } else {\n lastHiddenTime.current = Date.now();\n }\n setVisible(visible);\n },\n [checkForUpdates, loadOrCheckUpdates, snapStates.settings.autoRefresh],\n );\n\n // checkForUpdates interval\n useInterval(\n loadOrCheckUpdates,\n visible && !showNew\n ? checkForUpdatesInterval * (nearReachStart ? 1 : 2)\n : null,\n );\n\n // const hiddenUI = scrollDirection === 'end' && !nearReachStart;\n\n return (\n <FilterContext.Provider value={filterContext}>\n <div\n id={`${id}-page`}\n class={`deck-container ${\n mediaFirst ? 'deck-container-media-first' : ''\n }`}\n ref={(node) => {\n scrollableRef.current = node;\n jRef(node);\n kRef(node);\n oRef(node);\n dotRef(node);\n }}\n tabIndex=\"-1\"\n onClick={(e) => {\n // If click on timeline item, unhide header\n if (\n headerRef.current &&\n e.target.closest('.timeline-item, .timeline-item-alt')\n ) {\n setTimeout(() => {\n headerRef.current.hidden = false;\n }, 250);\n }\n }}\n >\n <div class=\"timeline-deck deck\">\n <header\n ref={headerRef}\n // hidden={hiddenUI}\n onClick={(e) => {\n if (!e.target.closest('a, button')) {\n scrollableRef.current?.scrollTo({\n top: 0,\n behavior: 'smooth',\n });\n }\n }}\n onDblClick={(e) => {\n if (!e.target.closest('a, button')) {\n loadItems(true);\n }\n }}\n class={uiState === 'loading' ? 'loading' : ''}\n >\n <div class=\"header-grid\">\n <div class=\"header-side\">\n <NavMenu />\n {headerStart !== null && headerStart !== undefined ? (\n headerStart\n ) : (\n <Link to=\"/\" class=\"button plain home-button\">\n <Icon icon=\"home\" size=\"l\" alt={t`Home`} />\n </Link>\n )}\n </div>\n {title && (titleComponent ? titleComponent : <h1>{title}</h1>)}\n <div class=\"header-side\">\n {/* <Loader hidden={uiState !== 'loading'} /> */}\n {!!headerEnd && headerEnd}\n </div>\n </div>\n {showNewPostsIndicator && (\n <button\n class=\"updates-button shiny-pill\"\n type=\"button\"\n onClick={handleLoadNewPosts}\n >\n <Icon icon=\"arrow-up\" /> <Trans>New posts</Trans>\n </button>\n )}\n </header>\n {!!timelineStart && (\n <div\n class={`timeline-start ${uiState === 'loading' ? 'loading' : ''}`}\n >\n {timelineStart}\n </div>\n )}\n {!!items.length ? (\n <>\n <ul class={`timeline ${view ? `timeline-${view}` : ''}`}>\n {items.map((status) => (\n <TimelineItem\n status={status}\n instance={instance}\n useItemID={useItemID}\n // allowFilters={allowFilters}\n filterContext={filterContext}\n key={status.id + status?._pinned + view}\n view={view}\n showFollowedTags={showFollowedTags}\n showReplyParent={showReplyParent}\n mediaFirst={mediaFirst}\n />\n ))}\n {showMore &&\n uiState === 'loading' &&\n (view === 'media' ? null : (\n <>\n <li\n style={{\n height: '20vh',\n }}\n >\n <Status skeleton mediaFirst={mediaFirst} />\n </li>\n <li\n style={{\n height: '25vh',\n }}\n >\n <Status skeleton mediaFirst={mediaFirst} />\n </li>\n </>\n ))}\n </ul>\n {uiState === 'default' &&\n (showMore ? (\n <InView\n root={scrollableRef.current}\n rootMargin={`0px 0px ${screen.height * 1.5}px 0px`}\n onChange={(inView) => {\n if (inView) {\n loadItems();\n }\n }}\n >\n <button\n type=\"button\"\n class=\"plain block\"\n onClick={() => loadItems()}\n style={{ marginBlockEnd: '6em' }}\n >\n <Trans>Show more…</Trans>\n </button>\n </InView>\n ) : (\n <p class=\"ui-state insignificant\">\n <Trans>The end.</Trans>\n </p>\n ))}\n </>\n ) : uiState === 'loading' ? (\n <ul class=\"timeline\">\n {Array.from({ length: 5 }).map((_, i) =>\n view === 'media' ? (\n <div\n style={{\n height: '50vh',\n }}\n />\n ) : (\n <li key={i}>\n <Status skeleton mediaFirst={mediaFirst} />\n </li>\n ),\n )}\n </ul>\n ) : (\n uiState !== 'error' &&\n uiState !== 'start' && <p class=\"ui-state\">{emptyText}</p>\n )}\n {uiState === 'error' && (\n <p class=\"ui-state\">\n {errorText}\n <br />\n <br />\n <button type=\"button\" onClick={() => loadItems(!items.length)}>\n <Trans>Try again</Trans>\n </button>\n </p>\n )}\n </div>\n </div>\n </FilterContext.Provider>\n );\n}\n\nconst TimelineItem = memo(\n ({\n status,\n instance,\n useItemID,\n // allowFilters,\n filterContext,\n view,\n showFollowedTags,\n showReplyParent,\n mediaFirst,\n }) => {\n console.debug('RENDER TimelineItem', status.id);\n const { id: statusID, reblog, items, type, _pinned } = status;\n if (_pinned) useItemID = false;\n const actualStatusID = reblog?.id || statusID;\n const url = instance\n ? `/${instance}/s/${actualStatusID}`\n : `/s/${actualStatusID}`;\n\n if (items) {\n let fItems = filteredItems(items, filterContext);\n let title = '';\n if (type === 'boosts') {\n title = plural(fItems.length, {\n one: '# Boost',\n other: '# Boosts',\n });\n } else if (type === 'pinned') {\n title = t`Pinned posts`;\n }\n const isCarousel = type === 'boosts' || type === 'pinned';\n if (isCarousel) {\n const filteredItemsIDs = new Set();\n // Here, we don't hide filtered posts, but we sort them last\n fItems.sort((a, b) => {\n // if (a._filtered && !b._filtered) {\n // return 1;\n // }\n // if (!a._filtered && b._filtered) {\n // return -1;\n // }\n const aFiltered = isFiltered(a.filtered, filterContext);\n const bFiltered = isFiltered(b.filtered, filterContext);\n if (aFiltered) filteredItemsIDs.add(a.id);\n if (bFiltered) filteredItemsIDs.add(b.id);\n if (aFiltered && !bFiltered) {\n return 1;\n }\n if (!aFiltered && bFiltered) {\n return -1;\n }\n return 0;\n });\n\n if (filteredItemsIDs.size >= 2) {\n const GROUP_SIZE = 5;\n // If 2 or more, group filtered items into one, limit to GROUP_SIZE in a group\n const unfiltered = [];\n const filtered = [];\n fItems.forEach((item) => {\n if (filteredItemsIDs.has(item.id)) {\n filtered.push(item);\n } else {\n unfiltered.push(item);\n }\n });\n const filteredItems = [];\n for (let i = 0; i < filtered.length; i += GROUP_SIZE) {\n filteredItems.push({\n _grouped: true,\n posts: filtered.slice(i, i + GROUP_SIZE),\n });\n }\n fItems = unfiltered.concat(filteredItems);\n }\n\n return (\n <li key={`timeline-${statusID}`} class=\"timeline-item-carousel\">\n <StatusCarousel title={title} class={`${type}-carousel`}>\n {fItems.map((item) => {\n const { id: statusID, reblog, _pinned, _grouped } = item;\n if (_grouped) {\n return (\n <li key={statusID} class=\"timeline-item-carousel-group\">\n {item.posts.map((item) => {\n const { id: statusID, reblog, _pinned } = item;\n const actualStatusID = reblog?.id || statusID;\n const url = instance\n ? `/${instance}/s/${actualStatusID}`\n : `/s/${actualStatusID}`;\n if (_pinned) useItemID = false;\n return (\n <Link\n class=\"status-carousel-link timeline-item-alt\"\n to={url}\n >\n {useItemID ? (\n <Status\n statusID={statusID}\n instance={instance}\n size=\"s\"\n />\n ) : (\n <Status\n status={item}\n instance={instance}\n size=\"s\"\n />\n )}\n </Link>\n );\n })}\n </li>\n );\n }\n\n const actualStatusID = reblog?.id || statusID;\n const url = instance\n ? `/${instance}/s/${actualStatusID}`\n : `/s/${actualStatusID}`;\n if (_pinned) useItemID = false;\n return (\n <li key={statusID}>\n <Link\n class=\"status-carousel-link timeline-item-alt\"\n to={url}\n >\n {useItemID ? (\n <Status\n statusID={statusID}\n instance={instance}\n size=\"s\"\n contentTextWeight\n enableCommentHint\n // allowFilters={allowFilters}\n mediaFirst={mediaFirst}\n />\n ) : (\n <Status\n status={item}\n instance={instance}\n size=\"s\"\n contentTextWeight\n enableCommentHint\n // allowFilters={allowFilters}\n mediaFirst={mediaFirst}\n />\n )}\n </Link>\n </li>\n );\n })}\n </StatusCarousel>\n </li>\n );\n }\n const manyItems = fItems.length > 3;\n return fItems.map((item, i) => {\n const { id: statusID, _differentAuthor } = item;\n const url = instance ? `/${instance}/s/${statusID}` : `/s/${statusID}`;\n const isMiddle = i > 0 && i < fItems.length - 1;\n const isSpoiler = item.sensitive && !!item.spoilerText;\n const showCompact =\n (!_differentAuthor && isSpoiler && i > 0) ||\n (manyItems &&\n isMiddle &&\n (type === 'thread' ||\n (type === 'conversation' &&\n !_differentAuthor &&\n !fItems[i - 1]._differentAuthor &&\n !fItems[i + 1]._differentAuthor)));\n const isStart = i === 0;\n const isEnd = i === fItems.length - 1;\n return (\n <li\n key={`timeline-${statusID}`}\n class={`timeline-item-container timeline-item-container-type-${type} timeline-item-container-${\n isStart ? 'start' : isEnd ? 'end' : 'middle'\n } ${_differentAuthor ? 'timeline-item-diff-author' : ''}`}\n >\n <Link class=\"status-link timeline-item\" to={url}>\n {showCompact ? (\n <TimelineStatusCompact\n status={item}\n instance={instance}\n filterContext={filterContext}\n />\n ) : useItemID ? (\n <Status\n statusID={statusID}\n instance={instance}\n enableCommentHint={isEnd}\n showFollowedTags={showFollowedTags}\n // allowFilters={allowFilters}\n />\n ) : (\n <Status\n status={item}\n instance={instance}\n enableCommentHint={isEnd}\n showFollowedTags={showFollowedTags}\n // allowFilters={allowFilters}\n />\n )}\n </Link>\n </li>\n );\n });\n }\n\n const itemKey = `timeline-${statusID + _pinned}`;\n\n if (view === 'media') {\n return useItemID ? (\n <MediaPost\n class=\"timeline-item\"\n parent=\"li\"\n key={itemKey}\n statusID={statusID}\n instance={instance}\n // allowFilters={allowFilters}\n />\n ) : (\n <MediaPost\n class=\"timeline-item\"\n parent=\"li\"\n key={itemKey}\n status={status}\n instance={instance}\n // allowFilters={allowFilters}\n />\n );\n }\n\n return (\n <li key={itemKey}>\n <Link class=\"status-link timeline-item\" to={url}>\n {useItemID ? (\n <Status\n statusID={statusID}\n instance={instance}\n enableCommentHint\n showFollowedTags={showFollowedTags}\n showReplyParent={showReplyParent}\n // allowFilters={allowFilters}\n mediaFirst={mediaFirst}\n />\n ) : (\n <Status\n status={status}\n instance={instance}\n enableCommentHint\n showFollowedTags={showFollowedTags}\n showReplyParent={showReplyParent}\n // allowFilters={allowFilters}\n mediaFirst={mediaFirst}\n />\n )}\n </Link>\n </li>\n );\n },\n (oldProps, newProps) => {\n const oldID = (oldProps.status?.id || '').toString();\n const newID = (newProps.status?.id || '').toString();\n return (\n oldID === newID &&\n oldProps.instance === newProps.instance &&\n oldProps.view === newProps.view\n );\n },\n);\n\nfunction StatusCarousel({ title, class: className, children }) {\n const carouselRef = useRef();\n // const { reachStart, reachEnd, init } = useScroll({\n // scrollableRef: carouselRef,\n // direction: 'horizontal',\n // });\n const startButtonRef = useRef();\n const endButtonRef = useRef();\n // useScrollFn(\n // {\n // scrollableRef: carouselRef,\n // direction: 'horizontal',\n // init: true,\n // },\n // ({ reachStart, reachEnd }) => {\n // if (startButtonRef.current) startButtonRef.current.disabled = reachStart;\n // if (endButtonRef.current) endButtonRef.current.disabled = reachEnd;\n // },\n // [],\n // );\n // useEffect(() => {\n // init?.();\n // }, []);\n\n const [render, setRender] = useState(false);\n useEffect(() => {\n setTimeout(() => {\n setRender(true);\n }, 1);\n }, []);\n\n return (\n <div class={`status-carousel ${className}`}>\n <header>\n <h3>{title}</h3>\n <span>\n <button\n ref={startButtonRef}\n type=\"button\"\n class=\"small plain2\"\n // disabled={reachStart}\n onClick={() => {\n const left =\n Math.min(320, carouselRef.current?.offsetWidth) *\n (isRTL() ? 1 : -1);\n carouselRef.current?.scrollBy({\n left,\n behavior: 'smooth',\n });\n }}\n >\n <Icon icon=\"chevron-left\" alt={t`Previous`} />\n </button>{' '}\n <button\n ref={endButtonRef}\n type=\"button\"\n class=\"small plain2\"\n // disabled={reachEnd}\n onClick={() => {\n const left =\n Math.min(320, carouselRef.current?.offsetWidth) *\n (isRTL() ? -1 : 1);\n carouselRef.current?.scrollBy({\n left,\n behavior: 'smooth',\n });\n }}\n >\n <Icon icon=\"chevron-right\" alt={t`Next`} />\n </button>\n </span>\n </header>\n <ul ref={carouselRef}>\n <InView\n class=\"status-carousel-beacon\"\n onChange={(inView) => {\n if (startButtonRef.current)\n startButtonRef.current.disabled = inView;\n }}\n />\n {children[0]}\n {render && children.slice(1)}\n <InView\n class=\"status-carousel-beacon\"\n onChange={(inView) => {\n if (endButtonRef.current) endButtonRef.current.disabled = inView;\n }}\n />\n </ul>\n </div>\n );\n}\n\nfunction TimelineStatusCompact({ status, instance, filterContext }) {\n const snapStates = useSnapshot(states);\n const { id, visibility, language } = status;\n const statusPeekText = statusPeek(status);\n const sKey = statusKey(id, instance);\n const filterInfo = isFiltered(status.filtered, filterContext);\n return (\n <article\n class={`status compact-thread ${\n visibility === 'direct' ? 'visibility-direct' : ''\n }`}\n tabindex=\"-1\"\n >\n {!!snapStates.statusThreadNumber[sKey] ? (\n <div class=\"status-thread-badge\">\n <Icon icon=\"thread\" size=\"s\" alt={t`Thread`} />\n {snapStates.statusThreadNumber[sKey]\n ? ` ${snapStates.statusThreadNumber[sKey]}/X`\n : ''}\n </div>\n ) : (\n <div class=\"status-thread-badge\">\n <Icon icon=\"thread\" size=\"s\" alt={t`Thread`} />\n </div>\n )}\n <div\n class=\"content-compact\"\n title={statusPeekText}\n lang={language}\n dir=\"auto\"\n >\n {!!filterInfo ? (\n <b\n class=\"status-filtered-badge badge-meta horizontal\"\n title={filterInfo?.titlesStr || ''}\n >\n {filterInfo?.titlesStr ? (\n <Trans>\n <span>Filtered</span>: <span>{filterInfo.titlesStr}</span>\n </Trans>\n ) : (\n <span>\n <Trans>Filtered</Trans>\n </span>\n )}\n </b>\n ) : (\n <>\n {statusPeekText}\n {status.sensitive && status.spoilerText && (\n <>\n {' '}\n <span class=\"spoiler-badge\">\n <Icon icon=\"eye-close\" size=\"s\" alt={t`Content warning`} />\n </span>\n </>\n )}\n </>\n )}\n </div>\n </article>\n );\n}\n\nfunction inBackground() {\n return !!document.querySelector('.deck-backdrop, #modal-container > *');\n}\n\nexport default Timeline;\n","import { t, Trans } from '@lingui/macro';\nimport { useLingui } from '@lingui/react';\nimport { MenuItem } from '@szhsin/react-menu';\nimport {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'preact/hooks';\nimport punycode from 'punycode/';\nimport { useParams, useSearchParams } from 'react-router-dom';\nimport { useSnapshot } from 'valtio';\n\nimport AccountInfo from '../components/account-info';\nimport EmojiText from '../components/emoji-text';\nimport Icon from '../components/icon';\nimport Link from '../components/link';\nimport Menu2 from '../components/menu2';\nimport Timeline from '../components/timeline';\nimport { api } from '../utils/api';\nimport pmem from '../utils/pmem';\nimport showToast from '../utils/show-toast';\nimport states, { saveStatus } from '../utils/states';\nimport { isMediaFirstInstance } from '../utils/store-utils';\nimport useTitle from '../utils/useTitle';\n\nconst LIMIT = 20;\nconst MIN_YEAR = 1983;\nconst MIN_YEAR_MONTH = `${MIN_YEAR}-01`; // Birth of the Internet\n\nconst supportsInputMonth = (() => {\n try {\n const input = document.createElement('input');\n input.setAttribute('type', 'month');\n return input.type === 'month';\n } catch (e) {\n return false;\n }\n})();\n\nasync function _isSearchEnabled(instance) {\n const { masto } = api({ instance });\n const results = await masto.v2.search.fetch({\n q: 'from:me',\n type: 'statuses',\n limit: 1,\n });\n return !!results?.statuses?.length;\n}\nconst isSearchEnabled = pmem(_isSearchEnabled);\n\nfunction AccountStatuses() {\n const snapStates = useSnapshot(states);\n const { id, ...params } = useParams();\n const [searchParams, setSearchParams] = useSearchParams();\n const month = searchParams.get('month');\n const excludeReplies = !searchParams.get('replies');\n const excludeBoosts = !!searchParams.get('boosts');\n const tagged = searchParams.get('tagged');\n const media = !!searchParams.get('media');\n const { masto, instance, authenticated } = api({ instance: params.instance });\n const { masto: currentMasto, instance: currentInstance } = api();\n const accountStatusesIterator = useRef();\n\n const allSearchParams = [month, excludeReplies, excludeBoosts, tagged, media];\n const [account, setAccount] = useState();\n const searchOffsetRef = useRef(0);\n useEffect(() => {\n searchOffsetRef.current = 0;\n }, allSearchParams);\n\n const mediaFirst = useMemo(() => isMediaFirstInstance(), []);\n\n const sameCurrentInstance = useMemo(\n () => instance === currentInstance,\n [instance, currentInstance],\n );\n const [searchEnabled, setSearchEnabled] = useState(false);\n useEffect(() => {\n // Only enable for current logged-in instance\n // Most remote instances don't allow unauthenticated searches\n if (!sameCurrentInstance) return;\n if (!account?.acct) return;\n (async () => {\n const enabled = await isSearchEnabled(instance);\n console.log({ enabled });\n setSearchEnabled(enabled);\n })();\n }, [instance, sameCurrentInstance, account?.acct]);\n\n async function fetchAccountStatuses(firstLoad) {\n const isValidMonth = /^\\d{4}-[01]\\d$/.test(month);\n const isValidYear = month?.split?.('-')?.[0] >= MIN_YEAR;\n if (isValidMonth && isValidYear) {\n if (!account) {\n return {\n value: [],\n done: true,\n };\n }\n const [_year, _month] = month.split('-');\n const monthIndex = parseInt(_month, 10) - 1;\n // YYYY-MM (no day)\n // Search options:\n // - from:account\n // - after:YYYY-MM-DD (non-inclusive)\n // - before:YYYY-MM-DD (non-inclusive)\n\n // Last day of previous month\n const after = new Date(_year, monthIndex, 0);\n const afterStr = `${after.getFullYear()}-${(after.getMonth() + 1)\n .toString()\n .padStart(2, '0')}-${after.getDate().toString().padStart(2, '0')}`;\n // First day of next month\n const before = new Date(_year, monthIndex + 1, 1);\n const beforeStr = `${before.getFullYear()}-${(before.getMonth() + 1)\n .toString()\n .padStart(2, '0')}-${before.getDate().toString().padStart(2, '0')}`;\n console.log({\n month,\n _year,\n _month,\n monthIndex,\n after,\n before,\n afterStr,\n beforeStr,\n });\n\n let limit;\n if (firstLoad) {\n limit = LIMIT + 1;\n searchOffsetRef.current = 0;\n } else {\n limit = LIMIT + searchOffsetRef.current + 1;\n searchOffsetRef.current += LIMIT;\n }\n\n const searchResults = await masto.v2.search.fetch({\n q: `from:${account.acct} after:${afterStr} before:${beforeStr}`,\n type: 'statuses',\n limit,\n offset: searchOffsetRef.current,\n });\n if (searchResults?.statuses?.length) {\n const value = searchResults.statuses.slice(0, LIMIT);\n value.forEach((item) => {\n saveStatus(item, instance);\n });\n const done = searchResults.statuses.length <= LIMIT;\n return { value, done };\n } else {\n return { value: [], done: true };\n }\n }\n\n let results = [];\n if (firstLoad) {\n const { value } = await masto.v1.accounts\n .$select(id)\n .statuses.list({\n pinned: true,\n })\n .next();\n if (value?.length && !tagged && !media) {\n const pinnedStatuses = value.map((status) => {\n saveStatus(status, instance);\n return {\n ...status,\n _pinned: true,\n };\n });\n if (pinnedStatuses.length >= 3) {\n const pinnedStatusesIds = pinnedStatuses.map((status) => status.id);\n results.push({\n id: pinnedStatusesIds,\n items: pinnedStatuses,\n type: 'pinned',\n });\n } else {\n results.push(...pinnedStatuses);\n }\n }\n }\n if (firstLoad || !accountStatusesIterator.current) {\n accountStatusesIterator.current = masto.v1.accounts\n .$select(id)\n .statuses.list({\n limit: LIMIT,\n exclude_replies: excludeReplies,\n exclude_reblogs: excludeBoosts,\n only_media: media || undefined,\n tagged,\n });\n }\n const { value, done } = await accountStatusesIterator.current.next();\n if (value?.length) {\n // Check if value is same as pinned post (results)\n // If the index for every post is the same, means API might not support pinned posts\n if (results.length) {\n let pinnedStatusesIds = [];\n if (results[0]?.type === 'pinned') {\n pinnedStatusesIds = results[0].id;\n } else {\n pinnedStatusesIds = results\n .filter((status) => status._pinned)\n .map((status) => status.id);\n }\n const containsAllPinned = pinnedStatusesIds.every((postId) =>\n value.some((status) => status.id === postId),\n );\n if (containsAllPinned) {\n // Remove pinned posts\n results = [];\n }\n }\n\n results.push(...value);\n\n value.forEach((item) => {\n saveStatus(item, instance);\n });\n }\n return {\n value: results,\n done,\n };\n }\n\n const [featuredTags, setFeaturedTags] = useState([]);\n const { i18n } = useLingui();\n let title = t`Account posts`;\n if (account?.acct) {\n const acctDisplay = (/@/.test(account.acct) ? '' : '@') + account.acct;\n const accountDisplay = account?.displayName\n ? `${account.displayName} (${acctDisplay})`\n : `${acctDisplay}`;\n if (!excludeReplies) {\n title = t`${accountDisplay} (+ Replies)`;\n } else if (excludeBoosts) {\n title = t`${accountDisplay} (- Boosts)`;\n } else if (tagged) {\n title = t`${accountDisplay} (#${tagged})`;\n } else if (media) {\n title = t`${accountDisplay} (Media)`;\n } else if (month) {\n const monthYear = new Date(month).toLocaleString(i18n.locale, {\n month: 'long',\n year: 'numeric',\n });\n title = t`${accountDisplay} (${monthYear})`;\n } else {\n title = accountDisplay;\n }\n }\n useTitle(title, '/:instance?/a/:id');\n\n const fetchAccountPromiseRef = useRef();\n const fetchAccount = useCallback(() => {\n const fetchPromise =\n fetchAccountPromiseRef.current || masto.v1.accounts.$select(id).fetch();\n fetchAccountPromiseRef.current = fetchPromise;\n return fetchPromise;\n }, [id, masto]);\n\n useEffect(() => {\n (async () => {\n try {\n const acc = await fetchAccount();\n console.log(acc);\n setAccount(acc);\n } catch (e) {\n console.error(e);\n }\n // No need, because the whole filter bar is hidden\n // TODO: Revisit this\n if (!mediaFirst) {\n try {\n const featuredTags = await masto.v1.accounts\n .$select(id)\n .featuredTags.list();\n console.log({ featuredTags });\n setFeaturedTags(featuredTags);\n } catch (e) {\n console.error(e);\n }\n }\n })();\n }, [id, mediaFirst]);\n\n const { displayName, acct, emojis } = account || {};\n\n const filterBarRef = useRef();\n const TimelineStart = useMemo(() => {\n const filtered =\n !excludeReplies || excludeBoosts || tagged || media || !!month;\n const cachedAccount = snapStates.accounts[`${id}@${instance}`];\n\n return (\n <>\n <AccountInfo\n instance={instance}\n account={cachedAccount || id}\n fetchAccount={fetchAccount}\n authenticated={authenticated}\n standalone\n />\n {!mediaFirst && (\n <div\n class=\"filter-bar\"\n ref={filterBarRef}\n style={{\n position: 'relative',\n }}\n >\n {filtered ? (\n <Link\n to={`/${instance}/a/${id}`}\n class=\"insignificant filter-clear\"\n title={t`Clear filters`}\n key=\"clear-filters\"\n >\n <Icon icon=\"x\" size=\"l\" alt={t`Clear`} />\n </Link>\n ) : (\n <Icon\n icon=\"filter\"\n class=\"insignificant\"\n size=\"l\"\n alt={t`Filters`}\n />\n )}\n <Link\n to={`/${instance}/a/${id}${excludeReplies ? '?replies=1' : ''}`}\n onClick={() => {\n if (excludeReplies) {\n showToast(t`Showing post with replies`);\n }\n }}\n class={excludeReplies ? '' : 'is-active'}\n >\n <Trans>+ Replies</Trans>\n </Link>\n <Link\n to={`/${instance}/a/${id}${excludeBoosts ? '' : '?boosts=0'}`}\n onClick={() => {\n if (!excludeBoosts) {\n showToast(t`Showing posts without boosts`);\n }\n }}\n class={!excludeBoosts ? '' : 'is-active'}\n >\n <Trans>- Boosts</Trans>\n </Link>\n <Link\n to={`/${instance}/a/${id}${media ? '' : '?media=1'}`}\n onClick={() => {\n if (!media) {\n showToast(t`Showing posts with media`);\n }\n }}\n class={media ? 'is-active' : ''}\n >\n <Trans>Media</Trans>\n </Link>\n {featuredTags.map((tag) => (\n <Link\n key={tag.id}\n to={`/${instance}/a/${id}${\n tagged === tag.name\n ? ''\n : `?tagged=${encodeURIComponent(tag.name)}`\n }`}\n onClick={() => {\n if (tagged !== tag.name) {\n showToast(t`Showing posts tagged with #${tag.name}`);\n }\n }}\n class={tagged === tag.name ? 'is-active' : ''}\n >\n <span>\n <span class=\"more-insignificant\">#</span>\n {tag.name}\n </span>\n {\n // The count differs based on instance 😅\n }\n {/* <span class=\"filter-count\">{tag.statusesCount}</span> */}\n </Link>\n ))}\n {searchEnabled &&\n (supportsInputMonth ? (\n <label class={`filter-field ${month ? 'is-active' : ''}`}>\n <Icon icon=\"month\" size=\"l\" />\n <input\n type=\"month\"\n disabled={!account?.acct}\n value={month || ''}\n min={MIN_YEAR_MONTH}\n max={new Date().toISOString().slice(0, 7)}\n onInput={(e) => {\n const { value, validity } = e.currentTarget;\n if (!validity.valid) return;\n setSearchParams(\n value\n ? {\n month: value,\n }\n : {},\n );\n const [year, month] = value.split('-');\n const monthIndex = parseInt(month, 10) - 1;\n const date = new Date(year, monthIndex);\n showToast(\n t`Showing posts in ${date.toLocaleString(i18n.locale, {\n month: 'long',\n year: 'numeric',\n })}`,\n );\n }}\n />\n </label>\n ) : (\n // Fallback to <select> for month and <input type=\"number\"> for year\n <MonthPicker\n class={`filter-field ${month ? 'is-active' : ''}`}\n disabled={!account?.acct}\n value={month || ''}\n min={MIN_YEAR_MONTH}\n max={new Date().toISOString().slice(0, 7)}\n onInput={(e) => {\n const { value, validity } = e;\n if (!validity.valid) return;\n setSearchParams(\n value\n ? {\n month: value,\n }\n : {},\n );\n }}\n />\n ))}\n </div>\n )}\n </>\n );\n }, [\n id,\n instance,\n authenticated,\n featuredTags,\n fetchAccount,\n searchEnabled,\n ...allSearchParams,\n ]);\n\n useEffect(() => {\n // Focus on .is-active\n const active = filterBarRef.current?.querySelector('.is-active');\n if (active) {\n console.log('active', active, active.offsetLeft);\n filterBarRef.current.scrollTo({\n behavior: 'smooth',\n left:\n active.offsetLeft -\n (filterBarRef.current.offsetWidth - active.offsetWidth) / 2,\n });\n }\n }, [featuredTags, searchEnabled, ...allSearchParams]);\n\n const accountInstance = useMemo(() => {\n if (!account?.url) return null;\n const domain = URL.parse(account.url).hostname;\n return domain;\n }, [account]);\n const sameInstance = instance === accountInstance;\n const allowSwitch = !!account && !sameInstance;\n\n return (\n <Timeline\n key={id}\n title={`${account?.acct ? '@' + account.acct : t`Posts`}`}\n titleComponent={\n <h1\n class=\"header-double-lines header-account\"\n // onClick={() => {\n // states.showAccount = {\n // account,\n // instance,\n // };\n // }}\n >\n <b>\n <EmojiText text={displayName} emojis={emojis} />\n </b>\n <div>\n <span class=\"bidi-isolate\">@{acct}</span>\n </div>\n </h1>\n }\n id=\"account-statuses\"\n instance={instance}\n emptyText={t`Nothing to see here yet.`}\n errorText={t`Unable to load posts`}\n fetchItems={fetchAccountStatuses}\n useItemID\n view={media || mediaFirst ? 'media' : undefined}\n boostsCarousel={snapStates.settings.boostsCarousel}\n timelineStart={TimelineStart}\n refresh={[\n excludeReplies,\n excludeBoosts,\n tagged,\n media,\n month + account?.acct,\n ].toString()}\n headerEnd={\n <Menu2\n portal\n // setDownOverflow\n overflow=\"auto\"\n viewScroll=\"close\"\n position=\"anchor\"\n menuButton={\n <button type=\"button\" class=\"plain\">\n <Icon icon=\"more\" size=\"l\" alt={t`More`} />\n </button>\n }\n >\n <MenuItem\n disabled={!allowSwitch}\n onClick={() => {\n (async () => {\n try {\n const { masto } = api({\n instance: accountInstance,\n });\n const acc = await masto.v1.accounts.lookup({\n acct: account.acct,\n });\n const { id } = acc;\n location.hash = `/${accountInstance}/a/${id}`;\n } catch (e) {\n console.error(e);\n alert(t`Unable to fetch account info`);\n }\n })();\n }}\n >\n <Icon icon=\"transfer\" />{' '}\n <small class=\"menu-double-lines\">\n <Trans>\n Switch to account's instance{' '}\n {accountInstance ? (\n <>\n {' '}\n (<b>{punycode.toUnicode(accountInstance)}</b>)\n </>\n ) : null}\n </Trans>\n </small>\n </MenuItem>\n {!sameCurrentInstance && (\n <MenuItem\n onClick={() => {\n (async () => {\n try {\n const acc = await currentMasto.v1.accounts.lookup({\n acct: account.acct + '@' + instance,\n });\n const { id } = acc;\n location.hash = `/${currentInstance}/a/${id}`;\n } catch (e) {\n console.error(e);\n alert(t`Unable to fetch account info`);\n }\n })();\n }}\n >\n <Icon icon=\"transfer\" />{' '}\n <small class=\"menu-double-lines\">\n <Trans>\n Switch to my instance (<b>{currentInstance}</b>)\n </Trans>\n </small>\n </MenuItem>\n )}\n </Menu2>\n }\n />\n );\n}\n\nfunction MonthPicker(props) {\n const { i18n } = useLingui();\n const {\n class: className,\n disabled,\n value,\n min,\n max,\n onInput = () => {},\n } = props;\n const [_year, _month] = value?.split('-') || [];\n const monthFieldRef = useRef();\n const yearFieldRef = useRef();\n\n const checkValidity = (month, year) => {\n const [minYear, minMonth] = min?.split('-') || [];\n const [maxYear, maxMonth] = max?.split('-') || [];\n if (year < minYear) return false;\n if (year > maxYear) return false;\n if (year === minYear && month < minMonth) return false;\n if (year === maxYear && month > maxMonth) return false;\n return true;\n };\n\n return (\n <div class={className}>\n <Icon icon=\"month\" size=\"l\" />\n <select\n ref={monthFieldRef}\n disabled={disabled}\n value={_month || ''}\n onInput={(e) => {\n const { value: month } = e.currentTarget;\n const year = yearFieldRef.current.value;\n if (!checkValidity(month, year))\n return {\n value: '',\n validity: {\n valid: false,\n },\n };\n onInput({\n value: month ? `${year}-${month}` : '',\n validity: {\n valid: true,\n },\n });\n }}\n >\n <option value=\"\">\n <Trans>Month</Trans>\n </option>\n <option disabled>-----</option>\n {Array.from({ length: 12 }, (_, i) => (\n <option\n value={\n // Month is 1-indexed\n (i + 1).toString().padStart(2, '0')\n }\n key={i}\n >\n {new Date(0, i).toLocaleString(i18n.locale, {\n month: 'long',\n })}\n </option>\n ))}\n </select>{' '}\n <input\n ref={yearFieldRef}\n type=\"number\"\n disabled={disabled}\n value={_year || new Date().getFullYear()}\n min={min?.slice(0, 4) || MIN_YEAR}\n max={max?.slice(0, 4) || new Date().getFullYear()}\n onInput={(e) => {\n const { value: year, validity } = e.currentTarget;\n const month = monthFieldRef.current.value;\n if (!validity.valid || !checkValidity(month, year))\n return {\n value: '',\n validity: {\n valid: false,\n },\n };\n onInput({\n value: year ? `${year}-${month}` : '',\n validity: {\n valid: true,\n },\n });\n }}\n style={{\n width: '4.5em',\n }}\n />\n </div>\n );\n}\n\nexport default AccountStatuses;\n","import { t, Trans } from '@lingui/macro';\nimport { useRef } from 'preact/hooks';\n\nimport Timeline from '../components/timeline';\nimport { api } from '../utils/api';\nimport useTitle from '../utils/useTitle';\n\nconst LIMIT = 20;\n\nfunction Bookmarks() {\n useTitle(t`Bookmarks`, '/bookmarks');\n const { masto, instance } = api();\n const bookmarksIterator = useRef();\n async function fetchBookmarks(firstLoad) {\n if (firstLoad || !bookmarksIterator.current) {\n bookmarksIterator.current = masto.v1.bookmarks.list({ limit: LIMIT });\n }\n return await bookmarksIterator.current.next();\n }\n\n return (\n <Timeline\n title={t`Bookmarks`}\n id=\"bookmarks\"\n emptyText={t`No bookmarks yet. Go bookmark something!`}\n errorText={t`Unable to load bookmarks.`}\n instance={instance}\n fetchItems={fetchBookmarks}\n />\n );\n}\n\nexport default Bookmarks;\n","export default \"__VITE_ASSET__S_9SYp01__\"","import '../components/links-bar.css';\nimport './catchup.css';\n\nimport autoAnimate from '@formkit/auto-animate';\nimport { msg, Plural, select, t, Trans } from '@lingui/macro';\nimport { useLingui } from '@lingui/react';\nimport { getBlurHashAverageColor } from 'fast-blurhash';\nimport { Fragment } from 'preact';\nimport { memo } from 'preact/compat';\nimport {\n useCallback,\n useEffect,\n useMemo,\n useReducer,\n useRef,\n useState,\n} from 'preact/hooks';\nimport punycode from 'punycode/';\nimport { useHotkeys } from 'react-hotkeys-hook';\nimport { useSearchParams } from 'react-router-dom';\nimport { uid } from 'uid/single';\n\nimport catchupUrl from '../assets/features/catch-up.png';\n\nimport Avatar from '../components/avatar';\nimport Icon from '../components/icon';\nimport Link from '../components/link';\nimport Loader from '../components/loader';\nimport Modal from '../components/modal';\nimport NameText from '../components/name-text';\nimport NavMenu from '../components/nav-menu';\nimport RelativeTime from '../components/relative-time';\nimport { api } from '../utils/api';\nimport { oklab2rgb, rgb2oklab } from '../utils/color-utils';\nimport db from '../utils/db';\nimport emojifyText from '../utils/emojify-text';\nimport { isFiltered } from '../utils/filters';\nimport htmlContentLength from '../utils/html-content-length';\nimport mem from '../utils/mem';\nimport niceDateTime from '../utils/nice-date-time';\nimport shortenNumber from '../utils/shorten-number';\nimport showToast from '../utils/show-toast';\nimport states, { statusKey } from '../utils/states';\nimport statusPeek from '../utils/status-peek';\nimport store from '../utils/store';\nimport { getCurrentAccountID, getCurrentAccountNS } from '../utils/store-utils';\nimport supports from '../utils/supports';\nimport { assignFollowedTags } from '../utils/timeline-utils';\nimport useTitle from '../utils/useTitle';\n\nconst FILTER_CONTEXT = 'home';\n\nconst RANGES = [\n { label: msg`last 1 hour`, value: 1 },\n { label: msg`last 2 hours`, value: 2 },\n { label: msg`last 3 hours`, value: 3 },\n { label: msg`last 4 hours`, value: 4 },\n { label: msg`last 5 hours`, value: 5 },\n { label: msg`last 6 hours`, value: 6 },\n { label: msg`last 7 hours`, value: 7 },\n { label: msg`last 8 hours`, value: 8 },\n { label: msg`last 9 hours`, value: 9 },\n { label: msg`last 10 hours`, value: 10 },\n { label: msg`last 11 hours`, value: 11 },\n { label: msg`last 12 hours`, value: 12 },\n { label: msg`beyond 12 hours`, value: 13 },\n];\n\nconst FILTER_KEYS = {\n original: msg`Original`,\n replies: msg`Replies`,\n boosts: msg`Boosts`,\n followedTags: msg`Followed tags`,\n groups: msg`Groups`,\n filtered: msg`Filtered`,\n};\nconst FILTER_SORTS = [\n 'createdAt',\n 'repliesCount',\n 'favouritesCount',\n 'reblogsCount',\n 'density',\n];\nconst FILTER_GROUPS = [null, 'account'];\n\nconst DTF = mem(\n (locale) =>\n new Intl.DateTimeFormat(locale || undefined, {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n }),\n);\n\nfunction Catchup() {\n const { i18n, _ } = useLingui();\n const dtf = DTF(i18n.locale);\n\n useTitle(`Catch-up`, '/catchup');\n const { masto, instance } = api();\n const [searchParams, setSearchParams] = useSearchParams();\n const id = searchParams.get('id');\n const [uiState, setUIState] = useState('start');\n const [showTopLinks, setShowTopLinks] = useState(false);\n\n const currentAccount = useMemo(() => {\n return getCurrentAccountID();\n }, []);\n const isSelf = (accountID) => accountID === currentAccount;\n\n const supportsPixelfed = supports('@pixelfed/home-include-reblogs');\n\n async function fetchHome({ maxCreatedAt }) {\n const maxCreatedAtDate = maxCreatedAt ? new Date(maxCreatedAt) : null;\n console.debug('fetchHome', maxCreatedAtDate);\n const allResults = [];\n const homeIterator = masto.v1.timelines.home.list({ limit: 40 });\n mainloop: while (true) {\n try {\n if (supportsPixelfed && homeIterator.nextParams) {\n if (typeof homeIterator.nextParams === 'string') {\n homeIterator.nextParams += '&include_reblogs=true';\n } else {\n homeIterator.nextParams.include_reblogs = true;\n }\n }\n const results = await homeIterator.next();\n const { value } = results;\n if (value?.length) {\n // This ignores maxCreatedAt filter, but it's ok for now\n await assignFollowedTags(value, instance);\n let addedResults = false;\n for (let i = 0; i < value.length; i++) {\n const item = value[i];\n const createdAtDate = new Date(item.createdAt);\n if (!maxCreatedAtDate || createdAtDate >= maxCreatedAtDate) {\n // Filtered\n const selfPost = isSelf(\n item.reblog?.account?.id || item.account.id,\n );\n const filterInfo =\n !selfPost &&\n isFiltered(\n item.reblog?.filtered || item.filtered,\n FILTER_CONTEXT,\n );\n if (filterInfo?.action === 'hide') continue;\n item._filtered = filterInfo;\n\n // Followed tags\n const sKey = statusKey(item.id, instance);\n item._followedTags = states.statusFollowedTags[sKey]\n ? [...states.statusFollowedTags[sKey]]\n : [];\n\n allResults.push(item);\n addedResults = true;\n } else {\n // Don't immediately stop, still add the other items that might still be within range\n // break mainloop;\n }\n // Only stop when ALL items are outside of range\n if (!addedResults) {\n break mainloop;\n }\n }\n } else {\n break mainloop;\n }\n // Pause 1s\n await new Promise((resolve) => setTimeout(resolve, 1000));\n } catch (e) {\n console.error(e);\n break mainloop;\n }\n }\n\n // Post-process all results\n // 1. Threadify - tag 1st-post in a thread\n allResults.forEach((status) => {\n if (status?.inReplyToId) {\n const replyToStatus = allResults.find(\n (s) => s.id === status.inReplyToId,\n );\n if (replyToStatus && !replyToStatus.inReplyToId) {\n replyToStatus._thread = true;\n }\n }\n });\n\n return allResults;\n }\n\n const [posts, setPosts] = useState([]);\n const catchupRangeRef = useRef();\n const catchupLastRef = useRef();\n const NS = useMemo(() => getCurrentAccountNS(), []);\n const handleCatchupClick = useCallback(async ({ duration } = {}) => {\n const now = Date.now();\n const maxCreatedAt = duration ? now - duration : null;\n setUIState('loading');\n const results = await fetchHome({ maxCreatedAt });\n // Namespaced by account ID\n // Possible conflict if ID matches between different accounts from different instances\n const catchupID = `${NS}-${uid()}`;\n try {\n await db.catchup.set(catchupID, {\n id: catchupID,\n posts: results,\n count: results.length,\n startAt: maxCreatedAt,\n endAt: now,\n });\n setSearchParams({ id: catchupID });\n } catch (e) {\n console.error(e, results);\n }\n }, []);\n\n useEffect(() => {\n if (id) {\n (async () => {\n const catchup = await db.catchup.get(id);\n if (catchup) {\n catchup.posts.sort((a, b) => (a.createdAt > b.createdAt ? 1 : -1));\n setPosts(catchup.posts);\n setUIState('results');\n }\n })();\n } else if (uiState === 'results') {\n setPosts([]);\n setUIState('start');\n }\n }, [id]);\n\n const [reloadCatchupsCount, reloadCatchups] = useReducer((c) => c + 1, 0);\n const [lastCatchupEndAt, setLastCatchupEndAt] = useState(null);\n const [prevCatchups, setPrevCatchups] = useState([]);\n useEffect(() => {\n (async () => {\n try {\n const catchups = await db.catchup.keys();\n if (catchups.length) {\n const ns = getCurrentAccountNS();\n const ownKeys = catchups.filter((key) => key.startsWith(`${ns}-`));\n if (ownKeys.length) {\n let ownCatchups = await db.catchup.getMany(ownKeys);\n ownCatchups.sort((a, b) => b.endAt - a.endAt);\n\n // Split to 1st 3 last catchups, and the rest\n let lastCatchups = ownCatchups.slice(0, 3);\n let restCatchups = ownCatchups.slice(3);\n\n const trimmedCatchups = lastCatchups.map((c) => {\n const { id, count, startAt, endAt } = c;\n return {\n id,\n count,\n startAt,\n endAt,\n };\n });\n setPrevCatchups(trimmedCatchups);\n setLastCatchupEndAt(lastCatchups[0].endAt);\n\n // GC time\n ownCatchups = null;\n lastCatchups = null;\n\n queueMicrotask(() => {\n if (restCatchups.length) {\n // delete them\n db.catchup\n .delMany(restCatchups.map((c) => c.id))\n .then(() => {\n // GC time\n restCatchups = null;\n })\n .catch((e) => {\n console.error(e);\n });\n }\n });\n\n return;\n }\n }\n } catch (e) {\n console.error(e);\n }\n setPrevCatchups([]);\n })();\n }, [reloadCatchupsCount]);\n useEffect(() => {\n if (uiState === 'start') {\n reloadCatchups();\n }\n }, [uiState === 'start']);\n\n const [filterCounts, links] = useMemo(() => {\n let filtered = 0,\n groups = 0,\n boosts = 0,\n replies = 0,\n followedTags = 0,\n original = 0;\n const links = {};\n for (const post of posts) {\n if (post._filtered) {\n filtered++;\n post.__FILTER = 'filtered';\n } else if (post.group) {\n groups++;\n post.__FILTER = 'groups';\n } else if (post.reblog) {\n boosts++;\n post.__FILTER = 'boosts';\n } else if (post._followedTags?.length) {\n followedTags++;\n post.__FILTER = 'followedTags';\n } else if (\n post.inReplyToId &&\n post.inReplyToAccountId !== post.account?.id\n ) {\n replies++;\n post.__FILTER = 'replies';\n } else {\n original++;\n post.__FILTER = 'original';\n }\n\n const thePost = post.reblog || post;\n if (\n post.__FILTER !== 'filtered' &&\n thePost.card?.url &&\n thePost.card?.image &&\n thePost.card?.type === 'link'\n ) {\n const { card, favouritesCount, reblogsCount } = thePost;\n let { url } = card;\n url = url.replace(/\\/$/, '');\n if (!links[url]) {\n links[url] = {\n postID: thePost.id,\n card,\n shared: 1,\n sharers: [post.account],\n likes: favouritesCount,\n boosts: reblogsCount,\n };\n } else {\n if (links[url].sharers.find((a) => a.id === post.account.id)) {\n continue;\n }\n links[url].shared++;\n links[url].sharers.push(post.account);\n if (links[url].postID !== thePost.id) {\n links[url].likes += favouritesCount;\n links[url].boosts += reblogsCount;\n }\n }\n }\n }\n\n let topLinks = [];\n for (const link in links) {\n topLinks.push({\n url: link,\n ...links[link],\n });\n }\n topLinks.sort((a, b) => {\n if (a.shared > b.shared) return -1;\n if (a.shared < b.shared) return 1;\n if (a.boosts > b.boosts) return -1;\n if (a.boosts < b.boosts) return 1;\n if (a.likes > b.likes) return -1;\n if (a.likes < b.likes) return 1;\n return 0;\n });\n\n // Slice links to shared > 1 but min 10 links\n if (topLinks.length > 10) {\n linksLoop: for (let i = 10; i < topLinks.length; i++) {\n const { shared } = topLinks[i];\n if (shared <= 1) {\n topLinks = topLinks.slice(0, i);\n break linksLoop;\n }\n }\n }\n\n return [\n {\n filtered,\n groups,\n boosts,\n replies,\n followedTags,\n original,\n },\n topLinks,\n ];\n }, [posts]);\n\n const [selectedFilterCategory, setSelectedFilterCategory] = useState('all');\n const [selectedAuthor, setSelectedAuthor] = useState(null);\n\n const [range, setRange] = useState(1);\n\n const [sortBy, setSortBy] = useState('createdAt');\n const [sortOrder, setSortOrder] = useState('asc');\n const [groupBy, setGroupBy] = useState(null);\n\n const [filteredPosts, authors, authorCounts] = useMemo(() => {\n const authorsHash = {};\n const authorCountsMap = new Map();\n\n let filteredPosts = posts.filter((post) => {\n const postFilterMatches =\n selectedFilterCategory === 'all' ||\n post.__FILTER === selectedFilterCategory;\n\n if (postFilterMatches) {\n authorsHash[post.account.id] = post.account;\n authorCountsMap.set(\n post.account.id,\n (authorCountsMap.get(post.account.id) || 0) + 1,\n );\n }\n\n return postFilterMatches;\n });\n\n // Deduplicate boosts\n const boostedPosts = {};\n filteredPosts.forEach((post) => {\n if (post.reblog) {\n if (boostedPosts[post.reblog.id]) {\n if (boostedPosts[post.reblog.id].__BOOSTERS) {\n boostedPosts[post.reblog.id].__BOOSTERS.add(post.account);\n } else {\n boostedPosts[post.reblog.id].__BOOSTERS = new Set([post.account]);\n }\n post.__HIDDEN = true;\n } else {\n boostedPosts[post.reblog.id] = post;\n }\n }\n });\n\n if (selectedAuthor && authorCountsMap.has(selectedAuthor)) {\n filteredPosts = filteredPosts.filter(\n (post) =>\n post.account.id === selectedAuthor ||\n [...(post.__BOOSTERS || [])].find((a) => a.id === selectedAuthor),\n );\n }\n\n return [filteredPosts, authorsHash, Object.fromEntries(authorCountsMap)];\n }, [selectedFilterCategory, selectedAuthor, posts]);\n\n const filteredPostsMap = useMemo(() => {\n const map = {};\n filteredPosts.forEach((post) => {\n map[post.id] = post;\n });\n return map;\n }, [filteredPosts]);\n\n const authorCountsList = useMemo(\n () =>\n Object.keys(authorCounts).sort(\n (a, b) => authorCounts[b] - authorCounts[a],\n ),\n [authorCounts],\n );\n\n const sortedFilteredPosts = useMemo(() => {\n const authorIndices = {};\n authorCountsList.forEach((authorID, index) => {\n authorIndices[authorID] = index;\n });\n return filteredPosts\n .filter((post) => !post.__HIDDEN)\n .sort((a, b) => {\n if (groupBy === 'account') {\n const aAccountID = a.account.id;\n const bAccountID = b.account.id;\n const aIndex = authorIndices[aAccountID];\n const bIndex = authorIndices[bAccountID];\n const order = aIndex - bIndex;\n if (order !== 0) {\n return order;\n }\n }\n if (sortBy !== 'createdAt') {\n a = a.reblog || a;\n b = b.reblog || b;\n if (sortBy !== 'density' && a[sortBy] === b[sortBy]) {\n return a.createdAt > b.createdAt ? 1 : -1;\n }\n }\n if (sortBy === 'density') {\n const aDensity = postDensity(a);\n const bDensity = postDensity(b);\n if (sortOrder === 'asc') {\n return aDensity > bDensity ? 1 : -1;\n } else {\n return bDensity > aDensity ? 1 : -1;\n }\n }\n if (sortOrder === 'asc') {\n return a[sortBy] > b[sortBy] ? 1 : -1;\n } else {\n return b[sortBy] > a[sortBy] ? 1 : -1;\n }\n });\n }, [filteredPosts, sortBy, sortOrder, groupBy, authorCountsList]);\n\n const prevGroup = useRef(null);\n\n const authorsListParent = useRef(null);\n const autoAnimated = useRef(false);\n useEffect(() => {\n if (posts.length > 100 || autoAnimated.current) return;\n if (authorsListParent.current) {\n autoAnimate(authorsListParent.current, {\n duration: 200,\n });\n autoAnimated.current = true;\n }\n }, [posts, authorsListParent]);\n\n const postsBarType = posts.length > 160 ? '3d' : '2d';\n\n const postsBar = useMemo(() => {\n if (postsBarType !== '2d') return null;\n return posts.map((post) => {\n // If part of filteredPosts\n const isFiltered = filteredPostsMap[post.id];\n return (\n <span\n key={post.id}\n class={`post-dot ${isFiltered ? 'post-dot-highlight' : ''}`}\n />\n );\n });\n }, [filteredPostsMap]);\n\n const postsBins = useMemo(() => {\n if (postsBarType !== '3d') return null;\n if (!posts?.length) return null;\n const bins = binByTime(posts, 'createdAt', 320);\n return bins.map((posts, i) => {\n return (\n <div class=\"posts-bin\" key={i}>\n {posts.map((post) => {\n const isFiltered = filteredPostsMap[post.id];\n return (\n <span\n key={post.id}\n class={`post-dot ${isFiltered ? 'post-dot-highlight' : ''}`}\n />\n );\n })}\n </div>\n );\n });\n }, [filteredPostsMap]);\n\n const scrollableRef = useRef(null);\n\n // if range value exceeded lastCatchupEndAt, show error\n const lastCatchupRange = useMemo(() => {\n // return hour, not ms\n if (!lastCatchupEndAt) return null;\n return (Date.now() - lastCatchupEndAt) / 1000 / 60 / 60;\n }, [lastCatchupEndAt, range]);\n\n useEffect(() => {\n if (uiState !== 'results') return;\n const authorUsername =\n selectedAuthor && authors[selectedAuthor]\n ? authors[selectedAuthor].username\n : '';\n const sortOrderIndex = sortOrder === 'asc' ? 0 : 1;\n const groupByText = {\n account: 'authors',\n };\n let toast = showToast({\n duration: 5_000, // 5 seconds\n // Note: I'm sorry, translators\n text: t`Showing ${select(selectedFilterCategory, {\n all: 'all posts',\n original: 'original posts',\n replies: 'replies',\n boosts: 'boosts',\n followedTags: 'followed tags',\n groups: 'groups',\n filtered: 'filtered posts',\n })}, ${select(sortBy, {\n createdAt: select(sortOrder, {\n asc: 'oldest',\n desc: 'latest',\n }),\n reblogsCount: select(sortOrder, {\n asc: 'fewest boosts',\n desc: 'most boosts',\n }),\n favouritesCount: select(sortOrder, {\n asc: 'fewest likes',\n desc: 'most likes',\n }),\n repliesCount: select(sortOrder, {\n asc: 'fewest replies',\n desc: 'most replies',\n }),\n density: select(sortOrder, { asc: 'least dense', desc: 'most dense' }),\n })} first${select(groupBy, {\n account: ', grouped by authors',\n other: '',\n })}`,\n });\n return () => {\n toast?.hideToast?.();\n };\n }, [\n uiState,\n selectedFilterCategory,\n selectedAuthor,\n sortBy,\n sortOrder,\n groupBy,\n authors,\n ]);\n\n useEffect(() => {\n if (selectedAuthor) {\n if (authors[selectedAuthor]) {\n // Check if author is visible and within the scrollable area viewport\n const authorElement = authorsListParent.current.querySelector(\n `[data-author=\"${selectedAuthor}\"]`,\n );\n const scrollableRect =\n authorsListParent.current?.getBoundingClientRect();\n const authorRect = authorElement?.getBoundingClientRect();\n console.log({\n sLeft: scrollableRect.left,\n sRight: scrollableRect.right,\n aLeft: authorRect.left,\n aRight: authorRect.right,\n });\n if (\n authorRect.left < scrollableRect.left ||\n authorRect.right > scrollableRect.right\n ) {\n authorElement.scrollIntoView({\n block: 'nearest',\n inline: 'center',\n behavior: 'smooth',\n });\n } else if (authorRect.top < 0) {\n authorElement.scrollIntoView({\n block: 'nearest',\n inline: 'nearest',\n behavior: 'smooth',\n });\n }\n }\n }\n }, [selectedAuthor, authors]);\n\n const [showHelp, setShowHelp] = useState(false);\n\n const itemsSelector = '.catchup-list > li > a';\n const jRef = useHotkeys(\n 'j',\n () => {\n const activeItem = document.activeElement.closest(itemsSelector);\n const activeItemRect = activeItem?.getBoundingClientRect();\n const allItems = Array.from(\n scrollableRef.current.querySelectorAll(itemsSelector),\n );\n if (\n activeItem &&\n activeItemRect.top < scrollableRef.current.clientHeight &&\n activeItemRect.bottom > 0\n ) {\n const activeItemIndex = allItems.indexOf(activeItem);\n const nextItem = allItems[activeItemIndex + 1];\n if (nextItem) {\n nextItem.focus();\n nextItem.scrollIntoView({\n block: 'center',\n inline: 'center',\n behavior: 'smooth',\n });\n }\n } else {\n const topmostItem = allItems.find((item) => {\n const itemRect = item.getBoundingClientRect();\n return itemRect.top >= 0;\n });\n if (topmostItem) {\n topmostItem.focus();\n topmostItem.scrollIntoView({\n block: 'nearest',\n inline: 'center',\n behavior: 'smooth',\n });\n }\n }\n },\n {\n preventDefault: true,\n ignoreModifiers: true,\n },\n );\n\n const kRef = useHotkeys(\n 'k',\n () => {\n const activeItem = document.activeElement.closest(itemsSelector);\n const activeItemRect = activeItem?.getBoundingClientRect();\n const allItems = Array.from(\n scrollableRef.current.querySelectorAll(itemsSelector),\n );\n if (\n activeItem &&\n activeItemRect.top < scrollableRef.current.clientHeight &&\n activeItemRect.bottom > 0\n ) {\n const activeItemIndex = allItems.indexOf(activeItem);\n let prevItem = allItems[activeItemIndex - 1];\n if (prevItem) {\n prevItem.focus();\n prevItem.scrollIntoView({\n block: 'center',\n inline: 'center',\n behavior: 'smooth',\n });\n }\n } else {\n const topmostItem = allItems.find((item) => {\n const itemRect = item.getBoundingClientRect();\n return itemRect.top >= 44 && itemRect.left >= 0;\n });\n if (topmostItem) {\n topmostItem.focus();\n topmostItem.scrollIntoView({\n block: 'nearest',\n inline: 'center',\n behavior: 'smooth',\n });\n }\n }\n },\n {\n preventDefault: true,\n ignoreModifiers: true,\n },\n );\n\n const hlRef = useHotkeys(\n 'h, l',\n (_, handler) => {\n // Go next/prev selectedAuthor in authorCountsList list\n const key = handler.keys[0];\n if (selectedAuthor) {\n const index = authorCountsList.indexOf(selectedAuthor);\n if (key === 'h') {\n if (index > 0 && index < authorCountsList.length) {\n setSelectedAuthor(authorCountsList[index - 1]);\n scrollableRef.current?.focus();\n }\n } else if (key === 'l') {\n if (index < authorCountsList.length - 1 && index >= 0) {\n setSelectedAuthor(authorCountsList[index + 1]);\n scrollableRef.current?.focus();\n }\n }\n } else if (key === 'l') {\n setSelectedAuthor(authorCountsList[0]);\n scrollableRef.current?.focus();\n }\n },\n {\n preventDefault: true,\n ignoreModifiers: true,\n enableOnFormTags: ['input'],\n },\n );\n\n const escRef = useHotkeys(\n 'esc',\n () => {\n setSelectedAuthor(null);\n scrollableRef.current?.focus();\n },\n {\n preventDefault: true,\n ignoreModifiers: true,\n enableOnFormTags: ['input'],\n },\n );\n\n const dotRef = useHotkeys(\n '.',\n () => {\n scrollableRef.current?.scrollTo({\n top: 0,\n behavior: 'smooth',\n });\n },\n {\n preventDefault: true,\n ignoreModifiers: true,\n enableOnFormTags: ['input'],\n },\n );\n\n const handleArrowKeys = useCallback((e) => {\n const activeElement = document.activeElement;\n const isRadio =\n activeElement?.tagName === 'INPUT' && activeElement.type === 'radio';\n const isArrowKeys =\n e.key === 'ArrowDown' ||\n e.key === 'ArrowUp' ||\n e.key === 'ArrowLeft' ||\n e.key === 'ArrowRight';\n if (isArrowKeys && isRadio) {\n // Note: page scroll won't trigger on first arrow key press due to this. Subsequent presses will.\n activeElement.blur();\n return;\n }\n }, []);\n\n return (\n <div\n ref={(node) => {\n scrollableRef.current = node;\n jRef(node);\n kRef(node);\n hlRef(node);\n escRef(node);\n }}\n id=\"catchup-page\"\n class=\"deck-container\"\n tabIndex=\"-1\"\n >\n <div class=\"timeline-deck deck wide\">\n <header\n class={`${uiState === 'loading' ? 'loading' : ''}`}\n onClick={(e) => {\n if (!e.target.closest('a, button')) {\n scrollableRef.current?.scrollTo({\n top: 0,\n behavior: 'smooth',\n });\n }\n }}\n >\n <div class=\"header-grid\">\n <div class=\"header-side\">\n <NavMenu />\n {uiState === 'results' && (\n <Link to=\"/catchup\" class=\"button plain\">\n <Icon icon=\"history2\" size=\"l\" alt={t`Catch-up`} />\n </Link>\n )}\n {uiState === 'start' && (\n <Link to=\"/\" class=\"button plain\">\n <Icon icon=\"home\" size=\"l\" alt={t`Home`} />\n </Link>\n )}\n </div>\n <h1>\n {uiState !== 'start' && (\n <Trans>\n Catch-up <sup>beta</sup>\n </Trans>\n )}\n </h1>\n <div class=\"header-side\">\n {uiState !== 'start' && uiState !== 'loading' && (\n <button\n type=\"button\"\n class=\"plain\"\n onClick={() => {\n setShowHelp(true);\n }}\n >\n <Trans>Help</Trans>\n </button>\n )}\n </div>\n </div>\n </header>\n <main onKeyDown={handleArrowKeys}>\n {uiState === 'start' && (\n <div class=\"catchup-start\">\n <h1>\n <Trans>\n Catch-up <sup>beta</sup>\n </Trans>\n </h1>\n <details>\n <summary>\n <Trans>What is this?</Trans>\n </summary>\n <p>\n <Trans>\n Catch-up is a separate timeline for your followings,\n offering a high-level view at a glance, with a simple,\n email-inspired interface to effortlessly sort and filter\n through posts.\n </Trans>\n </p>\n <img\n src={catchupUrl}\n width=\"1200\"\n height=\"900\"\n alt={t`Preview of Catch-up UI`}\n />\n <p>\n <button\n type=\"button\"\n onClick={(e) => {\n e.target.closest('details').open = false;\n }}\n >\n <Trans>Let's catch up</Trans>\n </button>\n </p>\n </details>\n <p>\n <Trans>Let's catch up on the posts from your followings.</Trans>\n </p>\n <p>\n <b>\n <Trans>Show me all posts from…</Trans>\n </b>\n </p>\n <div class=\"catchup-form\">\n <input\n ref={catchupRangeRef}\n type=\"range\"\n value={range}\n min={RANGES[0].value}\n max={RANGES[RANGES.length - 1].value}\n step=\"1\"\n list=\"catchup-ranges\"\n onChange={(e) => setRange(+e.target.value)}\n />{' '}\n <span\n style={{\n width: '8em',\n }}\n >\n {_(RANGES[range - 1].label)}\n <br />\n <small class=\"insignificant\">\n {range == RANGES[RANGES.length - 1].value\n ? t`until the max`\n : niceDateTime(\n new Date(Date.now() - range * 60 * 60 * 1000),\n )}\n </small>\n </span>\n <datalist id=\"catchup-ranges\">\n {RANGES.map(({ label, value }) => (\n <option value={value} label={_(label)} />\n ))}\n </datalist>{' '}\n <button\n type=\"button\"\n onClick={() => {\n if (range < RANGES[RANGES.length - 1].value) {\n let duration;\n if (\n range === RANGES[RANGES.length - 1].value &&\n catchupLastRef.current?.checked\n ) {\n duration = Date.now() - lastCatchupEndAt;\n } else {\n duration = range * 60 * 60 * 1000;\n }\n handleCatchupClick({ duration });\n } else {\n handleCatchupClick();\n }\n }}\n >\n <Trans>Catch up</Trans>\n </button>\n </div>\n {lastCatchupRange && range > lastCatchupRange ? (\n <p class=\"catchup-info\">\n <Icon icon=\"info\" />{' '}\n <Trans>Overlaps with your last catch-up</Trans>\n </p>\n ) : range === RANGES[RANGES.length - 1].value &&\n lastCatchupEndAt ? (\n <p class=\"catchup-info\">\n <label>\n <input\n type=\"checkbox\"\n switch\n checked\n ref={catchupLastRef}\n />{' '}\n <Trans>\n Until the last catch-up (\n {dtf.format(new Date(lastCatchupEndAt))})\n </Trans>\n </label>\n </p>\n ) : null}\n <p class=\"insignificant\">\n <small>\n <Trans>\n Note: your instance might only show a maximum of 800 posts\n in the Home timeline regardless of the time range. Could be\n less or more.\n </Trans>\n </small>\n </p>\n {!!prevCatchups?.length && (\n <div class=\"catchup-prev\">\n <p>\n <Trans>Previously…</Trans>\n </p>\n <ul>\n {prevCatchups.map((pc) => (\n <li key={pc.id}>\n <Link to={`/catchup?id=${pc.id}`}>\n <Icon icon=\"history2\" />{' '}\n <span>\n {pc.startAt\n ? dtf.formatRange(\n new Date(pc.startAt),\n new Date(pc.endAt),\n )\n : `… – ${dtf.format(new Date(pc.endAt))}`}\n </span>\n </Link>{' '}\n <span>\n <small class=\"ib insignificant\">\n <Plural\n value={pc.count}\n one=\"# post\"\n other=\"# posts\"\n />\n </small>{' '}\n <button\n type=\"button\"\n class=\"light danger small\"\n onClick={async () => {\n const yes = confirm(t`Remove this catch-up?`);\n if (yes) {\n let st = showToast(\n t`Removing Catch-up ${pc.id}`,\n );\n await db.catchup.del(pc.id);\n st?.hideToast?.();\n showToast(t`Catch-up ${pc.id} removed`);\n reloadCatchups();\n }\n }}\n >\n <Icon icon=\"x\" alt={t`Remove`} />\n </button>\n </span>\n </li>\n ))}\n </ul>\n {prevCatchups.length >= 3 && (\n <p>\n <small>\n <Trans>\n Note: Only max 3 will be stored. The rest will be\n automatically removed.\n </Trans>\n </small>\n </p>\n )}\n </div>\n )}\n </div>\n )}\n {uiState === 'loading' && (\n <div class=\"ui-state catchup-start\">\n <Loader abrupt />\n <p class=\"insignificant\">\n <Trans>Fetching posts…</Trans>\n </p>\n <p class=\"insignificant\">\n <Trans>This might take a while.</Trans>\n </p>\n </div>\n )}\n {uiState === 'results' && (\n <>\n <div class=\"catchup-header\">\n {posts.length > 0 && (\n <p>\n <b class=\"ib\">\n {dtf.formatRange(\n new Date(posts[0].createdAt),\n new Date(posts[posts.length - 1].createdAt),\n )}\n </b>\n </p>\n )}\n <aside>\n <button\n hidden={\n selectedFilterCategory === 'all' &&\n !selectedAuthor &&\n sortBy === 'createdAt' &&\n sortOrder === 'asc'\n }\n type=\"button\"\n class=\"plain4 small\"\n onClick={() => {\n setSelectedFilterCategory('all');\n setSelectedAuthor(null);\n setSortBy('createdAt');\n setGroupBy(null);\n setSortOrder('asc');\n }}\n >\n <Trans>Reset filters</Trans>\n </button>\n {links?.length > 0 && (\n <button\n type=\"button\"\n class=\"plain small\"\n onClick={() => setShowTopLinks(!showTopLinks)}\n >\n <Trans>Top links</Trans>{' '}\n <Icon\n icon=\"chevron-down\"\n style={{\n transform: showTopLinks\n ? 'rotate(180deg)'\n : 'rotate(0deg)',\n }}\n />\n </button>\n )}\n </aside>\n </div>\n <div class=\"shazam-container no-animation\" hidden={!showTopLinks}>\n <div class=\"shazam-container-inner\">\n <div class=\"catchup-top-links links-bar\">\n {links.map((link) => {\n const { card, shared, sharers, likes, boosts } = link;\n const {\n blurhash,\n title,\n description,\n url,\n image,\n imageDescription,\n language,\n width,\n height,\n publishedAt,\n } = card;\n const domain = punycode.toUnicode(\n URL.parse(url)\n .hostname.replace(/^www\\./, '')\n .replace(/\\/$/, ''),\n );\n let accentColor;\n if (blurhash) {\n const averageColor = getBlurHashAverageColor(blurhash);\n const labAverageColor = rgb2oklab(averageColor);\n accentColor = oklab2rgb([\n 0.6,\n labAverageColor[1],\n labAverageColor[2],\n ]);\n }\n\n return (\n <a\n key={url}\n href={url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class=\"link-block\"\n style={\n accentColor\n ? {\n '--accent-color': `rgb(${accentColor.join(\n ',',\n )})`,\n '--accent-alpha-color': `rgba(${accentColor.join(\n ',',\n )}, 0.4)`,\n }\n : {}\n }\n >\n <article>\n <figure>\n <img\n src={image}\n alt={imageDescription}\n width={width}\n height={height}\n loading=\"lazy\"\n />\n </figure>\n <div class=\"article-body\">\n <header>\n <div class=\"article-meta\">\n <span class=\"domain\">{domain}</span>{' '}\n {!!publishedAt && <>· </>}\n {!!publishedAt && (\n <>\n <RelativeTime\n datetime={publishedAt}\n format=\"micro\"\n />\n </>\n )}\n </div>\n {!!title && (\n <h1\n class=\"title\"\n lang={language}\n dir=\"auto\"\n title={title}\n >\n {title}\n </h1>\n )}\n </header>\n {!!description && (\n <p\n class=\"description\"\n lang={language}\n dir=\"auto\"\n title={description}\n >\n {description}\n </p>\n )}\n <hr />\n <p\n style={{\n whiteSpace: 'nowrap',\n }}\n >\n <Trans>\n Shared by{' '}\n {sharers.map((s) => {\n const { avatarStatic, displayName } = s;\n return (\n <button\n type=\"button\"\n class=\"plain\"\n style={{\n padding: 0,\n }}\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n // Reset and filter to author\n const { id } = s;\n setSelectedAuthor(id);\n setSelectedFilterCategory('all');\n }}\n >\n <Avatar\n url={avatarStatic}\n size=\"s\"\n alt={displayName}\n />\n </button>\n );\n })}\n </Trans>\n </p>\n </div>\n </article>\n </a>\n );\n })}\n </div>\n </div>\n </div>\n {posts.length >= 5 &&\n (postsBarType === '3d' ? (\n <div class=\"catchup-posts-viz-time-bar\">{postsBins}</div>\n ) : (\n <div class=\"catchup-posts-viz-bar\">{postsBar}</div>\n ))}\n {posts.length >= 2 && (\n <div class=\"catchup-filters\">\n <label class=\"filter-cat\">\n <input\n type=\"radio\"\n name=\"filter-cat\"\n checked={selectedFilterCategory.toLowerCase() === 'all'}\n onChange={() => {\n setSelectedFilterCategory('all');\n }}\n />\n <Trans>All</Trans> <span class=\"count\">{posts.length}</span>\n </label>\n {Object.entries(FILTER_KEYS).map(\n ([key, label]) =>\n !!filterCounts[key] && (\n <label\n class=\"filter-cat\"\n key={_(label)}\n title={\n ((filterCounts[key] / posts.length) * 100).toFixed(\n 2,\n ) + '%'\n }\n >\n <input\n type=\"radio\"\n name=\"filter-cat\"\n checked={\n selectedFilterCategory.toLowerCase() ===\n key.toLowerCase()\n }\n onChange={() => {\n setSelectedFilterCategory(key);\n if (key === 'boosts') {\n setSortBy('reblogsCount');\n setSortOrder('desc');\n setGroupBy(null);\n }\n // setSelectedAuthor(null);\n }}\n />\n {_(label)}{' '}\n <span class=\"count\">{filterCounts[key]}</span>\n </label>\n ),\n )}\n </div>\n )}\n {posts.length >= 2 && !!authorCounts && (\n <div\n class=\"catchup-filters authors-filters\"\n ref={authorsListParent}\n >\n {authorCountsList.map((author) => (\n <label\n class=\"filter-author\"\n data-author={author}\n key={`${author}-${authorCounts[author]}`}\n // Preact messed up the order sometimes, need additional key besides just `author`\n // https://github.com/preactjs/preact/issues/2849\n >\n <input\n type=\"radio\"\n name=\"filter-author\"\n checked={selectedAuthor === author}\n onChange={() => {\n setSelectedAuthor(author);\n // setGroupBy(null);\n }}\n onClick={() => {\n if (selectedAuthor === author) {\n setSelectedAuthor(null);\n }\n }}\n />\n <Avatar\n url={\n authors[author].avatarStatic || authors[author].avatar\n }\n size=\"xxl\"\n alt={`${authors[author].displayName} (@${authors[author].acct})`}\n />{' '}\n <span class=\"count\">{authorCounts[author]}</span>\n <span class=\"username\">{authors[author].username}</span>\n </label>\n ))}\n {authorCountsList.length > 5 && (\n <small\n key=\"authors-count\"\n style={{\n whiteSpace: 'nowrap',\n paddingInline: '1em',\n opacity: 0.33,\n }}\n >\n <Plural\n value={authorCountsList.length}\n one=\"# author\"\n other=\"# authors\"\n />\n </small>\n )}\n </div>\n )}\n {posts.length >= 2 && (\n <div class=\"catchup-filters\">\n <span class=\"filter-label\">\n <Trans>Sort</Trans>\n </span>{' '}\n <fieldset class=\"radio-field-group\">\n {FILTER_SORTS.map((key) => (\n <label\n class=\"filter-sort\"\n key={key}\n onClick={(e) => {\n if (sortBy === key) {\n e.preventDefault();\n e.stopPropagation();\n setSortOrder(sortOrder === 'asc' ? 'desc' : 'asc');\n }\n }}\n >\n <input\n type=\"radio\"\n name=\"filter-sort-cat\"\n checked={sortBy === key}\n onChange={() => {\n setSortBy(key);\n const order = /(replies|favourites|reblogs)/.test(\n key,\n )\n ? 'desc'\n : 'asc';\n setSortOrder(order);\n }}\n />\n {\n {\n createdAt: t`Date`,\n repliesCount: t`Replies`,\n favouritesCount: t`Likes`,\n reblogsCount: t`Boosts`,\n density: t`Density`,\n }[key]\n }\n {sortBy === key && (sortOrder === 'asc' ? ' ↑' : ' ↓')}\n </label>\n ))}\n </fieldset>\n {/* <fieldset class=\"radio-field-group\">\n {['asc', 'desc'].map((key) => (\n <label class=\"filter-sort\" key={key}>\n <input\n type=\"radio\"\n name=\"filter-sort-dir\"\n checked={sortOrder === key}\n onChange={() => {\n setSortOrder(key);\n }}\n />\n {key === 'asc' ? '↑' : '↓'}\n </label>\n ))}\n </fieldset> */}\n <span class=\"filter-label\">\n <Trans id=\"group.filter\">Group</Trans>\n </span>{' '}\n <fieldset class=\"radio-field-group\">\n {FILTER_GROUPS.map((key) => (\n <label class=\"filter-group\" key={key || 'none'}>\n <input\n type=\"radio\"\n name=\"filter-group\"\n checked={groupBy === key}\n onChange={() => {\n setGroupBy(key);\n }}\n disabled={key === 'account' && selectedAuthor}\n />\n {{\n account: t`Authors`,\n }[key] || t`None`}\n </label>\n ))}\n </fieldset>\n {\n selectedAuthor && authorCountsList.length > 1 ? (\n <button\n type=\"button\"\n class=\"plain6 small\"\n onClick={() => {\n setSelectedAuthor(null);\n }}\n style={{\n whiteSpace: 'nowrap',\n }}\n >\n <Trans>Show all authors</Trans>\n </button>\n ) : null\n // <button\n // type=\"button\"\n // class=\"plain4 small\"\n // onClick={() => {}}\n // >\n // Group by authors\n // </button>\n }\n </div>\n )}\n <ul\n class={`catchup-list catchup-filter-${\n selectedFilterCategory || ''\n } ${sortBy ? `catchup-sort-${sortBy}` : ''} ${\n selectedAuthor && authors[selectedAuthor]\n ? `catchup-selected-author`\n : ''\n } ${groupBy ? `catchup-group-${groupBy}` : ''}`}\n >\n {sortedFilteredPosts.map((post, i) => {\n const id = post.reblog?.id || post.id;\n let showSeparator = false;\n if (groupBy === 'account') {\n if (\n prevGroup.current &&\n post.account.id !== prevGroup.current &&\n i > 0\n ) {\n showSeparator = true;\n }\n prevGroup.current = post.account.id;\n }\n return (\n <Fragment key={`${post.id}-${showSeparator}`}>\n {showSeparator && <li class=\"separator\" />}\n <IntersectionPostLineItem\n to={`/${instance}/s/${id}`}\n post={post}\n root={scrollableRef.current}\n />\n </Fragment>\n );\n })}\n </ul>\n <footer>\n {filteredPosts.length > 5 && (\n <p>\n {selectedFilterCategory === 'boosts'\n ? t`You don't have to read everything.`\n : t`That's all.`}{' '}\n <button\n type=\"button\"\n class=\"textual\"\n onClick={() => {\n scrollableRef.current.scrollTop = 0;\n }}\n >\n <Trans>Back to top</Trans>\n </button>\n .\n </p>\n )}\n </footer>\n </>\n )}\n </main>\n </div>\n {showHelp && (\n <Modal onClose={() => setShowHelp(false)}>\n <div class=\"sheet\" id=\"catchup-help-sheet\">\n <button\n type=\"button\"\n class=\"sheet-close\"\n onClick={() => setShowHelp(false)}\n >\n <Icon icon=\"x\" alt={t`Close`} />\n </button>\n <header>\n <h2>\n <Trans>Help</Trans>\n </h2>\n </header>\n <main>\n <dl>\n <dt>\n <Trans>Top links</Trans>\n </dt>\n <dd>\n <Trans>\n Links shared by followings, sorted by shared counts, boosts\n and likes.\n </Trans>\n </dd>\n <dt>\n <Trans>Sort: Density</Trans>\n </dt>\n <dd>\n <Trans>\n Posts are sorted by information density or depth. Shorter\n posts are \"lighter\" while longer posts are \"heavier\". Posts\n with photos are \"heavier\" than posts without photos.\n </Trans>\n </dd>\n <dt>\n <Trans>Group: Authors</Trans>\n </dt>\n <dd>\n <Trans>\n Posts are grouped by authors, sorted by posts count per\n author.\n </Trans>\n </dd>\n <dt>\n <Trans>Keyboard shortcuts</Trans>\n </dt>\n {/* <dd>\n <kbd>j</kbd>: <Trans>Next post</Trans>\n </dd>\n <dd>\n <kbd>k</kbd>: <Trans>Previous post</Trans>\n </dd>\n <dd>\n <kbd>l</kbd>: <Trans>Next author</Trans>\n </dd>\n <dd>\n <kbd>h</kbd>: <Trans>Previous author</Trans>\n </dd>\n <dd>\n <kbd>Enter</kbd>: <Trans>Open post details</Trans>\n </dd>\n <dd>\n <kbd>.</kbd>: <Trans>Scroll to top</Trans>\n </dd> */}\n <dd>\n <table>\n <tbody>\n <tr>\n <td>\n <Trans>Next post</Trans>\n </td>\n <td>\n <kbd>j</kbd>\n </td>\n </tr>\n <tr>\n <td>\n <Trans>Previous post</Trans>\n </td>\n <td>\n <kbd>k</kbd>\n </td>\n </tr>\n <tr>\n <td>\n <Trans>Next author</Trans>\n </td>\n <td>\n <kbd>l</kbd>\n </td>\n </tr>\n <tr>\n <td>\n <Trans>Previous author</Trans>\n </td>\n <td>\n <kbd>h</kbd>\n </td>\n </tr>\n <tr>\n <td>\n <Trans>Open post details</Trans>\n </td>\n <td>\n <kbd>Enter</kbd>\n </td>\n </tr>\n <tr>\n <td>\n <Trans>Scroll to top</Trans>\n </td>\n <td>\n <kbd>.</kbd>\n </td>\n </tr>\n </tbody>\n </table>\n </dd>\n </dl>\n </main>\n </div>\n </Modal>\n )}\n </div>\n );\n}\n\nconst PostLine = memo(\n function ({ post }) {\n const {\n id,\n account,\n group,\n reblog,\n inReplyToId,\n inReplyToAccountId,\n _followedTags: isFollowedTags,\n _filtered: filterInfo,\n visibility,\n __BOOSTERS,\n } = post;\n const isReplyTo = inReplyToId && inReplyToAccountId !== account.id;\n const isFiltered = !!filterInfo;\n\n const debugHover = (e) => {\n if (e.shiftKey) {\n console.log({\n ...post,\n });\n }\n };\n\n return (\n <article\n class={`post-line ${\n group\n ? 'group'\n : reblog\n ? 'reblog'\n : isFollowedTags?.length\n ? 'followed-tags'\n : ''\n } ${isReplyTo ? 'reply-to' : ''} ${\n isFiltered ? 'filtered' : ''\n } visibility-${visibility}`}\n onMouseEnter={debugHover}\n >\n <span class=\"post-author\">\n {reblog ? (\n <span class=\"post-reblog-avatar\">\n <Avatar\n url={account.avatarStatic || account.avatar}\n squircle={account.bot}\n />\n {__BOOSTERS?.size > 0\n ? [...__BOOSTERS].map((b) => (\n <Avatar url={b.avatarStatic || b.avatar} squircle={b.bot} />\n ))\n : ''}{' '}\n <Icon icon=\"rocket\" />{' '}\n {/* <Avatar\n url={reblog.account.avatarStatic || reblog.account.avatar}\n squircle={reblog.account.bot}\n /> */}\n <NameText account={reblog.account} showAvatar />\n </span>\n ) : (\n <NameText account={account} showAvatar />\n )}\n </span>\n <PostPeek post={reblog || post} filterInfo={filterInfo} />\n <span class=\"post-meta\">\n <PostStats post={reblog || post} />{' '}\n <RelativeTime\n datetime={new Date(reblog?.createdAt || post.createdAt)}\n format=\"micro\"\n />\n </span>\n </article>\n );\n },\n (oldProps, newProps) => {\n return oldProps?.post?.id === newProps?.post?.id;\n },\n);\n\nconst IntersectionPostLineItem = ({ root, to, ...props }) => {\n const ref = useRef();\n const [show, setShow] = useState(false);\n useEffect(() => {\n const observer = new IntersectionObserver(\n (entries) => {\n const entry = entries[0];\n if (entry.isIntersecting) {\n queueMicrotask(() => setShow(true));\n observer.unobserve(ref.current);\n }\n },\n {\n root,\n rootMargin: `${Math.max(320, screen.height * 0.75)}px`,\n },\n );\n if (ref.current) observer.observe(ref.current);\n return () => {\n if (ref.current) observer.unobserve(ref.current);\n };\n }, []);\n\n return show ? (\n <li>\n <Link to={to}>\n <PostLine {...props} />\n </Link>\n </li>\n ) : (\n <li ref={ref} style={{ height: '4em' }} />\n );\n};\n\n// A media speak a thousand words\nconst MEDIA_DENSITY = 8;\nconst CARD_DENSITY = 8;\nfunction postDensity(post) {\n const { spoilerText, content, poll, mediaAttachments, card } = post;\n const pollContent = poll?.options?.length\n ? poll.options.reduce((acc, cur) => acc + cur.title, '')\n : '';\n const density =\n (spoilerText.length + htmlContentLength(content) + pollContent.length) /\n 140 +\n (mediaAttachments?.length\n ? MEDIA_DENSITY * mediaAttachments.length\n : card?.image\n ? CARD_DENSITY\n : 0);\n return density;\n}\n\nconst MEDIA_SIZE = 48;\n\nfunction PostPeek({ post, filterInfo }) {\n const {\n spoilerText,\n sensitive,\n content,\n emojis,\n poll,\n mediaAttachments,\n card,\n inReplyToId,\n inReplyToAccountId,\n account,\n _thread,\n } = post;\n const isThread =\n (inReplyToId && inReplyToAccountId === account.id) || !!_thread;\n\n const readingExpandSpoilers = useMemo(() => {\n const prefs = store.account.get('preferences') || {};\n return !!prefs['reading:expand:spoilers'];\n }, []);\n // const readingExpandSpoilers = true;\n const showMedia = readingExpandSpoilers || (!spoilerText && !sensitive);\n const postText = content ? statusPeek(post) : '';\n\n const showPostContent = !spoilerText || readingExpandSpoilers;\n\n return (\n <div class=\"post-peek\" title={!spoilerText ? postText : ''}>\n <span class=\"post-peek-content\">\n {isThread && !showPostContent && (\n <>\n <span class=\"post-peek-tag post-peek-thread\">Thread</span>{' '}\n </>\n )}\n {!!filterInfo ? (\n <span class=\"post-peek-filtered\">\n {/* Filtered{filterInfo?.titlesStr ? `: ${filterInfo.titlesStr}` : ''} */}\n {filterInfo?.titlesStr\n ? t`Filtered: ${filterInfo.titlesStr}`\n : t`Filtered`}\n </span>\n ) : (\n <>\n {!!spoilerText && (\n <span class=\"post-peek-spoiler\">\n <Icon\n icon={`${readingExpandSpoilers ? 'eye-open' : 'eye-close'}`}\n />{' '}\n {spoilerText}\n </span>\n )}\n {showPostContent && (\n <div class=\"post-peek-html\">\n {isThread && (\n <>\n <span class=\"post-peek-tag post-peek-thread\">\n <Trans>Thread</Trans>\n </span>{' '}\n </>\n )}\n {!!content && (\n <div\n dangerouslySetInnerHTML={{\n __html: emojifyText(content, emojis),\n }}\n />\n )}\n {!!poll?.options?.length &&\n poll.options.map((o) => (\n <div>\n {poll.multiple ? '▪️' : '•'} {o.title}\n </div>\n ))}\n {!content &&\n mediaAttachments?.length === 1 &&\n mediaAttachments[0].description && (\n <>\n <span class=\"post-peek-tag post-peek-alt\">ALT</span>{' '}\n <div>{mediaAttachments[0].description}</div>\n </>\n )}\n </div>\n )}\n </>\n )}\n </span>\n {!filterInfo && (\n <span class=\"post-peek-post-content\">\n {!!poll && (\n <span class=\"post-peek-tag post-peek-poll\">\n <Icon icon=\"poll\" size=\"s\" />\n <Trans>Poll</Trans>\n </span>\n )}\n {!!mediaAttachments?.length\n ? mediaAttachments.map((m) => {\n const mediaURL = m.previewUrl || m.url;\n const remoteMediaURL = m.previewRemoteUrl || m.remoteUrl;\n const width = m.meta?.original\n ? m.meta.original.width\n : m.meta?.small?.width || m.meta?.original?.width;\n const height = m.meta?.original\n ? m.meta.original.height\n : m.meta?.small?.height || m.meta?.original?.height;\n return (\n <span key={m.id} class=\"post-peek-media\">\n {{\n image:\n (mediaURL || remoteMediaURL) && showMedia ? (\n <img\n src={mediaURL}\n width={MEDIA_SIZE}\n height={MEDIA_SIZE}\n alt={m.description}\n loading=\"lazy\"\n onError={(e) => {\n const { src } = e.target;\n if (src === mediaURL) {\n e.target.src = remoteMediaURL;\n }\n }}\n style={{\n '--anim-duration': `${Math.min(\n Math.max(Math.max(width, height) / 100, 5),\n 120,\n )}s`,\n }}\n />\n ) : (\n <span class=\"post-peek-faux-media\">🖼</span>\n ),\n gifv:\n (mediaURL || remoteMediaURL) && showMedia ? (\n <img\n src={mediaURL}\n width={MEDIA_SIZE}\n height={MEDIA_SIZE}\n alt={m.description}\n loading=\"lazy\"\n onError={(e) => {\n const { src } = e.target;\n if (src === mediaURL) {\n e.target.src = remoteMediaURL;\n }\n }}\n />\n ) : (\n <span class=\"post-peek-faux-media\">🎞️</span>\n ),\n video:\n (mediaURL || remoteMediaURL) && showMedia ? (\n <img\n src={mediaURL}\n width={MEDIA_SIZE}\n height={MEDIA_SIZE}\n alt={m.description}\n loading=\"lazy\"\n onError={(e) => {\n const { src } = e.target;\n if (src === mediaURL) {\n e.target.src = remoteMediaURL;\n }\n }}\n />\n ) : (\n <span class=\"post-peek-faux-media\">📹</span>\n ),\n audio: <span class=\"post-peek-faux-media\">🎵</span>,\n }[m.type] || null}\n </span>\n );\n })\n : !!card &&\n card.image &&\n showMedia && (\n <span\n class={`post-peek-media post-peek-card card-${\n card.type || ''\n }`}\n >\n {card.image ? (\n <img\n src={card.image}\n width={MEDIA_SIZE}\n height={MEDIA_SIZE}\n alt={\n card.title || card.description || card.imageDescription\n }\n loading=\"lazy\"\n style={{\n '--anim-duration':\n card.width &&\n card.height &&\n `${Math.min(\n Math.max(\n Math.max(card.width, card.height) / 100,\n 5,\n ),\n 120,\n )}s`,\n }}\n />\n ) : (\n <span class=\"post-peek-faux-media\">🔗</span>\n )}\n </span>\n )}\n </span>\n )}\n </div>\n );\n}\n\nfunction PostStats({ post }) {\n const { reblogsCount, repliesCount, favouritesCount } = post;\n return (\n <span class=\"post-stats\">\n {repliesCount > 0 && (\n <span class=\"post-stat-replies\">\n <Icon icon=\"comment2\" size=\"s\" alt={t`Replies`} />{' '}\n {shortenNumber(repliesCount)}\n </span>\n )}\n {favouritesCount > 0 && (\n <span class=\"post-stat-likes\">\n <Icon icon=\"heart\" size=\"s\" alt={t`Likes`} />{' '}\n {shortenNumber(favouritesCount)}\n </span>\n )}\n {reblogsCount > 0 && (\n <span class=\"post-stat-boosts\">\n <Icon icon=\"rocket\" size=\"s\" alt={t`Boosts`} />{' '}\n {shortenNumber(reblogsCount)}\n </span>\n )}\n </span>\n );\n}\n\nfunction binByTime(data, key, numBins) {\n // Extract dates from data objects\n const dates = data.map((item) => new Date(item[key]));\n\n // Find minimum and maximum dates directly (avoiding Math.min/max)\n const minDate = dates.reduce(\n (acc, date) => (date < acc ? date : acc),\n dates[0],\n );\n const maxDate = dates.reduce(\n (acc, date) => (date > acc ? date : acc),\n dates[0],\n );\n\n // Calculate the time span in milliseconds\n const range = maxDate.getTime() - minDate.getTime();\n\n // Create empty bins and loop through data\n const bins = Array.from({ length: numBins }, () => []);\n data.forEach((item) => {\n const date = new Date(item[key]);\n const normalized = (date.getTime() - minDate.getTime()) / range;\n const binIndex = Math.floor(normalized * (numBins - 1));\n bins[binIndex].push(item);\n });\n\n return bins;\n}\n\nexport default Catchup;\n","import { t, Trans } from '@lingui/macro';\nimport { useRef } from 'preact/hooks';\n\nimport Timeline from '../components/timeline';\nimport { api } from '../utils/api';\nimport useTitle from '../utils/useTitle';\n\nconst LIMIT = 20;\n\nfunction Favourites() {\n useTitle(t`Likes`, '/favourites');\n const { masto, instance } = api();\n const favouritesIterator = useRef();\n async function fetchFavourites(firstLoad) {\n if (firstLoad || !favouritesIterator.current) {\n favouritesIterator.current = masto.v1.favourites.list({ limit: LIMIT });\n }\n return await favouritesIterator.current.next();\n }\n\n return (\n <Timeline\n title={t`Likes`}\n id=\"favourites\"\n emptyText={t`No likes yet. Go like something!`}\n errorText={t`Unable to load likes.`}\n instance={instance}\n fetchItems={fetchFavourites}\n />\n );\n}\n\nexport default Favourites;\n","import './filters.css';\n\nimport { i18n } from '@lingui/core';\nimport { msg, Plural, t, Trans } from '@lingui/macro';\nimport { useLingui } from '@lingui/react';\nimport { useEffect, useReducer, useRef, useState } from 'preact/hooks';\n\nimport Icon from '../components/icon';\nimport Link from '../components/link';\nimport Loader from '../components/loader';\nimport MenuConfirm from '../components/menu-confirm';\nimport Modal from '../components/modal';\nimport NavMenu from '../components/nav-menu';\nimport RelativeTime from '../components/relative-time';\nimport { api } from '../utils/api';\nimport i18nDuration from '../utils/i18n-duration';\nimport useInterval from '../utils/useInterval';\nimport useTitle from '../utils/useTitle';\n\nconst FILTER_CONTEXT = ['home', 'public', 'notifications', 'thread', 'account'];\nconst FILTER_CONTEXT_UNIMPLEMENTED = ['notifications', 'thread', 'account'];\nconst FILTER_CONTEXT_LABELS = {\n home: msg`Home and lists`,\n notifications: msg`Notifications`,\n public: msg`Public timelines`,\n thread: msg`Conversations`,\n account: msg`Profiles`,\n};\n\nconst EXPIRY_DURATIONS = [\n 0, // forever\n 30 * 60, // 30 minutes\n 60 * 60, // 1 hour\n 6 * 60 * 60, // 6 hours\n 12 * 60 * 60, // 12 hours\n 60 * 60 * 24, // 24 hours\n 60 * 60 * 24 * 7, // 7 days\n 60 * 60 * 24 * 30, // 30 days\n];\n\nconst EXPIRY_DURATIONS_LABELS = {\n 0: msg`Never`,\n 1800: i18nDuration(30, 'minute'),\n 3600: i18nDuration(1, 'hour'),\n 21600: i18nDuration(6, 'hour'),\n 43200: i18nDuration(12, 'hour'),\n 86_400: i18nDuration(24, 'hour'),\n 604_800: i18nDuration(7, 'day'),\n 2_592_000: i18nDuration(30, 'day'),\n};\n\nfunction Filters() {\n const { masto } = api();\n useTitle(t`Filters`, `/ft`);\n const [uiState, setUIState] = useState('default');\n const [showFiltersAddEditModal, setShowFiltersAddEditModal] = useState(false);\n\n const [reloadCount, reload] = useReducer((c) => c + 1, 0);\n const [filters, setFilters] = useState([]);\n useEffect(() => {\n setUIState('loading');\n (async () => {\n try {\n const filters = await masto.v2.filters.list();\n filters.sort((a, b) => a.title.localeCompare(b.title));\n filters.forEach((filter) => {\n if (filter.keywords?.length) {\n filter.keywords.sort((a, b) => a.id - b.id);\n }\n });\n console.log(filters);\n setFilters(filters);\n setUIState('default');\n } catch (e) {\n console.error(e);\n setUIState('error');\n }\n })();\n }, [reloadCount]);\n\n return (\n <div id=\"filters-page\" class=\"deck-container\" tabIndex=\"-1\">\n <div class=\"timeline-deck deck\">\n <header>\n <div class=\"header-grid\">\n <div class=\"header-side\">\n <NavMenu />\n <Link to=\"/\" class=\"button plain\">\n <Icon icon=\"home\" size=\"l\" alt={t`Home`} />\n </Link>\n </div>\n <h1>\n <Trans>Filters</Trans>\n </h1>\n <div class=\"header-side\">\n <button\n type=\"button\"\n class=\"plain\"\n onClick={() => {\n setShowFiltersAddEditModal(true);\n }}\n >\n <Icon icon=\"plus\" size=\"l\" alt={t`New filter`} />\n </button>\n </div>\n </div>\n </header>\n <main>\n {filters.length > 0 ? (\n <>\n <ul class=\"filters-list\">\n {filters.map((filter) => {\n const { id, title, expiresAt, keywords } = filter;\n return (\n <li key={id}>\n <div>\n <h2>{title}</h2>\n {keywords?.length > 0 && (\n <div>\n {keywords.map((k) => (\n <>\n <span class=\"tag collapsed insignificant\">\n {k.wholeWord ? `“${k.keyword}”` : k.keyword}\n </span>{' '}\n </>\n ))}\n </div>\n )}\n <small class=\"insignificant\">\n <ExpiryStatus expiresAt={expiresAt} />\n </small>\n </div>\n <button\n type=\"button\"\n class=\"plain\"\n onClick={() => {\n setShowFiltersAddEditModal({\n filter,\n });\n }}\n >\n <Icon icon=\"pencil\" size=\"l\" alt=\"Edit filter\" />\n </button>\n </li>\n );\n })}\n </ul>\n {filters.length > 1 && (\n <footer class=\"ui-state\">\n <small class=\"insignificant\">\n <Plural\n value={filters.length}\n one=\"# filter\"\n other=\"# filters\"\n />\n </small>\n </footer>\n )}\n </>\n ) : uiState === 'loading' ? (\n <p class=\"ui-state\">\n <Loader />\n </p>\n ) : uiState === 'error' ? (\n <p class=\"ui-state\">\n <Trans>Unable to load filters.</Trans>\n </p>\n ) : (\n <p class=\"ui-state\">\n <Trans>No filters yet.</Trans>\n </p>\n )}\n </main>\n </div>\n {!!showFiltersAddEditModal && (\n <Modal\n title={t`Add filter`}\n onClose={() => {\n setShowFiltersAddEditModal(false);\n }}\n >\n <FiltersAddEdit\n filter={showFiltersAddEditModal?.filter}\n onClose={(result) => {\n if (result.state === 'success') {\n reload();\n }\n setShowFiltersAddEditModal(false);\n }}\n />\n </Modal>\n )}\n </div>\n );\n}\n\nlet _id = 1;\nconst incID = () => _id++;\nfunction FiltersAddEdit({ filter, onClose }) {\n const { _ } = useLingui();\n const { masto } = api();\n const [uiState, setUIState] = useState('default');\n const editMode = !!filter;\n const { context, expiresAt, id, keywords, title, filterAction } =\n filter || {};\n const hasExpiry = !!expiresAt;\n const expiresAtDate = hasExpiry && new Date(expiresAt);\n const [editKeywords, setEditKeywords] = useState(keywords || []);\n const keywordsRef = useRef();\n\n // Hacky way of handling removed keywords for both existing and new ones\n const [removedKeywordIDs, setRemovedKeywordIDs] = useState([]);\n const [removedKeyword_IDs, setRemovedKeyword_IDs] = useState([]);\n\n const filteredEditKeywords = editKeywords.filter(\n (k) =>\n !removedKeywordIDs.includes(k.id) && !removedKeyword_IDs.includes(k._id),\n );\n\n return (\n <div class=\"sheet\" id=\"filters-add-edit-modal\">\n {!!onClose && (\n <button type=\"button\" class=\"sheet-close\" onClick={onClose}>\n <Icon icon=\"x\" alt={t`Close`} />\n </button>\n )}\n <header>\n <h2>{editMode ? t`Edit filter` : t`New filter`}</h2>\n </header>\n <main>\n <form\n onSubmit={(e) => {\n e.preventDefault();\n const formData = new FormData(e.target);\n const title = formData.get('title');\n const keywordIDs = formData.getAll('keyword_attributes[][id]');\n const keywordKeywords = formData.getAll(\n 'keyword_attributes[][keyword]',\n );\n // const keywordWholeWords = formData.getAll(\n // 'keyword_attributes[][whole_word]',\n // );\n // Not using getAll because it skips the empty checkboxes\n const keywordWholeWords = [\n ...keywordsRef.current.querySelectorAll(\n 'input[name=\"keyword_attributes[][whole_word]\"]',\n ),\n ].map((i) => i.checked);\n const keywordsAttributes = keywordKeywords.map((k, i) => ({\n id: keywordIDs[i] || undefined,\n keyword: k,\n wholeWord: keywordWholeWords[i],\n }));\n // if (editMode && keywords?.length) {\n // // Find which one got deleted and add to keywordsAttributes\n // keywords.forEach((k) => {\n // if (!keywordsAttributes.find((ka) => ka.id === k.id)) {\n // keywordsAttributes.push({\n // ...k,\n // _destroy: true,\n // });\n // }\n // });\n // }\n if (editMode && removedKeywordIDs?.length) {\n removedKeywordIDs.forEach((id) => {\n keywordsAttributes.push({\n id,\n _destroy: true,\n });\n });\n }\n const context = formData.getAll('context');\n let expiresIn = formData.get('expires_in');\n const filterAction = formData.get('filter_action');\n console.log({\n title,\n keywordIDs,\n keywords: keywordKeywords,\n wholeWords: keywordWholeWords,\n keywordsAttributes,\n context,\n expiresIn,\n filterAction,\n });\n\n // Required fields\n if (!title || !context?.length) {\n return;\n }\n\n setUIState('loading');\n\n (async () => {\n try {\n let filterResult;\n\n if (editMode) {\n if (expiresIn === '' || expiresIn === null) {\n // No value\n // Preserve existing expiry if not specified\n // Seconds from now to expiresAtDate\n // Other clients don't do this\n if (hasExpiry) {\n expiresIn = Math.floor(\n (expiresAtDate - new Date()) / 1000,\n );\n } else {\n expiresIn = null;\n }\n } else if (expiresIn === '0' || expiresIn === 0) {\n // 0 = Never\n expiresIn = null;\n } else {\n expiresIn = +expiresIn;\n }\n filterResult = await masto.v2.filters.$select(id).update({\n title,\n context,\n expiresIn,\n keywordsAttributes,\n filterAction,\n });\n } else {\n expiresIn = +expiresIn || null;\n filterResult = await masto.v2.filters.create({\n title,\n context,\n expiresIn,\n keywordsAttributes,\n filterAction,\n });\n }\n console.log({ filterResult });\n setUIState('default');\n onClose?.({\n state: 'success',\n filter: filterResult,\n });\n } catch (error) {\n console.error(error);\n setUIState('error');\n alert(\n editMode\n ? t`Unable to edit filter`\n : t`Unable to create filter`,\n );\n }\n })();\n }}\n >\n <div class=\"filter-form-row\">\n <label>\n <b>\n <Trans>Title</Trans>\n </b>\n <input\n type=\"text\"\n name=\"title\"\n defaultValue={title}\n disabled={uiState === 'loading'}\n dir=\"auto\"\n required\n />\n </label>\n </div>\n <div class=\"filter-form-keywords\" ref={keywordsRef}>\n {filteredEditKeywords.length ? (\n <ul class=\"filter-keywords\">\n {filteredEditKeywords.map((k) => {\n const { id, keyword, wholeWord, _id } = k;\n return (\n <li key={`${id}-${_id}`}>\n <input\n type=\"hidden\"\n name=\"keyword_attributes[][id]\"\n value={id}\n />\n <input\n name=\"keyword_attributes[][keyword]\"\n type=\"text\"\n defaultValue={keyword}\n disabled={uiState === 'loading'}\n required\n dir=\"auto\"\n />\n <div class=\"filter-keyword-actions\">\n <label>\n <input\n name=\"keyword_attributes[][whole_word]\"\n type=\"checkbox\"\n value={id} // Hacky way to map checkbox boolean to the keyword id\n defaultChecked={wholeWord}\n disabled={uiState === 'loading'}\n />{' '}\n <Trans>Whole word</Trans>\n </label>\n <button\n type=\"button\"\n class=\"light danger small\"\n disabled={uiState === 'loading'}\n onClick={() => {\n if (id) {\n removedKeywordIDs.push(id);\n setRemovedKeywordIDs([...removedKeywordIDs]);\n } else if (_id) {\n removedKeyword_IDs.push(_id);\n setRemovedKeyword_IDs([...removedKeyword_IDs]);\n }\n }}\n >\n <Icon icon=\"x\" alt={t`Remove`} />\n </button>\n </div>\n </li>\n );\n })}\n </ul>\n ) : (\n <div class=\"filter-keywords\">\n <div class=\"insignificant\">\n <Trans>No keywords. Add one.</Trans>\n </div>\n </div>\n )}\n <footer class=\"filter-keywords-footer\">\n <button\n type=\"button\"\n class=\"light\"\n onClick={() => {\n setEditKeywords([\n ...editKeywords,\n {\n _id: incID(),\n keyword: '',\n wholeWord: true,\n },\n ]);\n setTimeout(() => {\n // Focus last input\n const fields =\n keywordsRef.current.querySelectorAll(\n 'input[type=\"text\"]',\n );\n fields[fields.length - 1]?.focus?.();\n }, 10);\n }}\n >\n <Trans>Add keyword</Trans>\n </button>{' '}\n {filteredEditKeywords?.length > 1 && (\n <small class=\"insignificant\">\n <Plural\n value={filteredEditKeywords.length}\n one=\"# keyword\"\n other=\"# keywords\"\n />\n </small>\n )}\n </footer>\n </div>\n <div class=\"filter-form-cols\">\n <div class=\"filter-form-col\">\n <div>\n <b>\n <Trans>Filter from…</Trans>\n </b>\n </div>\n {FILTER_CONTEXT.map((ctx) => (\n <div>\n <label\n class={\n FILTER_CONTEXT_UNIMPLEMENTED.includes(ctx)\n ? 'insignificant'\n : ''\n }\n >\n <input\n type=\"checkbox\"\n name=\"context\"\n value={ctx}\n defaultChecked={!!context ? context.includes(ctx) : true}\n disabled={uiState === 'loading'}\n />{' '}\n {_(FILTER_CONTEXT_LABELS[ctx])}\n {FILTER_CONTEXT_UNIMPLEMENTED.includes(ctx) ? '*' : ''}\n </label>{' '}\n </div>\n ))}\n <p>\n <small class=\"insignificant\">\n <Trans>* Not implemented yet</Trans>\n </small>\n </p>\n </div>\n <div class=\"filter-form-col\">\n {editMode && (\n <Trans>\n Status:{' '}\n <b>\n <ExpiryStatus expiresAt={expiresAt} showNeverExpires />\n </b>\n </Trans>\n )}\n <div>\n <label for=\"filters-expires_in\">\n {editMode ? t`Change expiry` : t`Expiry`}\n </label>\n <select\n id=\"filters-expires_in\"\n name=\"expires_in\"\n disabled={uiState === 'loading'}\n defaultValue={editMode ? undefined : 0}\n >\n {editMode && <option></option>}\n {EXPIRY_DURATIONS.map((v) => (\n <option value={v}>\n {typeof EXPIRY_DURATIONS_LABELS[v] === 'function'\n ? EXPIRY_DURATIONS_LABELS[v]()\n : _(EXPIRY_DURATIONS_LABELS[v])}\n </option>\n ))}\n </select>\n </div>\n <p>\n <Trans>Filtered post will be…</Trans>\n <br />\n <label class=\"ib\">\n <input\n type=\"radio\"\n name=\"filter_action\"\n value=\"warn\"\n defaultChecked={filterAction === 'warn' || !editMode}\n disabled={uiState === 'loading'}\n />{' '}\n <Trans>minimized</Trans>\n </label>{' '}\n <label class=\"ib\">\n <input\n type=\"radio\"\n name=\"filter_action\"\n value=\"hide\"\n defaultChecked={filterAction === 'hide'}\n disabled={uiState === 'loading'}\n />{' '}\n <Trans>hidden</Trans>\n </label>\n </p>\n </div>\n </div>\n <footer class=\"filter-form-footer\">\n <span>\n <button type=\"submit\" disabled={uiState === 'loading'}>\n {editMode ? t`Save` : t`Create`}\n </button>{' '}\n <Loader abrupt hidden={uiState !== 'loading'} />\n </span>\n {editMode && (\n <MenuConfirm\n disabled={uiState === 'loading'}\n align=\"end\"\n menuItemClassName=\"danger\"\n confirmLabel={t`Delete this filter?`}\n onClick={() => {\n setUIState('loading');\n (async () => {\n try {\n await masto.v2.filters.$select(id).remove();\n setUIState('default');\n onClose?.({\n state: 'success',\n });\n } catch (e) {\n console.error(e);\n setUIState('error');\n alert(t`Unable to delete filter.`);\n }\n })();\n }}\n >\n <button\n type=\"button\"\n class=\"light danger\"\n onClick={() => {}}\n disabled={uiState === 'loading'}\n >\n <Trans>Delete…</Trans>\n </button>\n </MenuConfirm>\n )}\n </footer>\n </form>\n </main>\n </div>\n );\n}\n\nfunction ExpiryStatus({ expiresAt, showNeverExpires }) {\n const hasExpiry = !!expiresAt;\n const expiresAtDate = hasExpiry && new Date(expiresAt);\n const expired = hasExpiry && expiresAtDate <= new Date();\n\n // If less than a minute left, re-render interval every second, else every minute\n const [_, rerender] = useReducer((c) => c + 1, 0);\n useInterval(rerender, expired || 30_000);\n\n return expired ? (\n t`Expired`\n ) : hasExpiry ? (\n <Trans>\n Expiring <RelativeTime datetime={expiresAtDate} />\n </Trans>\n ) : (\n showNeverExpires && t`Never expires`\n );\n}\n\nexport default Filters;\n","import { Plural, t, Trans } from '@lingui/macro';\nimport { useEffect, useState } from 'preact/hooks';\n\nimport Icon from '../components/icon';\nimport Link from '../components/link';\nimport Loader from '../components/loader';\nimport NavMenu from '../components/nav-menu';\nimport { api } from '../utils/api';\nimport { fetchFollowedTags } from '../utils/followed-tags';\nimport useTitle from '../utils/useTitle';\n\nfunction FollowedHashtags() {\n const { masto, instance } = api();\n useTitle(t`Followed Hashtags`, `/fh`);\n const [uiState, setUIState] = useState('default');\n\n const [followedHashtags, setFollowedHashtags] = useState([]);\n useEffect(() => {\n setUIState('loading');\n (async () => {\n try {\n const tags = await fetchFollowedTags();\n setFollowedHashtags(tags);\n setUIState('default');\n } catch (e) {\n console.error(e);\n setUIState('error');\n }\n })();\n }, []);\n\n return (\n <div id=\"followed-hashtags-page\" class=\"deck-container\" tabIndex=\"-1\">\n <div class=\"timeline-deck deck\">\n <header>\n <div class=\"header-grid\">\n <div class=\"header-side\">\n <NavMenu />\n <Link to=\"/\" class=\"button plain\">\n <Icon icon=\"home\" size=\"l\" alt={t`Home`} />\n </Link>\n </div>\n <h1>\n <Trans>Followed Hashtags</Trans>\n </h1>\n <div class=\"header-side\" />\n </div>\n </header>\n <main>\n {followedHashtags.length > 0 ? (\n <>\n <ul class=\"link-list\">\n {followedHashtags.map((tag) => (\n <li>\n <Link\n to={\n instance\n ? `/${instance}/t/${tag.name}`\n : `/t/${tag.name}`\n }\n >\n <Icon icon=\"hashtag\" alt=\"#\" /> <span>{tag.name}</span>\n </Link>\n </li>\n ))}\n </ul>\n {followedHashtags.length > 1 && (\n <footer class=\"ui-state\">\n <small class=\"insignificant\">\n <Plural\n value={followedHashtags.length}\n one=\"# hashtag\"\n other=\"# hashtags\"\n />\n </small>\n </footer>\n )}\n </>\n ) : uiState === 'loading' ? (\n <p class=\"ui-state\">\n <Loader abrupt />\n </p>\n ) : uiState === 'error' ? (\n <p class=\"ui-state\">\n <Trans>Unable to load followed hashtags.</Trans>\n </p>\n ) : (\n <p class=\"ui-state\">\n <Trans>No hashtags followed yet.</Trans>\n </p>\n )}\n </main>\n </div>\n </div>\n );\n}\n\nexport default FollowedHashtags;\n","import { t, Trans } from '@lingui/macro';\nimport { useEffect, useRef } from 'preact/hooks';\nimport { useSnapshot } from 'valtio';\n\nimport Timeline from '../components/timeline';\nimport { api } from '../utils/api';\nimport { filteredItems } from '../utils/filters';\nimport states, { getStatus, saveStatus } from '../utils/states';\nimport supports from '../utils/supports';\nimport {\n assignFollowedTags,\n clearFollowedTagsState,\n dedupeBoosts,\n} from '../utils/timeline-utils';\nimport useTitle from '../utils/useTitle';\n\nconst LIMIT = 20;\n\nfunction Following({ title, path, id, ...props }) {\n useTitle(\n title ||\n t({\n id: 'following.title',\n message: 'Following',\n }),\n path || '/following',\n );\n const { masto, streaming, instance } = api();\n const snapStates = useSnapshot(states);\n const homeIterator = useRef();\n const latestItem = useRef();\n __BENCHMARK.end('time-to-following');\n\n console.debug('RENDER Following', title, id);\n const supportsPixelfed = supports('@pixelfed/home-include-reblogs');\n\n async function fetchHome(firstLoad) {\n if (firstLoad || !homeIterator.current) {\n __BENCHMARK.start('fetch-home-first');\n homeIterator.current = masto.v1.timelines.home.list({ limit: LIMIT });\n }\n if (supportsPixelfed && homeIterator.current?.nextParams) {\n if (typeof homeIterator.current.nextParams === 'string') {\n homeIterator.current.nextParams += '&include_reblogs=true';\n } else {\n homeIterator.current.nextParams.include_reblogs = true;\n }\n }\n const results = await homeIterator.current.next();\n let { value } = results;\n if (value?.length) {\n let latestItemChanged = false;\n if (firstLoad) {\n if (value[0].id !== latestItem.current) {\n latestItemChanged = true;\n }\n latestItem.current = value[0].id;\n console.log('First load', latestItem.current);\n }\n\n // value = filteredItems(value, 'home');\n value.forEach((item) => {\n saveStatus(item, instance);\n });\n value = dedupeBoosts(value, instance);\n if (firstLoad && latestItemChanged) clearFollowedTagsState();\n assignFollowedTags(value, instance);\n\n // ENFORCE sort by datetime (Latest first)\n value.sort((a, b) => {\n const aDate = new Date(a.createdAt);\n const bDate = new Date(b.createdAt);\n return bDate - aDate;\n });\n }\n __BENCHMARK.end('fetch-home-first');\n return {\n ...results,\n value,\n };\n }\n\n async function checkForUpdates() {\n try {\n const opts = {\n limit: 5,\n since_id: latestItem.current,\n };\n if (supports('@pixelfed/home-include-reblogs')) {\n opts.include_reblogs = true;\n }\n const results = await masto.v1.timelines.home.list(opts).next();\n let { value } = results;\n console.log('checkForUpdates', latestItem.current, value);\n const valueContainsLatestItem = value[0]?.id === latestItem.current; // since_id might not be supported\n if (value?.length && !valueContainsLatestItem) {\n latestItem.current = value[0].id;\n value = dedupeBoosts(value, instance);\n value = filteredItems(value, 'home');\n if (value.some((item) => !item.reblog)) {\n return true;\n }\n }\n return false;\n } catch (e) {\n return false;\n }\n }\n\n useEffect(() => {\n let sub;\n (async () => {\n if (streaming) {\n sub = streaming.user.subscribe();\n console.log('🎏 Streaming user', sub);\n for await (const entry of sub) {\n if (!sub) break;\n if (entry.event === 'status.update') {\n const status = entry.payload;\n console.log(`🔄 Status ${status.id} updated`);\n saveStatus(status, instance);\n } else if (entry.event === 'delete') {\n const statusID = entry.payload;\n console.log(`❌ Status ${statusID} deleted`);\n // delete states.statuses[statusID];\n const s = getStatus(statusID, instance);\n if (s) s._deleted = true;\n }\n }\n console.log('💥 Streaming user loop STOPPED');\n }\n })();\n return () => {\n sub?.unsubscribe?.();\n sub = null;\n };\n }, [streaming]);\n\n return (\n <Timeline\n title={title || t({ id: 'following.title', message: 'Following' })}\n id={id || 'following'}\n emptyText={t`Nothing to see here.`}\n errorText={t`Unable to load posts.`}\n instance={instance}\n fetchItems={fetchHome}\n checkForUpdates={checkForUpdates}\n useItemID\n boostsCarousel={snapStates.settings.boostsCarousel}\n {...props}\n // allowFilters\n filterContext=\"home\"\n showFollowedTags\n showReplyParent\n />\n );\n}\n\nexport default Following;\n","import { plural, t, Trans } from '@lingui/macro';\nimport { useLingui } from '@lingui/react';\nimport {\n FocusableItem,\n MenuDivider,\n MenuGroup,\n MenuHeader,\n MenuItem,\n} from '@szhsin/react-menu';\nimport { useEffect, useMemo, useRef, useState } from 'preact/hooks';\nimport { useNavigate, useParams, useSearchParams } from 'react-router-dom';\n\nimport Icon from '../components/icon';\nimport MenuConfirm from '../components/menu-confirm';\nimport Menu2 from '../components/menu2';\nimport { SHORTCUTS_LIMIT } from '../components/shortcuts-settings';\nimport Timeline from '../components/timeline';\nimport { api } from '../utils/api';\nimport { filteredItems } from '../utils/filters';\nimport showToast from '../utils/show-toast';\nimport states, { saveStatus } from '../utils/states';\nimport { isMediaFirstInstance } from '../utils/store-utils';\nimport useTitle from '../utils/useTitle';\n\nconst LIMIT = 20;\n\n// Limit is 4 per \"mode\"\n// https://github.com/mastodon/mastodon/issues/15194\n// Hard-coded https://github.com/mastodon/mastodon/blob/19614ba2477f3d12468f5ec251ce1cc5f8c6210c/app/models/tag_feed.rb#L4\nconst TAGS_LIMIT_PER_MODE = 4;\nconst TOTAL_TAGS_LIMIT = TAGS_LIMIT_PER_MODE + 1;\n\nfunction Hashtags({ media: mediaView, columnMode, ...props }) {\n // const navigate = useNavigate();\n let { hashtag, ...params } = columnMode ? {} : useParams();\n if (props.hashtag) hashtag = props.hashtag;\n let hashtags = hashtag.trim().split(/[\\s+]+/);\n hashtags.sort();\n hashtag = hashtags[0];\n const [searchParams, setSearchParams] = useSearchParams();\n const media = mediaView || !!searchParams.get('media');\n const linkParams = media ? '?media=1' : '';\n\n const { masto, instance, authenticated } = api({\n instance: props?.instance || params.instance,\n });\n const {\n masto: currentMasto,\n instance: currentInstance,\n authenticated: currentAuthenticated,\n } = api();\n const hashtagTitle = hashtags.map((t) => `#${t}`).join(' ');\n const title = instance\n ? media\n ? t`${hashtagTitle} (Media only) on ${instance}`\n : t`${hashtagTitle} on ${instance}`\n : media\n ? t`${hashtagTitle} (Media only)`\n : t`${hashtagTitle}`;\n useTitle(title, `/:instance?/t/:hashtag`);\n const latestItem = useRef();\n\n const mediaFirst = useMemo(() => isMediaFirstInstance(), []);\n\n // const hashtagsIterator = useRef();\n const maxID = useRef(undefined);\n async function fetchHashtags(firstLoad) {\n // if (firstLoad || !hashtagsIterator.current) {\n // hashtagsIterator.current = masto.v1.timelines.tag.$select(hashtag).list({\n // limit: LIMIT,\n // any: hashtags.slice(1),\n // });\n // }\n // const results = await hashtagsIterator.current.next();\n\n // NOTE: Temporary fix for listHashtag not persisting `any` in subsequent calls.\n const results = await masto.v1.timelines.tag\n .$select(hashtag)\n .list({\n limit: LIMIT,\n any: hashtags.slice(1),\n maxId: firstLoad ? undefined : maxID.current,\n onlyMedia: media ? true : undefined,\n })\n .next();\n let { value } = results;\n if (value?.length) {\n if (firstLoad) {\n latestItem.current = value[0].id;\n }\n\n // value = filteredItems(value, 'public');\n value.forEach((item) => {\n saveStatus(item, instance, {\n skipThreading: media || mediaFirst, // If media view, no need to form threads\n });\n });\n\n maxID.current = value[value.length - 1].id;\n }\n return {\n ...results,\n value,\n };\n }\n\n async function checkForUpdates() {\n try {\n const results = await masto.v1.timelines.tag\n .$select(hashtag)\n .list({\n limit: 1,\n any: hashtags.slice(1),\n since_id: latestItem.current,\n onlyMedia: media,\n })\n .next();\n let { value } = results;\n const valueContainsLatestItem = value[0]?.id === latestItem.current; // since_id might not be supported\n if (value?.length && !valueContainsLatestItem) {\n value = filteredItems(value, 'public');\n return true;\n }\n return false;\n } catch (e) {\n return false;\n }\n }\n\n const [followUIState, setFollowUIState] = useState('default');\n const [info, setInfo] = useState();\n // Get hashtag info\n useEffect(() => {\n (async () => {\n try {\n const info = await masto.v1.tags.$select(hashtag).fetch();\n console.log(info);\n setInfo(info);\n } catch (e) {\n console.error(e);\n }\n })();\n }, [hashtag]);\n\n const reachLimit = hashtags.length >= TOTAL_TAGS_LIMIT;\n\n const [featuredUIState, setFeaturedUIState] = useState('default');\n const [featuredTags, setFeaturedTags] = useState([]);\n const [isFeaturedTag, setIsFeaturedTag] = useState(false);\n useEffect(() => {\n if (!authenticated) return;\n (async () => {\n try {\n const featuredTags = await masto.v1.featuredTags.list();\n setFeaturedTags(featuredTags);\n setIsFeaturedTag(\n featuredTags.some(\n (tag) => tag.name.toLowerCase() === hashtag.toLowerCase(),\n ),\n );\n } catch (e) {\n console.error(e);\n }\n })();\n }, []);\n\n return (\n <Timeline\n key={instance + hashtagTitle}\n title={title}\n titleComponent={\n !!instance && (\n <h1 class=\"header-double-lines\">\n <b dir=\"auto\">{hashtagTitle}</b>\n <div>{instance}</div>\n </h1>\n )\n }\n id=\"hashtag\"\n instance={instance}\n emptyText={t`No one has posted anything with this tag yet.`}\n errorText={t`Unable to load posts with this tag`}\n fetchItems={fetchHashtags}\n checkForUpdates={checkForUpdates}\n useItemID\n view={media || mediaFirst ? 'media' : undefined}\n refresh={media}\n // allowFilters\n filterContext=\"public\"\n headerEnd={\n <Menu2\n portal\n setDownOverflow\n overflow=\"auto\"\n // viewScroll=\"close\"\n position=\"anchor\"\n menuButton={\n <button type=\"button\" class=\"plain\">\n <Icon icon=\"more\" size=\"l\" alt={t`More`} />\n </button>\n }\n >\n {!!info && hashtags.length === 1 && (\n <>\n <MenuConfirm\n subMenu\n confirm={info.following}\n confirmLabel={t`Unfollow #${hashtag}?`}\n disabled={followUIState === 'loading' || !authenticated}\n onClick={() => {\n setFollowUIState('loading');\n if (info.following) {\n // const yes = confirm(`Unfollow #${hashtag}?`);\n // if (!yes) {\n // setFollowUIState('default');\n // return;\n // }\n masto.v1.tags\n .$select(hashtag)\n .unfollow()\n .then(() => {\n setInfo({ ...info, following: false });\n showToast(t`Unfollowed #${hashtag}`);\n })\n .catch((e) => {\n alert(e);\n console.error(e);\n })\n .finally(() => {\n setFollowUIState('default');\n });\n } else {\n masto.v1.tags\n .$select(hashtag)\n .follow()\n .then(() => {\n setInfo({ ...info, following: true });\n showToast(t`Followed #${hashtag}`);\n })\n .catch((e) => {\n alert(e);\n console.error(e);\n })\n .finally(() => {\n setFollowUIState('default');\n });\n }\n }}\n >\n {info.following ? (\n <>\n <Icon icon=\"check-circle\" />{' '}\n <span>\n <Trans>Following…</Trans>\n </span>\n </>\n ) : (\n <>\n <Icon icon=\"plus\" />{' '}\n <span>\n <Trans>Follow</Trans>\n </span>\n </>\n )}\n </MenuConfirm>\n <MenuItem\n type=\"checkbox\"\n checked={isFeaturedTag}\n disabled={featuredUIState === 'loading' || !authenticated}\n onClick={() => {\n setFeaturedUIState('loading');\n if (isFeaturedTag) {\n const featuredTagID = featuredTags.find(\n (tag) => tag.name.toLowerCase() === hashtag.toLowerCase(),\n ).id;\n if (featuredTagID) {\n masto.v1.featuredTags\n .$select(featuredTagID)\n .remove()\n .then(() => {\n setIsFeaturedTag(false);\n showToast(t`Unfeatured on profile`);\n setFeaturedTags(\n featuredTags.filter(\n (tag) => tag.id !== featuredTagID,\n ),\n );\n })\n .catch((e) => {\n console.error(e);\n })\n .finally(() => {\n setFeaturedUIState('default');\n });\n } else {\n showToast(t`Unable to unfeature on profile`);\n }\n } else {\n masto.v1.featuredTags\n .create({\n name: hashtag,\n })\n .then((value) => {\n setIsFeaturedTag(true);\n showToast(t`Featured on profile`);\n setFeaturedTags(featuredTags.concat(value));\n })\n .catch((e) => {\n console.error(e);\n })\n .finally(() => {\n setFeaturedUIState('default');\n });\n }\n }}\n >\n {isFeaturedTag ? (\n <>\n <Icon icon=\"check-circle\" />\n <span>\n <Trans>Featured on profile</Trans>\n </span>\n </>\n ) : (\n <>\n <Icon icon=\"check-circle\" />\n <span>\n <Trans>Feature on profile</Trans>\n </span>\n </>\n )}\n </MenuItem>\n <MenuDivider />\n </>\n )}\n {!mediaFirst && (\n <>\n <MenuHeader className=\"plain\">\n <Trans>Filters</Trans>\n </MenuHeader>\n <MenuItem\n type=\"checkbox\"\n checked={!!media}\n onClick={() => {\n if (media) {\n searchParams.delete('media');\n } else {\n searchParams.set('media', '1');\n }\n setSearchParams(searchParams);\n }}\n >\n <Icon icon=\"check-circle\" alt=\"☑️\" />{' '}\n <span class=\"menu-grow\">\n <Trans>Media only</Trans>\n </span>\n </MenuItem>\n <MenuDivider />\n </>\n )}\n <FocusableItem className=\"menu-field\" disabled={reachLimit}>\n {({ ref }) => (\n <form\n onSubmit={(e) => {\n e.preventDefault();\n const newHashtag = e.target[0].value?.trim?.();\n // Use includes but need to be case insensitive\n if (\n newHashtag &&\n !hashtags.some(\n (t) => t.toLowerCase() === newHashtag.toLowerCase(),\n )\n ) {\n hashtags.push(newHashtag);\n hashtags.sort();\n // navigate(\n // instance\n // ? `/${instance}/t/${hashtags.join('+')}`\n // : `/t/${hashtags.join('+')}`,\n // );\n location.hash = instance\n ? `/${instance}/t/${hashtags.join('+')}`\n : `/t/${hashtags.join('+')}${linkParams}`;\n }\n }}\n >\n <Icon icon=\"hashtag\" />\n <input\n ref={ref}\n type=\"text\"\n placeholder={\n reachLimit\n ? plural(TOTAL_TAGS_LIMIT, {\n other: 'Max # tags',\n })\n : t`Add hashtag`\n }\n required\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellCheck={false}\n // no spaces, no hashtags\n pattern=\"[^#][^\\s#]+[^#]\"\n disabled={reachLimit}\n dir=\"auto\"\n />\n </form>\n )}\n </FocusableItem>\n <MenuGroup takeOverflow>\n {hashtags.map((tag, i) => (\n <MenuItem\n key={tag}\n disabled={hashtags.length === 1}\n onClick={(e) => {\n hashtags.splice(i, 1);\n hashtags.sort();\n // navigate(\n // instance\n // ? `/${instance}/t/${hashtags.join('+')}`\n // : `/t/${hashtags.join('+')}`,\n // );\n location.hash = instance\n ? `/${instance}/t/${hashtags.join('+')}${linkParams}`\n : `/t/${hashtags.join('+')}${linkParams}`;\n }}\n >\n <Icon icon=\"x\" alt={t`Remove hashtag`} class=\"danger-icon\" />\n <span class=\"bidi-isolate\">\n <span class=\"more-insignificant\">#</span>\n {tag}\n </span>\n </MenuItem>\n ))}\n </MenuGroup>\n <MenuDivider />\n <MenuItem\n disabled={!currentAuthenticated}\n onClick={() => {\n if (states.shortcuts.length >= SHORTCUTS_LIMIT) {\n alert(\n plural(SHORTCUTS_LIMIT, {\n one: 'Max # shortcut reached. Unable to add shortcut.',\n other: 'Max # shortcuts reached. Unable to add shortcut.',\n }),\n );\n return;\n }\n const shortcut = {\n type: 'hashtag',\n hashtag: hashtags.join(' '),\n instance,\n media: media ? 'on' : undefined,\n };\n // Check if already exists\n const exists = states.shortcuts.some(\n (s) =>\n s.type === shortcut.type &&\n s.hashtag\n .split(/[\\s+]+/)\n .sort()\n .join(' ') ===\n shortcut.hashtag\n .split(/[\\s+]+/)\n .sort()\n .join(' ') &&\n (s.instance ? s.instance === shortcut.instance : true) &&\n (s.media ? !!s.media === !!shortcut.media : true),\n );\n if (exists) {\n alert(t`This shortcut already exists`);\n } else {\n states.shortcuts.push(shortcut);\n showToast(t`Hashtag shortcut added`);\n }\n }}\n >\n <Icon icon=\"shortcut\" />{' '}\n <span>\n <Trans>Add to Shortcuts</Trans>\n </span>\n </MenuItem>\n <MenuItem\n onClick={() => {\n let newInstance = prompt(\n t`Enter a new instance e.g. \"mastodon.social\"`,\n );\n if (!/\\./.test(newInstance)) {\n if (newInstance) alert(t`Invalid instance`);\n return;\n }\n if (newInstance) {\n newInstance = newInstance.toLowerCase().trim();\n // navigate(`/${newInstance}/t/${hashtags.join('+')}`);\n location.hash = `/${newInstance}/t/${hashtags.join(\n '+',\n )}${linkParams}`;\n }\n }}\n >\n <Icon icon=\"bus\" />{' '}\n <span>\n <Trans>Go to another instance…</Trans>\n </span>\n </MenuItem>\n {currentInstance !== instance && (\n <MenuItem\n onClick={() => {\n location.hash = `/${currentInstance}/t/${hashtags.join(\n '+',\n )}${linkParams}`;\n }}\n >\n <Icon icon=\"bus\" />{' '}\n <small class=\"menu-double-lines\">\n <Trans>\n Go to my instance (<b>{currentInstance}</b>)\n </Trans>\n </small>\n </MenuItem>\n )}\n </Menu2>\n }\n />\n );\n}\n\nexport default Hashtags;\n","import './lists.css';\n\nimport { t, Trans } from '@lingui/macro';\nimport { Menu, MenuDivider, MenuItem } from '@szhsin/react-menu';\nimport { useEffect, useRef, useState } from 'preact/hooks';\nimport { InView } from 'react-intersection-observer';\nimport { useNavigate, useParams } from 'react-router-dom';\nimport { useSnapshot } from 'valtio';\n\nimport AccountBlock from '../components/account-block';\nimport Icon from '../components/icon';\nimport Link from '../components/link';\nimport ListAddEdit from '../components/list-add-edit';\nimport MenuConfirm from '../components/menu-confirm';\nimport MenuLink from '../components/menu-link';\nimport Menu2 from '../components/menu2';\nimport Modal from '../components/modal';\nimport Timeline from '../components/timeline';\nimport { api } from '../utils/api';\nimport { filteredItems } from '../utils/filters';\nimport { getList, getLists } from '../utils/lists';\nimport states, { saveStatus } from '../utils/states';\nimport useTitle from '../utils/useTitle';\n\nconst LIMIT = 20;\n\nfunction List(props) {\n const snapStates = useSnapshot(states);\n const { masto, instance } = api();\n const id = props?.id || useParams()?.id;\n // const navigate = useNavigate();\n const latestItem = useRef();\n // const [reloadCount, reload] = useReducer((c) => c + 1, 0);\n\n const listIterator = useRef();\n async function fetchList(firstLoad) {\n if (firstLoad || !listIterator.current) {\n listIterator.current = masto.v1.timelines.list.$select(id).list({\n limit: LIMIT,\n });\n }\n const results = await listIterator.current.next();\n let { value } = results;\n if (value?.length) {\n if (firstLoad) {\n latestItem.current = value[0].id;\n }\n\n // value = filteredItems(value, 'home');\n value.forEach((item) => {\n saveStatus(item, instance);\n });\n }\n return {\n ...results,\n value,\n };\n }\n\n async function checkForUpdates() {\n try {\n const results = await masto.v1.timelines.list.$select(id).list({\n limit: 1,\n since_id: latestItem.current,\n });\n let { value } = results;\n const valueContainsLatestItem = value[0]?.id === latestItem.current; // since_id might not be supported\n if (value?.length && !valueContainsLatestItem) {\n value = filteredItems(value, 'home');\n return true;\n }\n return false;\n } catch (e) {\n return false;\n }\n }\n\n const [lists, setLists] = useState([]);\n useEffect(() => {\n getLists().then(setLists);\n }, []);\n\n const [list, setList] = useState({ title: 'List' });\n // const [title, setTitle] = useState(`List`);\n useTitle(list.title, `/l/:id`);\n useEffect(() => {\n (async () => {\n try {\n const list = await getList(id);\n setList(list);\n // setTitle(list.title);\n } catch (e) {\n console.error(e);\n }\n })();\n }, [id]);\n\n const [showListAddEditModal, setShowListAddEditModal] = useState(false);\n const [showManageMembersModal, setShowManageMembersModal] = useState(false);\n\n return (\n <>\n <Timeline\n key={id}\n title={list.title}\n id=\"list\"\n emptyText={t`Nothing yet.`}\n errorText={t`Unable to load posts.`}\n instance={instance}\n fetchItems={fetchList}\n checkForUpdates={checkForUpdates}\n useItemID\n boostsCarousel={snapStates.settings.boostsCarousel}\n // allowFilters\n filterContext=\"home\"\n showReplyParent\n // refresh={reloadCount}\n headerStart={\n // <Link to=\"/l\" class=\"button plain\">\n // <Icon icon=\"list\" size=\"l\" />\n // </Link>\n <Menu2\n overflow=\"auto\"\n menuButton={\n <button type=\"button\" class=\"plain\">\n <Icon icon=\"list\" size=\"l\" alt={t`Lists`} />\n <Icon icon=\"chevron-down\" size=\"s\" />\n </button>\n }\n >\n <MenuLink to=\"/l\">\n <span>\n <Trans>All Lists</Trans>\n </span>\n </MenuLink>\n {lists?.length > 0 && (\n <>\n <MenuDivider />\n {lists.map((list) => (\n <MenuLink key={list.id} to={`/l/${list.id}`}>\n <span>{list.title}</span>\n </MenuLink>\n ))}\n </>\n )}\n </Menu2>\n }\n headerEnd={\n <Menu2\n portal\n setDownOverflow\n overflow=\"auto\"\n viewScroll=\"close\"\n position=\"anchor\"\n menuButton={\n <button type=\"button\" class=\"plain\">\n <Icon icon=\"more\" size=\"l\" alt={t`More`} />\n </button>\n }\n >\n <MenuItem\n onClick={() =>\n setShowListAddEditModal({\n list,\n })\n }\n >\n <Icon icon=\"pencil\" size=\"l\" />\n <span>\n <Trans>Edit</Trans>\n </span>\n </MenuItem>\n <MenuItem onClick={() => setShowManageMembersModal(true)}>\n <Icon icon=\"group\" size=\"l\" />\n <span>\n <Trans>Manage members</Trans>\n </span>\n </MenuItem>\n </Menu2>\n }\n />\n {showListAddEditModal && (\n <Modal\n onClick={(e) => {\n if (e.target === e.currentTarget) {\n setShowListAddEditModal(false);\n }\n }}\n >\n <ListAddEdit\n list={showListAddEditModal?.list}\n onClose={(result) => {\n if (result.state === 'success' && result.list) {\n setList(result.list);\n // reload();\n } else if (result.state === 'deleted') {\n // navigate('/l');\n location.hash = '/l';\n }\n setShowListAddEditModal(false);\n }}\n />\n </Modal>\n )}\n {showManageMembersModal && (\n <Modal\n onClick={(e) => {\n if (e.target === e.currentTarget) {\n setShowManageMembersModal(false);\n }\n }}\n >\n <ListManageMembers\n listID={id}\n onClose={() => setShowManageMembersModal(false)}\n />\n </Modal>\n )}\n </>\n );\n}\n\nconst MEMBERS_LIMIT = 40;\nfunction ListManageMembers({ listID, onClose }) {\n // Show list of members with [Remove] button\n // API only returns 40 members at a time, so this need to be paginated with infinite scroll\n // Show [Add] button after removing a member\n const { masto, instance } = api();\n const [members, setMembers] = useState([]);\n const [uiState, setUIState] = useState('default');\n const [showMore, setShowMore] = useState(false);\n\n const membersIterator = useRef();\n\n async function fetchMembers(firstLoad) {\n setShowMore(false);\n setUIState('loading');\n (async () => {\n try {\n if (firstLoad || !membersIterator.current) {\n membersIterator.current = masto.v1.lists\n .$select(listID)\n .accounts.list({\n limit: MEMBERS_LIMIT,\n });\n }\n const results = await membersIterator.current.next();\n let { done, value } = results;\n if (value?.length) {\n if (firstLoad) {\n setMembers(value);\n } else {\n setMembers(members.concat(value));\n }\n setShowMore(!done);\n } else {\n setShowMore(false);\n }\n setUIState('default');\n } catch (e) {\n setUIState('error');\n }\n })();\n }\n\n useEffect(() => {\n fetchMembers(true);\n }, []);\n\n return (\n <div class=\"sheet\" id=\"list-manage-members-container\">\n {!!onClose && (\n <button type=\"button\" class=\"sheet-close\" onClick={onClose}>\n <Icon icon=\"x\" alt={t`Close`} />\n </button>\n )}\n <header>\n <h2>\n <Trans>Manage members</Trans>\n </h2>\n </header>\n <main>\n <ul>\n {members.map((member) => (\n <li key={member.id}>\n <AccountBlock account={member} instance={instance} />\n <RemoveAddButton account={member} listID={listID} />\n </li>\n ))}\n {showMore && uiState === 'default' && (\n <InView as=\"li\" onChange={(inView) => inView && fetchMembers()}>\n <button type=\"button\" class=\"light block\" onClick={fetchMembers}>\n <Trans>Show more…</Trans>\n </button>\n </InView>\n )}\n </ul>\n </main>\n </div>\n );\n}\n\nfunction RemoveAddButton({ account, listID }) {\n const { masto } = api();\n const [uiState, setUIState] = useState('default');\n const [removed, setRemoved] = useState(false);\n\n return (\n <MenuConfirm\n confirm={!removed}\n confirmLabel={\n <span>\n <Trans>\n Remove <span class=\"bidi-isolate\">@{account.username}</span> from\n list?\n </Trans>\n </span>\n }\n align=\"end\"\n menuItemClassName=\"danger\"\n onClick={() => {\n if (removed) {\n setUIState('loading');\n (async () => {\n try {\n await masto.v1.lists.$select(listID).accounts.create({\n accountIds: [account.id],\n });\n setUIState('default');\n setRemoved(false);\n } catch (e) {\n setUIState('error');\n }\n })();\n } else {\n // const yes = confirm(`Remove ${account.username} from this list?`);\n // if (!yes) return;\n setUIState('loading');\n\n (async () => {\n try {\n await masto.v1.lists.$select(listID).accounts.remove({\n accountIds: [account.id],\n });\n setUIState('default');\n setRemoved(true);\n } catch (e) {\n setUIState('error');\n }\n })();\n }\n }}\n >\n <button\n type=\"button\"\n class={`light ${removed ? '' : 'danger'}`}\n disabled={uiState === 'loading'}\n >\n {removed ? t`Add` : t`Remove…`}\n </button>\n </MenuConfirm>\n );\n}\n\nexport default List;\n","// This is like very lame \"type-checking\" lol\nconst notificationTypeKeys = {\n mention: ['account', 'status'],\n status: ['account', 'status'],\n reblog: ['account', 'status'],\n follow: ['account'],\n follow_request: ['account'],\n favourite: ['account', 'status'],\n poll: ['status'],\n update: ['status'],\n};\n\nconst GROUP_TYPES = ['favourite', 'reblog', 'follow'];\nconst groupable = (type) => GROUP_TYPES.includes(type);\n\nexport function fixNotifications(notifications) {\n return notifications.filter((notification) => {\n const { type, id, createdAt } = notification;\n if (!type) {\n console.warn('Notification missing type', notification);\n return false;\n }\n if (!id || !createdAt) {\n console.warn('Notification missing id or createdAt', notification);\n // Continue processing this despite missing id or createdAt\n }\n const keys = notificationTypeKeys[type];\n if (keys?.length) {\n return keys.every((key) => !!notification[key]);\n }\n return true; // skip other types\n });\n}\n\nexport function massageNotifications2(notifications) {\n if (notifications?.notificationGroups) {\n const {\n accounts = [],\n notificationGroups = [],\n statuses = [],\n } = notifications;\n return notificationGroups.map((group) => {\n const { sampleAccountIds, statusId } = group;\n const sampleAccounts =\n sampleAccountIds?.map((id) => accounts.find((a) => a.id === id)) || [];\n const status = statuses?.find((s) => s.id === statusId) || null;\n return {\n ...group,\n sampleAccounts,\n status,\n };\n });\n }\n return notifications;\n}\n\nexport function groupNotifications2(groupNotifications) {\n // Make grouped notifications to look like faux grouped notifications\n const newGroupNotifications = groupNotifications.map((gn) => {\n const {\n latestPageNotificationAt,\n mostRecentNotificationId,\n sampleAccounts,\n notificationsCount,\n } = gn;\n\n return {\n id: '' + mostRecentNotificationId,\n createdAt: latestPageNotificationAt,\n account: sampleAccounts[0],\n ...gn,\n };\n });\n\n // Merge favourited and reblogged of same status into a single notification\n // - new type: \"favourite+reblog\"\n // - sum numbers for `notificationsCount` and `sampleAccounts`\n const notificationsMap = {};\n const newGroupNotifications1 = [];\n for (let i = 0; i < newGroupNotifications.length; i++) {\n const gn = newGroupNotifications[i];\n const {\n type,\n status,\n createdAt,\n notificationsCount,\n sampleAccounts,\n groupKey,\n } = gn;\n const date = createdAt ? new Date(createdAt).toLocaleDateString() : '';\n let virtualType = type;\n // const sameCount =\n notificationsCount > 0 && notificationsCount === sampleAccounts?.length;\n // if (sameCount && (type === 'favourite' || type === 'reblog')) {\n if (type === 'favourite' || type === 'reblog') {\n virtualType = 'favourite+reblog';\n }\n // const key = `${status?.id}-${virtualType}-${date}-${sameCount ? 1 : 0}`;\n const key = `${status?.id}-${virtualType}-${date}`;\n const mappedNotification = notificationsMap[key];\n if (!groupable(type)) {\n newGroupNotifications1.push(gn);\n } else if (mappedNotification) {\n // Merge sampleAccounts + merge _types\n sampleAccounts.forEach((a) => {\n const mappedAccount = mappedNotification.sampleAccounts.find(\n (ma) => ma.id === a.id,\n );\n if (!mappedAccount) {\n mappedNotification.sampleAccounts.push({\n ...a,\n _types: [type],\n });\n } else {\n mappedAccount._types.push(type);\n mappedAccount._types.sort().reverse();\n }\n });\n // mappedNotification.notificationsCount =\n // mappedNotification.sampleAccounts.length;\n mappedNotification.notificationsCount = Math.min(\n mappedNotification.notificationsCount,\n notificationsCount,\n );\n mappedNotification._notificationsCount.push(notificationsCount);\n mappedNotification._accounts = mappedNotification.sampleAccounts;\n mappedNotification._groupKeys.push(groupKey);\n } else {\n const accounts = sampleAccounts.map((a) => ({\n ...a,\n _types: [type],\n }));\n notificationsMap[key] = {\n ...gn,\n sampleAccounts: accounts,\n type: virtualType,\n _accounts: accounts,\n _groupKeys: groupKey ? [groupKey] : [],\n _notificationsCount: [notificationsCount],\n };\n newGroupNotifications1.push(notificationsMap[key]);\n }\n }\n\n // 2nd pass.\n // - Group 1 account favourte/reblog multiple posts\n // - _statuses: [status, status, ...]\n const notificationsMap2 = {};\n const newGroupNotifications2 = [];\n for (let i = 0; i < newGroupNotifications1.length; i++) {\n const gn = newGroupNotifications1[i];\n const { type, account, _accounts, sampleAccounts, createdAt, groupKey } =\n gn;\n const date = createdAt ? new Date(createdAt).toLocaleDateString() : '';\n const hasOneAccount =\n sampleAccounts?.length === 1 || _accounts?.length === 1;\n if (\n (type === 'favourite' ||\n type === 'reblog' ||\n type === 'favourite+reblog') &&\n hasOneAccount\n ) {\n const key = `${account?.id}-${type}-${date}`;\n const mappedNotification = notificationsMap2[key];\n if (mappedNotification) {\n mappedNotification._statuses.push(gn.status);\n mappedNotification._ids += `-${gn.id}`;\n mappedNotification._groupKeys.push(groupKey);\n } else {\n let n = (notificationsMap2[key] = {\n ...gn,\n type,\n _ids: gn.id,\n _statuses: [gn.status],\n _groupKeys: groupKey ? [groupKey] : [],\n });\n newGroupNotifications2.push(n);\n }\n } else {\n newGroupNotifications2.push(gn);\n }\n }\n\n console.log('newGroupNotifications2', newGroupNotifications2);\n\n return newGroupNotifications2;\n}\n\nexport default function groupNotifications(notifications) {\n // Filter out invalid notifications\n notifications = fixNotifications(notifications);\n\n // Create new flat list of notifications\n // Combine sibling notifications based on type and status id\n // Concat all notification.account into an array of _accounts\n const notificationsMap = {};\n const cleanNotifications = [];\n for (let i = 0, j = 0; i < notifications.length; i++) {\n const notification = notifications[i];\n const { id, status, account, type, createdAt } = notification;\n const date = createdAt ? new Date(createdAt).toLocaleDateString() : '';\n let virtualType = type;\n if (type === 'favourite' || type === 'reblog') {\n virtualType = 'favourite+reblog';\n }\n const key = `${status?.id}-${virtualType}-${date}`;\n const mappedNotification = notificationsMap[key];\n if (!groupable(type)) {\n cleanNotifications[j++] = notification;\n } else if (mappedNotification?.account) {\n const mappedAccount = mappedNotification._accounts.find(\n (a) => a.id === account.id,\n );\n if (mappedAccount) {\n mappedAccount._types.push(type);\n mappedAccount._types.sort().reverse();\n mappedNotification._ids += `-${id}`;\n } else {\n account._types = [type];\n mappedNotification._accounts.push(account);\n mappedNotification._ids += `-${id}`;\n }\n } else {\n if (account) account._types = [type];\n let n = (notificationsMap[key] = {\n ...notification,\n type: virtualType,\n _ids: id,\n _accounts: account ? [account] : [],\n });\n cleanNotifications[j++] = n;\n }\n }\n\n // 2nd pass to group \"favourite+reblog\"-type notifications by account if _accounts.length <= 1\n // This means one acount has favourited and reblogged the multiple statuses\n // The grouped notification\n // - type: \"favourite+reblog+account\"\n // - _statuses: [status, status, ...]\n const notificationsMap2 = {};\n const cleanNotifications2 = [];\n for (let i = 0, j = 0; i < cleanNotifications.length; i++) {\n const notification = cleanNotifications[i];\n const { id, account, _accounts, type, createdAt } = notification;\n const date = createdAt ? new Date(createdAt).toLocaleDateString() : '';\n if (type === 'favourite+reblog' && account && _accounts.length === 1) {\n const key = `${account?.id}-${type}-${date}`;\n const mappedNotification = notificationsMap2[key];\n if (mappedNotification) {\n mappedNotification._statuses.push(notification.status);\n mappedNotification._ids += `-${id}`;\n } else {\n let n = (notificationsMap2[key] = {\n ...notification,\n type,\n _ids: id,\n _statuses: [notification.status],\n });\n cleanNotifications2[j++] = n;\n }\n } else {\n cleanNotifications2[j++] = notification;\n }\n }\n\n console.log({ notifications, cleanNotifications, cleanNotifications2 });\n\n // return cleanNotifications;\n return cleanNotifications2;\n}\n","import { t, Trans } from '@lingui/macro';\nimport { useMemo, useRef, useState } from 'preact/hooks';\nimport { useSearchParams } from 'react-router-dom';\n\nimport Link from '../components/link';\nimport Timeline from '../components/timeline';\nimport { api } from '../utils/api';\nimport { fixNotifications } from '../utils/group-notifications';\nimport { saveStatus } from '../utils/states';\nimport useTitle from '../utils/useTitle';\n\nconst LIMIT = 20;\nconst emptySearchParams = new URLSearchParams();\n\nfunction Mentions({ columnMode, ...props }) {\n const { masto, instance } = api();\n const [searchParams] = columnMode ? [emptySearchParams] : useSearchParams();\n const [stateType, setStateType] = useState(null);\n const type = props?.type || searchParams.get('type') || stateType;\n useTitle(type === 'private' ? t`Private mentions` : t`Mentions`, '/mentions');\n\n const mentionsIterator = useRef();\n const latestItem = useRef();\n\n async function fetchMentions(firstLoad) {\n if (firstLoad || !mentionsIterator.current) {\n mentionsIterator.current = masto.v1.notifications.list({\n limit: LIMIT,\n types: ['mention'],\n });\n }\n const results = await mentionsIterator.current.next();\n let { value } = results;\n if (value?.length) {\n value = fixNotifications(value);\n\n if (firstLoad) {\n latestItem.current = value[0].id;\n console.log('First load', latestItem.current);\n }\n\n value.forEach(({ status: item }) => {\n saveStatus(item, instance);\n });\n }\n return {\n ...results,\n value: value?.map((item) => item.status),\n };\n }\n\n const conversationsIterator = useRef();\n const latestConversationItem = useRef();\n async function fetchConversations(firstLoad) {\n if (firstLoad || !conversationsIterator.current) {\n conversationsIterator.current = masto.v1.conversations.list({\n limit: LIMIT,\n });\n }\n const results = await conversationsIterator.current.next();\n let { value } = results;\n value = value?.filter((item) => item.lastStatus);\n if (value?.length) {\n if (firstLoad) {\n latestConversationItem.current = value[0].lastStatus.id;\n console.log('First load', latestConversationItem.current);\n }\n\n value.forEach(({ lastStatus: item }) => {\n saveStatus(item, instance);\n });\n }\n console.log('results', results);\n return {\n ...results,\n value: value?.map((item) => item.lastStatus),\n };\n }\n\n function fetchItems(...args) {\n if (type === 'private') {\n return fetchConversations(...args);\n }\n return fetchMentions(...args);\n }\n\n async function checkForUpdates() {\n if (type === 'private') {\n try {\n const results = await masto.v1.conversations\n .list({\n limit: 1,\n since_id: latestConversationItem.current,\n })\n .next();\n let { value } = results;\n console.log(\n 'checkForUpdates PRIVATE',\n latestConversationItem.current,\n value,\n );\n const valueContainsLatestItem =\n value[0]?.id === latestConversationItem.current; // since_id might not be supported\n if (value?.length && !valueContainsLatestItem) {\n latestConversationItem.current = value[0].lastStatus.id;\n return true;\n }\n return false;\n } catch (e) {\n return false;\n }\n } else {\n try {\n const results = await masto.v1.notifications\n .list({\n limit: 1,\n types: ['mention'],\n since_id: latestItem.current,\n })\n .next();\n let { value } = results;\n console.log('checkForUpdates ALL', latestItem.current, value);\n if (value?.length) {\n latestItem.current = value[0].id;\n return true;\n }\n return false;\n } catch (e) {\n return false;\n }\n }\n }\n\n const TimelineStart = useMemo(() => {\n return (\n <div class=\"filter-bar centered\">\n <Link\n to=\"/mentions\"\n class={!type ? 'is-active' : ''}\n onClick={(e) => {\n if (columnMode) {\n e.preventDefault();\n setStateType(null);\n }\n }}\n >\n <Trans>All</Trans>\n </Link>\n <Link\n to=\"/mentions?type=private\"\n class={type === 'private' ? 'is-active' : ''}\n onClick={(e) => {\n if (columnMode) {\n e.preventDefault();\n setStateType('private');\n }\n }}\n >\n <Trans>Private</Trans>\n </Link>\n </div>\n );\n }, [type]);\n\n return (\n <Timeline\n title={t`Mentions`}\n id=\"mentions\"\n emptyText={t`No one mentioned you :(`}\n errorText={t`Unable to load mentions.`}\n instance={instance}\n fetchItems={fetchItems}\n checkForUpdates={checkForUpdates}\n useItemID\n timelineStart={TimelineStart}\n refresh={type}\n />\n );\n}\n\nexport default Mentions;\n","import './notifications.css';\n\nimport { msg, Plural, t, Trans } from '@lingui/macro';\nimport { useLingui } from '@lingui/react';\nimport { Fragment } from 'preact';\nimport { memo } from 'preact/compat';\nimport {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'preact/hooks';\nimport { useHotkeys } from 'react-hotkeys-hook';\nimport { InView } from 'react-intersection-observer';\nimport { useSearchParams } from 'react-router-dom';\nimport { useSnapshot } from 'valtio';\nimport { subscribeKey } from 'valtio/utils';\n\nimport AccountBlock from '../components/account-block';\nimport FollowRequestButtons from '../components/follow-request-buttons';\nimport Icon from '../components/icon';\nimport Link from '../components/link';\nimport Loader from '../components/loader';\nimport Modal from '../components/modal';\nimport NavMenu from '../components/nav-menu';\nimport Notification from '../components/notification';\nimport Status from '../components/status';\nimport { api } from '../utils/api';\nimport enhanceContent from '../utils/enhance-content';\nimport groupNotifications, {\n groupNotifications2,\n massageNotifications2,\n} from '../utils/group-notifications';\nimport handleContentLinks from '../utils/handle-content-links';\nimport mem from '../utils/mem';\nimport niceDateTime from '../utils/nice-date-time';\nimport { getRegistration } from '../utils/push-notifications';\nimport shortenNumber from '../utils/shorten-number';\nimport showToast from '../utils/show-toast';\nimport states, { saveStatus } from '../utils/states';\nimport { getCurrentInstance } from '../utils/store-utils';\nimport supports from '../utils/supports';\nimport usePageVisibility from '../utils/usePageVisibility';\nimport useScroll from '../utils/useScroll';\nimport useTitle from '../utils/useTitle';\n\nconst NOTIFICATIONS_LIMIT = 80;\nconst NOTIFICATIONS_GROUPED_LIMIT = 20;\nconst emptySearchParams = new URLSearchParams();\n\nconst scrollIntoViewOptions = {\n block: 'center',\n inline: 'center',\n behavior: 'smooth',\n};\n\nconst memSupportsGroupedNotifications = mem(\n () => supports('@mastodon/grouped-notifications'),\n {\n maxAge: 1000 * 60 * 5, // 5 minutes\n },\n);\n\nexport function mastoFetchNotifications(opts = {}) {\n const { masto } = api();\n if (\n states.settings.groupedNotificationsAlpha &&\n memSupportsGroupedNotifications()\n ) {\n // https://github.com/mastodon/mastodon/pull/29889\n return masto.v2.notifications.list({\n limit: NOTIFICATIONS_GROUPED_LIMIT,\n ...opts,\n });\n } else {\n return masto.v1.notifications.list({\n limit: NOTIFICATIONS_LIMIT,\n ...opts,\n });\n }\n}\n\nexport function getGroupedNotifications(notifications) {\n if (\n states.settings.groupedNotificationsAlpha &&\n memSupportsGroupedNotifications()\n ) {\n return groupNotifications2(notifications);\n } else {\n return groupNotifications(notifications);\n }\n}\n\nconst NOTIFICATIONS_POLICIES = [\n 'forNotFollowing',\n 'forNotFollowers',\n 'forNewAccounts',\n 'forPrivateMentions',\n 'forLimitedAccounts',\n];\nconst NOTIFICATIONS_POLICIES_TEXT = {\n forNotFollowing: msg`You don't follow`,\n forNotFollowers: msg`Who don't follow you`,\n forNewAccounts: msg`With a new account`,\n forPrivateMentions: msg`Who unsolicitedly private mention you`,\n forLimitedAccounts: msg`Who are limited by server moderators`,\n};\n\nfunction Notifications({ columnMode }) {\n const { _ } = useLingui();\n useTitle(t`Notifications`, '/notifications');\n const { masto, instance } = api();\n const snapStates = useSnapshot(states);\n const [uiState, setUIState] = useState('default');\n const [searchParams] = columnMode ? [emptySearchParams] : useSearchParams();\n const notificationID = searchParams.get('id');\n const notificationAccessToken = searchParams.get('access_token');\n const [showMore, setShowMore] = useState(false);\n const [onlyMentions, setOnlyMentions] = useState(false);\n const scrollableRef = useRef();\n const { nearReachEnd, scrollDirection, reachStart, nearReachStart } =\n useScroll({\n scrollableRef,\n });\n const hiddenUI = scrollDirection === 'end' && !nearReachStart;\n const [followRequests, setFollowRequests] = useState([]);\n const [announcements, setAnnouncements] = useState([]);\n\n console.debug('RENDER Notifications');\n\n const notificationsIterator = useRef();\n async function fetchNotifications(firstLoad) {\n if (firstLoad || !notificationsIterator.current) {\n // Reset iterator\n notificationsIterator.current = mastoFetchNotifications({\n excludeTypes: ['follow_request'],\n });\n }\n if (/max_id=($|&)/i.test(notificationsIterator.current?.nextParams)) {\n // Pixelfed returns next paginationed link with empty max_id\n // I assume, it's done (end of list)\n return {\n done: true,\n };\n }\n const allNotifications = await notificationsIterator.current.next();\n const notifications = massageNotifications2(allNotifications.value);\n\n if (notifications?.length) {\n notifications.forEach((notification) => {\n saveStatus(notification.status, instance, {\n skipThreading: true,\n });\n });\n\n // TEST: Slot in a fake notification to test 'severed_relationships'\n // notifications.unshift({\n // id: '123123',\n // type: 'severed_relationships',\n // createdAt: '2024-03-22T19:20:08.316Z',\n // event: {\n // type: 'account_suspension',\n // targetName: 'mastodon.dev',\n // followersCount: 0,\n // followingCount: 0,\n // },\n // });\n\n // TEST: Slot in a fake notification to test 'moderation_warning'\n // notifications.unshift({\n // id: '123123',\n // type: 'moderation_warning',\n // createdAt: new Date().toISOString(),\n // moderation_warning: {\n // id: '1231234',\n // action: 'mark_statuses_as_sensitive',\n // },\n // });\n\n // console.log({ notifications });\n\n const groupedNotifications = getGroupedNotifications(notifications);\n\n if (firstLoad) {\n states.notificationsLast = groupedNotifications[0];\n states.notifications = groupedNotifications;\n\n // Update last read marker\n masto.v1.markers\n .create({\n notifications: {\n lastReadId: groupedNotifications[0].id,\n },\n })\n .catch(() => {});\n } else {\n states.notifications.push(...groupedNotifications);\n }\n }\n\n states.notificationsShowNew = false;\n states.notificationsLastFetchTime = Date.now();\n return allNotifications;\n }\n\n async function fetchFollowRequests() {\n // Note: no pagination here yet because this better be on a separate page. Should be rare use-case???\n try {\n return await masto.v1.followRequests.list({\n limit: 80,\n });\n } catch (e) {\n // Silently fail\n return [];\n }\n }\n\n const loadFollowRequests = () => {\n setUIState('loading');\n (async () => {\n try {\n const requests = await fetchFollowRequests();\n setFollowRequests(requests);\n setUIState('default');\n } catch (e) {\n setUIState('error');\n }\n })();\n };\n\n async function fetchAnnouncements() {\n try {\n return await masto.v1.announcements.list();\n } catch (e) {\n // Silently fail\n return [];\n }\n }\n\n const supportsFilteredNotifications = supports(\n '@mastodon/filtered-notifications',\n );\n const [showNotificationsSettings, setShowNotificationsSettings] =\n useState(false);\n const [notificationsPolicy, setNotificationsPolicy] = useState({});\n function fetchNotificationsPolicy() {\n return masto.v2.notifications.policy.fetch().catch(() => {});\n }\n function loadNotificationsPolicy() {\n fetchNotificationsPolicy()\n .then((policy) => {\n console.log('✨ Notifications policy', policy);\n setNotificationsPolicy(policy);\n })\n .catch(() => {});\n }\n const [notificationsRequests, setNotificationsRequests] = useState(null);\n function fetchNotificationsRequest() {\n return masto.v1.notifications.requests.list();\n }\n\n const loadNotifications = (firstLoad) => {\n setShowNew(false);\n setUIState('loading');\n (async () => {\n try {\n const fetchNotificationsPromise = fetchNotifications(firstLoad);\n\n if (firstLoad) {\n fetchAnnouncements()\n .then((announcements) => {\n announcements.sort((a, b) => {\n // Sort by updatedAt first, then createdAt\n const aDate = new Date(a.updatedAt || a.createdAt);\n const bDate = new Date(b.updatedAt || b.createdAt);\n return bDate - aDate;\n });\n setAnnouncements(announcements);\n })\n .catch(() => {});\n\n fetchFollowRequests()\n .then((requests) => {\n setFollowRequests(requests);\n })\n .catch(() => {});\n\n if (supportsFilteredNotifications) {\n loadNotificationsPolicy();\n }\n }\n\n const { done } = await fetchNotificationsPromise;\n setShowMore(!done);\n\n setUIState('default');\n } catch (e) {\n console.error(e);\n setUIState('error');\n }\n })();\n };\n\n useEffect(() => {\n loadNotifications(true);\n }, []);\n useEffect(() => {\n if (reachStart) {\n loadNotifications(true);\n }\n }, [reachStart]);\n\n // useEffect(() => {\n // if (nearReachEnd && showMore) {\n // loadNotifications();\n // }\n // }, [nearReachEnd, showMore]);\n\n const [showNew, setShowNew] = useState(false);\n\n const loadUpdates = useCallback(\n ({ disableIdleCheck = false } = {}) => {\n if (uiState === 'loading') {\n return;\n }\n console.log('✨ Load updates', {\n autoRefresh: snapStates.settings.autoRefresh,\n scrollTop: scrollableRef.current?.scrollTop,\n inBackground: inBackground(),\n disableIdleCheck,\n });\n if (\n snapStates.settings.autoRefresh &&\n scrollableRef.current?.scrollTop < 16 &&\n (disableIdleCheck || window.__IDLE__) &&\n !inBackground()\n ) {\n loadNotifications(true);\n }\n },\n [snapStates.notificationsShowNew, snapStates.settings.autoRefresh, uiState],\n );\n // useEffect(loadUpdates, [snapStates.notificationsShowNew]);\n\n const lastHiddenTime = useRef();\n usePageVisibility((visible) => {\n if (visible) {\n const timeDiff = Date.now() - lastHiddenTime.current;\n if (!lastHiddenTime.current || timeDiff > 1000 * 3) {\n // 3 seconds\n loadUpdates({\n disableIdleCheck: true,\n });\n } else {\n lastHiddenTime.current = Date.now();\n }\n }\n });\n const firstLoad = useRef(true);\n useEffect(() => {\n let unsub = subscribeKey(states, 'notificationsShowNew', (v) => {\n if (firstLoad.current) {\n firstLoad.current = false;\n return;\n }\n if (uiState === 'loading') return;\n if (v) loadUpdates();\n setShowNew(v);\n });\n return () => unsub?.();\n }, []);\n\n const todayDate = new Date();\n const yesterdayDate = new Date(todayDate - 24 * 60 * 60 * 1000);\n let currentDay = new Date();\n const showTodayEmpty = !snapStates.notifications.some(\n (notification) =>\n new Date(notification.createdAt).toDateString() ===\n todayDate.toDateString(),\n );\n\n const announcementsListRef = useRef();\n\n useEffect(() => {\n if (notificationID) {\n states.routeNotification = {\n id: notificationID,\n accessToken: atob(notificationAccessToken),\n };\n }\n }, [notificationID, notificationAccessToken]);\n\n // useEffect(() => {\n // if (uiState === 'default') {\n // (async () => {\n // try {\n // const registration = await getRegistration();\n // if (registration?.getNotifications) {\n // const notifications = await registration.getNotifications();\n // console.log('🔔 Push notifications', notifications);\n // // Close all notifications?\n // // notifications.forEach((notification) => {\n // // notification.close();\n // // });\n // }\n // } catch (e) {}\n // })();\n // }\n // }, [uiState]);\n\n const itemsSelector = '.notification';\n const jRef = useHotkeys('j', () => {\n const activeItem = document.activeElement.closest(itemsSelector);\n const activeItemRect = activeItem?.getBoundingClientRect();\n const allItems = Array.from(\n scrollableRef.current.querySelectorAll(itemsSelector),\n );\n if (\n activeItem &&\n activeItemRect.top < scrollableRef.current.clientHeight &&\n activeItemRect.bottom > 0\n ) {\n const activeItemIndex = allItems.indexOf(activeItem);\n let nextItem = allItems[activeItemIndex + 1];\n if (nextItem) {\n nextItem.focus();\n nextItem.scrollIntoView(scrollIntoViewOptions);\n }\n } else {\n const topmostItem = allItems.find((item) => {\n const itemRect = item.getBoundingClientRect();\n return itemRect.top >= 44 && itemRect.left >= 0;\n });\n if (topmostItem) {\n topmostItem.focus();\n topmostItem.scrollIntoView(scrollIntoViewOptions);\n }\n }\n });\n\n const kRef = useHotkeys('k', () => {\n // focus on previous status after active item\n const activeItem = document.activeElement.closest(itemsSelector);\n const activeItemRect = activeItem?.getBoundingClientRect();\n const allItems = Array.from(\n scrollableRef.current.querySelectorAll(itemsSelector),\n );\n if (\n activeItem &&\n activeItemRect.top < scrollableRef.current.clientHeight &&\n activeItemRect.bottom > 0\n ) {\n const activeItemIndex = allItems.indexOf(activeItem);\n let prevItem = allItems[activeItemIndex - 1];\n if (prevItem) {\n prevItem.focus();\n prevItem.scrollIntoView(scrollIntoViewOptions);\n }\n } else {\n const topmostItem = allItems.find((item) => {\n const itemRect = item.getBoundingClientRect();\n return itemRect.top >= 44 && itemRect.left >= 0;\n });\n if (topmostItem) {\n topmostItem.focus();\n topmostItem.scrollIntoView(scrollIntoViewOptions);\n }\n }\n });\n\n const oRef = useHotkeys(['enter', 'o'], () => {\n const activeItem = document.activeElement.closest(itemsSelector);\n const statusLink = activeItem?.querySelector('.status-link');\n if (statusLink) {\n statusLink.click();\n }\n });\n\n const today = new Date();\n const todaySubHeading = useMemo(() => {\n return niceDateTime(today, {\n forceOpts: {\n weekday: 'long',\n },\n });\n }, [today]);\n\n return (\n <div\n id=\"notifications-page\"\n class=\"deck-container\"\n ref={(node) => {\n scrollableRef.current = node;\n jRef(node);\n kRef(node);\n oRef(node);\n }}\n tabIndex=\"-1\"\n >\n <div class={`timeline-deck deck ${onlyMentions ? 'only-mentions' : ''}`}>\n <header\n hidden={hiddenUI}\n onClick={(e) => {\n if (!e.target.closest('a, button')) {\n scrollableRef.current?.scrollTo({ top: 0, behavior: 'smooth' });\n }\n }}\n onDblClick={(e) => {\n if (!e.target.closest('a, button')) {\n loadNotifications(true);\n }\n }}\n class={uiState === 'loading' ? 'loading' : ''}\n >\n <div class=\"header-grid\">\n <div class=\"header-side\">\n <NavMenu />\n <Link to=\"/\" class=\"button plain\">\n <Icon icon=\"home\" size=\"l\" alt={t`Home`} />\n </Link>\n </div>\n <h1>\n <Trans>Notifications</Trans>\n </h1>\n <div class=\"header-side\">\n {supportsFilteredNotifications && (\n <button\n type=\"button\"\n class=\"button plain4\"\n onClick={() => {\n setShowNotificationsSettings(true);\n }}\n >\n <Icon\n icon=\"settings\"\n size=\"l\"\n alt={t`Notifications settings`}\n />\n </button>\n )}\n </div>\n </div>\n {showNew && uiState !== 'loading' && (\n <button\n class=\"updates-button shiny-pill\"\n type=\"button\"\n onClick={() => {\n loadNotifications(true);\n scrollableRef.current?.scrollTo({\n top: 0,\n behavior: 'smooth',\n });\n }}\n >\n <Icon icon=\"arrow-up\" /> <Trans>New notifications</Trans>\n </button>\n )}\n </header>\n {announcements.length > 0 && (\n <div class=\"shazam-container\">\n <div class=\"shazam-container-inner\">\n <details class=\"announcements\">\n <summary>\n <span>\n <Icon icon=\"announce\" class=\"announcement-icon\" size=\"l\" />{' '}\n <Plural\n value={announcements.length}\n one=\"Announcement\"\n other=\"Announcements\"\n />{' '}\n <small class=\"insignificant\">{instance}</small>\n </span>\n {announcements.length > 1 && (\n <span class=\"announcements-nav-buttons\">\n {announcements.map((announcement, index) => (\n <button\n type=\"button\"\n class=\"plain2 small\"\n onClick={() => {\n announcementsListRef.current?.children[\n index\n ].scrollIntoView({\n behavior: 'smooth',\n block: 'nearest',\n });\n }}\n >\n {index + 1}\n </button>\n ))}\n </span>\n )}\n </summary>\n <ul\n class={`announcements-list-${\n announcements.length > 1 ? 'multiple' : 'single'\n }`}\n ref={announcementsListRef}\n >\n {announcements.map((announcement) => (\n <li>\n <AnnouncementBlock announcement={announcement} />\n </li>\n ))}\n </ul>\n </details>\n </div>\n </div>\n )}\n {followRequests.length > 0 && (\n <div class=\"follow-requests\">\n <h2 class=\"timeline-header\">\n <Trans>Follow requests</Trans>\n </h2>\n {followRequests.length > 5 ? (\n <details>\n <summary>\n <Plural\n value={followRequests.length}\n one=\"# follow request\"\n other=\"# follow requests\"\n />\n </summary>\n <ul>\n {followRequests.map((account) => (\n <li key={account.id}>\n <AccountBlock account={account} />\n <FollowRequestButtons\n accountID={account.id}\n onChange={() => {\n // loadFollowRequests();\n // loadNotifications(true);\n }}\n />\n </li>\n ))}\n </ul>\n </details>\n ) : (\n <ul>\n {followRequests.map((account) => (\n <li key={account.id}>\n <AccountBlock account={account} />\n <FollowRequestButtons\n accountID={account.id}\n onChange={() => {\n // loadFollowRequests();\n // loadNotifications(true);\n }}\n />\n </li>\n ))}\n </ul>\n )}\n </div>\n )}\n {supportsFilteredNotifications &&\n notificationsPolicy?.summary?.pendingRequestsCount > 0 && (\n <div class=\"shazam-container\">\n <div class=\"shazam-container-inner\">\n <div class=\"filtered-notifications\">\n <details\n onToggle={async (e) => {\n const { open } = e.target;\n if (open) {\n const requests = await fetchNotificationsRequest();\n setNotificationsRequests(requests);\n console.log({ open, requests });\n }\n }}\n >\n <summary>\n <Plural\n value={notificationsPolicy.summary.pendingRequestsCount}\n one=\"Filtered notifications from # person\"\n other=\"Filtered notifications from # people\"\n />\n </summary>\n {!notificationsRequests ? (\n <p class=\"ui-state\">\n <Loader abrupt />\n </p>\n ) : (\n notificationsRequests?.length > 0 && (\n <ul>\n {notificationsRequests.map((request) => (\n <li key={request.id}>\n <div class=\"request-notifcations\">\n {!request.lastStatus?.id && (\n <AccountBlock\n useAvatarStatic\n showStats\n account={request.account}\n />\n )}\n {request.lastStatus?.id && (\n <div class=\"last-post\">\n <Link\n class=\"status-link\"\n to={`/${instance}/s/${request.lastStatus.id}`}\n >\n <Status\n status={request.lastStatus}\n size=\"s\"\n readOnly\n />\n </Link>\n </div>\n )}\n <NotificationRequestModalButton\n request={request}\n />\n </div>\n <NotificationRequestButtons\n request={request}\n onChange={() => {\n loadNotifications(true);\n }}\n />\n </li>\n ))}\n </ul>\n )\n )}\n </details>\n </div>\n </div>\n </div>\n )}\n <div id=\"mentions-option\">\n <label>\n <input\n type=\"checkbox\"\n checked={onlyMentions}\n onChange={(e) => {\n setOnlyMentions(e.target.checked);\n }}\n />{' '}\n <Trans>Only mentions</Trans>\n </label>\n </div>\n <h2 class=\"timeline-header\">\n <Trans>Today</Trans>{' '}\n <small class=\"insignificant bidi-isolate\">{todaySubHeading}</small>\n </h2>\n {showTodayEmpty && (\n <p class=\"ui-state insignificant\">\n {uiState === 'default' ? t`You're all caught up.` : <>…</>}\n </p>\n )}\n {snapStates.notifications.length ? (\n <>\n {snapStates.notifications\n // This is leaked from Notifications popover\n .filter((n) => n.type !== 'follow_request')\n .map((notification) => {\n if (onlyMentions && notification.type !== 'mention') {\n return null;\n }\n const notificationDay = new Date(notification.createdAt);\n const differentDay =\n notificationDay.toDateString() !== currentDay.toDateString();\n if (differentDay) {\n currentDay = notificationDay;\n }\n // if notificationDay is yesterday, show \"Yesterday\"\n // if notificationDay is before yesterday, show date\n const heading =\n notificationDay.toDateString() ===\n yesterdayDate.toDateString()\n ? t`Yesterday`\n : niceDateTime(currentDay, {\n hideTime: true,\n });\n const subHeading = niceDateTime(currentDay, {\n forceOpts: {\n weekday: 'long',\n },\n });\n return (\n <Fragment key={notification._ids || notification.id}>\n {differentDay && (\n <h2 class=\"timeline-header\">\n <span>{heading}</span>{' '}\n <small class=\"insignificant bidi-isolate\">\n {subHeading}\n </small>\n </h2>\n )}\n <Notification\n instance={instance}\n notification={notification}\n key={notification._ids || notification.id}\n />\n </Fragment>\n );\n })}\n </>\n ) : (\n <>\n {uiState === 'loading' && (\n <>\n <ul class=\"timeline flat\">\n {Array.from({ length: 5 }).map((_, i) => (\n <li class=\"notification skeleton\">\n <div class=\"notification-type\">\n <Icon icon=\"notification\" size=\"xl\" />\n </div>\n <div class=\"notification-content\">\n <p>███████████ ████</p>\n </div>\n </li>\n ))}\n </ul>\n </>\n )}\n {uiState === 'error' && (\n <p class=\"ui-state\">\n <Trans>Unable to load notifications</Trans>\n <br />\n <br />\n <button type=\"button\" onClick={() => loadNotifications(true)}>\n <Trans>Try again</Trans>\n </button>\n </p>\n )}\n </>\n )}\n {showMore && (\n <InView\n onChange={(inView) => {\n if (inView) {\n loadNotifications();\n }\n }}\n >\n <button\n type=\"button\"\n class=\"plain block\"\n disabled={uiState === 'loading'}\n onClick={() => loadNotifications()}\n style={{ marginBlockEnd: '6em' }}\n >\n {uiState === 'loading' ? (\n <Loader abrupt />\n ) : (\n <Trans>Show more…</Trans>\n )}\n </button>\n </InView>\n )}\n </div>\n {supportsFilteredNotifications && showNotificationsSettings && (\n <Modal\n onClick={(e) => {\n if (e.target === e.currentTarget) {\n setShowNotificationsSettings(false);\n }\n }}\n >\n <div class=\"sheet\" id=\"notifications-settings\" tabIndex=\"-1\">\n <button\n type=\"button\"\n class=\"sheet-close\"\n onClick={() => setShowNotificationsSettings(false)}\n >\n <Icon icon=\"x\" alt={t`Close`} />\n </button>\n <header>\n <h2>\n <Trans>Notifications settings</Trans>\n </h2>\n </header>\n <main>\n <form\n onSubmit={(e) => {\n e.preventDefault();\n const {\n forNotFollowing,\n forNotFollowers,\n forNewAccounts,\n forPrivateMentions,\n forLimitedAccounts,\n } = e.target;\n const newPolicy = {\n ...notificationsPolicy,\n forNotFollowing: forNotFollowing.value,\n forNotFollowers: forNotFollowers.value,\n forNewAccounts: forNewAccounts.value,\n forPrivateMentions: forPrivateMentions.value,\n forLimitedAccounts: forLimitedAccounts.value,\n };\n setNotificationsPolicy(newPolicy);\n setShowNotificationsSettings(false);\n (async () => {\n try {\n await masto.v2.notifications.policy.update(newPolicy);\n showToast(t`Notifications settings updated`);\n } catch (e) {\n console.error(e);\n }\n })();\n }}\n >\n <p>\n <Trans>Filter out notifications from people:</Trans>\n </p>\n <div class=\"notification-policy-fields\">\n {NOTIFICATIONS_POLICIES.map((key) => {\n const value = notificationsPolicy[key];\n return (\n <div key={key}>\n <label>\n {_(NOTIFICATIONS_POLICIES_TEXT[key])}\n <select name={key} defaultValue={value} class=\"small\">\n <option value=\"accept\">\n <Trans>Accept</Trans>\n </option>\n <option value=\"filter\">\n <Trans>Filter</Trans>\n </option>\n <option value=\"drop\">\n <Trans>Ignore</Trans>\n </option>\n </select>\n </label>\n </div>\n );\n })}\n </div>\n <p>\n <button type=\"submit\">\n <Trans>Save</Trans>\n </button>\n </p>\n </form>\n </main>\n </div>\n </Modal>\n )}\n </div>\n );\n}\n\nfunction inBackground() {\n return !!document.querySelector('.deck-backdrop, #modal-container > *');\n}\n\nfunction AnnouncementBlock({ announcement }) {\n const { instance } = api();\n const { contact } = getCurrentInstance();\n const contactAccount = contact?.account;\n const {\n id,\n content,\n startsAt,\n endsAt,\n published,\n allDay,\n publishedAt,\n updatedAt,\n read,\n mentions,\n statuses,\n tags,\n emojis,\n reactions,\n } = announcement;\n\n const publishedAtDate = new Date(publishedAt);\n const publishedDateText = niceDateTime(publishedAtDate);\n const updatedAtDate = new Date(updatedAt);\n const updatedAtText = niceDateTime(updatedAtDate);\n\n return (\n <div class=\"announcement-block\">\n <AccountBlock account={contactAccount} />\n <div\n class=\"announcement-content\"\n onClick={handleContentLinks({ mentions, instance })}\n dangerouslySetInnerHTML={{\n __html: enhanceContent(content, {\n emojis,\n }),\n }}\n />\n <p class=\"insignificant\">\n <time datetime={publishedAtDate.toISOString()}>\n {niceDateTime(publishedAtDate)}\n </time>\n {updatedAt && updatedAtText !== publishedDateText && (\n <>\n {' '}\n •{' '}\n <span class=\"ib\">\n <Trans>\n Updated{' '}\n <time datetime={updatedAtDate.toISOString()}>\n {niceDateTime(updatedAtDate)}\n </time>\n </Trans>\n </span>\n </>\n )}\n </p>\n <div class=\"announcement-reactions\" hidden>\n {reactions.map((reaction) => {\n const { name, count, me, staticUrl, url } = reaction;\n return (\n <button type=\"button\" class={`plain4 small ${me ? 'reacted' : ''}`}>\n {url || staticUrl ? (\n <img src={url || staticUrl} alt={name} width=\"16\" height=\"16\" />\n ) : (\n <span>{name}</span>\n )}{' '}\n <span class=\"count\">{shortenNumber(count)}</span>\n </button>\n );\n })}\n </div>\n </div>\n );\n}\n\nfunction fetchNotficationsByAccount(accountID) {\n const { masto } = api();\n return masto.v1.notifications.list({\n accountID,\n });\n}\nfunction NotificationRequestModalButton({ request }) {\n const { instance } = api();\n const [uiState, setUIState] = useState('loading');\n const { account, lastStatus } = request;\n const [showModal, setShowModal] = useState(false);\n const [notifications, setNotifications] = useState([]);\n\n function onClose() {\n setShowModal(false);\n }\n\n useEffect(() => {\n if (!request?.account?.id) return;\n if (!showModal) return;\n setUIState('loading');\n (async () => {\n const notifs = await fetchNotficationsByAccount(request.account.id);\n setNotifications(notifs || []);\n setUIState('default');\n })();\n }, [showModal, request?.account?.id]);\n\n return (\n <>\n <button\n type=\"button\"\n class=\"plain4 request-notifications-account\"\n onClick={() => {\n setShowModal(true);\n }}\n >\n <Icon icon=\"notification\" class=\"more-insignificant\" />{' '}\n <small>\n <Trans>\n View notifications from{' '}\n <span class=\"bidi-isolate\">@{account.username}</span>\n </Trans>\n </small>{' '}\n <Icon icon=\"chevron-down\" />\n </button>\n {showModal && (\n <Modal\n onClick={(e) => {\n if (e.target === e.currentTarget) {\n onClose();\n }\n }}\n >\n <div class=\"sheet\" tabIndex=\"-1\">\n <button type=\"button\" class=\"sheet-close\" onClick={onClose}>\n <Icon icon=\"x\" alt={t`Close`} />\n </button>\n <header>\n <b>\n <Trans>\n Notifications from{' '}\n <span class=\"bidi-isolate\">@{account.username}</span>\n </Trans>\n </b>\n </header>\n <main>\n {uiState === 'loading' ? (\n <p class=\"ui-state\">\n <Loader abrupt />\n </p>\n ) : (\n notifications.map((notification) => (\n <div\n class=\"notification-peek\"\n onClick={(e) => {\n const { target } = e;\n // If button or links\n if (\n e.target.tagName === 'BUTTON' ||\n e.target.tagName === 'A'\n ) {\n onClose();\n }\n }}\n >\n <Notification\n instance={instance}\n notification={notification}\n isStatic\n />\n </div>\n ))\n )}\n </main>\n </div>\n </Modal>\n )}\n </>\n );\n}\n\nfunction NotificationRequestButtons({ request, onChange }) {\n const { masto } = api();\n const [uiState, setUIState] = useState('default');\n const [requestState, setRequestState] = useState(null); // accept, dismiss\n const hasRequestState = requestState !== null;\n\n return (\n <p class=\"notification-request-buttons\">\n <button\n type=\"button\"\n disabled={uiState === 'loading' || hasRequestState}\n onClick={() => {\n setUIState('loading');\n (async () => {\n try {\n await masto.v1.notifications.requests\n .$select(request.id)\n .accept();\n setRequestState('accept');\n setUIState('default');\n onChange({\n request,\n state: 'accept',\n });\n showToast(\n t`Notifications from @${request.account.username} will not be filtered from now on.`,\n );\n } catch (error) {\n setUIState('error');\n console.error(error);\n showToast(t`Unable to accept notification request`);\n }\n })();\n }}\n >\n <Trans>Allow</Trans>\n </button>{' '}\n <button\n type=\"button\"\n disabled={uiState === 'loading' || hasRequestState}\n class=\"light danger\"\n onClick={() => {\n setUIState('loading');\n (async () => {\n try {\n await masto.v1.notifications.requests\n .$select(request.id)\n .dismiss();\n setRequestState('dismiss');\n setUIState('default');\n onChange({\n request,\n state: 'dismiss',\n });\n showToast(\n t`Notifications from @${request.account.username} will not show up in Filtered notifications from now on.`,\n );\n } catch (error) {\n setUIState('error');\n console.error(error);\n showToast(t`Unable to dismiss notification request`);\n }\n })();\n }}\n >\n <Trans>Dismiss</Trans>\n </button>\n <span class=\"notification-request-states\">\n {uiState === 'loading' ? (\n <Loader abrupt />\n ) : requestState === 'accept' ? (\n <Icon\n icon=\"check-circle\"\n alt={t`Accepted`}\n class=\"notification-accepted\"\n />\n ) : (\n requestState === 'dismiss' && (\n <Icon\n icon=\"x-circle\"\n alt={t`Dismissed`}\n class=\"notification-dismissed\"\n />\n )\n )}\n </span>\n </p>\n );\n}\n\nexport default memo(Notifications);\n","import { t, Trans } from '@lingui/macro';\nimport { Menu, MenuDivider, MenuItem } from '@szhsin/react-menu';\nimport { useRef } from 'preact/hooks';\nimport { useNavigate, useParams } from 'react-router-dom';\nimport { useSnapshot } from 'valtio';\n\nimport Icon from '../components/icon';\nimport Menu2 from '../components/menu2';\nimport Timeline from '../components/timeline';\nimport { api } from '../utils/api';\nimport { filteredItems } from '../utils/filters';\nimport states, { saveStatus } from '../utils/states';\nimport supports from '../utils/supports';\nimport useTitle from '../utils/useTitle';\n\nconst LIMIT = 20;\n\nfunction Public({ local, columnMode, ...props }) {\n const snapStates = useSnapshot(states);\n const isLocal = !!local;\n const params = columnMode ? {} : useParams();\n const { masto, instance } = api({\n instance: props?.instance || params.instance,\n });\n const { masto: currentMasto, instance: currentInstance } = api();\n const title = isLocal\n ? t`Local timeline (${instance})`\n : t`Federated timeline (${instance})`;\n useTitle(title, isLocal ? `/:instance?/p/l` : `/:instance?/p`);\n // const navigate = useNavigate();\n const latestItem = useRef();\n\n const publicIterator = useRef();\n async function fetchPublic(firstLoad) {\n if (firstLoad || !publicIterator.current) {\n const opts = {\n limit: LIMIT,\n local: isLocal || undefined,\n };\n if (!isLocal && supports('@pixelfed/global-feed')) {\n opts.remote = true;\n }\n publicIterator.current = masto.v1.timelines.public.list(opts);\n }\n const results = await publicIterator.current.next();\n let { value } = results;\n if (value?.length) {\n if (firstLoad) {\n latestItem.current = value[0].id;\n }\n\n // value = filteredItems(value, 'public');\n value.forEach((item) => {\n saveStatus(item, instance);\n });\n }\n return {\n ...results,\n value,\n };\n }\n\n async function checkForUpdates() {\n try {\n const results = await masto.v1.timelines.public\n .list({\n limit: 1,\n local: isLocal,\n since_id: latestItem.current,\n })\n .next();\n let { value } = results;\n const valueContainsLatestItem = value[0]?.id === latestItem.current; // since_id might not be supported\n if (value?.length && !valueContainsLatestItem) {\n value = filteredItems(value, 'public');\n return true;\n }\n return false;\n } catch (e) {\n return false;\n }\n }\n\n return (\n <Timeline\n key={instance + isLocal}\n title={title}\n titleComponent={\n <h1 class=\"header-double-lines\">\n <b>{isLocal ? t`Local timeline` : t`Federated timeline`}</b>\n <div>{instance}</div>\n </h1>\n }\n id=\"public\"\n instance={instance}\n emptyText={t`No one has posted anything yet.`}\n errorText={t`Unable to load posts`}\n fetchItems={fetchPublic}\n checkForUpdates={checkForUpdates}\n useItemID\n headerStart={<></>}\n boostsCarousel={snapStates.settings.boostsCarousel}\n // allowFilters\n filterContext=\"public\"\n headerEnd={\n <Menu2\n portal\n // setDownOverflow\n overflow=\"auto\"\n viewScroll=\"close\"\n position=\"anchor\"\n menuButton={\n <button type=\"button\" class=\"plain\">\n <Icon icon=\"more\" size=\"l\" alt={t`More`} />\n </button>\n }\n >\n <MenuItem href={isLocal ? `/#/${instance}/p` : `/#/${instance}/p/l`}>\n {isLocal ? (\n <>\n <Icon icon=\"transfer\" />{' '}\n <span>\n <Trans>Switch to Federated</Trans>\n </span>\n </>\n ) : (\n <>\n <Icon icon=\"transfer\" />{' '}\n <span>\n <Trans>Switch to Local</Trans>\n </span>\n </>\n )}\n </MenuItem>\n <MenuDivider />\n <MenuItem\n onClick={() => {\n let newInstance = prompt(\n t`Enter a new instance e.g. \"mastodon.social\"`,\n );\n if (!/\\./.test(newInstance)) {\n if (newInstance) alert(t`Invalid instance`);\n return;\n }\n if (newInstance) {\n newInstance = newInstance.toLowerCase().trim();\n // navigate(isLocal ? `/${newInstance}/p/l` : `/${newInstance}/p`);\n location.hash = isLocal\n ? `/${newInstance}/p/l`\n : `/${newInstance}/p`;\n }\n }}\n >\n <Icon icon=\"bus\" />{' '}\n <span>\n <Trans>Go to another instance…</Trans>\n </span>\n </MenuItem>\n {currentInstance !== instance && (\n <MenuItem\n onClick={() => {\n location.hash = isLocal\n ? `/${currentInstance}/p/l`\n : `/${currentInstance}/p`;\n }}\n >\n <Icon icon=\"bus\" />{' '}\n <small class=\"menu-double-lines\">\n <Trans>\n Go to my instance (<b>{currentInstance}</b>)\n </Trans>\n </small>\n </MenuItem>\n )}\n </Menu2>\n }\n />\n );\n}\n\nexport default Public;\n","import './search.css';\n\nimport { useAutoAnimate } from '@formkit/auto-animate/preact';\nimport { t, Trans } from '@lingui/macro';\nimport { useEffect, useLayoutEffect, useRef, useState } from 'preact/hooks';\nimport { useHotkeys } from 'react-hotkeys-hook';\nimport { InView } from 'react-intersection-observer';\nimport { useParams, useSearchParams } from 'react-router-dom';\n\nimport AccountBlock from '../components/account-block';\nimport Icon from '../components/icon';\nimport Link from '../components/link';\nimport Loader from '../components/loader';\nimport NavMenu from '../components/nav-menu';\nimport SearchForm from '../components/search-form';\nimport Status from '../components/status';\nimport { api } from '../utils/api';\nimport { fetchRelationships } from '../utils/relationships';\nimport shortenNumber from '../utils/shorten-number';\nimport usePageVisibility from '../utils/usePageVisibility';\nimport useTitle from '../utils/useTitle';\n\nconst SHORT_LIMIT = 5;\nconst LIMIT = 40;\nconst emptySearchParams = new URLSearchParams();\n\nconst scrollIntoViewOptions = {\n block: 'nearest',\n inline: 'center',\n behavior: 'smooth',\n};\n\nfunction Search({ columnMode, ...props }) {\n const params = columnMode ? {} : useParams();\n const { masto, instance, authenticated } = api({\n instance: params.instance,\n });\n const [uiState, setUIState] = useState('default');\n const [searchParams] = columnMode ? [emptySearchParams] : useSearchParams();\n const searchFormRef = useRef();\n const q = props?.query || searchParams.get('q');\n const type = columnMode\n ? 'statuses'\n : props?.type || searchParams.get('type');\n let title = t`Search`;\n if (q) {\n switch (type) {\n case 'statuses':\n title = t`Search: ${q} (Posts)`;\n break;\n case 'accounts':\n title = t`Search: ${q} (Accounts)`;\n break;\n case 'hashtags':\n title = t`Search: ${q} (Hashtags)`;\n break;\n default:\n title = t`Search: ${q}`;\n }\n }\n useTitle(title, `/search`);\n\n const [showMore, setShowMore] = useState(false);\n const offsetRef = useRef(0);\n useEffect(() => {\n offsetRef.current = 0;\n }, [q, type]);\n\n const scrollableRef = useRef();\n useLayoutEffect(() => {\n scrollableRef.current?.scrollTo?.(0, 0);\n }, [q, type]);\n\n const [statusResults, setStatusResults] = useState([]);\n const [accountResults, setAccountResults] = useState([]);\n const [hashtagResults, setHashtagResults] = useState([]);\n useEffect(() => {\n setStatusResults([]);\n setAccountResults([]);\n setHashtagResults([]);\n }, [q]);\n const setTypeResultsFunc = {\n statuses: setStatusResults,\n accounts: setAccountResults,\n hashtags: setHashtagResults,\n };\n\n const [relationshipsMap, setRelationshipsMap] = useState({});\n const loadRelationships = async (accounts) => {\n if (!accounts?.length) return;\n const relationships = await fetchRelationships(accounts, relationshipsMap);\n if (relationships) {\n setRelationshipsMap({\n ...relationshipsMap,\n ...relationships,\n });\n }\n };\n\n function loadResults(firstLoad) {\n if (firstLoad) {\n offsetRef.current = 0;\n }\n\n if (!firstLoad && !authenticated) {\n // Search results pagination is only available to authenticated users\n return;\n }\n\n setUIState('loading');\n if (firstLoad && !type) {\n setStatusResults(statusResults.slice(0, SHORT_LIMIT));\n setAccountResults(accountResults.slice(0, SHORT_LIMIT));\n setHashtagResults(hashtagResults.slice(0, SHORT_LIMIT));\n }\n\n (async () => {\n const params = {\n q,\n resolve: authenticated,\n limit: SHORT_LIMIT,\n };\n if (type) {\n params.limit = LIMIT;\n params.type = type;\n if (authenticated) params.offset = offsetRef.current;\n }\n\n try {\n const results = await masto.v2.search.fetch(params);\n console.log(results);\n if (type) {\n if (firstLoad) {\n setTypeResultsFunc[type](results[type]);\n const length = results[type]?.length;\n offsetRef.current = LIMIT;\n setShowMore(!!length);\n } else {\n setTypeResultsFunc[type]((prev) => [...prev, ...results[type]]);\n const length = results[type]?.length;\n offsetRef.current = offsetRef.current + LIMIT;\n setShowMore(!!length);\n }\n } else {\n setStatusResults(results.statuses || []);\n setAccountResults(results.accounts || []);\n setHashtagResults(results.hashtags || []);\n offsetRef.current = 0;\n setShowMore(false);\n }\n loadRelationships(results.accounts);\n\n setUIState('default');\n } catch (err) {\n console.error(err);\n setUIState('error');\n }\n })();\n }\n\n const lastHiddenTime = useRef();\n usePageVisibility((visible) => {\n const reachStart = scrollableRef.current?.scrollTop === 0;\n if (visible && reachStart) {\n const timeDiff = Date.now() - lastHiddenTime.current;\n if (!lastHiddenTime.current || timeDiff > 1000 * 3) {\n // 3 seconds\n loadResults(true);\n } else {\n lastHiddenTime.current = Date.now();\n }\n }\n });\n\n useEffect(() => {\n searchFormRef.current?.setValue?.(q || '');\n if (q) {\n loadResults(true);\n } else {\n searchFormRef.current?.focus?.();\n }\n }, [q, type, instance]);\n\n useHotkeys(\n ['/', 'Slash'],\n (e) => {\n searchFormRef.current?.focus?.();\n searchFormRef.current?.select?.();\n },\n {\n preventDefault: true,\n },\n );\n\n const itemsSelector = '.timeline > li > a, .hashtag-list > li > a';\n const jRef = useHotkeys('j', () => {\n const activeItem = document.activeElement.closest(itemsSelector);\n const activeItemRect = activeItem?.getBoundingClientRect();\n const allItems = Array.from(\n scrollableRef.current.querySelectorAll(itemsSelector),\n );\n if (\n activeItem &&\n activeItemRect.top < scrollableRef.current.clientHeight &&\n activeItemRect.bottom > 0\n ) {\n const activeItemIndex = allItems.indexOf(activeItem);\n let nextItem = allItems[activeItemIndex + 1];\n if (nextItem) {\n nextItem.focus();\n nextItem.scrollIntoView(scrollIntoViewOptions);\n }\n } else {\n const topmostItem = allItems.find((item) => {\n const itemRect = item.getBoundingClientRect();\n return itemRect.top >= 44 && itemRect.left >= 0;\n });\n if (topmostItem) {\n topmostItem.focus();\n topmostItem.scrollIntoView(scrollIntoViewOptions);\n }\n }\n });\n\n const kRef = useHotkeys('k', () => {\n // focus on previous status after active item\n const activeItem = document.activeElement.closest(itemsSelector);\n const activeItemRect = activeItem?.getBoundingClientRect();\n const allItems = Array.from(\n scrollableRef.current.querySelectorAll(itemsSelector),\n );\n if (\n activeItem &&\n activeItemRect.top < scrollableRef.current.clientHeight &&\n activeItemRect.bottom > 0\n ) {\n const activeItemIndex = allItems.indexOf(activeItem);\n let prevItem = allItems[activeItemIndex - 1];\n if (prevItem) {\n prevItem.focus();\n prevItem.scrollIntoView(scrollIntoViewOptions);\n }\n } else {\n const topmostItem = allItems.find((item) => {\n const itemRect = item.getBoundingClientRect();\n return itemRect.top >= 44 && itemRect.left >= 0;\n });\n if (topmostItem) {\n topmostItem.focus();\n topmostItem.scrollIntoView(scrollIntoViewOptions);\n }\n }\n });\n\n const [filterBarParent] = useAutoAnimate();\n\n return (\n <div\n id=\"search-page\"\n class=\"deck-container\"\n tabIndex=\"-1\"\n ref={(node) => {\n scrollableRef.current = node;\n jRef(node);\n kRef(node);\n }}\n >\n <div class=\"timeline-deck deck\">\n <header class={uiState === 'loading' ? 'loading' : ''}>\n <div class=\"header-grid\">\n <div class=\"header-side\">\n <NavMenu />\n </div>\n <SearchForm ref={searchFormRef} />\n <div class=\"header-side\">\n <button\n type=\"button\"\n class=\"plain\"\n onClick={() => {\n loadResults(true);\n }}\n disabled={uiState === 'loading'}\n >\n <Icon icon=\"search\" size=\"l\" alt={t`Search`} />\n </button>\n </div>\n </div>\n </header>\n <main>\n {!!q && !columnMode && (\n <div\n ref={filterBarParent}\n class={`filter-bar ${uiState === 'loading' ? 'loading' : ''}`}\n >\n {!!type && (\n <Link to={`/search${q ? `?q=${encodeURIComponent(q)}` : ''}`}>\n <Icon icon=\"chevron-left\" /> <Trans>All</Trans>\n </Link>\n )}\n {[\n {\n label: t`Accounts`,\n type: 'accounts',\n to: `/search?q=${encodeURIComponent(q)}&type=accounts`,\n },\n {\n label: t`Hashtags`,\n type: 'hashtags',\n to: `/search?q=${encodeURIComponent(q)}&type=hashtags`,\n },\n {\n label: t`Posts`,\n type: 'statuses',\n to: `/search?q=${encodeURIComponent(q)}&type=statuses`,\n },\n ]\n .sort((a, b) => {\n if (a.type === type) return -1;\n if (b.type === type) return 1;\n return 0;\n })\n .map((link) => (\n <Link to={link.to} key={link.type}>\n {link.label}\n </Link>\n ))}\n </div>\n )}\n {!!q ? (\n <>\n {(!type || type === 'accounts') && (\n <>\n {type !== 'accounts' && (\n <h2 class=\"timeline-header\">\n <Trans>Accounts</Trans>{' '}\n <Link\n to={`/search?q=${encodeURIComponent(q)}&type=accounts`}\n >\n <Icon icon=\"arrow-right\" size=\"l\" alt={t`See more`} />\n </Link>\n </h2>\n )}\n {accountResults.length > 0 ? (\n <>\n <ul class=\"timeline flat accounts-list\">\n {accountResults.map((account) => (\n <li key={account.id}>\n <AccountBlock\n account={account}\n instance={instance}\n showStats\n relationship={relationshipsMap[account.id]}\n />\n </li>\n ))}\n </ul>\n {type !== 'accounts' && (\n <div class=\"ui-state\">\n <Link\n class=\"plain button\"\n to={`/search?q=${encodeURIComponent(\n q,\n )}&type=accounts`}\n >\n <Trans>See more accounts</Trans>{' '}\n <Icon icon=\"arrow-right\" />\n </Link>\n </div>\n )}\n </>\n ) : (\n !type &&\n (uiState === 'loading' ? (\n <p class=\"ui-state\">\n <Loader abrupt />\n </p>\n ) : (\n <p class=\"ui-state\">\n <Trans>No accounts found.</Trans>\n </p>\n ))\n )}\n </>\n )}\n {(!type || type === 'hashtags') && (\n <>\n {type !== 'hashtags' && (\n <h2 class=\"timeline-header\">\n <Trans>Hashtags</Trans>{' '}\n <Link\n to={`/search?q=${encodeURIComponent(q)}&type=hashtags`}\n >\n <Icon icon=\"arrow-right\" size=\"l\" alt={t`See more`} />\n </Link>\n </h2>\n )}\n {hashtagResults.length > 0 ? (\n <>\n <ul class=\"link-list hashtag-list\">\n {hashtagResults.map((hashtag) => {\n const { name, history } = hashtag;\n const total = history?.reduce?.(\n (acc, cur) => acc + +cur.uses,\n 0,\n );\n return (\n <li key={`${name}-${total}`}>\n <Link\n to={\n instance\n ? `/${instance}/t/${name}`\n : `/t/${name}`\n }\n >\n <Icon icon=\"hashtag\" alt=\"#\" />\n <span>{name}</span>\n {!!total && (\n <span class=\"count\">\n {shortenNumber(total)}\n </span>\n )}\n </Link>\n </li>\n );\n })}\n </ul>\n {type !== 'hashtags' && (\n <div class=\"ui-state\">\n <Link\n class=\"plain button\"\n to={`/search?q=${encodeURIComponent(\n q,\n )}&type=hashtags`}\n >\n <Trans>See more hashtags</Trans>{' '}\n <Icon icon=\"arrow-right\" />\n </Link>\n </div>\n )}\n </>\n ) : (\n !type &&\n (uiState === 'loading' ? (\n <p class=\"ui-state\">\n <Loader abrupt />\n </p>\n ) : (\n <p class=\"ui-state\">\n <Trans>No hashtags found.</Trans>\n </p>\n ))\n )}\n </>\n )}\n {(!type || type === 'statuses') && (\n <>\n {type !== 'statuses' && (\n <h2 class=\"timeline-header\">\n <Trans>Posts</Trans>{' '}\n <Link\n to={`/search?q=${encodeURIComponent(q)}&type=statuses`}\n >\n <Icon icon=\"arrow-right\" size=\"l\" alt={t`See more`} />\n </Link>\n </h2>\n )}\n {statusResults.length > 0 ? (\n <>\n <ul class=\"timeline\">\n {statusResults.map((status) => (\n <li key={status.id}>\n <Link\n class=\"status-link\"\n to={\n instance\n ? `/${instance}/s/${status.id}`\n : `/s/${status.id}`\n }\n >\n <Status status={status} />\n </Link>\n </li>\n ))}\n </ul>\n {type !== 'statuses' && (\n <div class=\"ui-state\">\n <Link\n class=\"plain button\"\n to={`/search?q=${encodeURIComponent(\n q,\n )}&type=statuses`}\n >\n <Trans>See more posts</Trans>{' '}\n <Icon icon=\"arrow-right\" />\n </Link>\n </div>\n )}\n </>\n ) : (\n !type &&\n (uiState === 'loading' ? (\n <p class=\"ui-state\">\n <Loader abrupt />\n </p>\n ) : (\n <p class=\"ui-state\">\n <Trans>No posts found.</Trans>\n </p>\n ))\n )}\n </>\n )}\n {!!type &&\n (uiState === 'default' ? (\n showMore ? (\n <InView\n onChange={(inView) => {\n if (inView) {\n loadResults();\n }\n }}\n >\n <button\n type=\"button\"\n class=\"plain block\"\n onClick={() => loadResults()}\n style={{ marginBlockEnd: '6em' }}\n >\n <Trans>Show more…</Trans>\n </button>\n </InView>\n ) : (\n <p class=\"ui-state insignificant\">\n <Trans>The end.</Trans>\n </p>\n )\n ) : (\n uiState === 'loading' && (\n <p class=\"ui-state\">\n <Loader abrupt />\n </p>\n )\n ))}\n </>\n ) : uiState === 'loading' ? (\n <p class=\"ui-state\">\n <Loader abrupt />\n </p>\n ) : (\n <p class=\"ui-state\">\n <Trans>\n Enter your search term or paste a URL above to get started.\n </Trans>\n </p>\n )}\n </main>\n </div>\n </div>\n );\n}\n\nexport default Search;\n","import '../components/links-bar.css';\nimport './trending.css';\n\nimport { t, Trans } from '@lingui/macro';\nimport { MenuItem } from '@szhsin/react-menu';\nimport { getBlurHashAverageColor } from 'fast-blurhash';\nimport { useEffect, useMemo, useRef, useState } from 'preact/hooks';\nimport punycode from 'punycode/';\nimport { useNavigate, useParams } from 'react-router-dom';\nimport { useSnapshot } from 'valtio';\n\nimport Icon from '../components/icon';\nimport Link from '../components/link';\nimport Loader from '../components/loader';\nimport Menu2 from '../components/menu2';\nimport NameText from '../components/name-text';\nimport RelativeTime from '../components/relative-time';\nimport Timeline from '../components/timeline';\nimport { api } from '../utils/api';\nimport { oklab2rgb, rgb2oklab } from '../utils/color-utils';\nimport { filteredItems } from '../utils/filters';\nimport pmem from '../utils/pmem';\nimport shortenNumber from '../utils/shorten-number';\nimport states, { saveStatus } from '../utils/states';\nimport supports from '../utils/supports';\nimport useTitle from '../utils/useTitle';\n\nconst LIMIT = 20;\nconst TREND_CACHE_TIME = 10 * 60 * 1000; // 10 minutes\n\nconst fetchLinks = pmem(\n (masto) => {\n return masto.v1.trends.links.list().next();\n },\n {\n maxAge: TREND_CACHE_TIME,\n },\n);\n\nconst fetchHashtags = pmem(\n (masto) => {\n return masto.v1.trends.tags.list().next();\n },\n {\n maxAge: TREND_CACHE_TIME,\n },\n);\n\nfunction fetchTrendsStatuses(masto) {\n if (supports('@pixelfed/trending')) {\n return masto.pixelfed.v2.discover.posts.trending.list({\n range: 'daily',\n });\n }\n return masto.v1.trends.statuses.list({\n limit: LIMIT,\n });\n}\n\nfunction fetchLinkList(masto, params) {\n return masto.v1.timelines.link.list(params);\n}\n\nfunction Trending({ columnMode, ...props }) {\n const snapStates = useSnapshot(states);\n const params = columnMode ? {} : useParams();\n const { masto, instance } = api({\n instance: props?.instance || params.instance,\n });\n const { masto: currentMasto, instance: currentInstance } = api();\n const title = t`Trending (${instance})`;\n useTitle(title, `/:instance?/trending`);\n // const navigate = useNavigate();\n const latestItem = useRef();\n\n const sameCurrentInstance = instance === currentInstance;\n\n const [hashtags, setHashtags] = useState([]);\n const [links, setLinks] = useState([]);\n const trendIterator = useRef();\n\n async function fetchTrends(firstLoad) {\n console.log('fetchTrend', firstLoad);\n if (firstLoad || !trendIterator.current) {\n trendIterator.current = fetchTrendsStatuses(masto);\n\n // Get hashtags\n if (supports('@mastodon/trending-hashtags')) {\n try {\n // const iterator = masto.v1.trends.tags.list();\n const { value: tags } = await fetchHashtags(masto);\n console.log('tags', tags);\n if (tags?.length) {\n setHashtags(tags);\n }\n } catch (e) {\n console.error(e);\n }\n }\n\n // Get links\n if (supports('@mastodon/trending-links')) {\n try {\n const { value } = await fetchLinks(masto, instance);\n // 4 types available: link, photo, video, rich\n // Only want links for now\n const links = value?.filter?.((link) => link.type === 'link');\n console.log('links', links);\n if (links?.length) {\n setLinks(links);\n }\n } catch (e) {\n console.error(e);\n }\n }\n }\n const results = await trendIterator.current.next();\n let { value } = results;\n if (value?.length) {\n if (firstLoad) {\n latestItem.current = value[0].id;\n }\n\n // value = filteredItems(value, 'public'); // Might not work here\n value.forEach((item) => {\n saveStatus(item, instance);\n });\n }\n return {\n ...results,\n value,\n };\n }\n\n // Link mentions\n // https://github.com/mastodon/mastodon/pull/30381\n const [currentLinkMentionsLoading, setCurrentLinkMentionsLoading] =\n useState(false);\n const currentLinkMentionsIterator = useRef();\n const [currentLink, setCurrentLink] = useState(null);\n const hasCurrentLink = !!currentLink;\n const currentLinkRef = useRef();\n const supportsTrendingLinkPosts =\n sameCurrentInstance && supports('@mastodon/trending-link-posts');\n\n useEffect(() => {\n if (currentLink && currentLinkRef.current) {\n currentLinkRef.current.scrollIntoView({\n behavior: 'smooth',\n block: 'nearest',\n inline: 'center',\n });\n }\n }, [currentLink]);\n\n const prevCurrentLink = useRef();\n async function fetchLinkMentions(firstLoad) {\n if (firstLoad || !currentLinkMentionsIterator.current) {\n setCurrentLinkMentionsLoading(true);\n currentLinkMentionsIterator.current = fetchLinkList(masto, {\n url: currentLink,\n });\n }\n prevCurrentLink.current = currentLink;\n const results = await currentLinkMentionsIterator.current.next();\n let { value } = results;\n if (value?.length) {\n value = filteredItems(value, 'public');\n value.forEach((item) => {\n saveStatus(item, instance);\n });\n }\n if (prevCurrentLink.current === currentLink) {\n setCurrentLinkMentionsLoading(false);\n }\n return {\n ...results,\n value,\n };\n }\n\n async function checkForUpdates() {\n try {\n const results = await masto.v1.trends.statuses\n .list({\n limit: 1,\n // NOT SUPPORTED\n // since_id: latestItem.current,\n })\n .next();\n let { value } = results;\n value = filteredItems(value, 'public');\n if (value?.length && value[0].id !== latestItem.current) {\n latestItem.current = value[0].id;\n return true;\n }\n return false;\n } catch (e) {\n return false;\n }\n }\n\n const TimelineStart = useMemo(() => {\n return (\n <>\n {!!hashtags.length && (\n <div class=\"filter-bar expandable\">\n <Icon icon=\"chart\" class=\"insignificant\" size=\"l\" />\n {hashtags.map((tag, i) => {\n const { name, history } = tag;\n const total = history.reduce((acc, cur) => acc + +cur.uses, 0);\n return (\n <Link to={`/${instance}/t/${name}`} key={name}>\n <span dir=\"auto\">\n <span class=\"more-insignificant\">#</span>\n {name}\n </span>\n <span class=\"filter-count\">{shortenNumber(total)}</span>\n </Link>\n );\n })}\n </div>\n )}\n {!!links.length && (\n <div class=\"links-bar\">\n <header>\n <h3>\n <Trans>Trending News</Trans>\n </h3>\n </header>\n {links.map((link) => {\n const {\n authors,\n authorName,\n authorUrl,\n blurhash,\n description,\n height,\n image,\n imageDescription,\n language,\n providerName,\n providerUrl,\n publishedAt,\n title,\n url,\n width,\n } = link;\n const author = authors?.[0]?.account?.id\n ? authors[0].account\n : null;\n const isShortTitle = title.length < 30;\n const hasAuthor = !!(authorName || author);\n const domain = punycode.toUnicode(\n URL.parse(url)\n .hostname.replace(/^www\\./, '')\n .replace(/\\/$/, ''),\n );\n let accentColor;\n if (blurhash) {\n const averageColor = getBlurHashAverageColor(blurhash);\n const labAverageColor = rgb2oklab(averageColor);\n accentColor = oklab2rgb([\n 0.6,\n labAverageColor[1],\n labAverageColor[2],\n ]);\n }\n\n return (\n <div key={url}>\n <a\n ref={currentLink === url ? currentLinkRef : null}\n href={url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class={`link-block ${\n hasCurrentLink\n ? currentLink === url\n ? 'active'\n : 'inactive'\n : ''\n }`}\n style={\n accentColor\n ? {\n '--accent-color': `rgb(${accentColor.join(',')})`,\n '--accent-alpha-color': `rgba(${accentColor.join(\n ',',\n )}, 0.4)`,\n }\n : {}\n }\n >\n <article>\n <figure>\n <img\n src={image}\n alt={imageDescription}\n width={width}\n height={height}\n loading=\"lazy\"\n />\n </figure>\n <div class=\"article-body\">\n <header>\n <div class=\"article-meta\">\n <span class=\"domain\">{domain}</span>{' '}\n {!!publishedAt && <>· </>}\n {!!publishedAt && (\n <>\n <RelativeTime\n datetime={publishedAt}\n format=\"micro\"\n />\n </>\n )}\n </div>\n {!!title && (\n <h1\n class=\"title\"\n lang={language}\n dir=\"auto\"\n title={title}\n >\n {title}\n </h1>\n )}\n </header>\n {!!description && (\n <p\n class={`description ${\n hasAuthor && !isShortTitle ? '' : 'more-lines'\n }`}\n lang={language}\n dir=\"auto\"\n title={description}\n >\n {description}\n </p>\n )}\n {hasAuthor && (\n <>\n <hr />\n <p class=\"byline\">\n <small>\n <Trans comment=\"By [Author]\">\n By{' '}\n {author ? (\n <NameText account={author} showAvatar />\n ) : authorUrl ? (\n <a\n href={authorUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n {authorName}\n </a>\n ) : (\n authorName\n )}\n </Trans>\n </small>\n </p>\n </>\n )}\n </div>\n </article>\n </a>\n {supportsTrendingLinkPosts && (\n <button\n type=\"button\"\n class=\"small plain4 block\"\n onClick={() => {\n setCurrentLink(url);\n }}\n disabled={url === currentLink}\n >\n <Icon icon=\"comment2\" />{' '}\n <span>\n <Trans>Mentions</Trans>\n </span>{' '}\n <Icon icon=\"chevron-down\" />\n </button>\n )}\n </div>\n );\n })}\n </div>\n )}\n {supportsTrendingLinkPosts && !!links.length && (\n <div\n class={`timeline-header-block ${hasCurrentLink ? 'blended' : ''}`}\n >\n {hasCurrentLink ? (\n <>\n <div style={{ width: 50, flexShrink: 0, textAlign: 'center' }}>\n {currentLinkMentionsLoading ? (\n <Loader abrupt />\n ) : (\n <button\n type=\"button\"\n class=\"light\"\n onClick={() => {\n setCurrentLink(null);\n }}\n >\n <Icon icon=\"x\" alt={t`Back to showing trending posts`} />\n </button>\n )}\n </div>\n <p>\n <Trans>\n Showing posts mentioning{' '}\n <span class=\"link-text\">\n {currentLink\n .replace(/^https?:\\/\\/(www\\.)?/i, '')\n .replace(/\\/$/, '')}\n </span>\n </Trans>\n </p>\n </>\n ) : (\n <p class=\"insignificant\">\n <Trans>Trending posts</Trans>\n </p>\n )}\n </div>\n )}\n </>\n );\n }, [hashtags, links, currentLink, currentLinkMentionsLoading]);\n\n return (\n <Timeline\n key={instance}\n title={title}\n titleComponent={\n <h1 class=\"header-double-lines\">\n <b>\n <Trans>Trending</Trans>\n </b>\n <div>{instance}</div>\n </h1>\n }\n id=\"trending\"\n instance={instance}\n emptyText={t`No trending posts.`}\n errorText={t`Unable to load posts`}\n fetchItems={hasCurrentLink ? fetchLinkMentions : fetchTrends}\n checkForUpdates={hasCurrentLink ? undefined : checkForUpdates}\n checkForUpdatesInterval={5 * 60 * 1000} // 5 minutes\n useItemID\n headerStart={<></>}\n boostsCarousel={snapStates.settings.boostsCarousel}\n // allowFilters\n filterContext=\"public\"\n timelineStart={TimelineStart}\n refresh={currentLink}\n clearWhenRefresh\n view={hasCurrentLink ? 'link-mentions' : undefined}\n headerEnd={\n <Menu2\n portal\n // setDownOverflow\n overflow=\"auto\"\n viewScroll=\"close\"\n position=\"anchor\"\n menuButton={\n <button type=\"button\" class=\"plain\">\n <Icon icon=\"more\" size=\"l\" alt={t`More`} />\n </button>\n }\n >\n <MenuItem\n onClick={() => {\n let newInstance = prompt(\n t`Enter a new instance e.g. \"mastodon.social\"`,\n );\n if (!/\\./.test(newInstance)) {\n if (newInstance) alert(t`Invalid instance`);\n return;\n }\n if (newInstance) {\n newInstance = newInstance.toLowerCase().trim();\n // navigate(`/${newInstance}/trending`);\n location.hash = `/${newInstance}/trending`;\n }\n }}\n >\n <Icon icon=\"bus\" />{' '}\n <span>\n <Trans>Go to another instance…</Trans>\n </span>\n </MenuItem>\n {currentInstance !== instance && (\n <MenuItem\n onClick={() => {\n location.hash = `/${currentInstance}/trending`;\n }}\n >\n <Icon icon=\"bus\" />{' '}\n <small class=\"menu-double-lines\">\n <Trans>\n Go to my instance (<b>{currentInstance}</b>)\n </Trans>\n </small>\n </MenuItem>\n )}\n </Menu2>\n }\n />\n );\n}\n\nexport default Trending;\n","import { t, Trans } from '@lingui/macro';\nimport { useHotkeys } from 'react-hotkeys-hook';\nimport { useSnapshot } from 'valtio';\n\nimport Bookmarks from '../pages/bookmarks';\nimport Favourites from '../pages/favourites';\nimport Following from '../pages/following';\nimport Hashtag from '../pages/hashtag';\nimport List from '../pages/list';\nimport Mentions from '../pages/mentions';\nimport Notifications from '../pages/notifications';\nimport Public from '../pages/public';\nimport Search from '../pages/search';\nimport Trending from '../pages/trending';\nimport isRTL from '../utils/is-rtl';\nimport states from '../utils/states';\nimport useTitle from '../utils/useTitle';\n\nconst scrollIntoViewOptions = {\n block: 'nearest',\n inline: 'nearest',\n behavior: 'smooth',\n};\n\nfunction Columns() {\n useTitle(t`Home`, '/');\n const snapStates = useSnapshot(states);\n const { shortcuts } = snapStates;\n\n console.debug('RENDER Columns', shortcuts);\n\n const components = shortcuts.map((shortcut) => {\n if (!shortcut) return null;\n const { type, ...params } = shortcut;\n const Component = {\n following: Following,\n notifications: Notifications,\n list: List,\n public: Public,\n bookmarks: Bookmarks,\n favourites: Favourites,\n hashtag: Hashtag,\n mentions: Mentions,\n trending: Trending,\n search: Search,\n }[type];\n if (!Component) return null;\n // Don't show Search column with no query, for now\n if (type === 'search' && !params.query) return null;\n // Don't show List column with no list, for now\n if (type === 'list' && !params.id) return null;\n return (\n <Component key={type + JSON.stringify(params)} {...params} columnMode />\n );\n });\n\n useHotkeys(['1', '2', '3', '4', '5', '6', '7', '8', '9'], (e, handler) => {\n try {\n const index = parseInt(handler.keys[0], 10) - 1;\n const $column = document.querySelectorAll('#columns > *')[index];\n if ($column) {\n $column.focus();\n $column.scrollIntoView(scrollIntoViewOptions);\n }\n } catch (e) {\n console.error(e);\n }\n });\n\n useHotkeys(['[', ']'], (e, handler) => {\n const key = handler.keys[0];\n const currentFocusedColumn = document.activeElement.closest('#columns > *');\n\n const rtl = isRTL();\n const prevColKey = rtl ? ']' : '[';\n const nextColKey = rtl ? '[' : ']';\n let $column;\n\n if (key === prevColKey) {\n // If [, focus on left of focused column, else first column\n $column = currentFocusedColumn\n ? currentFocusedColumn.previousElementSibling\n : document.querySelectorAll('#columns > *')[0];\n } else if (key === nextColKey) {\n // If ], focus on right of focused column, else 2nd column\n $column = currentFocusedColumn\n ? currentFocusedColumn.nextElementSibling\n : document.querySelectorAll('#columns > *')[1];\n }\n if ($column) {\n $column.focus();\n $column.scrollIntoView(scrollIntoViewOptions);\n }\n });\n\n return (\n <div\n id=\"columns\"\n onContextMenu={(e) => {\n // If right-click on header, but not links or buttons\n if (\n e.target.closest('.deck > header') &&\n !e.target.closest('a') &&\n !e.target.closest('button')\n ) {\n e.preventDefault();\n states.showShortcutsSettings = true;\n }\n }}\n >\n {components}\n </div>\n );\n}\n\nexport default Columns;\n","import './notifications-menu.css';\n\nimport { msg, t, Trans } from '@lingui/macro';\nimport { useLingui } from '@lingui/react';\nimport { ControlledMenu } from '@szhsin/react-menu';\nimport { memo } from 'preact/compat';\nimport { useEffect, useRef, useState } from 'preact/hooks';\nimport { useSnapshot } from 'valtio';\n\nimport Columns from '../components/columns';\nimport Icon from '../components/icon';\nimport Link from '../components/link';\nimport Loader from '../components/loader';\nimport Notification from '../components/notification';\nimport { api } from '../utils/api';\nimport db from '../utils/db';\nimport { massageNotifications2 } from '../utils/group-notifications';\nimport states, { saveStatus } from '../utils/states';\nimport { getCurrentAccountNS } from '../utils/store-utils';\n\nimport Following from './following';\nimport {\n getGroupedNotifications,\n mastoFetchNotifications,\n} from './notifications';\n\nfunction Home() {\n const { _ } = useLingui();\n const snapStates = useSnapshot(states);\n __BENCHMARK.end('time-to-home');\n useEffect(() => {\n (async () => {\n const keys = await db.drafts.keys();\n if (keys.length) {\n const ns = getCurrentAccountNS();\n const ownKeys = keys.filter((key) => key.startsWith(ns));\n if (ownKeys.length) {\n states.showDrafts = true;\n }\n }\n })();\n }, []);\n\n return (\n <>\n {(snapStates.settings.shortcutsViewMode === 'multi-column' ||\n (!snapStates.settings.shortcutsViewMode &&\n snapStates.settings.shortcutsColumnsMode)) &&\n !!snapStates.shortcuts?.length ? (\n <Columns />\n ) : (\n <Following\n title={_(msg`Home`)}\n path=\"/\"\n id=\"home\"\n headerStart={false}\n headerEnd={<NotificationsLink />}\n />\n )}\n </>\n );\n}\n\nfunction NotificationsLink() {\n const snapStates = useSnapshot(states);\n const notificationLinkRef = useRef();\n const [menuState, setMenuState] = useState(undefined);\n return (\n <>\n <Link\n ref={notificationLinkRef}\n to=\"/notifications\"\n class={`button plain notifications-button ${\n snapStates.notificationsShowNew ? 'has-badge' : ''\n } ${menuState || ''}`}\n onClick={(e) => {\n e.stopPropagation();\n if (window.matchMedia('(min-width: calc(40em))').matches) {\n e.preventDefault();\n setMenuState((state) => (!state ? 'open' : undefined));\n }\n }}\n >\n <Icon icon=\"notification\" size=\"l\" alt={t`Notifications`} />\n </Link>\n <NotificationsMenu\n state={menuState}\n anchorRef={notificationLinkRef}\n onClose={() => setMenuState(undefined)}\n />\n </>\n );\n}\n\nconst NOTIFICATIONS_DISPLAY_LIMIT = 5;\nfunction NotificationsMenu({ anchorRef, state, onClose }) {\n const { masto, instance } = api();\n const snapStates = useSnapshot(states);\n const [uiState, setUIState] = useState('default');\n\n const notificationsIterator = mastoFetchNotifications();\n\n async function fetchNotifications() {\n const allNotifications = await notificationsIterator.next();\n const notifications = massageNotifications2(allNotifications.value);\n\n if (notifications?.length) {\n notifications.forEach((notification) => {\n saveStatus(notification.status, instance, {\n skipThreading: true,\n });\n });\n\n const groupedNotifications = getGroupedNotifications(notifications);\n\n states.notificationsLast = groupedNotifications[0];\n states.notifications = groupedNotifications;\n\n // Update last read marker\n masto.v1.markers\n .create({\n notifications: {\n lastReadId: groupedNotifications[0].id,\n },\n })\n .catch(() => {});\n }\n\n states.notificationsShowNew = false;\n states.notificationsLastFetchTime = Date.now();\n return allNotifications;\n }\n\n const [hasFollowRequests, setHasFollowRequests] = useState(false);\n function fetchFollowRequests() {\n return masto.v1.followRequests.list({\n limit: 1,\n });\n }\n\n function loadNotifications() {\n setUIState('loading');\n (async () => {\n try {\n await fetchNotifications();\n const followRequests = await fetchFollowRequests();\n setHasFollowRequests(!!followRequests?.length);\n setUIState('default');\n } catch (e) {\n setUIState('error');\n }\n })();\n }\n\n useEffect(() => {\n if (state === 'open') loadNotifications();\n }, [state]);\n\n const menuRef = useRef();\n\n return (\n <ControlledMenu\n ref={menuRef}\n menuClassName=\"notifications-menu\"\n state={state}\n anchorRef={anchorRef}\n onClose={onClose}\n portal={{\n target: document.body,\n }}\n containerProps={{\n onClick: () => {\n menuRef.current?.closeMenu?.();\n },\n }}\n overflow=\"auto\"\n viewScroll=\"close\"\n position=\"anchor\"\n align=\"center\"\n boundingBoxPadding=\"8 8 8 8\"\n >\n <header>\n <h2>\n <Trans>Notifications</Trans>\n </h2>\n </header>\n <main>\n {snapStates.notifications.length ? (\n <>\n {snapStates.notifications\n .slice(0, NOTIFICATIONS_DISPLAY_LIMIT)\n .map((notification) => (\n <Notification\n key={notification._ids || notification.id}\n instance={instance}\n notification={notification}\n disableContextMenu\n />\n ))}\n </>\n ) : uiState === 'loading' ? (\n <div class=\"ui-state\">\n <Loader abrupt />\n </div>\n ) : (\n uiState === 'error' && (\n <div class=\"ui-state\">\n <p>\n <Trans>Unable to fetch notifications.</Trans>\n </p>\n <p>\n <button type=\"button\" onClick={loadNotifications}>\n <Trans>Try again</Trans>\n </button>\n </p>\n </div>\n )\n )}\n </main>\n <footer>\n <Link to=\"/mentions\" class=\"button plain\">\n <Icon icon=\"at\" />{' '}\n <span>\n <Trans>Mentions</Trans>\n </span>\n </Link>\n <Link to=\"/notifications\" class=\"button plain2\">\n {hasFollowRequests ? (\n <Trans>\n <span class=\"tag collapsed\">New</span>{' '}\n <span>Follow Requests</span>\n </Trans>\n ) : (\n <b>\n <Trans>See all</Trans>\n </b>\n )}{' '}\n <Icon icon=\"arrow-right\" />\n </Link>\n </footer>\n </ControlledMenu>\n );\n}\n\nexport default memo(Home);\n","// export const statusRegex = /\\/@([^@\\/]+)@?([^\\/]+)?\\/([^\\/]+)\\/?$/i;\n// export const statusNoteRegex = /\\/notes\\/([^\\/]+)\\/?$/i;\n\nconst statusPostRegexes = [\n /^\\/@[^@\\/]+\\/(?:statuses|posts)\\/([^\\/]+)/i, // GoToSocial, Takahe\n /\\/notes\\/([^\\/]+)/i, // Misskey, Firefish\n /^\\/(?:notice|objects)\\/([a-z0-9-]+)/i, // Pleroma\n /\\/@[^@\\/]+\\/post\\/([^\\/]+)/i, // Threads\n /\\/@[^@\\/]+@?[^\\/]+?\\/([^\\/]+)/i, // Mastodon\n /^\\/p\\/[^\\/]+\\/([^\\/]+)/i, // Pixelfed\n];\n\nexport function getInstanceStatusObject(url) {\n // Regex /:username/:id, where username = @username or @username@domain, id = anything\n const { hostname, pathname } = URL.parse(url);\n // const [, username, domain, id] = pathname.match(statusRegex) || [];\n for (const regex of statusPostRegexes) {\n const [, id] = pathname.match(regex) || [];\n console.log(pathname, regex, id);\n if (id) {\n return {\n instance: hostname,\n id,\n };\n }\n }\n return {};\n}\n\nfunction getInstanceStatusURL(url) {\n const { instance, id } = getInstanceStatusObject(url);\n if (instance && id) {\n return `/${instance}/s/${id}`;\n }\n return null;\n}\n\nexport default getInstanceStatusURL;\n","import { t, Trans } from '@lingui/macro';\nimport { useLayoutEffect, useState } from 'preact/hooks';\nimport { useLocation } from 'react-router-dom';\n\nimport Link from '../components/link';\nimport Loader from '../components/loader';\nimport { api } from '../utils/api';\nimport getInstanceStatusURL, {\n getInstanceStatusObject,\n} from '../utils/get-instance-status-url';\n\nexport default function HttpRoute() {\n const location = useLocation();\n const url = location.pathname.replace(/^\\//, '');\n const statusObject = getInstanceStatusObject(url);\n // const statusURL = getInstanceStatusURL(url);\n const statusURL = statusObject?.instance\n ? `/${statusObject.instance}/s/${statusObject.id}`\n : null;\n const [uiState, setUIState] = useState('loading');\n\n useLayoutEffect(() => {\n setUIState('loading');\n (async () => {\n // Check if status returns 200\n try {\n const { instance, id } = statusObject;\n if (id) {\n const { masto } = api({ instance });\n const status = await masto.v1.statuses.$select(id).fetch();\n if (status) {\n window.location.hash = statusURL + '?view=full';\n return;\n }\n }\n } catch (e) {}\n\n // Fallback to search\n {\n const { masto: currentMasto, instance: currentInstance } = api();\n const result = await currentMasto.v2.search.fetch({\n q: url,\n limit: 1,\n resolve: true,\n });\n if (result.statuses.length) {\n const status = result.statuses[0];\n window.location.hash = `/${currentInstance}/s/${status.id}?view=full`;\n } else if (result.accounts.length) {\n const account = result.accounts[0];\n window.location.hash = `/${currentInstance}/a/${account.id}`;\n } else if (statusURL) {\n // Fallback to original URL, which will probably show error\n window.location.hash = statusURL + '?view=full';\n } else {\n setUIState('error');\n }\n }\n })();\n }, [statusURL]);\n\n return (\n <div class=\"ui-state\" tabIndex=\"-1\">\n {uiState === 'loading' ? (\n <>\n <Loader abrupt />\n <h2>\n <Trans>Resolving…</Trans>\n </h2>\n <p>\n <a href={url} target=\"_blank\" rel=\"noopener noreferrer\">\n {url}\n </a>\n </p>\n </>\n ) : (\n <>\n <h2>\n <Trans>Unable to resolve URL</Trans>\n </h2>\n <p>\n <a href={url} target=\"_blank\" rel=\"noopener noreferrer\">\n {url}\n </a>\n </p>\n </>\n )}\n <hr />\n <p>\n <Link to=\"/\">\n <Trans>Go home</Trans>\n </Link>\n </p>\n </div>\n );\n}\n","import './lists.css';\n\nimport { Plural, t, Trans } from '@lingui/macro';\nimport { useEffect, useReducer, useState } from 'preact/hooks';\n\nimport Icon from '../components/icon';\nimport Link from '../components/link';\nimport ListAddEdit from '../components/list-add-edit';\nimport Loader from '../components/loader';\nimport Modal from '../components/modal';\nimport NavMenu from '../components/nav-menu';\nimport { fetchLists } from '../utils/lists';\nimport useTitle from '../utils/useTitle';\n\nfunction Lists() {\n useTitle(t`Lists`, `/l`);\n const [uiState, setUIState] = useState('default');\n\n const [reloadCount, reload] = useReducer((c) => c + 1, 0);\n const [lists, setLists] = useState([]);\n useEffect(() => {\n setUIState('loading');\n (async () => {\n try {\n const lists = await fetchLists();\n console.log(lists);\n setLists(lists);\n setUIState('default');\n } catch (e) {\n console.error(e);\n setUIState('error');\n }\n })();\n }, [reloadCount]);\n\n const [showListAddEditModal, setShowListAddEditModal] = useState(false);\n\n return (\n <div id=\"lists-page\" class=\"deck-container\" tabIndex=\"-1\">\n <div class=\"timeline-deck deck\">\n <header>\n <div class=\"header-grid\">\n <div class=\"header-side\">\n <NavMenu />\n <Link to=\"/\" class=\"button plain\">\n <Icon icon=\"home\" size=\"l\" />\n </Link>\n </div>\n <h1>\n <Trans>Lists</Trans>\n </h1>\n <div class=\"header-side\">\n <button\n type=\"button\"\n class=\"plain\"\n onClick={() => setShowListAddEditModal(true)}\n >\n <Icon icon=\"plus\" size=\"l\" alt={t`New list`} />\n </button>\n </div>\n </div>\n </header>\n <main>\n {lists.length > 0 ? (\n <>\n <ul class=\"link-list\">\n {lists.map((list) => (\n <li>\n <Link to={`/l/${list.id}`}>\n <span>\n <Icon icon=\"list\" /> <span>{list.title}</span>\n </span>\n {/* <button\n type=\"button\"\n class=\"plain\"\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n setShowListAddEditModal({\n list,\n });\n }}\n >\n <Icon icon=\"pencil\" />\n </button> */}\n </Link>\n </li>\n ))}\n </ul>\n {lists.length > 1 && (\n <footer class=\"ui-state\">\n <small class=\"insignificant\">\n <Plural value={lists.length} one=\"# list\" other=\"# lists\" />\n </small>\n </footer>\n )}\n </>\n ) : uiState === 'loading' ? (\n <p class=\"ui-state\">\n <Loader />\n </p>\n ) : uiState === 'error' ? (\n <p class=\"ui-state\">\n <Trans>Unable to load lists.</Trans>\n </p>\n ) : (\n <p class=\"ui-state\">\n <Trans>No lists yet.</Trans>\n </p>\n )}\n </main>\n </div>\n {showListAddEditModal && (\n <Modal\n onClick={(e) => {\n if (e.target === e.currentTarget) {\n setShowListAddEditModal(false);\n }\n }}\n >\n <ListAddEdit\n list={showListAddEditModal?.list}\n onClose={(result) => {\n if (result.state === 'success') {\n reload();\n }\n setShowListAddEditModal(false);\n }}\n />\n </Modal>\n )}\n </div>\n );\n}\n\nexport default Lists;\n","export default \"__VITE_ASSET__Y_wpqkTO__\"","function dec2hex(dec) {\n return ('0' + dec.toString(16)).slice(-2);\n}\nexport function verifier() {\n var array = new Uint32Array(56 / 2);\n window.crypto.getRandomValues(array);\n return Array.from(array, dec2hex).join('');\n}\nfunction sha256(plain) {\n // returns promise ArrayBuffer\n const encoder = new TextEncoder();\n const data = encoder.encode(plain);\n return window.crypto.subtle.digest('SHA-256', data);\n}\nfunction base64urlencode(a) {\n let str = '';\n const bytes = new Uint8Array(a);\n const len = bytes.byteLength;\n for (var i = 0; i < len; i++) {\n str += String.fromCharCode(bytes[i]);\n }\n return btoa(str).replace(/\\+/g, '-').replace(/\\//g, '_').replace(/=+$/, '');\n}\nexport async function generateCodeChallenge(v) {\n const hashed = await sha256(v);\n return base64urlencode(hashed);\n}\n\n// If /.well-known/oauth-authorization-server exists and code_challenge_methods_supported includes \"S256\", means support PKCE\nexport async function supportsPKCE({ instanceURL }) {\n if (!instanceURL) return false;\n try {\n const res = await fetch(\n `https://${instanceURL}/.well-known/oauth-authorization-server`,\n );\n if (!res.ok || res.status !== 200) return false;\n const json = await res.json();\n if (json.code_challenge_methods_supported?.includes('S256')) return true;\n return false;\n } catch (e) {\n return false;\n }\n}\n\n// For debugging\nwindow.__generateCodeChallenge = generateCodeChallenge;\n","import { generateCodeChallenge, verifier } from './oauth-pkce';\n\nconst {\n DEV,\n PHANPY_CLIENT_NAME: CLIENT_NAME,\n PHANPY_WEBSITE: WEBSITE,\n} = import.meta.env;\n\nconst SCOPES = 'read write follow push';\n\n/*\n PHANPY_WEBSITE is set to the default official site.\n It's used in pre-built releases, so there's no way to change it dynamically\n without rebuilding.\n Therefore, we can't use it as redirect_uri.\n We only use PHANPY_WEBSITE if it's \"same\" as current location URL.\n \n Very basic check based on location.hostname for now\n*/\nconst sameSite = WEBSITE\n ? WEBSITE.toLowerCase().includes(location.hostname)\n : false;\nconst currentLocation = location.origin + location.pathname;\nconst REDIRECT_URI = DEV || !sameSite ? currentLocation : WEBSITE;\n\nexport async function registerApplication({ instanceURL }) {\n const registrationParams = new URLSearchParams({\n client_name: CLIENT_NAME,\n redirect_uris: REDIRECT_URI,\n scopes: SCOPES,\n website: WEBSITE,\n });\n const registrationResponse = await fetch(\n `https://${instanceURL}/api/v1/apps`,\n {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n },\n body: registrationParams.toString(),\n },\n );\n const registrationJSON = await registrationResponse.json();\n console.log({ registrationJSON });\n return registrationJSON;\n}\n\nexport async function getPKCEAuthorizationURL({ instanceURL, client_id }) {\n const codeVerifier = verifier();\n const codeChallenge = await generateCodeChallenge(codeVerifier);\n const params = new URLSearchParams({\n client_id,\n code_challenge_method: 'S256',\n code_challenge: codeChallenge,\n redirect_uri: REDIRECT_URI,\n response_type: 'code',\n scope: SCOPES,\n });\n const authorizationURL = `https://${instanceURL}/oauth/authorize?${params.toString()}`;\n return [authorizationURL, codeVerifier];\n}\n\nexport async function getAuthorizationURL({ instanceURL, client_id }) {\n const authorizationParams = new URLSearchParams({\n client_id,\n scope: SCOPES,\n redirect_uri: REDIRECT_URI,\n // redirect_uri: 'urn:ietf:wg:oauth:2.0:oob',\n response_type: 'code',\n });\n const authorizationURL = `https://${instanceURL}/oauth/authorize?${authorizationParams.toString()}`;\n return authorizationURL;\n}\n\nexport async function getAccessToken({\n instanceURL,\n client_id,\n client_secret,\n code,\n code_verifier,\n}) {\n const params = new URLSearchParams({\n client_id,\n redirect_uri: REDIRECT_URI,\n grant_type: 'authorization_code',\n code,\n scope: SCOPES,\n // client_secret,\n // code_verifier,\n });\n if (client_secret) {\n params.append('client_secret', client_secret);\n }\n if (code_verifier) {\n params.append('code_verifier', code_verifier);\n }\n const tokenResponse = await fetch(`https://${instanceURL}/oauth/token`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n },\n body: params.toString(),\n });\n const tokenJSON = await tokenResponse.json();\n console.log({ tokenJSON });\n return tokenJSON;\n}\n","import './login.css';\n\nimport { t, Trans } from '@lingui/macro';\nimport Fuse from 'fuse.js';\nimport { useEffect, useRef, useState } from 'preact/hooks';\nimport { useSearchParams } from 'react-router-dom';\n\nimport logo from '../assets/logo.svg';\n\nimport LangSelector from '../components/lang-selector';\nimport Link from '../components/link';\nimport Loader from '../components/loader';\nimport instancesListURL from '../data/instances.json?url';\nimport {\n getAuthorizationURL,\n getPKCEAuthorizationURL,\n registerApplication,\n} from '../utils/auth';\nimport { supportsPKCE } from '../utils/oauth-pkce';\nimport store from '../utils/store';\nimport useTitle from '../utils/useTitle';\n\nconst { PHANPY_DEFAULT_INSTANCE: DEFAULT_INSTANCE } = import.meta.env;\n\nfunction Login() {\n useTitle('Log in');\n const instanceURLRef = useRef();\n const cachedInstanceURL = store.local.get('instanceURL');\n const [uiState, setUIState] = useState('default');\n const [searchParams] = useSearchParams();\n const instance = searchParams.get('instance');\n const submit = searchParams.get('submit');\n const [instanceText, setInstanceText] = useState(\n instance || cachedInstanceURL?.toLowerCase() || '',\n );\n\n const [instancesList, setInstancesList] = useState([]);\n const searcher = useRef();\n useEffect(() => {\n (async () => {\n try {\n const res = await fetch(instancesListURL);\n const data = await res.json();\n setInstancesList(data);\n searcher.current = new Fuse(data);\n } catch (e) {\n // Silently fail\n console.error(e);\n }\n })();\n }, []);\n\n // useEffect(() => {\n // if (cachedInstanceURL) {\n // instanceURLRef.current.value = cachedInstanceURL.toLowerCase();\n // }\n // }, []);\n\n const submitInstance = (instanceURL) => {\n if (!instanceURL) return;\n\n (async () => {\n // WEB_DOMAIN vs LOCAL_DOMAIN negotiation time\n // https://docs.joinmastodon.org/admin/config/#web_domain\n try {\n const res = await fetch(`https://${instanceURL}/.well-known/host-meta`); // returns XML\n const text = await res.text();\n // Parse XML\n const parser = new DOMParser();\n const xmlDoc = parser.parseFromString(text, 'text/xml');\n // Get Link[template]\n const link = xmlDoc.getElementsByTagName('Link')[0];\n const template = link.getAttribute('template');\n const url = URL.parse(template);\n const { host } = url; // host includes the port\n if (instanceURL !== host) {\n console.log(`💫 ${instanceURL} -> ${host}`);\n instanceURL = host;\n }\n } catch (e) {\n // Silently fail\n console.error(e);\n }\n\n store.local.set('instanceURL', instanceURL);\n\n setUIState('loading');\n try {\n const { client_id, client_secret, vapid_key } =\n await registerApplication({\n instanceURL,\n });\n\n const authPKCE = await supportsPKCE({ instanceURL });\n console.log({ authPKCE });\n if (authPKCE) {\n if (client_id && client_secret) {\n store.sessionCookie.set('clientID', client_id);\n store.sessionCookie.set('clientSecret', client_secret);\n store.sessionCookie.set('vapidKey', vapid_key);\n\n const [url, verifier] = await getPKCEAuthorizationURL({\n instanceURL,\n client_id,\n });\n store.sessionCookie.set('codeVerifier', verifier);\n location.href = url;\n } else {\n alert(t`Failed to register application`);\n }\n } else {\n if (client_id && client_secret) {\n store.sessionCookie.set('clientID', client_id);\n store.sessionCookie.set('clientSecret', client_secret);\n store.sessionCookie.set('vapidKey', vapid_key);\n\n location.href = await getAuthorizationURL({\n instanceURL,\n client_id,\n });\n } else {\n alert(t`Failed to register application`);\n }\n }\n setUIState('default');\n } catch (e) {\n console.error(e);\n setUIState('error');\n }\n })();\n };\n\n const cleanInstanceText = instanceText\n ? instanceText\n .replace(/^https?:\\/\\//, '') // Remove protocol from instance URL\n .replace(/\\/+$/, '') // Remove trailing slash\n .replace(/^@?[^@]+@/, '') // Remove @?acct@\n .trim()\n : null;\n const instanceTextLooksLikeDomain =\n /[^\\s\\r\\n\\t\\/\\\\]+\\.[^\\s\\r\\n\\t\\/\\\\]+/.test(cleanInstanceText) &&\n !/[\\s\\/\\\\@]/.test(cleanInstanceText);\n\n const instancesSuggestions = cleanInstanceText\n ? searcher.current\n ?.search(cleanInstanceText, {\n limit: 10,\n })\n ?.map((match) => match.item)\n : [];\n\n const selectedInstanceText = instanceTextLooksLikeDomain\n ? cleanInstanceText\n : instancesSuggestions?.length\n ? instancesSuggestions[0]\n : instanceText\n ? instancesList.find((instance) => instance.includes(instanceText))\n : null;\n\n const onSubmit = (e) => {\n e.preventDefault();\n // const { elements } = e.target;\n // let instanceURL = elements.instanceURL.value.toLowerCase();\n // // Remove protocol from instance URL\n // instanceURL = instanceURL.replace(/^https?:\\/\\//, '').replace(/\\/+$/, '');\n // // Remove @acct@ or acct@ from instance URL\n // instanceURL = instanceURL.replace(/^@?[^@]+@/, '');\n // if (!/\\./.test(instanceURL)) {\n // instanceURL = instancesList.find((instance) =>\n // instance.includes(instanceURL),\n // );\n // }\n // submitInstance(instanceURL);\n submitInstance(selectedInstanceText);\n };\n\n if (submit) {\n useEffect(() => {\n submitInstance(instance || selectedInstanceText);\n }, []);\n }\n\n return (\n <main id=\"login\" style={{ textAlign: 'center' }}>\n <form onSubmit={onSubmit}>\n <h1>\n <img src={logo} alt=\"\" width=\"80\" height=\"80\" />\n <br />\n <Trans>Log in</Trans>\n </h1>\n <label>\n <p>\n <Trans>Instance</Trans>\n </p>\n <input\n value={instanceText}\n required\n type=\"text\"\n class=\"large\"\n id=\"instanceURL\"\n ref={instanceURLRef}\n disabled={uiState === 'loading'}\n // list=\"instances-list\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"off\"\n spellCheck={false}\n placeholder={t`instance domain`}\n onInput={(e) => {\n setInstanceText(e.target.value);\n }}\n dir=\"auto\"\n />\n {instancesSuggestions?.length > 0 ? (\n <ul id=\"instances-suggestions\">\n {instancesSuggestions.map((instance, i) => (\n <li>\n <button\n type=\"button\"\n class=\"plain5\"\n onClick={() => {\n submitInstance(instance);\n }}\n >\n {instance}\n </button>\n </li>\n ))}\n </ul>\n ) : (\n <div id=\"instances-eg\">\n <Trans>e.g. “mastodon.social”</Trans>\n </div>\n )}\n {/* <datalist id=\"instances-list\">\n {instancesList.map((instance) => (\n <option value={instance} />\n ))}\n </datalist> */}\n </label>\n {uiState === 'error' && (\n <p class=\"error\">\n <Trans>\n Failed to log in. Please try again or try another instance.\n </Trans>\n </p>\n )}\n <div>\n <button\n disabled={\n uiState === 'loading' || !instanceText || !selectedInstanceText\n }\n >\n {selectedInstanceText\n ? t`Continue with ${selectedInstanceText}`\n : t`Continue`}\n </button>{' '}\n </div>\n <Loader hidden={uiState !== 'loading'} />\n <hr />\n {!DEFAULT_INSTANCE && (\n <p>\n <a href=\"https://joinmastodon.org/servers\" target=\"_blank\">\n <Trans>Don't have an account? Create one!</Trans>\n </a>\n </p>\n )}\n <p>\n <Link to=\"/\">\n <Trans>Go home</Trans>\n </Link>\n </p>\n <LangSelector />\n </form>\n </main>\n );\n}\n\nexport default Login;\n","import './status.css';\n\nimport { Plural, t, Trans } from '@lingui/macro';\nimport { Menu, MenuDivider, MenuHeader, MenuItem } from '@szhsin/react-menu';\nimport debounce from 'just-debounce-it';\nimport pRetry from 'p-retry';\nimport { memo } from 'preact/compat';\nimport {\n useCallback,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'preact/hooks';\nimport punycode from 'punycode/';\nimport { useHotkeys } from 'react-hotkeys-hook';\nimport { InView } from 'react-intersection-observer';\nimport { matchPath, useSearchParams } from 'react-router-dom';\nimport { useSnapshot } from 'valtio';\n\nimport Avatar from '../components/avatar';\nimport Icon from '../components/icon';\nimport Link from '../components/link';\nimport Loader from '../components/loader';\nimport MediaModal from '../components/media-modal';\nimport Menu2 from '../components/menu2';\nimport NameText from '../components/name-text';\nimport RelativeTime from '../components/relative-time';\nimport Status from '../components/status';\nimport { api } from '../utils/api';\nimport htmlContentLength from '../utils/html-content-length';\nimport shortenNumber from '../utils/shorten-number';\nimport states, {\n getStatus,\n saveStatus,\n statusKey,\n threadifyStatus,\n} from '../utils/states';\nimport statusPeek from '../utils/status-peek';\nimport { getCurrentAccount } from '../utils/store-utils';\nimport useScroll from '../utils/useScroll';\nimport useTitle from '../utils/useTitle';\n\nimport getInstanceStatusURL from './../utils/get-instance-status-url';\n\nconst { PHANPY_DEFAULT_INSTANCE: DEFAULT_INSTANCE } = import.meta.env;\n\nconst LIMIT = 40;\nconst SUBCOMMENTS_OPEN_ALL_LIMIT = 10;\nconst MAX_WEIGHT = 5;\n\nlet cachedRepliesToggle = {};\nlet cachedStatusesMap = {};\nlet scrollPositions = {};\nfunction resetScrollPosition(id) {\n delete cachedStatusesMap[id];\n delete scrollPositions[id];\n}\n\nconst scrollIntoViewOptions = {\n block: 'nearest',\n inline: 'center',\n behavior: 'smooth',\n};\n\n// Select all statuses except those inside collapsed details/summary\n// Hat-tip to @AmeliaBR@front-end.social\n// https://front-end.social/@AmeliaBR/109784776146144471\nconst STATUSES_SELECTOR =\n '.status-link:not(details:not([open]) > summary ~ *, details:not([open]) > summary ~ * *), .status-focus:not(details:not([open]) > summary ~ *, details:not([open]) > summary ~ * *)';\n\nconst STATUS_URL_REGEX = /\\/s\\//i;\n\nfunction StatusPage(params) {\n const { id } = params;\n const { masto, instance } = api({ instance: params.instance });\n const snapStates = useSnapshot(states);\n const [searchParams, setSearchParams] = useSearchParams();\n const mediaParam = searchParams.get('media');\n const mediaOnlyParam = searchParams.get('media-only');\n const mediaIndex = parseInt(mediaParam || mediaOnlyParam, 10);\n let showMedia = mediaIndex > 0;\n const mediaStatusID = searchParams.get('mediaStatusID');\n const mediaStatus = getStatus(mediaStatusID, instance);\n if (mediaStatusID && !mediaStatus) {\n showMedia = false;\n }\n const showMediaOnly = showMedia && !!mediaOnlyParam;\n\n const sKey = statusKey(id, instance);\n const [heroStatus, setHeroStatus] = useState(states.statuses[sKey]);\n useEffect(() => {\n if (states.statuses[sKey]) {\n setHeroStatus(states.statuses[sKey]);\n }\n }, [sKey]);\n\n const closeLink = useMemo(() => {\n const { prevLocation } = states;\n const pathname =\n (prevLocation?.pathname || '') + (prevLocation?.search || '');\n const matchStatusPath =\n matchPath('/:instance/s/:id', pathname) || matchPath('/s/:id', pathname);\n if (!pathname || matchStatusPath) {\n return '/';\n }\n return pathname;\n }, []);\n\n useEffect(() => {\n if (!heroStatus && showMedia) {\n (async () => {\n try {\n const status = await masto.v1.statuses.$select(id).fetch();\n saveStatus(status, instance);\n setHeroStatus(status);\n } catch (err) {\n console.error(err);\n alert('Unable to load post.');\n location.hash = closeLink;\n }\n })();\n }\n }, [showMedia]);\n\n const mediaAttachments = mediaStatusID\n ? snapStates.statuses[statusKey(mediaStatusID, instance)]?.mediaAttachments\n : heroStatus?.mediaAttachments;\n\n const handleMediaClose = useCallback(() => {\n if (\n !window.matchMedia('(min-width: calc(40em + 350px))').matches &&\n snapStates.prevLocation\n ) {\n history.back();\n } else {\n if (showMediaOnly) {\n location.hash = closeLink;\n } else {\n searchParams.delete('media');\n searchParams.delete('mediaStatusID');\n setSearchParams(searchParams);\n }\n }\n }, [showMediaOnly, closeLink, snapStates.prevLocation]);\n\n useEffect(() => {\n let timer = setTimeout(() => {\n // carouselRef.current?.focus?.();\n const $carousel = document.querySelector('.carousel');\n if ($carousel) {\n $carousel.focus();\n }\n }, 100);\n return () => clearTimeout(timer);\n }, [showMediaOnly]);\n\n useEffect(() => {\n const $deckContainers = document.querySelectorAll('.deck-container');\n $deckContainers.forEach(($deckContainer) => {\n $deckContainer.setAttribute('inert', '');\n });\n return () => {\n $deckContainers.forEach(($deckContainer) => {\n $deckContainer.removeAttribute('inert');\n });\n };\n }, []);\n\n return (\n <div class=\"deck-backdrop\">\n {showMedia ? (\n mediaAttachments?.length ? (\n <MediaModal\n mediaAttachments={mediaAttachments}\n statusID={mediaStatusID || id}\n instance={instance}\n lang={heroStatus?.language}\n index={mediaIndex - 1}\n onClose={handleMediaClose}\n />\n ) : (\n <div class=\"media-modal-container loading\">\n <Loader abrupt />\n </div>\n )\n ) : (\n <Link to={closeLink} />\n )}\n {!showMediaOnly && (\n <StatusThread\n id={id}\n instance={params.instance}\n closeLink={closeLink}\n />\n )}\n </div>\n );\n}\n\nfunction StatusParent(props) {\n const { linkable, to, onClick, ...restProps } = props;\n return linkable ? (\n <Link class=\"status-link\" to={to} onClick={onClick} {...restProps} />\n ) : (\n <div class=\"status-focus\" tabIndex={0} {...restProps} />\n );\n}\n\n// oldest first\nfunction createdAtSort(a, b) {\n return new Date(b.created_at) - new Date(a.created_at);\n}\n\nfunction StatusThread({ id, closeLink = '/', instance: propInstance }) {\n const [searchParams, setSearchParams] = useSearchParams();\n const mediaParam = searchParams.get('media');\n const mediaStatusID = searchParams.get('mediaStatusID');\n const showMedia = parseInt(mediaParam, 10) > 0;\n const firstLoad = useRef(\n !states.prevLocation &&\n (history.length === 1 ||\n ('navigation' in window && navigation?.entries?.()?.length === 1)),\n );\n const [viewMode, setViewMode] = useState(\n searchParams.get('view') || firstLoad.current ? 'full' : null,\n );\n const translate = !!parseInt(searchParams.get('translate'));\n const { masto, instance } = api({ instance: propInstance });\n const {\n masto: currentMasto,\n instance: currentInstance,\n authenticated,\n } = api();\n const sameInstance = instance === currentInstance;\n const snapStates = useSnapshot(states);\n const [statuses, setStatuses] = useState([]);\n const [uiState, setUIState] = useState('default');\n const heroStatusRef = useRef();\n const sKey = statusKey(id, instance);\n const totalDescendants = useRef(0);\n\n const scrollableRef = useRef();\n useEffect(() => {\n scrollableRef.current?.focus();\n }, []);\n useEffect(() => {\n const onScroll = debounce(() => {\n // console.log('onScroll');\n if (!scrollableRef.current) return;\n const { scrollTop } = scrollableRef.current;\n if (uiState !== 'loading') {\n scrollPositions[id] = scrollTop;\n }\n }, 50);\n scrollableRef.current?.addEventListener('scroll', onScroll, {\n passive: true,\n });\n onScroll();\n return () => {\n onScroll.cancel();\n scrollableRef.current?.removeEventListener('scroll', onScroll);\n };\n }, [id, uiState !== 'loading']);\n\n const scrollOffsets = useRef();\n const lastInitContextTS = useRef();\n const initContext = ({ reloadHero } = {}) => {\n console.debug('initContext', id);\n setUIState('loading');\n let heroTimer;\n\n const cachedStatuses = cachedStatusesMap[id];\n if (cachedStatuses) {\n // Case 1: It's cached, let's restore them to make it snappy\n const reallyCachedStatuses = cachedStatuses.filter(\n (s) => states.statuses[sKey],\n // Some are not cached in the global state, so we need to filter them out\n );\n setStatuses(reallyCachedStatuses);\n } else {\n // const heroIndex = statuses.findIndex((s) => s.id === id);\n // if (heroIndex !== -1) {\n // // Case 2: It's in current statuses. Slice off all descendant statuses after the hero status to be safe\n // const slicedStatuses = statuses.slice(0, heroIndex + 1);\n // setStatuses(slicedStatuses);\n // } else {\n // Case 3: Not cached and not in statuses, let's start from scratch\n setStatuses([{ id }]);\n // }\n }\n\n (async () => {\n const heroFetch = () =>\n pRetry(() => masto.v1.statuses.$select(id).fetch(), {\n retries: 4,\n });\n const contextFetch = pRetry(\n () => masto.v1.statuses.$select(id).context.fetch(),\n {\n retries: 8,\n },\n );\n\n const hasStatus = !!snapStates.statuses[sKey];\n let heroStatus = snapStates.statuses[sKey];\n if (hasStatus && !reloadHero) {\n console.debug('Hero status is cached');\n } else {\n try {\n heroStatus = await heroFetch();\n saveStatus(heroStatus, instance);\n // Give time for context to appear\n await new Promise((resolve) => {\n setTimeout(resolve, 100);\n });\n } catch (e) {\n console.error(e);\n setUIState('error');\n return;\n }\n }\n\n try {\n const context = await contextFetch;\n const { ancestors, descendants } = context;\n\n ancestors.sort(createdAtSort);\n descendants.sort(createdAtSort);\n\n totalDescendants.current = descendants?.length || 0;\n\n const missingStatuses = new Set();\n ancestors.forEach((status) => {\n saveStatus(status, instance, {\n skipThreading: true,\n });\n if (\n status.inReplyToId &&\n !ancestors.find((s) => s.id === status.inReplyToId)\n ) {\n missingStatuses.add(status.inReplyToId);\n }\n });\n const ancestorsIsThread = ancestors.every(\n (s) => s.account.id === heroStatus.account.id,\n );\n const nestedDescendants = [];\n descendants.forEach((status) => {\n saveStatus(status, instance, {\n skipThreading: true,\n });\n\n if (\n status.inReplyToId &&\n !descendants.find((s) => s.id === status.inReplyToId) &&\n status.inReplyToId !== heroStatus.id\n ) {\n missingStatuses.add(status.inReplyToId);\n }\n\n if (status.inReplyToAccountId === status.account.id) {\n // If replying to self, it's part of the thread, level 1\n nestedDescendants.push(status);\n } else if (status.inReplyToId === heroStatus.id) {\n // If replying to the hero status, it's a reply, level 1\n nestedDescendants.push(status);\n } else if (\n !status.inReplyToAccountId &&\n nestedDescendants.find(\n (s) =>\n s.id === status.inReplyToId &&\n s.account.id === heroStatus.account.id,\n ) &&\n status.account.id === heroStatus.account.id\n ) {\n // If replying to hero's own statuses, it's part of the thread, level 1\n nestedDescendants.push(status);\n } else {\n // If replying to someone else, it's a reply to a reply, level 2\n const parent = descendants.find((s) => s.id === status.inReplyToId);\n if (parent) {\n if (!parent.__replies) {\n parent.__replies = [];\n }\n parent.__replies.push(status);\n } else {\n // If no parent, something is wrong\n console.warn('No parent found for', status);\n }\n }\n });\n\n // sort hero author to top\n nestedDescendants.sort((a, b) => {\n const heroAccountID = heroStatus.account.id;\n if (a.account.id === heroAccountID && b.account.id !== heroAccountID)\n return -1;\n if (b.account.id === heroAccountID && a.account.id !== heroAccountID)\n return 1;\n return 0;\n });\n\n console.log({ ancestors, descendants, nestedDescendants });\n if (missingStatuses.size) {\n console.error('Missing statuses', [...missingStatuses]);\n }\n\n let descendantLevelsCount = 1;\n function expandReplies(_replies, level) {\n const nextLevel = level + 1;\n if (nextLevel > descendantLevelsCount) {\n descendantLevelsCount = level;\n }\n return _replies?.map((_r) => ({\n id: _r.id,\n account: _r.account,\n repliesCount: _r.repliesCount,\n content: _r.content,\n weight: calcStatusWeight(_r),\n level: nextLevel,\n replies: expandReplies(_r.__replies, nextLevel),\n }));\n }\n\n const allStatuses = [\n ...ancestors.map((s) => ({\n id: s.id,\n ancestor: true,\n isThread: ancestorsIsThread,\n accountID: s.account.id,\n account: s.account,\n repliesCount: s.repliesCount,\n weight: calcStatusWeight(s),\n })),\n {\n id,\n accountID: heroStatus.account.id,\n weight: calcStatusWeight(heroStatus),\n },\n ...nestedDescendants.map((s) => ({\n id: s.id,\n account: s.account,\n accountID: s.account.id,\n descendant: true,\n thread: s.account.id === heroStatus.account.id,\n weight: calcStatusWeight(s),\n level: 1,\n replies: expandReplies(s.__replies, 1),\n })),\n ];\n\n setUIState('default');\n scrollOffsets.current = {\n offsetTop: heroStatusRef.current?.offsetTop,\n scrollTop: scrollableRef.current?.scrollTop,\n };\n\n // Set limit to hero's index\n // const heroLimit = allStatuses.findIndex((s) => s.id === id);\n const heroLimit = ancestors.length || 0; // 0-indexed\n if (heroLimit >= limit) {\n setLimit(heroLimit + 1);\n }\n\n console.log({ allStatuses, descendantLevelsCount });\n setStatuses(allStatuses);\n cachedStatusesMap[id] = allStatuses;\n\n // Let's threadify this one\n // Note that all non-hero statuses will trigger saveStatus which will threadify them too\n // By right, at this point, all descendant statuses should be cached\n threadifyStatus(heroStatus, instance);\n } catch (e) {\n console.error(e);\n setUIState('error');\n }\n })();\n\n lastInitContextTS.current = Date.now();\n\n return () => {\n clearTimeout(heroTimer);\n };\n };\n\n useEffect(initContext, [id, masto]);\n\n const [showRefresh, setShowRefresh] = useState(false);\n useEffect(() => {\n let interval = setInterval(() => {\n const now = Date.now();\n if (\n lastInitContextTS.current &&\n now - lastInitContextTS.current >= 60_000\n ) {\n setShowRefresh(true);\n }\n }, 60_000); // 1 minute\n return () => {\n clearInterval(interval);\n };\n }, []);\n\n useLayoutEffect(() => {\n if (!statuses.length) return;\n console.debug('STATUSES', statuses);\n const scrollPosition = scrollPositions[id];\n console.debug('scrollPosition', scrollPosition);\n if (!!scrollPosition) {\n console.debug('Case 1', {\n id,\n scrollPosition,\n });\n scrollableRef.current.scrollTop = scrollPosition;\n } else if (scrollOffsets.current) {\n const newScrollOffsets = {\n offsetTop: heroStatusRef.current?.offsetTop,\n scrollTop: scrollableRef.current?.scrollTop,\n };\n const newScrollTop =\n newScrollOffsets.offsetTop -\n scrollOffsets.current.offsetTop +\n newScrollOffsets.scrollTop;\n console.debug('Case 2', {\n scrollOffsets: scrollOffsets.current,\n newScrollOffsets,\n newScrollTop,\n statuses: [...statuses],\n });\n scrollableRef.current.scrollTop = newScrollTop;\n } else if (statuses.length === 1) {\n console.debug('Case 3', {\n id,\n });\n scrollableRef.current.scrollTop = 0;\n }\n\n // RESET\n scrollOffsets.current = null;\n }, [statuses]);\n\n useEffect(() => {\n if (snapStates.reloadStatusPage <= 0) return;\n // Delete the cache for the context\n (async () => {\n try {\n const { instanceURL } = getCurrentAccount();\n const contextURL = `https://${instanceURL}/api/v1/statuses/${id}/context`;\n console.log('Clear cache', contextURL);\n const apiCache = await caches.open('api');\n await apiCache.delete(contextURL, { ignoreVary: true });\n\n return initContext({\n reloadHero: true,\n });\n } catch (e) {\n console.error(e);\n }\n })();\n }, [snapStates.reloadStatusPage]);\n\n useEffect(() => {\n return () => {\n // RESET\n scrollPositions = {};\n states.reloadStatusPage = 0;\n cachedStatusesMap = {};\n cachedRepliesToggle = {};\n statusWeightCache.clear();\n };\n }, []);\n\n const heroStatus = snapStates.statuses[sKey] || snapStates.statuses[id];\n const heroDisplayName = useMemo(() => {\n // Remove shortcodes from display name\n if (!heroStatus) return '';\n const { account } = heroStatus;\n const div = document.createElement('div');\n div.innerHTML = account.displayName;\n return div.innerText.trim();\n }, [heroStatus]);\n const heroContentText = useMemo(() => {\n if (!heroStatus) return '';\n let text = statusPeek(heroStatus);\n if (text.length > 64) {\n // \"The title should ideally be less than 64 characters in length\"\n // https://www.w3.org/Provider/Style/TITLE.html\n text = text.slice(0, 64) + '…';\n }\n return text;\n }, [heroStatus]);\n useTitle(\n heroDisplayName && heroContentText\n ? `${heroDisplayName}: \"${heroContentText}\"`\n : t({\n id: 'post.title',\n message: 'Post',\n }),\n '/:instance?/s/:id',\n );\n\n const postInstance = useMemo(() => {\n if (!heroStatus) return;\n const { url } = heroStatus;\n if (!url) return;\n return URL.parse(url).hostname;\n }, [heroStatus]);\n const postSameInstance = useMemo(() => {\n if (!postInstance) return;\n return postInstance === instance;\n }, [postInstance, instance]);\n\n const [limit, setLimit] = useState(LIMIT);\n const showMore = useMemo(() => {\n // return number of statuses to show\n return statuses.length - limit;\n }, [statuses.length, limit]);\n\n const hasDescendants = statuses.some((s) => s.descendant);\n const ancestors = statuses.filter((s) => s.ancestor);\n\n const [heroInView, setHeroInView] = useState(true);\n const heroPointer = useMemo(() => {\n // get top offset of heroStatus\n if (!heroStatusRef.current || heroInView) return null;\n const { top } = heroStatusRef.current.getBoundingClientRect();\n return top > 0 ? 'down' : 'up';\n }, [heroInView]);\n\n useHotkeys(\n 'esc',\n () => {\n location.hash = closeLink;\n },\n {\n // If media is open, esc to close media first\n // Else close the status page\n enabled: !showMedia,\n ignoreEventWhen: (e) => {\n const hasModal = !!document.querySelector('#modal-container > *');\n return hasModal;\n },\n },\n );\n // For backspace, will always close both media and status page\n useHotkeys('backspace', () => {\n location.hash = closeLink;\n });\n\n useHotkeys('j', () => {\n const activeStatus = document.activeElement.closest(\n '.status-link, .status-focus',\n );\n const activeStatusRect = activeStatus?.getBoundingClientRect();\n const allStatusLinks = Array.from(\n scrollableRef.current.querySelectorAll(STATUSES_SELECTOR),\n );\n console.log({ allStatusLinks });\n if (\n activeStatus &&\n activeStatusRect.top < scrollableRef.current.clientHeight &&\n activeStatusRect.bottom > 0\n ) {\n const activeStatusIndex = allStatusLinks.indexOf(activeStatus);\n let nextStatus = allStatusLinks[activeStatusIndex + 1];\n if (nextStatus) {\n nextStatus.focus();\n nextStatus.scrollIntoView(scrollIntoViewOptions);\n }\n } else {\n // If active status is not in viewport, get the topmost status-link in viewport\n const topmostStatusLink = allStatusLinks.find((statusLink) => {\n const statusLinkRect = statusLink.getBoundingClientRect();\n return statusLinkRect.top >= 44 && statusLinkRect.left >= 0; // 44 is the magic number for header height, not real\n });\n if (topmostStatusLink) {\n topmostStatusLink.focus();\n topmostStatusLink.scrollIntoView(scrollIntoViewOptions);\n }\n }\n });\n\n useHotkeys('k', () => {\n const activeStatus = document.activeElement.closest(\n '.status-link, .status-focus',\n );\n const activeStatusRect = activeStatus?.getBoundingClientRect();\n const allStatusLinks = Array.from(\n scrollableRef.current.querySelectorAll(STATUSES_SELECTOR),\n );\n if (\n activeStatus &&\n activeStatusRect.top < scrollableRef.current.clientHeight &&\n activeStatusRect.bottom > 0\n ) {\n const activeStatusIndex = allStatusLinks.indexOf(activeStatus);\n let prevStatus = allStatusLinks[activeStatusIndex - 1];\n if (prevStatus) {\n prevStatus.focus();\n prevStatus.scrollIntoView(scrollIntoViewOptions);\n }\n } else {\n // If active status is not in viewport, get the topmost status-link in viewport\n const topmostStatusLink = allStatusLinks.find((statusLink) => {\n const statusLinkRect = statusLink.getBoundingClientRect();\n return statusLinkRect.top >= 44 && statusLinkRect.left >= 0; // 44 is the magic number for header height, not real\n });\n if (topmostStatusLink) {\n topmostStatusLink.focus();\n topmostStatusLink.scrollIntoView(scrollIntoViewOptions);\n }\n }\n });\n\n // NOTE: I'm not sure if 'x' is the best shortcut for this, might change it later\n // IDEA: x is for expand\n useHotkeys('x', () => {\n const activeStatus = document.activeElement.closest(\n '.status-link, .status-focus',\n );\n if (activeStatus) {\n const details = activeStatus.nextElementSibling;\n if (details && details.tagName.toLowerCase() === 'details') {\n details.open = !details.open;\n }\n }\n });\n\n const [reachTopPost, setReachTopPost] = useState(false);\n // const { nearReachStart } = useScroll({\n // scrollableRef,\n // distanceFromStartPx: 16,\n // });\n\n const initialPageState = useRef(showMedia ? 'media+status' : 'status');\n\n const handleMediaClick = useCallback(\n (e, i, media, status) => {\n e.preventDefault();\n e.stopPropagation();\n setSearchParams({\n media: i + 1,\n mediaStatusID: status.id,\n });\n },\n [id],\n );\n\n const handleStatusLinkClick = useCallback((e, status) => {\n resetScrollPosition(status.id);\n }, []);\n\n useEffect(() => {\n let timer;\n if (mediaStatusID && showMedia) {\n timer = setTimeout(() => {\n const status = scrollableRef.current?.querySelector(\n `.status-link[href*=\"/${mediaStatusID}\"]`,\n );\n if (status) {\n status.scrollIntoView(scrollIntoViewOptions);\n }\n }, 400); // After CSS transition\n }\n return () => {\n clearTimeout(timer);\n };\n }, [mediaStatusID, showMedia]);\n\n const renderStatus = useCallback(\n (status, i) => {\n const {\n id: statusID,\n ancestor,\n isThread,\n descendant,\n thread,\n replies,\n repliesCount,\n weight,\n level,\n } = status;\n const isHero = statusID === id;\n const isLinkable = isThread || ancestor;\n\n return (\n <li\n key={statusID}\n ref={isHero ? heroStatusRef : null}\n class={`${ancestor ? 'ancestor' : ''} ${\n descendant ? 'descendant' : ''\n } ${thread ? 'thread' : ''} ${isHero ? 'hero' : ''}`}\n >\n {isHero ? (\n <>\n <InView\n threshold={0.1}\n onChange={(inView) => {\n queueMicrotask(() => {\n requestAnimationFrame(() => {\n setHeroInView(inView);\n });\n });\n }}\n class=\"status-focus\"\n tabIndex={0}\n >\n <Status\n statusID={statusID}\n instance={instance}\n withinContext\n size=\"l\"\n enableTranslate\n forceTranslate={translate}\n />\n </InView>\n {uiState !== 'loading' && !authenticated ? (\n <div class=\"post-status-banner\">\n <p>\n <Trans>\n You're not logged in. Interactions (reply, boost, etc) are\n not possible.\n </Trans>\n </p>\n <Link\n to={\n DEFAULT_INSTANCE\n ? `/login?instance=${DEFAULT_INSTANCE}&submit=1`\n : '/login'\n }\n class=\"button\"\n >\n <Trans>Log in</Trans>\n </Link>\n </div>\n ) : (\n !sameInstance && (\n <div class=\"post-status-banner\">\n <p>\n <Trans>\n This post is from another instance (<b>{instance}</b>).\n Interactions (reply, boost, etc) are not possible.\n </Trans>\n </p>\n <button\n type=\"button\"\n disabled={uiState === 'loading'}\n onClick={() => {\n setUIState('loading');\n (async () => {\n try {\n const results = await currentMasto.v2.search.fetch({\n q: heroStatus.url,\n type: 'statuses',\n resolve: true,\n limit: 1,\n });\n if (results.statuses.length) {\n const status = results.statuses[0];\n location.hash = currentInstance\n ? `/${currentInstance}/s/${status.id}`\n : `/s/${status.id}`;\n } else {\n throw new Error('No results');\n }\n } catch (e) {\n setUIState('default');\n alert(t`Error: ${e}`);\n console.error(e);\n }\n })();\n }}\n >\n <Icon icon=\"transfer\" />{' '}\n <Trans>\n Switch to my instance to enable interactions\n </Trans>\n </button>\n </div>\n )\n )}\n </>\n ) : (\n <StatusParent\n linkable={isLinkable}\n to={instance ? `/${instance}/s/${statusID}` : `/s/${statusID}`}\n onClick={() => {\n resetScrollPosition(statusID);\n }}\n >\n {/* <Link\n class=\"status-link\"\n to={instance ? `/${instance}/s/${statusID}` : `/s/${statusID}`}\n onClick={() => {\n resetScrollPosition(statusID);\n }}\n > */}\n {i === 0 && ancestor ? (\n <InView\n threshold={0.5}\n onChange={(inView) => {\n queueMicrotask(() => {\n requestAnimationFrame(() => {\n setReachTopPost(inView);\n });\n });\n }}\n >\n <Status\n statusID={statusID}\n instance={instance}\n withinContext\n size={thread || ancestor ? 'm' : 's'}\n enableTranslate\n onMediaClick={handleMediaClick}\n onStatusLinkClick={handleStatusLinkClick}\n />\n </InView>\n ) : (\n <Status\n statusID={statusID}\n instance={instance}\n withinContext\n size={thread || ancestor ? 'm' : 's'}\n enableTranslate\n onMediaClick={handleMediaClick}\n onStatusLinkClick={handleStatusLinkClick}\n showActionsBar={!!descendant}\n />\n )}\n {ancestor && repliesCount > 1 && (\n <div class=\"replies-link\">\n <Icon icon=\"comment2\" alt={t`Replies`} />{' '}\n <span title={repliesCount}>\n {shortenNumber(repliesCount)}\n </span>\n </div>\n )}{' '}\n {/* {replies?.length > LIMIT && (\n <div class=\"replies-link\">\n <Icon icon=\"comment\" />{' '}\n <span title={replies.length}>\n {shortenNumber(replies.length)}\n </span>\n </div>\n )} */}\n </StatusParent>\n // </Link>\n )}\n {descendant && replies?.length > 0 && (\n <SubComments\n instance={instance}\n replies={replies}\n hasParentThread={thread}\n level={level}\n accWeight={weight}\n openAll={totalDescendants.current < SUBCOMMENTS_OPEN_ALL_LIMIT}\n parentLink={{\n to: instance ? `/${instance}/s/${statusID}` : `/s/${statusID}`,\n onClick: () => resetScrollPosition(statusID),\n }}\n />\n )}\n {uiState === 'loading' &&\n isHero &&\n !!heroStatus?.repliesCount &&\n !hasDescendants && (\n <div class=\"status-loading\">\n <Loader abrupt={heroStatus.repliesCount >= 3} />\n </div>\n )}\n {uiState === 'error' &&\n isHero &&\n !!heroStatus?.repliesCount &&\n !hasDescendants && (\n <div class=\"status-error\">\n <Trans>Unable to load replies.</Trans>\n <br />\n <button\n type=\"button\"\n class=\"plain\"\n onClick={() => {\n states.reloadStatusPage++;\n }}\n >\n <Trans>Try again</Trans>\n </button>\n </div>\n )}\n </li>\n );\n },\n [\n id,\n instance,\n uiState,\n authenticated,\n sameInstance,\n translate,\n handleMediaClick,\n handleStatusLinkClick,\n hasDescendants,\n ],\n );\n\n const prevLocationIsStatusPage = useMemo(() => {\n // Navigation API\n if ('navigation' in window && navigation?.entries) {\n const prevEntry = navigation.entries()[navigation.currentEntry.index - 1];\n if (prevEntry?.url) {\n return STATUS_URL_REGEX.test(prevEntry.url);\n }\n }\n return STATUS_URL_REGEX.test(states.prevLocation?.pathname);\n }, [sKey]);\n\n const moreStatusesKeys = useMemo(() => {\n if (!showMore) return [];\n const ids = [];\n function getIDs(status) {\n ids.push(status.id);\n if (status.replies) {\n status.replies.forEach(getIDs);\n }\n }\n statuses.slice(limit).forEach(getIDs);\n return ids.map((id) => statusKey(id, instance));\n }, [showMore, statuses, limit, instance]);\n\n const statusesList = useMemo(\n () => statuses.slice(0, limit).map(renderStatus),\n [statuses, limit, renderStatus],\n );\n\n // If there's spoiler in hero status, auto-expand it\n useEffect(() => {\n let timer = setTimeout(() => {\n if (!heroStatusRef.current) return;\n const spoilerButton = heroStatusRef.current.querySelector(\n '.spoiler-button:not(.spoiling), .spoiler-media-button:not(.spoiling)',\n );\n if (spoilerButton) spoilerButton.click();\n }, 1000);\n return () => clearTimeout(timer);\n }, [id]);\n\n return (\n <div\n tabIndex=\"-1\"\n ref={scrollableRef}\n class={`status-deck deck contained ${\n statuses.length > 1 ? 'padded-bottom' : ''\n } ${\n initialPageState.current === 'status' && !firstLoad.current\n ? 'slide-in'\n : ''\n } ${viewMode ? `deck-view-${viewMode}` : ''}`}\n onAnimationEnd={(e) => {\n // Fix the bounce effect when switching viewMode\n // `slide-in` animation kicks in when switching viewMode\n if (initialPageState.current === 'status') {\n // e.target.classList.remove('slide-in');\n initialPageState.current = null;\n }\n }}\n >\n <header\n class={`${uiState === 'loading' ? 'loading' : ''}`}\n onDblClick={(e) => {\n // reload statuses\n states.reloadStatusPage++;\n }}\n >\n {/* <div>\n <Link class=\"button plain deck-close\" href={closeLink}>\n <Icon icon=\"chevron-left\" size=\"xl\" />\n </Link>\n </div> */}\n <div class=\"header-grid header-grid-2\">\n <h1>\n {prevLocationIsStatusPage && (\n <button\n type=\"button\"\n class=\"plain deck-back\"\n onClick={() => {\n history.back();\n }}\n >\n <Icon icon=\"chevron-left\" size=\"xl\" alt={t`Back`} />\n </button>\n )}\n {!heroInView && heroStatus && uiState !== 'loading' ? (\n <>\n <span class=\"hero-heading\">\n <NameText\n account={heroStatus.account}\n instance={instance}\n showAvatar\n short\n />{' '}\n <span class=\"insignificant\">\n •{' '}\n <RelativeTime\n datetime={heroStatus.createdAt}\n format=\"micro\"\n />\n </span>\n </span>{' '}\n <button\n type=\"button\"\n class=\"ancestors-indicator light small\"\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n heroStatusRef.current.scrollIntoView({\n behavior: 'smooth',\n block: 'start',\n });\n }}\n title={t`Go to main post`}\n >\n <Icon\n icon={heroPointer === 'down' ? 'arrow-down' : 'arrow-up'}\n />\n </button>\n </>\n ) : (\n <>\n <Trans id=\"post.title\">Post</Trans>{' '}\n <button\n type=\"button\"\n class=\"ancestors-indicator light small\"\n onClick={(e) => {\n // Scroll to top\n e.preventDefault();\n e.stopPropagation();\n scrollableRef.current.scrollTo({\n top: 0,\n behavior: 'smooth',\n });\n }}\n hidden={!ancestors.length || reachTopPost}\n title={t`${ancestors.length} posts above ‒ Go to top`}\n >\n <Icon icon=\"arrow-up\" />\n {ancestors\n .filter(\n (a, i, arr) =>\n arr.findIndex((b) => b.accountID === a.accountID) === i,\n )\n .slice(0, 3)\n .map((ancestor) => (\n <Avatar\n key={ancestor.account.id}\n url={ancestor.account.avatar}\n alt={ancestor.account.displayName}\n />\n ))}\n {/* <Icon icon=\"comment\" />{' '} */}\n {ancestors.length > 3 && (\n <>\n {' '}\n <span class=\"insignificant\">\n {shortenNumber(ancestors.length)}\n </span>\n </>\n )}\n </button>\n </>\n )}\n </h1>\n <div class=\"header-side\">\n <button\n type=\"button\"\n class=\"plain4 button-switch-view\"\n style={{\n display: viewMode === 'full' ? '' : 'none',\n }}\n onClick={() => {\n setViewMode(null);\n searchParams.delete('media');\n searchParams.delete('media-only');\n searchParams.delete('view');\n setSearchParams(searchParams);\n }}\n title={t`Switch to Side Peek view`}\n >\n <Icon icon=\"layout4\" size=\"l\" />\n </button>\n {showRefresh && (\n <button\n type=\"button\"\n class=\"plain button-refresh\"\n onClick={() => {\n states.reloadStatusPage++;\n setShowRefresh(false);\n }}\n >\n <Icon icon=\"refresh\" size=\"l\" alt={t`Refresh`} />\n </button>\n )}\n <Menu2\n align=\"end\"\n portal={{\n // Need this, else the menu click will cause scroll jump\n target: scrollableRef.current,\n }}\n menuButton={\n <button type=\"button\" class=\"button plain4\">\n <Icon icon=\"more\" alt={t`More`} size=\"xl\" />\n </button>\n }\n >\n <MenuItem\n disabled={uiState === 'loading'}\n onClick={() => {\n states.reloadStatusPage++;\n }}\n >\n <Icon icon=\"refresh\" />\n <span>\n <Trans>Refresh</Trans>\n </span>\n </MenuItem>\n <MenuItem\n className=\"menu-switch-view\"\n onClick={() => {\n setViewMode(viewMode === 'full' ? null : 'full');\n searchParams.delete('media');\n searchParams.delete('media-only');\n if (viewMode === 'full') {\n searchParams.delete('view');\n } else {\n searchParams.set('view', 'full');\n }\n setSearchParams(searchParams);\n }}\n >\n <Icon\n icon={\n {\n '': 'layout5',\n full: 'layout4',\n }[viewMode || '']\n }\n />\n <span>\n {viewMode === 'full'\n ? t`Switch to Side Peek view`\n : t`Switch to Full view`}\n </span>\n </MenuItem>\n <MenuItem\n onClick={() => {\n // Click all buttons with class .spoiler but not .spoiling\n const buttons = Array.from(\n scrollableRef.current.querySelectorAll(\n '.spoiler-button:not(.spoiling), .spoiler-media-button:not(.spoiling)',\n ),\n );\n buttons.forEach((button) => {\n button.click();\n });\n }}\n >\n <Icon icon=\"eye-open\" />{' '}\n <span>\n <Trans>Show all sensitive content</Trans>\n </span>\n </MenuItem>\n <MenuDivider />\n <MenuHeader className=\"plain\">\n <Trans>Experimental</Trans>\n </MenuHeader>\n <MenuItem\n disabled={!postInstance || postSameInstance}\n onClick={() => {\n const statusURL = getInstanceStatusURL(heroStatus.url);\n if (statusURL) {\n location.hash = statusURL;\n } else {\n alert(t`Unable to switch`);\n }\n }}\n >\n <Icon icon=\"transfer\" />\n <small class=\"menu-double-lines\">\n {postInstance\n ? t`Switch to post's instance (${punycode.toUnicode(\n postInstance,\n )})`\n : t`Switch to post's instance`}\n </small>\n </MenuItem>\n </Menu2>\n <Link class=\"button plain deck-close\" to={closeLink}>\n <Icon icon=\"x\" size=\"xl\" alt={t`Close`} />\n </Link>\n </div>\n </div>\n </header>\n {!!statuses.length && heroStatus ? (\n <ul\n class={`timeline flat contextual grow ${\n uiState === 'loading' ? 'loading' : ''\n }`}\n >\n {statusesList}\n {showMore > 0 && (\n <li>\n <button\n type=\"button\"\n class=\"plain block show-more\"\n disabled={uiState === 'loading'}\n onClick={() => setLimit((l) => l + LIMIT)}\n style={{ marginBlockEnd: '6em' }}\n data-state-post-ids={moreStatusesKeys.join(' ')}\n >\n <div class=\"ib avatars-bunch\">\n {/* show avatars for first 5 statuses */}\n {statuses.slice(limit, limit + 5).map((status) => (\n <Avatar\n key={status.id}\n url={status.account.avatarStatic}\n // title={`${status.avatar.displayName} (@${status.avatar.acct})`}\n />\n ))}\n </div>{' '}\n <div class=\"ib\">\n <Trans>Show more…</Trans>{' '}\n <span class=\"tag\">\n {showMore > LIMIT ? `${LIMIT}+` : showMore}\n </span>\n </div>\n </button>\n </li>\n )}\n </ul>\n ) : (\n <>\n {uiState === 'loading' && (\n <ul class=\"timeline flat contextual grow loading\">\n <li>\n <Status skeleton size=\"l\" />\n </li>\n </ul>\n )}\n {uiState === 'error' && (\n <p class=\"ui-state\">\n <Trans>Unable to load post</Trans>\n <br />\n <br />\n <button\n type=\"button\"\n onClick={() => {\n states.reloadStatusPage++;\n }}\n >\n <Trans>Try again</Trans>\n </button>\n </p>\n )}\n </>\n )}\n </div>\n );\n}\n\nfunction SubComments({\n replies,\n instance,\n hasParentThread,\n level,\n accWeight,\n openAll,\n parentLink,\n}) {\n const [searchParams, setSearchParams] = useSearchParams();\n\n // Total comments count, including sub-replies\n const diveDeep = (replies) => {\n return replies.reduce((acc, reply) => {\n const { repliesCount, replies } = reply;\n const count = replies?.length || repliesCount;\n return acc + count + diveDeep(replies || []);\n }, 0);\n };\n const totalComments = replies.length + diveDeep(replies);\n const sameCount = replies.length === totalComments;\n\n // Get the first 3 accounts, unique by id\n const accounts = replies\n .map((r) => r.account)\n .filter((a, i, arr) => arr.findIndex((b) => b.id === a.id) === i)\n .slice(0, 3);\n\n const totalWeight = useMemo(() => {\n return replies?.reduce((acc, reply) => {\n return acc + reply?.weight;\n }, accWeight);\n }, [accWeight, replies?.length]);\n\n let open = false;\n if (openAll) {\n open = true;\n } else if (totalWeight <= MAX_WEIGHT) {\n open = true;\n } else if (!hasParentThread && totalComments === 1) {\n const shortReply = calcStatusWeight(replies[0]) < 2;\n if (shortReply) open = true;\n }\n const openBefore = cachedRepliesToggle[replies[0].id];\n\n const handleMediaClick = useCallback((e, i, media, status) => {\n e.preventDefault();\n e.stopPropagation();\n setSearchParams({\n media: i + 1,\n mediaStatusID: status.id,\n });\n }, []);\n\n const detailsRef = useRef();\n useLayoutEffect(() => {\n function handleScroll(e) {\n // NOTE: this scrollLeft works for RTL too\n // Browsers do the magic for us\n e.target.dataset.scrollLeft = e.target.scrollLeft;\n }\n detailsRef.current?.addEventListener('scroll', handleScroll, {\n passive: true,\n });\n return () => {\n detailsRef.current?.removeEventListener('scroll', handleScroll);\n };\n }, []);\n\n // If not open, delay render replies\n const [renderReplies, setRenderReplies] = useState(openBefore || open);\n useEffect(() => {\n let timer;\n if (!openBefore && !open) {\n timer = setTimeout(() => setRenderReplies(true), 100);\n }\n return () => clearTimeout(timer);\n }, [openBefore, open]);\n\n const Container = open ? 'div' : 'details';\n const isDetails = Container === 'details';\n\n return (\n <Container\n ref={detailsRef}\n class=\"replies\"\n open={isDetails ? openBefore || open : undefined}\n onToggle={\n isDetails\n ? (e) => {\n const { open } = e.target;\n // use first reply as ID\n cachedRepliesToggle[replies[0].id] = open;\n }\n : undefined\n }\n style={{\n '--comments-level': level,\n }}\n data-comments-level={level}\n data-comments-level-overflow={level > 4}\n >\n {!open && (\n <summary class=\"replies-summary\" hidden={open}>\n <span class=\"avatars\">\n {accounts.map((a) => (\n <Avatar\n key={a.id}\n url={a.avatarStatic}\n title={`${a.displayName} @${a.username}`}\n squircle={a?.bot}\n />\n ))}\n </span>\n <span class=\"replies-counts\">\n <b>\n <Plural\n value={replies.length}\n one=\"# reply\"\n other={\n <Trans>\n <span title={replies.length}>\n {shortenNumber(replies.length)}\n </span>{' '}\n replies\n </Trans>\n }\n />\n </b>\n {!sameCount && totalComments > 1 && (\n <>\n {' '}\n ·{' '}\n <span>\n <Plural\n value={totalComments}\n one=\"# comment\"\n other={\n <Trans>\n <span title={totalComments}>\n {shortenNumber(totalComments)}\n </span>{' '}\n comments\n </Trans>\n }\n />\n </span>\n </>\n )}\n </span>\n <Icon icon=\"chevron-down\" class=\"replies-summary-chevron\" />\n {!!parentLink && (\n <Link\n class=\"replies-parent-link\"\n to={parentLink.to}\n onClick={parentLink.onClick}\n title={t`View post with its replies`}\n >\n »\n </Link>\n )}\n </summary>\n )}\n {renderReplies && (\n <ul>\n {replies.map((r) => (\n <li key={r.id}>\n {/* <Link\n class=\"status-link\"\n to={instance ? `/${instance}/s/${r.id}` : `/s/${r.id}`}\n onClick={() => {\n resetScrollPosition(r.id);\n }}\n > */}\n <div class=\"status-focus\" tabIndex={0}>\n <Status\n statusID={r.id}\n instance={instance}\n withinContext\n size=\"s\"\n enableTranslate\n onMediaClick={handleMediaClick}\n showActionsBar\n />\n {!r.replies?.length && r.repliesCount > 0 && (\n <div class=\"replies-link\">\n <Icon icon=\"comment2\" alt={t`Replies`} />{' '}\n <span title={r.repliesCount}>\n {shortenNumber(r.repliesCount)}\n </span>\n </div>\n )}\n </div>\n {/* </Link> */}\n {r.replies?.length && (\n <SubComments\n instance={instance}\n replies={r.replies}\n level={r.level}\n accWeight={!open ? r.weight : totalWeight}\n openAll={openAll}\n parentLink={{\n to: instance ? `/${instance}/s/${r.id}` : `/s/${r.id}`,\n onClick: () => {\n resetScrollPosition(r.id);\n },\n }}\n />\n )}\n </li>\n ))}\n </ul>\n )}\n </Container>\n );\n}\n\nconst MEDIA_VIRTUAL_LENGTH = 140;\nconst POLL_VIRTUAL_LENGTH = 35;\nconst CARD_VIRTUAL_LENGTH = 70;\nconst WEIGHT_SEGMENT = 140;\nconst statusWeightCache = new Map();\nfunction calcStatusWeight(status) {\n const cachedWeight = statusWeightCache.get(status.id);\n if (cachedWeight) return cachedWeight;\n const { spoilerText, content, mediaAttachments, poll, card } = status;\n const length = htmlContentLength(spoilerText + content);\n const mediaLength = mediaAttachments?.length ? MEDIA_VIRTUAL_LENGTH : 0;\n const pollLength = (poll?.options?.length || 0) * POLL_VIRTUAL_LENGTH;\n const cardLength =\n card && (mediaAttachments?.length || poll?.options?.length)\n ? 0\n : CARD_VIRTUAL_LENGTH;\n const totalLength = length + mediaLength + pollLength + cardLength;\n const weight = totalLength / WEIGHT_SEGMENT;\n statusWeightCache.set(status.id, weight);\n return weight;\n}\n\nexport default memo(StatusPage);\n","import { useParams } from 'react-router-dom';\n\nimport Status from './status';\n\nexport default function StatusRoute() {\n const params = useParams();\n const { id, instance } = params;\n return <Status id={id} instance={instance} />;\n}\n","export default \"__VITE_ASSET__W5CngKHO__\"","export default \"__VITE_ASSET__vmqRZ5q5__\"","export default \"__VITE_ASSET__DFAo1Udm__\"","export default \"__VITE_ASSET__D2_o1n6___\"","export default \"__VITE_ASSET__ySLnBMku__\"","export default \"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml:space='preserve'%20fill-rule='evenodd'%20stroke-linejoin='round'%20stroke-miterlimit='2'%20clip-rule='evenodd'%20viewBox='0%200%20102%2028'%3e%3cpath%20fill='none'%20d='M0%200h101.5v27.5H0z'/%3e%3cg%20fill-rule='nonzero'%3e%3cpath%20fill='url(%23a)'%20d='M2.32%2021.85c1.4%200%202.21-.85%202.21-2.3v-4.64H8.5c4.45%200%207.54-2.9%207.54-7.24%200-4.35-2.98-7.24-7.32-7.24h-6.4C.93.43.11%201.28.11%202.73v16.82c0%201.45.82%202.3%202.21%202.3Zm2.21-10.4V3.94h3c2.54%200%204%201.34%204%203.75s-1.47%203.76-4%203.76h-3Z'/%3e%3cpath%20fill='url(%23b)'%20d='M20.52%2021.88c1.25%200%202.13-.76%202.13-2.23v-7.04c0-2.07%201.2-3.49%203.21-3.49%201.95%200%202.95%201.23%202.95%203.25v7.28c0%201.47.89%202.23%202.13%202.23%201.26%200%202.14-.76%202.14-2.23v-8.18c0-3.64-1.99-5.9-5.48-5.9-2.38%200-4.1%201.12-4.93%203.1h-.09V2.3c0-1.38-.78-2.2-2.1-2.2-1.31%200-2.1.82-2.1%202.2v17.34c0%201.47.9%202.23%202.14%202.23Z'/%3e%3cpath%20fill='url(%23c)'%20d='M40.45%2021.82c1.96%200%203.93-.98%204.8-2.65h.1v.8c.08%201.27.89%201.91%202.05%201.91%201.21%200%202.08-.73%202.08-2.15v-8.95c0-3.17-2.63-5.25-6.65-5.25-3.26%200-5.78%201.16-6.5%203.04-.15.32-.23.63-.23.96%200%20.97.75%201.64%201.79%201.64.69%200%201.23-.26%201.7-.79.95-1.23%201.74-1.65%203.04-1.65%201.62%200%202.64.85%202.64%202.31v1.04l-3.95.24c-3.93.23-6.13%201.88-6.13%204.74%200%202.83%202.27%204.76%205.26%204.76Zm1.4-3.09c-1.43%200-2.4-.73-2.4-1.9%200-1.12.91-1.83%202.51-1.95l3.31-.2v1.14c0%201.7-1.54%202.91-3.41%202.91Z'/%3e%3cpath%20fill='url(%23d)'%20d='M54.37%2021.88c1.26%200%202.14-.76%202.14-2.23v-7.09c0-2.03%201.21-3.44%203.13-3.44s2.89%201.17%202.89%203.22v7.31c0%201.47.88%202.23%202.14%202.23%201.24%200%202.13-.76%202.13-2.23v-8.2c0-3.68-1.96-5.87-5.45-5.87-2.41%200-4%201.07-4.83%203.01h-.09v-.87c0-1.35-.85-2.17-2.14-2.17-1.28%200-2.06.82-2.06%202.15v11.95c0%201.47.9%202.23%202.14%202.23Z'/%3e%3cpath%20fill='url(%23e)'%20d='M71.65%2027.17c1.26%200%202.14-.76%202.14-2.23v-6h.09a5.15%205.15%200%200%200%204.88%202.88c3.92%200%206.35-3.05%206.35-8.1%200-5.07-2.44-8.1-6.43-8.1a5.12%205.12%200%200%200-4.86%202.99h-.09v-.85c0-1.45-.88-2.21-2.1-2.21-1.24%200-2.11.76-2.11%202.2v17.2c0%201.46.89%202.22%202.13%202.22Zm5.6-8.8c-2.1%200-3.47-1.8-3.47-4.65%200-2.81%201.37-4.67%203.47-4.67%202.14%200%203.49%201.83%203.49%204.67%200%202.86-1.35%204.66-3.5%204.66Z'/%3e%3cpath%20fill='url(%23f)'%20d='M89.61%2027.39c3.44%200%205.26-1.5%206.73-5.55l4.81-13.1a4%204%200%200%200%20.24-1.26c0-1.13-.85-1.93-2.08-1.93-1.1%200-1.71.51-2.07%201.7l-3.4%2010.9h-.08L90.35%207.28c-.36-1.25-.94-1.73-2.07-1.73-1.26%200-2.21.83-2.21%201.99%200%20.35.09.82.25%201.26l5%2013.21-.21.56c-.52%201.1-1.32%201.42-2.07%201.42l-.75-.01c-.96%200-1.56.54-1.56%201.4%200%201.29%201%202%202.88%202Z'/%3e%3c/g%3e%3cdefs%3e%3cradialGradient%20id='a'%20cx='0'%20cy='0'%20r='1'%20gradientTransform='rotate(28.51%20.06%20.22)%20scale(57.6252)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23a4bff7'/%3e%3cstop%20offset='1'%20stop-color='%236081e6'/%3e%3c/radialGradient%3e%3cradialGradient%20id='b'%20cx='0'%20cy='0'%20r='1'%20gradientTransform='rotate(28.51%20.06%20.22)%20scale(57.6252)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23a4bff7'/%3e%3cstop%20offset='1'%20stop-color='%236081e6'/%3e%3c/radialGradient%3e%3cradialGradient%20id='c'%20cx='0'%20cy='0'%20r='1'%20gradientTransform='rotate(28.51%20.06%20.22)%20scale(57.6252)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23a4bff7'/%3e%3cstop%20offset='1'%20stop-color='%236081e6'/%3e%3c/radialGradient%3e%3cradialGradient%20id='d'%20cx='0'%20cy='0'%20r='1'%20gradientTransform='rotate(28.51%20.06%20.22)%20scale(57.6252)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23a4bff7'/%3e%3cstop%20offset='1'%20stop-color='%236081e6'/%3e%3c/radialGradient%3e%3cradialGradient%20id='e'%20cx='0'%20cy='0'%20r='1'%20gradientTransform='rotate(28.51%20.06%20.22)%20scale(57.6252)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23a4bff7'/%3e%3cstop%20offset='1'%20stop-color='%236081e6'/%3e%3c/radialGradient%3e%3cradialGradient%20id='f'%20cx='0'%20cy='0'%20r='1'%20gradientTransform='rotate(28.51%20.06%20.22)%20scale(57.6252)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23a4bff7'/%3e%3cstop%20offset='1'%20stop-color='%236081e6'/%3e%3c/radialGradient%3e%3c/defs%3e%3c/svg%3e\"","import './welcome.css';\n\nimport { t, Trans } from '@lingui/macro';\n\nimport boostsCarouselUrl from '../assets/features/boosts-carousel.jpg';\nimport groupedNotificationsUrl from '../assets/features/grouped-notifications.jpg';\nimport multiColumnUrl from '../assets/features/multi-column.jpg';\nimport multiHashtagTimelineUrl from '../assets/features/multi-hashtag-timeline.jpg';\nimport nestedCommentsThreadUrl from '../assets/features/nested-comments-thread.jpg';\nimport logoText from '../assets/logo-text.svg';\nimport logo from '../assets/logo.svg';\n\nimport LangSelector from '../components/lang-selector';\nimport Link from '../components/link';\nimport states from '../utils/states';\nimport useTitle from '../utils/useTitle';\n\nconst {\n PHANPY_DEFAULT_INSTANCE: DEFAULT_INSTANCE,\n PHANPY_WEBSITE: WEBSITE,\n PHANPY_PRIVACY_POLICY_URL: PRIVACY_POLICY_URL,\n PHANPY_DEFAULT_INSTANCE_REGISTRATION_URL: DEFAULT_INSTANCE_REGISTRATION_URL,\n} = import.meta.env;\nconst appSite = WEBSITE\n ? WEBSITE.replace(/https?:\\/\\//g, '').replace(/\\/$/, '')\n : null;\nconst appVersion = __BUILD_TIME__\n ? `${__BUILD_TIME__.slice(0, 10).replace(/-/g, '.')}${\n __COMMIT_HASH__ ? `.${__COMMIT_HASH__}` : ''\n }`\n : null;\n\nfunction Welcome() {\n useTitle(null, ['/', '/welcome']);\n return (\n <main id=\"welcome\">\n <div class=\"hero-container\">\n <div class=\"hero-content\">\n <h1>\n <img\n src={logo}\n alt=\"\"\n width=\"160\"\n height=\"160\"\n style={{\n aspectRatio: '1/1',\n marginBlockEnd: -16,\n }}\n />\n <img src={logoText} alt=\"Phanpy\" width=\"200\" />\n </h1>\n <p class=\"desc\">\n <Trans>A minimalistic opinionated Mastodon web client.</Trans>\n </p>\n <p>\n <Link\n to={\n DEFAULT_INSTANCE\n ? `/login?instance=${DEFAULT_INSTANCE}&submit=1`\n : '/login'\n }\n class=\"button\"\n >\n {DEFAULT_INSTANCE ? t`Log in` : t`Log in with Mastodon`}\n </Link>\n </p>\n {DEFAULT_INSTANCE && DEFAULT_INSTANCE_REGISTRATION_URL && (\n <p>\n <a href={DEFAULT_INSTANCE_REGISTRATION_URL} class=\"button plain5\">\n <Trans>Sign up</Trans>\n </a>\n </p>\n )}\n {!DEFAULT_INSTANCE && (\n <p class=\"insignificant\">\n <small>\n <Trans>\n Connect your existing Mastodon/Fediverse account.\n <br />\n Your credentials are not stored on this server.\n </Trans>\n </small>\n </p>\n )}\n </div>\n {(appSite || appVersion) && (\n <p class=\"app-site-version\">\n <small>\n {appSite} {appVersion}\n </small>\n </p>\n )}\n <p>\n <Trans>\n <a href=\"https://github.com/cheeaun/phanpy\" target=\"_blank\">\n Built\n </a>{' '}\n by{' '}\n <a\n href=\"https://mastodon.social/@cheeaun\"\n target=\"_blank\"\n onClick={(e) => {\n e.preventDefault();\n states.showAccount = 'cheeaun@mastodon.social';\n }}\n >\n @cheeaun\n </a>\n .{' '}\n <a href={PRIVACY_POLICY_URL} target=\"_blank\">\n Privacy Policy\n </a>\n .\n </Trans>\n </p>\n <div>\n <LangSelector />\n </div>\n </div>\n <div id=\"why-container\">\n <div class=\"sections\">\n <section>\n <img\n src={boostsCarouselUrl}\n alt={t`Screenshot of Boosts Carousel`}\n loading=\"lazy\"\n />\n <h4>\n <Trans>Boosts Carousel</Trans>\n </h4>\n <p>\n <Trans>\n Visually separate original posts and re-shared posts (boosted\n posts).\n </Trans>\n </p>\n </section>\n <section>\n <img\n src={nestedCommentsThreadUrl}\n alt={t`Screenshot of nested comments thread`}\n loading=\"lazy\"\n />\n <h4>\n <Trans>Nested comments thread</Trans>\n </h4>\n <p>\n <Trans>\n Effortlessly follow conversations. Semi-collapsible replies.\n </Trans>\n </p>\n </section>\n <section>\n <img\n src={groupedNotificationsUrl}\n alt={t`Screenshot of grouped notifications`}\n loading=\"lazy\"\n />\n <h4>\n <Trans>Grouped notifications</Trans>\n </h4>\n <p>\n <Trans>\n Similar notifications are grouped and collapsed to reduce\n clutter.\n </Trans>\n </p>\n </section>\n <section>\n <img\n src={multiColumnUrl}\n alt={t`Screenshot of multi-column UI`}\n loading=\"lazy\"\n />\n <h4>\n <Trans>Single or multi-column</Trans>\n </h4>\n <p>\n <Trans>\n By default, single column for zen-mode seekers. Configurable\n multi-column for power users.\n </Trans>\n </p>\n </section>\n <section>\n <img\n src={multiHashtagTimelineUrl}\n alt={t`Screenshot of multi-hashtag timeline with a form to add more hashtags`}\n loading=\"lazy\"\n />\n <h4>\n <Trans>Multi-hashtag timeline</Trans>\n </h4>\n <p>\n <Trans>Up to 5 hashtags combined into a single timeline.</Trans>\n </p>\n </section>\n </div>\n </div>\n </main>\n );\n}\n\nexport default Welcome;\n","// Replace alert() with toastify-js\nimport Toastify from 'toastify-js';\n\nconst nativeAlert = window.alert;\nif (!window.__nativeAlert) window.__nativeAlert = nativeAlert;\n\nwindow.alert = function (message) {\n console.debug(\n 'ALERT: This is a custom alert() function. Native alert() is still available as window.__nativeAlert()',\n );\n // If Error object, show the message\n if (message instanceof Error && message?.message) {\n message = message.message;\n }\n // If not string, stringify it\n if (typeof message !== 'string') {\n message = JSON.stringify(message);\n }\n\n const toast = Toastify({\n text: message,\n className: 'alert',\n gravity: 'top',\n position: 'center',\n duration: 10_000,\n offset: {\n y: 48,\n },\n onClick: () => {\n toast.hideToast();\n },\n });\n toast.showToast();\n};\n","import './app.css';\n\nimport { useLingui } from '@lingui/react';\nimport debounce from 'just-debounce-it';\nimport { memo } from 'preact/compat';\nimport {\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'preact/hooks';\nimport { matchPath, Route, Routes, useLocation } from 'react-router-dom';\n\nimport 'swiped-events';\n\nimport { subscribe } from 'valtio';\n\nimport BackgroundService from './components/background-service';\nimport ComposeButton from './components/compose-button';\nimport { ICONS } from './components/ICONS';\nimport KeyboardShortcutsHelp from './components/keyboard-shortcuts-help';\nimport Loader from './components/loader';\nimport Modals from './components/modals';\nimport NotificationService from './components/notification-service';\nimport SearchCommand from './components/search-command';\nimport Shortcuts from './components/shortcuts';\nimport NotFound from './pages/404';\nimport AccountStatuses from './pages/account-statuses';\nimport Bookmarks from './pages/bookmarks';\nimport Catchup from './pages/catchup';\nimport Favourites from './pages/favourites';\nimport Filters from './pages/filters';\nimport FollowedHashtags from './pages/followed-hashtags';\nimport Following from './pages/following';\nimport Hashtag from './pages/hashtag';\nimport Home from './pages/home';\nimport HttpRoute from './pages/http-route';\nimport List from './pages/list';\nimport Lists from './pages/lists';\nimport Login from './pages/login';\nimport Mentions from './pages/mentions';\nimport Notifications from './pages/notifications';\nimport Public from './pages/public';\nimport Search from './pages/search';\nimport StatusRoute from './pages/status-route';\nimport Trending from './pages/trending';\nimport Welcome from './pages/welcome';\nimport {\n api,\n hasInstance,\n hasPreferences,\n initAccount,\n initClient,\n initInstance,\n initPreferences,\n} from './utils/api';\nimport { getAccessToken } from './utils/auth';\nimport focusDeck from './utils/focus-deck';\nimport states, { initStates, statusKey } from './utils/states';\nimport store from './utils/store';\nimport {\n getAccount,\n getCurrentAccount,\n setCurrentAccountID,\n} from './utils/store-utils';\n\nimport './utils/toast-alert';\n\nwindow.__STATES__ = states;\nwindow.__STATES_STATS__ = () => {\n const keys = [\n 'statuses',\n 'accounts',\n 'spoilers',\n 'unfurledLinks',\n 'statusQuotes',\n ];\n const counts = {};\n keys.forEach((key) => {\n counts[key] = Object.keys(states[key]).length;\n });\n console.warn('STATE stats', counts);\n\n const { statuses } = states;\n const unmountedPosts = [];\n for (const key in statuses) {\n const $post = document.querySelector(\n `[data-state-post-id~=\"${key}\"], [data-state-post-ids~=\"${key}\"]`,\n );\n if (!$post) {\n unmountedPosts.push(key);\n }\n }\n console.warn('Unmounted posts', unmountedPosts.length, unmountedPosts);\n};\n\n// Experimental \"garbage collection\" for states\n// Every 15 minutes\n// Only posts for now\nsetInterval(() => {\n if (!window.__IDLE__) return;\n const { statuses, unfurledLinks, notifications } = states;\n let keysCount = 0;\n const { instance } = api();\n for (const key in statuses) {\n if (!window.__IDLE__) break;\n try {\n const $post = document.querySelector(\n `[data-state-post-id~=\"${key}\"], [data-state-post-ids~=\"${key}\"]`,\n );\n const postInNotifications = notifications.some(\n (n) => key === statusKey(n.status?.id, instance),\n );\n if (!$post && !postInNotifications) {\n delete states.statuses[key];\n delete states.statusQuotes[key];\n for (const link in unfurledLinks) {\n const unfurled = unfurledLinks[link];\n const sKey = statusKey(unfurled.id, unfurled.instance);\n if (sKey === key) {\n delete states.unfurledLinks[link];\n break;\n }\n }\n keysCount++;\n }\n } catch (e) {}\n }\n if (keysCount) {\n console.info(`GC: Removed ${keysCount} keys`);\n }\n}, 15 * 60 * 1000);\n\n// Preload icons\n// There's probably a better way to do this\n// Related: https://github.com/vitejs/vite/issues/10600\nsetTimeout(() => {\n for (const icon in ICONS) {\n setTimeout(() => {\n if (Array.isArray(ICONS[icon])) {\n ICONS[icon][0]?.();\n } else if (typeof ICONS[icon] === 'object') {\n ICONS[icon].module?.();\n } else {\n ICONS[icon]?.();\n }\n }, 1);\n }\n}, 5000);\n\n(() => {\n window.__IDLE__ = true;\n const nonIdleEvents = [\n 'mousemove',\n 'mousedown',\n 'resize',\n 'keydown',\n 'touchstart',\n 'pointerdown',\n 'pointermove',\n 'wheel',\n ];\n const setIdle = () => {\n window.__IDLE__ = true;\n };\n const IDLE_TIME = 3_000; // 3 seconds\n const debouncedSetIdle = debounce(setIdle, IDLE_TIME);\n const onNonIdle = () => {\n window.__IDLE__ = false;\n debouncedSetIdle();\n };\n nonIdleEvents.forEach((event) => {\n window.addEventListener(event, onNonIdle, {\n passive: true,\n capture: true,\n });\n });\n window.addEventListener('blur', setIdle, {\n passive: true,\n });\n // When cursor leaves the window, set idle\n document.documentElement.addEventListener(\n 'mouseleave',\n (e) => {\n if (!e.relatedTarget && !e.toElement) {\n setIdle();\n }\n },\n {\n passive: true,\n },\n );\n // document.addEventListener(\n // 'visibilitychange',\n // () => {\n // if (document.visibilityState === 'visible') {\n // onNonIdle();\n // }\n // },\n // {\n // passive: true,\n // },\n // );\n})();\n\n// Possible fix for iOS PWA theme-color bug\n// It changes when loading web pages in \"webview\"\nconst isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent);\nif (isIOS) {\n document.addEventListener('visibilitychange', () => {\n if (document.visibilityState === 'visible') {\n // Don't reset theme color if media modal is showing\n // Media modal will set its own theme color based on the media's color\n const showingMediaModal =\n document.getElementsByClassName('media-modal-container').length > 0;\n if (showingMediaModal) return;\n\n const theme = store.local.get('theme');\n let $meta;\n if (theme) {\n // Get current meta\n $meta = document.querySelector(\n `meta[name=\"theme-color\"][data-theme-setting=\"manual\"]`,\n );\n if ($meta) {\n const color = $meta.content;\n const tempColor =\n theme === 'light'\n ? $meta.dataset.themeLightColorTemp\n : $meta.dataset.themeDarkColorTemp;\n $meta.content = tempColor || '';\n setTimeout(() => {\n $meta.content = color;\n }, 10);\n }\n } else {\n // Get current color scheme\n const colorScheme = window.matchMedia('(prefers-color-scheme: dark)')\n .matches\n ? 'dark'\n : 'light';\n // Get current theme-color\n $meta = document.querySelector(\n `meta[name=\"theme-color\"][media*=\"${colorScheme}\"]`,\n );\n if ($meta) {\n const color = $meta.dataset.content;\n const tempColor = $meta.dataset.contentTemp;\n $meta.content = tempColor || '';\n setTimeout(() => {\n $meta.content = color;\n }, 10);\n }\n }\n }\n });\n}\n\n{\n const theme = store.local.get('theme');\n // If there's a theme, it's NOT auto\n if (theme) {\n // dark | light\n document.documentElement.classList.add(`is-${theme}`);\n document\n .querySelector('meta[name=\"color-scheme\"]')\n .setAttribute('content', theme || 'dark light');\n\n // Enable manual theme <meta>\n const $manualMeta = document.querySelector(\n 'meta[data-theme-setting=\"manual\"]',\n );\n if ($manualMeta) {\n $manualMeta.name = 'theme-color';\n $manualMeta.content =\n theme === 'light'\n ? $manualMeta.dataset.themeLightColor\n : $manualMeta.dataset.themeDarkColor;\n }\n // Disable auto theme <meta>s\n const $autoMetas = document.querySelectorAll(\n 'meta[data-theme-setting=\"auto\"]',\n );\n $autoMetas.forEach((m) => {\n m.name = '';\n });\n }\n const textSize = store.local.get('textSize');\n if (textSize) {\n document.documentElement.style.setProperty('--text-size', `${textSize}px`);\n }\n}\n\nsubscribe(states, (changes) => {\n for (const [action, path, value, prevValue] of changes) {\n // Change #app dataset based on settings.shortcutsViewMode\n if (path.join('.') === 'settings.shortcutsViewMode') {\n const $app = document.getElementById('app');\n if ($app) {\n $app.dataset.shortcutsViewMode = states.shortcuts?.length ? value : '';\n }\n }\n\n // Add/Remove cloak class to body\n if (path.join('.') === 'settings.cloakMode') {\n const $body = document.body;\n $body.classList.toggle('cloak', value);\n }\n }\n});\n\nconst BENCHES = new Map();\nwindow.__BENCH_RESULTS = new Map();\nwindow.__BENCHMARK = {\n start(name) {\n if (!import.meta.env.DEV && !import.meta.env.PHANPY_DEV) return;\n // If already started, ignore\n if (BENCHES.has(name)) return;\n const start = performance.now();\n BENCHES.set(name, start);\n },\n end(name) {\n if (!import.meta.env.DEV && !import.meta.env.PHANPY_DEV) return;\n const start = BENCHES.get(name);\n if (start) {\n const end = performance.now();\n const duration = end - start;\n __BENCH_RESULTS.set(name, duration);\n BENCHES.delete(name);\n }\n },\n};\n\nfunction App() {\n const [isLoggedIn, setIsLoggedIn] = useState(false);\n const [uiState, setUIState] = useState('loading');\n __BENCHMARK.start('app-init');\n __BENCHMARK.start('time-to-following');\n __BENCHMARK.start('time-to-home');\n __BENCHMARK.start('time-to-isLoggedIn');\n useLingui();\n\n useEffect(() => {\n const instanceURL = store.local.get('instanceURL');\n const code = decodeURIComponent(\n (window.location.search.match(/code=([^&]+)/) || [, ''])[1],\n );\n\n if (code) {\n console.log({ code });\n // Clear the code from the URL\n window.history.replaceState(\n {},\n document.title,\n window.location.pathname || '/',\n );\n\n const clientID = store.sessionCookie.get('clientID');\n const clientSecret = store.sessionCookie.get('clientSecret');\n const vapidKey = store.sessionCookie.get('vapidKey');\n const verifier = store.sessionCookie.get('codeVerifier');\n\n (async () => {\n setUIState('loading');\n const { access_token: accessToken } = await getAccessToken({\n instanceURL,\n client_id: clientID,\n client_secret: clientSecret,\n code,\n code_verifier: verifier || undefined,\n });\n\n if (accessToken) {\n const client = initClient({ instance: instanceURL, accessToken });\n await Promise.allSettled([\n initPreferences(client),\n initInstance(client, instanceURL),\n initAccount(client, instanceURL, accessToken, vapidKey),\n ]);\n initStates();\n window.__IGNORE_GET_ACCOUNT_ERROR__ = true;\n\n setIsLoggedIn(true);\n setUIState('default');\n } else {\n setUIState('error');\n }\n __BENCHMARK.end('app-init');\n })();\n } else {\n window.__IGNORE_GET_ACCOUNT_ERROR__ = true;\n const searchAccount = decodeURIComponent(\n (window.location.search.match(/account=([^&]+)/) || [, ''])[1],\n );\n let account;\n if (searchAccount) {\n account = getAccount(searchAccount);\n console.log('searchAccount', searchAccount, account);\n if (account) {\n setCurrentAccountID(account.info.id);\n window.history.replaceState(\n {},\n document.title,\n window.location.pathname || '/',\n );\n }\n }\n if (!account) {\n account = getCurrentAccount();\n }\n if (account) {\n setCurrentAccountID(account.info.id);\n const { client } = api({ account });\n const { instance } = client;\n // console.log('masto', masto);\n initStates();\n setUIState('loading');\n (async () => {\n try {\n if (hasPreferences() && hasInstance(instance)) {\n // Non-blocking\n initPreferences(client);\n initInstance(client, instance);\n } else {\n await Promise.allSettled([\n initPreferences(client),\n initInstance(client, instance),\n ]);\n }\n } catch (e) {\n } finally {\n setIsLoggedIn(true);\n setUIState('default');\n __BENCHMARK.end('app-init');\n }\n })();\n } else {\n setUIState('default');\n __BENCHMARK.end('app-init');\n }\n }\n\n // Cleanup\n store.sessionCookie.del('clientID');\n store.sessionCookie.del('clientSecret');\n store.sessionCookie.del('codeVerifier');\n }, []);\n\n let location = useLocation();\n states.currentLocation = location.pathname;\n // useLayoutEffect(() => {\n // states.currentLocation = location.pathname;\n // }, [location.pathname]);\n\n useEffect(focusDeck, [location, isLoggedIn]);\n\n if (/\\/https?:/.test(location.pathname)) {\n return <HttpRoute />;\n }\n\n if (uiState === 'loading') {\n return <Loader id=\"loader-root\" />;\n }\n\n return (\n <>\n <PrimaryRoutes isLoggedIn={isLoggedIn} />\n <SecondaryRoutes isLoggedIn={isLoggedIn} />\n <Routes>\n <Route path=\"/:instance?/s/:id\" element={<StatusRoute />} />\n </Routes>\n {isLoggedIn && <ComposeButton />}\n {isLoggedIn && <Shortcuts />}\n <Modals />\n {isLoggedIn && <NotificationService />}\n <BackgroundService isLoggedIn={isLoggedIn} />\n <SearchCommand onClose={focusDeck} />\n <KeyboardShortcutsHelp />\n </>\n );\n}\n\nfunction Root({ isLoggedIn }) {\n if (isLoggedIn) {\n __BENCHMARK.end('time-to-isLoggedIn');\n }\n return isLoggedIn ? <Home /> : <Welcome />;\n}\n\nconst PrimaryRoutes = memo(({ isLoggedIn }) => {\n const location = useLocation();\n const nonRootLocation = useMemo(() => {\n const { pathname } = location;\n return !/^\\/(login|welcome)/i.test(pathname);\n }, [location]);\n\n return (\n <Routes location={nonRootLocation || location}>\n <Route path=\"/\" element={<Root isLoggedIn={isLoggedIn} />} />\n <Route path=\"/login\" element={<Login />} />\n <Route path=\"/welcome\" element={<Welcome />} />\n </Routes>\n );\n});\n\nfunction getPrevLocation() {\n return states.prevLocation || null;\n}\nfunction SecondaryRoutes({ isLoggedIn }) {\n // const snapStates = useSnapshot(states);\n const location = useLocation();\n // const prevLocation = snapStates.prevLocation;\n const backgroundLocation = useRef(getPrevLocation());\n\n const isModalPage = useMemo(() => {\n return (\n matchPath('/:instance/s/:id', location.pathname) ||\n matchPath('/s/:id', location.pathname)\n );\n }, [location.pathname, matchPath]);\n if (isModalPage) {\n if (!backgroundLocation.current)\n backgroundLocation.current = getPrevLocation();\n } else {\n backgroundLocation.current = null;\n }\n console.debug({\n backgroundLocation: backgroundLocation.current,\n location,\n });\n\n return (\n <Routes location={backgroundLocation.current || location}>\n {isLoggedIn && (\n <>\n <Route path=\"/notifications\" element={<Notifications />} />\n <Route path=\"/mentions\" element={<Mentions />} />\n <Route path=\"/following\" element={<Following />} />\n <Route path=\"/b\" element={<Bookmarks />} />\n <Route path=\"/f\" element={<Favourites />} />\n <Route path=\"/l\">\n <Route index element={<Lists />} />\n <Route path=\":id\" element={<List />} />\n </Route>\n <Route path=\"/fh\" element={<FollowedHashtags />} />\n <Route path=\"/ft\" element={<Filters />} />\n <Route path=\"/catchup\" element={<Catchup />} />\n </>\n )}\n <Route path=\"/:instance?/t/:hashtag\" element={<Hashtag />} />\n <Route path=\"/:instance?/a/:id\" element={<AccountStatuses />} />\n <Route path=\"/:instance?/p\">\n <Route index element={<Public />} />\n <Route path=\"l\" element={<Public local />} />\n </Route>\n <Route path=\"/:instance?/trending\" element={<Trending />} />\n <Route path=\"/:instance?/search\" element={<Search />} />\n {/* <Route path=\"/:anything\" element={<NotFound />} /> */}\n </Routes>\n );\n}\n\nexport { App };\n","import './index.css';\nimport './cloak-mode.css';\nimport './polyfills';\n\nimport { i18n } from '@lingui/core';\nimport { I18nProvider } from '@lingui/react';\n// Polyfill needed for Firefox < 122\n// https://bugzilla.mozilla.org/show_bug.cgi?id=1423593\n// import '@formatjs/intl-segmenter/polyfill';\nimport { render } from 'preact';\nimport { HashRouter } from 'react-router-dom';\n\nimport { App } from './app';\nimport { initActivateLang } from './utils/lang';\n\ninitActivateLang();\n\nif (import.meta.env.DEV) {\n import('preact/debug');\n}\n\nrender(\n <I18nProvider i18n={i18n}>\n <HashRouter>\n <App />\n </HashRouter>\n </I18nProvider>,\n document.getElementById('app'),\n);\n\n// Storage cleanup\nsetTimeout(() => {\n try {\n // Clean up iconify localStorage\n Object.keys(localStorage).forEach((key) => {\n if (key.startsWith('iconify')) {\n localStorage.removeItem(key);\n }\n });\n Object.keys(sessionStorage).forEach((key) => {\n if (key.startsWith('iconify')) {\n sessionStorage.removeItem(key);\n }\n });\n\n // Clean up old settings key\n localStorage.removeItem('settings:boostsCarousel');\n } catch (e) {}\n}, 5000);\n\n// Service worker cache cleanup\nif ('serviceWorker' in navigator && typeof caches !== 'undefined') {\n const MAX_SW_CACHE_SIZE = 50;\n const IGNORE_CACHE_KEYS = ['icons'];\n let clearRanOnce = false;\n const FAST_INTERVAL = 10_000; // 10 seconds\n const SLOW_INTERVAL = 60 * 60 * 1000; // 1 hour\n async function clearCaches() {\n if (window.__IDLE__) {\n try {\n const keys = await caches.keys();\n for (const key of keys) {\n if (IGNORE_CACHE_KEYS.includes(key)) continue;\n const cache = await caches.open(key);\n const _keys = await cache.keys();\n if (_keys.length > MAX_SW_CACHE_SIZE) {\n console.warn('Cleaning cache', key, _keys.length);\n const deleteKeys = _keys.slice(MAX_SW_CACHE_SIZE);\n for (const deleteKey of deleteKeys) {\n await cache.delete(deleteKey);\n }\n }\n }\n clearRanOnce = true;\n } catch (e) {} // Silent fail\n }\n // Once cleared, clear again at slower interval\n setTimeout(clearCaches, clearRanOnce ? SLOW_INTERVAL : FAST_INTERVAL);\n }\n setTimeout(clearCaches, FAST_INTERVAL);\n}\n\nwindow.__CLOAK__ = () => {\n document.body.classList.toggle('cloak');\n};\n"],"names":["functionDebounce","debounce","fn","wait","callFirst","timeout","debouncedFn","clear","flush","call","debounceWrapper","context","args","callNow","window","document","event","params","evt","handleTouchStart","handleTouchMove","handleTouchEnd","xDown","yDown","xDiff","yDiff","timeDown","startEl","touchCount","e","swipeThreshold","getNearestAttribute","swipeUnit","swipeTimeout","timeDiff","eventType","changedTouches","eventData","xUp","yUp","el","attributeName","defaultValue","attributeValue","usePageVisibility","deps","savedCallback","useRef","useEffect","current","handleVisibilityChange","hidden","visibilityState","console","STREAMING_TIMEOUT","POLL_INTERVAL","BackgroundService","memo","isLoggedIn","visible","setVisible","useState","visibleTimeout","clearTimeout","setTimeout","checkLatestNotification","masto","instance","skipCheckMarkers","states","notificationsLast","notificationsIterator","v1","notifications","list","limit","sinceId","id","value","next","length","notificationsShowNew","lastReadId","markers","fetch","timeline","sub","streamTimeout","pollNotifications","streaming","api","hasStreaming","user","notification","subscribe","log","entry","_a","checkForUpdates","clearInterval","r","info","useInterval","lastCheckDate","useHotkeys","currentCloakMode","Date","diff","i18n","settings","text","_","ComposeButton","snapStates","useSnapshot","handleButton","composerState","minimized","openOSK","shiftKey","openCompose","showCompose","ignoreEventWhen","querySelector","_jsx","type","onClick","class","publishing","publishingError","children","Icon","icon","size","alt","KeyboardShortcutsHelp","onClose","showKeyboardShortcutsHelp","hasModal","Modal","tabindex","Trans","keys","0","action","className","1","2","map","parents","coords","siblings","animations","intersections","intervals","options","debounces","enabled","root","scrollX","scrollY","TGT","DEL","NEW","handleMutations","mutations","elements","getElements","animate","handleResizes","entries","updateAllPos","updatePos","observePosition","oldObserver","rect","invocations","buffer","getCoords","offsetWidth","offsetHeight","rootMargin","px","observer","optionsOrPlugin","getOptions","delay","isPlugin","currentAnimation","parent","forEach","lowPriority","poll","callback","resize","supportedBrowser","nodes","mutation","node","target","i","child","isMounted","preExisting","add","remain","remove","raw","str","getScrollOffset","p","x","y","getTransitionSizes","oldCoords","newCoords","widthFrom","heightFrom","widthTo","heightTo","styles","paddingY","paddingX","getTarget","isEnabled","callbacks","getPluginTuple","pluginReturn","config","animation","pluginOrOptions","deltaX","deltaY","start","end","keyframes","cleanUp","style","prev","finalX","finalY","top","left","width","height","deletePosition","adjustScroll","styleReset","scrollDeltaX","scrollDeltaY","scrollBefore","lastHeight","lastWidth","startScroll","smoothScroll","offsetParent","parentStyles","parentCoords","autoAnimate","element","useAutoAnimate","controller","setController","setEnabled","isStandalone","matchMedia","matches","Accounts","accounts","store","local","getJSON","currentAccount","getCurrentAccountID","moreThanOneAccount","reload","useReducer","accountsListParent","_jsxs","tabIndex","ref","account","isCurrent","isDefault","Avatar","url","avatarStatic","onDblClick","$select","NameText","test","showAcct","setCurrentAccountID","_Fragment","Menu2","align","menuButton","disabled","location","MenuLink","href","MenuDivider","MenuItem","splice","MenuConfirm","subMenu","confirmLabel","menuItemClassName","Link","to","logo","regionMaps","LangSelector","useLingui","populatedLocales","useMemo","LOCALES","lang","regionlessCode","replace","native","localeCode2Text","code","locale","fallback","CATALOGS","find","c","nativeName","_common","name","sort","a","b","order","localeCompare","DEFAULT_LANG","onChange","set","common","import","createBackendPushSubscription","subscription","push","create","fetchBackendPushSubscription","updateBackendPushSubscription","update","removeBackendPushSubscription","isPushSupported","navigator","getRegistration","serviceWorker","getSubscription","registration","pushManager","undefined","urlBase64ToUint8Array","base64String","padding","repeat","base64","rawData","atob","outputArray","Uint8Array","charCodeAt","initSubscription","backendSubscription","err","message","sameEndpoint","sameKey","vapidKey","key2","applicationServerKey","vapidKeyStr","applicationServerKeyStr","updateSubscription","data","policy","removeSubscription","DEFAULT_TEXT_SIZE","TEXT_SIZES","PHANPY_WEBSITE","WEBSITE","PHANPY_PRIVACY_POLICY_URL","PRIVACY_POLICY_URL","PHANPY_IMG_ALT_API_URL","IMG_ALT_API_URL","PHANPY_GIPHY_API_KEY","GIPHY_API_KEY","Settings","currentTheme","get","themeFormRef","targetLanguage","contentTranslationTargetLanguage","systemTargetLanguage","getTranslateTargetLanguage","systemTargetLanguageText","currentTextSize","prefs","setPrefs","authenticated","onInput","formData","theme","documentElement","html","classList","$manualMeta","$autoMetas","querySelectorAll","m","toggle","defaultChecked","fontSize","min","max","step","parseInt","setProperty","rel","for","checked","autoRefresh","boostsCarousel","targetLanguages","showCommon","contentTranslationHideLanguages","contentTranslation","composerGIFPicker","mediaAltGenerator","supports","groupedNotificationsAlpha","shortcutSettingsCloudImportExport","cloakMode","PushNotificationsSection","display","flexWrap","gap","lineHeight","src","aspectRatio","verticalAlign","borderRadius","RelativeTime","datetime","readOnly","__BUILD_TIME__","showToast","caches","uiState","setUIState","allowNotifications","setAllowNotifications","setNeedRelogin","pushFormRef","needRelogin","alerts","previousPolicyRef","policyEl","namedItem","isLoading","values","mention","favourite","reblog","follow","follow_request","followRequest","status","key","alertsCount","allowNotifications2","alert","permission","label","components","alert2","focusDeck","timer","columns","getElementById","focus","modals","modal","modalFocusElement","pages","page","useLocationChange","useLocation","currentLocationRef","pathname","FETCH_MAX_AGE","MAX_AGE","fetchLists","pmem","lists","title","updatedAt","now","maxAge","getLists","fetchList","getList","theList","getListTitle","addListStore","updateListStore","index","deleteListStore","listID","findIndex","ListAddEdit","editMode","nameFieldRef","repliesPolicyFieldRef","exclusiveFieldRef","repliesPolicy","exclusive","supportsExclusive","onSubmit","preventDefault","FormData","listResult","replies_policy","MUTE_DURATIONS","MUTE_DURATIONS_LABELS","i18nDuration","LIMIT","ACCOUNT_INFO_MAX_AGE","fetchFamiliarFollowers","currentID","familiarFollowers","memFetchFamiliarFollowers","fetchPostingStats","accountID","fetchStatuses","statuses","total","originals","replies","stats","boosts","memFetchPostingStats","fetchAccount","standalone","i18n2","currentMasto","currentInstance","isString","setInfo","sameCurrentInstance","info2","acct","avatar","bot","createdAt","displayName","emojis","fields","group","lastStatusAt","locked","note","statusesCount","username","memorial","moved","roles","hideCollections","header","headerStatic","headerIsAvatar","isSelf","infoHasEssentials","account2","updated","punycode","accountInstance","setHeaderCornerColors","followersIterator","toUnicode","domain","fetchFollowers","firstLoad","familiarFollowersCache","results","newValue","familiarFollowers2","familiar","followingIterator","LinkOrDiv","accountLink","postingStats","setPostingStats","renderFamiliarFollowers","setFamiliarFollowers","postingStatsUIState","setPostingStatsUIState","hasPostingStats","followers","renderPostingStats","onRelationshipChange","onProfileUpdate","useCallback","newAccount","headerCornerColors","stopPropagation","onError","ctx","canvas","onLoad","pixelDimension","rgbColors","OffscreenCanvas","createElement","g","imageSmoothingEnabled","drawImage","colors","getImageData","dataLength","lightenRGB","color","AccountBlock","avatarSize","handleWithInstance","clipboard","enhanceContent","verifiedAt","__html","EmojiText","blankCopy","follower","followersCount","shortenNumber","fetchFollowing","followingCount","excludeRelationshipAttrs","hideTime","daysSinceLastPost","FAMILIAR_FOLLOWERS_LIMIT","relationshipUIState","setRelationshipUIState","setRelationship","sameInstance","following","showingReblogs","currentInfo","setCurrentInfo","notifying","followedBy","blocking","blockedBy","muting","mutingNotifications","requested","domainBlocking","endorsed","privateNote","acctWithInstance","setIsSelf","q","fetchRelationships","relationships","relationship2","relationship","showAddRemoveLists","setShowAddRemoveLists","showPrivateNoteModal","setLists","updateAccount","showTranslatedBio","showEditProfile","setShowPrivateNoteModal","lists2","currentAuthenticated","onMenuChange","setShowTranslatedBio","handle","niceAccountURL","newRelationship","counter","duration","error","setShowEditProfile","Loader","loading","TranslatedBioSheet","EditProfileSheet","AddRemoveListsSheet","luminence","alpha","urlObj","host","state","getHTMLText","fieldsText","Math","path","listsContainingAccount2","reloadCount","showListAddEditModal","setShowListAddEditModal","setListsContainingAccount","listsContainingAccount","inList","accountIds","result","PrivateNoteSheet","initialNote","textareaRef","_b","e2","trim","setAccount","acc","source","fieldsAttributesRef","displayName2","note2","fieldsAttributesFields","field","fieldsAttributes","FieldsAttributesRow","hasValue","setHasValue","AccountHandleInfo","server","maxLength","required","AccountSheet","propInstance","AccountInfo","lookup","skip_webfinger","v2","search","resolve","accountURL","URL","parse","hostname","Drafts","drafts","setDrafts","db","ns","getCurrentAccountNS","ownKeys","filter","startsWith","getMany","getTime","hasDrafts","abrupt","draft","draftStatus","replyTo","updatedAtDate","replyToStatus","MiniDraft","spoilerText","mediaAttachments","hasPoll","hasMedia","firstImageMedia","image","file","objectURL","createObjectURL","hasPollOrMedia","EmbedModal","dangerouslySetInnerHTML","GenericAccounts","postID","isCurrentInstance","setAccounts","showMore","setShowMore","showGenericAccounts","heading","fetchAccounts","staticAccounts","showReactions","relationshipsMap","setRelationshipsMap","loadRelationships","loadAccounts","done","Array","isArray","theAccount","j","_types","newAccounts","reloadGenericAccounts","post","Status","showStats","InView","MediaAltModal","forceTranslate","setForceTranslate","differentLanguage","localeMatch","l","supportsTTS","speak","dir","whiteSpace","textWrap","TranslationBlock","sourceLanguage","classToType","obj","unpack","keyOrder","k","PI","TWOPI","PITHIRD","DEG2RAD","RAD2DEG","multiplyMatrices","A","B","B_cols","product","row","col","labConstants","compand","linear","sign","xyz2rgb","z","MtxAdaptMa","MtxAdaptMaI","MtxXYZ2RGB","RefWhiteRGB","Xn","Yn","Zn","LAB_CONSTANTS","As","Bs","Cs","Ad","Bd","Cd","X1","Y1","Z1","X2","Y2","Z2","oklab2rgb","L","rest","X","Y","Z","OKLab_to_XYZ","b_","OKLab","LMStoXYZ","OKLabtoLMS","LMSnl","gammaAdjustSRGB","companded","rgb2xyz","MtxRGB2XYZ","rgb2oklab","xyz","XYZ_to_OKLab","XYZ","XYZtoLMS","LMStoOKLab","LMS","sin","cos","lch2lab","h","oklch2rgb","sqrt","atan2","round","lab2lch","rgb2oklch","MediaModal","statusID","carouselRef","currentIndex","setCurrentIndex","carouselFocusItem","useLayoutEffect","scrollIntoView","prevStatusID","scrollLeft","clientWidth","differentStatusID","scrollTo","isRTL","behavior","showControls","setShowControls","handleSwipe","addEventListener","removeEventListener","handleScroll","abs","passive","mediaOkColors","media","blurhash","averageColor","getBlurHashAverageColor","mediaAccentColors","okColor","light","dark","default","mediaAccentGradients","range","join","lightGradient","darkGradient","toastRef","hideToast","currentColor","$meta","metaColor","mediaColor","colorScheme","content","accentColor","description","showMediaAlt","CATEGORIES","CATEGORIES_INFO","spam","legal","violation","stampLabel","other","excludeStamp","ReportModal","split","rules","currentDomain","getCurrentInstance","selectedCategory","setSelectedCategory","showRules","setShowRules","rulesRef","hasRules","setHasRules","previewMode","useAvatarStatic","showActivity","Object","fromEntries","category","comment","forward","ruleIds","reports","accountId","statusIds","Fragment","rule","maxlength","rows","LZString","f","keyStrBase64","keyStrUriSafe","baseReverseDic","getBaseValue","alphabet","character","input","res","compressed","uncompressed","buf","TotalLen","current_value","bitsPerChar","getCharFromInt","context_dictionary","context_dictionaryToCreate","context_c","context_wc","context_w","context_enlargeIn","context_dictSize","context_numBits","context_data","context_data_val","context_data_position","ii","resetValue","getNextValue","dictionary","enlargeIn","dictSize","numBits","w","bits","resb","maxpower","power","module","floatingButtonUrl","multiColumnUrl$1","tabMenuBarUrl","MAX_FETCH","fetchFollowedTags","iterator","followedTags","tags","fetchCount","getFollowedTags","fauxDiv","extractTagsFromStatus","hashtagLinks","AsyncText","setText","Promise","then","SHORTCUTS_LIMIT","TYPES","TYPE_TEXT","public","bookmarks","favourites","hashtag","trending","mentions","TYPE_PARAMS","notRequired","placeholder","pattern","fetchAccountTitle","SHORTCUTS_META","excludeViewMode","subtitle","query","encodeURIComponent","ShortcutsSettings","shortcuts","showForm","setShowForm","showImportExport","setShowImportExport","shortcutsListParent","opacity","textTransform","imgURL","multiColumnUrl","shortcutsViewMode","Boolean","shortcut","excludedViewMode","includes","shortcutsArr","from","temp","shortcutIndex","justifyContent","alignItems","currentTarget","ShortcutForm","mode","ImportExport","FORM_NOTES","currentType","setCurrentType","setFollowedHashtags","form","formRef","switch","followedHashtags","autocorrect","autocapitalize","tag","shortcutsStr","compressToEncodedURIComponent","importShortcutStr","setImportShortcutStr","parsedImportShortcutStr","setImportUIState","parsed","JSON","decompressFromEncodedURIComponent","hasCurrentSettings","shortcutsImportFieldRef","v","dt","s","importUIState","menuFooter","nonUniqueShortcuts","exceededLimit","newShortcuts","writeText","share","settingsJSON","newNote","changes","prevValue","Modals","navigate","useNavigate","preload","ComposeSuspense","__COMPOSE__","editStatus","newStatus","reloadStatusPage","reply","edit","toast","prevLocation","showSettings","showAccounts","showAccount","destination","showDrafts","showMediaModal","contains","showShortcutsSettings","showEmbedModal","showReportModal","FollowRequestButtons","requestState","setRequestState","hasRelationship","followRequests","authorize","Error","NOTIFICATION_ICONS","severed_relationships","moderation_warning","emoji_reaction","emojiText","emoji","emoji_url","staticUrl","emojiObject","CustomEmoji","contentText","count","postsCount","postType","Subject","clickable","3","poll-self","poll-voted","favourite+reblog","admin.sign_up","admin.report","targetAccount","SEVERED_RELATIONSHIPS_TEXT","account_suspension","targetName","domain_block","user_domain_block","MODERATION_WARNING_TEXT","none","disable","mark_statuses_as_sensitive","delete_statuses","sensitive","silence","suspend","AVATARS_LIMIT","Notification","isStatic","disableContextMenu","report","_ids","_accounts","_statuses","_groupKeys","sampleAccounts","notificationsCount","groupKey","actualStatus","actualStatusID","isVoted","voted","isReplyToOthers","inReplyToAccountId","favsCount","reblogsCount","props","handleOpenGenericAccounts","showAvatar","emojiURL","shortcode","formattedCreatedAt","toLocaleString","genericAccountsHeading","statusKey","diffCount","expandAccounts","_g","isOwnPost","isFiltered","filtered","type2","gKey","keyAccounts","keyAccount","_accounts2","status2","TruncatedLink","onContextMenu","dispatchEvent","clientX","clientY","useTruncated","oldProps","newProps","accessToken","NotificationService","routeNotification","showNotificationSheet","notificationAccount","hasAccount","hash","warn","id2","setShowNotificationSheet","tagName","instanceURL","SearchForm","forwardRef","searchParams","setSearchParams","useSearchParams","searchMenuOpen","setSearchMenuOpen","setQuery","searchFieldRef","useImperativeHandle","setValue","select","blur","autocomplete","spellCheck","onSearch","onFocus","onBlur","onKeyDown","focusItem","nextItem","nextElementSibling","parentElement","firstItem","prevItem","previousElementSibling","lastItem","click","queryType","SearchCommand","showSearch","setShowSearch","searchFormRef","isSearchPage","closeSearch","enableOnFormTags","Shortcuts","isMultiColumnMode","shortcutsColumnsMode","menuRef","hasLists","formattedShortcuts","pin","handler","closeMenu","updatesButton","instanceRef","overflow","viewScroll","menuClassName","position","SubMenu2","groupBoosts","newValues","boostStash","serialBoosts","item","boostStashID","items","half","floor","slice","dedupeBoosts","boostedStatusIDs","filteredItems","boosterID","groupContext","contexts","contextIndex","t","repliedItem","self","inReplyToId","firstItemAccountID","newItems","appliedContextIndices","inReplyToIds","contextItems","aDate","bDate","every","it","sKey","statusReply","queueMicrotask","fallbackFetch","fetchStatus","saveStatus","skipThreading","ids","replyToStatuses","assignFollowedTags","statusFollowedTags","statusWithFollowedTags","extractedTags","itemFollowedTags","useScroll","scrollableRef","distanceFromStart","distanceFromEnd","scrollThresholdStart","scrollThresholdEnd","direction","distanceFromStartPx","_distanceFromStartPx","distanceFromEndPx","_distanceFromEndPx","scrollDirection","setScrollDirection","reachStart","setReachStart","reachEnd","setReachEnd","nearReachStart","setNearReachStart","nearReachEnd","setNearReachEnd","isVertical","scrollableElement","previousScrollStart","scrollTop","onScroll","scrollHeight","scrollWidth","clientHeight","scrollStart","scrollDimension","clientDimension","scrollDistance","init","Event","useScrollFn","useThrottledCallback","MediaPost","onMediaClick","accountEmojis","repliesCount","reblogged","favourited","favouritesCount","bookmarked","muted","visibility","language","editedAt","card","uri","_deleted","_pinned","debugHover","filterContext","useContext","FilterContext","filterInfo","hasSpoiler","readingExpandMedia","mediaKey","toLowerCase","filterTitleStr","Media","showSpoilerMedia","NavMenu","showFollowing","bindLongPress","useLongPress","threshold","detect","cancelOnMovement","buttonRef","menuState","setMenuState","boundingBoxPadding","safeBoundingBoxPadding","mutesIterator","fetchMutes","mutes","blocksIterator","fetchBlocks","blocks","supportsLists","buttonClickTS","squircle","ControlledMenu","anchorRef","containerProps","zIndex","portal","body","unmountOnClose","appVersion","commitHash","__COMMIT_HASH__","confirm","scrollIntoViewOptions","block","inline","Timeline","titleComponent","emptyText","errorText","useItemID","fetchItems","checkForUpdatesInterval","headerStart","headerEnd","timelineStart","refresh","view","showFollowedTags","showReplyParent","clearWhenRefresh","setItems","showNew","setShowNew","debug","isMediaFirstInstance","mediaFirst","allowGrouping","loadItemsTS","firstLoad2","loadItems","useDebouncedCallback","ts","otherPosts","pinnedPosts","items2","itemsSelector","jRef","activeItem","activeItemRect","closest","getBoundingClientRect","allItems","activeItemIndex","indexOf","itemRect","topmostItem","kRef","findLast","oRef","handleLoadNewPosts","showNewPostsIndicator","dotRef","headerRef","nearReachStart2","hiddenUI","prevView","disableIdleCheck","loadOrCheckUpdates","inBackground","noPointers","__IDLE__","visible2","hasUpdate","lastHiddenTime","TimelineItem","skeleton","inView","fItems","filteredItemsIDs","aFiltered","bFiltered","isCarousel","unfiltered","filteredItems2","has","StatusCarousel","_pinned2","_grouped","item2","statusID3","_pinned3","actualStatusID3","reblog3","statusID2","actualStatusID2","reblog2","url2","showCompact","_differentAuthor","isSpoiler","manyItems","isMiddle","isStart","isEnd","TimelineStatusCompact","itemKey","enableCommentHint","endButtonRef","render","setRender","newID","oldID","startButtonRef","statusPeekText","statusPeek","statusThreadNumber","titlesStr","MIN_YEAR","MIN_YEAR_MONTH","supportsInputMonth","setAttribute","_isSearchEnabled","isSearchEnabled","AccountStatuses","useParams","month","excludeReplies","excludeBoosts","tagged","accountStatusesIterator","allSearchParams","searchOffsetRef","searchEnabled","setSearchEnabled","isValidMonth","_year","_month","monthIndex","after","afterStr","before","beforeStr","searchResults","value2","offset","pinnedStatuses","pinnedStatusesIds","postId","setFeaturedTags","acctDisplay","accountDisplay","featuredTags","monthYear","fetchAccountPromiseRef","useTitle","fetchPromise","cachedAccount","filterBarRef","TimelineStart","year","month2","date","validity","MonthPicker","active","allowSwitch","offsetLeft","fetchAccountStatuses","masto2","monthFieldRef","yearFieldRef","checkValidity","minYear","minMonth","maxYear","maxMonth","Bookmarks","bookmarksIterator","fetchBookmarks","catchupUrl","FILTER_CONTEXT","RANGES","FILTER_KEYS","original","groups","FILTER_SORTS","FILTER_GROUPS","DTF","mem","Intl","DateTimeFormat","day","hour","minute","Catchup","dtf","showTopLinks","setShowTopLinks","supportsPixelfed","fetchHome","maxCreatedAt","maxCreatedAtDate","allResults","mainloop","homeIterator","nextParams","createdAtDate","selfPost","addedResults","catchupRangeRef","catchupLastRef","handleCatchupClick","catchupID","catchup","posts","setPosts","reloadCatchups","setLastCatchupEndAt","prevCatchups","setPrevCatchups","lastCatchupEndAt","catchups","ownCatchups","trimmedCatchups","lastCatchups","restCatchups","endAt","startAt","reloadCatchupsCount","_followedTags","_e","thePost","__FILTER","links","sharers","links2","link","topLinks","shared","linksLoop","likes","filteredPosts","authors","authorCounts","selectedFilterCategory","filteredPosts2","setSelectedAuthor","sortBy","authorsHash","setSortOrder","authorCountsMap","postFilterMatches","boostedPosts","__BOOSTERS","selectedAuthor","filteredPostsMap","authorID","authorCountsList","sortedFilteredPosts","aAccountID","authorIndices","bAccountID","aIndex","bIndex","postDensity","bDensity","aDensity","sortOrder","groupBy","prevGroup","authorsListParent","autoAnimated","isFiltered2","postsBar","postsBarType","posts2","postsBins","binByTime","lastCatchupRange","sortOrderIndex","authorElement","scrollableRect","authorRect","right","showHelp","setShowHelp","hlRef","_2","escRef","handleArrowKeys","ignoreModifiers","activeElement","isRadio","isArrowKeys","setRange","niceDateTime","format","pc","yes","st","del","setSelectedFilterCategory","setSortBy","formatRange","setGroupBy","transform","imageDescription","publishedAt","labAverageColor","filterCounts","author","paddingInline","showSeparator","IntersectionPostLineItem","isFollowedTags","PostLine","isReplyTo","show","setShow","IntersectionObserver","unobserve","MEDIA_DENSITY","CARD_DENSITY","pollContent","cur","htmlContentLength","PostPeek","density","isThread","_thread","readingExpandSpoilers","showMedia","showPostContent","emojifyText","o","multiple","remoteMediaURL","_f","_h","_j","_i","mediaURL","MEDIA_SIZE","previewUrl","gifv","video","audio","PostStats","numBins","dates","minDate","normalized","binIndex","bins","Favourites","favouritesIterator","fetchFavourites","FILTER_CONTEXT_UNIMPLEMENTED","FILTER_CONTEXT_LABELS","home","thread","EXPIRY_DURATIONS","EXPIRY_DURATIONS_LABELS","Filters","showFiltersAddEditModal","setShowFiltersAddEditModal","filters","setFilters","keywords","expiresAt","keyword","ExpiryStatus","_id","incID","FiltersAddEdit","filterAction","hasExpiry","expiresAtDate","editKeywords","setEditKeywords","keywordsRef","setRemovedKeyword_IDs","filteredEditKeywords","setRemovedKeywordIDs","removedKeyword_IDs","title2","keywordIDs","getAll","keywordKeywords","keywordWholeWords","wholeWord","removedKeywordIDs","keywordsAttributes","context2","expiresIn","filterResult","filterAction2","_id2","showNeverExpires","expired","rerender","FollowedHashtags","Following","latestItem","__BENCHMARK","latestItemChanged","clearFollowedTagsState","opts","payload","TAGS_LIMIT_PER_MODE","TOTAL_TAGS_LIMIT","Hashtags","mediaView","columnMode","hashtags","linkParams","hashtagTitle","maxID","fetchHashtags","timelines","any","maxId","onlyMedia","since_id","valueContainsLatestItem","followUIState","setFollowUIState","reachLimit","featuredUIState","setFeaturedUIState","isFeaturedTag","featuredTags2","setIsFeaturedTag","finally","featuredTagID","catch","MenuHeader","delete","FocusableItem","newHashtag","MenuGroup","exists","newInstance","List","listIterator","setList","showManageMembersModal","setShowManageMembersModal","list2","setDownOverflow","ListManageMembers","MEMBERS_LIMIT","members","setMembers","membersIterator","fetchMembers","member","as","RemoveAddButton","removed","setRemoved","notificationTypeKeys","GROUP_TYPES","groupable","fixNotifications","massageNotifications2","notificationGroups","sampleAccountIds","statusId","groupNotifications2","groupNotifications","newGroupNotifications","gn","latestPageNotificationAt","mostRecentNotificationId","newGroupNotifications1","notificationsMap","virtualType","mappedNotification","ma","mappedAccount","newGroupNotifications2","notificationsMap2","hasOneAccount","toLocaleDateString","n","cleanNotifications","cleanNotifications2","emptySearchParams","URLSearchParams","Mentions","stateType","setStateType","mentionsIterator","fetchMentions","types","conversationsIterator","latestConversationItem","lastStatus","fetchConversations","NOTIFICATIONS_LIMIT","NOTIFICATIONS_GROUPED_LIMIT","memSupportsGroupedNotifications","mastoFetchNotifications","getGroupedNotifications","NOTIFICATIONS_POLICIES","NOTIFICATIONS_POLICIES_TEXT","forNotFollowing","forNotFollowers","forNewAccounts","forPrivateMentions","forLimitedAccounts","Notifications","notificationID","notificationAccessToken","onlyMentions","setOnlyMentions","setFollowRequests","announcements","setAnnouncements","excludeTypes","allNotifications","groupedNotifications","notificationsLastFetchTime","fetchFollowRequests","loadFollowRequests","requests","fetchAnnouncements","supportsFilteredNotifications","showNotificationsSettings","setNotificationsPolicy","fetchNotificationsPolicy","loadNotificationsPolicy","notificationsRequests","setNotificationsRequests","fetchNotificationsRequest","loadNotifications","fetchNotificationsPromise","fetchNotifications","loadUpdates","unsub","subscribeKey","yesterdayDate","todayDate","currentDay","showTodayEmpty","announcementsListRef","statusLink","today","todaySubHeading","forceOpts","setShowNotificationsSettings","announcement","AnnouncementBlock","notificationsPolicy","onToggle","open","request","NotificationRequestModalButton","NotificationRequestButtons","differentDay","notificationDay","toDateString","subHeading","weekday","newPolicy","contact","contactAccount","startsAt","endsAt","published","reactions","allDay","read","publishedAtDate","publishedDateText","updatedAtText","reaction","me","fetchNotficationsByAccount","setShowModal","showModal","setNotifications","notifs","hasRequestState","Public","isLocal","publicIterator","fetchPublic","remote","prompt","SHORT_LIMIT","Search","offsetRef","statusResults","setStatusResults","accountResults","setAccountResults","hashtagResults","setHashtagResults","setTypeResultsFunc","loadResults","filterBarParent","history","reduce","TREND_CACHE_TIME","fetchLinks","trends","fetchTrendsStatuses","pixelfed","discover","fetchLinkList","Trending","setHashtags","setLinks","trendIterator","fetchTrends","currentLinkMentionsLoading","setCurrentLinkMentionsLoading","currentLinkMentionsIterator","currentLink","setCurrentLink","supportsTrendingLinkPosts","currentLinkRef","hasCurrentLink","fetchLinkMentions","prevCurrentLink","authorUrl","authorName","providerName","providerUrl","isShortTitle","hasAuthor","flexShrink","textAlign","Columns","Hashtag","Component","$column","currentFocusedColumn","prevColKey","nextColKey","Home","NotificationsLink","notificationLinkRef","NotificationsMenu","NOTIFICATIONS_DISPLAY_LIMIT","hasFollowRequests","setHasFollowRequests","statusPostRegexes","getInstanceStatusObject","regex","match","getInstanceStatusURL","HttpRoute","statusObject","statusURL","Lists","instancesListURL","dec2hex","dec","toString","verifier","array","Uint32Array","crypto","getRandomValues","sha256","plain","TextEncoder","encode","subtle","digest","base64urlencode","bytes","len","byteLength","String","fromCharCode","btoa","generateCodeChallenge","hashed","supportsPKCE","ok","json","code_challenge_methods_supported","__generateCodeChallenge","DEV","PHANPY_CLIENT_NAME","CLIENT_NAME","SCOPES","sameSite","currentLocation","origin","REDIRECT_URI","registerApplication","registrationParams","client_name","redirect_uris","scopes","website","method","headers","getPKCEAuthorizationURL","registrationJSON","client_id","codeChallenge","code_challenge_method","code_challenge","authorizationParams","scope","authorizationURL","client_secret","code_verifier","redirect_uri","append","PHANPY_DEFAULT_INSTANCE","DEFAULT_INSTANCE","Login","instanceURLRef","cachedInstanceURL","submit","instanceText","setInstanceText","instancesList","setInstancesList","searcher","Fuse","submitInstance","xmlDoc","parseFromString","template","vapid_key","authPKCE","sessionCookie","getAuthorizationURL","cleanInstanceText","instanceTextLooksLikeDomain","instancesSuggestions","instance2","selectedInstanceText","SUBCOMMENTS_OPEN_ALL_LIMIT","MAX_WEIGHT","cachedRepliesToggle","cachedStatusesMap","scrollPositions","resetScrollPosition","STATUSES_SELECTOR","STATUS_URL_REGEX","StatusPage","mediaParam","mediaOnlyParam","mediaIndex","mediaStatusID","mediaStatus","getStatus","showMediaOnly","heroStatus","setHeroStatus","closeLink","matchStatusPath","matchPath","handleMediaClose","$carousel","$deckContainers","$deckContainer","StatusParent","linkable","restProps","createdAtSort","StatusThread","navigation","translate","setStatuses","heroStatusRef","totalDescendants","scrollOffsets","lastInitContextTS","reloadHero","heroTimer","cachedStatuses","reallyCachedStatuses","heroFetch","pRetry","contextFetch","hasStatus","heroStatus2","_replies","level","nextLevel","descendantLevelsCount","expandReplies","_r","weight","descendants","ancestors2","ancestors","missingStatuses","ancestorsIsThread","nestedDescendants","__replies","heroAccountID","ancestor","threadifyStatus","offsetTop","heroLimit","setLimit","showRefresh","setShowRefresh","allStatuses","scrollPosition","initContext","interval","newScrollOffsets","contextURL","newScrollTop","statusWeightCache","heroContentText","apiCache","heroDisplayName","postInstance","hasDescendants","div","innerHTML","activeStatusRect","activeStatus","postSameInstance","nextStatus","allStatusLinks","activeStatusIndex","some","heroPointer","topmostStatusLink","heroInView","prevStatus","statusLinkRect","details","initialPageState","handleMediaClick","handleStatusLinkClick","descendant","isHero","requestAnimationFrame","setHeroInView","setReachTopPost","isLinkable","SubComments","enableTranslate","onStatusLinkClick","showActionsBar","prevLocationIsStatusPage","prevEntry","hasParentThread","openAll","getIDs","statusesList","renderStatus","spoilerButton","viewMode","moreStatusesKeys","onAnimationEnd","back","reachTopPost","arr","setViewMode","button","full","buttons","accWeight","parentLink","diveDeep","replies3","totalComments","sameCount","totalWeight","calcStatusWeight","openBefore","renderReplies","Container","isDetails","detailsRef","shortReply","open2","dataset","setRenderReplies","MEDIA_VIRTUAL_LENGTH","CARD_VIRTUAL_LENGTH","cachedWeight","mediaLength","pollLength","POLL_VIRTUAL_LENGTH","cardLength","StatusRoute","boostsCarouselUrl","groupedNotificationsUrl","multiHashtagTimelineUrl","nestedCommentsThreadUrl","logoText","PHANPY_DEFAULT_INSTANCE_REGISTRATION_URL","DEFAULT_INSTANCE_REGISTRATION_URL","appSite","Welcome","marginBlockEnd","nativeAlert","__nativeAlert","Toastify","gravity","__STATES__","__STATES_STATS__","counts","unmountedPosts","setInterval","unfurledLinks","postInNotifications","$post","unfurled","keysCount","ICONS","nonIdleEvents","setIdle","debouncedSetIdle","onNonIdle","isIOS","tempColor","themeDarkColor","textSize","$app","BENCHES","setIsLoggedIn","decodeURIComponent","clientSecret","clientID","initStates","searchAccount","getAccount","client","hasPreferences","hasInstance","initPreferences","initInstance","PrimaryRoutes","Routes","Route","Root","nonRootLocation","getPrevLocation","SecondaryRoutes","backgroundLocation","isModalPage","initActivateLang","I18nProvider","HashRouter","App","localStorage","removeItem","sessionStorage","IGNORE_CACHE_KEYS","clearRanOnce","FAST_INTERVAL","SLOW_INTERVAL","clearCaches","cache","_keys","MAX_SW_CACHE_SIZE","deleteKeys"],"mappings":"0lCAAA,IAAIA,GAAmBC,GAEvB,SAASA,GAASC,EAAIC,EAAMC,EAAW,CACrC,IAAIC,EAAU,KACVC,EAAc,KAEdC,EAAQ,UAAW,CACjBF,IACF,aAAaA,CAAO,EAEpBC,EAAc,KACdD,EAAU,KAEhB,EAEMG,EAAQ,UAAW,CACrB,IAAIC,EAAOH,EACXC,IAEIE,GACFA,GAEN,EAEMC,EAAkB,UAAW,CAC/B,GAAI,CAACP,EACH,OAAOD,EAAG,MAAM,KAAM,SAAS,EAGjC,IAAIS,EAAU,KACVC,EAAO,UACPC,EAAUT,GAAa,CAACC,EAkB5B,GAjBAE,IAEAD,EAAc,UAAW,CACvBJ,EAAG,MAAMS,EAASC,CAAI,CAC5B,EAEIP,EAAU,WAAW,UAAW,CAG9B,GAFAA,EAAU,KAEN,CAACQ,EAAS,CACZ,IAAIJ,EAAOH,EACX,OAAAA,EAAc,KAEPG,EAAI,CACZ,CACF,EAAEN,CAAI,EAEHU,EACF,OAAOP,EAAW,CAExB,EAEE,OAAAI,EAAgB,OAASH,EACzBG,EAAgB,MAAQF,EAEjBE,CACT,CC1DA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQC,SAAUI,EAAQC,EAAU,CAEzB,aAGI,OAAOD,EAAO,aAAgB,aAE9BA,EAAO,YAAc,SAAUE,EAAOC,EAAQ,CAE1CA,EAASA,GAAU,CAAE,QAAS,GAAO,WAAY,GAAO,OAAQ,QAEhE,IAAIC,EAAMH,EAAS,YAAY,aAAa,EAC5C,OAAAG,EAAI,gBAAgBF,EAAOC,EAAO,QAASA,EAAO,WAAYA,EAAO,MAAM,EACpEC,CACnB,EAEQJ,EAAO,YAAY,UAAYA,EA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