!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.vue=e())}(this,function(){"use strict";var t="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function e(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}var r=e,o=n;function a(t){if(r===setTimeout)return setTimeout(t,0);if((r===e||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}"function"==typeof t.setTimeout&&(r=setTimeout),"function"==typeof t.clearTimeout&&(o=clearTimeout);var i,u=[],c=!1,s=-1;function l(){c&&i&&(c=!1,i.length?u=i.concat(u):s=-1,u.length&&f())}function f(){if(!c){var t=a(l);c=!0;for(var e=u.length;e;){for(i=u,u=[];++s1)for(var n=1;n/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,S="[a-zA-Z_][\\w\\-\\.]*",k="((?:".concat(S,"\\:)?").concat(S,")"),A=new RegExp("^<".concat(k)),q=/^\s*(\/?)>/,M=new RegExp("^<\\/".concat(k,"[^>]*>")),P=/^]+>/i,R=/^/g,"$1").replace(//g,"$1")),K(o,r)&&(r=r.slice(1)),e.chars&&e.chars(r),""});c+=t.length-i.length,t=i,x(o,c-n,c)}();else{var s=t.indexOf("<");if(0===s){if(R.test(t)){var l=t.indexOf("--\x3e");if(l>=0){e.shouldKeepComment&&e.comment(t.substring(4,l)),y(l+3);continue}}if(_.test(t)){var f=t.indexOf("]>");if(f>=0){y(f+2);continue}}var h=t.match(P);if(h){y(h[0].length);continue}var d=t.match(M);if(d){var g=c;y(d[0].length),x(d[1],g,c);continue}var p=T();if(p){b(p),K(r,t)&&y(1);continue}}var m=void 0,v=void 0,w=void 0;if(s>=0){for(v=t.slice(s);!(M.test(v)||A.test(v)||R.test(v)||_.test(v)||(w=v.indexOf("<",1))<0);)s+=w,v=t.slice(s);m=t.substring(0,s),y(s)}s<0&&(m=t,t=""),e.chars&&m&&e.chars(m)}if(t===n){e.chars&&e.chars(t),"production"!==N.env.NODE_ENV&&!o.length&&e.warn&&e.warn('Mal-formatted tag at end of template: "'.concat(t,'"'));break}}function y(e){c+=e,t=t.substring(e)}function T(){var e=t.match(A);if(e){var n,r,o={tagName:e[1],attrs:[],start:c};for(y(e[0].length);!(n=t.match(q))&&(r=t.match(L));)y(r[0].length),o.attrs.push(r);if(n)return o.unarySlash=n[1],y(n[0].length),o.end=c,o}}function b(t){var n=t.tagName,c=t.unarySlash;a&&("p"===r&&D(n)&&x(r),u(n)&&r===n&&x(n));for(var s=i(n)||!!c,l=t.attrs.length,f=new Array(l),h=0;h=0&&o[i].lowerCasedTag!==u;i--);else i=0;if(i>=0){for(var s=o.length-1;s>=i;s--)"production"!==N.env.NODE_ENV&&(s>i||!t)&&e.warn&&e.warn("tag <".concat(o[s].tag,"> has no matching end tag.")),e.end&&e.end(o[s].tag,n,a);o.length=i,r=i&&o[i-1].tag}else"br"===u?e.start&&e.start(t,[],!0,n,a):"p"===u&&(e.start&&e.start(t,[],!1,n,a),e.end&&e.end(t,n,a))}x()}(t,{start:function(t,e,o,a,i){var u={tag:t,attrs:e,unary:o,start:a,children:[]};r.children.push(u),o?u.end=i:(u.contentStart=i,n.push(u),r=u)},end:function(t,e,o){n.pop(),r.contentEnd=e,r.end=o,r=n[n.length-1]}}),e},astFormat:"vue"}}}});