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EAA4B,EAChCtqC,SAAU/C,CAAAA,EAAAA,EAAAA,WAAAA,EACR,CAAC4E,EAAIF,KACH2oC,EAA4B,IAG5BnJ,WAAW,KACJx/B,EAGH6oC,EAAW3oC,EAAIF,GAFfiyB,EAAc/xB,EAAI8yB,GAAAA,EAAgBA,CAACC,GAAG,CAI1C,EACF,EACA,CAAC4V,EAAY5W,EAAe0W,EAA4B,C,GAG5D,UAAC5B,GAAAA,CAAAA,GACD,UAACmB,GAAAA,CAAAA,G,EAGP,C","sources":["webpack://@affine/web/../core/src/hooks/affine/use-language-helper.ts","webpack://@affine/web/../core/src/hooks/use-workspace.ts","webpack://@affine/web/../core/src/components/affine/create-workspace-modal/index.css.ts","webpack://@affine/web/../core/src/components/affine/create-workspace-modal/index.tsx","webpack://@affine/web/../core/src/components/affine/history-tips-modal/top-svg.tsx","webpack://@affine/web/../core/src/components/affine/history-tips-modal/index.tsx","webpack://@affine/web/../core/src/components/affine/issue-feedback-modal/index.tsx","webpack://@affine/web/../core/src/components/affine/quota-reached-modal/cloud-quota-modal.tsx","webpack://@affine/web/../core/src/components/affine/quota-reached-modal/local-quota-modal.tsx","webpack://@affine/web/../component/src/components/setting-components/setting-header.tsx","webpack://@affine/web/../component/src/components/setting-components/share.css.ts","webpack://@affine/web/../component/src/components/setting-components/setting-row.tsx","webpack://@affine/web/../component/src/components/setting-components/wrapper.tsx","webpack://@affine/web/../component/src/components/setting-components/workspace-detail-skeleton.tsx","webpack://@affine/web/../component/src/components/setting-components/workspace-list-skeleton.tsx","webpack://@affine/web/../core/src/components/pure/file-upload/index.tsx","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/plans/ai/actions/cancel.tsx","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/plans/ai/actions/login.tsx","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/plans/ai/actions/resume.tsx","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/plans/ai/actions/subscribe.tsx","webpack://@affine/web/../core/src/components/affine/setting-modal/account-setting/storage-progress.css.ts","webpack://@affine/web/../core/src/components/affine/setting-modal/account-setting/ai-usage-panel.tsx","webpack://@affine/web/../core/src/components/affine/setting-modal/account-setting/storage-progress.tsx","webpack://@affine/web/../core/src/components/affine/setting-modal/account-setting/index.tsx","webpack://@affine/web/../core/src/components/affine/setting-modal/account-setting/style.css.ts","webpack://@affine/web/../core/src/components/affine/setting-modal/atoms.ts","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/about/config.tsx","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/about/icons.tsx","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/about/style.css.ts","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/about/update-check-section.tsx","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/about/index.tsx","webpack://@affine/web/../core/src/components/affine/language-menu/index.tsx","webpack://@affine/web/../core/src/components/affine/language-menu/style.css.ts","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/appearance/style.css.ts","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/appearance/index.tsx","webpack://@affine/web/../core/src/components/pure/swr-error-bundary.tsx","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/plans/style.css.ts","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/plans/modals.tsx","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/plans/actions.tsx","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/plans/lifetime/assets.ts","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/plans/lifetime/believer-card.tsx","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/plans/lifetime/believer-card.css.ts","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/plans/lifetime/benefits.css.ts","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/plans/lifetime/benefits.tsx","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/billing/style.css.ts","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/billing/index.tsx","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/icons.tsx","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/plans/ai/ai-plan.css.ts","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/plans/layout.tsx","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/plans/layout.css.ts","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/plans/ai/benefits.tsx","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/plans/ai/layout.tsx","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/plans/ai/ai-plan.tsx","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/plans/plan-card.tsx","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/plans/lifetime/style.css.ts","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/plans/lifetime/lifetime-plan.tsx","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/plans/cloud-plans.tsx","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/plans/skeleton.tsx","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/plans/skeleton.css.ts","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/plans/index.tsx","webpack://@affine/web/../core/src/hooks/affine/use-shortcuts.ts","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/shortcuts/index.tsx","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/shortcuts/style.css.ts","webpack://@affine/web/../core/src/components/affine/setting-modal/general-setting/index.tsx","webpack://@affine/web/../core/src/components/affine/setting-modal/setting-sidebar/style.css.ts","webpack://@affine/web/../core/src/components/affine/setting-modal/setting-sidebar/index.tsx","webpack://@affine/web/../core/src/components/affine/setting-modal/style.css.ts","webpack://@affine/web/../core/src/components/affine/setting-modal/types.ts","webpack://@affine/web/../core/src/components/affine/setting-modal/workspace-setting/new-workspace-setting-detail/delete-leave-workspace/delete/style.css.ts","webpack://@affine/web/../core/src/components/affine/setting-modal/workspace-setting/new-workspace-setting-detail/delete-leave-workspace/delete/index.tsx","webpack://@affine/web/../core/src/components/affine/setting-modal/workspace-setting/new-workspace-setting-detail/delete-leave-workspace/index.tsx","webpack://@affine/web/../core/src/components/affine/setting-modal/workspace-setting/new-workspace-setting-detail/enable-cloud.tsx","webpack://@affine/web/../core/src/components/affine/setting-modal/workspace-setting/new-workspace-setting-detail/export.tsx","webpack://@affine/web/../core/src/components/affine/setting-modal/workspace-setting/new-workspace-setting-detail/style.css.ts","webpack://@affine/web/../core/src/components/affine/setting-modal/workspace-setting/new-workspace-setting-detail/labels.tsx","webpack://@affine/web/../core/src/hooks/affine/use-mutate-cloud.ts","webpack://@affine/web/../core/src/hooks/affine/use-members.ts","webpack://@affine/web/../core/src/components/affine/setting-modal/workspace-setting/new-workspace-setting-detail/members.tsx","webpack://@affine/web/../core/src/hooks/affine/use-member-count.ts","webpack://@affine/web/../core/src/hooks/affine/use-invite-member.ts","webpack://@affine/web/../core/src/hooks/affine/use-revoke-member-permission.ts","webpack://@affine/web/../core/src/components/affine/setting-modal/workspace-setting/new-workspace-setting-detail/profile.tsx","webpack://@affine/web/../core/src/components/affine/setting-modal/workspace-setting/new-workspace-setting-detail/index.tsx","webpack://@affine/web/../core/src/components/affine/setting-modal/workspace-setting/properties/styles.css.ts","webpack://@affine/web/../core/src/components/affine/setting-modal/workspace-setting/properties/index.tsx","webpack://@affine/web/../core/src/components/affine/setting-modal/workspace-setting/index.tsx","webpack://@affine/web/../core/src/components/affine/setting-modal/index.tsx","webpack://@affine/web/../core/src/components/affine/star-affine-modal/index.tsx","webpack://@affine/web/../core/src/modules/find-in-page/view/find-in-page-modal.css.ts","webpack://@affine/web/../core/src/modules/find-in-page/view/find-in-page-modal.tsx","webpack://@affine/web/../core/src/providers/modal-provider.tsx"],"sourcesContent":["import { useAsyncCallback } from '@affine/core/hooks/affine-async-hooks';\nimport { LOCALES, useI18n } from '@affine/i18n';\nimport { useEffect, useMemo } from 'react';\n\nexport function useLanguageHelper() {\n const i18n = useI18n();\n const currentLanguage = useMemo(\n () => LOCALES.find(item => item.tag === i18n.language),\n [i18n.language]\n );\n const languagesList = useMemo(\n () =>\n LOCALES.map(item => ({\n tag: item.tag,\n originalName: item.originalName,\n name: item.name,\n Completeness: item.completeRate,\n })),\n []\n );\n const onLanguageChange = useAsyncCallback(\n async (event: string) => {\n await i18n.changeLanguage(event);\n },\n [i18n]\n );\n\n useEffect(() => {\n if (currentLanguage) {\n document.documentElement.lang = currentLanguage.tag;\n }\n }, [currentLanguage]);\n\n return useMemo(\n () => ({\n currentLanguage,\n languagesList,\n onLanguageChange,\n }),\n [currentLanguage, languagesList, onLanguageChange]\n );\n}\n","import type { Workspace, WorkspaceMetadata } from '@toeverything/infra';\nimport { useService, WorkspacesService } from '@toeverything/infra';\nimport { useEffect, useState } from 'react';\n\n/**\n * definitely be careful when using this hook, open workspace is a heavy operation\n */\nexport function useWorkspace(meta?: WorkspaceMetadata | null) {\n const workspaceManager = useService(WorkspacesService);\n\n const [workspace, setWorkspace] = useState(null);\n\n useEffect(() => {\n if (!meta) {\n setWorkspace(null); // set to null if meta is null or undefined\n return;\n }\n const ref = workspaceManager.open({ metadata: meta });\n setWorkspace(ref.workspace);\n return () => {\n ref.dispose();\n };\n }, [meta, workspaceManager]);\n\n return workspace;\n}\n","import \"../core/src/components/affine/create-workspace-modal/index.css.ts.vanilla.css!=!../../../../../../../node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\\\"fileName\\\":\\\"../core/src/components/affine/create-workspace-modal/index.css.ts.vanilla.css\\\",\\\"source\\\":\\\"#H4sIAAAAAAAAA7VT0W7bMAx8z1fwZcD2oMLO3DRTPmaQLdrhZlOCRCfOhv37IDurncZr0QF7MiCSd+Td+eFr8fh0sZjBzw2Ad5GEHGsI2BqhEx42AJ0JDbES5zUUhR8Om1+bh+tcPs7VjkVF+oEaTiZ8VMrUNTGq6b37lFAq17rwoi44iPKBOhMuamwYW8exM1JzFA27LFsSbkdCS9G35qKhbnGYd9SQZ36Am4HP6wPpqywFrKaDK9f2HadKY7yGvR+7vLGWuNGQb1/iFv+Eu7vBnTRNOy+RHycvltSHNSrTUsOKBLuooUIWDOm5dMFiUMFY6uPzJaWpvjfB9WzVmhOLcsTKsb11pCNWx6sheV5cj1hJy3zF7r36fOujUJ1YWZBledKZrByTUNmHZyUnWWa+p7eTWJqI783i3QF3a0ZvKlQlyhmRlxvt395oiK/vs+qFGdRVkO1+fyvCl/9BOcObEf6PG8XuL8G8k2g0Hdm+kto5TKaMru0FpyyLuE6nPw8gTPnLpnZKkwpPyBI1sOOUvt+tqdBRzwQAAA==\\\"}!../../../../../../../node_modules/@vanilla-extract/webpack-plugin/extracted.js\"\nexport var affineCloudWrapper = '_457yde4';\nexport var avatarWrapper = '_457yde2';\nexport var card = '_457yde5';\nexport var cardDescription = '_457yde8';\nexport var cardText = '_457yde6';\nexport var cardTitle = '_457yde7';\nexport var cloudSvgContainer = '_457ydea';\nexport var cloudTips = '_457yde9';\nexport var header = '_457yde0';\nexport var subTitle = '_457yde1';\nexport var workspaceNameWrapper = '_457yde3';","import { Avatar, Input, Switch, toast } from '@affine/component';\nimport type { ConfirmModalProps } from '@affine/component/ui/modal';\nimport { ConfirmModal, Modal } from '@affine/component/ui/modal';\nimport { authAtom } from '@affine/core/atoms';\nimport { useAsyncCallback } from '@affine/core/hooks/affine-async-hooks';\nimport { track } from '@affine/core/mixpanel';\nimport { DebugLogger } from '@affine/debug';\nimport { apis } from '@affine/electron-api';\nimport { WorkspaceFlavour } from '@affine/env/workspace';\nimport { useI18n } from '@affine/i18n';\nimport {\n initEmptyPage,\n useLiveData,\n useService,\n WorkspacesService,\n} from '@toeverything/infra';\nimport { useSetAtom } from 'jotai';\nimport type { KeyboardEvent } from 'react';\nimport { useCallback, useLayoutEffect, useState } from 'react';\n\nimport { buildShowcaseWorkspace } from '../../../bootstrap/first-app-data';\nimport { AuthService } from '../../../modules/cloud';\nimport { _addLocalWorkspace } from '../../../modules/workspace-engine';\nimport { CloudSvg } from '../share-page-modal/cloud-svg';\nimport * as styles from './index.css';\n\ntype CreateWorkspaceStep =\n | 'set-db-location'\n | 'name-workspace'\n | 'set-syncing-mode';\n\nexport type CreateWorkspaceMode = 'add' | 'new' | false;\n\nconst logger = new DebugLogger('CreateWorkspaceModal');\n\ninterface ModalProps {\n mode: CreateWorkspaceMode; // false means not open\n onClose: () => void;\n onCreate: (id: string, defaultDocId?: string) => void;\n}\n\ninterface NameWorkspaceContentProps extends ConfirmModalProps {\n loading: boolean;\n onConfirmName: (\n name: string,\n workspaceFlavour: WorkspaceFlavour,\n avatar?: File\n ) => void;\n}\n\nconst shouldEnableCloud = !runtimeConfig.allowLocalWorkspace;\n\nconst NameWorkspaceContent = ({\n loading,\n onConfirmName,\n ...props\n}: NameWorkspaceContentProps) => {\n const t = useI18n();\n const [workspaceName, setWorkspaceName] = useState('');\n const [enable, setEnable] = useState(shouldEnableCloud);\n const session = useService(AuthService).session;\n const loginStatus = useLiveData(session.status$);\n\n const setOpenSignIn = useSetAtom(authAtom);\n\n const openSignInModal = useCallback(() => {\n setOpenSignIn(state => ({\n ...state,\n openModal: true,\n }));\n }, [setOpenSignIn]);\n\n const onSwitchChange = useCallback(\n (checked: boolean) => {\n if (loginStatus !== 'authenticated') {\n return openSignInModal();\n }\n return setEnable(checked);\n },\n [loginStatus, openSignInModal]\n );\n\n const handleCreateWorkspace = useCallback(() => {\n onConfirmName(\n workspaceName,\n enable ? WorkspaceFlavour.AFFINE_CLOUD : WorkspaceFlavour.LOCAL\n );\n }, [enable, onConfirmName, workspaceName]);\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent) => {\n if (event.key === 'Enter' && workspaceName) {\n handleCreateWorkspace();\n }\n },\n [handleCreateWorkspace, workspaceName]\n );\n\n // Currently, when we create a new workspace and upload an avatar at the same time,\n // an error occurs after the creation is successful: get blob 404 not found\n return (\n \n
\n \n
\n\n
\n
\n {t['com.arms.nameWorkspace.subtitle.workspace-name']()}\n
\n \n
\n
\n
{t['AFFiNE Cloud']()}
\n
\n
\n
\n {t['com.arms.nameWorkspace.affine-cloud.title']()}\n \n
\n
\n {t['com.arms.nameWorkspace.affine-cloud.description']()}\n
\n
\n
\n \n
\n
\n {shouldEnableCloud ? (\n \n {t['com.arms.nameWorkspace.affine-cloud.web-tips']()}\n \n ) : null}\n
\n \n );\n};\n\nexport const CreateWorkspaceModal = ({\n mode,\n onClose,\n onCreate,\n}: ModalProps) => {\n const [step, setStep] = useState();\n const t = useI18n();\n const workspacesService = useService(WorkspacesService);\n const [loading, setLoading] = useState(false);\n\n // TODO(@Peng): maybe refactor using xstate?\n useLayoutEffect(() => {\n let canceled = false;\n // if mode changed, reset step\n if (mode === 'add') {\n // a hack for now\n // when adding a workspace, we will immediately let user select a db file\n // after it is done, it will effectively add a new workspace to app-data folder\n // so after that, we will be able to load it via importLocalWorkspace\n (async () => {\n if (!apis) {\n return;\n }\n logger.info('load db file');\n setStep(undefined);\n const result = await apis.dialog.loadDBFile();\n if (result.workspaceId && !canceled) {\n _addLocalWorkspace(result.workspaceId);\n workspacesService.list.revalidate();\n onCreate(result.workspaceId);\n } else if (result.error || result.canceled) {\n if (result.error) {\n toast(t[result.error]());\n }\n onClose();\n }\n })().catch(err => {\n console.error(err);\n });\n } else if (mode === 'new') {\n setStep('name-workspace');\n } else {\n setStep(undefined);\n }\n return () => {\n canceled = true;\n };\n }, [mode, onClose, onCreate, t, workspacesService]);\n\n const onConfirmName = useAsyncCallback(\n async (name: string, workspaceFlavour: WorkspaceFlavour) => {\n track.$.$.$.createWorkspace({ flavour: workspaceFlavour });\n if (loading) return;\n setLoading(true);\n\n // this will be the last step for web for now\n // fix me later\n if (runtimeConfig.enablePreloading) {\n const { meta, defaultDocId } = await buildShowcaseWorkspace(\n workspacesService,\n workspaceFlavour,\n name\n );\n onCreate(meta.id, defaultDocId);\n } else {\n let defaultDocId: string | undefined = undefined;\n const { id } = await workspacesService.create(\n workspaceFlavour,\n async workspace => {\n workspace.meta.initialize();\n workspace.meta.setName(name);\n const page = workspace.createDoc();\n defaultDocId = page.id;\n initEmptyPage(page);\n }\n );\n onCreate(id, defaultDocId);\n }\n\n setLoading(false);\n },\n [loading, onCreate, workspacesService]\n );\n\n const onOpenChange = useCallback(\n (open: boolean) => {\n if (!open) {\n onClose();\n }\n },\n [onClose]\n );\n\n if (step === 'name-workspace') {\n return (\n \n );\n }\n\n return (\n \n
\n \n );\n};\n","import { cssVar } from '@toeverything/theme';\n\nexport default function TopSvg() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n","import { OverlayModal } from '@affine/component';\nimport { openHistoryTipsModalAtom } from '@affine/core/atoms';\nimport { useEnableCloud } from '@affine/core/hooks/affine/use-enable-cloud';\nimport { useI18n } from '@affine/i18n';\nimport { useService, WorkspaceService } from '@toeverything/infra';\nimport { useAtom } from 'jotai';\nimport { useCallback } from 'react';\n\nimport TopSvg from './top-svg';\n\nexport const HistoryTipsModal = () => {\n const t = useI18n();\n const currentWorkspace = useService(WorkspaceService).workspace;\n const [open, setOpen] = useAtom(openHistoryTipsModalAtom);\n const confirmEnableCloud = useEnableCloud();\n\n const handleConfirm = useCallback(() => {\n setOpen(false);\n confirmEnableCloud(currentWorkspace);\n }, [confirmEnableCloud, currentWorkspace, setOpen]);\n\n return (\n }\n title={t['com.arms.history-vision.tips-modal.title']()}\n onOpenChange={setOpen}\n description={t['com.arms.history-vision.tips-modal.description']()}\n cancelText={t['com.arms.history-vision.tips-modal.cancel']()}\n confirmButtonOptions={{\n variant: 'primary',\n }}\n onConfirm={handleConfirm}\n confirmText={t['com.arms.history-vision.tips-modal.confirm']()}\n />\n );\n};\n","import { OverlayModal } from '@affine/component';\nimport { openIssueFeedbackModalAtom } from '@affine/core/atoms';\nimport { useI18n } from '@affine/i18n';\nimport { useAtom } from 'jotai';\n\nexport const IssueFeedbackModal = () => {\n const t = useI18n();\n const [open, setOpen] = useAtom(openIssueFeedbackModalAtom);\n\n return (\n \n }\n title={t['com.arms.issue-feedback.title']()}\n onOpenChange={setOpen}\n description={t['com.arms.issue-feedback.description']()}\n cancelText={t['com.arms.issue-feedback.cancel']()}\n to={`${runtimeConfig.githubUrl}/issues/new/choose`}\n confirmText={t['com.arms.issue-feedback.confirm']()}\n confirmButtonOptions={{\n variant: 'primary',\n }}\n external\n />\n );\n};\n","import { ConfirmModal } from '@affine/component/ui/modal';\nimport { openQuotaModalAtom, openSettingModalAtom } from '@affine/core/atoms';\nimport { track } from '@affine/core/mixpanel';\nimport { UserQuotaService } from '@affine/core/modules/cloud';\nimport { WorkspacePermissionService } from '@affine/core/modules/permissions';\nimport { WorkspaceQuotaService } from '@affine/core/modules/quota';\nimport { useI18n } from '@affine/i18n';\nimport { useLiveData, useService, WorkspaceService } from '@toeverything/infra';\nimport bytes from 'bytes';\nimport { useAtom, useSetAtom } from 'jotai';\nimport { useCallback, useEffect, useMemo } from 'react';\n\nexport const CloudQuotaModal = () => {\n const t = useI18n();\n const currentWorkspace = useService(WorkspaceService).workspace;\n const [open, setOpen] = useAtom(openQuotaModalAtom);\n const workspaceQuotaService = useService(WorkspaceQuotaService);\n useEffect(() => {\n workspaceQuotaService.quota.revalidate();\n }, [workspaceQuotaService]);\n const workspaceQuota = useLiveData(workspaceQuotaService.quota.quota$);\n const permissionService = useService(WorkspacePermissionService);\n const isOwner = useLiveData(permissionService.permission.isOwner$);\n useEffect(() => {\n // revalidate permission\n permissionService.permission.revalidate();\n }, [permissionService]);\n\n const quotaService = useService(UserQuotaService);\n const userQuota = useLiveData(\n quotaService.quota.quota$.map(q =>\n q\n ? {\n name: q.humanReadable.name,\n blobLimit: q.humanReadable.blobLimit,\n }\n : null\n )\n );\n\n const isFreePlanOwner = useMemo(() => {\n return isOwner && userQuota?.name === 'free';\n }, [isOwner, userQuota]);\n\n const setSettingModalAtom = useSetAtom(openSettingModalAtom);\n const handleUpgradeConfirm = useCallback(() => {\n setSettingModalAtom({\n open: true,\n activeTab: 'plans',\n scrollAnchor: 'cloudPricingPlan',\n });\n\n track.$.paywall.storage.viewPlans();\n setOpen(false);\n }, [setOpen, setSettingModalAtom]);\n\n const description = useMemo(() => {\n if (userQuota && isFreePlanOwner) {\n return t['com.arms.payment.blob-limit.description.owner.free']({\n planName: userQuota.name,\n currentQuota: userQuota.blobLimit,\n upgradeQuota: '100MB',\n });\n }\n if (isOwner && userQuota && userQuota.name.toLowerCase() === 'pro') {\n return t['com.arms.payment.blob-limit.description.owner.pro']({\n planName: userQuota.name,\n quota: userQuota.blobLimit,\n });\n }\n if (workspaceQuota) {\n return t['com.arms.payment.blob-limit.description.member']({\n quota: workspaceQuota.humanReadable.blobLimit,\n });\n } else {\n // loading\n return null;\n }\n }, [userQuota, isFreePlanOwner, isOwner, workspaceQuota, t]);\n\n useEffect(() => {\n if (!workspaceQuota) {\n return;\n }\n currentWorkspace.engine.blob.singleBlobSizeLimit = bytes.parse(\n workspaceQuota.blobLimit.toString()\n );\n\n const disposable = currentWorkspace.engine.blob.onAbortLargeBlob.on(() => {\n setOpen(true);\n });\n return () => {\n disposable?.dispose();\n };\n }, [currentWorkspace.engine.blob, setOpen, workspaceQuota]);\n\n return (\n \n );\n};\n","import { ConfirmModal } from '@affine/component/ui/modal';\nimport { openQuotaModalAtom } from '@affine/core/atoms';\nimport { useI18n } from '@affine/i18n';\nimport { useService, WorkspaceService } from '@toeverything/infra';\nimport { useAtom } from 'jotai';\nimport { useCallback, useEffect } from 'react';\n\nexport const LocalQuotaModal = () => {\n const t = useI18n();\n const currentWorkspace = useService(WorkspaceService).workspace;\n const [open, setOpen] = useAtom(openQuotaModalAtom);\n\n const onConfirm = useCallback(() => {\n setOpen(false);\n }, [setOpen]);\n\n useEffect(() => {\n const disposable = currentWorkspace.engine.blob.onAbortLargeBlob.on(() => {\n setOpen(true);\n });\n return () => {\n disposable?.dispose();\n };\n }, [currentWorkspace.engine.blob.onAbortLargeBlob, setOpen]);\n\n return (\n \n );\n};\n","import type { HTMLAttributes, ReactNode } from 'react';\n\nimport { settingHeader } from './share.css';\n\ninterface SettingHeaderProps\n extends Omit, 'title'> {\n title: ReactNode;\n subtitle?: ReactNode;\n}\n\nexport const SettingHeader = ({\n title,\n subtitle,\n ...otherProps\n}: SettingHeaderProps) => {\n return (\n
\n
{title}
\n {subtitle ?
{subtitle}
: null}\n
\n );\n};\n","import \"../component/src/components/setting-components/share.css.ts.vanilla.css!=!../../../../../../node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\\\"fileName\\\":\\\"../component/src/components/setting-components/share.css.ts.vanilla.css\\\",\\\"source\\\":\\\"#H4sIAAAAAAAAA61U0W6jMBB8z1dYlU5qpDMCLqki92MqgxeyV2Mje2lIT/33kw0hJeHatLoHJLza3RnP7Dp52vxqjW5S9mfFWGGdAscLS2QbwbK2Z95qVOxFunvOZVWhAT5mlVZbt35cMdZKpdDU57qHtg/xRroazRTONyH8tkomzISQNEToyhriHl9BzMFivJAeIlI8HQDrPQn2kKYhpkPafowtYPiuOMOcqJJtBdsMNC/p74bwh4x6v77CPl07CnNRRNAT91Bao6Q7TtqdiWb/04B8c5MBmdDSE7cVp2MLSwSMNbAEkC50T+fXudVb39zmbLb7srpXFAeHzizzSO9Spe0nQK3DZg4zquakws6PA/QOJaGDDdkRTaFvtTwKVmmIOL87T1iFdobAkGC+lSXwAugAYEKG1FgbjgSNF6wEQ+Bm/a9t/MiaPFHoZaFBDRthPRJaI5gDLQlfYDlZCFkRuFgzUb27e5y1kIW3uqM4MxoqGiclblv8O6CivWBZmv4Ix8nc8VzI8rl2tjOKj/K7upD3+Xb78/SlyXY99zAJSJO+QVbBssH9ns8Alzy5ruZ+79A8T1M+Ndld9GCJkc2i4PkNT8g/B3+GoMCXny/R+Bx96+XJWeIC+hcmNKoERr1/Gga7s3F5LnV8+wvnhGWuaQYAAA==\\\"}!../../../../../../node_modules/@vanilla-extract/webpack-plugin/extracted.js\"\nexport var settingHeader = '_43pnlm0';\nexport var settingRow = '_43pnlm2';\nexport var wrapper = '_43pnlm1';","import clsx from 'clsx';\nimport type { CSSProperties, PropsWithChildren, ReactNode } from 'react';\n\nimport { settingRow } from './share.css';\n\nexport type SettingRowProps = PropsWithChildren<{\n name: ReactNode;\n desc: ReactNode;\n style?: CSSProperties;\n onClick?: () => void;\n spreadCol?: boolean;\n 'data-testid'?: string;\n disabled?: boolean;\n className?: string;\n}>;\n\nexport const SettingRow = ({\n name,\n desc,\n children,\n onClick,\n style,\n spreadCol = true,\n disabled = false,\n className,\n ...props\n}: PropsWithChildren) => {\n return (\n \n
\n
{name}
\n
{desc}
\n
\n {spreadCol ?
{children}
: children}\n \n );\n};\n","import type { PropsWithChildren, ReactNode } from 'react';\n\nimport { wrapper } from './share.css';\n\ninterface SettingWrapperProps {\n title?: ReactNode;\n}\n\nexport const SettingWrapper = ({\n title,\n children,\n}: PropsWithChildren) => {\n return (\n
\n {title ?
{title}
: null}\n {children}\n
\n );\n};\n","import { Skeleton } from '../../ui/skeleton';\nimport { SettingHeader } from './setting-header';\nimport { SettingRow } from './setting-row';\nimport { SettingWrapper } from './wrapper';\n\nexport const WorkspaceDetailSkeleton = () => {\n return (\n <>\n } subtitle={} />\n\n {Array.from({ length: 3 }, (_, index) => (\n } key={index}>\n }\n desc={}\n spreadCol={false}\n >\n \n ))}\n \n );\n};\n","import { FlexWrapper } from '../../ui/layout';\nimport { Skeleton } from '../../ui/skeleton';\n\nexport const WorkspaceListItemSkeleton = () => {\n return (\n \n \n \n \n );\n};\n\nexport const WorkspaceListSkeleton = () => {\n return (\n <>\n {Array.from({ length: 5 }, (_, index) => (\n \n ))}\n \n );\n};\n","import { Button } from '@affine/component/ui/button';\nimport { useI18n } from '@affine/i18n';\nimport type { ChangeEvent, PropsWithChildren } from 'react';\nimport { useRef } from 'react';\n\nexport interface UploadProps {\n uploadType?: string;\n accept?: string;\n fileChange: (file: File) => void;\n disabled?: boolean;\n}\n\nexport const Upload = ({\n fileChange,\n accept,\n children,\n disabled,\n ...props\n}: PropsWithChildren) => {\n const t = useI18n();\n const input_ref = useRef(null);\n const _chooseFile = () => {\n if (input_ref.current) {\n input_ref.current.click();\n }\n };\n const _handleInputChange = (e: ChangeEvent) => {\n const files = e.target.files;\n if (!files) {\n return;\n }\n const file = files[0];\n fileChange(file);\n if (input_ref.current) {\n input_ref.current.value = '';\n }\n };\n\n if (disabled) {\n return children ?? ;\n }\n\n return (\n
\n {children ?? }\n \n
\n );\n};\n","import { Button, type ButtonProps, useConfirmModal } from '@affine/component';\nimport { useDowngradeNotify } from '@affine/core/components/affine/subscription-landing/notify';\nimport { getDowngradeQuestionnaireLink } from '@affine/core/hooks/affine/use-subscription-notify';\nimport { useAsyncCallback } from '@affine/core/hooks/affine-async-hooks';\nimport { track } from '@affine/core/mixpanel';\nimport { AuthService, SubscriptionService } from '@affine/core/modules/cloud';\nimport { SubscriptionPlan } from '@affine/graphql';\nimport { useI18n } from '@affine/i18n';\nimport { useService } from '@toeverything/infra';\nimport { nanoid } from 'nanoid';\nimport { useState } from 'react';\n\nexport const AICancel = (btnProps: ButtonProps) => {\n const t = useI18n();\n const [isMutating, setMutating] = useState(false);\n const [idempotencyKey, setIdempotencyKey] = useState(nanoid());\n const subscription = useService(SubscriptionService).subscription;\n const authService = useService(AuthService);\n\n const { openConfirmModal } = useConfirmModal();\n const downgradeNotify = useDowngradeNotify();\n\n const cancel = useAsyncCallback(async () => {\n const aiSubscription = subscription.ai$.value;\n if (aiSubscription) {\n track.$.settingsPanel.plans.cancelSubscription({\n plan: SubscriptionPlan.AI,\n recurring: aiSubscription.recurring,\n });\n }\n openConfirmModal({\n title: t['com.arms.payment.ai.action.cancel.confirm.title'](),\n description: t['com.arms.payment.ai.action.cancel.confirm.description'](),\n reverseFooter: true,\n confirmText:\n t['com.arms.payment.ai.action.cancel.confirm.confirm-text'](),\n confirmButtonOptions: {\n variant: 'secondary',\n },\n cancelText: t['com.arms.payment.ai.action.cancel.confirm.cancel-text'](),\n cancelButtonOptions: {\n variant: 'primary',\n },\n onConfirm: async () => {\n try {\n setMutating(true);\n await subscription.cancelSubscription(\n idempotencyKey,\n SubscriptionPlan.AI\n );\n setIdempotencyKey(nanoid());\n track.$.settingsPanel.plans.confirmCancelingSubscription({\n plan: SubscriptionPlan.AI,\n recurring: aiSubscription?.recurring,\n });\n const account = authService.session.account$.value;\n const prevRecurring = subscription.ai$.value?.recurring;\n if (account && prevRecurring) {\n downgradeNotify(\n getDowngradeQuestionnaireLink({\n email: account.email,\n name: account.info?.name,\n id: account.id,\n plan: SubscriptionPlan.AI,\n recurring: prevRecurring,\n })\n );\n }\n } finally {\n setMutating(false);\n }\n },\n });\n }, [\n subscription,\n openConfirmModal,\n t,\n idempotencyKey,\n authService.session.account$.value,\n downgradeNotify,\n ]);\n\n return (\n \n {t['com.arms.payment.ai.action.cancel.button-label']()}\n \n );\n};\n","import { Button, type ButtonProps } from '@affine/component';\nimport { authAtom } from '@affine/core/atoms';\nimport { useI18n } from '@affine/i18n';\nimport { useSetAtom } from 'jotai';\nimport { useCallback } from 'react';\n\nexport const AILogin = (btnProps: ButtonProps) => {\n const t = useI18n();\n const setOpen = useSetAtom(authAtom);\n\n const onClickSignIn = useCallback(() => {\n setOpen(state => ({\n ...state,\n openModal: true,\n }));\n }, [setOpen]);\n\n return (\n \n );\n};\n","import {\n Button,\n type ButtonProps,\n notify,\n useConfirmModal,\n} from '@affine/component';\nimport { useAsyncCallback } from '@affine/core/hooks/affine-async-hooks';\nimport { track } from '@affine/core/mixpanel';\nimport { SubscriptionService } from '@affine/core/modules/cloud';\nimport { SubscriptionPlan } from '@affine/graphql';\nimport { useI18n } from '@affine/i18n';\nimport { SingleSelectSelectSolidIcon } from '@blocksuite/icons/rc';\nimport { useService } from '@toeverything/infra';\nimport { cssVar } from '@toeverything/theme';\nimport { nanoid } from 'nanoid';\nimport { useState } from 'react';\n\nexport const AIResume = (btnProps: ButtonProps) => {\n const t = useI18n();\n const [idempotencyKey, setIdempotencyKey] = useState(nanoid());\n const subscription = useService(SubscriptionService).subscription;\n\n const [isMutating, setIsMutating] = useState(false);\n\n const { openConfirmModal } = useConfirmModal();\n\n const resume = useAsyncCallback(async () => {\n const aiSubscription = subscription.ai$.value;\n if (aiSubscription) {\n track.$.settingsPanel.plans.resumeSubscription({\n plan: SubscriptionPlan.AI,\n recurring: aiSubscription.recurring,\n });\n }\n\n openConfirmModal({\n title: t['com.arms.payment.ai.action.resume.confirm.title'](),\n description: t['com.arms.payment.ai.action.resume.confirm.description'](),\n confirmText:\n t['com.arms.payment.ai.action.resume.confirm.confirm-text'](),\n confirmButtonOptions: {\n variant: 'primary',\n },\n cancelText: t['com.arms.payment.ai.action.resume.confirm.cancel-text'](),\n onConfirm: async () => {\n setIsMutating(true);\n await subscription.resumeSubscription(\n idempotencyKey,\n SubscriptionPlan.AI\n );\n if (aiSubscription) {\n track.$.settingsPanel.plans.confirmResumingSubscription({\n plan: aiSubscription.plan,\n recurring: aiSubscription.recurring,\n });\n }\n notify({\n icon: ,\n iconColor: cssVar('processingColor'),\n title: t['com.arms.payment.ai.action.resume.confirm.notify.title'](),\n message: t['com.arms.payment.ai.action.resume.confirm.notify.msg'](),\n });\n setIdempotencyKey(nanoid());\n },\n });\n }, [subscription, openConfirmModal, t, idempotencyKey]);\n\n return (\n \n {t['com.arms.payment.ai.action.resume.button-label']()}\n \n );\n};\n","import { Button, type ButtonProps, Skeleton } from '@affine/component';\nimport { generateSubscriptionCallbackLink } from '@affine/core/hooks/affine/use-subscription-notify';\nimport { useAsyncCallback } from '@affine/core/hooks/affine-async-hooks';\nimport { track } from '@affine/core/mixpanel';\nimport { AuthService, SubscriptionService } from '@affine/core/modules/cloud';\nimport { popupWindow } from '@affine/core/utils';\nimport { SubscriptionPlan, SubscriptionRecurring } from '@affine/graphql';\nimport { useI18n } from '@affine/i18n';\nimport { useLiveData, useService } from '@toeverything/infra';\nimport { nanoid } from 'nanoid';\nimport { useEffect, useState } from 'react';\n\nexport interface AISubscribeProps extends ButtonProps {\n displayedFrequency?: 'yearly' | 'monthly';\n}\n\nexport const AISubscribe = ({\n displayedFrequency = 'yearly',\n ...btnProps\n}: AISubscribeProps) => {\n const [idempotencyKey, setIdempotencyKey] = useState(nanoid());\n const [isMutating, setMutating] = useState(false);\n const [isOpenedExternalWindow, setOpenedExternalWindow] = useState(false);\n const authService = useService(AuthService);\n\n const subscriptionService = useService(SubscriptionService);\n const price = useLiveData(subscriptionService.prices.aiPrice$);\n useEffect(() => {\n subscriptionService.prices.revalidate();\n }, [subscriptionService]);\n\n const t = useI18n();\n\n useEffect(() => {\n if (isOpenedExternalWindow) {\n // when the external window is opened, revalidate the subscription when window get focus\n window.addEventListener(\n 'focus',\n subscriptionService.subscription.revalidate\n );\n return () => {\n window.removeEventListener(\n 'focus',\n subscriptionService.subscription.revalidate\n );\n };\n }\n return;\n }, [isOpenedExternalWindow, subscriptionService]);\n\n const subscribe = useAsyncCallback(async () => {\n setMutating(true);\n track.$.settingsPanel.plans.checkout({\n plan: SubscriptionPlan.AI,\n recurring: SubscriptionRecurring.Yearly,\n });\n try {\n const session = await subscriptionService.createCheckoutSession({\n recurring: SubscriptionRecurring.Yearly,\n idempotencyKey,\n plan: SubscriptionPlan.AI,\n coupon: null,\n successCallbackLink: generateSubscriptionCallbackLink(\n authService.session.account$.value,\n SubscriptionPlan.AI,\n SubscriptionRecurring.Yearly\n ),\n });\n popupWindow(session);\n setOpenedExternalWindow(true);\n setIdempotencyKey(nanoid());\n } finally {\n setMutating(false);\n }\n }, [authService, idempotencyKey, subscriptionService]);\n\n if (!price || !price.yearlyAmount) {\n return (\n \n );\n }\n\n const priceReadable = `$${(\n price.yearlyAmount /\n 100 /\n (displayedFrequency === 'yearly' ? 1 : 12)\n ).toFixed(2)}`;\n const priceFrequency =\n displayedFrequency === 'yearly'\n ? t['com.arms.payment.billing-setting.year']()\n : t['com.arms.payment.billing-setting.month']();\n\n return (\n \n {btnProps.children ?? `${priceReadable} / ${priceFrequency}`}\n {displayedFrequency === 'monthly' ? (\n \n {t['com.arms.payment.ai.subscribe.billed-annually']()}\n \n ) : null}\n \n );\n};\n","import \"../core/src/components/affine/setting-modal/account-setting/storage-progress.css.ts.vanilla.css!=!../../../../../../../../node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\\\"fileName\\\":\\\"../core/src/components/affine/setting-modal/account-setting/storage-progress.css.ts.vanilla.css\\\",\\\"source\\\":\\\"Lnhod25hZjAgewogIGRpc3BsYXk6IGZsZXg7CiAganVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuOwogIGFsaWduLWl0ZW1zOiBjZW50ZXI7Cn0KLnhod25hZjEgewogIGZsZXgtZ3JvdzogMTsKICBtYXJnaW4tcmlnaHQ6IDIwcHg7Cn0KLnhod25hZjEgLnN0b3JhZ2UtcHJvZ3Jlc3MtZGVzYyB7CiAgZm9udC1zaXplOiB2YXIoLS1hZmZpbmUtZm9udC14cyk7CiAgY29sb3I6IHZhcigtLWFmZmluZS10ZXh0LXNlY29uZGFyeS1jb2xvcik7CiAgaGVpZ2h0OiAyMHB4OwogIGRpc3BsYXk6IGZsZXg7CiAganVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuOwogIGFsaWduLWl0ZW1zOiBjZW50ZXI7CiAgbWFyZ2luLWJvdHRvbTogMnB4Owp9Ci54aHduYWYxIC5zdG9yYWdlLXByb2dyZXNzLWJhci13cmFwcGVyIHsKICBoZWlnaHQ6IDhweDsKICBib3JkZXItcmFkaXVzOiA0cHg7CiAgYmFja2dyb3VuZC1jb2xvcjogdmFyKC0tYWZmaW5lLWJsYWNrLTEwKTsKICBvdmVyZmxvdzogaGlkZGVuOwp9Ci54aHduYWYyIHsKICBoZWlnaHQ6IDEwMCU7Cn0=\\\"}!../../../../../../../../node_modules/@vanilla-extract/webpack-plugin/extracted.js\"\nexport var storageProgressBar = 'xhwnaf2';\nexport var storageProgressContainer = 'xhwnaf0';\nexport var storageProgressWrapper = 'xhwnaf1';","import { Button, ErrorMessage, Skeleton } from '@affine/component';\nimport { SettingRow } from '@affine/component/setting-components';\nimport { openSettingModalAtom } from '@affine/core/atoms';\nimport { track } from '@affine/core/mixpanel';\nimport {\n ServerConfigService,\n SubscriptionService,\n UserCopilotQuotaService,\n} from '@affine/core/modules/cloud';\nimport { SubscriptionPlan } from '@affine/graphql';\nimport { useI18n } from '@affine/i18n';\nimport { useLiveData, useService } from '@toeverything/infra';\nimport { cssVar } from '@toeverything/theme';\nimport { useSetAtom } from 'jotai';\nimport { useCallback, useEffect } from 'react';\n\nimport { AIResume, AISubscribe } from '../general-setting/plans/ai/actions';\nimport * as styles from './storage-progress.css';\n\nexport const AIUsagePanel = () => {\n const t = useI18n();\n const setOpenSettingModal = useSetAtom(openSettingModalAtom);\n const serverConfigService = useService(ServerConfigService);\n const hasPaymentFeature = useLiveData(\n serverConfigService.serverConfig.features$.map(f => f?.payment)\n );\n const subscriptionService = useService(SubscriptionService);\n const aiSubscription = useLiveData(subscriptionService.subscription.ai$);\n useEffect(() => {\n // revalidate latest subscription status\n subscriptionService.subscription.revalidate();\n }, [subscriptionService]);\n const copilotQuotaService = useService(UserCopilotQuotaService);\n useEffect(() => {\n copilotQuotaService.copilotQuota.revalidate();\n }, [copilotQuotaService]);\n const copilotActionLimit = useLiveData(\n copilotQuotaService.copilotQuota.copilotActionLimit$\n );\n const copilotActionUsed = useLiveData(\n copilotQuotaService.copilotQuota.copilotActionUsed$\n );\n const loading = copilotActionLimit === null || copilotActionUsed === null;\n const loadError = useLiveData(copilotQuotaService.copilotQuota.error$);\n\n const openBilling = useCallback(() => {\n setOpenSettingModal({\n open: true,\n activeTab: 'billing',\n });\n track.$.settingsPanel.accountUsage.viewPlans({ plan: SubscriptionPlan.AI });\n }, [setOpenSettingModal]);\n\n if (loading) {\n if (loadError) {\n return (\n \n {/* TODO(@catsjuice): i18n */}\n Load error\n \n );\n }\n return (\n \n \n \n );\n }\n\n const percent =\n copilotActionLimit === 'unlimited'\n ? 0\n : Math.min(\n 100,\n Math.max(\n 0.5,\n Number(((copilotActionUsed / copilotActionLimit) * 100).toFixed(4))\n )\n );\n\n const color = percent > 80 ? cssVar('errorColor') : cssVar('processingColor');\n\n return (\n \n {copilotActionLimit === 'unlimited' ? (\n hasPaymentFeature && aiSubscription?.canceledAt ? (\n \n ) : (\n \n )\n ) : (\n
\n
\n
\n {t['com.arms.payment.ai.usage.used-caption']()}\n \n {t['com.arms.payment.ai.usage.used-detail']({\n used: copilotActionUsed.toString(),\n limit: copilotActionLimit.toString(),\n })}\n \n
\n\n
\n
\n
\n
\n\n {hasPaymentFeature && (\n \n {t['com.arms.payment.ai.usage.purchase-button-label']()}\n \n )}\n \n )}\n \n );\n};\n","import { Button, ErrorMessage, Skeleton, Tooltip } from '@affine/component';\nimport { useI18n } from '@affine/i18n';\nimport { useLiveData, useService } from '@toeverything/infra';\nimport { cssVar } from '@toeverything/theme';\nimport { useEffect, useMemo } from 'react';\n\nimport {\n ServerConfigService,\n SubscriptionService,\n UserQuotaService,\n} from '../../../../modules/cloud';\nimport * as styles from './storage-progress.css';\n\nexport interface StorageProgressProgress {\n upgradable?: boolean;\n onUpgrade: () => void;\n}\n\nenum ButtonType {\n Primary = 'primary',\n Default = 'secondary',\n}\n\nexport const StorageProgress = ({ onUpgrade }: StorageProgressProgress) => {\n const t = useI18n();\n const quota = useService(UserQuotaService).quota;\n\n useEffect(() => {\n // revalidate quota to get the latest status\n quota.revalidate();\n }, [quota]);\n const color = useLiveData(quota.color$);\n const usedFormatted = useLiveData(quota.usedFormatted$);\n const maxFormatted = useLiveData(quota.maxFormatted$);\n const percent = useLiveData(quota.percent$);\n\n const serverConfigService = useService(ServerConfigService);\n const hasPaymentFeature = useLiveData(\n serverConfigService.serverConfig.features$.map(f => f?.payment)\n );\n const subscription = useService(SubscriptionService).subscription;\n useEffect(() => {\n // revalidate subscription to get the latest status\n subscription.revalidate();\n }, [subscription]);\n\n const proSubscription = useLiveData(subscription.pro$);\n const isFreeUser = !proSubscription;\n const quotaName = useLiveData(\n quota.quota$.map(q => (q !== null ? q?.humanReadable.name : null))\n );\n\n const loading =\n proSubscription === null || percent === null || quotaName === null;\n const loadError = useLiveData(quota.error$);\n\n const buttonType = useMemo(() => {\n if (isFreeUser) {\n return ButtonType.Primary;\n }\n return ButtonType.Default;\n }, [isFreeUser]);\n\n if (loading) {\n if (loadError) {\n // TODO(@catsjuice): i18n\n return Load error;\n }\n return ;\n }\n\n return (\n
\n
\n
\n {t['com.arms.storage.used.hint']()}\n \n {usedFormatted}/{maxFormatted}\n {` (${quotaName} ${t['com.arms.storage.plan']()})`}\n \n
\n\n
\n
\n
\n
\n\n {hasPaymentFeature ? (\n \n \n \n \n \n ) : null}\n \n );\n};\n","import { FlexWrapper, Input, notify } from '@affine/component';\nimport {\n SettingHeader,\n SettingRow,\n} from '@affine/component/setting-components';\nimport { Avatar } from '@affine/component/ui/avatar';\nimport { Button } from '@affine/component/ui/button';\nimport { useAsyncCallback } from '@affine/core/hooks/affine-async-hooks';\nimport { useCatchEventCallback } from '@affine/core/hooks/use-catch-event-hook';\nimport { track } from '@affine/core/mixpanel';\nimport { SubscriptionPlan } from '@affine/graphql';\nimport { useI18n } from '@affine/i18n';\nimport { ArrowRightSmallIcon, CameraIcon } from '@blocksuite/icons/rc';\nimport {\n useEnsureLiveData,\n useLiveData,\n useService,\n useServices,\n} from '@toeverything/infra';\nimport { useSetAtom } from 'jotai';\nimport type { FC } from 'react';\nimport { useCallback, useEffect, useState } from 'react';\n\nimport {\n authAtom,\n openSettingModalAtom,\n openSignOutModalAtom,\n} from '../../../../atoms';\nimport { AuthService, ServerConfigService } from '../../../../modules/cloud';\nimport { Upload } from '../../../pure/file-upload';\nimport { AIUsagePanel } from './ai-usage-panel';\nimport { StorageProgress } from './storage-progress';\nimport * as styles from './style.css';\n\nexport const UserAvatar = () => {\n const t = useI18n();\n const session = useService(AuthService).session;\n const account = useEnsureLiveData(session.account$);\n\n const handleUpdateUserAvatar = useAsyncCallback(\n async (file: File) => {\n try {\n track.$.settingsPanel.accountSettings.uploadAvatar();\n await session.uploadAvatar(file);\n notify.success({ title: 'Update user avatar success' });\n } catch (e) {\n // TODO(@catsjuice): i18n\n notify.error({\n title: 'Update user avatar failed',\n message: String(e),\n });\n }\n },\n [session]\n );\n\n const handleRemoveUserAvatar = useCatchEventCallback(async () => {\n track.$.settingsPanel.accountSettings.removeAvatar();\n await session.removeAvatar();\n }, [session]);\n\n return (\n \n }\n onRemove={account.avatar ? handleRemoveUserAvatar : undefined}\n avatarTooltipOptions={{ content: t['Click to replace photo']() }}\n removeTooltipOptions={{ content: t['Remove photo']() }}\n data-testid=\"user-setting-avatar\"\n removeButtonProps={{\n ['data-testid' as string]: 'user-setting-remove-avatar-button',\n }}\n />\n \n );\n};\n\nexport const AvatarAndName = () => {\n const t = useI18n();\n const session = useService(AuthService).session;\n const account = useEnsureLiveData(session.account$);\n const [input, setInput] = useState(account.label);\n\n const allowUpdate = !!input && input !== account.label;\n const handleUpdateUserName = useAsyncCallback(async () => {\n if (account === null) {\n return;\n }\n if (!allowUpdate) {\n return;\n }\n\n try {\n track.$.settingsPanel.accountSettings.updateUserName();\n await session.updateLabel(input);\n } catch (e) {\n notify.error({\n title: 'Failed to update user name.',\n message: String(e),\n });\n }\n }, [account, allowUpdate, session, input]);\n\n return (\n \n \n \n\n
\n \n \n \n {allowUpdate ? (\n \n {t['com.arms.editCollection.save']()}\n \n ) : null}\n \n
\n
\n \n );\n};\n\nconst StoragePanel = () => {\n const t = useI18n();\n\n const setSettingModalAtom = useSetAtom(openSettingModalAtom);\n const onUpgrade = useCallback(() => {\n track.$.settingsPanel.accountUsage.viewPlans({\n plan: SubscriptionPlan.Pro,\n });\n setSettingModalAtom({\n open: true,\n activeTab: 'plans',\n scrollAnchor: 'cloudPricingPlan',\n });\n }, [setSettingModalAtom]);\n\n return (\n \n \n \n );\n};\n\nexport const AccountSetting: FC = () => {\n const { authService, serverConfigService } = useServices({\n AuthService,\n ServerConfigService,\n });\n const serverFeatures = useLiveData(\n serverConfigService.serverConfig.features$\n );\n const t = useI18n();\n const session = authService.session;\n useEffect(() => {\n session.revalidate();\n }, [session]);\n const account = useEnsureLiveData(session.account$);\n const setAuthModal = useSetAtom(authAtom);\n const setSignOutModal = useSetAtom(openSignOutModalAtom);\n\n const onChangeEmail = useCallback(() => {\n setAuthModal({\n openModal: true,\n state: 'sendEmail',\n email: account.email,\n emailType: account.info?.emailVerified ? 'changeEmail' : 'verifyEmail',\n });\n }, [account.email, account.info?.emailVerified, setAuthModal]);\n\n const onPasswordButtonClick = useCallback(() => {\n setAuthModal({\n openModal: true,\n state: 'sendEmail',\n email: account.email,\n emailType: account.info?.hasPassword ? 'changePassword' : 'setPassword',\n });\n }, [account.email, account.info?.hasPassword, setAuthModal]);\n\n const onOpenSignOutModal = useCallback(() => {\n setSignOutModal(true);\n }, [setSignOutModal]);\n\n return (\n <>\n \n \n \n \n \n \n \n \n \n {serverFeatures?.copilot && }\n \n \n \n {/**/}\n {/* {t['com.arms.setting.account.delete']()}*/}\n {/* */}\n {/* }*/}\n {/* desc={t['com.arms.setting.account.delete.message']()}*/}\n {/* style={{ cursor: 'pointer' }}*/}\n {/* onClick={useCallback(() => {*/}\n {/* toast('Function coming soon');*/}\n {/* }, [])}*/}\n {/* testId=\"delete-account-button\"*/}\n {/*>*/}\n {/* */}\n {/**/}\n \n );\n};\n","import \"../core/src/components/affine/setting-modal/account-setting/style.css.ts.vanilla.css!=!../../../../../../../../node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\\\"fileName\\\":\\\"../core/src/components/affine/setting-modal/account-setting/style.css.ts.vanilla.css\\\",\\\"source\\\":\\\"Ll82bWZ0cTMwIHsKICBtYXJnaW4tbGVmdDogMjBweDsKfQouXzZtZnRxMzAgbGFiZWwgewogIGRpc3BsYXk6IGJsb2NrOwogIGZvbnQtc2l6ZTogdmFyKC0tYWZmaW5lLWZvbnQteHMpOwogIGNvbG9yOiB2YXIoLS1hZmZpbmUtdGV4dC1zZWNvbmRhcnktY29sb3IpOwogIG1hcmdpbi1ib3R0b206IDRweDsKfQouXzZtZnRxMzEgewogIHdpZHRoOiA1NnB4OwogIGhlaWdodDogNTZweDsKICBib3JkZXItcmFkaXVzOiA1MCU7CiAgcG9zaXRpb246IHJlbGF0aXZlOwogIGN1cnNvcjogcG9pbnRlcjsKICBmbGV4LXNocmluazogMDsKfQouXzZtZnRxMzEuZGlzYWJsZSB7CiAgY3Vyc29yOiBkZWZhdWx0OwogIHBvaW50ZXItZXZlbnRzOiBub25lOwp9Ci5fNm1mdHEzMTpob3ZlciAuY2FtZXJhLWljb24td3JhcHBlciB7CiAgZGlzcGxheTogZmxleDsKfQouXzZtZnRxMzEgLmNhbWVyYS1pY29uLXdyYXBwZXIgewogIHdpZHRoOiA1NnB4OwogIGhlaWdodDogNTZweDsKICBib3JkZXItcmFkaXVzOiA1MCU7CiAgcG9zaXRpb246IGFic29sdXRlOwogIGRpc3BsYXk6IG5vbmU7CiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7CiAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICBiYWNrZ3JvdW5kLWNvbG9yOiByZ2JhKDYwLCA2MSwgNjMsIDAuNSk7CiAgei1pbmRleDogMTsKICBjb2xvcjogdmFyKC0tYWZmaW5lLXdoaXRlKTsKICBmb250LXNpemU6IHZhcigtLWFmZmluZS1mb250LWgtNCk7Cn0=\\\"}!../../../../../../../../node_modules/@vanilla-extract/webpack-plugin/extracted.js\"\nexport var avatarWrapper = '_6mftq31';\nexport var profileInputWrapper = '_6mftq30';","import { atom } from 'jotai';\n\nexport const settingModalScrollContainerAtom = atom(null);\n","import {\n DiscordIcon,\n GithubIcon,\n RedditIcon,\n TelegramIcon,\n TwitterIcon,\n YouTubeIcon,\n} from './icons';\n\nexport const relatedLinks = [\n {\n icon: ,\n title: 'GitHub',\n link: 'https://github.com/toeverything/AFFiNE',\n },\n {\n icon: ,\n title: 'X',\n link: 'https://twitter.com/AffineOfficial',\n },\n {\n icon: ,\n title: 'Discord',\n link: 'https://discord.gg/whd5mjYqVw',\n },\n {\n icon: ,\n title: 'YouTube',\n link: 'https://www.youtube.com/@affinepro',\n },\n {\n icon: ,\n title: 'Telegram',\n link: 'https://t.me/affineworkos',\n },\n {\n icon: ,\n title: 'Reddit',\n link: 'https://www.reddit.com/r/Affine/',\n },\n];\n","// The icons here have been specially adjusted, theyโ€™re different from the ones in the @blocksuite/icons/rc.\n\nexport { TwitterIcon } from '@blocksuite/icons/rc';\nexport const LogoIcon = () => {\n return (\n \n \n \n );\n};\nexport const DocIcon = () => {\n return (\n \n \n \n );\n};\n\nexport const GithubIcon = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n );\n};\nexport const DiscordIcon = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport const TelegramIcon = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport const RedditIcon = () => {\n return (\n \n \n \n \n );\n};\n\nexport const LinkIcon = () => {\n return (\n \n \n \n );\n};\nexport const YouTubeIcon = () => {\n return (\n \n \n \n \n );\n};\n","import \"../core/src/components/affine/setting-modal/general-setting/about/style.css.ts.vanilla.css!=!../../../../../../../../../node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\\\"fileName\\\":\\\"../core/src/components/affine/setting-modal/general-setting/about/style.css.ts.vanilla.css\\\",\\\"source\\\":\\\"#H4sIAAAAAAAAA5WTy47bMAxF9/kKbgboLGTYbiYoNB9TKBbtsJUlQWJeU/TfC8mvOMgEnUVghOIlD8Wr4ufO1O5jV8KfDcABqTuwhOqHv7xvADRFb9RVQmswB5Shzgpi7KOEBi1jSOHGGRcknFT4JoRqW7IoGC8sfKBehavICa8ptXWWRaQPvEsf4v2Scx5ZdmWZYr0KHVmxd8yul1DVifDvppj4pVGRhWsFXz3mYe4U5SodCmqczXmP4NPh/0LvVcTXG0SDLUt4W/NVudV8n10gnSTpKxh7bxRjanjsbZRQvb08+mWF8hLql9vada69d0FjEEFpOkYJ4waHqITKXyA6Q3o9wChaJv3CJptjiCnXO5p84JXWZDsJO38ZCG4p46nLpGfSfJBQbwfEyXTT//mS9sY1v5eLlVCCOrKD+r6wz2WfLukSM3MeJZt4se9S6funfsi6iI2z+gt2HpvOA5E1+ez5Y/p1jExtamIZLQ+PT0RWgVewhWqYTvicGXt/UJHijHxbAENw4VN9Pn2kmxc5Gj4M+9uu17IdlpLYNQVsmJyVENxZBDxhiLhKLvjsUq8senwDaPW6fpEbz6rRfOP7K2/8OBHWZUb8B2crUfT0BAAA\\\"}!../../../../../../../../../node_modules/@vanilla-extract/webpack-plugin/extracted.js\"\nexport var appImageRow = '_6l2oz64';\nexport var checkUpdateDesc = '_6l2oz63';\nexport var communityItem = '_6l2oz62';\nexport var communityWrapper = '_6l2oz61';\nexport var link = '_6l2oz60';","import { Loading } from '@affine/component';\nimport { SettingRow } from '@affine/component/setting-components';\nimport { Button } from '@affine/component/ui/button';\nimport { useAsyncCallback } from '@affine/core/hooks/affine-async-hooks';\nimport { useAppUpdater } from '@affine/core/hooks/use-app-updater';\nimport { useI18n } from '@affine/i18n';\nimport clsx from 'clsx';\nimport { useCallback, useMemo, useState } from 'react';\n\nimport * as styles from './style.css';\n\nenum CheckUpdateStatus {\n UNCHECK = 'uncheck',\n LATEST = 'latest',\n UPDATE_AVAILABLE = 'update-available',\n ERROR = 'error',\n}\n\nconst useUpdateStatusLabels = (checkUpdateStatus: CheckUpdateStatus) => {\n const t = useI18n();\n const { updateAvailable, downloadProgress, updateReady, checkingForUpdates } =\n useAppUpdater();\n\n const buttonLabel = useMemo(() => {\n if (updateReady) {\n return t['com.arms.aboutAFFiNE.checkUpdate.button.restart']();\n }\n if (updateAvailable && downloadProgress === null) {\n return t['com.arms.aboutAFFiNE.checkUpdate.button.download']();\n }\n if (\n checkUpdateStatus === CheckUpdateStatus.LATEST ||\n checkUpdateStatus === CheckUpdateStatus.ERROR\n ) {\n return t['com.arms.aboutAFFiNE.checkUpdate.button.retry']();\n }\n return t['com.arms.aboutAFFiNE.checkUpdate.button.check']();\n }, [checkUpdateStatus, downloadProgress, t, updateAvailable, updateReady]);\n\n const subtitleLabel = useMemo(() => {\n if (updateReady) {\n return t['com.arms.aboutAFFiNE.checkUpdate.subtitle.restart']();\n } else if (updateAvailable && downloadProgress === null) {\n return t['com.arms.aboutAFFiNE.checkUpdate.subtitle.update-available']({\n version: updateAvailable.version,\n });\n } else if (checkingForUpdates) {\n return t['com.arms.aboutAFFiNE.checkUpdate.subtitle.checking']();\n } else if (updateAvailable && downloadProgress !== null) {\n return t['com.arms.aboutAFFiNE.checkUpdate.subtitle.downloading']();\n } else if (checkUpdateStatus === CheckUpdateStatus.ERROR) {\n return t['com.arms.aboutAFFiNE.checkUpdate.subtitle.error']();\n } else if (checkUpdateStatus === CheckUpdateStatus.LATEST) {\n return t['com.arms.aboutAFFiNE.checkUpdate.subtitle.latest']();\n }\n return t['com.arms.aboutAFFiNE.checkUpdate.subtitle.check']();\n }, [\n checkUpdateStatus,\n downloadProgress,\n checkingForUpdates,\n t,\n updateAvailable,\n updateReady,\n ]);\n\n const subtitle = useMemo(() => {\n return (\n \n {checkingForUpdates ? : null}\n {subtitleLabel}\n \n );\n }, [\n checkUpdateStatus,\n downloadProgress,\n checkingForUpdates,\n subtitleLabel,\n updateAvailable,\n updateReady,\n ]);\n\n return { subtitle, buttonLabel };\n};\n\nexport const UpdateCheckSection = () => {\n const t = useI18n();\n const {\n checkForUpdates,\n downloadUpdate,\n quitAndInstall,\n updateAvailable,\n downloadProgress,\n updateReady,\n } = useAppUpdater();\n const [checkUpdateStatus, setCheckUpdateStatus] = useState(\n CheckUpdateStatus.UNCHECK\n );\n\n const { buttonLabel, subtitle } = useUpdateStatusLabels(checkUpdateStatus);\n\n const asyncCheckForUpdates = useAsyncCallback(async () => {\n let statusCheck = CheckUpdateStatus.UNCHECK;\n try {\n const status = await checkForUpdates();\n\n if (status === null) {\n statusCheck = CheckUpdateStatus.ERROR;\n } else if (status === false) {\n statusCheck = CheckUpdateStatus.LATEST;\n } else if (typeof status === 'string') {\n statusCheck = CheckUpdateStatus.UPDATE_AVAILABLE;\n }\n } catch (e) {\n console.error(e);\n statusCheck = CheckUpdateStatus.ERROR;\n } finally {\n setCheckUpdateStatus(statusCheck);\n }\n }, [checkForUpdates]);\n\n const handleClick = useCallback(() => {\n if (updateAvailable && downloadProgress === null) {\n return downloadUpdate();\n }\n if (updateReady) {\n return quitAndInstall();\n }\n asyncCheckForUpdates();\n }, [\n asyncCheckForUpdates,\n downloadProgress,\n downloadUpdate,\n quitAndInstall,\n updateAvailable,\n updateReady,\n ]);\n\n return (\n \n \n {buttonLabel}\n \n \n );\n};\n","import { Switch } from '@affine/component';\nimport {\n SettingHeader,\n SettingRow,\n SettingWrapper,\n} from '@affine/component/setting-components';\nimport { useAppUpdater } from '@affine/core/hooks/use-app-updater';\nimport { mixpanel } from '@affine/core/mixpanel';\nimport { useI18n } from '@affine/i18n';\nimport { ArrowRightSmallIcon, OpenInNewIcon } from '@blocksuite/icons/rc';\nimport { useCallback } from 'react';\n\nimport { useAppSettingHelper } from '../../../../../hooks/affine/use-app-setting-helper';\nimport { appIconMap, appNames } from '../../../../../pages/open-app';\nimport { popupWindow } from '../../../../../utils';\nimport { relatedLinks } from './config';\nimport * as styles from './style.css';\nimport { UpdateCheckSection } from './update-check-section';\n\nexport const AboutAffine = () => {\n const t = useI18n();\n const { appSettings, updateSettings } = useAppSettingHelper();\n const { toggleAutoCheck, toggleAutoDownload } = useAppUpdater();\n const channel = runtimeConfig.appBuildType;\n const appIcon = appIconMap[channel];\n const appName = appNames[channel];\n\n const onSwitchAutoCheck = useCallback(\n (checked: boolean) => {\n toggleAutoCheck(checked);\n updateSettings('autoCheckUpdate', checked);\n },\n [toggleAutoCheck, updateSettings]\n );\n\n const onSwitchAutoDownload = useCallback(\n (checked: boolean) => {\n toggleAutoDownload(checked);\n updateSettings('autoDownloadUpdate', checked);\n },\n [toggleAutoDownload, updateSettings]\n );\n\n const onSwitchTelemetry = useCallback(\n (checked: boolean) => {\n if (!checked) {\n mixpanel.opt_out_tracking();\n } else {\n mixpanel.opt_in_tracking();\n }\n updateSettings('enableTelemetry', checked);\n },\n [updateSettings]\n );\n\n return (\n <>\n \n \n \n {appName}\n \n \n {environment.isDesktop ? (\n <>\n \n \n \n \n \n \n \n {\n popupWindow(runtimeConfig.changelogUrl);\n }}\n >\n \n \n \n ) : null}\n \n \n \n \n \n \n {t['com.arms.aboutAFFiNE.contact.website']()}\n \n \n \n {t['com.arms.aboutAFFiNE.contact.community']()}\n \n \n \n \n
\n {relatedLinks.map(({ icon, title, link }) => {\n return (\n {\n popupWindow(link);\n }}\n key={title}\n >\n {icon}\n

{title}

\n
\n );\n })}\n \n
\n \n \n {t['com.arms.aboutAFFiNE.legal.privacy']()}\n \n \n \n {t['com.arms.aboutAFFiNE.legal.tos']()}\n \n \n \n \n );\n};\n","import { Menu, MenuItem, MenuTrigger } from '@affine/component/ui/menu';\nimport { DoneIcon } from '@blocksuite/icons/rc';\nimport type { ReactElement } from 'react';\nimport { memo } from 'react';\n\nimport { useLanguageHelper } from '../../../hooks/affine/use-language-helper';\nimport * as styles from './style.css';\n\n// Fixme: keyboard focus should be supported by Menu component\nconst LanguageMenuContent = memo(function LanguageMenuContent() {\n const { currentLanguage, languagesList, onLanguageChange } =\n useLanguageHelper();\n return (\n <>\n {languagesList.map(option => {\n const selected = currentLanguage?.originalName === option.originalName;\n return (\n onLanguageChange(option.tag)}\n endFix={(option.Completeness * 100).toFixed(0) + '%'}\n data-selected={selected}\n className={styles.menuItem}\n >\n
\n
{option.originalName}
\n {selected && }\n
\n \n );\n })}\n \n );\n});\n\nexport const LanguageMenu = () => {\n const { currentLanguage } = useLanguageHelper();\n return (\n ) as ReactElement}\n contentOptions={{\n className: styles.menu,\n align: 'end',\n }}\n >\n \n {currentLanguage?.originalName || ''}\n \n \n );\n};\n","import \"../core/src/components/affine/language-menu/style.css.ts.vanilla.css!=!../../../../../../../node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\\\"fileName\\\":\\\"../core/src/components/affine/language-menu/style.css.ts.vanilla.css\\\",\\\"source\\\":\\\"Lmhvb2FrYjAgewogIGJhY2tncm91bmQ6IHZhcigtLWFmZmluZS13aGl0ZSk7CiAgd2lkdGg6IDI1MHB4OwogIG1heC1oZWlnaHQ6IDMwdmg7CiAgb3ZlcmZsb3cteTogYXV0bzsKfQouaG9vYWtiMSB7CiAgY29sb3I6IHZhcigtLWFmZmluZS10ZXh0LXByaW1hcnktY29sb3IpOwp9Ci5ob29ha2IxW2RhdGEtc2VsZWN0ZWQ9dHJ1ZV0gewogIGNvbG9yOiB2YXIoLS1hZmZpbmUtcHJpbWFyeS1jb2xvcik7Cn0KLmhvb2FrYjIgewogIGRpc3BsYXk6IGZsZXg7CiAganVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuOwogIGFsaWduLWl0ZW1zOiBjZW50ZXI7CiAgbWFyZ2luLXJpZ2h0OiA4cHg7Cn0=\\\"}!../../../../../../../node_modules/@vanilla-extract/webpack-plugin/extracted.js\"\nexport var languageLabelWrapper = 'hooakb2';\nexport var menu = 'hooakb0';\nexport var menuItem = 'hooakb1';","import \"../core/src/components/affine/setting-modal/general-setting/appearance/style.css.ts.vanilla.css!=!../../../../../../../../../node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\\\"fileName\\\":\\\"../core/src/components/affine/setting-modal/general-setting/appearance/style.css.ts.vanilla.css\\\",\\\"source\\\":\\\"Ll80OTdkMGQwIHsKICBmbGV4LWdyb3c6IDE7CiAgZGlzcGxheTogZmxleDsKICBqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtZW5kOwogIG1pbi13aWR0aDogMTUwcHg7CiAgbWF4LXdpZHRoOiAyNTBweDsKfQ==\\\"}!../../../../../../../../../node_modules/@vanilla-extract/webpack-plugin/extracted.js\"\nexport var settingWrapper = '_497d0d0';","import type { RadioItem } from '@affine/component';\nimport { RadioGroup, Switch } from '@affine/component';\nimport {\n SettingHeader,\n SettingRow,\n SettingWrapper,\n} from '@affine/component/setting-components';\nimport { useI18n } from '@affine/i18n';\nimport type { AppSetting } from '@toeverything/infra';\nimport { fontStyleOptions, windowFrameStyleOptions } from '@toeverything/infra';\nimport { useTheme } from 'next-themes';\nimport { useCallback, useMemo } from 'react';\n\nimport { useAppSettingHelper } from '../../../../../hooks/affine/use-app-setting-helper';\nimport { LanguageMenu } from '../../../language-menu';\nimport { DateFormatSetting } from './date-format-setting';\nimport { settingWrapper } from './style.css';\n\nexport const ThemeSettings = () => {\n const t = useI18n();\n const { setTheme, theme } = useTheme();\n\n const radioItems = useMemo(\n () => [\n {\n value: 'system',\n label: t['com.arms.themeSettings.system'](),\n testId: 'system-theme-trigger',\n },\n {\n value: 'light',\n label: t['com.arms.themeSettings.light'](),\n testId: 'light-theme-trigger',\n },\n {\n value: 'dark',\n label: t['com.arms.themeSettings.dark'](),\n testId: 'dark-theme-trigger',\n },\n ],\n [t]\n );\n\n return (\n {\n setTheme(value);\n },\n [setTheme]\n )}\n />\n );\n};\n\nconst FontFamilySettings = () => {\n const t = useI18n();\n const { appSettings, updateSettings } = useAppSettingHelper();\n\n const radioItems = useMemo(() => {\n return fontStyleOptions.map(({ key, value }) => {\n const label =\n key === 'Mono'\n ? t[`com.arms.appearanceSettings.fontStyle.mono`]()\n : key === 'Sans'\n ? t['com.arms.appearanceSettings.fontStyle.sans']()\n : key === 'Serif'\n ? t['com.arms.appearanceSettings.fontStyle.serif']()\n : '';\n return {\n value: key,\n label,\n testId: 'system-font-style-trigger',\n style: { fontFamily: value },\n } satisfies RadioItem;\n });\n }, [t]);\n\n return (\n {\n updateSettings('fontStyle', value);\n },\n [updateSettings]\n )}\n />\n );\n};\n\nexport const AppearanceSettings = () => {\n const t = useI18n();\n\n const { appSettings, updateSettings } = useAppSettingHelper();\n\n return (\n <>\n \n\n \n \n \n \n \n \n \n \n
\n \n
\n \n {environment.isDesktop ? (\n \n updateSettings('clientBorder', checked)}\n />\n \n ) : null}\n\n \n updateSettings('fullWidthLayout', checked)}\n />\n \n {runtimeConfig.enableNewSettingUnstableApi && environment.isDesktop ? (\n \n ({\n value: option,\n label: t[`com.arms.appearanceSettings.windowFrame.${option}`](),\n }))}\n value={appSettings.windowFrameStyle}\n className={settingWrapper}\n width={250}\n onChange={(value: AppSetting['windowFrameStyle']) => {\n updateSettings('windowFrameStyle', value);\n }}\n />\n \n ) : null}\n {/* ํ…Œ๋งˆ ์ˆ˜์ • ์‚ญ์ œ {runtimeConfig.enableThemeEditor ? : null} */}\n
\n {runtimeConfig.enableNewSettingUnstableApi ? (\n \n \n
\n \n
\n \n \n updateSettings('startWeekOnMonday', checked)}\n />\n \n
\n ) : null}\n\n {environment.isDesktop ? (\n \n \n \n updateSettings('enableNoisyBackground', checked)\n }\n />\n \n {environment.isMacOs && (\n \n \n updateSettings('enableBlurBackground', checked)\n }\n />\n \n )}\n \n ) : null}\n \n );\n};\n","import type { ErrorInfo } from 'react';\nimport React, { useRef } from 'react';\nimport type { ErrorBoundaryProps } from 'react-error-boundary';\nimport { ErrorBoundary } from 'react-error-boundary';\nimport { useSWRConfig } from 'swr';\n\n/**\n * If we use suspense mode in SWR, we need to preload or delete cache to retry request.\n * Or the error will be cached and the request will not be retried.\n *\n * Reference:\n * https://github.com/vercel/swr/issues/2740\n * https://github.com/vercel/swr/blob/main/core/src/use-swr.ts#L690\n * https://github.com/vercel/swr/tree/main/examples/suspense-retry\n */\nexport const SWRErrorBoundary = (props: ErrorBoundaryProps) => {\n const { onReset, onError } = props;\n const errorsRef = useRef([]);\n const { cache } = useSWRConfig();\n\n const clearErrorCache = React.useCallback(() => {\n const errors = errorsRef.current;\n errorsRef.current = [];\n\n for (const key of cache.keys()) {\n const item = cache.get(key);\n if (errors.includes(item?.error)) {\n cache.delete(key);\n }\n }\n }, [cache]);\n\n const onResetWithSWR = React.useCallback(\n (details: any) => {\n clearErrorCache();\n onReset?.(details);\n },\n [clearErrorCache, onReset]\n );\n\n const onErrorWithSWR = React.useCallback(\n (error: Error, info: ErrorInfo) => {\n errorsRef.current.push(error);\n onError?.(error, info);\n },\n [onError]\n );\n\n React.useEffect(() => clearErrorCache, [clearErrorCache]);\n\n return (\n \n {props.children}\n \n );\n};\n","import \"../core/src/components/affine/setting-modal/general-setting/plans/style.css.ts.vanilla.css!=!../../../../../../../../../node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\\\"fileName\\\":\\\"../core/src/components/affine/setting-modal/general-setting/plans/style.css.ts.vanilla.css\\\",\\\"source\\\":\\\"#H4sIAAAAAAAAA8VY227jNhB9z1cQWRSIsWEgObabZdB9KLBfURQFJY0kbihSS1K2nGL/vRB1o26+JF3kyQBFzhnOnDkz9MM//ppqozce+vcGoQOLTEqQ73m/Pd/8vHlov/r2a8R0zumRoJhD+XyDEOUsEZgZyDRBIQgDqlpOaE6Qv8vtnowJnAJLUkPQxqvWHLtrazeWwuBDt8d7btc0ewWC9lTdYUzjmAnAdr3Uq2oPrxZa22uvxgsll2p0yEBpsIZQioiqI7ZbVgNHHqeO7H6BI4GiIprD31j8jKqECcwhrgJxqZm5ADqmtyRmShvMwRhQFsfGwygqdCxVRlCR56BCqmFwcNfH5C33n7DF0uJpxIAd+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xjo/Z38eUd1HKCuplDXb+HtMf55H4vtGHxEXfvq17kmxi17G3fHPaRNSHd65VTr/sPmvcu5ffXiyXngvj93zsRhFLRmhCFiEBVR59vfv4HkLErdPITAAA=\\\"}!../../../../../../../../../node_modules/@vanilla-extract/webpack-plugin/extracted.js\"\nexport var cloudSelect = '_12asts46';\nexport var discountLabel = '_12asts4c';\nexport var downgradeCaption = '_12asts4x';\nexport var downgradeContent = '_12asts4w';\nexport var downgradeContentWrapper = '_12asts4v';\nexport var downgradeFooter = '_12asts4y';\nexport var errorTip = '_12asts410';\nexport var errorTipRetry = '_12asts411';\nexport var planAction = '_12asts4m';\nexport var planBenefit = '_12asts4s';\nexport var planBenefitGroup = '_12asts4q';\nexport var planBenefitGroupTitle = '_12asts4r';\nexport var planBenefitIcon = '_12asts4t';\nexport var planBenefitText = '_12asts4u';\nexport var planBenefits = '_12asts4p';\nexport var planCard = '_12asts48';\nexport var planCardBorderMock = '_12asts49';\nexport var planCardsWrapper = '_12asts47';\nexport var planPrice = '_12asts4k';\nexport var planPriceDesc = '_12asts4l';\nexport var planPriceWrapper = '_12asts4j';\nexport var planTitle = '_12asts4d';\nexport var planTitleDescription = '_12asts4g';\nexport var planTitleName = '_12asts4f';\nexport var planTitleSpotlight = '_12asts4e';\nexport var planTitleTitle = '_12asts4h';\nexport var planTitleTitleCaption = '_12asts4i';\nexport var proPlanCard = '_12asts4a _12asts48';\nexport var proPlanTitle = '_12asts4b';\nexport var radioButtonDiscount = '_12asts44';\nexport var radioButtonText = '_12asts45';\nexport var recurringToggleDiscount = '_12asts43';\nexport var recurringToggleRecurring = '_12asts42';\nexport var recurringToggleWrapper = '_12asts41';\nexport var resumeAction = '_12asts4n _12asts4m';\nexport var resumeContent = '_12asts4o';\nexport var textEmphasis = '_12asts4z';\nexport var wrapper = '_12asts40';","import { Button } from '@affine/component/ui/button';\nimport type { ConfirmModalProps } from '@affine/component/ui/modal';\nimport { ConfirmModal, Modal } from '@affine/component/ui/modal';\nimport { useI18n } from '@affine/i18n';\nimport { DialogTrigger } from '@radix-ui/react-dialog';\nimport type { ReactNode } from 'react';\nimport { useEffect, useRef } from 'react';\n\nimport * as styles from './style.css';\n\n/**\n *\n * @param param0\n * @returns\n */\nexport const ConfirmLoadingModal = ({\n type,\n loading,\n open,\n content,\n onOpenChange,\n onConfirm,\n ...props\n}: {\n type: 'resume' | 'change';\n loading?: boolean;\n content?: ReactNode;\n} & ConfirmModalProps) => {\n const t = useI18n();\n const confirmed = useRef(false);\n\n const title = t[`com.arms.payment.modal.${type}.title`]();\n const confirmText = t[`com.arms.payment.modal.${type}.confirm`]();\n const cancelText = t[`com.arms.payment.modal.${type}.cancel`]();\n const contentText =\n type !== 'change' ? t[`com.arms.payment.modal.${type}.content`]() : '';\n\n useEffect(() => {\n if (!loading && open && confirmed.current) {\n onOpenChange?.(false);\n confirmed.current = false;\n }\n }, [loading, open, onOpenChange]);\n\n return (\n {\n confirmed.current = true;\n onConfirm?.()?.catch(console.error);\n }}\n {...props}\n >\n {content ?? contentText}\n \n );\n};\n\n/**\n * Downgrade modal, confirm & cancel button are reversed\n * @param param0\n */\nexport const DowngradeModal = ({\n open,\n loading,\n onOpenChange,\n onCancel,\n}: {\n loading?: boolean;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n onCancel?: () => void;\n}) => {\n const t = useI18n();\n const canceled = useRef(false);\n\n useEffect(() => {\n if (!loading && open && canceled.current) {\n onOpenChange?.(false);\n canceled.current = false;\n }\n }, [loading, open, onOpenChange]);\n\n return (\n \n
\n

