var r,n;function t(){if(n)return r;n=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,i=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,c=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,s=/^\s+|\s+$/g,f="";function l(r){return r?r.replace(s,f):f}return r=function(r,n){if("string"!=typeof r)throw new TypeError("First argument must be a string");if(!r)return[];n=n||{};var s=1,h=1;function p(r){var n=r.match(e);n&&(s+=n.length);var t=r.lastIndexOf("\n");h=~t?r.length-t:h+r.length}function v(){var r={line:s,column:h};return function(n){return n.position=new m(r),w(),n}}function m(r){this.start=r,this.end={line:s,column:h},this.source=n.source}function g(t){var e=new Error(n.source+":"+s+":"+h+": "+t);if(e.reason=t,e.filename=n.source,e.line=s,e.column=h,e.source=r,!n.silent)throw e}function y(n){var t=n.exec(r);if(t){var e=t[0];return p(e),r=r.slice(e.length),t}}function w(){y(i)}function A(r){var n;for(r=r||[];n=d();)!1!==n&&r.push(n);return r}function d(){var n=v();if("/"==r.charAt(0)&&"*"==r.charAt(1)){for(var t=2;f!=r.charAt(t)&&("*"!=r.charAt(t)||"/"!=r.charAt(t+1));)++t;if(t+=2,f===r.charAt(t-1))return g("End of comment missing");var e=r.slice(2,t-2);return h+=2,p(e),r=r.slice(t),h+=2,n({type:"comment",comment:e})}}function x(){var r=v(),n=y(o);if(n){if(d(),!y(c))return g("property missing ':'");var e=y(u),i=r({type:"declaration",property:l(n[0].replace(t,f)),value:e?l(e[0].replace(t,f)):f});return y(a),i}}return m.prototype.content=r,w(),function(){var r,n=[];for(A(n);r=x();)!1!==r&&(n.push(r),A(n));return n}()}}export{t as r};
