import{g as I}from"./core-js-2d8c9565.js";var o=0,E=1,w=2,v=3,P=4,h=5,p=6,u=/[a-z0-9_-]/i,n=/[\s\t]/,g=function(l){for(var t=!0,r=o,s="",i=0,a,e,f=[];;){if(e=l[i],r===o){if(!e&&t)break;if(!e&&!t)throw new Error("Parse error");if(e==='"'||e==="'")a=e,r=E,t=!1;else if(!n.test(e))if(u.test(e))r=v,t=!1,i--;else throw new Error("Parse error")}else if(r===E)if(e)e==="\\"?r=w:e===a?(f.push(s),s="",r=P):s+=e;else throw new Error("Parse Error");else if(r===w)if(e===a||e==="\\")s+=e,r=E;else throw new Error("Parse error");else if(r===v)if(e)u.test(e)?s+=e:e===","?(f.push(s),s="",r=o):n.test(e)?r=h:e==="\\"&&(r=p);else{f.push(s);break}else if(r===p){if(/[0-9a-f]/i.test(e))throw new Error("Parse error");s+=e,r=v}else if(r===h)if(e){if(u.test(e))s+=" "+e,r=v;else if(e===",")f.push(s),s="",r=o;else if(!n.test(e))throw new Error("Parse error")}else{f.push(s);break}else if(r===P)if(e){if(e===",")r=o;else if(!n.test(e))throw new Error("Parse error")}else break;i++}return f},N=/[^a-z0-9_-]/i,c=function(l,t){var r=t&&t.quote||'"';if(r!=='"'&&r!=="'")throw new Error("Quote must be `'` or `\"`");for(var s=new RegExp(r,"g"),i=[],a=0;a<l.length;++a){var e=l[a];N.test(e)&&(e=e.replace(/\\/g,"\\\\").replace(s,"\\"+r),e=r+e+r),i.push(e)}return i.join(", ")},A={parse:g,stringify:c};const b=I(A);export{b as e};
