import{u as e,a as o,b as t}from"./vendor-ant-cds-BOj-tX6j.js";import{r as n}from"./vendor-react-DcxrbCFs.js";import{t as s}from"./c4b350ac1-BTR_0NaM.js";const r=n.createContext({});r.displayName="CdsFontFamilyContext";const a=(()=>{const e=new Map;return function o(t){var n;if("object"==typeof(n=t)&&null!==n&&"string"==typeof n.cssVar&&e.set(t.__name,t),"object"==typeof t&&null!==t)for(const[e,s]of Object.entries(t))"cssVar"!==e&&"value"!==e&&"modes"!==e&&"__name"!==e&&"type"!==e&&o(s)}(s),e})();function i(s){const i=e(),c=o(),f=t(),m=n.useContext(r);if("font-sans"===s){const e=a.get("font-system")?.value??"";if("system"===c)return e;if(m.sans)return`${m.sans}, ${e}`}else{if("font-mono"===s&&m.mono){const e="string"==typeof f?f.trim():"";return`${e?`"${e.replaceAll(/[\u0000-\u001f\u007f]/g,"").replaceAll("\\","\\\\").replaceAll('"','\\"')}", `:""}${m.mono}, "Anthropic Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace`}if("font-voice"===s&&m.serif)return`${m.serif}, ui-serif, Georgia, "Times New Roman", serif`}const l=a.get(s);return("dark"===i?l?.modes?.dark:void 0)??l?.value??""}export{i as u};
