Félix Marty
add dana
3f268e5
define("linkify-element",["module","exports","./linkify"],function(e,t,n){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function r(e,t,n){var i=n[n.length-1];e.replaceChild(i,t);for(var r=n.length-2;r>=0;r--)e.insertBefore(n[r],i),i=n[r]}function a(e,t,n){for(var i=[],r=e,a=Array.isArray(r),o=0,r=a?r:r[Symbol.iterator]();;){var l;if(a){if(o>=r.length)break;l=r[o++]}else{if(o=r.next(),o.done)break;l=o.value}var f=l;if("nl"===f.type&&t.nl2br)i.push(n.createElement("br"));else if(f.isLink&&t.check(f)){var u=t.resolve(f),s=u.formatted,d=u.formattedHref,c=u.tagName,y=u.className,m=u.target,h=u.events,k=u.attributes,v=n.createElement(c);if(v.setAttribute("href",d),y&&v.setAttribute("class",y),m&&v.setAttribute("target",m),k)for(var p in k)v.setAttribute(p,k[p]);if(h)for(var g in h)v.addEventListener?v.addEventListener(g,h[g]):v.attachEvent&&v.attachEvent("on"+g,h[g]);v.appendChild(n.createTextNode(s)),i.push(v)}else i.push(n.createTextNode(f.toString()))}return i}function o(e,t,n){if(!e||e.nodeType!==m)throw new Error("Cannot linkify "+e+" - Invalid DOM Node type");var i=t.ignoreTags;if("A"===e.tagName||d.contains(i,e.tagName))return e;for(var l=e.firstChild;l;){switch(l.nodeType){case m:o(l,t,n);break;case h:var f=l.nodeValue,u=s(f);if(0===u.length||1===u.length&&u[0]instanceof y)break;var c=a(u,t,n);r(e,l,c),l=c[c.length-1]}l=l.nextSibling}return e}function l(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];try{n=n||document||window&&window.document||global&&global.document}catch(i){}if(!n)throw new Error("Cannot find document implementation. If you are in a non-browser environment like Node.js, pass the document implementation as the third argument to linkifyElement.");return t=new c(t),o(e,t,n)}try{try{Object.defineProperty(t,"__esModule",{value:!0})}catch(f){t.__esModule=!0}}catch(f){t.__esModule=!0}var u=i(n),s=u.tokenize,d=u.options,c=d.Options,y=u.parser.TOKENS.TEXT,m=1,h=3;l.helper=o,l.normalize=function(e){return new c(e)},t["default"]=l,e.exports=t["default"]}),define("linkify-jquery",["module","exports","jquery","./linkify-element"],function(e,t,n,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e){function t(e){return e=l["default"].normalize(e),this.each(function(){l["default"].helper(this,e,n)})}var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.fn=e.fn||{};try{n=n||document||window&&window.document||global&&global.document}catch(i){}if(!n)throw new Error("Cannot find document implementation. If you are in a non-browser environment like Node.js, pass the document implementation as the second argument to linkify/jquery");"function"!=typeof e.fn.linkify&&(e.fn.linkify=t,e(n).ready(function(){e("[data-linkify]").each(function(){var t=e(this),n=t.data(),i=n.linkify,r=n.linkifyNlbr,a={attributes:n.linkifyAttributes,defaultProtocol:n.linkifyDefaultProtocol,events:n.linkifyEvents,format:n.linkifyFormat,formatHref:n.linkifyFormatHref,nl2br:!!r&&0!==r&&"false"!==r,tagName:n.linkifyTagname,target:n.linkifyTarget,className:n.linkifyClassName||n.linkifyLinkclass,validate:n.linkifyValidate,ignoreTags:n.linkifyIgnoreTags},o="this"===i?t:t.find(i);o.linkify(a)})}))}try{try{Object.defineProperty(t,"__esModule",{value:!0})}catch(o){t.__esModule=!0}}catch(o){t.__esModule=!0}t["default"]=a;var l=(r(n),r(i));try{!define&&(window.linkifyElement=l["default"])}catch(o){}e.exports=t["default"]}),require(["jquery","linkify-jquery"],function(e,t){"function"!=typeof e.fn.linkify&&t(e)});