"use strict";const r=Symbol("singleComment"),u=Symbol("multiComment"),C=(l,m)=>{let f=m-1,t=0;for(;l[f]==="\\";)f-=1,t+=1;return!!(t%2)};function d(l,{trailingCommas:m=!1}={}){if(typeof l!="string")throw new TypeError(`Expected argument \`jsonString\` to be a \`string\`, got \`${typeof l}\``);let f=!1,t=!1,s=0,c="",a="",n=-1;for(let e=0;e<l.length;e++){const i=l[e],o=l[e+1];if(!t&&i==='"'&&(C(l,e)||(f=!f)),!f)if(!t&&i+o==="//")c+=l.slice(s,e),s=e,t=r,e++;else if(t===r&&i+o===`\r
`){e++,t=!1,s=e;continue}else if(t===r&&i===`
`)t=!1,s=e;else if(!t&&i+o==="/*"){c+=l.slice(s,e),s=e,t=u,e++;continue}else if(t===u&&i+o==="*/"){e++,t=!1,s=e+1;continue}else m&&!t&&(n!==-1?i==="}"||i==="]"?(c+=l.slice(s,e),a+=c.slice(1),c="",s=e,n=-1):i!==" "&&i!=="	"&&i!=="\r"&&i!==`
`&&(c+=l.slice(s,e),s=e,n=-1):i===","&&(a+=c+l.slice(s,e),c="",s=e,n=e))}return a+c+(t?"":l.slice(s))}exports.stripJsonComments=d;
//# sourceMappingURL=strip-json-comments-Bs-tNeye.cjs.map