\n {t['com.arms.payment.modal.downgrade.content']()}\n

\n

\n {t['com.arms.payment.modal.downgrade.caption']()}\n

\n
\n\n
\n {\n canceled.current = true;\n onCancel?.();\n }}\n loading={loading}\n >\n {t['com.arms.payment.modal.downgrade.cancel']()}\n \n \n onOpenChange?.(false)}\n variant=\"primary\"\n >\n {t['com.arms.payment.modal.downgrade.confirm']()}\n \n \n
\n \n );\n};\n","import { getDowngradeQuestionnaireLink } from '@affine/core/hooks/affine/use-subscription-notify';\nimport { useAsyncCallback } from '@affine/core/hooks/affine-async-hooks';\nimport { track } from '@affine/core/mixpanel';\nimport { SubscriptionPlan } from '@affine/graphql';\nimport { useLiveData, useService } from '@toeverything/infra';\nimport { nanoid } from 'nanoid';\nimport type { PropsWithChildren } from 'react';\nimport { useEffect, useState } from 'react';\n\nimport { AuthService, SubscriptionService } from '../../../../../modules/cloud';\nimport { useDowngradeNotify } from '../../../subscription-landing/notify';\nimport { ConfirmLoadingModal, DowngradeModal } from './modals';\n\n/**\n * Cancel action with modal & request\n * @param param0\n * @returns\n */\nexport const CancelAction = ({\n children,\n open,\n onOpenChange,\n}: {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n} & PropsWithChildren) => {\n const [idempotencyKey, setIdempotencyKey] = useState(nanoid());\n const [isMutating, setIsMutating] = useState(false);\n const subscription = useService(SubscriptionService).subscription;\n const proSubscription = useLiveData(subscription.pro$);\n const authService = useService(AuthService);\n const downgradeNotify = useDowngradeNotify();\n\n useEffect(() => {\n if (!open || !proSubscription) return;\n track.$.settingsPanel.plans.cancelSubscription({\n plan: proSubscription.plan,\n recurring: proSubscription.recurring,\n });\n }, [open, proSubscription]);\n\n const downgrade = useAsyncCallback(async () => {\n try {\n const account = authService.session.account$.value;\n const prevRecurring = subscription.pro$.value?.recurring;\n setIsMutating(true);\n await subscription.cancelSubscription(idempotencyKey);\n subscription.revalidate();\n await subscription.isRevalidating$.waitFor(v => !v);\n // refresh idempotency key\n setIdempotencyKey(nanoid());\n onOpenChange(false);\n const proSubscription = subscription.pro$.value;\n if (proSubscription) {\n track.$.settingsPanel.plans.confirmCancelingSubscription({\n plan: proSubscription.plan,\n recurring: proSubscription.recurring,\n });\n }\n if (account && prevRecurring) {\n downgradeNotify(\n getDowngradeQuestionnaireLink({\n email: account.email ?? '',\n id: account.id,\n name: account.info?.name ?? '',\n plan: SubscriptionPlan.Pro,\n recurring: prevRecurring,\n })\n );\n }\n } finally {\n setIsMutating(false);\n }\n }, [\n authService.session.account$.value,\n subscription,\n idempotencyKey,\n onOpenChange,\n downgradeNotify,\n ]);\n\n return (\n <>\n {children}\n \n \n );\n};\n\n/**\n * Resume payment action with modal & request\n * @param param0\n * @returns\n */\nexport const ResumeAction = ({\n children,\n open,\n onOpenChange,\n}: {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n} & PropsWithChildren) => {\n // allow replay request on network error until component unmount or success\n const [idempotencyKey, setIdempotencyKey] = useState(nanoid());\n const [isMutating, setIsMutating] = useState(false);\n const subscription = useService(SubscriptionService).subscription;\n\n const resume = useAsyncCallback(async () => {\n try {\n setIsMutating(true);\n await subscription.resumeSubscription(idempotencyKey);\n subscription.revalidate();\n await subscription.isRevalidating$.waitFor(v => !v);\n // refresh idempotency key\n setIdempotencyKey(nanoid());\n onOpenChange(false);\n const proSubscription = subscription.pro$.value;\n if (proSubscription) {\n track.$.settingsPanel.plans.confirmResumingSubscription({\n plan: proSubscription.plan,\n recurring: proSubscription.recurring,\n });\n }\n } finally {\n setIsMutating(false);\n }\n }, [subscription, idempotencyKey, onOpenChange]);\n\n return (\n <>\n {children}\n \n \n );\n};\n","import {\n affineIconGradientStart,\n affineIconGradientStop,\n} from './believer-card.css';\n\nexport const bgAFFiNERaw = `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n`;\n\nexport const bgIconsRaw = `\n \n \n \n \n \n \n \n \n \n \n \n\n`;\n","import clsx from 'clsx';\nimport type { HTMLAttributes } from 'react';\n\nimport { bgAFFiNERaw, bgIconsRaw } from './assets';\nimport { bg, card, content } from './believer-card.css';\n\nexport const BelieverCard = ({\n children,\n type,\n className,\n ...attrs\n}: HTMLAttributes & {\n type: 1 | 2;\n}) => {\n return (\n
\n \n
{children}
\n
\n );\n};\n","import \"../core/src/components/affine/setting-modal/general-setting/plans/lifetime/believer-card.css.ts.vanilla.css!=!../../../../../../../../../../node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\\\"fileName\\\":\\\"../core/src/components/affine/setting-modal/general-setting/plans/lifetime/believer-card.css.ts.vanilla.css\\\",\\\"source\\\":\\\"#H4sIAAAAAAAAA6VVYW/aMBD9zq84UaGChCM7QMWMui/TfsU0TSa+JFaDbTkGQqf+98khAUJTyjZZEHzY7917d3aiX2yx3Tu7jeH3AMCaUnllNAeHhfBqh6sBwF5Jn3NglI7CdKM0yVFluecQU2qrEFwbJ9ERJ6TalhzY0zFshZRKZ2GhrSCeXy7mwGwFpSmUhJ1wY0JEmiqNpMFKTGHcJKw3O3RpYfYcciUl6hpDJC+ZM1steXf3PlceJ6vB2yBqxc1uiHslSkusOMw6W+b1FkKk8RwevtMwerxofWjnZw6xLk2x9TWHN5ZDvb3A1Dc/zwKI2ogMOQTzREGy8ETtx4lySYHTRp40fgIsim01Be+ELq1wqP0xNLlCLNUrcmCxreqvq38dWhQ++BCeXd2ci9Sjq+UnRnvUnsNw+LG4Txzp1X4ynQXyH1J4QXyOG3weSuFehj+hvxAuW4txvFhM2w+NWLfUcQN2sPg8ZB2gS2WX3VMojcKdbY9nTGLWNZmOpn1dBks6usEf/xv/F3o3//yafw5fodxlUbOs3GWNf+0CyuEhTdNVJ8jOwf4inwpGrwv2GAr22CnYHRksv4XxPon4KYzA8R5QJUaXJ7z6dmg6gk7rUffCpwriuxX0El5U5d7G6zfEHc8JYYvmCq1PCmHHG/WvkLuJtsDxJS6bNTNjRaL8gQONFvd2br+Afp9PsuanN4P3ZhMibQq1halxGw5lIgoc02ixvPsY9Wq+mQubL7uptG+n//DiTB+VXhwPtVSlLcSBgzYaV4O3P2f8TgxdBwAA\\\"}!../../../../../../../../../../node_modules/@vanilla-extract/webpack-plugin/extracted.js\"\nexport var affineIconGradientStart = 'var(--_15uwrpu0)';\nexport var affineIconGradientStop = 'var(--_15uwrpu1)';\nexport var bg = '_15uwrpu4';\nexport var card = '_15uwrpu2';\nexport var content = '_15uwrpu3';","import \"../core/src/components/affine/setting-modal/general-setting/plans/lifetime/benefits.css.ts.vanilla.css!=!../../../../../../../../../../node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\\\"fileName\\\":\\\"../core/src/components/affine/setting-modal/general-setting/plans/lifetime/benefits.css.ts.vanilla.css\\\",\\\"source\\\":\\\"Ll8xcWZyOHo3MCB7CiAgZGlzcGxheTogZmxleDsKICBmbGV4LWRpcmVjdGlvbjogY29sdW1uOwogIGdhcDogOHB4Owp9Ci5fMXFmcjh6NzEgewogIGRpc3BsYXk6IGZsZXg7CiAgZ2FwOiA4cHg7CiAgYWxpZ24taXRlbXM6IHN0YXJ0OwogIGZvbnQtc2l6ZTogdmFyKC0tYWZmaW5lLWZvbnQteHMpOwogIGxpbmUtaGVpZ2h0OiAyMHB4OwogIGZvbnQtd2VpZ2h0OiA0MDA7Cn0KLl8xcWZyOHo3MSBzdmcgewogIHdpZHRoOiAyMHB4OwogIGhlaWdodDogMjBweDsKICBjb2xvcjogdmFyKC0tYWZmaW5lLWJyYW5kLWNvbG9yKTsKfQ==\\\"}!../../../../../../../../../../node_modules/@vanilla-extract/webpack-plugin/extracted.js\"\nexport var benefits = '_1qfr8z70';\nexport var li = '_1qfr8z71';","import { useI18n } from '@affine/i18n';\nimport { AfFiNeIcon, DoneIcon } from '@blocksuite/icons/rc';\nimport clsx from 'clsx';\nimport type { HTMLAttributes } from 'react';\n\nimport { benefits, li } from './benefits.css';\n\nexport const BelieverBenefits = ({\n className,\n ...attrs\n}: HTMLAttributes) => {\n const t = useI18n();\n\n return (\n
    \n
  • \n \n {t['com.arms.payment.lifetime.benefit-1']()}\n
  • \n\n
  • \n \n {t['com.arms.payment.lifetime.benefit-2']()}\n
  • \n\n
  • \n \n \n {t['com.arms.payment.lifetime.benefit-3']({\n capacity: '1T',\n })}\n \n
  • \n
\n );\n};\n","import \"../core/src/components/affine/setting-modal/general-setting/billing/style.css.ts.vanilla.css!=!../../../../../../../../../node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\\\"fileName\\\":\\\"../core/src/components/affine/setting-modal/general-setting/billing/style.css.ts.vanilla.css\\\",\\\"source\\\":\\\"#H4sIAAAAAAAAA61UwXKbMBC9+yv20pnmIA+4juMqM/kXgdawLUgaScS4nf57B+EQgSEkaU+MtNr33u6+ZfuzynVNKfzeAEhyphIXDqcK28cNhC+TZDH3pBWHXFdNrbqIqKhQjDzWjkOOyqPtrgthOOz2pn3c/Nlse+xdwD6T9CWHNEm+RLFv87w/GufpdGG5Vh6V5+CMyJFl6M+Igd8IKUkVHNKdCSmZthIth9S04HRFEp6F/cqYOJ1IIevDLNeVtnev75kVkhrH4TiSvA+yOjUcUkggiWL3IVYLW5BiXptp7qHP1cozR7+Qj3WE+5IdgoZwOCMVpedwSGKWh3WUTDi8i1KON8KGQUihCrS6ccyh96QK2CpRY0gILZngo7X6tVkDw/fFBI+tZw5zraSwl6jNb1bQuhhdrJccEiZ9u+/69oYqrE0pHLlIVN5Y1z02mnrjDhqyj+7BnOHzj4LUpFh5Lefh6ueFBbvZjJfQwC4/u1JX52Tae11PXY3rw3H1gqkBqu7RS4W7a4WLEzOW6thFg4jTux0yJkx6wpGy/Yptbs0cyXgCsbgKmRVKTjdgZNYBqPinvy4qGWGV096kx5mqZ+dx+Ow86D/OY22NZ+bxFxB1Os28BgAA\\\"}!../../../../../../../../../node_modules/@vanilla-extract/webpack-plugin/extracted.js\"\nexport var believerHeader = 'klcomid';\nexport var believerPrice = 'klcomih';\nexport var believerPriceCaption = 'klcomii';\nexport var believerPriceWrapper = 'klcomig';\nexport var believerSubtitle = 'klcomif';\nexport var believerTitle = 'klcomie';\nexport var billingFrequency = 'klcomi7';\nexport var billingHistorySkeleton = 'klcomic';\nexport var currentPlan = 'klcomi4';\nexport var currentPlanName = 'klcomia';\nexport var history = 'klcomi1';\nexport var historyContent = 'klcomi2';\nexport var noInvoice = 'klcomi9';\nexport var paymentMethod = 'klcomi8';\nexport var planAction = 'klcomi5';\nexport var planCard = 'klcomi3';\nexport var planPrice = 'klcomi6';\nexport var subscription = 'klcomi0';\nexport var subscriptionSettingSkeleton = 'klcomib';","import { Skeleton } from '@affine/component';\nimport { Pagination } from '@affine/component/member-components';\nimport {\n SettingHeader,\n SettingRow,\n SettingWrapper,\n} from '@affine/component/setting-components';\nimport { Button, IconButton } from '@affine/component/ui/button';\nimport { Loading } from '@affine/component/ui/loading';\nimport { getUpgradeQuestionnaireLink } from '@affine/core/hooks/affine/use-subscription-notify';\nimport { useAsyncCallback } from '@affine/core/hooks/affine-async-hooks';\nimport { track } from '@affine/core/mixpanel';\nimport type { InvoicesQuery } from '@affine/graphql';\nimport {\n createCustomerPortalMutation,\n getInvoicesCountQuery,\n invoicesQuery,\n InvoiceStatus,\n SubscriptionPlan,\n SubscriptionRecurring,\n SubscriptionStatus,\n} from '@affine/graphql';\nimport { i18nTime, Trans, useI18n } from '@affine/i18n';\nimport { ArrowRightSmallIcon } from '@blocksuite/icons/rc';\nimport { useLiveData, useService } from '@toeverything/infra';\nimport { useSetAtom } from 'jotai';\nimport { Suspense, useCallback, useEffect, useState } from 'react';\n\nimport {\n openSettingModalAtom,\n type PlansScrollAnchor,\n} from '../../../../../atoms';\nimport { useMutation } from '../../../../../hooks/use-mutation';\nimport { useQuery } from '../../../../../hooks/use-query';\nimport { AuthService, SubscriptionService } from '../../../../../modules/cloud';\nimport { popupWindow } from '../../../../../utils';\nimport { SWRErrorBoundary } from '../../../../pure/swr-error-bundary';\nimport { CancelAction, ResumeAction } from '../plans/actions';\nimport { AICancel, AIResume, AISubscribe } from '../plans/ai/actions';\nimport { BelieverCard } from '../plans/lifetime/believer-card';\nimport { BelieverBenefits } from '../plans/lifetime/benefits';\nimport * as styles from './style.css';\n\nenum DescriptionI18NKey {\n Basic = 'com.arms.payment.billing-setting.current-plan.description',\n Monthly = 'com.arms.payment.billing-setting.current-plan.description.monthly',\n Yearly = 'com.arms.payment.billing-setting.current-plan.description.yearly',\n Lifetime = 'com.arms.payment.billing-setting.current-plan.description.lifetime',\n}\n\nconst INVOICE_PAGE_SIZE = 12;\n\nconst getMessageKey = (\n plan: SubscriptionPlan,\n recurring: SubscriptionRecurring\n): DescriptionI18NKey => {\n if (plan !== SubscriptionPlan.Pro) {\n return DescriptionI18NKey.Basic;\n }\n return DescriptionI18NKey[recurring];\n};\n\nexport const BillingSettings = () => {\n const t = useI18n();\n\n return (\n <>\n \n \n }>\n \n \n \n \n \n \n }>\n \n \n \n \n \n \n );\n};\n\nconst SubscriptionSettings = () => {\n const t = useI18n();\n const subscriptionService = useService(SubscriptionService);\n useEffect(() => {\n subscriptionService.subscription.revalidate();\n subscriptionService.prices.revalidate();\n }, [subscriptionService]);\n\n const proSubscription = useLiveData(subscriptionService.subscription.pro$);\n const proPrice = useLiveData(subscriptionService.prices.proPrice$);\n const isBeliever = useLiveData(subscriptionService.subscription.isBeliever$);\n\n const [openCancelModal, setOpenCancelModal] = useState(false);\n const setOpenSettingModalAtom = useSetAtom(openSettingModalAtom);\n\n const currentPlan = proSubscription?.plan ?? SubscriptionPlan.Free;\n const currentRecurring =\n proSubscription?.recurring ?? SubscriptionRecurring.Monthly;\n\n const openPlans = useCallback(\n (scrollAnchor?: PlansScrollAnchor) => {\n track.$.settingsPanel.billing.viewPlans();\n setOpenSettingModalAtom({\n open: true,\n activeTab: 'plans',\n scrollAnchor: scrollAnchor,\n });\n },\n [setOpenSettingModalAtom]\n );\n const gotoCloudPlansSetting = useCallback(\n () => openPlans('cloudPricingPlan'),\n [openPlans]\n );\n const gotoAiPlanSetting = useCallback(\n () => openPlans('aiPricingPlan'),\n [openPlans]\n );\n\n const amount = proSubscription\n ? proPrice\n ? proSubscription.recurring === SubscriptionRecurring.Monthly\n ? String((proPrice.amount ?? 0) / 100)\n : String((proPrice.yearlyAmount ?? 0) / 100)\n : '?'\n : '0';\n\n return (\n
\n \n {/* loaded */}\n {proSubscription !== null ? (\n isBeliever ? (\n \n ) : (\n
\n
\n \n ),\n }}\n />\n }\n />\n \n
\n

