text: /**
   * @file prescribe
   * @description Tiny, forgiving HTML parser
   * @version vundefined
   * @see {@link https://github.com/krux/prescribe/}
   * @license MIT
   * @author Derek Brans
   * @copyright 2016 Krux Digital, Inc
   */
  !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["Prescribe"]=e():t["Prescribe"]=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={"exports":{},"id":r,"loaded":!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}var o=n(1),a=r(o);t.exports=a["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e["default"]=t,e}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=n(2),s=o(i),u=n(3),c=o(u),f=n(6),h=r(f),p=n(5),l={"comment":/^<!--/,"endTag":/^<\//,"atomicTag":/^<\s*(script|style|noscript|iframe|textarea)[\s\/>]/i,"startTag":/^</,"chars":/^[^<]/},g=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,t),this.stream=n;var o=!1,i={};for(var u in s)s.hasOwnProperty(u)&&(r.autoFix&&(i[u+"Fix"]=!0),o=o||i[u+"Fix"]);o?(this._readToken=(0,h["default"])(this,i,function(){return e._readTokenImpl()}),this._peekToken=(0,h["default"])(this,i,function(){return e._peekTokenImpl()})):(this._readToken=this._readTokenImpl,this._peekToken=this._peekTokenImpl)}return t.prototype.append=function(t){this.stream+=t},t.prototype.prepend=function(t){this.stream=t+this.stream},t.prototype._readTokenImpl=function(){var t=this._peekTokenImpl();if(t)return this.stream=this.stream.slice(t.length),t},t.prototype._peekTokenImpl=function(){for(var t in l)if(l.hasOwnProperty(t)&&l[t].test(this.stream)){var e=c[t](this.stream);if(e)return"startTag"===e.type&&/script|style/i.test(e.tagName)?null:(e.text=this.stream.substr(0,e.length),e)}},t.prototype.peekToken=function(){return this._peekToken()},t.prototype.readToken=function(){return this._readToken()},t.prototype.readTokens=function(t){for(var e=void 0;e=this.readToken();)if(t[e.type]&&t[e.type](e)===!1)return},t.prototype.clear=function(){var t=this.stream;return this.stream="",t},t.prototype.rest=function(){return this.stream},t}();e["default"]=g,g.tokenToString=function(t){return t.toString()},g.escapeAttributes=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]=(0,p.escapeQuotes)(t[n],null));return e},g.supports=s;for(var m in s)s.hasOwnProperty(m)&&(g.browserHasFlaw=g.browserHasFlaw||!s[m]&&m)},function(t,e){"use strict";e.__esModule=!0;var n=!1,r=!1,o=window.document.createElement("div");try{var a="<P><I></P></I>";o.innerHTML=a,e.tagSoup=n=o.innerHTML!==a}catch(t){e.tagSoup=n=!1}try{o.innerHTML="<P><i><P></P></i></P>",e.selfClose=r=2===o.childNodes.length}catch(t){e.selfClose=r=!1}o=null,e.tagSoup=n,e.selfClose=r},function(t,e,n){"use strict";function r(t){var e=t.indexOf("-->");if(e>=0)return new c.CommentToken(t.substr(4,e-1),e+3)}function o(t){var e=t.indexOf("<");return new c.CharsToken(e>=0?e:t.length)}function a(t){var e=t.indexOf(">");if(e!==-1){var n=t.match(f.startTag);if(n){var r=function(){var t={},e={},r=n[2];return n[2].replace(f.attr,function(n,o){arguments[2]||arguments[3]||arguments[4]||arguments[5]?arguments[5]?(t[arguments[5]]="",e[arguments[5]]=!0):t[o]=arguments[2]||arguments[3]||arguments[4]||f.fillAttr.test(o)&&o||"":t[o]="",r=r.replace(n,"")}),{"v":new c.StartTagToken(n[1],n[0].length,t,e,(!!n[3]),r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""))}}();if("object"===("undefined"==typeof r?"undefined":u(r)))return r.v}}}function i(t){var e=a(t);if(e){var n=t.slice(e.length);if(n.match(new RegExp("</\\s*"+e.tagName+"\\s*>","i"))){var r=n.match(new RegExp("([\\s\\S]*?)</\\s*"+e.tagName+"\\s*>","i"));if(r)return new c.AtomicTagToken(e.tagName,r[0].length+e.length,e.attrs,e.booleanAttrs,r[1])}}}function s(t){var e=t.match(f.endTag);if(e)return new c.EndTagToken(e[1],e[0].length)}e.__esModule=!0;var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.comment=r,e.chars=o,e.startTag=a,e.atomicTag=i,e.endTag=s;var c=n(4),f={"startTag":/^<([\-A-Za-z0-9_]+)((?:\s+[\w\-]+(?:\s*=?\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,"endTag":/^<\/([\-A-Za-z0-9_]+)[^>]*>/,"attr":/(?:([\-A-Za-z0-9_]+)\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))|(?:([\-A-Za-z0-9_]+)(\s|$)+)/g,"fillAttr":/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noresize|noshade|nowrap|readonly|selected)$/i}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0,e.EndTagToken=e.AtomicTagToken=e.StartTagToken=e.TagToken=e.CharsToken=e.CommentToken=e.Token=void 0;var o=n(5),a=(e.Token=function t(e,n){r(this,t),this.type=e,this.length=n,this.text=""},e.CommentToken=function(){function t(e,n){r(this,t),this.type="comment",this.length=n||(e?e.length:0),this.text="",this.content=e}return t.prototype.toString=function(){return"<!--"+this.content},t}(),e.CharsToken=function(){function t(e){r(this,t),this.type="chars",this.length=e,this.text=""}return t.prototype.toString=function(){return this.text},t}(),e.TagToken=function(){function t(e,n,o,a,i){r(this,t),this.type=e,this.length=o,this.text="",this.tagName=n,this.attrs=a,this.booleanAttrs=i,this.unary=!1,this.html5Unary=!1}return t.formatTag=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n="<"+t.tagName;for(var r in t.attrs)if(t.attrs.hasOwnProperty(r)){n+=" "+r;var a=t.attrs[r];"undefined"!=typeof t.booleanAttrs&&"undefined"!=typeof t.booleanAttrs[r]||(n+='="'+(0,o.escapeQuotes)(a)+'"')}return t.rest&&(n+=" "+t.rest),n+=t.unary&&!t.html5Unary?"/>":">",void 0!==e&&null!==e&&(n+=e+"</"+t.tagName+">"),n},t}());e.StartTagToken=function(){function t(e,n,o,a,i,s){r(this,t),this.type="startTag",this.length=n,this.text="",this.tagName=e,this.attrs=o,this.booleanAttrs=a,this.html5Unary=!1,this.unary=i,this.rest=s}return t.prototype.toString=function(){return a.formatTag(this)},t}(),e.AtomicTagToken=function(){function t(e,n,o,a,i){r(this,t),this.type="atomicTag",this.length=n,this.text="",this.tagName=e,this.attrs=o,this.booleanAttrs=a,this.unary=!1,this.html5Unary=!1,this.content=i}return t.prototype.toString=function(){return a.formatTag(this,this.content)},t}(),e.EndTagToken=function(){function t(e,n){r(this,t),this.type="endTag",this.length=n,this.text="",this.tagName=e}return t.prototype.toString=function(){return"</"+this.tagName+">"},t}()},function(t,e){"use strict";function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return t?t.replace(/([^"]*)"/g,function(t,e){return/\\/.test(e)?e+'"':e+'\\"'}):e}e.__esModule=!0,e.escapeQuotes=n},function(t,e){"use strict";function n(t){return t&&"startTag"===t.type&&(t.unary=s.test(t.tagName)||t.unary,t.html5Unary=!/\/>$/.test(t.text)),t}function r(t,e){var r=t.stream,o=n(e());return t.stream=r,o}function o(t,e){var n=e.pop();t.prepend("</"+n.tagName+">")}function a(){var t=[];return t.last=function(){return this[this.length-1]},t.lastTagNameEq=function(t){var e=this.last();return e&&e.tagName&&e.tagName.toUpperCase()===t.toUpperCase()},t.containsTagName=function(t){for(var e,n=0;e=this[n];n++)if(e.tagName===t)return!0;return!1},t}function i(t,e,i){function s(){var e=r(t,i);e&&f[e.type]&&f[e.type](e)}var c=a(),f={"startTag":function(n){var r=n.tagName;"TR"===r.toUpperCase()&&c.lastTagNameEq("TABLE")?(t.prepend("<TBODY>"),s()):e.selfCloseFix&&u.test(r)&&c.containsTagName(r)?c.lastTagNameEq(r)?o(t,c):(t.prepend("</"+n.tagName+">"),s()):n.unary||c.push(n)},"endTag":function(n){var r=c.last();r?e.tagSoupFix&&!c.lastTagNameEq(n.tagName)?o(t,c):c.pop():e.tagSoupFix&&(i(),s())}};return function(){return s(),n(i())}}e.__esModule=!0,e["default"]=i;var s=/^(AREA|BASE|BASEFONT|BR|COL|FRAME|HR|IMG|INPUT|ISINDEX|LINK|META|PARAM|EMBED)$/i,u=/^(COLGROUP|DD|DT|LI|OPTIONS|P|TD|TFOOT|TH|THEAD|TR)$/i}])});