|
|
|
(()=>{var __webpack_modules__={3595:function(e,t){var n,r;r=this,void 0===(n=function(){return r.Autolinker=((c=function(e){c.Util.assign(this,e)}).prototype={constructor:c,urls:!0,email:!0,twitter:!0,newWindow:!0,stripPrefix:!0,truncate:void 0,className:"",htmlParser:void 0,matchParser:void 0,tagBuilder:void 0,link:function(e){for(var t=this.getHtmlParser().parse(e),n=0,r=[],o=0,a=t.length;o<a;o++){var i=t[o],s=i.getType(),l=i.getText();if("element"===s)"a"===i.getTagName()&&(i.isClosing()?n=Math.max(n-1,0):n++),r.push(l);else if("entity"===s)r.push(l);else if(0===n){var c=this.linkifyStr(l);r.push(c)}else r.push(l)}return r.join("")},linkifyStr:function(e){return this.getMatchParser().replace(e,this.createMatchReturnVal,this)},createMatchReturnVal:function(e){var t;return this.replaceFn&&(t=this.replaceFn.call(this,this,e)),"string"==typeof t?t:!1===t?e.getMatchedText():t instanceof c.HtmlTag?t.toString():this.getTagBuilder().build(e).toString()},getHtmlParser:function(){var e=this.htmlParser;return e||(e=this.htmlParser=new c.htmlParser.HtmlParser),e},getMatchParser:function(){var e=this.matchParser;return e||(e=this.matchParser=new c.matchParser.MatchParser({urls:this.urls,email:this.email,twitter:this.twitter,stripPrefix:this.stripPrefix})),e},getTagBuilder:function(){var e=this.tagBuilder;return e||(e=this.tagBuilder=new c.AnchorTagBuilder({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),e}},c.link=function(e,t){return new c(t).link(e)},c.match={},c.htmlParser={},c.matchParser={},c.Util={abstractMethod:function(){throw"abstract"},assign:function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},extend:function(e,t){var n,r=e.prototype,o=function(){};o.prototype=r;var a=(n=t.hasOwnProperty("constructor")?t.constructor:function(){r.constructor.apply(this,arguments)}).prototype=new o;return a.constructor=n,a.superclass=r,delete t.constructor,c.Util.assign(a,t),n},ellipsis:function(e,t,n){return e.length>t&&(n=null==n?"..":n,e=e.substring(0,t-n.length)+n),e},indexOf:function(e,t){if(Array.prototype.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},splitAndCapture:function(e,t){if(!t.global)throw new Error("`splitRegex` must have the 'g' flag set");for(var n,r=[],o=0;n=t.exec(e);)r.push(e.substring(o,n.index)),r.push(n[0]),o=n.index+n[0].length;return r.push(e.substring(o)),r}},c.HtmlTag=c.Util.extend(Object,{whitespaceRegex:/\s+/,constructor:function(e){c.Util.assign(this,e),this.innerHtml=this.innerHtml||this.innerHTML},setTagName:function(e){return this.tagName=e,this},getTagName:function(){return this.tagName||""},setAttr:function(e,t){return this.getAttrs()[e]=t,this},getAttr:function(e){return this.getAttrs()[e]},setAttrs:function(e){var t=this.getAttrs();return c.Util.assign(t,e),this},getAttrs:function(){return this.attrs||(this.attrs={})},setClass:function(e){return this.setAttr("class",e)},addClass:function(e){for(var t,n=this.getClass(),r=this.whitespaceRegex,o=c.Util.indexOf,a=n?n.split(r):[],i=e.split(r);t=i.shift();)-1===o(a,t)&&a.push(t);return this.getAttrs().class=a.join(" "),this},removeClass:function(e){for(var t,n=this.getClass(),r=this.whitespaceRegex,o=c.Util.indexOf,a=n?n.split(r):[],i=e.split(r);a.length&&(t=i.shift());){var s=o(a,t);-1!==s&&a.splice(s,1)}return this.getAttrs().class=a.join(" "),this},getClass:function(){return this.getAttrs().class||""},hasClass:function(e){return-1!==(" "+this.getClass()+" ").indexOf(" "+e+" ")},setInnerHtml:function(e){return this.innerHtml=e,this},getInnerHtml:function(){return this.innerHtml||""},toString:function(){var e=this.getTagName(),t=this.buildAttrsStr();return["<",e,t=t?" "+t:"",">",this.getInnerHtml(),"</",e,">"].join("")},buildAttrsStr:function(){if(!this.attrs)return"";var e=this.getAttrs(),t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n+'="'+e[n]+'"');return t.join(" ")}}),c.AnchorTagBuilder=c.Util.extend(Object,{constructor:function(e){c.Util.assign(this,e)},build:function(e){return new c.HtmlTag({tagName:"a",attrs:this.createAttrs(e.getType(),e.getAnchorHref())
|