Built motion from commit 00bf23f6.|2.6.16
[motion2.git] / snippet / 3.1.0 / scripts / vendor-angular-sanitize.js
1 /*! For license information please see vendor-angular-sanitize.js.LICENSE.txt */
2 (self.webpackChunkmotion_chat=self.webpackChunkmotion_chat||[]).push([["vendor-angular-sanitize"],{"./node_modules/angular-sanitize/angular-sanitize.js":()=>{!function(e,t){"use strict";var n,r,i,a,o,s,l,c,u,d,h=t.$$minErr("$sanitize");t.module("ngSanitize",[]).provider("$sanitize",(function(){var f=!1,m=!1;this.$get=["$$sanitizeUri",function(e){return f=!0,m&&r(E,C),function(t){var n=[];return u(t,d(n,(function(t,n){return!/^unsafe:/.test(e(t,n))}))),n.join("")}}],this.enableSvg=function(e){return o(e)?(m=e,this):m},this.addValidElements=function(e){return f||(a(e)&&(e={htmlElements:e}),A(C,e.svgElements),A(b,e.htmlVoidElements),A(E,e.htmlVoidElements),A(E,e.htmlElements)),this},this.addValidAttrs=function(e){return f||r($,F(e,!0)),this},n=t.bind,r=t.extend,i=t.forEach,a=t.isArray,o=t.isDefined,s=t.$$lowercase,l=t.noop,u=function(e,t){null==e?e="":"string"!=typeof e&&(e=""+e);var n=M(e);if(!n)return"";var r=5;do{if(0===r)throw h("uinput","Failed to sanitize html because the input is unstable");r--,e=n.innerHTML,n=M(e)}while(e!==n.innerHTML);for(var i=n.firstChild;i;){switch(i.nodeType){case 1:t.start(i.nodeName.toLowerCase(),N(i.attributes));break;case 3:t.chars(i.textContent)}var a;if(!((a=i.firstChild)||(1===i.nodeType&&t.end(i.nodeName.toLowerCase()),a=H("nextSibling",i))))for(;null==a&&(i=H("parentNode",i))!==n;)a=H("nextSibling",i),1===i.nodeType&&t.end(i.nodeName.toLowerCase());i=a}for(;i=n.firstChild;)n.removeChild(i)},d=function(e,t){var r=!1,a=n(e,e.push);return{start:function(e,n){e=s(e),!r&&z[e]&&(r=e),r||!0!==E[e]||(a("<"),a(e),i(n,(function(n,r){var i=s(r),o="img"===e&&"src"===i||"background"===i;!0!==$[i]||!0===D[i]&&!t(n,o)||(a(" "),a(r),a('="'),a(j(n)),a('"'))})),a(">"))},end:function(e){e=s(e),r||!0!==E[e]||!0===b[e]||(a("</"),a(e),a(">")),e==r&&(r=!1)},chars:function(e){r||a(j(e))}}},c=e.Node.prototype.contains||function(e){return!!(16&this.compareDocumentPosition(e))};var p=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,g=/([^#-~ |!])/g,b=S("area,br,col,hr,img,wbr"),v=S("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),y=S("rp,rt"),k=r({},y,v),x=r({},v,S("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul")),w=r({},y,S("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),C=S("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan"),z=S("script,style"),E=r({},b,x,w,k),D=S("background,cite,href,longdesc,src,xlink:href,xml:base"),L=S("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width"),T=S("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan",!0),$=r({},D,T,L);function S(e,t){return F(e.split(","),t)}function F(e,t){var n,r={};for(n=0;n<e.length;n++)r[t?s(e[n]):e[n]]=!0;return r}function A(e,t){t&&t.length&&r(e,F(t))}var M=function(e,t){if(function(){try{return!!i("")}catch(e){return!1}}())return i;if(!t||!t.implementation)throw h("noinert","Can't create an inert html document");var n=t.implementation.createHTMLDocument("inert"),r=(n.documentElement||n.getDocumentElement()).querySelector("body");return function(e){return r.innerHTML=e,t.documentMode&&q(r),r};function i(t){t="<remove></remove>"+t;try{var n=(new e.DOMParser).parseFromString(t,"text/html").body;return n.firstChild.remove(),n}catch(e){return}}}(e,e.document);function N(e){for(var t={},n=0,r=e.length;n<r;n++){var i=e[n];t[i.name]=i.value}return t}function j(e){return e.replace(/&/g,"&amp;").replace(p,(function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"})).replace(g,(function(e){return"&#"+e.charCodeAt(0)+";"})).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function q(t){for(;t;){if(t.nodeType===e.Node.ELEMENT_NODE)for(var n=t.attributes,r=0,i=n.length;r<i;r++){var a=n[r],o=a.name.toLowerCase();"xmlns:ns1"!==o&&0!==o.lastIndexOf("ns1:",0)||(t.removeAttributeNode(a),r--,i--)}var s=t.firstChild;s&&q(s),t=H("nextSibling",t)}}function H(e,t){var n=t[e];if(n&&c.call(t,n))throw h("elclob","Failed to sanitize html because the element is clobbered: {0}",t.outerHTML||t.outerText);return n}})).info({angularVersion:"1.8.2"}),t.module("ngSanitize").filter("linky",["$sanitize",function(e){var n=/((s?ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,r=/^mailto:/i,i=t.$$minErr("linky"),a=t.isDefined,o=t.isFunction,s=t.isObject,c=t.isString;return function(t,u,h){if(null==t||""===t)return t;if(!c(t))throw i("notstring","Expected string but received: {0}",t);for(var f,m,p,g=o(h)?h:s(h)?function(){return h}:function(){return{}},b=t,v=[];f=b.match(n);)m=f[0],f[2]||f[4]||(m=(f[3]?"http://":"mailto:")+m),p=f.index,y(b.substr(0,p)),k(m,f[0].replace(r,"")),b=b.substring(p+f[0].length);return y(b),e(v.join(""));function y(e){var t,n;e&&v.push((t=e,d(n=[],l).chars(t),n.join("")))}function k(e,t){var n,r=g(e);for(n in v.push("<a "),r)v.push(n+'="'+r[n]+'" ');a(u)&&!("target"in r)&&v.push('target="',u,'" '),v.push('href="',e.replace(/"/g,"&quot;"),'">'),y(t),v.push("</a>")}}}])}(window,window.angular)}}]);
3 //# sourceMappingURL=vendor-angular-sanitize.js.map