"use strict";const M=require("../../../../../../../_virtual/index39.js");require("../../../../../@babel_highlight@7.18.6/node_modules/@babel/highlight/lib/index.js");const E=require("../../../../../../../_virtual/index40.js");Object.defineProperty(M.__exports,"__esModule",{value:!0});M.__exports.codeFrameColumns=C;M.__exports.default=O;var k=E.__exports;let $=!1;function N(r){return{gutter:r.grey,marker:r.red.bold,message:r.red.bold}}const j=/\r\n|[\n\r\u2028\u2029]/;function D(r,o,e){const c=Object.assign({column:0,line:-1},r.start),d=Object.assign({},c,r.end),{linesAbove:s=2,linesBelow:l=3}=e||{},g=c.line,i=c.column,u=d.line,h=d.column;let b=Math.max(g-(s+1),0),f=Math.min(o.length,u+l);g===-1&&(b=0),u===-1&&(f=o.length);const _=u-g,t={};if(_)for(let n=0;n<=_;n++){const a=n+g;if(!i)t[a]=!0;else if(n===0){const m=o[a-1].length;t[a]=[i,m-i+1]}else if(n===_)t[a]=[0,h];else{const m=o[a-n].length;t[a]=[0,m]}}else i===h?i?t[g]=[i,0]:t[g]=!0:t[g]=[i,h-i];return{start:b,end:f,markerLines:t}}function C(r,o,e={}){const c=(e.highlightCode||e.forceColor)&&(0,k.shouldHighlight)(e),d=(0,k.getChalk)(e),s=N(d),l=(n,a)=>c?n(a):a,g=r.split(j),{start:i,end:u,markerLines:h}=D(o,g,e),b=o.start&&typeof o.start.column=="number",f=String(u).length;let t=(c?(0,k.default)(r,e):r).split(j,u).slice(i,u).map((n,a)=>{const m=i+1+a,x=` ${` ${m}`.slice(-f)} |`,p=h[m],W=!h[m+1];if(p){let L="";if(Array.isArray(p)){const y=n.slice(0,Math.max(p[0]-1,0)).replace(/[^\t]/g," "),v=p[1]||1;L=[`
 `,l(s.gutter,x.replace(/\d/g," "))," ",y,l(s.marker,"^").repeat(v)].join(""),W&&e.message&&(L+=" "+l(s.message,e.message))}return[l(s.marker,">"),l(s.gutter,x),n.length>0?` ${n}`:"",L].join("")}else return` ${l(s.gutter,x)}${n.length>0?` ${n}`:""}`}).join(`
`);return e.message&&!b&&(t=`${" ".repeat(f+1)}${e.message}
${t}`),c?d.reset(t):t}function O(r,o,e,c={}){if(!$){$=!0;const s="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";if(process.emitWarning)process.emitWarning(s,"DeprecationWarning");else{const l=new Error(s);l.name="DeprecationWarning",console.warn(new Error(s))}}return e=Math.max(e,0),C(r,{start:{column:e,line:o}},c)}
//# sourceMappingURL=index.js.map
