3 (c) 2010-2020 Google LLC. http://angularjs.org
14 var C = e.$$minErr("$sanitize"),
15 E, g, F, G, H, q, D, I, J, B;
16 e.module("ngSanitize", []).provider("$sanitize", function() {
18 return A(a.split(","), d)
24 for (b = 0; b < a.length; b++) c[d ? q(a[b]) : a[b]] = !0;
29 d && d.length && g(a, A(d))
33 for (var d = {}, c = 0, b = a.length; c < b; c++) {
41 return a.replace(/&/g, "&").replace(Q, function(a) {
45 return "&#" + (1024 * (c - 55296) + (a - 56320) + 65536) + ";"
46 }).replace(u, function(a) {
47 return "&#" + a.charCodeAt(0) + ";"
48 }).replace(/</g, "<").replace(/>/g, ">")
53 if (a.nodeType === s.Node.ELEMENT_NODE)
54 for (var d = a.attributes, c = 0, b = d.length; c < b; c++) {
56 f = k.name.toLowerCase();
57 if ("xmlns:ns1" === f || 0 === f.lastIndexOf("ns1:", 0)) a.removeAttributeNode(k), c--, b--
58 }(d = a.firstChild) && z(d);
59 a = v("nextSibling", a)
65 if (c && I.call(d, c)) throw C("elclob",
66 d.outerHTML || d.outerText);
71 this.$get = ["$$sanitizeUri", function(a) {
76 J(d, B(c, function(b, c) {
77 return !/^unsafe:/.test(a(b, c))
82 this.enableSvg = function(a) {
83 return H(a) ? (f = a, this) : f
85 this.addValidElements = function(a) {
88 }), t(l, a.svgElements), t(r, a.htmlVoidElements), t(m, a.htmlVoidElements), t(m, a.htmlElements));
91 this.addValidAttrs = function(a) {
103 null === a || void 0 === a ? a = "" : "string" !== typeof a && (a = "" + a);
108 if (0 === b) throw C("uinput");
112 } while (a !== c.innerHTML);
113 for (b = c.firstChild; b;) {
114 switch (b.nodeType) {
116 d.start(b.nodeName.toLowerCase(), P(b.attributes));
119 d.chars(b.textContent)
122 if (!(k = b.firstChild) && (1 === b.nodeType && d.end(b.nodeName.toLowerCase()), k = v("nextSibling", b), !k))
127 k = v("nextSibling", b);
128 1 === b.nodeType && d.end(b.nodeName.toLowerCase())
132 for (; b = c.firstChild;) c.removeChild(b)
138 start: function(a, f) {
140 !c && w[a] && (c = a);
141 c || !0 !== m[a] || (b("<"), b(a), F(f, function(c, f) {
143 h = "img" === a && "src" === e || "background" === e;
144 !0 !== L[e] || !0 === N[e] && !d(c, h) || (b(" "), b(f), b('="'), b(K(c)), b('"'))
149 c || !0 !== m[a] || !0 === r[a] || (b("</"), b(a), b(">"));
158 I = s.Node.prototype.contains || function(a) {
159 return !!(this.compareDocumentPosition(a) & 16)
161 var Q = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g,
163 r = h("area,br,col,hr,img,wbr"),
164 x = h("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),
167 x = g({}, x, h("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")),
168 p = g({}, p, h("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")),
169 l = h("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"),
170 w = h("script,style"),
171 m = g({}, r, x, p, n),
172 N = h("background,cite,href,longdesc,src,xlink:href,xml:base"),
173 n = h("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"),
174 p = h("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",
179 b = "<remove></remove>" + b;
181 var c = (new a.DOMParser).parseFromString(b, "text/html").body;
182 c.firstChild.remove();
193 if (!d || !d.implementation) throw C("noinert");
194 b = d.implementation.createHTMLDocument("inert");
195 var e = (b.documentElement || b.getDocumentElement()).querySelector("body");
198 d.documentMode && z(e);
203 angularVersion: "1.8.2"
205 e.module("ngSanitize").filter("linky", ["$sanitize", function(h) {
206 var g = /((s?ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,
208 q = e.$$minErr("linky"),
213 return function(f, e, u) {
221 for (g in a) l.push(g + '="' + a[g] + '" ');
222 !s(e) || "target" in a || l.push('target="', e, '" ');
223 l.push('href="', f.replace(/"/g, """), '">');
228 f || "" === f) return f;
229 if (!y(f)) throw q("notstring", f);
230 for (var p = z(u) ? u : v(u) ? function() {
234 }, n = f, l = [], w, m; f = n.match(g);) w = f[0], f[2] || f[4] || (w = (f[3] ? "http://" : "mailto:") + w), m = f.index, r(n.substr(0, m)), x(w, f[0].replace(t, "")), n = n.substring(m + f[0].length);
239 })(window, window.angular);
240 //# sourceMappingURL=angular-sanitize.min.js.map