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GAAoBiD,oBAC5DlE,EAAYiP,2BAEVjP,EAAYiP,6BAA+BC,EAAAA,GAAqBlB,OACnE/M,EAAAA,GAAoBiD,oBACpBjD,EAAAA,GAAoBkO,oBAJ4BlO,EAAAA,GAAoBmO,oBAI7B,C","sources":["components/NavigatorSeries/index.js","hooks/apis/investments/useGetSeriesInvestments.js","hooks/apis/useAccountInfo.js","hooks/apis/useAuthSWR.js","hooks/apis/useGetCompany.js","hooks/apis/useGetIPCountry.js","hooks/apis/useGetMessengerToken.js","hooks/useAppNavigate.js","hooks/useUserExemption.js","hooks/useVerificationStatus.js","utils/common.js","utils/exemption.js","utils/investment.js","utils/legal_contract.js","utils/messenger.js","utils/user.js"],"sourcesContent":["import React, { useEffect, useMemo } from \"react\";\n\nimport { usePrivy } from \"@privy-io/react-auth\";\nimport * as Sentry from \"@sentry/react\";\nimport get from \"lodash/get\";\nimport PropTypes from \"prop-types\";\nimport { Navigate, useNavigate } from \"react-router-dom\";\n\nimport { AUTH_LEVEL, DIALOG_NAME, ROUTE_PATH, SERIES_STATUS, VERIFICATION_STATUS } from \"src/constants\";\nimport useGetSeriesInvestments from \"src/hooks/apis/investments/useGetSeriesInvestments\";\nimport useAccountInfo from \"src/hooks/apis/useAccountInfo\";\nimport useGetMessengerToken from \"src/hooks/apis/useGetMessengerToken\";\nimport usePortalItem from \"src/hooks/apis/usePortalItem\";\nimport useVerificationStatus from \"src/hooks/useVerificationStatus\";\nimport useAppContext from \"src/pages/Core/context\";\nimport useGlobalDialog from \"src/redux/hooks/useGlobalDialog\";\nimport useSlug from \"src/redux/hooks/useSlug\";\nimport { checkCorrectPath } from \"src/utils/common\";\nimport { isSignedInvestment } from \"src/utils/investment\";\nimport Messenger from \"src/utils/messenger\";\n\nimport { LoadingSpinner } from \"..\";\n\nconst NavigatorSeries = ({\n componentLevel,\n children,\n path\n}) => {\n const navigate = useNavigate();\n const { context } = useAppContext();\n const { ready, authenticated } = usePrivy();\n const { data: slug } = useSlug();\n const { data: currentDialog, setData: setCurrentDialog } = useGlobalDialog();\n const { data: accountInfo, isLoading: accountInfoLoading } = useAccountInfo();\n const { error: portalItemError, data: portalInfo } = usePortalItem();\n const { data: investmentsInfo, isLoading: investmentInfoLoading } = useGetSeriesInvestments();\n const { data: messengerToken } = useGetMessengerToken();\n\n const {\n accountItem,\n userItem,\n seriesAccountItem,\n invitationLinkItem: noAccountItemInvitationLinkItem\n } = useMemo(() => accountInfo || {}, [accountInfo]);\n\n const verificationStatus = useVerificationStatus();\n const seriesItem = useMemo(() => get(portalInfo, \"portalItem.series\", {}), [portalInfo]);\n const investmentItems = useMemo(() => get(investmentsInfo, \"investmentItems\", []), [investmentsInfo]);\n const self_accreditate = useMemo(() => Boolean(get(portalInfo, \"portalItem.series.self_accreditate\", false)), [portalInfo]);\n const invitationLinkItem = useMemo(() => {\n if (noAccountItemInvitationLinkItem) {\n return noAccountItemInvitationLinkItem;\n }\n return get(seriesAccountItem, \"invitation_link\", null);\n }, [noAccountItemInvitationLinkItem, seriesAccountItem]);\n\n // Set tags for sentry\n useEffect(() => {\n const seriesId = get(seriesItem, \"id\");\n const portalId = get(portalInfo, \"portalItem.id\");\n if (seriesId) {\n Sentry.setTag(\"series_id\", seriesId);\n }\n // set portal id\n if (portalId) {\n Sentry.setTag(\"portal_id\", portalId);\n }\n }, [seriesItem, portalInfo]);\n\n useEffect(() => {\n if (verificationStatus === VERIFICATION_STATUS.PROHIBITED) {\n setCurrentDialog(DIALOG_NAME.ACCESS_UNAVAILABLE);\n }\n }, [setCurrentDialog, verificationStatus]);\n\n useEffect(() => {\n if (userItem && messengerToken) {\n Messenger.signIn(userItem, messengerToken);\n }\n }, [userItem, messengerToken]);\n\n useEffect(() => {\n if (seriesItem.type) {\n const newPath = checkCorrectPath(seriesItem);\n if (newPath) navigate(newPath);\n }\n }, [seriesItem, navigate]);\n\n if (portalItemError) {\n return (\n \n );\n }\n\n if (verificationStatus === VERIFICATION_STATUS.SANCTIONED) {\n return (\n \n );\n }\n\n if ([SERIES_STATUS.SETUP, SERIES_STATUS.READY].includes(seriesItem.status)) {\n if (path !== ROUTE_PATH.SERIES_NOT_PUBLISHED) {\n return ;\n }\n return children;\n }\n\n if (componentLevel === AUTH_LEVEL.FREE) {\n return children;\n }\n\n const authLevel = authenticated ? AUTH_LEVEL.DASHBOARD : AUTH_LEVEL.SIGN_IN;\n if (!ready) {\n return null;\n }\n\n if (componentLevel === AUTH_LEVEL.PUBLIC) {\n if (authLevel === AUTH_LEVEL.DASHBOARD) {\n return ;\n }\n if (self_accreditate) {\n // i.e. the series exemption is NOT 506(c) (meaning the series is private)\n return ;\n }\n if (path !== ROUTE_PATH.PUBLIC) {\n return ;\n }\n return children;\n }\n\n if (authLevel === AUTH_LEVEL.SIGN_IN) {\n if (componentLevel === AUTH_LEVEL.SIGN_IN) {\n return children;\n }\n if (componentLevel === AUTH_LEVEL.DASHBOARD) {\n return (\n \n );\n }\n }\n\n if (authLevel === AUTH_LEVEL.DASHBOARD) {\n if (accountInfoLoading || investmentInfoLoading) {\n return ;\n }\n\n if (invitationLinkItem) {\n if (!invitationLinkItem.active) {\n if (path !== ROUTE_PATH.INVITE_DISABLED) {\n return (\n \n );\n }\n return children;\n }\n if (invitationLinkItem.email && invitationLinkItem.email !== userItem?.email) {\n if (path !== ROUTE_PATH.INVALID_INVITE) {\n return (\n \n );\n }\n return children;\n }\n }\n\n if (accountItem && !accountItem.show_series_auth && !accountItem.blocked) {\n // if kyc dialog opens, then we should prevent redirection\n if ([DIALOG_NAME.KYC_FLOW, DIALOG_NAME.KYC_FINISHED].includes(currentDialog?.name)) {\n return children;\n }\n\n if (seriesItem.status === SERIES_STATUS.CLOSED) {\n if (!investmentItems?.length || !investmentItems.some(({ status }) => isSignedInvestment(status))) {\n if (path !== ROUTE_PATH.START) {\n return (\n \n );\n }\n return children;\n }\n }\n\n if (verificationStatus === VERIFICATION_STATUS.ROW_VERIFIED) {\n if (path !== ROUTE_PATH.INTERNATIONAL) {\n return (\n \n );\n }\n return children;\n }\n if (verificationStatus === VERIFICATION_STATUS.ACCREDITED_VERIFIED || verificationStatus === VERIFICATION_STATUS.NON_ACCREDITED_BUT) {\n if (path !== ROUTE_PATH.US) {\n return (\n \n );\n }\n return children;\n }\n }\n\n if (path === ROUTE_PATH.US || path === ROUTE_PATH.INTERNATIONAL || componentLevel === AUTH_LEVEL.SIGN_IN) {\n return (\n \n );\n }\n\n return children;\n }\n\n return null;\n};\n\nNavigatorSeries.propTypes = {\n componentLevel : PropTypes.string,\n path : PropTypes.string,\n children : PropTypes.node.isRequired,\n};\n\nexport default NavigatorSeries;\n","import { SERVICE_1, callLambda } from \"src/utils/lambda\";\n\nimport useAuthSWR from \"../useAuthSWR\";\n\nexport default () => useAuthSWR(\"getSeriesInvestments\", () => callLambda({\n method : \"get\",\n service : SERVICE_1,\n url : \"getSeriesInvestments\",\n}));\n","import { get } from \"lodash\";\nimport { toast } from \"react-hot-toast\";\n\nimport { ROUTE_PATH } from \"src/constants\";\nimport useSlug from \"src/redux/hooks/useSlug\";\nimport { SERVICE_1, callLambda } from \"src/utils/lambda\";\n\nimport useAuthSWR from \"./useAuthSWR\";\nimport useAppNavigate from \"../useAppNavigate\";\n\nconst getInvitationCodeBySlug = slug => window.localStorage.getItem(slug);\n\nexport default () => {\n const { data: slug } = useSlug();\n const appNavigate = useAppNavigate();\n return useAuthSWR(\"accountInfo\", () => callLambda({\n method : \"get\",\n service : SERVICE_1,\n url : \"getAccountInfo\",\n queryStringParameters : { invitationCode: getInvitationCodeBySlug(slug) },\n }), {\n onError: (error) => {\n const errorMessage = get(error, \"response.data.err\");\n // Error code for invalid invitation code\n if (errorMessage?.includes(\"INV-101\")) {\n return appNavigate(ROUTE_PATH.INVALID_INVITE, { state: { invitationCode: getInvitationCodeBySlug(slug), hidePortfollio: true } });\n }\n // Error code for invitation required\n if (errorMessage?.includes(\"INV-105\")) {\n return appNavigate(ROUTE_PATH.INVITE_REQUIRED, { state: { hidePortfollio: true } });\n }\n\n console.error(errorMessage);\n toast.error(errorMessage);\n },\n });\n};\n","import { usePrivy } from \"@privy-io/react-auth\";\nimport useSWR from \"swr\";\n\nconst useAuthSWR = (key, fetcher, config) => {\n const { user } = usePrivy();\n\n // Execute the hook with the new fetcher.\n return useSWR(user ? key : null, fetcher, config);\n};\n\nexport default useAuthSWR;\n","import { SERVICE_1, callLambda } from \"src/utils/lambda\";\n\nimport useAccountInfo from \"./useAccountInfo\";\nimport useAuthSWR from \"./useAuthSWR\";\n\nexport default () => {\n const { data: accountInfo } = useAccountInfo();\n const companyId = accountInfo?.accountItem?.company_id;\n\n return useAuthSWR(\n companyId ? \"getCompany\" : null,\n () => (companyId ? callLambda({\n method : \"get\",\n service : SERVICE_1,\n url : \"getCompany\",\n }) : null)\n );\n};\n","import { SERVICE_2, callLambda } from \"src/utils/lambda\";\n\nimport useAuthSWR from \"./useAuthSWR\";\n\nexport default () => useAuthSWR(\"getIPCountry\", () => callLambda({\n method : \"get\",\n service : SERVICE_2,\n url : \"getIPCountry\",\n}));\n","import { SERVICE_1, callLambda } from \"src/utils/lambda\";\n\nimport useAuthSWR from \"./useAuthSWR\";\n\nexport default () => useAuthSWR(\"getMessengerToken\", () => callLambda({\n method : \"get\",\n service : SERVICE_1,\n url : \"getMessengerToken\",\n}));\n","import { useCallback } from \"react\";\n\nimport { useNavigate } from \"react-router-dom\";\n\nconst useAppNavigate = () => {\n const navigate = useNavigate();\n\n const appNavigate = useCallback((path, options) => {\n let slug = \"/\";\n let rootdir = \"series\";\n if (window.location.pathname.match(/\\//g).length > 1) {\n rootdir = window.location.pathname.split(\"/\")[1];\n slug = window.location.pathname.split(\"/\")[2];\n }\n navigate(`/${rootdir}/${slug}/${path}`, options);\n }, [navigate]);\n\n return appNavigate;\n};\n\nexport default useAppNavigate;\n","import { useMemo } from \"react\";\n\nimport get from \"lodash/get\";\n\nimport { EXEMPTION } from \"src/constants\";\nimport { getExemption } from \"src/utils/exemption\";\nimport { isGrantSeries } from \"src/utils/legal_contract\";\n\nimport useAccountInfo from \"./apis/useAccountInfo\";\nimport useGetCompany from \"./apis/useGetCompany\";\nimport useGetIPCountry from \"./apis/useGetIPCountry\";\nimport usePortalItem from \"./apis/usePortalItem\";\n\nconst useUserExemption = () => {\n const { data: accountInfo } = useAccountInfo();\n const { data: companyInfo } = useGetCompany();\n const { data: portalInfo } = usePortalItem();\n const { data: ipData } = useGetIPCountry();\n\n const userItem = useMemo(() => get(accountInfo, \"userItem\", {}), [accountInfo]);\n const accountItem = useMemo(() => get(accountInfo, \"accountItem\", {}), [accountInfo]);\n const companyItem = useMemo(() => get(companyInfo, \"companyItem\", {}), [companyInfo]);\n const portalItem = useMemo(() => get(portalInfo, \"portalItem\", {}), [portalInfo]);\n const seriesAccountItem = useMemo(() => get(accountInfo, \"seriesAccountItem\", {}), [accountInfo]);\n\n return useMemo(() => {\n if (accountItem.role_in_portal && accountItem.override_kyc) return EXEMPTION.REGS;\n const jurisdictions = get(portalItem, \"jurisdictions\", {});\n const selfAccreditate = get(portalItem, \"series.self_accreditate\");\n\n // If VPN or TOR is detected, return REGD exemption no matter what.\n // Rule decided on Feb 13th 2025 by the team.\n // Reason: Sometimes we get false positives on VPN/TOR detection, it creates frustration for users.\n // We don't want to block users from investing but we also don't want to risk compliance.\n // So we apply the rule that if VPN or TOR is detected, return REGD exemption no matter what.\n if (ipData?.security?.vpn || ipData?.security?.tor) {\n console.warn(\"VPN or TOR detected. Returning REGD exemption.\");\n return selfAccreditate ? EXEMPTION.REGD506B : EXEMPTION.REGD506C;\n }\n\n if (userItem.is_company_account) {\n return getExemption({\n ipCountry : ipData?.country,\n taxResidency : companyItem?.country_code,\n jurisdictions,\n selfAccreditate,\n boTaxResidency : [userItem?.country_code, ...(companyItem?.beneficial_owners ?? []).map(o => o.country_code)],\n isFastTrackMode : get(seriesAccountItem, \"invitation_link.attributes.fast_track_mode\", false)\n });\n }\n return getExemption({\n ipCountry : ipData?.country,\n taxResidency : userItem?.country_code,\n jurisdictions,\n selfAccreditate,\n declaredUSPerson : get(userItem, \"attributes.declared_us_person\", false),\n isGrant : isGrantSeries(get(portalItem, \"series\", {})),\n isFastTrackMode : get(seriesAccountItem, \"invitation_link.attributes.fast_track_mode\", false)\n });\n }, [userItem, accountItem, companyItem, ipData?.country, portalItem, seriesAccountItem, ipData?.security]);\n};\n\nexport default useUserExemption;\n","import { useMemo } from \"react\";\n\nimport get from \"lodash/get\";\n\nimport { getVerificationStatus } from \"src/utils/user\";\n\nimport useAccountInfo from \"./apis/useAccountInfo\";\nimport useGetCompany from \"./apis/useGetCompany\";\nimport useUserExemption from \"./useUserExemption\";\n\nconst useVerificationStatus = (props) => {\n const computeAccreditation = get(props, \"computeAccreditation\", true);\n const { data: accountInfo } = useAccountInfo();\n const { data: companyInfo } = useGetCompany();\n\n const userItem = useMemo(() => get(accountInfo, \"userItem\", {}), [accountInfo]);\n const accountItem = useMemo(() => get(accountInfo, \"accountItem\", {}), [accountInfo]);\n const companyItem = useMemo(() => get(companyInfo, \"companyItem\", {}), [companyInfo]);\n const isFastTrackMode = useMemo(() => get(accountInfo, \"seriesAccountItem.invitation_link.attributes.fast_track_mode\"), [accountInfo]);\n\n const exemption = useUserExemption();\n return useMemo(() => getVerificationStatus({\n userItem, accountItem, companyItem, exemption, computeAccreditation, isFastTrackMode\n }), [userItem, accountItem, companyItem, exemption, computeAccreditation, isFastTrackMode]);\n};\n\nexport default useVerificationStatus;\n","import { get } from \"lodash\";\n\nimport { SERIES_ROOT, SERIES_TYPE } from \"src/constants\";\n\nexport const isValid = value => value !== null && value !== undefined;\n\nexport const pickFirst = (...params) => {\n for (let index = 0; index < params.length; index += 1) {\n if (isValid(params[index])) {\n return params[index];\n }\n }\n return null;\n};\n\n// Returns the correct path if the current is wrong. Null otherwise.\nexport const checkCorrectPath = (series) => {\n const isSyndicate = get(series, \"attributes.syndicate\", false);\n const isGrant = series.type === SERIES_TYPE.GRANT;\n let type = series.type;\n if (isSyndicate) type = \"community\";\n if (isGrant) type = \"grants\";\n const correct_series_root = SERIES_ROOT[type].split(\"/\")[1];\n const current_root = window.location.pathname.split(\"/\")[1];\n if (correct_series_root !== current_root) {\n return window.location.pathname.replace(current_root, correct_series_root);\n }\n return null;\n};\n","import { EXEMPTION } from \"../constants\";\n\nexport const getExemption = ({\n ipCountry,\n taxResidency,\n jurisdictions,\n selfAccreditate,\n declaredUSPerson = false,\n boTaxResidency,\n isGrant = false,\n isFastTrackMode = false\n}) => {\n if (jurisdictions.prohibited_countries?.includes(ipCountry)) return EXEMPTION.PROHIBITED; // investor cannot invest\n if (jurisdictions.prohibited_countries?.includes(taxResidency)) return EXEMPTION.PROHIBITED; // investor cannot invest\n if (jurisdictions.prohibited_countries?.some(c => boTaxResidency?.includes(c))) return EXEMPTION.PROHIBITED; // investor cannot invest\n\n if (jurisdictions.accredited_countries?.includes(\"*\")\n || jurisdictions.accredited_countries?.includes(ipCountry)\n || jurisdictions.accredited_countries?.includes(taxResidency)\n || declaredUSPerson) {\n // investor is in an accredited country at the time of the check\n // OR investor is a US tax person although they do not live in the states\n return selfAccreditate ? EXEMPTION.REGD506B : EXEMPTION.REGD506C;\n }\n\n if (isGrant) return EXEMPTION.REGD506B;\n\n if (isFastTrackMode) return EXEMPTION.REGD506B;\n\n // investor is NOT in prohibited country + NOT in accredited country at time of check + NOT residing in accredited country\n return EXEMPTION.REGS;\n};\n\nexport const exemptionToKey = (exemption) => {\n if (exemption === EXEMPTION.REGS) return \"regS\";\n if ([EXEMPTION.REGD506B, EXEMPTION.REGD506C].includes(exemption)) return \"regD\";\n if (exemption === EXEMPTION.PROHIBITED) return \"prohibited\";\n};\n","import { INVESTMENT_STATUS } from \"../constants\";\n\nexport const isInvestmentInProgress = status => ![\n INVESTMENT_STATUS.SIGN_NEEDED,\n INVESTMENT_STATUS.TOKENS_ISSUED,\n INVESTMENT_STATUS.CANCELED,\n].includes(status);\n\nexport const isSignedInvestment = status => [\n INVESTMENT_STATUS.SIGNED,\n INVESTMENT_STATUS.FUNDS_SENT,\n INVESTMENT_STATUS.FUNDS_RECEIVED,\n INVESTMENT_STATUS.TOKENS_ISSUED,\n].includes(status);\n","import { SERIES_STATUS, CONTRACT_SUBTYPE, SERIES_TYPE } from \"src/constants\";\n\nexport const isSoftCommitmentContract = legal_contract => legal_contract.subtype === CONTRACT_SUBTYPE.SOFT_COMMITMENT;\nexport const isSoftCommitmentSeries = series => series.status === SERIES_STATUS.SOFT_COMMITMENT;\nexport const isRollupContract = legal_contract => legal_contract.subtype === CONTRACT_SUBTYPE.ROLLUP;\nexport const isGrantSeries = series => series.type === SERIES_TYPE.GRANT;\n","import { CUSTOMER_SUPPORT } from \"../constants\";\n\nconst Messenger = {\n open: null\n};\n\nMessenger.loadMessenger = () => null;\n\nMessenger.signIn = (userItem, payload) => {\n try {\n // Intercom\n if (payload.customerSupport === CUSTOMER_SUPPORT.INTERCOM) {\n const bootSettings = {\n app_id : payload.appId,\n user_id : payload.userId,\n user_hash : payload.userHash,\n email : userItem.email,\n is_customer : false\n };\n if (userItem.firstname) {\n bootSettings.name = userItem.firstname + \" \" + userItem.lastname;\n }\n window.Intercom(\"boot\", bootSettings);\n Messenger.open = CUSTOMER_SUPPORT.INTERCOM;\n }\n }\n catch (err) {\n console.error(\"[messenger] signIn failed:\", err);\n }\n};\n\nMessenger.startAnonymous = (appId, customerSupport) => {\n try {\n if (!customerSupport) {\n window.Intercom(\"shutdown\");\n Messenger.open = null;\n }\n else if (customerSupport === CUSTOMER_SUPPORT.INTERCOM) {\n window.Intercom(\"shutdown\");\n window.Intercom(\"boot\", {\n app_id: appId\n });\n Messenger.open = CUSTOMER_SUPPORT.INTERCOM;\n }\n }\n catch (err) {\n console.error(\"[messenger] startAnonymous failed:\", err);\n }\n};\n\nMessenger.showMessenger = (message) => {\n try {\n if (Messenger.open === CUSTOMER_SUPPORT.INTERCOM) {\n window.Intercom(\"showNewMessage\", message);\n }\n }\n catch (err) {\n console.error(\"[messenger] showMessenger failed:\", err);\n }\n};\n\nexport default Messenger;\n","import get from \"lodash/get\";\n\nimport {\n ACCREDITATION_STATUS,\n AML_ACTION,\n KYC_ACTION,\n COMPANY_STATUS_ACTION,\n EXEMPTION,\n VERIFICATION_STATUS,\n ACCREDITATION_ACTION\n} from \"src/constants\";\n\n/**\n * Get the email from a Privy user object\n * Returns the email address linked manually by the user\n * If no email address was linked manually, returns the google email address (if linked)\n * If no google email address is available, returns the apple email address (if linked)\n * If no apple email address is available, returns null\n * @param {Object} privyUser - The Privy user object\n * @returns {string|null} The email address of the user, or null if no email is found\n */\nexport const getPrivyUserEmail = (privyUser) => {\n if (!privyUser) {\n return null;\n }\n const { email, google, apple } = privyUser;\n return email?.address\n || google?.email\n || apple?.email\n || null;\n};\n\nexport const getVerificationStatus = ({\n userItem,\n accountItem,\n companyItem,\n exemption,\n computeAccreditation = true,\n isFastTrackMode = false\n}) => {\n if (!userItem || Object.keys(userItem).length === 0) return VERIFICATION_STATUS.VISITOR;\n if (userItem.sanctioned) return VERIFICATION_STATUS.SANCTIONED;\n if (accountItem.blocked) return VERIFICATION_STATUS.BLOCKED;\n if (exemption === EXEMPTION.PROHIBITED) return VERIFICATION_STATUS.PROHIBITED;\n\n // Check for company account specific conditions\n if (userItem.is_company_account) {\n if (accountItem.company_admin_action === COMPANY_STATUS_ACTION.REJECT) return VERIFICATION_STATUS.KYB_REJECTED;\n if (!accountItem.company_admin_action) {\n if (!companyItem?.submitted && !isFastTrackMode) return VERIFICATION_STATUS.KYB_NEED;\n }\n }\n else {\n if (!userItem.country_code || !get(userItem, \"attributes.address1\")) return VERIFICATION_STATUS.TAX_MISSING;\n if (!accountItem.override_kyc && !userItem.kyc_submitted) return VERIFICATION_STATUS.KYC_NOT_SUBMITTED;\n }\n\n // Exemption and accreditation checks. IMPORTANT: This must be placed here.\n if ([EXEMPTION.REGD506B, EXEMPTION.REGD506C].includes(exemption) && computeAccreditation) {\n if (!accountItem.accreditation_status) return VERIFICATION_STATUS.ACCREDITATION_NEED;\n if (accountItem.accreditation_status === ACCREDITATION_STATUS.NO) return VERIFICATION_STATUS.NON_ACCREDITED;\n if (accountItem.accreditation_status === ACCREDITATION_STATUS.NO_BUT) return VERIFICATION_STATUS.NON_ACCREDITED_BUT;\n if (exemption === EXEMPTION.REGD506C && !accountItem.document_id) return VERIFICATION_STATUS.ACCREDITED_NOT_VERIFIED;\n }\n\n // Check for company account specific conditions\n if (userItem.is_company_account) {\n if (!accountItem.company_admin_action) {\n if (!companyItem.ready_for_review) {\n return companyItem.beneficial_owners && companyItem.beneficial_owners.length\n ? VERIFICATION_STATUS.KYB_ID_NEED\n : VERIFICATION_STATUS.ERROR;\n }\n return VERIFICATION_STATUS.KYB_IN_REVIEW;\n }\n if (accountItem.company_admin_action !== COMPANY_STATUS_ACTION.ACCEPT) return VERIFICATION_STATUS.ERROR;\n }\n else if (!accountItem.override_kyc) {\n const kycAction = accountItem.kyc_admin_action || userItem.kyc_action;\n if (!kycAction) return VERIFICATION_STATUS.KYC_NEED;\n if (kycAction === KYC_ACTION.REJECT) return VERIFICATION_STATUS.KYC_REJECTED;\n if (kycAction === KYC_ACTION.REVIEW || (!accountItem.kyc_admin_action && accountItem.require_admin_validation)) {\n return VERIFICATION_STATUS.KYC_IN_REVIEW;\n }\n if (kycAction !== KYC_ACTION.ACCEPT) return VERIFICATION_STATUS.ERROR;\n\n const amlAction = accountItem.aml_admin_action || userItem.aml_action;\n if (!amlAction) return VERIFICATION_STATUS.AML_NEED;\n if (amlAction === AML_ACTION.REJECT) return VERIFICATION_STATUS.AML_REJECTED;\n if (![AML_ACTION.ACCEPT, AML_ACTION.SKIP].includes(amlAction)) return VERIFICATION_STATUS.ERROR;\n }\n else if (accountItem.require_admin_validation) {\n const kycAction = accountItem.kyc_admin_action || userItem.kyc_action;\n if (kycAction === KYC_ACTION.REJECT) return VERIFICATION_STATUS.KYC_REJECTED;\n if (kycAction === KYC_ACTION.REVIEW || (!accountItem.kyc_admin_action && accountItem.require_admin_validation)) {\n return VERIFICATION_STATUS.KYC_IN_REVIEW;\n }\n if (kycAction !== KYC_ACTION.ACCEPT) return VERIFICATION_STATUS.ERROR;\n }\n\n if (exemption === EXEMPTION.REGS) return VERIFICATION_STATUS.ROW_VERIFIED;\n if (exemption === EXEMPTION.REGD506B) return VERIFICATION_STATUS.ACCREDITED_VERIFIED;\n if (!accountItem.accreditation_admin_action) return VERIFICATION_STATUS.ACCREDITED_IN_REVIEW;\n\n return accountItem.accreditation_admin_action === ACCREDITATION_ACTION.ACCEPT\n ? VERIFICATION_STATUS.ACCREDITED_VERIFIED\n : VERIFICATION_STATUS.ACCREDITED_REJECTED;\n};\n"],"names":["_ref","componentLevel","children","path","navigate","useNavigate","context","useAppContext","ready","authenticated","usePrivy","data","slug","useSlug","currentDialog","setData","setCurrentDialog","useGlobalDialog","accountInfo","isLoading","accountInfoLoading","useAccountInfo","error","portalItemError","portalInfo","usePortalItem","investmentsInfo","investmentInfoLoading","useGetSeriesInvestments","messengerToken","useGetMessengerToken","accountItem","userItem","seriesAccountItem","invitationLinkItem","noAccountItemInvitationLinkItem","useMemo","verificationStatus","useVerificationStatus","seriesItem","get","investmentItems","self_accreditate","Boolean","useEffect","seriesId","portalId","Sentry","VERIFICATION_STATUS","PROHIBITED","DIALOG_NAME","ACCESS_UNAVAILABLE","Messenger","signIn","type","newPath","checkCorrectPath","_jsx","Navigate","to","SANCTIONED","SERIES_STATUS","SETUP","READY","includes","status","ROUTE_PATH","SERIES_NOT_PUBLISHED","AUTH_LEVEL","FREE","authLevel","DASHBOARD","SIGN_IN","PUBLIC","START","AUTH","replace","LoadingSpinner","active","INVITE_DISABLED","email","INVALID_INVITE","state","invitationCode","hidePortfollio","show_series_auth","blocked","KYC_FLOW","KYC_FINISHED","name","CLOSED","length","some","_ref2","isSignedInvestment","ROW_VERIFIED","INTERNATIONAL","ACCREDITED_VERIFIED","NON_ACCREDITED_BUT","US","useAuthSWR","callLambda","method","service","SERVICE_1","url","getInvitationCodeBySlug","window","localStorage","getItem","appNavigate","useAppNavigate","queryStringParameters","onError","errorMessage","INVITE_REQUIRED","console","toast","key","fetcher","config","user","useSWR","_accountInfo$accountI","companyId","company_id","SERVICE_2","useCallback","options","rootdir","location","pathname","match","split","useUserExemption","companyInfo","useGetCompany","ipData","useGetIPCountry","companyItem","portalItem","_ipData$security","_ipData$security2","role_in_portal","override_kyc","EXEMPTION","REGS","jurisdictions","selfAccreditate","security","vpn","tor","warn","REGD506B","REGD506C","is_company_account","getExemption","ipCountry","country","taxResidency","country_code","boTaxResidency","_companyItem$benefici","beneficial_owners","map","o","isFastTrackMode","declaredUSPerson","isGrant","isGrantSeries","props","computeAccreditation","exemption","getVerificationStatus","isValid","value","undefined","series","isSyndicate","SERIES_TYPE","GRANT","correct_series_root","SERIES_ROOT","current_root","_jurisdictions$prohib","_jurisdictions$prohib2","_jurisdictions$prohib3","_jurisdictions$accred","_jurisdictions$accred2","_jurisdictions$accred3","prohibited_countries","c","accredited_countries","exemptionToKey","INVESTMENT_STATUS","SIGNED","FUNDS_SENT","FUNDS_RECEIVED","TOKENS_ISSUED","isSoftCommitmentSeries","SOFT_COMMITMENT","isRollupContract","legal_contract","subtype","CONTRACT_SUBTYPE","ROLLUP","open","payload","customerSupport","CUSTOMER_SUPPORT","INTERCOM","bootSettings","app_id","appId","user_id","userId","user_hash","userHash","is_customer","firstname","lastname","Intercom","err","message","getPrivyUserEmail","privyUser","google","apple","address","Object","keys","VISITOR","sanctioned","BLOCKED","company_admin_action","COMPANY_STATUS_ACTION","REJECT","KYB_REJECTED","submitted","KYB_NEED","TAX_MISSING","kyc_submitted","KYC_NOT_SUBMITTED","accreditation_status","ACCREDITATION_NEED","ACCREDITATION_STATUS","NO","NON_ACCREDITED","NO_BUT","document_id","ACCREDITED_NOT_VERIFIED","ready_for_review","KYB_IN_REVIEW","KYB_ID_NEED","ERROR","ACCEPT","require_admin_validation","kycAction","kyc_admin_action","kyc_action","KYC_ACTION","KYC_REJECTED","REVIEW","KYC_IN_REVIEW","KYC_NEED","amlAction","aml_admin_action","aml_action","AML_NEED","AML_ACTION","AML_REJECTED","SKIP","accreditation_admin_action","ACCREDITATION_ACTION","ACCREDITED_REJECTED","ACCREDITED_IN_REVIEW"],"sourceRoot":""}