import{r as e}from"./exchange-identity-e3SY8kxF.js";var t={AR:`Argentina`,AT:`Austria`,AU:`Australia`,BE:`Belgium`,BR:`Brazil`,CA:`Canada`,CH:`Switzerland`,CL:`Chile`,CN:`China`,CZ:`Czech Republic`,DE:`Germany`,DK:`Denmark`,EE:`Estonia`,EG:`Egypt`,ES:`Spain`,EU:`Europe`,FI:`Finland`,FR:`France`,GB:`United Kingdom`,GR:`Greece`,HK:`Hong Kong`,HU:`Hungary`,ID:`Indonesia`,IE:`Ireland`,IL:`Israel`,IN:`India`,IS:`Iceland`,IT:`Italy`,JP:`Japan`,KR:`South Korea`,LK:`Sri Lanka`,LT:`Lithuania`,LV:`Latvia`,MX:`Mexico`,MY:`Malaysia`,NL:`Netherlands`,NO:`Norway`,NZ:`New Zealand`,PL:`Poland`,PT:`Portugal`,QA:`Qatar`,RU:`Russia`,SA:`Saudi Arabia`,SE:`Sweden`,SG:`Singapore`,TH:`Thailand`,TR:`Turkey`,TW:`Taiwan`,US:`United States`,VE:`Venezuela`,ZA:`South Africa`};function n(t){return u(t.exchangeName)??e(t.exchange)?.displayName}function r(e){return u(e.exchangeCountry)??t[i(e)??``]}function i(t){return l(t.exchangeCountryCode)??l(e(t.exchange)?.exchangeCountryCode)}function a(e){let t=l(e);return t?[...t].map(e=>String.fromCodePoint(e.charCodeAt(0)+127397)).join(``):``}function o(e){let t=[e.hqCity,e.hqStateProvince,e.hqCountry??e.country].filter(Boolean);return t.length?t.join(`, `):void 0}function s(e){if(typeof e.marketCap!=`number`||!Number.isFinite(e.marketCap)||e.marketCap<=0)return;let t=e.marketCapCurrency??`USD`,n=e.marketCap/1e6;return`${t} ${n>=1e4?`${(n/1e3).toFixed(1)}B`:`${Math.round(n).toLocaleString()}M`}`}function c(e){if(!(typeof e.employees!=`number`||!Number.isFinite(e.employees)||e.employees<=0))return`${Math.round(e.employees).toLocaleString()} employees`}function l(e){let t=e?.trim().toUpperCase();return t&&/^[A-Z]{2}$/.test(t)?t:void 0}function u(e){return e?.trim()||void 0}var d={gradientStart:`#586274`,gradientMid:`#A1A1AA`,gradientEnd:`#E5E7EB`},f={equity:{securityType:`equity`,marketSectorName:`Equity`,primaryAssetSubType:`Equities`,gradientStart:`#0A2540`,gradientMid:`#2E90FA`,gradientEnd:`#A7D7FF`,isSupportedPrimaryAssetSubType:!0},etf:{securityType:`etf`,marketSectorName:`Equity`,primaryAssetSubType:`ETFs`,gradientStart:`#4A148C`,gradientMid:`#BF5AF2`,gradientEnd:`#F0D9FF`,isSupportedPrimaryAssetSubType:!0},fund:{securityType:`fund`,marketSectorName:`Equity`,primaryAssetSubType:`Funds`,gradientStart:`#004D40`,gradientMid:`#34C759`,gradientEnd:`#C8F7DC`,isSupportedPrimaryAssetSubType:!0},index:{securityType:`index`,marketSectorName:`Index`,primaryAssetSubType:`Indices`,gradientStart:`#37474F`,gradientMid:`#8E8E93`,gradientEnd:`#E5E5EA`,isSupportedPrimaryAssetSubType:!0},currency:{securityType:`currency`,marketSectorName:`Currency`,primaryAssetSubType:`Currencies`,gradientStart:`#E65100`,gradientMid:`#FF9F0A`,gradientEnd:`#FFE0A3`,isSupportedPrimaryAssetSubType:!0},crypto:{securityType:`crypto`,marketSectorName:`Cryptocurrency`,primaryAssetSubType:`Cryptocurrencies`,gradientStart:`#1A1A1A`,gradientMid:`#FFD60A`,gradientEnd:`#FFF2A8`,isSupportedPrimaryAssetSubType:!0},money_market:{securityType:`money_market`,marketSectorName:`Money Market`,primaryAssetSubType:`Money Markets`,gradientStart:`#0D47A1`,gradientMid:`#64D2FF`,gradientEnd:`#D7F6FF`,isSupportedPrimaryAssetSubType:!0},bond:{securityType:`bond`,marketSectorName:`Fixed Income`,primaryAssetSubType:`Other`,...d,isSupportedPrimaryAssetSubType:!1},commodity:{securityType:`commodity`,marketSectorName:`Commodity`,primaryAssetSubType:`Other`,...d,isSupportedPrimaryAssetSubType:!1},unknown:{securityType:`unknown`,marketSectorName:`Other`,primaryAssetSubType:`Other`,...d,isSupportedPrimaryAssetSubType:!1}},p=new Set(Object.keys(f));function m(e){return!e||!p.has(e)?f.unknown:f[e]}export{n as a,s as c,r as i,c as n,a as o,i as r,o as s,m as t};