"use strict";const i=require("./css-HnNQMUzV.cjs");let e=null;const u=()=>(e??=document.createElement("canvas"),e),c=(t,a,n)=>{if(i.S.RUNTIME==="node")return{width:0,height:0};n??=u().getContext("2d"),n.font=a;const o=n.measureText(t);return s(o)},s=t=>({width:Math.trunc(Math.abs(t.actualBoundingBoxLeft)+Math.abs(t.actualBoundingBoxRight)),height:Math.trunc(Math.abs(t.actualBoundingBoxAscent)+Math.abs(t.actualBoundingBoxDescent))});exports.dimensions=c;exports.dimensionsFromMetrics=s;