\n ${amount}\n \n /\n {currentRecurring === SubscriptionRecurring.Monthly\n ? t['com.arms.payment.billing-setting.month']()\n : t['com.arms.payment.billing-setting.year']()}\n \n

\n
\n )\n ) : (\n \n )}\n\n \n\n {proSubscription !== null ? (\n proSubscription?.status === SubscriptionStatus.Active && (\n <>\n \n \n \n {proSubscription.nextBillAt && (\n \n )}\n {isBeliever ? null : proSubscription.end &&\n proSubscription.canceledAt ? (\n \n \n \n ) : (\n \n {\n setOpenCancelModal(true);\n }}\n className=\"dangerous-setting\"\n name={t[\n 'com.arms.payment.billing-setting.cancel-subscription'\n ]()}\n desc={t[\n 'com.arms.payment.billing-setting.cancel-subscription.description'\n ]()}\n >\n \n \n \n )}\n \n )\n ) : (\n \n )}\n
\n );\n};\n\nconst TypeFormLink = () => {\n const t = useI18n();\n const subscriptionService = useService(SubscriptionService);\n const authService = useService(AuthService);\n\n const pro = useLiveData(subscriptionService.subscription.pro$);\n const ai = useLiveData(subscriptionService.subscription.ai$);\n const account = useLiveData(authService.session.account$);\n\n if (!account) return null;\n if (!pro && !ai) return null;\n\n const plan = [];\n if (pro) plan.push(SubscriptionPlan.Pro);\n if (ai) plan.push(SubscriptionPlan.AI);\n\n const link = getUpgradeQuestionnaireLink({\n name: account.info?.name,\n id: account.id,\n email: account.email,\n recurring: pro?.recurring ?? ai?.recurring ?? SubscriptionRecurring.Yearly,\n plan,\n });\n\n return (\n \n \n \n \n \n );\n};\n\nconst BelieverIdentifier = ({ onOpenPlans }: { onOpenPlans?: () => void }) => {\n const t = useI18n();\n const subscriptionService = useService(SubscriptionService);\n const readableLifetimePrice = useLiveData(\n subscriptionService.prices.readableLifetimePrice$\n );\n\n if (!readableLifetimePrice) return null;\n\n return (\n \n
\n
\n
\n {t['com.arms.payment.billing-setting.believer.title']()}\n
\n
\n ,\n }}\n />\n
\n
\n
\n
{readableLifetimePrice}
\n
\n {t['com.arms.payment.billing-setting.believer.price-caption']()}\n
\n
\n
\n \n
\n );\n};\n\nconst AIPlanCard = ({ onClick }: { onClick: () => void }) => {\n const t = useI18n();\n const subscriptionService = useService(SubscriptionService);\n useEffect(() => {\n subscriptionService.subscription.revalidate();\n subscriptionService.prices.revalidate();\n }, [subscriptionService]);\n const price = useLiveData(subscriptionService.prices.aiPrice$);\n const subscription = useLiveData(subscriptionService.subscription.ai$);\n\n const priceReadable = price?.yearlyAmount\n ? `$${(price.yearlyAmount / 100).toFixed(2)}`\n : '?';\n const priceFrequency = t['com.arms.payment.billing-setting.year']();\n\n if (subscription === null) {\n return ;\n }\n\n const billingTip =\n subscription === undefined ? (\n \n ),\n }}\n />\n ) : subscription?.nextBillAt ? (\n t['com.arms.payment.ai.billing-tip.next-bill-at']({\n due: i18nTime(subscription.nextBillAt, {\n absolute: { accuracy: 'day' },\n }),\n })\n ) : subscription?.canceledAt && subscription.end ? (\n t['com.arms.payment.ai.billing-tip.end-at']({\n end: i18nTime(subscription.end, { absolute: { accuracy: 'day' } }),\n })\n ) : null;\n\n return (\n
\n
\n \n {price?.yearlyAmount ? (\n subscription ? (\n subscription.canceledAt ? (\n \n ) : (\n \n )\n ) : (\n \n {t['com.arms.payment.billing-setting.ai.purchase']()}\n \n )\n ) : null}\n
\n

\n {subscription ? priceReadable : '$0'}\n /{priceFrequency}\n

\n
\n );\n};\n\nconst PlanAction = ({\n plan,\n gotoPlansSetting,\n}: {\n plan: string;\n gotoPlansSetting: () => void;\n}) => {\n const t = useI18n();\n\n return (\n \n {plan === SubscriptionPlan.Pro\n ? t['com.arms.payment.billing-setting.change-plan']()\n : t['com.arms.payment.billing-setting.upgrade']()}\n \n );\n};\n\nconst PaymentMethodUpdater = () => {\n const { isMutating, trigger } = useMutation({\n mutation: createCustomerPortalMutation,\n });\n const t = useI18n();\n\n const update = useAsyncCallback(async () => {\n await trigger(null, {\n onSuccess: data => {\n popupWindow(data.createCustomerPortal);\n },\n });\n }, [trigger]);\n\n return (\n \n );\n};\n\nconst ResumeSubscription = () => {\n const t = useI18n();\n const [open, setOpen] = useState(false);\n const subscription = useService(SubscriptionService).subscription;\n const handleClick = useCallback(() => {\n setOpen(true);\n }, []);\n\n return (\n \n \n {t['com.arms.payment.billing-setting.resume-subscription']()}\n \n \n );\n};\n\nconst CancelSubscription = ({ loading }: { loading?: boolean }) => {\n return (\n \n \n \n );\n};\n\nconst BillingHistory = () => {\n const t = useI18n();\n const { data: invoicesCountQueryResult } = useQuery({\n query: getInvoicesCountQuery,\n });\n\n const [skip, setSkip] = useState(0);\n\n const { data: invoicesQueryResult } = useQuery({\n query: invoicesQuery,\n variables: { skip, take: INVOICE_PAGE_SIZE },\n });\n\n const invoices = invoicesQueryResult.currentUser?.invoices ?? [];\n const invoiceCount = invoicesCountQueryResult.currentUser?.invoiceCount ?? 0;\n\n return (\n
\n
\n {invoices.length === 0 ? (\n

\n {t['com.arms.payment.billing-setting.no-invoice']()}\n

\n ) : (\n invoices.map(invoice => (\n \n ))\n )}\n
\n\n {invoiceCount > INVOICE_PAGE_SIZE && (\n setSkip(skip)}\n />\n )}\n
\n );\n};\n\nconst InvoiceLine = ({\n invoice,\n}: {\n invoice: NonNullable['invoices'][0];\n}) => {\n const t = useI18n();\n\n const open = useCallback(() => {\n if (invoice.link) {\n popupWindow(invoice.link);\n }\n }, [invoice.link]);\n\n const planText =\n invoice.plan === SubscriptionPlan.AI\n ? 'AFFiNE AI'\n : invoice.plan === SubscriptionPlan.Pro\n ? invoice.recurring === SubscriptionRecurring.Lifetime\n ? 'AFFiNE Cloud Believer'\n : 'AFFiNE Cloud'\n : null;\n\n return (\n \n \n \n );\n};\n\nconst SubscriptionSettingSkeleton = () => {\n const t = useI18n();\n return (\n \n
\n \n \n
\n
\n );\n};\n\nconst BillingHistorySkeleton = () => {\n const t = useI18n();\n return (\n \n
\n \n
\n
\n );\n};\n","import type { SVGProps } from 'react';\n\nexport const UpgradeIcon = ({ width, height }: SVGProps) => {\n return (\n \n \n \n );\n};\n\nexport const PaymentIcon = ({ width, height }: SVGProps) => {\n return (\n \n \n \n );\n};\n","import \"../core/src/components/affine/setting-modal/general-setting/plans/ai/ai-plan.css.ts.vanilla.css!=!../../../../../../../../../../node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\\\"fileName\\\":\\\"../core/src/components/affine/setting-modal/general-setting/plans/ai/ai-plan.css.ts.vanilla.css\\\",\\\"source\\\":\\\"#H4sIAAAAAAAAA61UwW6jMBC99ytGlVbaPbgKlKaNK/XSD6mMPYC1YLO2SdNd9d9XGCeLgbRpNifkwZ73Zt68uXlJ8JcoN9UK/lwB5NoINBSSdgdW11LAlpnvhLCikArJ8JtwXWvz4/FwnxgmZGcpJOt214dbJoRUJYVbH3i/utnDJB5GSNvW7I1CUaN/0H+JkAa5k1pR4LruGtX/KVlL4WFI2zBTSkVy7ZxuKCTpJHnqkxdaOfKKsqwchbvV6nEfs/I30rggH99ZX0vdB6rwLl0NkL7UyaPcMCUOTRjh356Hb5sF/PQ4vsOdI62RDTNvSzQyT+PklxPG6xnjNLQ/IjhT9u4sZZNQJ6tlqYh02FgK1jHjFgRPswnmehlzlHl0+d5fbqQir1K4qp/WIPKhpvvhPJ3qUP9FhE2y0Ex0Dg2xLePeKST5FrF9+FhEbNqKWWlHKgbTkRoLN7MiMQF+Ktvm38x+4o+o/Gwo/2TPeNIWuVbiyNRu4AnYVyfXhwVybdgwXp0SaHpWUW72H7M5SpNfJg2/4Jr4rOXzls3oR9bjqByaA/ep4Tg8gd2WR2WKVyNAcFo6MdpwHuUVZ3V2yg7njc1O3/9fGNupClnstcGB+xXeaisH+gZr5uQ2nk2kNMdCGwxNVQ6Vo3B9PepfFrcvW1xTAS5n/GdpdKcEBd4Zg8o997RjKiy3uu4cDqvIL4ygkdPt/vD+Fz9rsnAeCAAA\\\"}!../../../../../../../../../../node_modules/@vanilla-extract/webpack-plugin/extracted.js\"\nexport var actionBlock = '_1eqdg9h5';\nexport var actionButtons = '_1eqdg9h6';\nexport var agreement = '_1eqdg9h9';\nexport var benefitGroup = '_1eqdg9hb';\nexport var benefitItem = '_1eqdg9he';\nexport var benefitList = '_1eqdg9hd';\nexport var benefitTitle = '_1eqdg9hc';\nexport var benefits = '_1eqdg9ha';\nexport var card = '_1eqdg9h0';\nexport var learnAIButton = '_1eqdg9h8 _1eqdg9h7';\nexport var purchaseButton = '_1eqdg9h7';\nexport var title = '_1eqdg9h4';\nexport var titleBlock = '_1eqdg9h1';\nexport var titleCaption1 = '_1eqdg9h2';\nexport var titleCaption2 = '_1eqdg9h3';","import { Button, Divider, IconButton } from '@affine/component';\nimport { SettingHeader } from '@affine/component/setting-components';\nimport {\n openSettingModalAtom,\n type PlansScrollAnchor,\n} from '@affine/core/atoms';\nimport { useI18n } from '@affine/i18n';\nimport { ArrowRightBigIcon, ArrowUpSmallIcon } from '@blocksuite/icons/rc';\nimport * as Collapsible from '@radix-ui/react-collapsible';\nimport * as ScrollArea from '@radix-ui/react-scroll-area';\nimport { useAtom, useAtomValue } from 'jotai';\nimport {\n type HtmlHTMLAttributes,\n type ReactNode,\n useCallback,\n useEffect,\n useLayoutEffect,\n useRef,\n useState,\n} from 'react';\nimport { createPortal, flushSync } from 'react-dom';\n\nimport { settingModalScrollContainerAtom } from '../../atoms';\nimport * as styles from './layout.css';\n\nexport const SeeAllLink = () => {\n const t = useI18n();\n\n return (\n \n {t['com.arms.payment.see-all-plans']()}\n {}\n \n );\n};\n\ninterface PricingCollapsibleProps\n extends Omit, 'title'> {\n title?: ReactNode;\n caption?: ReactNode;\n}\nexport const PricingCollapsible = ({\n title,\n caption,\n children,\n}: PricingCollapsibleProps) => {\n const [open, setOpen] = useState(true);\n const toggle = useCallback(() => setOpen(prev => !prev), []);\n return (\n \n
\n
\n
{title}
\n
{caption}
\n
\n \n \n \n
\n {children}\n
\n );\n};\n\nexport interface PlanLayoutProps {\n cloud?: ReactNode;\n ai?: ReactNode;\n cloudTip?: boolean;\n}\n\nexport const PlanLayout = ({ cloud, ai, cloudTip }: PlanLayoutProps) => {\n const t = useI18n();\n const [modal, setOpenSettingModal] = useAtom(openSettingModalAtom);\n const scrollAnchor = modal.activeTab === 'plans' ? modal.scrollAnchor : null;\n const plansRootRef = useRef(null);\n const cloudScrollTipRef = useRef(null);\n const settingModalScrollContainer = useAtomValue(\n settingModalScrollContainerAtom\n );\n\n const updateCloudTipState = useCallback(() => {\n if (!cloudTip) return;\n const cloudContainer =\n plansRootRef.current?.querySelector('#cloudPricingPlan');\n if (!settingModalScrollContainer || !cloudContainer) return;\n\n const minVisibleHeight = 30;\n\n const containerRect = settingModalScrollContainer.getBoundingClientRect();\n const cloudTop =\n cloudContainer.getBoundingClientRect().top - containerRect.top;\n const cloudIntoView = cloudTop < containerRect.height - minVisibleHeight;\n if (cloudIntoView) {\n settingModalScrollContainer.dataset.cloudVisible = '';\n }\n }, [cloudTip, settingModalScrollContainer]);\n\n // TODO(@catsjuice): Need a better solution to handle this situation\n useLayoutEffect(() => {\n if (!scrollAnchor) return;\n flushSync(() => {\n const target = plansRootRef.current?.querySelector(`#${scrollAnchor}`);\n if (target) {\n target.scrollIntoView();\n setOpenSettingModal(prev => ({ ...prev, scrollAnchor: undefined }));\n }\n });\n }, [scrollAnchor, setOpenSettingModal]);\n\n useEffect(() => {\n if (!settingModalScrollContainer || !cloudScrollTipRef.current) return;\n\n settingModalScrollContainer.addEventListener('scroll', updateCloudTipState);\n updateCloudTipState();\n return () => {\n settingModalScrollContainer.removeEventListener(\n 'scroll',\n updateCloudTipState\n );\n };\n }, [settingModalScrollContainer, updateCloudTipState]);\n\n const scrollToAnchor = useCallback((anchor: PlansScrollAnchor) => {\n const target = plansRootRef.current?.querySelector(`#${anchor}`);\n target && target.scrollIntoView({ behavior: 'smooth' });\n }, []);\n\n return (\n
\n {/* TODO(@catsjuice): SettingHeader component shouldn't have margin itself */}\n \n {ai ? (\n <>\n
{ai}
\n \n \n ) : null}\n
{cloud}
\n\n {cloudTip && settingModalScrollContainer\n ? createPortal(\n
\n
\n
\n {t['com.arms.cloud-scroll-tip.title']()}\n
\n
\n {t['com.arms.cloud-scroll-tip.caption']()}\n
\n
\n scrollToAnchor('cloudPricingPlan')}\n variant=\"primary\"\n >\n {t['com.arms.ai-scroll-tip.view']()}\n \n
,\n settingModalScrollContainer,\n 'aiScrollTip'\n )\n : null}\n
\n );\n};\n\nexport interface PlanCardProps {\n title?: ReactNode;\n caption?: ReactNode;\n select?: ReactNode;\n toggle?: ReactNode;\n scroll?: ReactNode;\n lifetime?: ReactNode;\n scrollRef?: React.RefObject;\n}\nexport const CloudPlanLayout = ({\n title = 'AFFiNE Cloud',\n caption,\n select,\n toggle,\n scroll,\n lifetime,\n scrollRef,\n}: PlanCardProps) => {\n return (\n \n
\n
{select}
\n
{toggle}
\n
\n \n \n {scroll}\n \n \n \n \n \n {lifetime ? (\n
\n {lifetime}\n
\n ) : null}\n
\n );\n};\n","import \"../core/src/components/affine/setting-modal/general-setting/plans/layout.css.ts.vanilla.css!=!../../../../../../../../../node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\\\"fileName\\\":\\\"../core/src/components/affine/setting-modal/general-setting/plans/layout.css.ts.vanilla.css\\\",\\\"source\\\":\\\"#H4sIAAAAAAAAA6VV227bMAx9z1dwDwOaYQrsNM1a92W/MQzDwFh0olWWDInOpUP/fbBk147nNB32FIOkDslDHubrE50KhyV5+LnCE5eHDfyeARTOluEDoES3VUZsLLMtMxBpklTHxxnAywyA7XRUEgNeZosWNglxUvlK4ymDQlPAaH6FVI5yVtZkkFtdl6bxbLHKYLlqUvUoaUBpc2kqOIMcdX4jUvgEe3Q3QnhiVmYrSitRiy1W4jifN4AVStk44rPLwU3sQUneTQcFVwiye3KFtgdxzABrtsMkHQ/LNHLV2dlWvbHtI9hENPatLqcJQ622Riim0meQk2Fyjbn25IQnTTlnYKyhxzCcOt8JbKntrDtS2x1n8BCLaFtNk+TjMP1tSC+EQ6mOwufOai3QEQre1eVGdCiriLLB/GnrbG1kxxoWhTIkVG6N8JRbI9GdIm8V5opPGSSL9ZDHDHZKSjLDIjt46yS5UEztW2tf6+qfqAqL1eLmVls3qlgr8ySCYz7ujB0aX6Ejw4OqWpCRs7CGhVfPNIIP9qOfDxu4e0cDntHxYGu6Dbs/52IdoNqhJp3EMkiHQV+ixptKDi3R6yS5WvUGPQVOdGPqRrRcnldw/zf46h3ggZIxdHJ5TExH7hfrdWB9HQ/TpP6qPauieWCYDGfgK8xJbIgPFHfvwt6MeB+fJgzp+t1ufN8lMopc21qKvfJqo+kHXHhwNqA8+CrrVdQubrzVNQf9PgtlZDvSZgdjOenyTM5Tl6vteHDBLqr2sFMcRz1S3v1Qjxmk1RG81UqePx8KI6AEbbS9hO/CuhKSxe3aA6EnSBYr/7kjo3H09rV/YyjXp9le3shQ2Kj4la67Vo7C71A29+esiWgU6Xxi+P2fIBpVYmzs9Q90WP6dh8K6Azrpr25EnPorPy1VGpm+3YSEo/PZAEq1P39+tvDwQZWVdYzNTerXS/YSvSRHX84fL9yICfW/IdHKqXJaoHS9ivYoTB2T/z4UfwCGdoP2+wgAAA==\\\"}!../../../../../../../../../node_modules/@vanilla-extract/webpack-plugin/extracted.js\"\nexport var affineCloudHeader = '_4aytmw9';\nexport var aiDivider = '_4aytmwa';\nexport var aiScrollTip = '_4aytmwc';\nexport var allPlansLink = '_4aytmw4';\nexport var cloudScrollTipCaption = '_4aytmwe';\nexport var cloudScrollTipTitle = '_4aytmwd';\nexport var collapsibleHeader = '_4aytmw5';\nexport var collapsibleHeaderCaption = '_4aytmw8';\nexport var collapsibleHeaderContent = '_4aytmw6';\nexport var collapsibleHeaderTitle = '_4aytmw7';\nexport var plansLayoutRoot = '_4aytmw0';\nexport var scrollArea = '_4aytmw1';\nexport var scrollBar = '_4aytmw2';\nexport var scrollThumb = '_4aytmw3';","import { useI18n } from '@affine/i18n';\nimport {\n CheckBoxCheckLinearIcon,\n PenIcon,\n TextIcon,\n} from '@blocksuite/icons/rc';\nimport { useMemo } from 'react';\n\nimport * as styles from './ai-plan.css';\n\nconst benefitsGetter = (t: ReturnType) => [\n {\n name: t['com.arms.payment.ai.benefit.g1'](),\n icon: ,\n items: [\n t['com.arms.payment.ai.benefit.g1-1'](),\n t['com.arms.payment.ai.benefit.g1-2'](),\n t['com.arms.payment.ai.benefit.g1-3'](),\n ],\n },\n {\n name: t['com.arms.payment.ai.benefit.g2'](),\n icon: ,\n items: [\n t['com.arms.payment.ai.benefit.g2-1'](),\n t['com.arms.payment.ai.benefit.g2-2'](),\n t['com.arms.payment.ai.benefit.g2-3'](),\n ],\n },\n {\n name: t['com.arms.payment.ai.benefit.g3'](),\n icon: ,\n items: [\n t['com.arms.payment.ai.benefit.g3-1'](),\n t['com.arms.payment.ai.benefit.g3-2'](),\n t['com.arms.payment.ai.benefit.g3-3'](),\n ],\n },\n];\n\nexport const AIBenefits = () => {\n const t = useI18n();\n const benefits = useMemo(() => benefitsGetter(t), [t]);\n return (\n
\n {benefits.map(({ name, icon, items }) => {\n return (\n
\n
\n {icon}\n {name}\n
\n\n
    \n {items.map(item => (\n
  • \n {item}\n
  • \n ))}\n
\n
\n );\n })}\n
\n );\n};\n","import { useI18n } from '@affine/i18n';\nimport type { ReactNode } from 'react';\n\nimport { PricingCollapsible } from '../layout';\nimport * as styles from './ai-plan.css';\nimport { AIBenefits } from './benefits';\n\nexport interface AIPlanLayoutProps {\n caption?: ReactNode;\n actionButtons?: ReactNode;\n billingTip?: ReactNode;\n}\nexport const AIPlanLayout = ({\n caption,\n actionButtons,\n billingTip,\n}: AIPlanLayoutProps) => {\n const t = useI18n();\n const title = t['com.arms.payment.ai.pricing-plan.title']();\n\n return (\n \n
\n
\n
\n {t['com.arms.payment.ai.pricing-plan.title-caption-1']()}\n
\n
\n {t['com.arms.payment.ai.pricing-plan.title']()}\n
\n
\n {t['com.arms.payment.ai.pricing-plan.title-caption-2']()}\n
\n
\n\n
\n
{actionButtons}
\n {billingTip ? (\n
{billingTip}
\n ) : null}\n
\n\n \n
\n
\n );\n};\n","import { Button } from '@affine/component';\nimport { AuthService, SubscriptionService } from '@affine/core/modules/cloud';\nimport { i18nTime, useI18n } from '@affine/i18n';\nimport { useLiveData, useService } from '@toeverything/infra';\nimport { useEffect } from 'react';\n\nimport { AICancel, AILogin, AIResume, AISubscribe } from './actions';\nimport * as styles from './ai-plan.css';\nimport { AIPlanLayout } from './layout';\n\nexport const AIPlan = () => {\n const t = useI18n();\n\n const authService = useService(AuthService);\n const subscriptionService = useService(SubscriptionService);\n const subscription = useLiveData(subscriptionService.subscription.ai$);\n const price = useLiveData(subscriptionService.prices.aiPrice$);\n const isLoggedIn =\n useLiveData(authService.session.status$) === 'authenticated';\n\n useEffect(() => {\n subscriptionService.subscription.revalidate();\n subscriptionService.prices.revalidate();\n }, [subscriptionService]);\n\n // yearly subscription should always be available\n if (!price?.yearlyAmount) {\n return null;\n }\n\n const billingTip = subscription?.nextBillAt\n ? t['com.arms.payment.ai.billing-tip.next-bill-at']({\n due: i18nTime(subscription.nextBillAt, {\n absolute: { accuracy: 'day' },\n }),\n })\n : subscription?.canceledAt && subscription.end\n ? t['com.arms.payment.ai.billing-tip.end-at']({\n end: i18nTime(subscription.end, {\n absolute: { accuracy: 'day' },\n }),\n })\n : null;\n\n return (\n \n ) : (\n \n )\n ) : (\n <>\n \n \n \n \n \n )\n ) : (\n \n )\n }\n billingTip={billingTip}\n />\n );\n};\n","import { Button, type ButtonProps } from '@affine/component/ui/button';\nimport { Tooltip } from '@affine/component/ui/tooltip';\nimport { generateSubscriptionCallbackLink } from '@affine/core/hooks/affine/use-subscription-notify';\nimport { useAsyncCallback } from '@affine/core/hooks/affine-async-hooks';\nimport { track } from '@affine/core/mixpanel';\nimport { AuthService, SubscriptionService } from '@affine/core/modules/cloud';\nimport { popupWindow } from '@affine/core/utils';\nimport type { SubscriptionRecurring } from '@affine/graphql';\nimport { SubscriptionPlan, SubscriptionStatus } from '@affine/graphql';\nimport { Trans, useI18n } from '@affine/i18n';\nimport { DoneIcon } from '@blocksuite/icons/rc';\nimport { useLiveData, useService } from '@toeverything/infra';\nimport clsx from 'clsx';\nimport { useSetAtom } from 'jotai';\nimport { nanoid } from 'nanoid';\nimport type { PropsWithChildren } from 'react';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport { authAtom } from '../../../../../atoms/index';\nimport { CancelAction, ResumeAction } from './actions';\nimport type { DynamicPrice, FixedPrice } from './cloud-plans';\nimport { ConfirmLoadingModal } from './modals';\nimport * as styles from './style.css';\n\ninterface PlanCardProps {\n detail: FixedPrice | DynamicPrice;\n recurring: SubscriptionRecurring;\n}\n\nexport const PlanCard = (props: PlanCardProps) => {\n const { detail, recurring } = props;\n const loggedIn =\n useLiveData(useService(AuthService).session.status$) === 'authenticated';\n const subscriptionService = useService(SubscriptionService);\n const proSubscription = useLiveData(subscriptionService.subscription.pro$);\n const currentPlan = proSubscription?.plan ?? SubscriptionPlan.Free;\n\n const isCurrent =\n loggedIn &&\n detail.plan === currentPlan &&\n recurring === proSubscription?.recurring;\n const isPro = detail.plan === SubscriptionPlan.Pro;\n\n return (\n \n
\n
\n
\n
{detail.name}
\n
\n {detail.description}\n
\n
\n {detail.titleRenderer(recurring, detail as any)}\n
\n
\n \n
\n
\n {Object.entries(detail.benefits).map(([groupName, benefitList]) => {\n return (\n
    \n
    \n {groupName}:\n
    \n {benefitList.map(({ icon, title }, index) => {\n return (\n
  • \n
    \n {icon ?? }\n
    \n
    {title}
    \n
  • \n );\n })}\n
\n );\n })}\n
\n
\n );\n};\n\nconst ActionButton = ({ detail, recurring }: PlanCardProps) => {\n const t = useI18n();\n const loggedIn =\n useLiveData(useService(AuthService).session.status$) === 'authenticated';\n const subscriptionService = useService(SubscriptionService);\n const isBeliever = useLiveData(subscriptionService.subscription.isBeliever$);\n const primarySubscription = useLiveData(\n subscriptionService.subscription.pro$\n );\n const currentPlan = primarySubscription?.plan ?? SubscriptionPlan.Free;\n const currentRecurring = primarySubscription?.recurring;\n\n // branches:\n // if contact => 'Contact Sales'\n // if not signed in:\n // if free => 'Sign up free'\n // else => 'Buy Pro'\n // else\n // if isBeliever => 'Included in Lifetime'\n // if isCurrent\n // if canceled => 'Resume'\n // else => 'Current Plan'\n // if isCurrent => 'Current Plan'\n // else if free => 'Downgrade'\n // else if currentRecurring !== recurring => 'Change to {recurring} Billing'\n // else => 'Upgrade'\n\n // contact\n if (detail.type === 'dynamic') {\n return ;\n }\n\n // not signed in\n if (!loggedIn) {\n return (\n \n {detail.plan === SubscriptionPlan.Free\n ? t['com.arms.payment.sign-up-free']()\n : t['com.arms.payment.buy-pro']()}\n \n );\n }\n\n // lifetime\n if (isBeliever) {\n return (\n \n );\n }\n\n const isCanceled = !!primarySubscription?.canceledAt;\n const isFree = detail.plan === SubscriptionPlan.Free;\n const isCurrent =\n detail.plan === currentPlan &&\n (isFree\n ? true\n : currentRecurring === recurring &&\n primarySubscription?.status === SubscriptionStatus.Active);\n\n // is current\n if (isCurrent) {\n return isCanceled ? : ;\n }\n\n if (isFree) {\n return ;\n }\n\n return currentPlan === detail.plan ? (\n \n ) : (\n \n );\n};\n\nconst CurrentPlan = () => {\n const t = useI18n();\n return (\n \n );\n};\n\nconst Downgrade = ({ disabled }: { disabled?: boolean }) => {\n const t = useI18n();\n const [open, setOpen] = useState(false);\n\n const tooltipContent = disabled\n ? t['com.arms.payment.downgraded-tooltip']()\n : null;\n\n const handleClick = useCallback(() => {\n setOpen(true);\n }, []);\n\n return (\n \n \n
\n \n {t['com.arms.payment.downgrade']()}\n \n
\n
\n
\n );\n};\n\nconst BookDemo = ({ plan }: { plan: SubscriptionPlan }) => {\n const t = useI18n();\n const url = useMemo(() => {\n switch (plan) {\n case SubscriptionPlan.Team:\n return 'https://6dxre9ihosp.typeform.com/to/niBcdkvs';\n case SubscriptionPlan.Enterprise:\n return 'https://6dxre9ihosp.typeform.com/to/rFfobTjf';\n default:\n return 'https://affine.pro/pricing';\n }\n }, [plan]);\n\n return (\n \n \n {t['com.arms.payment.tell-us-use-case']()}\n \n \n );\n};\n\nexport const Upgrade = ({\n className,\n recurring,\n children,\n ...btnProps\n}: ButtonProps & {\n recurring: SubscriptionRecurring;\n}) => {\n const [isMutating, setMutating] = useState(false);\n const [isOpenedExternalWindow, setOpenedExternalWindow] = useState(false);\n const t = useI18n();\n\n const subscriptionService = useService(SubscriptionService);\n const authService = useService(AuthService);\n\n const [idempotencyKey, setIdempotencyKey] = useState(nanoid());\n\n useEffect(() => {\n if (isOpenedExternalWindow) {\n // when the external window is opened, revalidate the subscription when window get focus\n window.addEventListener(\n 'focus',\n subscriptionService.subscription.revalidate\n );\n return () => {\n window.removeEventListener(\n 'focus',\n subscriptionService.subscription.revalidate\n );\n };\n }\n return;\n }, [isOpenedExternalWindow, subscriptionService]);\n\n const upgrade = useAsyncCallback(async () => {\n setMutating(true);\n track.$.settingsPanel.plans.checkout({\n plan: SubscriptionPlan.Pro,\n recurring: recurring,\n });\n const link = await subscriptionService.createCheckoutSession({\n recurring,\n idempotencyKey,\n plan: SubscriptionPlan.Pro, // Only support prod plan now.\n coupon: null,\n successCallbackLink: generateSubscriptionCallbackLink(\n authService.session.account$.value,\n SubscriptionPlan.Pro,\n recurring\n ),\n });\n setMutating(false);\n setIdempotencyKey(nanoid());\n popupWindow(link);\n setOpenedExternalWindow(true);\n }, [\n recurring,\n authService.session.account$.value,\n subscriptionService,\n idempotencyKey,\n ]);\n\n return (\n \n {children ?? t['com.arms.payment.upgrade']()}\n \n );\n};\n\nconst ChangeRecurring = ({\n from,\n to,\n disabled,\n due,\n}: {\n from: SubscriptionRecurring;\n to: SubscriptionRecurring;\n disabled?: boolean;\n due: string;\n}) => {\n const t = useI18n();\n const [open, setOpen] = useState(false);\n const [isMutating, setIsMutating] = useState(false);\n // allow replay request on network error until component unmount or success\n const [idempotencyKey, setIdempotencyKey] = useState(nanoid());\n const subscription = useService(SubscriptionService).subscription;\n\n const onStartChange = useCallback(() => {\n track.$.settingsPanel.plans.changeSubscriptionRecurring({\n plan: SubscriptionPlan.Pro,\n recurring: to,\n });\n setOpen(true);\n }, [to]);\n\n const change = useAsyncCallback(async () => {\n setIsMutating(true);\n await subscription.setSubscriptionRecurring(idempotencyKey, to);\n setIdempotencyKey(nanoid());\n setIsMutating(false);\n }, [subscription, to, idempotencyKey]);\n\n const changeCurringContent = (\n \n You are changing your {from}{' '}\n subscription to {to}{' '}\n subscription. This change will take effect in the next billing cycle, with\n an effective date of{' '}\n \n {new Date(due).toLocaleDateString()}\n \n .\n \n );\n\n return (\n <>\n \n {t['com.arms.payment.change-to']({ to })}\n \n\n \n \n );\n};\n\nconst SignUpAction = ({ children }: PropsWithChildren) => {\n const setOpen = useSetAtom(authAtom);\n\n const onClickSignIn = useCallback(() => {\n setOpen(state => ({\n ...state,\n openModal: true,\n }));\n }, [setOpen]);\n\n return (\n \n {children}\n \n );\n};\n\nconst ResumeButton = () => {\n const t = useI18n();\n const [open, setOpen] = useState(false);\n const subscription = useService(SubscriptionService).subscription;\n\n const handleClick = useCallback(() => {\n setOpen(true);\n const pro = subscription.pro$.value;\n if (pro) {\n track.$.settingsPanel.plans.resumeSubscription({\n plan: SubscriptionPlan.Pro,\n recurring: pro.recurring,\n });\n }\n }, [subscription.pro$.value]);\n\n return (\n \n \n \n );\n};\n","import \"../core/src/components/affine/setting-modal/general-setting/plans/lifetime/style.css.ts.vanilla.css!=!../../../../../../../../../../node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\\\"fileName\\\":\\\"../core/src/components/affine/setting-modal/general-setting/plans/lifetime/style.css.ts.vanilla.css\\\",\\\"source\\\":\\\"Ll8xYXM2Y2x1MCB7CiAgZm9udC1zaXplOiB2YXIoLS1hZmZpbmUtZm9udC1zbSk7CiAgZm9udC13ZWlnaHQ6IDUwMDsKICBsaW5lLWhlaWdodDogMjJweDsKICBjb2xvcjogdmFyKC0tYWZmaW5lLXRleHQtc2Vjb25kYXJ5LWNvbG9yKTsKICBtYXJnaW4tYm90dG9tOiA4cHg7Cn0KLl8xYXM2Y2x1MSB7CiAgZm9udC1zaXplOiAxOHB4OwogIGZvbnQtd2VpZ2h0OiA2MDA7CiAgbGluZS1oZWlnaHQ6IDI2cHg7CiAgY29sb3I6IHZhcigtLWFmZmluZS10ZXh0LXByaW1hcnktY29sb3IpOwogIG1hcmdpbi1ib3R0b206IDRweDsKfQouXzFhczZjbHUyIHsKICBmb250LXNpemU6IDMwcHg7CiAgZm9udC13ZWlnaHQ6IDcwMDsKICBsaW5lLWhlaWdodDogbm9ybWFsOwogIGNvbG9yOiB2YXIoLS1hZmZpbmUtYnJhbmQtY29sb3IpOwogIG1hcmdpbi1ib3R0b206IDI0cHg7Cn0KLl8xYXM2Y2x1MyB7CiAgd2lkdGg6IGF1dG87CiAgaGVpZ2h0OiAzNnB4OwogIG1hcmdpbi1ib3R0b206IDhweDsKICBwYWRkaW5nOiA4cHggMThweDsKfQouXzFhczZjbHU0IHsKICBjb2xvcjogdmFyKC0tYWZmaW5lLXRleHQtc2Vjb25kYXJ5LWNvbG9yKTsKICBmb250LXNpemU6IHZhcigtLWFmZmluZS1mb250LXhzKTsKICBsaW5lLWhlaWdodDogMjBweDsKICBmb250LXdlaWdodDogNDAwOwogIG1hcmdpbi1ib3R0b206IDE2cHg7CiAgbWF4LXdpZHRoOiAzMjRweDsKfQouXzFhczZjbHU1IHsKICBjb2xvcjogaW5oZXJpdDsKICBjdXJzb3I6IHRleHQ7Cn0=\\\"}!../../../../../../../../../../node_modules/@vanilla-extract/webpack-plugin/extracted.js\"\nexport var caption1 = '_1as6clu0';\nexport var caption2 = '_1as6clu4';\nexport var price = '_1as6clu2';\nexport var purchase = '_1as6clu3';\nexport var title = '_1as6clu1';\nexport var userPolicyLink = '_1as6clu5';","import { Button } from '@affine/component';\nimport { SubscriptionService } from '@affine/core/modules/cloud';\nimport { SubscriptionRecurring } from '@affine/graphql';\nimport { Trans, useI18n } from '@affine/i18n';\nimport { useLiveData, useService } from '@toeverything/infra';\n\nimport { Upgrade } from '../plan-card';\nimport { BelieverCard } from './believer-card';\nimport { BelieverBenefits } from './benefits';\nimport * as styles from './style.css';\n\nexport const LifetimePlan = () => {\n const t = useI18n();\n const subscriptionService = useService(SubscriptionService);\n\n const readableLifetimePrice = useLiveData(\n subscriptionService.prices.readableLifetimePrice$\n );\n const isBeliever = useLiveData(subscriptionService.subscription.isBeliever$);\n\n if (!readableLifetimePrice) return null;\n\n return (\n \n
\n {t['com.arms.payment.lifetime.caption-1']()}\n
\n\n
\n {t['com.arms.payment.lifetime.title']()}\n
\n\n
{readableLifetimePrice}
\n\n {isBeliever ? (\n \n ) : (\n \n {t['com.arms.payment.lifetime.purchase']()}\n
\n )}\n\n
\n ,\n }}\n />\n
\n\n \n \n );\n};\n","import { Switch } from '@affine/component';\nimport { AuthService, SubscriptionService } from '@affine/core/modules/cloud';\nimport { SubscriptionPlan, SubscriptionRecurring } from '@affine/graphql';\nimport { Trans, useI18n } from '@affine/i18n';\nimport { AfFiNeIcon } from '@blocksuite/icons/rc';\nimport { useLiveData, useServices } from '@toeverything/infra';\nimport { type ReactNode, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { CloudPlanLayout } from './layout';\nimport { LifetimePlan } from './lifetime/lifetime-plan';\nimport { PlanCard } from './plan-card';\nimport { planTitleTitleCaption } from './style.css';\nimport * as styles from './style.css';\n\ntype T = ReturnType;\n\nexport type Benefits = Record<\n string,\n Array<{\n icon?: ReactNode;\n title: ReactNode;\n }>\n>;\ntype BenefitsGetter = (t: T) => Benefits;\ninterface BasePrice {\n plan: SubscriptionPlan;\n name: string;\n description: string;\n benefits: Benefits;\n}\nexport interface FixedPrice extends BasePrice {\n type: 'fixed';\n price: string;\n yearlyPrice: string;\n discount?: string;\n titleRenderer: (\n recurring: SubscriptionRecurring,\n detail: FixedPrice\n ) => ReactNode;\n}\n\nexport interface DynamicPrice extends BasePrice {\n type: 'dynamic';\n contact: boolean;\n titleRenderer: (\n recurring: SubscriptionRecurring,\n detail: DynamicPrice\n ) => ReactNode;\n}\n\nconst freeBenefits: BenefitsGetter = t => ({\n [t['com.arms.payment.cloud.free.benefit.g1']()]: ([1, 2, 3] as const).map(\n i => ({\n title: t[`com.arms.payment.cloud.free.benefit.g1-${i}`](),\n })\n ),\n [t['com.arms.payment.cloud.free.benefit.g2']()]: (\n [1, 2, 3, 4, 5] as const\n ).map(i => ({\n title: t[`com.arms.payment.cloud.free.benefit.g2-${i}`](),\n })),\n});\n\nconst proBenefits: BenefitsGetter = t => ({\n [t['com.arms.payment.cloud.pro.benefit.g1']()]: [\n {\n title: t['com.arms.payment.cloud.pro.benefit.g1-1'](),\n icon: ,\n },\n ...([2, 3, 4, 5, 6, 7, 8] as const).map(i => ({\n title: t[`com.arms.payment.cloud.pro.benefit.g1-${i}`](),\n })),\n ],\n});\n\nconst teamBenefits: BenefitsGetter = t => ({\n [t['com.arms.payment.cloud.team.benefit.g1']()]: [\n {\n title: t['com.arms.payment.cloud.team.benefit.g1-1'](),\n icon: ,\n },\n ...([2, 3, 4] as const).map(i => ({\n title: t[`com.arms.payment.cloud.team.benefit.g1-${i}`](),\n })),\n ],\n [t['com.arms.payment.cloud.team.benefit.g2']()]: [\n { title: t['com.arms.payment.cloud.team.benefit.g2-1']() },\n { title: t['com.arms.payment.cloud.team.benefit.g2-2']() },\n { title: t['com.arms.payment.cloud.team.benefit.g2-3']() },\n ],\n});\n\nexport function getPlanDetail(t: T) {\n return new Map([\n [\n SubscriptionPlan.Free,\n {\n type: 'fixed',\n plan: SubscriptionPlan.Free,\n price: '0',\n yearlyPrice: '0',\n name: t['com.arms.payment.cloud.free.name'](),\n description: t['com.arms.payment.cloud.free.description'](),\n titleRenderer: () => t['com.arms.payment.cloud.free.title'](),\n benefits: freeBenefits(t),\n },\n ],\n [\n SubscriptionPlan.Pro,\n {\n type: 'fixed',\n plan: SubscriptionPlan.Pro,\n price: '1',\n yearlyPrice: '1',\n name: t['com.arms.payment.cloud.pro.name'](),\n description: t['com.arms.payment.cloud.pro.description'](),\n titleRenderer: (recurring, detail) => {\n const price =\n recurring === SubscriptionRecurring.Yearly\n ? detail.yearlyPrice\n : detail.price;\n return (\n <>\n {t['com.arms.payment.cloud.pro.title.price-monthly']({\n price: '$' + price,\n })}\n {recurring === SubscriptionRecurring.Yearly ? (\n \n {t['com.arms.payment.cloud.pro.title.billed-yearly']()}\n \n ) : null}\n \n );\n },\n benefits: proBenefits(t),\n },\n ],\n [\n SubscriptionPlan.Team,\n {\n type: 'dynamic',\n plan: SubscriptionPlan.Team,\n contact: true,\n name: t['com.arms.payment.cloud.team.name'](),\n description: t['com.arms.payment.cloud.team.description'](),\n titleRenderer: () => t['com.arms.payment.cloud.team.title'](),\n benefits: teamBenefits(t),\n },\n ],\n ]);\n}\n\nconst getRecurringLabel = ({\n recurring,\n t,\n}: {\n recurring: SubscriptionRecurring;\n t: ReturnType;\n}) => {\n return recurring === SubscriptionRecurring.Monthly\n ? t['com.arms.payment.recurring-monthly']()\n : t['com.arms.payment.recurring-yearly']();\n};\n\nexport const CloudPlans = () => {\n const t = useI18n();\n const scrollWrapper = useRef(null);\n\n const { authService, subscriptionService } = useServices({\n AuthService,\n SubscriptionService,\n });\n\n const prices = useLiveData(subscriptionService.prices.prices$);\n const loggedIn = useLiveData(authService.session.status$) === 'authenticated';\n const proSubscription = useLiveData(subscriptionService.subscription.pro$);\n\n const [recurring, setRecurring] = useState(\n proSubscription?.recurring ?? SubscriptionRecurring.Yearly\n );\n\n const planDetail = useMemo(() => {\n const rawMap = getPlanDetail(t);\n const clonedMap = new Map();\n\n rawMap.forEach((detail, plan) => {\n clonedMap.set(plan, { ...detail });\n });\n\n prices?.forEach(price => {\n const detail = clonedMap.get(price.plan);\n\n if (detail?.type === 'fixed') {\n detail.price = ((price.amount ?? 0) / 100).toFixed(2);\n detail.yearlyPrice = ((price.yearlyAmount ?? 0) / 100 / 12).toFixed(2);\n detail.discount =\n price.yearlyAmount && price.amount\n ? Math.floor(\n (1 - price.yearlyAmount / 12 / price.amount) * 100\n ).toString()\n : undefined;\n }\n });\n\n return clonedMap;\n }, [prices, t]);\n\n const currentPlan = proSubscription?.plan ?? SubscriptionPlan.Free;\n const isCanceled = !!proSubscription?.canceledAt;\n const currentRecurring =\n proSubscription?.recurring ?? SubscriptionRecurring.Monthly;\n const yearlyDiscount = (\n planDetail.get(SubscriptionPlan.Pro) as FixedPrice | undefined\n )?.discount;\n\n // auto scroll to current plan card\n useEffect(() => {\n if (!scrollWrapper.current) return;\n const currentPlanCard = scrollWrapper.current?.querySelector(\n '[data-current=\"true\"]'\n );\n const wrapperComputedStyle = getComputedStyle(scrollWrapper.current);\n const left = currentPlanCard\n ? currentPlanCard.getBoundingClientRect().left -\n scrollWrapper.current.getBoundingClientRect().left -\n parseInt(wrapperComputedStyle.paddingLeft)\n : 0;\n const appeared = scrollWrapper.current.dataset.appeared === 'true';\n const animationFrameId = requestAnimationFrame(() => {\n scrollWrapper.current?.scrollTo({\n behavior: appeared ? 'smooth' : 'instant',\n left,\n });\n scrollWrapper.current?.setAttribute('data-appeared', 'true');\n });\n return () => {\n cancelAnimationFrame(animationFrameId);\n };\n }, [recurring]);\n\n // caption\n const cloudCaption = loggedIn ? (\n isCanceled ? (\n

\n {t['com.arms.payment.subtitle-canceled']({\n plan: `${getRecurringLabel({\n recurring: currentRecurring,\n t,\n })} ${currentPlan}`,\n })}\n

\n ) : (\n

\n \n You are currently on the {{ currentPlan }} plan. If you have any\n questions, please contact our \n \n customer support\n \n .\n \n

\n )\n ) : (\n

{t['com.arms.payment.subtitle-not-signed-in']()}

\n );\n\n // toggle\n const cloudToggle = (\n
\n
\n {recurring === SubscriptionRecurring.Yearly ? (\n
\n {t['com.arms.payment.cloud.pricing-plan.toggle-yearly']()}\n
\n ) : (\n <>\n
\n \n {t[\n 'com.arms.payment.cloud.pricing-plan.toggle-billed-yearly'\n ]()}\n \n
\n {yearlyDiscount ? (\n
\n {t['com.arms.payment.cloud.pricing-plan.toggle-discount']({\n discount: yearlyDiscount,\n })}\n
\n ) : null}\n \n )}\n
\n \n setRecurring(\n checked\n ? SubscriptionRecurring.Yearly\n : SubscriptionRecurring.Monthly\n )\n }\n />\n
\n );\n\n const cloudScroll = (\n
\n {Array.from(planDetail.values()).map(detail => {\n return ;\n })}\n
\n );\n\n const cloudSelect = (\n
\n {t['com.arms.payment.cloud.pricing-plan.select.title']()}\n {t['com.arms.payment.cloud.pricing-plan.select.caption']()}\n
\n );\n\n return (\n }\n />\n );\n};\n","import { Skeleton } from '@affine/component';\n\nimport { AIPlanLayout } from './ai/layout';\nimport { CloudPlanLayout, PlanLayout } from './layout';\nimport * as styles from './skeleton.css';\n\n/**\n * Customize Skeleton component with rounded border radius\n * @param param0\n * @returns\n */\nconst RoundedSkeleton = ({\n radius = 8,\n ...props\n}: {\n radius?: number;\n} & React.ComponentProps) => (\n \n);\n\nconst TabsSkeleton = () => (\n // TODO(@catsjuice): height should be `32px` by design\n // but the RadioGroup component is not matching with the design currently\n // set to `24px` for now to avoid blinking\n \n);\n\nconst PlanItemSkeleton = () => (\n
\n
\n \n \n
\n\n
\n \n
\n
\n);\n\nconst ScrollSkeleton = () => (\n
\n \n \n \n
\n);\n\nexport const PlansSkeleton = () => {\n return (\n \n }\n actionButtons={\n <>\n \n \n \n }\n />\n }\n cloud={\n \n }\n select={}\n scroll={}\n />\n }\n />\n );\n};\n","import \"../core/src/components/affine/setting-modal/general-setting/plans/skeleton.css.ts.vanilla.css!=!../../../../../../../../../node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\\\"fileName\\\":\\\"../core/src/components/affine/setting-modal/general-setting/plans/skeleton.css.ts.vanilla.css\\\",\\\"source\\\":\\\"Ll8xd2QyZmtyMCB7CiAgZGlzcGxheTogZmxleDsKICBnYXA6IDE2cHg7Cn0KLl8xd2QyZmtyMSB7CiAgd2lkdGg6IDI1OHB4OwogIGhlaWdodDogNDI2cHg7CiAgZmxleC1zaHJpbms6IDA7CiAgYm9yZGVyLXJhZGl1czogMTZweDsKICBiYWNrZ3JvdW5kLWNvbG9yOiB2YXIoLS1hZmZpbmUtYmFja2dyb3VuZC1wcmltYXJ5LWNvbG9yKTsKICBib3JkZXI6IDFweCBzb2xpZCB2YXIoLS1hZmZpbmUtYm9yZGVyLWNvbG9yKTsKICBwYWRkaW5nOiAyMHB4OwogIGRpc3BsYXk6IGZsZXg7CiAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjsKICBnYXA6IDIwcHg7Cn0KLl8xd2QyZmtyMiB7CiAgZGlzcGxheTogZmxleDsKICBmbGV4LWRpcmVjdGlvbjogY29sdW1uOwogIGdhcDogMTBweDsKfQouXzF3ZDJma3IzIHsKICBmbGV4LWdyb3c6IDE7CiAgaGVpZ2h0OiAwOwp9\\\"}!../../../../../../../../../node_modules/@vanilla-extract/webpack-plugin/extracted.js\"\nexport var planItemCard = '_1wd2fkr1';\nexport var planItemContent = '_1wd2fkr3';\nexport var planItemHeader = '_1wd2fkr2';\nexport var plansWrapper = '_1wd2fkr0';","import { useI18n } from '@affine/i18n';\nimport { useLiveData, useService } from '@toeverything/infra';\nimport { useEffect } from 'react';\nimport type { FallbackProps } from 'react-error-boundary';\n\nimport { SWRErrorBoundary } from '../../../../../components/pure/swr-error-bundary';\nimport { SubscriptionService } from '../../../../../modules/cloud';\nimport { AIPlan } from './ai/ai-plan';\nimport { CloudPlans } from './cloud-plans';\nimport { CloudPlanLayout, PlanLayout } from './layout';\nimport { PlansSkeleton } from './skeleton';\nimport * as styles from './style.css';\n\nconst Settings = () => {\n const subscriptionService = useService(SubscriptionService);\n const prices = useLiveData(subscriptionService.prices.prices$);\n\n useEffect(() => {\n subscriptionService.subscription.revalidate();\n subscriptionService.prices.revalidate();\n }, [subscriptionService]);\n\n if (prices === null) {\n return ;\n }\n\n return } ai={} />;\n};\n\nexport const AFFiNEPricingPlans = () => {\n return (\n \n \n \n );\n};\n\nconst PlansErrorBoundary = ({ resetErrorBoundary }: FallbackProps) => {\n const t = useI18n();\n\n const scroll = (\n
\n {t['com.arms.payment.plans-error-tip']()}\n \n {t['com.arms.payment.plans-error-retry']()}\n \n
\n );\n\n return } />;\n};\n","import { useI18n } from '@affine/i18n';\nimport { useCallback, useMemo } from 'react';\n\ntype KeyboardShortcutsI18NKeys =\n | 'cancel'\n | 'quickSearch'\n | 'newPage'\n | 'appendDailyNote'\n | 'expandOrCollapseSidebar'\n | 'goBack'\n | 'goForward'\n | 'selectAll'\n | 'undo'\n | 'redo'\n | 'zoomIn'\n | 'zoomOut'\n | 'zoomTo100'\n | 'zoomToFit'\n | 'select'\n | 'text'\n | 'shape'\n | 'image'\n | 'straightConnector'\n | 'elbowedConnector'\n | 'curveConnector'\n | 'pen'\n | 'hand'\n | 'note'\n | 'group'\n | 'unGroup'\n | 'switch'\n | 'bold'\n | 'italic'\n | 'underline'\n | 'strikethrough'\n | 'inlineCode'\n | 'codeBlock'\n | 'link'\n | 'bodyText'\n | 'increaseIndent'\n | 'reduceIndent'\n | 'groupDatabase'\n | 'moveUp'\n | 'moveDown'\n | 'divider'\n | 'copy-private-link';\n\n// TODO(550): remove this hook after 'useI18n' support scoped i18n\nconst useKeyboardShortcutsI18N = () => {\n const t = useI18n();\n return useCallback(\n (key: KeyboardShortcutsI18NKeys) =>\n t[`com.arms.keyboardShortcuts.${key}`](),\n [t]\n );\n};\n\n// TODO(550): remove this hook after 'useI18n' support scoped i18n\nconst useHeadingKeyboardShortcutsI18N = () => {\n const t = useI18n();\n return useCallback(\n (number: string) => t['com.arms.keyboardShortcuts.heading']({ number }),\n [t]\n );\n};\n\ninterface ShortcutMap {\n [x: string]: string[];\n}\nexport interface ShortcutsInfo {\n title: string;\n shortcuts: ShortcutMap;\n}\n\nexport const useWinGeneralKeyboardShortcuts = (): ShortcutMap => {\n const t = useKeyboardShortcutsI18N();\n return useMemo(\n () => ({\n [t('cancel')]: ['ESC'],\n [t('quickSearch')]: ['Ctrl', 'K'],\n [t('newPage')]: ['Ctrl', 'N'],\n // not implement yet\n // [t('appendDailyNote')]: 'Ctrl + Alt + A',\n [t('expandOrCollapseSidebar')]: ['Ctrl', '/'],\n [t('goBack')]: ['Ctrl', '['],\n [t('goForward')]: ['Ctrl', ']'],\n [t('copy-private-link')]: ['โŒ˜', 'โ‡ง', 'C'],\n }),\n [t]\n );\n};\nexport const useMacGeneralKeyboardShortcuts = (): ShortcutMap => {\n const t = useKeyboardShortcutsI18N();\n return useMemo(\n () => ({\n [t('cancel')]: ['ESC'],\n [t('quickSearch')]: ['โŒ˜', 'K'],\n [t('newPage')]: ['โŒ˜', 'N'],\n // not implement yet\n // [t('appendDailyNote')]: 'โŒ˜ + โŒฅ + A',\n [t('expandOrCollapseSidebar')]: ['โŒ˜', '/'],\n [t('goBack')]: ['โŒ˜ ', '['],\n [t('goForward')]: ['โŒ˜ ', ']'],\n [t('copy-private-link')]: ['โŒ˜', 'โ‡ง', 'C'],\n }),\n [t]\n );\n};\n\nexport const useMacEdgelessKeyboardShortcuts = (): ShortcutMap => {\n const t = useKeyboardShortcutsI18N();\n return useMemo(\n () => ({\n [t('selectAll')]: ['โŒ˜', 'A'],\n [t('undo')]: ['โŒ˜', 'Z'],\n [t('redo')]: ['โŒ˜', 'โ‡ง', 'Z'],\n [t('zoomIn')]: ['โŒ˜', '+'],\n [t('zoomOut')]: ['โŒ˜', '-'],\n [t('zoomTo100')]: ['โŒ˜', '0'],\n [t('zoomToFit')]: ['โŒ˜', '1'],\n [t('select')]: ['V'],\n [t('text')]: ['T'],\n [t('shape')]: ['S'],\n [t('image')]: ['I'],\n [t('straightConnector')]: ['L'],\n [t('elbowedConnector')]: ['X'],\n // not implement yet\n // [t('curveConnector')]: 'C',\n [t('pen')]: ['P'],\n [t('hand')]: ['H'],\n [t('note')]: ['N'],\n // not implement yet\n // [t('group')]: 'โŒ˜ + G',\n // [t('unGroup')]: 'โŒ˜ + โ‡ง + G',\n }),\n [t]\n );\n};\nexport const useWinEdgelessKeyboardShortcuts = (): ShortcutMap => {\n const t = useKeyboardShortcutsI18N();\n return useMemo(\n () => ({\n [t('selectAll')]: ['Ctrl', 'A'],\n [t('undo')]: ['Ctrl', 'Z'],\n [t('redo')]: ['Ctrl', 'Y/Ctrl', 'Shift', 'Z'],\n [t('zoomIn')]: ['Ctrl', '+'],\n [t('zoomOut')]: ['Ctrl', '-'],\n [t('zoomTo100')]: ['Ctrl', '0'],\n [t('zoomToFit')]: ['Ctrl', '1'],\n [t('select')]: ['V'],\n [t('text')]: ['T'],\n [t('shape')]: ['S'],\n [t('image')]: ['I'],\n [t('straightConnector')]: ['L'],\n [t('elbowedConnector')]: ['X'],\n // not implement yet\n // [t('curveConnector')]: 'C',\n [t('pen')]: ['P'],\n [t('hand')]: ['H'],\n [t('note')]: ['N'],\n [t('switch')]: ['Alt ', ''],\n // not implement yet\n // [t('group')]: 'Ctrl + G',\n // [t('unGroup')]: 'Ctrl + Shift + G',\n }),\n [t]\n );\n};\nexport const useMacPageKeyboardShortcuts = (): ShortcutMap => {\n const t = useKeyboardShortcutsI18N();\n const tH = useHeadingKeyboardShortcutsI18N();\n return useMemo(\n () => ({\n [t('undo')]: ['โŒ˜', 'Z'],\n [t('redo')]: ['โŒ˜', 'โ‡ง', 'Z'],\n [t('bold')]: ['โŒ˜', 'B'],\n [t('italic')]: ['โŒ˜', 'I'],\n [t('underline')]: ['โŒ˜', 'U'],\n [t('strikethrough')]: ['โŒ˜', 'โ‡ง', 'S'],\n [t('inlineCode')]: ['โŒ˜', 'E'],\n [t('codeBlock')]: ['โŒ˜', 'โŒฅ', 'C'],\n [t('link')]: ['โŒ˜', 'K'],\n [t('quickSearch')]: ['โŒ˜', 'K'],\n [t('bodyText')]: ['โŒ˜', 'โŒฅ', '0'],\n [tH('1')]: ['โŒ˜', 'โŒฅ', '1'],\n [tH('2')]: ['โŒ˜', 'โŒฅ', '2'],\n [tH('3')]: ['โŒ˜', 'โŒฅ', '3'],\n [tH('4')]: ['โŒ˜', 'โŒฅ', '4'],\n [tH('5')]: ['โŒ˜', 'โŒฅ', '5'],\n [tH('6')]: ['โŒ˜', 'โŒฅ', '6'],\n [t('increaseIndent')]: ['Tab'],\n [t('reduceIndent')]: ['โ‡ง', 'Tab'],\n [t('groupDatabase')]: ['โŒ˜', 'G'],\n [t('switch')]: ['โŒฅ', 'S'],\n // not implement yet\n // [t('moveUp')]: 'โŒ˜ + โŒฅ + โ†‘',\n // [t('moveDown')]: 'โŒ˜ + โŒฅ + โ†“',\n }),\n [t, tH]\n );\n};\n\nexport const useMacMarkdownShortcuts = (): ShortcutMap => {\n const t = useKeyboardShortcutsI18N();\n const tH = useHeadingKeyboardShortcutsI18N();\n return useMemo(\n () => ({\n [t('bold')]: ['**Text**'],\n [t('italic')]: ['*Text*'],\n [t('underline')]: ['~Text~'],\n [t('strikethrough')]: ['~~Text~~'],\n [t('divider')]: ['***'],\n [t('inlineCode')]: ['`Text` '],\n [t('codeBlock')]: ['``` Space'],\n [tH('1')]: ['# Text'],\n [tH('2')]: ['## Text'],\n [tH('3')]: ['### Text'],\n [tH('4')]: ['#### Text'],\n [tH('5')]: ['##### Text'],\n [tH('6')]: ['###### Text'],\n }),\n [t, tH]\n );\n};\n\nexport const useWinPageKeyboardShortcuts = (): ShortcutMap => {\n const t = useKeyboardShortcutsI18N();\n const tH = useHeadingKeyboardShortcutsI18N();\n return useMemo(\n () => ({\n [t('undo')]: ['Ctrl', 'Z'],\n [t('redo')]: ['Ctrl', 'Y'],\n [t('bold')]: ['Ctrl', 'B'],\n [t('italic')]: ['Ctrl', 'I'],\n [t('underline')]: ['Ctrl', 'U'],\n [t('strikethrough')]: ['Ctrl', 'Shift', 'S'],\n [t('inlineCode')]: [' Ctrl', 'E'],\n [t('codeBlock')]: ['Ctrl', 'Alt', 'C'],\n [t('link')]: ['Ctr', 'K'],\n [t('quickSearch')]: ['Ctrl', 'K'],\n [t('bodyText')]: ['Ctrl', 'Shift', '0'],\n [tH('1')]: ['Ctrl', 'Shift', '1'],\n [tH('2')]: ['Ctrl', 'Shift', '2'],\n [tH('3')]: ['Ctrl', 'Shift', '3'],\n [tH('4')]: ['Ctrl', 'Shift', '4'],\n [tH('5')]: ['Ctrl', 'Shift', '5'],\n [tH('6')]: ['Ctrl', 'Shift', '6'],\n [t('increaseIndent')]: ['Tab'],\n [t('reduceIndent')]: ['Shift+Tab'],\n [t('groupDatabase')]: ['Ctrl + G'],\n // ['Switch']: ['Alt + S'], ๋‹จ์ถ•ํ‚ค ๋ฌธ๊ตฌ ์‚ญ์ œ page/edgeless\n // not implement yet\n // [t('moveUp')]: 'Ctrl + Alt + โ†‘',\n // [t('moveDown')]: 'Ctrl + Alt + โ†“',\n }),\n [t, tH]\n );\n};\nexport const useWinMarkdownShortcuts = (): ShortcutMap => {\n const t = useKeyboardShortcutsI18N();\n const tH = useHeadingKeyboardShortcutsI18N();\n return useMemo(\n () => ({\n [t('bold')]: ['**Text** '],\n [t('italic')]: ['*Text* '],\n [t('underline')]: ['~Text~ '],\n [t('strikethrough')]: ['~~Text~~ '],\n [t('divider')]: ['***'],\n [t('inlineCode')]: ['`Text` '],\n [t('codeBlock')]: ['``` Text'],\n [tH('1')]: ['# Text'],\n [tH('2')]: ['## Text'],\n [tH('3')]: ['### Text'],\n [tH('4')]: ['#### Text'],\n [tH('5')]: ['##### Text'],\n [tH('6')]: ['###### Text'],\n }),\n [t, tH]\n );\n};\n\nexport const useMarkdownShortcuts = (): ShortcutsInfo => {\n const t = useI18n();\n\n const macMarkdownShortcuts = useMacMarkdownShortcuts();\n const winMarkdownShortcuts = useWinMarkdownShortcuts();\n const isMac = environment.isBrowser && environment.isMacOs;\n return {\n title: t['com.arms.shortcutsTitle.markdownSyntax'](),\n shortcuts: isMac ? macMarkdownShortcuts : winMarkdownShortcuts,\n };\n};\n\nexport const usePageShortcuts = (): ShortcutsInfo => {\n const t = useI18n();\n\n const macPageShortcuts = useMacPageKeyboardShortcuts();\n const winPageShortcuts = useWinPageKeyboardShortcuts();\n const isMac = environment.isBrowser && environment.isMacOs;\n return {\n title: t['com.arms.shortcutsTitle.page'](),\n shortcuts: isMac ? macPageShortcuts : winPageShortcuts,\n };\n};\n\nexport const useEdgelessShortcuts = (): ShortcutsInfo => {\n const t = useI18n();\n\n const macEdgelessShortcuts = useMacEdgelessKeyboardShortcuts();\n const winEdgelessShortcuts = useWinEdgelessKeyboardShortcuts();\n const isMac = environment.isBrowser && environment.isMacOs;\n return {\n title: t['com.arms.shortcutsTitle.edgeless'](),\n shortcuts: isMac ? macEdgelessShortcuts : winEdgelessShortcuts,\n };\n};\n\nexport const useGeneralShortcuts = (): ShortcutsInfo => {\n const t = useI18n();\n\n const macGeneralShortcuts = useMacGeneralKeyboardShortcuts();\n const winGeneralShortcuts = useWinGeneralKeyboardShortcuts();\n const isMac = environment.isBrowser && environment.isMacOs;\n return {\n title: t['com.arms.shortcutsTitle.general'](),\n shortcuts: isMac ? macGeneralShortcuts : winGeneralShortcuts,\n };\n};\n","import {\n SettingHeader,\n SettingWrapper,\n} from '@affine/component/setting-components';\nimport { useI18n } from '@affine/i18n';\n\nimport type { ShortcutsInfo } from '../../../../../hooks/affine/use-shortcuts';\nimport {\n useEdgelessShortcuts,\n useGeneralShortcuts,\n useMarkdownShortcuts,\n usePageShortcuts,\n} from '../../../../../hooks/affine/use-shortcuts';\nimport { shortcutKey, shortcutKeyContainer, shortcutRow } from './style.css';\n\nconst ShortcutsPanel = ({\n shortcutsInfo,\n}: {\n shortcutsInfo: ShortcutsInfo;\n}) => {\n return (\n \n {Object.entries(shortcutsInfo.shortcuts).map(([title, shortcuts]) => {\n return (\n
\n {title}\n
\n {shortcuts.map(key => {\n return (\n \n {key}\n \n );\n })}\n
\n
\n );\n })}\n
\n );\n};\n\nexport const Shortcuts = () => {\n const t = useI18n();\n\n const markdownShortcutsInfo = useMarkdownShortcuts();\n const pageShortcutsInfo = usePageShortcuts();\n const edgelessShortcutsInfo = useEdgelessShortcuts();\n const generalShortcutsInfo = useGeneralShortcuts();\n\n return (\n <>\n \n \n \n \n \n \n );\n};\n","import \"../core/src/components/affine/setting-modal/general-setting/shortcuts/style.css.ts.vanilla.css!=!../../../../../../../../../node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\\\"fileName\\\":\\\"../core/src/components/affine/setting-modal/general-setting/shortcuts/style.css.ts.vanilla.css\\\",\\\"source\\\":\\\"Lmh3NWl5YzAgewogIGhlaWdodDogMzJweDsKICBtYXJnaW4tYm90dG9tOiAxMnB4OwogIGRpc3BsYXk6IGZsZXg7CiAganVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuOwogIGFsaWduLWl0ZW1zOiBjZW50ZXI7CiAgZm9udC1zaXplOiB2YXIoLS1hZmZpbmUtZm9udC1iYXNlKTsKfQouaHc1aXljMDpsYXN0LW9mLXR5cGUgewogIG1hcmdpbi1ib3R0b206IDA7Cn0KLmh3NWl5YzEgewogIGRpc3BsYXk6IGZsZXg7Cn0KLmh3NWl5YzIgewogIG1pbi13aWR0aDogMjRweDsKICBoZWlnaHQ6IDIwcHg7CiAgZGlzcGxheTogZmxleDsKICBhbGlnbi1pdGVtczogY2VudGVyOwogIGp1c3RpZnktY29udGVudDogY2VudGVyOwogIHBhZGRpbmc6IDAgNnB4OwogIGJvcmRlci1yYWRpdXM6IDRweDsKICBiYWNrZ3JvdW5kOiB2YXIoLS1hZmZpbmUtYmFja2dyb3VuZC10ZXJ0aWFyeS1jb2xvcik7CiAgZm9udC1zaXplOiB2YXIoLS1hZmZpbmUtZm9udC14cyk7Cn0KLmh3NWl5YzI6bm90KDpsYXN0LW9mLXR5cGUpIHsKICBtYXJnaW4tcmlnaHQ6IDJweDsKfQ==\\\"}!../../../../../../../../../node_modules/@vanilla-extract/webpack-plugin/extracted.js\"\nexport var shortcutKey = 'hw5iyc2';\nexport var shortcutKeyContainer = 'hw5iyc1';\nexport var shortcutRow = 'hw5iyc0';","import { UserFeatureService } from '@affine/core/modules/cloud/services/user-feature';\nimport { useI18n } from '@affine/i18n';\nimport {\n AppearanceIcon,\n InformationIcon,\n KeyboardIcon,\n} from '@blocksuite/icons/rc';\nimport { useLiveData, useServices } from '@toeverything/infra';\nimport type { ReactElement, SVGProps } from 'react';\nimport { useEffect } from 'react';\n\nimport { AuthService, ServerConfigService } from '../../../../modules/cloud';\nimport type { GeneralSettingKey } from '../types';\nimport { AboutAffine } from './about';\nimport { AppearanceSettings } from './appearance';\nimport { BillingSettings } from './billing';\nimport { PaymentIcon, UpgradeIcon } from './icons';\nimport { AFFiNEPricingPlans } from './plans';\nimport { Shortcuts } from './shortcuts';\n\ninterface GeneralSettingListItem {\n key: GeneralSettingKey;\n title: string;\n icon: (props: SVGProps) => ReactElement;\n testId: string;\n}\n\nexport type GeneralSettingList = GeneralSettingListItem[];\n\nexport const useGeneralSettingList = (): GeneralSettingList => {\n const t = useI18n();\n const { authService, serverConfigService, userFeatureService } = useServices({\n AuthService,\n ServerConfigService,\n UserFeatureService,\n });\n const status = useLiveData(authService.session.status$);\n const hasPaymentFeature = useLiveData(\n serverConfigService.serverConfig.features$.map(f => f?.payment)\n );\n\n useEffect(() => {\n userFeatureService.userFeature.revalidate();\n }, [userFeatureService]);\n\n const settings: GeneralSettingListItem[] = [\n {\n key: 'appearance',\n title: t['com.arms.settings.appearance'](),\n icon: AppearanceIcon,\n testId: 'appearance-panel-trigger',\n },\n {\n key: 'shortcuts',\n title: t['com.arms.keyboardShortcuts.title'](),\n icon: KeyboardIcon,\n testId: 'shortcuts-panel-trigger',\n },\n {\n key: 'about',\n title: t['com.arms.aboutAFFiNE.title'](),\n icon: InformationIcon,\n testId: 'about-panel-trigger',\n },\n ];\n\n if (hasPaymentFeature) {\n settings.splice(3, 0, {\n key: 'plans',\n title: t['com.arms.payment.title'](),\n icon: UpgradeIcon,\n testId: 'plans-panel-trigger',\n });\n if (status === 'authenticated') {\n settings.splice(3, 0, {\n key: 'billing',\n title: t['com.arms.payment.billing-setting.title'](),\n icon: PaymentIcon,\n testId: 'billing-panel-trigger',\n });\n }\n }\n\n return settings;\n};\n\ninterface GeneralSettingProps {\n generalKey: GeneralSettingKey;\n}\n\nexport const GeneralSetting = ({ generalKey }: GeneralSettingProps) => {\n switch (generalKey) {\n case 'shortcuts':\n return ;\n case 'appearance':\n return ;\n case 'about':\n return ;\n case 'plans':\n return ;\n case 'billing':\n return ;\n default:\n return null;\n }\n};\n","import \"../core/src/components/affine/setting-modal/setting-sidebar/style.css.ts.vanilla.css!=!../../../../../../../../node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\\\"fileName\\\":\\\"../core/src/components/affine/setting-modal/setting-sidebar/style.css.ts.vanilla.css\\\",\\\"source\\\":\\\"#H4sIAAAAAAAAA81WbW+bMBD+nl9hVZq0SjMiNGWR82scOMCrsZFtAt3U/z7ZvBlCkrbppH1C2D7fc8/dPeegiTnlPER/Ngg1LDUFQdHzt8MGoZK2eFjZRVVr1440ecmVrEVK0Imq7xjTLGMC8LSBNSRSpFS94kRyqR6tXUXTlImcoCisWhR2lxXA8sIQtA1D5zDj0GJdKCZeCArtSsp0xekrcVvjkZQpSAyTgqBE8roUh83bJugC2bpAMikM1uw3LFC69QLHDpP7aXoMcegccntqwDUz9XbmEdmAtnEXFYp2NrQRTXQbjS4fP+bYkbo4Y6A113lfQWkzrHImsJFVlxhv7SiNkSVB/cmzRPyqtWGZdSUMCEOQrmgC+AimARD2BOUsF5gZKDVBCQgDymPmyTHz7vwilNOqRzPdEehESc47kq1lrmRD0NaelydQGZcNfiWI1kZ6drt136uAB0ImBs9o3c+r+akn8rya31MHR6lSUFjRlNWaDHcntdI26ZVkA6xag8IaOCSGICEF+AGSwobvwrzYse7IWCqTbUATw07wKePnL2fWfZ+i/4XiD7XfREvP6Q80LHgJunhhpVi5el2IApZI4Uv2QN8oqfGsm9UgtOu8+TdrMIaJHAtadjVQMjGMgdBvLIIKlqZdrzu80wZwzirNtN1qCmYAO3WwJDaKVoezdh0BxLM5tJgTw/9tMZpq7LoKxYTQzIyJ6K0fHg4TiEV397+LGnruBtjl6chr8DP40zmcar3P17i/n+/vJpW5r3jPmOv0FTtxHarjXmnf36E++3vUZ48CeqKGqlkRLRIYXc2gpx9fVm1X+m1EHAhp/ebioiTYjp805vFqubme8+f/OM4jP3iCtlWLtOQsveHLB9yHvTp051rhW1k5cYxRJvrauE1sx5uhylwhd1DA/hE5vRO8nEeL7gpGdXvPwFh7KH6NCl4GCCVl/DbCVn/8TfgvBHwp0m9/AR4leKBYDAAA\\\"}!../../../../../../../../node_modules/@vanilla-extract/webpack-plugin/extracted.js\"\nexport var accountButton = 'w6lall8';\nexport var currentWorkspaceLabel = 'w6lall6';\nexport var settingSlideBar = 'w6lall0';\nexport var sidebarFooter = 'w6lall7';\nexport var sidebarItemsWrapper = 'w6lall3';\nexport var sidebarSelectItem = 'w6lall4';\nexport var sidebarSelectSubItem = 'w6lall5';\nexport var sidebarSubtitle = 'w6lall2';\nexport var sidebarTitle = 'w6lall1';","import {\n WorkspaceListItemSkeleton,\n WorkspaceListSkeleton,\n} from '@affine/component/setting-components';\nimport { Avatar } from '@affine/component/ui/avatar';\nimport { Tooltip } from '@affine/component/ui/tooltip';\nimport { WorkspaceAvatar } from '@affine/component/workspace-avatar';\nimport { useWorkspaceInfo } from '@affine/core/hooks/use-workspace-info';\nimport { track } from '@affine/core/mixpanel';\nimport { AuthService } from '@affine/core/modules/cloud';\nimport { UserFeatureService } from '@affine/core/modules/cloud/services/user-feature';\nimport { UNTITLED_WORKSPACE_NAME } from '@affine/env/constant';\nimport { useI18n } from '@affine/i18n';\nimport { Logo1Icon } from '@blocksuite/icons/rc';\nimport type { WorkspaceMetadata } from '@toeverything/infra';\nimport {\n useLiveData,\n useService,\n useServices,\n WorkspaceService,\n WorkspacesService,\n} from '@toeverything/infra';\nimport clsx from 'clsx';\nimport { useAtom } from 'jotai/react';\nimport {\n type MouseEvent,\n Suspense,\n useCallback,\n useEffect,\n useMemo,\n} from 'react';\n\nimport { authAtom } from '../../../../atoms';\nimport { UserPlanButton } from '../../auth/user-plan-button';\nimport { useGeneralSettingList } from '../general-setting';\nimport type { ActiveTab, WorkspaceSubTab } from '../types';\nimport * as style from './style.css';\n\nexport type UserInfoProps = {\n onAccountSettingClick: () => void;\n active?: boolean;\n};\n\nexport const UserInfo = ({ onAccountSettingClick, active }: UserInfoProps) => {\n const account = useLiveData(useService(AuthService).session.account$);\n if (!account) {\n // TODO(@eyhn): loading ui\n return;\n }\n return (\n \n \n\n
\n
\n
\n {account.label}\n
\n \n
\n\n
\n {account.email}\n
\n
\n \n );\n};\n\nexport const SignInButton = () => {\n const t = useI18n();\n const [, setAuthModal] = useAtom(authAtom);\n\n return (\n {\n setAuthModal({ openModal: true, state: 'signIn' });\n }, [setAuthModal])}\n >\n
\n \n
\n\n
\n
\n {t['com.arms.settings.sign']()}\n
\n
\n {t['com.arms.setting.sign.message']()}\n
\n
\n \n );\n};\n\nexport const SettingSidebar = ({\n activeTab,\n onTabChange,\n selectedWorkspaceId,\n}: {\n activeTab: ActiveTab;\n onTabChange: (\n key: ActiveTab,\n workspaceMetadata: WorkspaceMetadata | null\n ) => void;\n selectedWorkspaceId: string | null;\n}) => {\n const t = useI18n();\n const loginStatus = useLiveData(useService(AuthService).session.status$);\n const generalList = useGeneralSettingList();\n const gotoTab = useCallback(\n (e: MouseEvent) => {\n const tab = e.currentTarget.dataset.eventArg;\n if (!tab) return;\n track.$.settingsPanel.menu.openSettings({ to: tab });\n onTabChange(tab as ActiveTab, null);\n },\n [onTabChange]\n );\n const onAccountSettingClick = useCallback(() => {\n track.$.settingsPanel.menu.openSettings({ to: 'account' });\n onTabChange('account', null);\n }, [onTabChange]);\n const onWorkspaceSettingClick = useCallback(\n (subTab: WorkspaceSubTab, workspaceMetadata: WorkspaceMetadata) => {\n track.$.settingsPanel.menu.openSettings({\n to: 'workspace',\n control: subTab,\n });\n onTabChange(`workspace:${subTab}`, workspaceMetadata);\n },\n [onTabChange]\n );\n\n return (\n
\n
\n {t['com.arms.settingSidebar.title']()}\n
\n
\n {t['com.arms.settingSidebar.settings.general']()}\n
\n
\n {generalList.map(({ title, icon, key, testId }) => {\n return (\n \n {icon({ className: 'icon' })}\n {title}\n
\n );\n })}\n
\n\n
\n {t['com.arms.settingSidebar.settings.workspace']()}\n
\n
\n }>\n \n \n
\n\n
\n {loginStatus === 'unauthenticated' ? : null}\n {loginStatus === 'authenticated' ? (\n \n \n \n ) : null}\n
\n \n );\n};\n\nexport const WorkspaceList = ({\n onWorkspaceSettingClick,\n selectedWorkspaceId,\n activeSubTab,\n}: {\n onWorkspaceSettingClick: (\n subTab: WorkspaceSubTab,\n workspaceMetadata: WorkspaceMetadata\n ) => void;\n selectedWorkspaceId: string | null;\n activeSubTab: WorkspaceSubTab;\n}) => {\n const workspaces = useLiveData(\n useService(WorkspacesService).list.workspaces$\n );\n return (\n <>\n {workspaces.map(workspace => {\n return (\n }>\n {\n onWorkspaceSettingClick(subTab, workspace);\n }}\n activeSubTab={\n workspace.id === selectedWorkspaceId ? activeSubTab : undefined\n }\n />\n \n );\n })}\n \n );\n};\n\nconst subTabConfigs = [\n {\n key: 'preference',\n title: 'com.arms.settings.workspace.preferences',\n },\n {\n key: 'properties',\n title: 'com.arms.settings.workspace.properties',\n },\n] satisfies {\n key: WorkspaceSubTab;\n title: keyof ReturnType;\n}[];\n\nconst WorkspaceListItem = ({\n activeSubTab,\n meta,\n onClick,\n}: {\n meta: WorkspaceMetadata;\n activeSubTab?: WorkspaceSubTab;\n onClick: (subTab: WorkspaceSubTab) => void;\n}) => {\n const { workspaceService, userFeatureService } = useServices({\n WorkspaceService,\n UserFeatureService,\n });\n const information = useWorkspaceInfo(meta);\n const name = information?.name ?? UNTITLED_WORKSPACE_NAME;\n const currentWorkspace = workspaceService.workspace;\n const isCurrent = currentWorkspace.id === meta.id;\n const t = useI18n();\n\n useEffect(() => {\n userFeatureService.userFeature.revalidate();\n }, [userFeatureService]);\n\n const onClickPreference = useCallback(() => {\n onClick('preference');\n }, [onClick]);\n\n const subTabs = useMemo(() => {\n return subTabConfigs.map(({ key, title }) => {\n return (\n {\n onClick(key);\n }}\n className={clsx(style.sidebarSelectSubItem, {\n active: activeSubTab === key,\n })}\n key={key}\n >\n {t[title]()}\n \n );\n });\n }, [activeSubTab, onClick, t]);\n\n return (\n <>\n \n \n {name}\n {isCurrent ? (\n \n \n \n ) : null}\n \n {activeSubTab && subTabs.length > 1 ? subTabs : null}\n \n );\n};\n","import \"../core/src/components/affine/setting-modal/style.css.ts.vanilla.css!=!../../../../../../../node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\\\"fileName\\\":\\\"../core/src/components/affine/setting-modal/style.css.ts.vanilla.css\\\",\\\"source\\\":\\\"Ll8xaGJ5ZWN5MCB7CiAgZmxleC1ncm93OiAxOwogIGhlaWdodDogMTAwJTsKICBwYWRkaW5nOiA0MHB4IDE1cHggMjBweCAxNXB4OwogIGRpc3BsYXk6IGZsZXg7CiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7Cn0KLl8xaGJ5ZWN5MSB7CiAgd2lkdGg6IDEwMCU7CiAgbWF4LXdpZHRoOiA1NjBweDsKfQouXzFoYnllY3kyIHsKICBwb3NpdGlvbjogcmVsYXRpdmU7CiAgd2lkdGg6IDEwMCU7CiAgbWFyZ2luLWJvdHRvbTogMjRweDsKICBtaW4taGVpZ2h0OiBjYWxjKDEwMCUgLSA0OHB4KTsKfQouXzFoYnllY3kzIHsKICBmb250LXNpemU6IHZhcigtLWFmZmluZS1mb250LXNtKTsKICBjb2xvcjogdmFyKC0tYWZmaW5lLXRleHQtcHJpbWFyeS1jb2xvcik7CiAgZGlzcGxheTogZmxleDsKICBhbGlnbi1pdGVtczogc3RhcnQ7CiAgbGluZS1oZWlnaHQ6IDIycHg7CiAgZ2FwOiAxMnB4Owp9Ci5fMWhieWVjeTQgewogIGNvbG9yOiB2YXIoLS1hZmZpbmUtaWNvbi1jb2xvcik7CiAgbWFyZ2luLXJpZ2h0OiAxMnB4OwogIGRpc3BsYXk6IGZsZXg7CiAgbWFyZ2luOiAzcHggMDsKfQouXzFoYnllY3k1IHsKICBkaXNwbGF5OiBmbGV4OwogIGp1c3RpZnktY29udGVudDogY2VudGVyOwogIGFsaWduLWl0ZW1zOiBjZW50ZXI7CiAgcGFkZGluZy1ib3R0b206IDIwcHg7CiAgZ2FwOiA0cHg7CiAgZm9udC1zaXplOiB2YXIoLS1hZmZpbmUtZm9udC14cyk7CiAgZmxleC13cmFwOiB3cmFwOwp9Ci5fMWhieWVjeTYgewogIGNvbG9yOiB2YXIoLS1hZmZpbmUtbGluay1jb2xvcik7CiAgY3Vyc29yOiBwb2ludGVyOwp9Ci5fMWhieWVjeTcgewogIGRpc3BsYXk6IGZsZXg7CiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7CiAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICBoZWlnaHQ6IDEwMCU7CiAgd2lkdGg6IDEwMCU7Cn0=\\\"}!../../../../../../../node_modules/@vanilla-extract/webpack-plugin/extracted.js\"\nexport var centerContainer = '_1hbyecy1';\nexport var centeredLoading = '_1hbyecy7';\nexport var content = '_1hbyecy2';\nexport var footer = '_1hbyecy5';\nexport var link = '_1hbyecy6';\nexport var suggestionLink = '_1hbyecy3';\nexport var suggestionLinkIcon = '_1hbyecy4';\nexport var wrapper = '_1hbyecy0';","export const GeneralSettingKeys = [\n 'shortcuts',\n 'appearance',\n 'about',\n 'plans',\n 'billing',\n 'experimental-features',\n] as const;\n\nexport const WorkspaceSubTabs = ['preference', 'properties'] as const;\n\nexport type GeneralSettingKey = (typeof GeneralSettingKeys)[number];\n\nexport type WorkspaceSubTab = (typeof WorkspaceSubTabs)[number];\n\nexport type ActiveTab =\n | GeneralSettingKey\n | 'account'\n | `workspace:${WorkspaceSubTab}`;\n","import \"../core/src/components/affine/setting-modal/workspace-setting/new-workspace-setting-detail/delete-leave-workspace/delete/style.css.ts.vanilla.css!=!../../../../../../../../../../../node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\\\"fileName\\\":\\\"../core/src/components/affine/setting-modal/workspace-setting/new-workspace-setting-detail/delete-leave-workspace/delete/style.css.ts.vanilla.css\\\",\\\"source\\\":\\\"LmZ2a2JmazAgewogIHBvc2l0aW9uOiByZWxhdGl2ZTsKICBwYWRkaW5nOiAwcHg7CiAgd2lkdGg6IDU2MHB4OwogIGJhY2tncm91bmQ6IHZhcigtLWFmZmluZS1iYWNrZ3JvdW5kLW92ZXJsYXktcGFuZWwtY29sb3IpOwogIGJvcmRlci1yYWRpdXM6IDEycHg7Cn0KLmZ2a2JmazEgewogIG1hcmdpbjogNDRweCAwcHggMTJweCAwcHg7CiAgd2lkdGg6IDU2MHB4OwogIGZvbnQtd2VpZ2h0OiA2MDA7CiAgZm9udC1zaXplOiAyMHB4OzsKICB0ZXh0LWFsaWduOiBjZW50ZXI7Cn0KLmZ2a2JmazIgewogIGRpc3BsYXk6IGZsZXg7CiAgZmxleC1kaXJlY3Rpb246IHJvdzsKICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjsKICBtYXJnaW46IDI0cHggMDsKICBmb250LXNpemU6IHZhcigtLWFmZmluZS1mb250LWJhc2UpOwp9Ci5mdmtiZmszIHsKICBmb250LXdlaWdodDogNjAwOwp9\\\"}!../../../../../../../../../../../node_modules/@vanilla-extract/webpack-plugin/extracted.js\"\nexport var inputContent = 'fvkbfk2';\nexport var modalHeader = 'fvkbfk1';\nexport var modalWrapper = 'fvkbfk0';\nexport var workspaceName = 'fvkbfk3';","import { Input } from '@affine/component';\nimport type { ConfirmModalProps } from '@affine/component/ui/modal';\nimport { ConfirmModal } from '@affine/component/ui/modal';\nimport { useWorkspaceInfo } from '@affine/core/hooks/use-workspace-info';\nimport { UNTITLED_WORKSPACE_NAME } from '@affine/env/constant';\nimport { WorkspaceFlavour } from '@affine/env/workspace';\nimport { Trans, useI18n } from '@affine/i18n';\nimport type { WorkspaceMetadata } from '@toeverything/infra';\nimport { useCallback, useState } from 'react';\n\nimport * as styles from './style.css';\n\ninterface WorkspaceDeleteProps extends ConfirmModalProps {\n workspaceMetadata: WorkspaceMetadata;\n onConfirm?: () => void;\n}\n\nexport const WorkspaceDeleteModal = ({\n workspaceMetadata,\n ...props\n}: WorkspaceDeleteProps) => {\n const { onConfirm } = props;\n const [deleteStr, setDeleteStr] = useState('');\n const info = useWorkspaceInfo(workspaceMetadata);\n const workspaceName = info?.name ?? UNTITLED_WORKSPACE_NAME;\n const allowDelete = deleteStr === workspaceName;\n const t = useI18n();\n\n const handleOnEnter = useCallback(() => {\n if (allowDelete) {\n return onConfirm?.();\n }\n }, [allowDelete, onConfirm]);\n\n return (\n \n {workspaceMetadata.flavour === WorkspaceFlavour.LOCAL ? (\n \n Deleting (\n \n {{ workspace: workspaceName } as any}\n \n ) cannot be undone, please proceed with caution. All contents will be\n lost.\n \n ) : (\n \n Deleting (\n \n {{ workspace: workspaceName } as any}\n \n ) will delete both local and cloud data, this operation cannot be\n undone, please proceed with caution.\n \n )}\n
\n \n
\n \n );\n};\n","import { notify } from '@affine/component';\nimport { SettingRow } from '@affine/component/setting-components';\nimport { ConfirmModal } from '@affine/component/ui/modal';\nimport { useAsyncCallback } from '@affine/core/hooks/affine-async-hooks';\nimport { WorkspacePermissionService } from '@affine/core/modules/permissions';\nimport { useI18n } from '@affine/i18n';\nimport { ArrowRightSmallIcon } from '@blocksuite/icons/rc';\nimport {\n GlobalContextService,\n useLiveData,\n useServices,\n WorkspaceService,\n WorkspacesService,\n} from '@toeverything/infra';\nimport { useSetAtom } from 'jotai';\nimport { useCallback, useEffect, useState } from 'react';\n\nimport { openSettingModalAtom } from '../../../../../../atoms';\nimport {\n RouteLogic,\n useNavigateHelper,\n} from '../../../../../../hooks/use-navigate-helper';\nimport { WorkspaceSubPath } from '../../../../../../shared';\nimport { WorkspaceDeleteModal } from './delete';\n\nexport const DeleteLeaveWorkspace = () => {\n const {\n workspaceService,\n globalContextService,\n workspacePermissionService,\n workspacesService,\n } = useServices({\n WorkspaceService,\n GlobalContextService,\n WorkspacePermissionService,\n WorkspacesService,\n });\n const t = useI18n();\n const workspace = workspaceService.workspace;\n const { jumpToSubPath, jumpToIndex } = useNavigateHelper();\n // fixme: cloud regression\n const [showDelete, setShowDelete] = useState(false);\n const [showLeave, setShowLeave] = useState(false);\n const setSettingModal = useSetAtom(openSettingModalAtom);\n\n const workspaceList = useLiveData(workspacesService.list.workspaces$);\n const currentWorkspaceId = useLiveData(\n globalContextService.globalContext.workspaceId.$\n );\n\n const isOwner = useLiveData(workspacePermissionService.permission.isOwner$);\n useEffect(() => {\n workspacePermissionService.permission.revalidate();\n }, [workspacePermissionService]);\n\n const onLeaveOrDelete = useCallback(() => {\n if (isOwner !== null) {\n if (isOwner) {\n setShowDelete(true);\n } else {\n setShowLeave(true);\n }\n }\n }, [isOwner]);\n\n const onDeleteConfirm = useAsyncCallback(async () => {\n setSettingModal(prev => ({ ...prev, open: false, workspaceId: null }));\n\n if (currentWorkspaceId === workspace.id) {\n const backWorkspace = workspaceList.find(\n ws => ws.id !== currentWorkspaceId\n );\n // TODO(@eyhn): if there is no workspace, jump to a new page(wait for design)\n if (backWorkspace) {\n jumpToSubPath(\n backWorkspace?.id || '',\n WorkspaceSubPath.ALL,\n RouteLogic.REPLACE\n );\n } else {\n jumpToIndex(RouteLogic.REPLACE);\n }\n }\n\n if (isOwner) {\n await workspacesService.deleteWorkspace(workspace.meta);\n } else {\n await workspacePermissionService.leaveWorkspace();\n }\n notify.success({ title: t['Successfully deleted']() });\n }, [\n setSettingModal,\n currentWorkspaceId,\n workspace.id,\n workspace.meta,\n isOwner,\n t,\n workspaceList,\n jumpToSubPath,\n jumpToIndex,\n workspacesService,\n workspacePermissionService,\n ]);\n\n return (\n <>\n \n {isOwner\n ? t['com.arms.workspaceDelete.title']()\n : t['com.arms.deleteLeaveWorkspace.leave']()}\n \n }\n desc={t['com.arms.deleteLeaveWorkspace.description']()}\n style={{ cursor: 'pointer' }}\n onClick={onLeaveOrDelete}\n data-testid=\"delete-workspace-button\"\n >\n \n \n {isOwner ? (\n \n ) : (\n \n )}\n \n );\n};\n","import { SettingRow } from '@affine/component/setting-components';\nimport { Button } from '@affine/component/ui/button';\nimport { useEnableCloud } from '@affine/core/hooks/affine/use-enable-cloud';\nimport { UNTITLED_WORKSPACE_NAME } from '@affine/env/constant';\nimport { WorkspaceFlavour } from '@affine/env/workspace';\nimport { useI18n } from '@affine/i18n';\nimport {\n useLiveData,\n useService,\n type Workspace,\n WorkspaceService,\n} from '@toeverything/infra';\nimport { useSetAtom } from 'jotai';\nimport { useCallback } from 'react';\n\nimport { openSettingModalAtom } from '../../../../../atoms';\n\nexport interface PublishPanelProps {\n workspace: Workspace | null;\n}\n\nexport const EnableCloudPanel = () => {\n const t = useI18n();\n const confirmEnableCloud = useEnableCloud();\n\n const workspace = useService(WorkspaceService).workspace;\n const name = useLiveData(workspace.name$);\n const flavour = workspace.flavour;\n\n const setSettingModal = useSetAtom(openSettingModalAtom);\n\n const confirmEnableCloudAndClose = useCallback(() => {\n if (!workspace) return;\n confirmEnableCloud(workspace, {\n onSuccess: () => {\n setSettingModal(settings => ({ ...settings, open: false }));\n },\n });\n }, [confirmEnableCloud, setSettingModal, workspace]);\n\n if (flavour !== WorkspaceFlavour.LOCAL) {\n return null;\n }\n\n return (\n \n \n {t['Enable AFFiNE Cloud']()}\n \n \n );\n};\n","import { notify } from '@affine/component';\nimport { SettingRow } from '@affine/component/setting-components';\nimport { Button } from '@affine/component/ui/button';\nimport { useAsyncCallback } from '@affine/core/hooks/affine-async-hooks';\nimport { useSystemOnline } from '@affine/core/hooks/use-system-online';\nimport { apis } from '@affine/electron-api';\nimport { useI18n } from '@affine/i18n';\nimport type { Workspace, WorkspaceMetadata } from '@toeverything/infra';\nimport { useState } from 'react';\n\ninterface ExportPanelProps {\n workspaceMetadata: WorkspaceMetadata;\n workspace: Workspace | null;\n}\n\nexport const ExportPanel = ({\n workspaceMetadata,\n workspace,\n}: ExportPanelProps) => {\n const workspaceId = workspaceMetadata.id;\n const t = useI18n();\n const [saving, setSaving] = useState(false);\n const isOnline = useSystemOnline();\n\n const onExport = useAsyncCallback(async () => {\n if (saving || !workspace) {\n return;\n }\n setSaving(true);\n try {\n if (isOnline) {\n await workspace.engine.waitForDocSynced();\n await workspace.engine.blob.sync();\n }\n\n const result = await apis?.dialog.saveDBFileAs(workspaceId);\n if (result?.error) {\n throw new Error(result.error);\n } else if (!result?.canceled) {\n notify.success({ title: t['Export success']() });\n }\n } catch (e: any) {\n notify.error({ title: t['Export failed'](), message: e.message });\n } finally {\n setSaving(false);\n }\n }, [isOnline, saving, t, workspace, workspaceId]);\n\n return (\n \n \n {t['Export']()}\n \n \n );\n};\n","import \"../core/src/components/affine/setting-modal/workspace-setting/new-workspace-setting-detail/style.css.ts.vanilla.css!=!../../../../../../../../../node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\\\"fileName\\\":\\\"../core/src/components/affine/setting-modal/workspace-setting/new-workspace-setting-detail/style.css.ts.vanilla.css\\\",\\\"source\\\":\\\"#H4sIAAAAAAAAA7VX7W7bIBT936dAkya1UonsNMk2+hh7gAmba5uNAALSOKv67hNgJ5g4abd2fyKZj/tx7rmHm8WPkur1nukCPd8gxLjVgh4IagT0jzcIUcFbibmDrY2LGCTzG1tqWi6xU5qgcqn7x5uXm8VorAzGwvHWqD1B5eOrxmuQDkxiWkDjCFoWme1lsL3nzHUElUXx+R9Mh6iXKx2OttSnUMSPEPPe+CX/O/H8kHpeb+KFDnjbudN3pQwDgw1lfGcJWsf4tLLccSUJMiCo40/gV+udscoQpBUfAwz+bWe4/EVQMXW/YNzSSkAIY7zLoKE74aKTYAbDE0hnCZJKwtQC6dQTGLSo6RYMxbxWMiSrwcyV/4OuXr70TixpZZXYOZgwIGaN0M+ddbw54FpJB9KlLLhAjorWv1qjdpLhWgkPrmkrersp7tGmvEebh3tULNZ3/uhvzCWDfiD2cPqJmluMadNwCXjfcQfhbKOkw5b/hpFyCTarFIaaivrWMxphtFnpHmFUrnV/N5uN7w6/4aB3OCQ0rk3MW03lXMP4YjbCt2bHGQN5NHXaACG4ttz6rZANtprW4BGOrTGfuBa0hk4JX7mwfwJhP9a3mDJ7HSKc7xGlac3dgaBisZrv4NQQIbRxA7mOUH369HgOwMi18XueVVGDioCO91ikbSuVR16oPbBJFJt5KX0rIf35744adwnhUCcLtZKMmkMCclCyQdU0ZYzLlqCvg7CdWDgxFtZ7ezfJ4EssyGhiNduOUfXTtslMJ/2kDd9OY43GCCp1j6wSnGV3o6/T+TM4g1IybqCOZauV2G3lLNCBt7gCtwfP9CTRb9NEC58qKlCZC9IA4lkQGalmhSV1N6jo8zXYwpEzpI6wf804/41I5W6JoNZh1WB30HAXHAydUinn1JagTXaPprKwXBcXMrwMc/5UZQ/3SI9h0UQkz57zanZU+Bh5usp5u51yvlpokJ4Gg3jMKFtG4uRyHbN41d+Vhj5vkY8BQQRODURe5pMaez3wIA5/qUT/I/ScOWMzHRfiYHR8MMq5mYgKMTHS/J/8s95bZ6G3b5phz2bRfxpqpuqxyV6Hpe6Ps+8rkhyL9FDkQ83fI3ZO9ZlKX2BFgmL3/trBVnfUcpuEMjOUT3RtlQkllz74SWB8OgDEE/jqX5Pk9s88rfE1elcWL38AhvG3u+oNAAA=\\\"}!../../../../../../../../../node_modules/@vanilla-extract/webpack-plugin/extracted.js\"\nexport var arrowRight = '_1ap5wdpj';\nexport var avatarWrapper = '_1ap5wdp3';\nexport var fakeWrapper = '_1ap5wdp5';\nexport var goUpgrade = '_1ap5wdph';\nexport var goUpgradeWrapper = '_1ap5wdpi';\nexport var iconButton = '_1ap5wdpe';\nexport var label = '_1ap5wdpf';\nexport var labelWrapper = '_1ap5wdp2';\nexport var memberContainer = '_1ap5wdpa';\nexport var memberEmail = '_1ap5wdpd';\nexport var memberList = '_1ap5wdp8';\nexport var memberListItem = '_1ap5wdp9';\nexport var memberName = '_1ap5wdpc';\nexport var membersFallback = '_1ap5wdp6';\nexport var membersPanel = '_1ap5wdp7';\nexport var profileHandlerWrapper = '_1ap5wdp1';\nexport var profileWrapper = '_1ap5wdp0';\nexport var roleOrStatus = '_1ap5wdpb';\nexport var urlButton = '_1ap5wdp4';\nexport var workspaceLabel = '_1ap5wdpg';","import { WorkspacePermissionService } from '@affine/core/modules/permissions';\nimport { useLiveData, useService, WorkspaceService } from '@toeverything/infra';\nimport { useEffect, useMemo } from 'react';\n\nimport * as style from './style.css';\n\ntype WorkspaceStatus =\n | 'local'\n | 'syncCloud'\n | 'syncDocker'\n | 'selfHosted'\n | 'joinedWorkspace'\n | 'availableOffline'\n | 'publishedToWeb';\n\ntype LabelProps = {\n value: string;\n background: string;\n};\n\ntype LabelMap = {\n [key in WorkspaceStatus]: LabelProps;\n};\ntype labelConditionsProps = {\n condition: boolean;\n label: WorkspaceStatus;\n};\nconst Label = ({ value, background }: LabelProps) => {\n return (\n
\n
\n {value}\n
\n
\n );\n};\nexport const LabelsPanel = () => {\n const workspace = useService(WorkspaceService).workspace;\n const permissionService = useService(WorkspacePermissionService);\n const isOwner = useLiveData(permissionService.permission.isOwner$);\n useEffect(() => {\n permissionService.permission.revalidate();\n }, [permissionService]);\n const labelMap: LabelMap = useMemo(\n () => ({\n local: {\n value: 'Local',\n background: 'var(--affine-tag-orange)',\n },\n syncCloud: {\n value: 'Sync with AFFiNE Cloud',\n background: 'var(--affine-tag-blue)',\n },\n syncDocker: {\n value: 'Sync with AFFiNE Docker',\n background: 'var(--affine-tag-green)',\n },\n selfHosted: {\n value: 'Self-Hosted Server',\n background: 'var(--affine-tag-purple)',\n },\n joinedWorkspace: {\n value: 'Joined Workspace',\n background: 'var(--affine-tag-yellow)',\n },\n availableOffline: {\n value: 'Available Offline',\n background: 'var(--affine-tag-green)',\n },\n publishedToWeb: {\n value: 'Published to Web',\n background: 'var(--affine-tag-blue)',\n },\n }),\n []\n );\n const labelConditions: labelConditionsProps[] = [\n { condition: !isOwner, label: 'joinedWorkspace' },\n { condition: workspace.flavour === 'local', label: 'local' },\n {\n condition: workspace.flavour === 'affine-cloud',\n label: 'syncCloud',\n },\n ];\n\n return (\n
\n {labelConditions.map(\n ({ condition, label }) =>\n condition && (\n \n )\n )}\n
\n );\n};\n","import { useCallback } from 'react';\nimport { useSWRConfig } from 'swr';\n\nexport function useMutateCloud() {\n const { mutate } = useSWRConfig();\n return useCallback(async () => {\n // TODO(@eyhn): should not mutate all graphql cache\n return mutate(key => {\n if (Array.isArray(key)) {\n return key[0] === 'cloud';\n }\n return false;\n });\n }, [mutate]);\n}\n","import type { GetMembersByWorkspaceIdQuery } from '@affine/graphql';\nimport { getMembersByWorkspaceIdQuery, Permission } from '@affine/graphql';\nimport { useMemo } from 'react';\n\nimport { useQuery } from '../use-query';\n\nexport function calculateWeight(member: Member) {\n const permissionWeight = {\n [Permission.Owner]: 4,\n [Permission.Admin]: 3,\n [Permission.Write]: 2,\n [Permission.Read]: 1,\n };\n\n const factors = [\n Number(member.permission === Permission.Owner), // Owner weight is the highest\n Number(!member.accepted), // Unaccepted members are before accepted members\n permissionWeight[member.permission] || 0,\n ];\n\n return factors.reduce((ret, factor, index, arr) => {\n return ret + factor * Math.pow(10, arr.length - 1 - index);\n }, 0);\n}\n\nexport type Member = Omit<\n GetMembersByWorkspaceIdQuery['workspace']['members'][number],\n '__typename'\n>;\nexport function useMembers(\n workspaceId: string,\n skip: number,\n take: number = 8\n) {\n const { data } = useQuery({\n query: getMembersByWorkspaceIdQuery,\n variables: {\n workspaceId,\n skip,\n take,\n },\n });\n\n const members = data.workspace.members;\n\n return useMemo(() => {\n // sort members by weight\n return members.sort((a, b) => {\n const weightDifference = calculateWeight(b) - calculateWeight(a);\n if (weightDifference !== 0) {\n return weightDifference;\n }\n // if weight is the same, sort by name\n if (a.name === null) return 1;\n if (b.name === null) return -1;\n return a.name.localeCompare(b.name);\n });\n }, [members]);\n}\n","import { notify } from '@affine/component';\nimport type {\n InviteModalProps,\n PaginationProps,\n} from '@affine/component/member-components';\nimport {\n InviteModal,\n MemberLimitModal,\n Pagination,\n} from '@affine/component/member-components';\nimport { SettingRow } from '@affine/component/setting-components';\nimport { Avatar } from '@affine/component/ui/avatar';\nimport { Button, IconButton } from '@affine/component/ui/button';\nimport { Loading } from '@affine/component/ui/loading';\nimport { Menu, MenuItem } from '@affine/component/ui/menu';\nimport { Tooltip } from '@affine/component/ui/tooltip';\nimport { openSettingModalAtom } from '@affine/core/atoms';\nimport { AffineErrorBoundary } from '@affine/core/components/affine/affine-error-boundary';\nimport { useInviteMember } from '@affine/core/hooks/affine/use-invite-member';\nimport { useMemberCount } from '@affine/core/hooks/affine/use-member-count';\nimport type { Member } from '@affine/core/hooks/affine/use-members';\nimport { useMembers } from '@affine/core/hooks/affine/use-members';\nimport { useRevokeMemberPermission } from '@affine/core/hooks/affine/use-revoke-member-permission';\nimport { track } from '@affine/core/mixpanel';\nimport { WorkspacePermissionService } from '@affine/core/modules/permissions';\nimport { WorkspaceQuotaService } from '@affine/core/modules/quota';\nimport { WorkspaceFlavour } from '@affine/env/workspace';\nimport { Permission } from '@affine/graphql';\nimport { useI18n } from '@affine/i18n';\nimport { MoreVerticalIcon } from '@blocksuite/icons/rc';\nimport {\n useEnsureLiveData,\n useLiveData,\n useService,\n WorkspaceService,\n} from '@toeverything/infra';\nimport clsx from 'clsx';\nimport { useSetAtom } from 'jotai';\nimport type { ReactElement } from 'react';\nimport {\n Suspense,\n useCallback,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport {\n type AuthAccountInfo,\n AuthService,\n ServerConfigService,\n SubscriptionService,\n} from '../../../../../modules/cloud';\nimport * as style from './style.css';\n\nconst COUNT_PER_PAGE = 8;\ntype OnRevoke = (memberId: string) => void;\nconst MembersPanelLocal = () => {\n const t = useI18n();\n return (\n \n
\n \n \n \n
\n
\n );\n};\n\nexport const CloudWorkspaceMembersPanel = () => {\n const serverConfig = useService(ServerConfigService).serverConfig;\n const hasPaymentFeature = useLiveData(\n serverConfig.features$.map(f => f?.payment)\n );\n const workspace = useService(WorkspaceService).workspace;\n const memberCount = useMemberCount(workspace.id);\n\n const permissionService = useService(WorkspacePermissionService);\n const isOwner = useLiveData(permissionService.permission.isOwner$);\n useEffect(() => {\n permissionService.permission.revalidate();\n }, [permissionService]);\n\n const checkMemberCountLimit = useCallback(\n (memberCount: number, memberLimit?: number) => {\n if (memberLimit === undefined) return false;\n return memberCount >= memberLimit;\n },\n []\n );\n\n const workspaceQuotaService = useService(WorkspaceQuotaService);\n useEffect(() => {\n workspaceQuotaService.quota.revalidate();\n }, [workspaceQuotaService]);\n const workspaceQuota = useLiveData(workspaceQuotaService.quota.quota$);\n const subscriptionService = useService(SubscriptionService);\n const plan = useLiveData(\n subscriptionService.subscription.pro$.map(s => s?.plan)\n );\n const isLimited = workspaceQuota\n ? checkMemberCountLimit(memberCount, workspaceQuota.memberLimit)\n : null;\n\n const t = useI18n();\n const { invite, isMutating } = useInviteMember(workspace.id);\n const revokeMemberPermission = useRevokeMemberPermission(workspace.id);\n\n const [open, setOpen] = useState(false);\n const [memberSkip, setMemberSkip] = useState(0);\n\n const openModal = useCallback(() => {\n setOpen(true);\n }, []);\n\n const onPageChange = useCallback(offset => {\n setMemberSkip(offset);\n }, []);\n\n const onInviteConfirm = useCallback(\n async ({ email, permission }) => {\n const success = await invite(\n email,\n permission,\n // send invite email\n true\n );\n if (success) {\n notify.success({\n title: t['Invitation sent'](),\n message: t['Invitation sent hint'](),\n });\n setOpen(false);\n }\n },\n [invite, t]\n );\n\n const setSettingModalAtom = useSetAtom(openSettingModalAtom);\n const handleUpgradeConfirm = useCallback(() => {\n setSettingModalAtom({\n open: true,\n activeTab: 'plans',\n scrollAnchor: 'cloudPricingPlan',\n });\n track.$.settingsPanel.workspace.viewPlans({\n control: 'inviteMember',\n });\n }, [setSettingModalAtom]);\n\n const listContainerRef = useRef(null);\n const [memberListHeight, setMemberListHeight] = useState(null);\n\n useLayoutEffect(() => {\n if (\n memberCount > COUNT_PER_PAGE &&\n listContainerRef.current &&\n memberListHeight === null\n ) {\n const rect = listContainerRef.current.getBoundingClientRect();\n setMemberListHeight(rect.height);\n }\n }, [listContainerRef, memberCount, memberListHeight]);\n\n const onRevoke = useCallback(\n async memberId => {\n const res = await revokeMemberPermission(memberId);\n if (res?.revoke) {\n notify.success({ title: t['Removed successfully']() });\n }\n },\n [revokeMemberPermission, t]\n );\n\n const desc = useMemo(() => {\n if (!workspaceQuota) return null;\n return (\n \n {t['com.arms.payment.member.description2']()}\n {hasPaymentFeature ? (\n \n \n {t['com.arms.payment.member.description.choose-plan']()}\n \n \n ) : null}\n \n );\n }, [handleUpgradeConfirm, hasPaymentFeature, t, workspaceQuota]);\n\n if (workspaceQuota === null) {\n // TODO(@eyhn): loading ui\n return null;\n }\n\n return (\n <>\n \n {isOwner ? (\n <>\n \n {isLimited ? (\n \n ) : (\n \n )}\n \n ) : null}\n \n\n \n }>\n \n \n\n {memberCount > COUNT_PER_PAGE && (\n \n )}\n \n \n );\n};\nexport const MembersPanelFallback = () => {\n const t = useI18n();\n\n return (\n <>\n \n
\n \n
\n \n );\n};\n\nconst MemberListFallback = ({ memberCount }: { memberCount: number }) => {\n // prevent page jitter\n const height = useMemo(() => {\n if (memberCount > COUNT_PER_PAGE) {\n // height and margin-bottom\n return COUNT_PER_PAGE * 58 + (COUNT_PER_PAGE - 1) * 6;\n }\n return 'auto';\n }, [memberCount]);\n const t = useI18n();\n\n return (\n \n \n {t['com.arms.settings.member.loading']()}\n \n );\n};\n\nconst MemberList = ({\n workspaceId,\n isOwner,\n skip,\n onRevoke,\n}: {\n workspaceId: string;\n isOwner: boolean;\n skip: number;\n onRevoke: OnRevoke;\n}) => {\n const members = useMembers(workspaceId, skip, COUNT_PER_PAGE);\n const session = useService(AuthService).session;\n const account = useEnsureLiveData(session.account$);\n\n return (\n
\n {members.map(member => (\n \n ))}\n
\n );\n};\n\nconst MemberItem = ({\n member,\n isOwner,\n currentAccount,\n onRevoke,\n}: {\n member: Member;\n isOwner: boolean;\n currentAccount: AuthAccountInfo;\n onRevoke: OnRevoke;\n}) => {\n const t = useI18n();\n\n const handleRevoke = useCallback(() => {\n onRevoke(member.id);\n }, [onRevoke, member.id]);\n\n const operationButtonInfo = useMemo(() => {\n return {\n show: isOwner && currentAccount.id !== member.id,\n leaveOrRevokeText: t['Remove from workspace'](),\n };\n }, [currentAccount.id, isOwner, member.id, t]);\n\n return (\n \n \n
\n {member.name ? (\n <>\n
{member.name}
\n
{member.email}
\n \n ) : (\n
{member.email}
\n )}\n
\n \n {member.accepted\n ? member.permission === Permission.Owner\n ? 'Workspace Owner'\n : 'Member'\n : 'Pending'}\n \n \n {operationButtonInfo.leaveOrRevokeText}\n \n }\n >\n \n \n \n \n \n );\n};\n\nexport const MembersPanel = (): ReactElement | null => {\n const workspace = useService(WorkspaceService).workspace;\n if (workspace.flavour === WorkspaceFlavour.LOCAL) {\n return ;\n }\n return (\n \n }>\n \n \n \n );\n};\n","import { getMemberCountByWorkspaceIdQuery } from '@affine/graphql';\n\nimport { useQuery } from '../use-query';\n\nexport function useMemberCount(workspaceId: string) {\n const { data } = useQuery({\n query: getMemberCountByWorkspaceIdQuery,\n variables: {\n workspaceId,\n },\n });\n\n return data.workspace.memberCount;\n}\n","import type { Permission } from '@affine/graphql';\nimport { inviteByEmailMutation } from '@affine/graphql';\nimport { useCallback } from 'react';\n\nimport { useMutation } from '../use-mutation';\nimport { useMutateCloud } from './use-mutate-cloud';\n\nexport function useInviteMember(workspaceId: string) {\n const { trigger, isMutating } = useMutation({\n mutation: inviteByEmailMutation,\n });\n const mutate = useMutateCloud();\n return {\n invite: useCallback(\n async (email: string, permission: Permission, sendInviteMail = false) => {\n const res = await trigger({\n workspaceId,\n email,\n permission,\n sendInviteMail,\n });\n await mutate();\n // return is successful\n return res?.invite;\n },\n [mutate, trigger, workspaceId]\n ),\n isMutating,\n };\n}\n","import { revokeMemberPermissionMutation } from '@affine/graphql';\nimport { useCallback } from 'react';\n\nimport { useMutation } from '../use-mutation';\nimport { useMutateCloud } from './use-mutate-cloud';\n\nexport function useRevokeMemberPermission(workspaceId: string) {\n const mutate = useMutateCloud();\n const { trigger } = useMutation({\n mutation: revokeMemberPermissionMutation,\n });\n\n return useCallback(\n async (userId: string) => {\n const res = await trigger({\n workspaceId,\n userId,\n });\n await mutate();\n return res;\n },\n [mutate, trigger, workspaceId]\n );\n}\n","import { FlexWrapper, Input, notify, Wrapper } from '@affine/component';\nimport { Button } from '@affine/component/ui/button';\nimport { WorkspaceAvatar } from '@affine/component/workspace-avatar';\nimport { Upload } from '@affine/core/components/pure/file-upload';\nimport { useCatchEventCallback } from '@affine/core/hooks/use-catch-event-hook';\nimport { WorkspacePermissionService } from '@affine/core/modules/permissions';\nimport { validateAndReduceImage } from '@affine/core/utils/reduce-image';\nimport { UNTITLED_WORKSPACE_NAME } from '@affine/env/constant';\nimport { useI18n } from '@affine/i18n';\nimport { CameraIcon } from '@blocksuite/icons/rc';\nimport { useLiveData, useService, WorkspaceService } from '@toeverything/infra';\nimport type { KeyboardEvent } from 'react';\nimport { useCallback, useEffect, useState } from 'react';\n\nimport * as style from './style.css';\n\nexport const ProfilePanel = () => {\n const t = useI18n();\n\n const workspace = useService(WorkspaceService).workspace;\n const permissionService = useService(WorkspacePermissionService);\n const isOwner = useLiveData(permissionService.permission.isOwner$);\n useEffect(() => {\n permissionService.permission.revalidate();\n }, [permissionService]);\n const workspaceIsReady = useLiveData(workspace?.engine.rootDocState$)?.ready;\n\n const [name, setName] = useState('');\n\n useEffect(() => {\n if (workspace?.docCollection) {\n setName(workspace.docCollection.meta.name ?? UNTITLED_WORKSPACE_NAME);\n const dispose = workspace.docCollection.meta.commonFieldsUpdated.on(\n () => {\n setName(workspace.docCollection.meta.name ?? UNTITLED_WORKSPACE_NAME);\n }\n );\n return () => {\n dispose.dispose();\n };\n } else {\n setName(UNTITLED_WORKSPACE_NAME);\n }\n return;\n }, [workspace]);\n\n const setWorkspaceAvatar = useCallback(\n async (file: File | null) => {\n if (!workspace) {\n return;\n }\n if (!file) {\n workspace.docCollection.meta.setAvatar('');\n return;\n }\n try {\n const reducedFile = await validateAndReduceImage(file);\n const blobs = workspace.docCollection.blobSync;\n const blobId = await blobs.set(reducedFile);\n workspace.docCollection.meta.setAvatar(blobId);\n } catch (error) {\n console.error(error);\n throw error;\n }\n },\n [workspace]\n );\n\n const setWorkspaceName = useCallback(\n (name: string) => {\n if (!workspace) {\n return;\n }\n workspace.docCollection.meta.setName(name);\n },\n [workspace]\n );\n\n const [input, setInput] = useState('');\n useEffect(() => {\n setInput(name);\n }, [name]);\n\n const handleUpdateWorkspaceName = useCallback(\n (name: string) => {\n setWorkspaceName(name);\n notify.success({ title: t['Update workspace name success']() });\n },\n [setWorkspaceName, t]\n );\n\n const handleSetInput = useCallback((value: string) => {\n setInput(value);\n }, []);\n\n const handleKeyUp = useCallback(\n (e: KeyboardEvent) => {\n if (e.code === 'Enter' && name !== input) {\n handleUpdateWorkspaceName(input);\n }\n },\n [handleUpdateWorkspaceName, input, name]\n );\n\n const handleClick = useCallback(() => {\n handleUpdateWorkspaceName(input);\n }, [handleUpdateWorkspaceName, input]);\n\n const handleRemoveUserAvatar = useCatchEventCallback(async () => {\n await setWorkspaceAvatar(null);\n }, [setWorkspaceAvatar]);\n\n const handleUploadAvatar = useCallback(\n (file: File) => {\n setWorkspaceAvatar(file)\n .then(() => {\n notify.success({ title: 'Update workspace avatar success' });\n })\n .catch(error => {\n notify.error({\n title: 'Update workspace avatar failed',\n message: error,\n });\n });\n },\n [setWorkspaceAvatar]\n );\n\n const canAdjustAvatar = workspaceIsReady && isOwner;\n\n return (\n
\n \n : undefined}\n onRemove={canAdjustAvatar ? handleRemoveUserAvatar : undefined}\n avatarTooltipOptions={\n canAdjustAvatar\n ? { content: t['Click to replace photo']() }\n : undefined\n }\n removeTooltipOptions={\n canAdjustAvatar ? { content: t['Remove photo']() } : undefined\n }\n data-testid=\"workspace-setting-avatar\"\n removeButtonProps={{\n ['data-testid' as string]: 'workspace-setting-remove-avatar-button',\n }}\n />\n \n\n \n
{t['Workspace Name']()}
\n \n \n {input === name ? null : (\n \n {t['com.arms.editCollection.save']()}\n \n )}\n \n
\n
\n );\n};\n","import {\n SettingHeader,\n SettingRow,\n SettingWrapper,\n} from '@affine/component/setting-components';\nimport { useWorkspace } from '@affine/core/hooks/use-workspace';\nimport { useWorkspaceInfo } from '@affine/core/hooks/use-workspace-info';\nimport { UNTITLED_WORKSPACE_NAME } from '@affine/env/constant';\nimport { useI18n } from '@affine/i18n';\nimport { ArrowRightSmallIcon } from '@blocksuite/icons/rc';\nimport { FrameworkScope } from '@toeverything/infra';\nimport { useCallback } from 'react';\n\nimport { DeleteLeaveWorkspace } from './delete-leave-workspace';\nimport { EnableCloudPanel } from './enable-cloud';\nimport { ExportPanel } from './export';\nimport { LabelsPanel } from './labels';\nimport { MembersPanel } from './members';\nimport { ProfilePanel } from './profile';\nimport type { WorkspaceSettingDetailProps } from './types';\n\nexport const WorkspaceSettingDetail = ({\n workspaceMetadata,\n}: WorkspaceSettingDetailProps) => {\n const t = useI18n();\n\n // useWorkspace hook is a vary heavy operation here, but we need syncing name and avatar changes here,\n // we don't have a better way to do this now\n const workspace = useWorkspace(workspaceMetadata);\n\n const workspaceInfo = useWorkspaceInfo(workspaceMetadata);\n\n const handleResetSyncStatus = useCallback(() => {\n workspace?.engine.doc\n .resetSyncStatus()\n .then(() => {\n window.location.reload();\n })\n .catch(err => {\n console.error(err);\n });\n }, [workspace]);\n\n if (!workspace) {\n return null;\n }\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n {environment.isDesktop && (\n \n \n \n )}\n \n \n \n {t['com.arms.resetSyncStatus.button']()}\n \n }\n desc={t['com.arms.resetSyncStatus.description']()}\n style={{ cursor: 'pointer' }}\n onClick={handleResetSyncStatus}\n data-testid=\"reset-sync-status\"\n >\n \n \n \n \n );\n};\n","import \"../core/src/components/affine/setting-modal/workspace-setting/properties/styles.css.ts.vanilla.css!=!../../../../../../../../../node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\\\"fileName\\\":\\\"../core/src/components/affine/setting-modal/workspace-setting/properties/styles.css.ts.vanilla.css\\\",\\\"source\\\":\\\"#H4sIAAAAAAAAA7VVwW7bMAy95yt4GbAeVNhpkqUq9iVDD7JF22xlSZDk2t2wfx8spYmTLIFTbCdbovz4HvlE37/U/Sp/zODXAkCSt0q8c6gUDk8LiE8myWEZyGgOpVFdq8dITzI0HPIs+zIuXzofqHpnpdEBdeBQog7onha/F/cpQz4vgzP9X/G8FSWyAkOPGAkIRbVmFLD1h2wAVkhJuuawsQNk404rXE2aFSYE03LIN3aY0FreRGt20lrYuBrfTRcUaeSgjcZxIzihPSXgQpSvtTOdlpDdLz2g8Dil90OKIFhDdaOobsJzpHv4iMObcF8ZE1VFGtkhwDyWRkvhxhoq4+4moA+3NjuqWSU118u5itAx4wk1Ko3eUwGojA7M0088g1hfhAg4BGYdtVNVR1BHx9N+G8+YN3SVMj2HhqRMDopwhwAqRdaTj+5uKCCLnhvb1jthpwxTUzqtRYvye3AdPl8kbZUosTFKojvvxOa61vMezlN7nf63mPTkAjc42osn9xbGjXSDsRxyO4A3iuSJ09KRM0XbCB6tVLuxrPkk+HhdriQvCoVzxQ5+mlj8n1Ke2H17ZNXiXwyPeLm26XLNYRTf+1271lls2E2y99Nqa4fd5QNoSbOdJZab7EhlmVp6jVrD1ncT4zghqfP7kXFWoAuVuPgT2bv1YZkQP9z6sY4V940j/Xpk4bn2/fRI/QP7B6aKPwcAAA==\\\"}!../../../../../../../../../node_modules/@vanilla-extract/webpack-plugin/extracted.js\"\nexport var divider = 'jgw4197';\nexport var listHeader = 'jgw4191';\nexport var main = 'jgw4190';\nexport var metaList = 'jgw4193';\nexport var propertyDocCount = 'jgw4196';\nexport var propertyIcon = 'jgw4194';\nexport var propertyName = 'jgw4195';\nexport var propertyNameIconEditable = 'jgw419c';\nexport var propertyRequired = 'jgw4199';\nexport var propertyRow = 'jgw4192';\nexport var propertyRowNamePopupRow = 'jgw419b';\nexport var spacer = 'jgw4198';\nexport var subListHeader = 'jgw419a';","import { Button, IconButton, Menu } from '@affine/component';\nimport { SettingHeader } from '@affine/component/setting-components';\nimport { useWorkspaceInfo } from '@affine/core/hooks/use-workspace-info';\nimport type { PageInfoCustomPropertyMeta } from '@affine/core/modules/properties/services/schema';\nimport { Trans, useI18n } from '@affine/i18n';\nimport {\n DeleteIcon,\n FilterIcon,\n MoreHorizontalIcon,\n} from '@blocksuite/icons/rc';\nimport { FrameworkScope, type WorkspaceMetadata } from '@toeverything/infra';\nimport type { MouseEvent } from 'react';\nimport {\n createContext,\n Fragment,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react';\n\nimport { useCurrentWorkspacePropertiesAdapter } from '../../../../../hooks/use-affine-adapter';\nimport { useWorkspace } from '../../../../../hooks/use-workspace';\nimport type { PagePropertyIcon } from '../../../page-properties';\nimport {\n nameToIcon,\n PagePropertiesCreatePropertyMenuItems,\n PagePropertiesMetaManager,\n} from '../../../page-properties';\nimport { ConfirmDeletePropertyModal } from '../../../page-properties/confirm-delete-property-modal';\nimport type { MenuItemOption } from '../../../page-properties/menu-items';\nimport {\n EditPropertyNameMenuItem,\n PropertyTypeMenuItem,\n renderMenuItemOptions,\n} from '../../../page-properties/menu-items';\nimport * as styles from './styles.css';\n\n// @ts-expect-error this should always be set\nconst managerContext = createContext();\n\nconst usePagePropertiesMetaManager = () => {\n // the workspace properties adapter adapter is reactive,\n // which means it's reference will change when any of the properties change\n // also it will trigger a re-render of the component\n const adapter = useCurrentWorkspacePropertiesAdapter();\n const manager = useMemo(() => {\n return new PagePropertiesMetaManager(adapter);\n }, [adapter]);\n return manager;\n};\n\nconst Divider = () => {\n return
;\n};\n\nconst EditPropertyButton = ({\n property,\n}: {\n property: PageInfoCustomPropertyMeta;\n}) => {\n const t = useI18n();\n const manager = useContext(managerContext);\n const [localPropertyMeta, setLocalPropertyMeta] = useState(() => ({\n ...property,\n }));\n useEffect(() => {\n setLocalPropertyMeta(property);\n }, [property]);\n const handleToggleRequired = useCallback(() => {\n manager.updatePropertyMeta(localPropertyMeta.id, {\n required: !localPropertyMeta.required,\n });\n }, [manager, localPropertyMeta.id, localPropertyMeta.required]);\n const handleDelete = useCallback(() => {\n manager.removePropertyMeta(localPropertyMeta.id);\n }, [manager, localPropertyMeta.id]);\n const [open, setOpen] = useState(false);\n const [editing, setEditing] = useState(false);\n const [showDeleteModal, setShowDeleteModal] = useState(false);\n\n const handleFinishEditing = useCallback(() => {\n setOpen(false);\n setEditing(false);\n manager.updatePropertyMeta(localPropertyMeta.id, localPropertyMeta);\n }, [localPropertyMeta, manager]);\n\n const defaultMenuItems = useMemo(() => {\n const options: MenuItemOption[] = [];\n options.push({\n text: t['com.arms.settings.workspace.properties.set-as-required'](),\n onClick: handleToggleRequired,\n checked: localPropertyMeta.required,\n });\n options.push('-');\n options.push({\n text: t['com.arms.settings.workspace.properties.edit-property'](),\n onClick: e => {\n e.preventDefault();\n setEditing(true);\n },\n });\n options.push({\n text: t['com.arms.settings.workspace.properties.delete-property'](),\n onClick: () => setShowDeleteModal(true),\n type: 'danger',\n icon: ,\n });\n return renderMenuItemOptions(options);\n }, [handleToggleRequired, localPropertyMeta.required, t]);\n\n const handleNameBlur = useCallback(\n (e: string) => {\n manager.updatePropertyMeta(localPropertyMeta.id, {\n name: e,\n });\n },\n [manager, localPropertyMeta.id]\n );\n const handleNameChange = useCallback((e: string) => {\n setLocalPropertyMeta(prev => ({\n ...prev,\n name: e,\n }));\n }, []);\n const handleIconChange = useCallback(\n (icon: PagePropertyIcon) => {\n setLocalPropertyMeta(prev => ({\n ...prev,\n icon,\n }));\n manager.updatePropertyMeta(localPropertyMeta.id, {\n icon,\n });\n },\n [localPropertyMeta.id, manager]\n );\n const editMenuItems = useMemo(() => {\n const options: MenuItemOption[] = [];\n options.push(\n \n );\n options.push();\n options.push('-');\n options.push({\n text: t['com.arms.settings.workspace.properties.delete-property'](),\n onClick: handleDelete,\n type: 'danger',\n icon: ,\n });\n return renderMenuItemOptions(options);\n }, [\n handleDelete,\n handleIconChange,\n handleNameBlur,\n handleNameChange,\n localPropertyMeta,\n t,\n ]);\n\n return (\n <>\n \n setOpen(true)} size=\"20\">\n \n \n \n {\n setShowDeleteModal(false);\n handleDelete();\n }}\n onCancel={() => setShowDeleteModal(false)}\n show={showDeleteModal}\n property={property}\n />\n \n );\n};\n\nconst CustomPropertyRow = ({\n property,\n relatedPages,\n}: {\n relatedPages: string[];\n property: PageInfoCustomPropertyMeta;\n}) => {\n const Icon = nameToIcon(property.icon, property.type);\n const required = property.required;\n const t = useI18n();\n return (\n \n \n
\n {property.name || t['unnamed']()}\n
\n {relatedPages.length > 0 ? (\n
\n ยท{' '}\n 1\n ? 'com.arms.settings.workspace.properties.doc_others'\n : 'com.arms.settings.workspace.properties.doc'\n }\n count={relatedPages.length}\n >\n {{ count: relatedPages.length } as any} doc\n \n
\n ) : null}\n
\n {required ? (\n
\n {t['com.arms.page-properties.property.required']()}\n
\n ) : null}\n \n
\n );\n};\n\nconst propertyFilterModes = ['all', 'in-use', 'unused'] as const;\ntype PropertyFilterMode = (typeof propertyFilterModes)[number];\n\nconst CustomPropertyRows = ({\n properties,\n statistics,\n}: {\n properties: PageInfoCustomPropertyMeta[];\n statistics: Map>;\n}) => {\n return (\n
\n {properties.map(property => {\n const pages = [...(statistics.get(property.id) ?? [])];\n return (\n \n \n \n \n );\n })}\n
\n );\n};\n\nconst CustomPropertyRowsList = ({\n filterMode,\n}: {\n filterMode: PropertyFilterMode;\n}) => {\n const manager = useContext(managerContext);\n const properties = manager.getOrderedPropertiesSchema();\n const statistics = manager.getPropertyStatistics();\n const t = useI18n();\n\n if (filterMode !== 'all') {\n const filtered = properties.filter(property => {\n const count = statistics.get(property.id)?.size ?? 0;\n return filterMode === 'in-use' ? count > 0 : count === 0;\n });\n\n return ;\n } else {\n const required = properties.filter(property => property.required);\n const optional = properties.filter(property => !property.required);\n return (\n <>\n {required.length > 0 ? (\n <>\n
\n {t[\n 'com.arms.settings.workspace.properties.required-properties'\n ]()}\n
\n \n \n ) : null}\n\n {optional.length > 0 ? (\n <>\n
\n {t['com.arms.settings.workspace.properties.general-properties']()}\n
\n \n \n ) : null}\n \n );\n }\n};\n\nconst WorkspaceSettingPropertiesMain = () => {\n const t = useI18n();\n const manager = useContext(managerContext);\n const [filterMode, setFilterMode] = useState('all');\n const properties = manager.getOrderedPropertiesSchema();\n const filterMenuItems = useMemo(() => {\n const options: MenuItemOption[] = (\n ['all', '-', 'in-use', 'unused'] as const\n ).map(mode => {\n return mode === '-'\n ? '-'\n : {\n text: t[`com.arms.settings.workspace.properties.${mode}`](),\n onClick: () => setFilterMode(mode),\n checked: filterMode === mode,\n };\n });\n return renderMenuItemOptions(options);\n }, [filterMode, t]);\n\n const onPropertyCreated = useCallback((_e: MouseEvent, id: string) => {\n setTimeout(() => {\n const newRow = document.querySelector(\n `[data-testid=\"custom-property-row\"][data-property-id=\"${id}\"]`\n );\n if (newRow) {\n newRow.scrollIntoView({ behavior: 'smooth' });\n newRow.dataset.highlight = '';\n setTimeout(() => {\n delete newRow.dataset.highlight;\n }, 3000);\n }\n });\n }, []);\n return (\n
\n
\n {properties.length > 0 ? (\n \n \n \n ) : null}\n \n }\n >\n \n \n
\n \n
\n );\n};\n\nconst WorkspaceSettingPropertiesInner = () => {\n const manager = usePagePropertiesMetaManager();\n return (\n \n \n \n );\n};\n\nexport const WorkspaceSettingProperties = ({\n workspaceMetadata,\n}: {\n workspaceMetadata: WorkspaceMetadata;\n}) => {\n const t = useI18n();\n const workspace = useWorkspace(workspaceMetadata);\n const workspaceInfo = useWorkspaceInfo(workspaceMetadata);\n const title = workspaceInfo?.name || 'untitled';\n\n if (workspace === null) {\n return null;\n }\n\n return (\n \n \n Manage workspace name properties\n \n }\n />\n \n \n );\n};\n","import type { WorkspaceMetadata } from '@toeverything/infra';\n\nimport type { WorkspaceSubTab } from '../types';\nimport { WorkspaceSettingDetail } from './new-workspace-setting-detail';\nimport { WorkspaceSettingProperties } from './properties';\n\nexport const WorkspaceSetting = ({\n workspaceMetadata,\n subTab,\n}: {\n workspaceMetadata: WorkspaceMetadata;\n subTab: WorkspaceSubTab;\n}) => {\n switch (subTab) {\n case 'preference':\n return ;\n case 'properties':\n return (\n \n );\n }\n};\n","import { Loading, Scrollable } from '@affine/component';\nimport { WorkspaceDetailSkeleton } from '@affine/component/setting-components';\nimport type { ModalProps } from '@affine/component/ui/modal';\nimport { Modal } from '@affine/component/ui/modal';\nimport {\n openIssueFeedbackModalAtom,\n openStarAFFiNEModalAtom,\n} from '@affine/core/atoms';\nimport { AuthService } from '@affine/core/modules/cloud';\nimport { Trans } from '@affine/i18n';\nimport { ContactWithUsIcon } from '@blocksuite/icons/rc';\nimport {\n useLiveData,\n useService,\n type WorkspaceMetadata,\n} from '@toeverything/infra';\nimport { useSetAtom } from 'jotai';\nimport { debounce } from 'lodash-es';\nimport {\n Suspense,\n useCallback,\n useEffect,\n useLayoutEffect,\n useRef,\n} from 'react';\n\nimport { AccountSetting } from './account-setting';\nimport { settingModalScrollContainerAtom } from './atoms';\nimport { GeneralSetting } from './general-setting';\nimport { SettingSidebar } from './setting-sidebar';\nimport * as style from './style.css';\nimport type { ActiveTab, GeneralSettingKey, WorkspaceSubTab } from './types';\nimport { GeneralSettingKeys } from './types';\nimport { WorkspaceSetting } from './workspace-setting';\n\nexport interface SettingProps extends ModalProps {\n activeTab: ActiveTab;\n workspaceMetadata?: WorkspaceMetadata | null;\n onSettingClick: (params: {\n activeTab: ActiveTab;\n workspaceMetadata: WorkspaceMetadata | null;\n }) => void;\n}\n\nconst isGeneralSetting = (key: string): key is GeneralSettingKey =>\n GeneralSettingKeys.includes(key as GeneralSettingKey);\n\nconst CenteredLoading = () => {\n return (\n
\n \n
\n );\n};\n\nconst SettingModalInner = ({\n activeTab = 'appearance',\n workspaceMetadata = null,\n onSettingClick,\n ...modalProps\n}: SettingProps) => {\n const loginStatus = useLiveData(useService(AuthService).session.status$);\n\n const modalContentRef = useRef(null);\n const modalContentWrapperRef = useRef(null);\n const setSettingModalScrollContainer = useSetAtom(\n settingModalScrollContainerAtom\n );\n\n useLayoutEffect(() => {\n if (!modalProps.open) return;\n let animationFrameId: number;\n const onResize = debounce(() => {\n cancelAnimationFrame(animationFrameId);\n animationFrameId = requestAnimationFrame(() => {\n if (!modalContentRef.current || !modalContentWrapperRef.current) return;\n\n const wrapperWidth = modalContentWrapperRef.current.offsetWidth;\n const wrapperHeight = modalContentWrapperRef.current.offsetHeight;\n const contentWidth = modalContentRef.current.offsetWidth;\n\n const wrapper = modalContentWrapperRef.current;\n\n wrapper?.style.setProperty(\n '--setting-modal-width',\n `${wrapperWidth}px`\n );\n wrapper?.style.setProperty(\n '--setting-modal-height',\n `${wrapperHeight}px`\n );\n wrapper?.style.setProperty(\n '--setting-modal-content-width',\n `${contentWidth}px`\n );\n wrapper?.style.setProperty(\n '--setting-modal-gap-x',\n `${(wrapperWidth - contentWidth) / 2}px`\n );\n });\n }, 200);\n window.addEventListener('resize', onResize);\n onResize();\n\n return () => {\n cancelAnimationFrame(animationFrameId);\n window.removeEventListener('resize', onResize);\n };\n }, [modalProps.open]);\n\n useEffect(() => {\n setSettingModalScrollContainer(modalContentWrapperRef.current);\n return () => {\n setSettingModalScrollContainer(null);\n };\n }, [setSettingModalScrollContainer]);\n\n const onTabChange = useCallback(\n (key: ActiveTab, meta: WorkspaceMetadata | null) => {\n onSettingClick({ activeTab: key, workspaceMetadata: meta });\n },\n [onSettingClick]\n );\n const setOpenIssueFeedbackModal = useSetAtom(openIssueFeedbackModalAtom);\n const setOpenStarAFFiNEModal = useSetAtom(openStarAFFiNEModalAtom);\n\n const handleOpenIssueFeedbackModal = useCallback(() => {\n setOpenIssueFeedbackModal(true);\n }, [setOpenIssueFeedbackModal]);\n\n const handleOpenStarAFFiNEModal = useCallback(() => {\n setOpenStarAFFiNEModal(true);\n }, [setOpenStarAFFiNEModal]);\n\n return (\n <>\n \n \n \n
\n
\n }>\n {activeTab.startsWith('workspace:') && workspaceMetadata ? (\n \n ) : null}\n {isGeneralSetting(activeTab) ? (\n \n ) : null}\n {activeTab === 'account' && loginStatus === 'authenticated' ? (\n \n ) : null}\n \n
\n
\n \n \n ),\n 2: (\n \n ),\n }}\n />\n
\n
\n \n \n
\n \n );\n};\n\nexport const SettingModal = ({\n activeTab = 'appearance',\n workspaceMetadata = null,\n onSettingClick,\n ...modalProps\n}: SettingProps) => {\n return (\n \n }>\n \n \n \n );\n};\n","import { OverlayModal } from '@affine/component';\nimport { openStarAFFiNEModalAtom } from '@affine/core/atoms';\nimport { useI18n } from '@affine/i18n';\nimport { useAtom } from 'jotai';\n\nexport const StarAFFiNEModal = () => {\n const t = useI18n();\n const [open, setOpen] = useAtom(openStarAFFiNEModalAtom);\n\n return (\n \n }\n title={t['com.arms.star-affine.title']()}\n onOpenChange={setOpen}\n description={t['com.arms.star-affine.description']()}\n cancelText={t['com.arms.star-affine.cancel']()}\n to={runtimeConfig.githubUrl}\n confirmButtonOptions={{\n variant: 'primary',\n }}\n confirmText={t['com.arms.star-affine.confirm']()}\n external\n />\n );\n};\n","import \"../core/src/modules/find-in-page/view/find-in-page-modal.css.ts.vanilla.css!=!../../../../../../../node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\\\"fileName\\\":\\\"../core/src/modules/find-in-page/view/find-in-page-modal.css.ts.vanilla.css\\\",\\\"source\\\":\\\"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extracted.js\"\nexport var animationTimeout = 'var(--_17rc1n0)';\nexport var arrowButton = '_17rc1nd';\nexport var count = '_17rc1nc';\nexport var input = '_17rc1na';\nexport var inputContainer = '_17rc1n8';\nexport var inputHack = '_17rc1nb _17rc1na';\nexport var inputMain = '_17rc1n9';\nexport var leftContent = '_17rc1n6';\nexport var modalContent = '_17rc1n5';\nexport var modalContentWrapper = '_17rc1n4';\nexport var modalOverlay = '_17rc1n3';\nexport var searchIcon = '_17rc1n7';","import { IconButton, observeResize } from '@affine/component';\nimport {\n ArrowDownSmallIcon,\n ArrowUpSmallIcon,\n CloseIcon,\n SearchIcon,\n} from '@blocksuite/icons/rc';\nimport * as Dialog from '@radix-ui/react-dialog';\nimport { useLiveData, useService } from '@toeverything/infra';\nimport { assignInlineVars } from '@vanilla-extract/dynamic';\nimport clsx from 'clsx';\nimport {\n type ChangeEventHandler,\n type CompositionEventHandler,\n type KeyboardEventHandler,\n type SetStateAction,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { useTransition } from 'react-transition-state';\n\nimport { FindInPageService } from '../services/find-in-page';\nimport * as styles from './find-in-page-modal.css';\n\nconst animationTimeout = 120;\n\nconst drawText = (\n canvas: HTMLCanvasElement,\n text: string,\n scrollLeft: number\n) => {\n const ctx = canvas.getContext('2d');\n if (!ctx) {\n return;\n }\n\n const dpr = window.devicePixelRatio || 1;\n canvas.width = canvas.getBoundingClientRect().width * dpr;\n canvas.height = canvas.getBoundingClientRect().height * dpr;\n\n const rootStyles = getComputedStyle(document.documentElement);\n const textColor = rootStyles\n .getPropertyValue('--affine-text-primary-color')\n .trim();\n\n ctx.scale(dpr, dpr);\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n ctx.fillStyle = textColor;\n ctx.font = '15px Inter';\n\n const offsetX = -scrollLeft; // Offset based on scrollLeft\n\n ctx.fillText(text, offsetX, 22);\n\n ctx.textAlign = 'left';\n ctx.textBaseline = 'middle';\n};\n\nconst CanvasText = ({\n text,\n scrollLeft,\n className,\n}: {\n text: string;\n scrollLeft: number;\n className: string;\n}) => {\n const ref = useRef(null);\n\n useEffect(() => {\n const canvas = ref.current;\n if (!canvas) {\n return;\n }\n drawText(canvas, text, scrollLeft);\n return observeResize(canvas, () => drawText(canvas, text, scrollLeft));\n }, [text, scrollLeft]);\n\n return ;\n};\n\nexport const FindInPageModal = () => {\n const [value, setValue] = useState('');\n\n const findInPage = useService(FindInPageService).findInPage;\n const visible = useLiveData(findInPage.visible$);\n const result = useLiveData(findInPage.result$);\n const isSearching = useLiveData(findInPage.isSearching$);\n\n const inputRef = useRef(null);\n const [active, setActive] = useState(false);\n const [scrollLeft, setScrollLeft] = useState(0);\n const [composing, setComposing] = useState(false);\n\n const [{ status }, toggle] = useTransition({\n timeout: animationTimeout,\n });\n\n useEffect(() => {\n toggle(visible);\n }, [visible]);\n\n const handleValueChange: ChangeEventHandler = useCallback(\n e => {\n const value = e.target.value;\n setValue(value);\n if (!composing) {\n findInPage.findInPage(value);\n }\n if (value.length === 0) {\n findInPage.clear();\n }\n inputRef.current?.focus();\n },\n [composing, findInPage]\n );\n\n const handleFocus = useCallback(() => {\n setActive(true);\n }, []);\n\n const handleBlur = useCallback(() => {\n setActive(false);\n }, []);\n\n useEffect(() => {\n if (visible) {\n setValue(findInPage.searchText$.value || '');\n const onEsc = (e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n findInPage.onChangeVisible(false);\n }\n };\n window.addEventListener('keydown', onEsc);\n return () => {\n window.removeEventListener('keydown', onEsc);\n };\n }\n return () => {};\n }, [findInPage, findInPage.searchText$.value, visible]);\n\n useEffect(() => {\n const unsub = findInPage.isSearching$.subscribe(() => {\n inputRef.current?.focus();\n setTimeout(() => {\n inputRef.current?.focus();\n });\n });\n\n return () => {\n unsub.unsubscribe();\n };\n }, [findInPage.isSearching$]);\n\n const handleBackWard = useCallback(() => {\n findInPage.backward();\n }, [findInPage]);\n\n const handleForward = useCallback(() => {\n findInPage.forward();\n }, [findInPage]);\n\n const onChangeVisible = useCallback(\n (visible: boolean) => {\n if (!visible) {\n findInPage.clear();\n }\n findInPage.onChangeVisible(visible);\n },\n [findInPage]\n );\n const handleDone = useCallback(() => {\n onChangeVisible(false);\n }, [onChangeVisible]);\n\n const handleKeydown: KeyboardEventHandler = useCallback(\n e => {\n if (e.key === 'Enter' || e.key === 'ArrowDown') {\n handleForward();\n }\n if (e.key === 'ArrowUp') {\n handleBackWard();\n }\n },\n [handleBackWard, handleForward]\n );\n\n const handleScroll = useCallback(\n (e: { currentTarget: { scrollLeft: SetStateAction } }) => {\n setScrollLeft(e.currentTarget.scrollLeft);\n },\n []\n );\n\n const handleCompositionStart: CompositionEventHandler =\n useCallback(() => {\n setComposing(true);\n }, []);\n\n const handleCompositionEnd: CompositionEventHandler =\n useCallback(\n e => {\n setComposing(false);\n findInPage.findInPage(e.currentTarget.value);\n },\n [findInPage]\n );\n\n return (\n \n \n \n
\n \n \n \n
\n \n \n
\n
\n {value.length > 0 && result && result.matches !== 0 ? (\n <>\n {result?.activeMatchOrdinal || 0}\n /\n {result?.matches || 0}\n \n ) : value.length ? (\n No matches\n ) : null}\n
\n
\n\n
\n }\n />\n }\n />\n
\n\n } />\n \n
\n \n \n );\n};\n","import { notify } from '@affine/component';\nimport { events } from '@affine/electron-api';\nimport { WorkspaceFlavour } from '@affine/env/workspace';\nimport {\n useLiveData,\n useService,\n useServiceOptional,\n WorkspaceService,\n WorkspacesService,\n} from '@toeverything/infra';\nimport { useAtom } from 'jotai';\nimport type { ReactElement } from 'react';\nimport { useCallback, useEffect } from 'react';\n\nimport type { SettingAtom } from '../atoms';\nimport {\n authAtom,\n openCreateWorkspaceModalAtom,\n openSettingModalAtom,\n openSignOutModalAtom,\n} from '../atoms';\nimport { AuthModal as Auth } from '../components/affine/auth';\nimport { AiLoginRequiredModal } from '../components/affine/auth/ai-login-required';\nimport { CreateWorkspaceModal } from '../components/affine/create-workspace-modal';\nimport { HistoryTipsModal } from '../components/affine/history-tips-modal';\nimport { IssueFeedbackModal } from '../components/affine/issue-feedback-modal';\nimport {\n CloudQuotaModal,\n LocalQuotaModal,\n} from '../components/affine/quota-reached-modal';\nimport { SettingModal } from '../components/affine/setting-modal';\nimport { SignOutModal } from '../components/affine/sign-out-modal';\nimport { StarAFFiNEModal } from '../components/affine/star-affine-modal';\nimport { MoveToTrash } from '../components/page-list';\nimport { useTrashModalHelper } from '../hooks/affine/use-trash-modal-helper';\nimport { useAsyncCallback } from '../hooks/affine-async-hooks';\nimport { useNavigateHelper } from '../hooks/use-navigate-helper';\nimport { AuthService } from '../modules/cloud/services/auth';\nimport { FindInPageModal } from '../modules/find-in-page/view/find-in-page-modal';\nimport { PeekViewManagerModal } from '../modules/peek-view';\nimport { WorkspaceSubPath } from '../shared';\n\nexport const Setting = () => {\n const [{ open, workspaceMetadata, activeTab }, setOpenSettingModalAtom] =\n useAtom(openSettingModalAtom);\n\n const onSettingClick = useCallback(\n ({\n activeTab,\n workspaceMetadata,\n }: Pick) => {\n setOpenSettingModalAtom(prev => ({\n ...prev,\n activeTab,\n workspaceMetadata,\n }));\n },\n [setOpenSettingModalAtom]\n );\n\n const onOpenChange = useCallback(\n (open: boolean) => {\n setOpenSettingModalAtom(prev => ({ ...prev, open }));\n },\n [setOpenSettingModalAtom]\n );\n\n useEffect(() => {\n if (environment.isDesktop) {\n return events?.applicationMenu.openAboutPageInSettingModal(() =>\n setOpenSettingModalAtom({\n activeTab: 'about',\n open: true,\n })\n );\n }\n return;\n }, [setOpenSettingModalAtom]);\n\n if (!open) {\n return null;\n }\n\n return (\n \n );\n};\n\nexport const AuthModal = (): ReactElement => {\n const [\n { openModal, state, email = '', emailType = 'changePassword' },\n setAuthAtom,\n ] = useAtom(authAtom);\n\n return (\n {\n setAuthAtom(prev => ({ ...prev, emailType }));\n },\n [setAuthAtom]\n )}\n setOpen={useCallback(\n open => {\n setAuthAtom(prev => ({ ...prev, openModal: open }));\n },\n [setAuthAtom]\n )}\n setAuthState={useCallback(\n state => {\n setAuthAtom(prev => ({ ...prev, state }));\n },\n [setAuthAtom]\n )}\n setAuthEmail={useCallback(\n email => {\n setAuthAtom(prev => ({ ...prev, email }));\n },\n [setAuthAtom]\n )}\n />\n );\n};\n\nexport function CurrentWorkspaceModals() {\n const currentWorkspace = useService(WorkspaceService).workspace;\n\n const { trashModal, setTrashModal, handleOnConfirm } = useTrashModalHelper(\n currentWorkspace.docCollection\n );\n const deletePageTitles = trashModal.pageTitles;\n const trashConfirmOpen = trashModal.open;\n const onTrashConfirmOpenChange = useCallback(\n (open: boolean) => {\n setTrashModal({\n ...trashModal,\n open,\n });\n },\n [trashModal, setTrashModal]\n );\n\n return (\n <>\n \n \n {currentWorkspace ? : null}\n {currentWorkspace?.flavour === WorkspaceFlavour.LOCAL && (\n <>\n \n \n \n )}\n {currentWorkspace?.flavour === WorkspaceFlavour.AFFINE_CLOUD && (\n \n )}\n \n \n {environment.isDesktop && }\n \n \n );\n}\n\nexport const SignOutConfirmModal = () => {\n const { openPage } = useNavigateHelper();\n const authService = useService(AuthService);\n const [open, setOpen] = useAtom(openSignOutModalAtom);\n const currentWorkspace = useServiceOptional(WorkspaceService)?.workspace;\n const workspaces = useLiveData(\n useService(WorkspacesService).list.workspaces$\n );\n\n const onConfirm = useAsyncCallback(async () => {\n setOpen(false);\n try {\n await authService.signOut();\n } catch (err) {\n console.error(err);\n // TODO(@eyhn): i18n\n notify.error({\n title: 'Failed to sign out',\n });\n }\n\n // if current workspace is affine cloud, switch to local workspace\n if (currentWorkspace?.flavour === WorkspaceFlavour.AFFINE_CLOUD) {\n const localWorkspace = workspaces.find(\n w => w.flavour === WorkspaceFlavour.LOCAL\n );\n if (localWorkspace) {\n openPage(localWorkspace.id, WorkspaceSubPath.ALL);\n }\n }\n }, [authService, currentWorkspace, openPage, setOpen, workspaces]);\n\n return (\n \n );\n};\n\nexport const AllWorkspaceModals = (): ReactElement => {\n const [isOpenCreateWorkspaceModal, setOpenCreateWorkspaceModal] = useAtom(\n openCreateWorkspaceModalAtom\n );\n\n const { jumpToSubPath, jumpToPage } = useNavigateHelper();\n\n return (\n <>\n {\n setOpenCreateWorkspaceModal(false);\n }, [setOpenCreateWorkspaceModal])}\n onCreate={useCallback(\n (id, defaultDocId) => {\n setOpenCreateWorkspaceModal(false);\n // if jumping immediately, the page may stuck in loading state\n // not sure why yet .. here is a workaround\n setTimeout(() => {\n if (!defaultDocId) {\n jumpToSubPath(id, WorkspaceSubPath.ALL);\n } else {\n jumpToPage(id, defaultDocId);\n }\n });\n },\n [jumpToPage, jumpToSubPath, setOpenCreateWorkspaceModal]\n )}\n />\n \n \n \n );\n};\n"],"names":["useLanguageHelper","i18n","useI18n","currentLanguage","useMemo","LOCALES","find","item","tag","language","languagesList","map","originalName","name","Completeness","completeRate","onLanguageChange","useAsyncCallback","event","changeLanguage","useEffect","document","documentElement","lang","useWorkspace","meta","workspaceManager","useService","WorkspacesService","workspace","setWorkspace","useState","ref","open","metadata","dispose","subTitle","logger","DebugLogger","NameWorkspaceContent","loading","onConfirmName","props","t","workspaceName","setWorkspaceName","enable","setEnable","session","AuthService","loginStatus","useLiveData","status$","setOpenSignIn","useSetAtom","authAtom","openSignInModal","useCallback","state","openModal","onSwitchChange","checked","handleCreateWorkspace","WorkspaceFlavour","AFFINE_CLOUD","LOCAL","handleKeyDown","key","ConfirmModal","defaultOpen","title","description","cancelText","confirmText","confirmButtonOptions","variant","disabled","closeButtonOptions","onConfirm","div","className","Avatar","size","colorfulFallback","styles","Input","autoFocus","data-testid","onKeyDown","placeholder","maxLength","minLength","onChange","span","Switch","CloudSvg","a","href","runtimeConfig","target","rel","CreateWorkspaceModal","mode","onClose","onCreate","step","setStep","workspacesService","setLoading","useLayoutEffect","canceled","apis","info","undefined","result","dialog","loadDBFile","workspaceId","_addLocalWorkspace","list","revalidate","error","toast","catch","err","console","workspaceFlavour","track","$","createWorkspace","flavour","defaultDocId","buildShowcaseWorkspace","id","onOpenChange","Modal","width","contentOptions","style","padding","TopSvg","svg","height","viewBox","fill","xmlns","g","clipPath","filter","rect","y","cssVar","x","rx","shapeRendering","path","fillRule","clipRule","d","stroke","defs","filterUnits","colorInterpolationFilters","feFlood","floodOpacity","feColorMatrix","in","type","values","feOffset","feGaussianBlur","stdDeviation","feComposite","in2","operator","feBlend","feMorphology","radius","k2","k3","transform","HistoryTipsModal","currentWorkspace","WorkspaceService","setOpen","useAtom","openHistoryTipsModalAtom","confirmEnableCloud","useEnableCloud","handleConfirm","OverlayModal","topImage","IssueFeedbackModal","openIssueFeedbackModalAtom","video","objectFit","src","autoPlay","loop","to","external","CloudQuotaModal","openQuotaModalAtom","workspaceQuotaService","WorkspaceQuotaService","quota","workspaceQuota","quota$","permissionService","WorkspacePermissionService","isOwner","permission","isOwner$","quotaService","UserQuotaService","userQuota","q","humanReadable","blobLimit","isFreePlanOwner","setSettingModalAtom","openSettingModalAtom","handleUpgradeConfirm","activeTab","scrollAnchor","paywall","storage","viewPlans","planName","currentQuota","upgradeQuota","toLowerCase","engine","blob","singleBlobSizeLimit","bytes","toString","disposable","onAbortLargeBlob","on","cancelButtonOptions","hidden","LocalQuotaModal","SettingHeader","subtitle","otherProps","SettingRow","desc","children","onClick","spreadCol","clsx","SettingWrapper","WorkspaceDetailSkeleton","Skeleton","Array","from","length","_","index","WorkspaceListItemSkeleton","FlexWrapper","alignItems","marginBottom","marginRight","flexGrow","WorkspaceListSkeleton","Upload","fileChange","accept","input_ref","useRef","Button","display","current","click","input","files","e","value","AICancel","isMutating","setMutating","idempotencyKey","setIdempotencyKey","nanoid","subscription","SubscriptionService","authService","openConfirmModal","useConfirmModal","downgradeNotify","useDowngradeNotify","cancel","aiSubscription","ai$","settingsPanel","plans","cancelSubscription","plan","SubscriptionPlan","AI","recurring","reverseFooter","confirmCancelingSubscription","account","account$","prevRecurring","getDowngradeQuestionnaireLink","email","btnProps","AILogin","onClickSignIn","AIResume","setIsMutating","resume","resumeSubscription","confirmResumingSubscription","notify","icon","SingleSelectSelectSolidIcon","iconColor","message","AISubscribe","displayedFrequency","isOpenedExternalWindow","setOpenedExternalWindow","subscriptionService","price","prices","aiPrice$","window","addEventListener","removeEventListener","subscribe","checkout","SubscriptionRecurring","Yearly","createCheckoutSession","coupon","successCallbackLink","generateSubscriptionCallbackLink","popupWindow","yearlyAmount","borderRadius","priceReadable","toFixed","priceFrequency","fontSize","opacity","letterSpacing","paddingLeft","storageProgressBar","storageProgressContainer","storageProgressWrapper","AIUsagePanel","setOpenSettingModal","serverConfigService","ServerConfigService","hasPaymentFeature","serverConfig","features$","f","payment","copilotQuotaService","UserCopilotQuotaService","copilotQuota","copilotActionLimit","copilotActionLimit$","copilotActionUsed","copilotActionUsed$","loadError","error$","openBilling","accountUsage","ErrorMessage","percent","Math","min","max","Number","color","canceledAt","used","limit","backgroundColor","ButtonType","StorageProgress","onUpgrade","color$","usedFormatted","usedFormatted$","maxFormatted","maxFormatted$","percent$","proSubscription","pro$","isFreeUser","quotaName","buttonType","Tooltip","options","content","tabIndex","UserAvatar","useEnsureLiveData","handleUpdateUserAvatar","file","accountSettings","uploadAvatar","success","String","handleRemoveUserAvatar","useCatchEventCallback","removeAvatar","label","url","avatar","hoverIcon","CameraIcon","onRemove","avatarTooltipOptions","removeTooltipOptions","removeButtonProps","AvatarAndName","setInput","allowUpdate","handleUpdateUserName","updateUserName","updateLabel","margin","defaultValue","onEnter","marginLeft","StoragePanel","Pro","AccountSetting","useServices","serverFeatures","setAuthModal","setSignOutModal","openSignOutModalAtom","onChangeEmail","emailType","emailVerified","onPasswordButtonClick","hasPassword","onOpenSignOutModal","copilot","cursor","ArrowRightSmallIcon","settingModalScrollContainerAtom","atom","relatedLinks","GithubIcon","link","TwitterIcon","DiscordIcon","YouTubeIcon","linearGradient","x1","y1","x2","y2","gradientUnits","stop","stopColor","offset","TelegramIcon","RedditIcon","CheckUpdateStatus","useUpdateStatusLabels","updateAvailable","downloadProgress","updateReady","checkingForUpdates","useAppUpdater","buttonLabel","checkUpdateStatus","subtitleLabel","version","active","Loading","UpdateCheckSection","checkForUpdates","downloadUpdate","quitAndInstall","setCheckUpdateStatus","asyncCheckForUpdates","statusCheck","status","handleClick","AboutAffine","appSettings","updateSettings","useAppSettingHelper","toggleAutoCheck","toggleAutoDownload","channel","appIcon","appIconMap","appName","appNames","onSwitchAutoCheck","onSwitchAutoDownload","onSwitchTelemetry","mixpanel","opt_in_tracking","opt_out_tracking","img","alt","environment","isDesktop","autoCheckUpdate","autoDownloadUpdate","enableTelemetry","OpenInNewIcon","p","LanguageMenuContent","memo","option","selected","MenuItem","onSelect","endFix","data-selected","DoneIcon","LanguageMenu","Menu","items","align","MenuTrigger","textTransform","fontWeight","block","settingWrapper","ThemeSettings","setTheme","theme","useTheme","radioItems","testId","RadioGroup","FontFamilySettings","fontStyleOptions","fontFamily","fontStyle","AppearanceSettings","clientBorder","fullWidthLayout","enableNoisyBackground","isMacOs","enableBlurBackground","SWRErrorBoundary","onReset","onError","errorsRef","cache","useSWRConfig","clearErrorCache","React","errors","keys","get","includes","delete","onResetWithSWR","details","onErrorWithSWR","push","ErrorBoundary","downgradeContent","planAction","recurringToggleRecurring","resumeContent","textEmphasis","ConfirmLoadingModal","confirmed","contentText","DowngradeModal","onCancel","footer","DialogTrigger","asChild","CancelAction","downgrade","isRevalidating$","waitFor","v","ResumeAction","bgAFFiNERaw","bgIconsRaw","BelieverCard","attrs","data-type","dangerouslySetInnerHTML","__html","li","BelieverBenefits","ul","AfFiNeIcon","capacity","billingFrequency","currentPlanName","paymentMethod","DescriptionI18NKey","getMessageKey","BillingSettings","FallbackComponent","SubscriptionSettingSkeleton","Suspense","fallback","SubscriptionSettings","BillingHistorySkeleton","BillingHistory","proPrice","proPrice$","isBeliever","isBeliever$","openCancelModal","setOpenCancelModal","setOpenSettingModalAtom","currentPlan","Free","currentRecurring","Monthly","openPlans","billing","gotoCloudPlansSetting","gotoAiPlanSetting","amount","AIPlanCard","BelieverIdentifier","onOpenPlans","Trans","i18nKey","components","PlanAction","gotoPlansSetting","TypeFormLink","SubscriptionStatus","Active","PaymentMethodUpdater","nextBillAt","renewDate","Date","toLocaleDateString","end","expirationDate","ResumeSubscription","CancelSubscription","pro","ai","getUpgradeQuestionnaireLink","readableLifetimePrice","readableLifetimePrice$","header","billingTip","due","i18nTime","absolute","accuracy","trigger","useMutation","mutation","createCustomerPortalMutation","update","onSuccess","data","createCustomerPortal","data-event-props","data-event-args-type","data-event-args-category","IconButton","pointerEvents","invoicesCountQueryResult","useQuery","query","getInvoicesCountQuery","skip","setSkip","invoicesQueryResult","invoicesQuery","variables","take","invoices","currentUser","invoiceCount","invoice","InvoiceLine","Pagination","totalCount","countPerPage","onPageChange","planText","Lifetime","createdAt","InvoiceStatus","Paid","UpgradeIcon","PaymentIcon","purchaseButton","PricingCollapsible","caption","toggle","prev","Collapsible","section","ArrowUpSmallIcon","transition","PlanLayout","cloud","cloudTip","modal","plansRootRef","cloudScrollTipRef","settingModalScrollContainer","useAtomValue","updateCloudTipState","cloudContainer","querySelector","containerRect","getBoundingClientRect","top","dataset","cloudVisible","flushSync","scrollIntoView","scrollToAnchor","anchor","behavior","Divider","createPortal","CloudPlanLayout","select","scroll","lifetime","scrollRef","ScrollArea","forceMount","orientation","paddingTop","benefitsGetter","TextIcon","PenIcon","CheckBoxCheckLinearIcon","AIBenefits","benefits","AIPlanLayout","actionButtons","AIPlan","isLoggedIn","PlanCard","detail","loggedIn","isCurrent","isPro","data-current","paddingBottom","titleRenderer","ActionButton","Object","entries","groupName","benefitList","primarySubscription","BookDemo","SignUpAction","isCanceled","isFree","ResumeButton","CurrentPlan","Downgrade","ChangeRecurring","Upgrade","tooltipContent","rootOptions","delayDuration","Team","Enterprise","data-event-args-url","upgrade","onStartChange","changeSubscriptionRecurring","change","setSubscriptionRecurring","changeCurringContent","data-show-hover","purchase","LifetimePlan","freeBenefits","i","proBenefits","teamBenefits","getRecurringLabel","CloudPlans","scrollWrapper","prices$","setRecurring","planDetail","rawMap","getPlanDetail","Map","yearlyPrice","contact","clonedMap","forEach","set","discount","floor","yearlyDiscount","currentPlanCard","wrapperComputedStyle","getComputedStyle","left","parseInt","appeared","animationFrameId","requestAnimationFrame","scrollTo","setAttribute","cancelAnimationFrame","cloudCaption","cloudToggle","cloudScroll","cloudSelect","b","RoundedSkeleton","TabsSkeleton","PlanItemSkeleton","main","ScrollSkeleton","PlansSkeleton","Settings","AFFiNEPricingPlans","PlansErrorBoundary","resetErrorBoundary","useKeyboardShortcutsI18N","useHeadingKeyboardShortcutsI18N","number","useWinGeneralKeyboardShortcuts","useMacGeneralKeyboardShortcuts","useMacEdgelessKeyboardShortcuts","useWinEdgelessKeyboardShortcuts","useMacPageKeyboardShortcuts","tH","useMacMarkdownShortcuts","useWinPageKeyboardShortcuts","useWinMarkdownShortcuts","useMarkdownShortcuts","macMarkdownShortcuts","winMarkdownShortcuts","isMac","isBrowser","shortcuts","usePageShortcuts","macPageShortcuts","winPageShortcuts","useEdgelessShortcuts","macEdgelessShortcuts","winEdgelessShortcuts","useGeneralShortcuts","macGeneralShortcuts","winGeneralShortcuts","ShortcutsPanel","shortcutsInfo","Shortcuts","markdownShortcutsInfo","pageShortcutsInfo","edgelessShortcutsInfo","generalShortcutsInfo","useGeneralSettingList","userFeatureService","UserFeatureService","userFeature","settings","AppearanceIcon","KeyboardIcon","InformationIcon","splice","GeneralSetting","generalKey","accountButton","sidebarItemsWrapper","sidebarSelectItem","sidebarSubtitle","UserInfo","onAccountSettingClick","rounded","UserPlanButton","SignInButton","Logo1Icon","SettingSidebar","onTabChange","selectedWorkspaceId","generalList","gotoTab","tab","currentTarget","eventArg","menu","openSettings","onWorkspaceSettingClick","subTab","workspaceMetadata","control","data-event-arg","WorkspaceList","activeSubTab","split","workspaces","workspaces$","WorkspaceListItem","subTabConfigs","workspaceService","information","useWorkspaceInfo","UNTITLED_WORKSPACE_NAME","onClickPreference","subTabs","WorkspaceAvatar","side","GeneralSettingKeys","WorkspaceDeleteModal","deleteStr","setDeleteStr","allowDelete","handleOnEnter","DeleteLeaveWorkspace","globalContextService","workspacePermissionService","GlobalContextService","jumpToSubPath","jumpToIndex","useNavigateHelper","showDelete","setShowDelete","showLeave","setShowLeave","setSettingModal","workspaceList","currentWorkspaceId","globalContext","onLeaveOrDelete","onDeleteConfirm","backWorkspace","ws","WorkspaceSubPath","ALL","RouteLogic","REPLACE","deleteWorkspace","leaveWorkspace","EnableCloudPanel","name$","confirmEnableCloudAndClose","background","marginTop","ExportPanel","saving","setSaving","isOnline","useSystemOnline","onExport","waitForDocSynced","sync","saveDBFileAs","memberName","membersPanel","Label","LabelsPanel","labelMap","local","syncCloud","syncDocker","selfHosted","joinedWorkspace","availableOffline","publishedToWeb","labelConditions","condition","useMutateCloud","mutate","isArray","calculateWeight","member","permissionWeight","Permission","Owner","Admin","Write","Read","factors","accepted","reduce","ret","factor","arr","pow","MembersPanelLocal","CloudWorkspaceMembersPanel","memberCount","useMemberCount","getMemberCountByWorkspaceIdQuery","checkMemberCountLimit","memberLimit","s","isLimited","invite","useInviteMember","inviteByEmailMutation","sendInviteMail","res","revokeMemberPermission","useRevokeMemberPermission","revokeMemberPermissionMutation","userId","memberSkip","setMemberSkip","onInviteConfirm","listContainerRef","memberListHeight","setMemberListHeight","onRevoke","memberId","revoke","MemberLimitModal","isFreePlan","InviteModal","MemberListFallback","MemberList","MembersPanelFallback","COUNT_PER_PAGE","members","useMembers","getMembersByWorkspaceIdQuery","sort","weightDifference","localeCompare","MemberItem","currentAccount","handleRevoke","operationButtonInfo","show","leaveOrRevokeText","avatarUrl","pending","data-member-id","visibility","flexShrink","MoreVerticalIcon","MembersPanel","AffineErrorBoundary","ProfilePanel","workspaceIsReady","rootDocState$","ready","setName","docCollection","commonFieldsUpdated","setWorkspaceAvatar","setAvatar","reducedFile","validateAndReduceImage","blobs","blobSync","blobId","handleUpdateWorkspaceName","handleSetInput","handleKeyUp","code","handleUploadAvatar","then","canAdjustAvatar","Wrapper","onKeyUp","WorkspaceSettingDetail","workspaceInfo","handleResetSyncStatus","doc","resetSyncStatus","location","reload","FrameworkScope","scope","subListHeader","managerContext","createContext","usePagePropertiesMetaManager","adapter","useCurrentWorkspacePropertiesAdapter","PagePropertiesMetaManager","EditPropertyButton","property","manager","useContext","localPropertyMeta","setLocalPropertyMeta","handleToggleRequired","updatePropertyMeta","required","handleDelete","removePropertyMeta","editing","setEditing","showDeleteModal","setShowDeleteModal","handleFinishEditing","defaultMenuItems","text","preventDefault","DeleteIcon","renderMenuItemOptions","handleNameBlur","handleNameChange","handleIconChange","editMenuItems","EditPropertyNameMenuItem","onIconChange","onNameBlur","onNameChange","PropertyTypeMenuItem","MoreHorizontalIcon","ConfirmDeletePropertyModal","CustomPropertyRow","relatedPages","Icon","nameToIcon","data-property-id","data-unnamed","count","CustomPropertyRows","properties","statistics","pages","Fragment","CustomPropertyRowsList","filterMode","getOrderedPropertiesSchema","getPropertyStatistics","filtered","optional","WorkspaceSettingPropertiesMain","setFilterMode","filterMenuItems","onPropertyCreated","_e","setTimeout","newRow","highlight","prefix","FilterIcon","PagePropertiesCreatePropertyMenuItems","onCreated","metaManager","WorkspaceSettingPropertiesInner","Provider","WorkspaceSettingProperties","strong","WorkspaceSetting","isGeneralSetting","CenteredLoading","SettingModalInner","onSettingClick","modalProps","modalContentRef","modalContentWrapperRef","setSettingModalScrollContainer","onResize","debounce","wrapperWidth","offsetWidth","wrapperHeight","offsetHeight","contentWidth","wrapper","setProperty","setOpenIssueFeedbackModal","setOpenStarAFFiNEModal","openStarAFFiNEModalAtom","handleOpenIssueFeedbackModal","handleOpenStarAFFiNEModal","Scrollable","Root","Viewport","startsWith","ContactWithUsIcon","Scrollbar","SettingModal","maxHeight","maxWidth","overflow","StarAFFiNEModal","arrowButton","drawText","canvas","scrollLeft","ctx","getContext","dpr","devicePixelRatio","textColor","rootStyles","getPropertyValue","trim","scale","clearRect","fillStyle","font","fillText","textAlign","textBaseline","CanvasText","observeResize","FindInPageModal","setValue","findInPage","FindInPageService","visible","visible$","result$","isSearching","isSearching$","inputRef","setActive","setScrollLeft","composing","setComposing","useTransition","timeout","handleValueChange","clear","focus","handleFocus","handleBlur","searchText$","onEsc","onChangeVisible","unsub","unsubscribe","handleBackWard","backward","handleForward","forward","handleDone","handleKeydown","handleScroll","handleCompositionStart","handleCompositionEnd","Dialog","assignInlineVars","data-state","SearchIcon","onBlur","onFocus","onScroll","onCompositionStart","onCompositionEnd","matches","activeMatchOrdinal","ArrowDownSmallIcon","CloseIcon","Setting","events","applicationMenu","openAboutPageInSettingModal","AuthModal","setAuthAtom","Auth","setEmailType","setAuthState","setAuthEmail","CurrentWorkspaceModals","trashModal","setTrashModal","handleOnConfirm","useTrashModalHelper","deletePageTitles","pageTitles","trashConfirmOpen","onTrashConfirmOpenChange","AiLoginRequiredModal","PeekViewManagerModal","MoveToTrash","titles","SignOutConfirmModal","openPage","useServiceOptional","signOut","localWorkspace","w","SignOutModal","AllWorkspaceModals","isOpenCreateWorkspaceModal","setOpenCreateWorkspaceModal","openCreateWorkspaceModalAtom","jumpToPage"],"sourceRoot":""}