/*! http://soapbox.github.io/linkifyjs/ */ !function(){"use strict";function n(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?n:t}function t(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}!function(e){function r(n){n=n||{};for(var t=n.newLine||!1,o=n.ignoreTags||[],e=0;e1?t-1:0),e=1;t>e;e++)o[e-1]=arguments[e];return"function"==typeof n?n.apply(void 0,o):n}function s(n,t){for(var o=0;or&&(u=s.next(n[r]));)s=u,r++;if(r>=i)return[];for(;i-1>r;)u=new _(e),a.push(u),s.on(n[r],u),s=u,r++;return u=new _(o),a.push(u),s.on(n[i-1],u),a}var f=Object.freeze({normalize:r,resolve:i,contains:s}),p=function(){function n(t){o(this,n),this.v=t}return n.prototype.toString=function(){return this.v+""},n}(),g=function(e){function r(){return o(this,r),n(this,e.apply(this,arguments))}return t(r,e),r}(p),m=function(e){function r(){return o(this,r),n(this,e.call(this,"@"))}return t(r,e),r}(p),y=function(e){function r(){return o(this,r),n(this,e.call(this,":"))}return t(r,e),r}(p),d=function(e){function r(){return o(this,r),n(this,e.call(this,"."))}return t(r,e),r}(p),b=function(e){function r(){return o(this,r),n(this,e.apply(this,arguments))}return t(r,e),r}(p),v=function(e){function r(){return o(this,r),n(this,e.apply(this,arguments))}return t(r,e),r}(p),k=function(e){function r(){return o(this,r),n(this,e.call(this,"\n"))}return t(r,e),r}(p),w=function(e){function r(){return o(this,r),n(this,e.apply(this,arguments))}return t(r,e),r}(p),O=function(e){function r(){return o(this,r),n(this,e.call(this,"+"))}return t(r,e),r}(p),L=function(e){function r(){return o(this,r),n(this,e.call(this,"#"))}return t(r,e),r}(p),E=function(e){function r(){return o(this,r),n(this,e.apply(this,arguments))}return t(r,e),r}(p),A=function(e){function r(){return o(this,r),n(this,e.call(this,"?"))}return t(r,e),r}(p),S=function(e){function r(){return o(this,r),n(this,e.call(this,"/"))}return t(r,e),r}(p),N=function(e){function r(){return o(this,r),n(this,e.apply(this,arguments))}return t(r,e),r}(p),C=function(e){function r(){return o(this,r),n(this,e.apply(this,arguments))}return t(r,e),r}(p),T=function(e){function r(){return o(this,r),n(this,e.apply(this,arguments))}return t(r,e),r}(p),j=function(e){function r(){return o(this,r),n(this,e.call(this,"{"))}return t(r,e),r}(p),z=function(e){function r(){return o(this,r),n(this,e.call(this,"["))}return t(r,e),r}(p),P=function(e){function r(){return o(this,r),n(this,e.call(this,"("))}return t(r,e),r}(p),x=function(e){function r(){return o(this,r),n(this,e.call(this,"}"))}return t(r,e),r}(p),R=function(e){function r(){return o(this,r),n(this,e.call(this,"]"))}return t(r,e),r}(p),U=function(e){function r(){return o(this,r),n(this,e.call(this,")"))}return t(r,e),r}(p),B={Base:p,DOMAIN:g,AT:m,COLON:y,DOT:d,PUNCTUATION:b,LOCALHOST:v,NL:k,NUM:w,PLUS:O,POUND:L,QUERY:A,PROTOCOL:E,SLASH:S,SYM:N,TLD:C,WS:T,OPENBRACE:j,OPENBRACKET:z,OPENPAREN:P,CLOSEBRACE:x,CLOSEBRACKET:R,CLOSEPAREN:U},D=function(){function n(t){o(this,n),this.v=t,this.type="token",this.isLink=!1}return n.prototype.toString=function(){for(var n=[],t=0;tr;){for(var i=rn,s=null,a=null,u=0,c=null,l=-1;o>r&&(a=i.next(t[r]));)s=null,i=a,i.accepts()?(l=0,c=i):l>=0&&l++,u++,r++;if(!(0>l)){r-=l,u-=l;var h=c.emit();e.push(new h(n.substr(r-u,u)))}}return e},Ln=rn,En=Object.freeze({State:_,TOKENS:B,run:On,start:Ln}),An=function(n){return new Q(n)},Sn=B.DOMAIN,Nn=B.AT,Cn=B.COLON,Tn=B.DOT,jn=B.PUNCTUATION,zn=B.LOCALHOST,Pn=B.NL,xn=B.NUM,Rn=B.PLUS,Un=B.POUND,Bn=B.PROTOCOL,Dn=B.QUERY,Hn=B.SLASH,qn=B.SYM,Mn=B.TLD,In=B.OPENBRACE,Kn=B.OPENBRACKET,Yn=B.OPENPAREN,_n=B.CLOSEBRACE,Qn=B.CLOSEBRACKET,Wn=B.CLOSEPAREN,Xn=K.EMAIL,Zn=K.NL,Fn=K.TEXT,Gn=K.URL,Jn=An(),Vn=An(),$n=An(),nt=An(),tt=An(),ot=An(),et=An(Gn),rt=An(),it=An(Gn),st=An(Gn),at=An(),ut=An(),ct=An(),lt=An(),ht=An(Gn),ft=An(Gn),pt=An(Gn),gt=An(),mt=An(),yt=An(),dt=An(),bt=An(),vt=An(Xn),kt=An(),wt=An(Xn),Ot=An(),Lt=An(),Et=An(),At=An(Zn);Jn.on(Pn,At).on(Bn,Vn).on(Hn,$n),Vn.on(Hn,$n),$n.on(Hn,nt),Jn.on(Mn,tt).on(Sn,tt).on(zn,et).on(xn,tt),nt.on(Mn,st).on(Sn,st).on(xn,st).on(zn,st),tt.on(Tn,ot),dt.on(Tn,bt),ot.on(Mn,et).on(Sn,tt).on(xn,tt).on(zn,tt),bt.on(Mn,vt).on(Sn,dt).on(xn,dt).on(zn,dt),et.on(Tn,ot),vt.on(Tn,bt),et.on(Cn,rt).on(Hn,st),rt.on(xn,it),it.on(Hn,st),vt.on(Cn,kt),kt.on(xn,wt);var St=[Sn,Nn,zn,xn,Rn,Un,Bn,Hn,Mn],Nt=[Cn,Tn,Dn,jn,_n,Qn,Wn,In,Kn,Yn,qn];st.on(In,ut).on(Kn,ct).on(Yn,lt),at.on(In,ut).on(Kn,ct).on(Yn,lt),ut.on(_n,st),ct.on(Qn,st),lt.on(Wn,st),ht.on(_n,st),ft.on(Qn,st),pt.on(Wn,st),gt.on(_n,st),mt.on(Qn,st),yt.on(Wn,st),ut.on(St,ht),ct.on(St,ft),lt.on(St,pt),ut.on(Nt,gt),ct.on(Nt,mt),lt.on(Nt,yt),ht.on(St,ht),ft.on(St,ft),pt.on(St,pt),ht.on(Nt,ht),ft.on(Nt,ft),pt.on(Nt,pt),gt.on(St,ht),mt.on(St,ft),yt.on(St,pt),gt.on(Nt,gt),mt.on(Nt,mt),yt.on(Nt,yt),st.on(St,st),at.on(St,st),st.on(Nt,at),at.on(Nt,at);var Ct=[Sn,xn,Rn,Un,Dn,qn,Mn];tt.on(Ct,Ot).on(Nn,Lt),et.on(Ct,Ot).on(Nn,Lt),ot.on(Ct,Ot),Ot.on(Ct,Ot).on(Nn,Lt).on(Tn,Et),Et.on(Ct,Ot),Lt.on(Mn,dt).on(Sn,dt).on(zn,vt);var Tt=function(n){for(var t=n.length,o=0,e=[],r=[];t>o;){for(var i=Jn,s=null,a=null,u=0,c=null,l=-1;t>o&&!(s=i.next(n[o]));)r.push(n[o++]);for(;t>o&&(a=s||i.next(n[o]));)s=null,i=a,i.accepts()?(l=0,c=i):l>=0&&l++,o++,u++;if(0>l)for(var h=o-u;o>h;h++)r.push(n[h]);else{r.length>0&&(e.push(new Fn(r)),r=[]),o-=l,u-=l;var f=c.emit();e.push(new f(n.slice(o-u,o)))}}return r.length>0&&e.push(new Fn(r)),e},jt=K,zt=Jn,Pt=Object.freeze({State:Q,TOKENS:jt,run:Tt,start:zt});Array.isArray||(Array.isArray=function(n){return"[object Array]"===Object.prototype.toString.call(n)});var xt=function(n){return Tt(On(n))},Rt=function(n){for(var t=arguments.length<=1||void 0===arguments[1]?null:arguments[1],o=xt(n),e=[],r=0;r=0;r--)e.insertBefore(n[r],i),i=n[r]}function r(e,t,n){for(var i=[],r=0;r