Advertisement
Guest User

puzzle-891b70a9.js

a guest
Dec 6th, 2014
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ! function(e, t) {
  2.     "use strict";
  3.  
  4.     function n() {
  5.         this.$get = ["$$sanitizeUri",
  6.             function(e) {
  7.                 return function(t) {
  8.                     var n = [];
  9.                     return a(t, l(n, function(t, n) {
  10.                         return !/^unsafe/.test(e(t, n))
  11.                     })), n.join("")
  12.                 }
  13.             }
  14.         ]
  15.     }
  16.  
  17.     function r(e) {
  18.         var n = [],
  19.             r = l(n, t.noop);
  20.         return r.chars(e), n.join("")
  21.     }
  22.  
  23.     function i(e) {
  24.         var t, n = {},
  25.             r = e.split(",");
  26.         for (t = 0; t < r.length; t++) n[r[t]] = !0;
  27.         return n
  28.     }
  29.  
  30.     function a(e, n) {
  31.         function r(e, r, a, o) {
  32.             if (r = t.lowercase(r), q[r])
  33.                 for (; x.last() && $[x.last()];) i("", x.last());
  34.             z[r] && x.last() == r && i("", r), o = v[r] || !!o, o || x.push(r);
  35.             var l = {};
  36.             a.replace(p, function(e, t, n, r, i) {
  37.                 var a = n || r || i || "";
  38.                 l[t] = s(a)
  39.             }), n.start && n.start(r, l, o)
  40.         }
  41.  
  42.         function i(e, r) {
  43.             var i, a = 0;
  44.             if (r = t.lowercase(r))
  45.                 for (a = x.length - 1; a >= 0 && x[a] != r; a--);
  46.             if (a >= 0) {
  47.                 for (i = x.length - 1; i >= a; i--) n.end && n.end(x[i]);
  48.                 x.length = a
  49.             }
  50.         }
  51.         "string" != typeof e && (e = null === e || "undefined" == typeof e ? "" : "" + e);
  52.         var a, o, l, k, x = [],
  53.             y = e;
  54.         for (x.last = function() {
  55.             return x[x.length - 1]
  56.         }; e;) {
  57.             if (k = "", o = !0, x.last() && C[x.last()] ? (e = e.replace(new RegExp("(.*)<\\s*\\/\\s*" + x.last() + "[^>]*>", "i"), function(e, t) {
  58.                 return t = t.replace(h, "$1").replace(b, "$1"), n.chars && n.chars(s(t)), ""
  59.             }), i("", x.last())) : (0 === e.indexOf("<!--") ? (a = e.indexOf("--", 4), a >= 0 && e.lastIndexOf("-->", a) === a && (n.comment && n.comment(e.substring(4, a)), e = e.substring(a + 3), o = !1)) : m.test(e) ? (l = e.match(m), l && (e = e.replace(l[0], ""), o = !1)) : d.test(e) ? (l = e.match(g), l && (e = e.substring(l[0].length), l[0].replace(g, i), o = !1)) : f.test(e) && (l = e.match(u), l ? (l[4] && (e = e.substring(l[0].length), l[0].replace(u, r)), o = !1) : (k += "<", e = e.substring(1))), o && (a = e.indexOf("<"), k += 0 > a ? e : e.substring(0, a), e = 0 > a ? "" : e.substring(a), n.chars && n.chars(s(k)))), e == y) throw c("badparse", "The sanitizer was unable to parse the following block of html: {0}", e);
  60.             y = e
  61.         }
  62.         i()
  63.     }
  64.  
  65.     function s(e) {
  66.         if (!e) return "";
  67.         var t = F.exec(e),
  68.             n = t[1],
  69.             r = t[3],
  70.             i = t[2];
  71.         return i && (E.innerHTML = i.replace(/</g, "&lt;"), i = "textContent" in E ? E.textContent : E.innerText), n + i + r
  72.     }
  73.  
  74.     function o(e) {
  75.         return e.replace(/&/g, "&amp;").replace(k, function(e) {
  76.             var t = e.charCodeAt(0),
  77.                 n = e.charCodeAt(1);
  78.             return "&#" + (1024 * (t - 55296) + (n - 56320) + 65536) + ";"
  79.         }).replace(x, function(e) {
  80.             return "&#" + e.charCodeAt(0) + ";"
  81.         }).replace(/</g, "&lt;").replace(/>/g, "&gt;")
  82.     }
  83.  
  84.     function l(e, n) {
  85.         var r = !1,
  86.             i = t.bind(e, e.push);
  87.         return {
  88.             start: function(e, a, s) {
  89.                 e = t.lowercase(e), !r && C[e] && (r = e), r || D[e] !== !0 || (i("<"), i(e), t.forEach(a, function(r, a) {
  90.                     var s = t.lowercase(a),
  91.                         l = "img" === e && "src" === s || "background" === s;
  92.                     j[s] !== !0 || M[s] === !0 && !n(r, l) || (i(" "), i(a), i('="'), i(o(r)), i('"'))
  93.                 }), i(s ? "/>" : ">"))
  94.             },
  95.             end: function(e) {
  96.                 e = t.lowercase(e), r || D[e] !== !0 || (i("</"), i(e), i(">")), e == r && (r = !1)
  97.             },
  98.             chars: function(e) {
  99.                 r || i(o(e))
  100.             }
  101.         }
  102.     }
  103.     var c = t.$$minErr("$sanitize"),
  104.         u = /^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/,
  105.         g = /^<\/\s*([\w:-]+)[^>]*>/,
  106.         p = /([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,
  107.         f = /^</,
  108.         d = /^<\//,
  109.         h = /<!--(.*?)-->/g,
  110.         m = /<!DOCTYPE([^>]*?)>/i,
  111.         b = /<!\[CDATA\[(.*?)]]>/g,
  112.         k = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g,
  113.         x = /([^\#-~| |!])/g,
  114.         v = i("area,br,col,hr,img,wbr"),
  115.         y = i("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),
  116.         w = i("rp,rt"),
  117.         z = t.extend({}, w, y),
  118.         q = t.extend({}, y, i("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,script,section,table,ul")),
  119.         $ = t.extend({}, w, i("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,audio,source")),
  120.         S = i("animate,animateColor,animateMotion,animateTransform,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,set,stop,svg,switch,text,title,tspan,use"),
  121.         C = i("script,style"),
  122.         D = t.extend({}, v, q, $, z, S),
  123.         M = i("background,cite,href,longdesc,src,usemap,xlink:href"),
  124.         A = i("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,target,title,type,valign,value,vspace,width,controls"),
  125.         T = i("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,attributeName,attributeType,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"),
  126.         j = t.extend({}, M, T, A),
  127.         E = document.createElement("pre"),
  128.         F = /^(\s*)([\s\S]*?)(\s*)$/;
  129.     t.module("ngSanitize", []).provider("$sanitize", n), t.module("ngSanitize").filter("linky", ["$sanitize",
  130.         function(e) {
  131.             var n = /((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"]/,
  132.                 i = /^mailto:/;
  133.             return function(a, s) {
  134.                 function o(e) {
  135.                     e && f.push(r(e))
  136.                 }
  137.  
  138.                 function l(e, n) {
  139.                     f.push("<a "), t.isDefined(s) && f.push('target="', s, '" '), f.push('href="', e.replace(/"/g, "&quot;"), '">'), o(n), f.push("</a>")
  140.                 }
  141.                 if (!a) return a;
  142.                 for (var c, u, g, p = a, f = []; c = p.match(n);) u = c[0], c[2] == c[3] && (u = "mailto:" + u), g = c.index, o(p.substr(0, g)), l(u, c[0].replace(i, "")), p = p.substring(g + c[0].length);
  143.                 return o(p), e(f.join(""))
  144.             }
  145.         }
  146.     ])
  147. }(window, window.angular),
  148. function() {
  149.     ! function() {
  150.         var e, t, n;
  151.         return t = "https://ask.cardsagainsthumanity.com", n = "//dopp0jlzdkkkq.cloudfront.net", e = function(e, r) {
  152.             return e.single = {}, e.multi = {}, e.submitSingle = function(i) {
  153.                 return i.preventDefault(), e.invalidSingle = !1, e.loadingSingle = !0, e.formSingle.$valid ? r.get("" + t + "/single", {
  154.                     params: {
  155.                         q: e.single.q
  156.                     }
  157.                 }).success(function(t) {
  158.                     return e.single.img = "" + n + "/single/" + t.a + ".jpg"
  159.                 }).error(function(t) {
  160.                     return e.single.img = null, alert(t)
  161.                 })["finally"](function() {
  162.                     return e.loadingSingle = !1
  163.                 }) : (e.invalidSingle = !0, e.loadingSingle = !1)
  164.             }, e.submitMulti = function(n) {
  165.                 return n.preventDefault(), e.invalidMulti = !1, e.loadingMulti = !0, e.showGuessing = !1, e.formMulti.$valid ? r.get("" + t + "/multi", {
  166.                     params: {
  167.                         q1: e.multi.q1,
  168.                         q2: e.multi.q2,
  169.                         q3: e.multi.q3,
  170.                         q4: e.multi.q4
  171.                     }
  172.                 }).success(function(t) {
  173.                     return e.multi.content = t
  174.                 }).error(function(t) {
  175.                     return e.multi.content = null, alert(t)
  176.                 })["finally"](function() {
  177.                     return e.loadingMulti = !1
  178.                 }) : (e.invalidMulti = !0, e.loadingMulti = !1)
  179.             }
  180.         }, e.$inject = ["$scope", "$http"], angular.module("puzzle", ["ngSanitize"]).controller("PuzzleCtrl", e)
  181.     }()
  182. }.call(this);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement