!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function i(e){var t=!!e&&"length"in e&&e.length,i=de.type(e);return"function"!==i&&!de.isWindow(e)&&("array"===i||0===t||"number"==typeof t&&t>0&&t-1 in e)}function r(e,t,i){if(de.isFunction(t))return de.grep(e,function(e,r){return!!t.call(e,r,e)!==i});if(t.nodeType)return de.grep(e,function(e){return e===t!==i});if("string"==typeof t){if(_e.test(t))return de.filter(t,e,i);t=de.filter(t,e)}return de.grep(e,function(e){return de.inArray(e,t)>-1!==i})}function n(e,t){do{e=e[t]}while(e&&1!==e.nodeType);return e}function s(e){var t={};return de.each(e.match(Je)||[],function(e,i){t[i]=!0}),t}function o(){re.addEventListener?(re.removeEventListener("DOMContentLoaded",a),e.removeEventListener("load",a)):(re.detachEvent("onreadystatechange",a),e.detachEvent("onload",a))}function a(){(re.addEventListener||"load"===e.event.type||"complete"===re.readyState)&&(o(),de.ready())}function l(e,t,i){if(void 0===i&&1===e.nodeType){var r="data-"+t.replace(Ie,"-$1").toLowerCase();if("string"==typeof(i=e.getAttribute(r))){try{i="true"===i||"false"!==i&&("null"===i?null:+i+""===i?+i:$e.test(i)?de.parseJSON(i):i)}catch(e){}de.data(e,t,i)}else i=void 0}return i}function c(e){var t;for(t in e)if(("data"!==t||!de.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function u(e,t,i,r){if(Ee(e)){var n,s,o=de.expando,a=e.nodeType,l=a?de.cache:e,c=a?e[o]:e[o]&&o;if(c&&l[c]&&(r||l[c].data)||void 0!==i||"string"!=typeof t)return c||(c=a?e[o]=ie.pop()||de.guid++:o),l[c]||(l[c]=a?{}:{toJSON:de.noop}),"object"!=typeof t&&"function"!=typeof t||(r?l[c]=de.extend(l[c],t):l[c].data=de.extend(l[c].data,t)),s=l[c],r||(s.data||(s.data={}),s=s.data),void 0!==i&&(s[de.camelCase(t)]=i),"string"==typeof t?null==(n=s[t])&&(n=s[de.camelCase(t)]):n=s,n}}function p(e,t,i){if(Ee(e)){var r,n,s=e.nodeType,o=s?de.cache:e,a=s?e[de.expando]:de.expando;if(o[a]){if(t&&(r=i?o[a]:o[a].data)){n=(t=de.isArray(t)?t.concat(de.map(t,de.camelCase)):t in r||(t=de.camelCase(t))in r?[t]:t.split(" ")).length;for(;n--;)delete r[t[n]];if(i?!c(r):!de.isEmptyObject(r))return}(i||(delete o[a].data,c(o[a])))&&(s?de.cleanData([e],!0):pe.deleteExpando||o!=o.window?delete o[a]:o[a]=void 0)}}}function h(e,t,i,r){var n,s=1,o=20,a=r?function(){return r.cur()}:function(){return de.css(e,t,"")},l=a(),c=i&&i[3]||(de.cssNumber[t]?"":"px"),u=(de.cssNumber[t]||"px"!==c&&+l)&&Ne.exec(de.css(e,t));if(u&&u[3]!==c){c=c||u[3],i=i||[],u=+l||1;do{u/=s=s||".5",de.style(e,t,u+c)}while(s!==(s=a()/l)&&1!==s&&--o)}return i&&(u=+u||+l||0,n=i[1]?u+(i[1]+1)*i[2]:+i[2],r&&(r.unit=c,r.start=u,r.end=n)),n}function d(e){var t=Ue.split("|"),i=e.createDocumentFragment();if(i.createElement)for(;t.length;)i.createElement(t.pop());return i}function f(e,t){var i,r,n=0,s=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):void 0;if(!s)for(s=[],i=e.childNodes||e;null!=(r=i[n]);n++)!t||de.nodeName(r,t)?s.push(r):de.merge(s,f(r,t));return void 0===t||t&&de.nodeName(e,t)?de.merge([e],s):s}function m(e,t){for(var i,r=0;null!=(i=e[r]);r++)de._data(i,"globalEval",!t||de._data(t[r],"globalEval"))}function g(e){ze.test(e.type)&&(e.defaultChecked=e.checked)}function y(e,t,i,r,n){for(var s,o,a,l,c,u,p,h=e.length,y=d(t),v=[],w=0;w"!==p[1]||Ye.test(o)?0:l:l.firstChild)&&o.childNodes.length;s--;)de.nodeName(u=o.childNodes[s],"tbody")&&!u.childNodes.length&&o.removeChild(u);for(de.merge(v,l.childNodes),l.textContent="";l.firstChild;)l.removeChild(l.firstChild);l=y.lastChild}else v.push(t.createTextNode(o));for(l&&y.removeChild(l),pe.appendChecked||de.grep(f(v,"input"),g),w=0;o=v[w++];)if(r&&de.inArray(o,r)>-1)n&&n.push(o);else if(a=de.contains(o.ownerDocument,o),l=f(y.appendChild(o),"script"),a&&m(l),i)for(s=0;o=l[s++];)Be.test(o.type||"")&&i.push(o);return l=null,y}function v(){return!0}function w(){return!1}function b(){try{return re.activeElement}catch(e){}}function S(e,t,i,r,n,s){var o,a;if("object"==typeof t){for(a in"string"!=typeof i&&(r=r||i,i=void 0),t)S(e,a,i,r,t[a],s);return e}if(null==r&&null==n?(n=i,r=i=void 0):null==n&&("string"==typeof i?(n=r,r=void 0):(n=r,r=i,i=void 0)),!1===n)n=w;else if(!n)return e;return 1===s&&(o=n,n=function(e){return de().off(e),o.apply(this,arguments)},n.guid=o.guid||(o.guid=de.guid++)),e.each(function(){de.event.add(this,t,n,r,i)})}function k(e,t){return de.nodeName(e,"table")&&de.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function _(e){return e.type=(null!==de.find.attr(e,"type"))+"/"+e.type,e}function x(e){var t=at.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function T(e,t){if(1===t.nodeType&&de.hasData(e)){var i,r,n,s=de._data(e),o=de._data(t,s),a=s.events;if(a)for(i in delete o.handle,o.events={},a)for(r=0,n=a[i].length;r1&&"string"==typeof d&&!pe.checkClone&&ot.test(d))return e.each(function(n){var s=e.eq(n);m&&(t[0]=d.call(this,n,s.html())),A(s,t,i,r)});if(p&&(n=(c=y(t,e[0].ownerDocument,!1,e,r)).firstChild,1===c.childNodes.length&&(c=n),n||r)){for(o=(a=de.map(f(c,"script"),_)).length;u")).appendTo(t.documentElement))[0].contentWindow||ut[0].contentDocument).document).write(),t.close(),i=P(e,t),ut.detach()),pt[e]=i),i}function O(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}function E(e){if(e in jt)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),i=Tt.length;i--;)if((e=Tt[i]+t)in jt)return e}function $(e,t){for(var i,r,n,s=[],o=0,a=e.length;o=0&&i=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==de.type(e)||e.nodeType||de.isWindow(e))return!1;try{if(e.constructor&&!ue.call(e,"constructor")&&!ue.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}if(!pe.ownFirst)for(t in e)return ue.call(e,t);for(t in e);return void 0===t||ue.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?le[ce.call(e)]||"object":typeof e},globalEval:function(t){t&&de.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(me,"ms-").replace(ge,ye)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var r,n=0;if(i(e))for(r=e.length;nk.cacheLength&&delete e[t.shift()],e[i+" "]=r}var t=[];return e}function r(e){return e[N]=!0,e}function n(e){var t=E.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function s(e,t){for(var i=e.split("|"),r=i.length;r--;)k.attrHandle[i[r]]=t}function o(e,t){var i=t&&e,r=i&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||U)-(~e.sourceIndex||U);if(r)return r;if(i)for(;i=i.nextSibling;)if(i===t)return-1;return e?1:-1}function a(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function l(e){return function(t){var i=t.nodeName.toLowerCase();return("input"===i||"button"===i)&&t.type===e}}function c(e){return r(function(t){return t=+t,r(function(i,r){for(var n,s=e([],i.length,t),o=s.length;o--;)i[n=s[o]]&&(i[n]=!(r[n]=i[n]))})})}function u(e){return e&&void 0!==e.getElementsByTagName&&e}function p(){}function h(e){for(var t=0,i=e.length,r="";t1?function(t,i,r){for(var n=e.length;n--;)if(!e[n](t,i,r))return!1;return!0}:e[0]}function m(e,i,r){for(var n=0,s=i.length;n-1&&(r[c]=!(o[c]=p))}}else w=g(w===o?w.splice(f,w.length):w),s?s(null,o,w,l):K.apply(o,w)})}function v(e){for(var t,i,r,n=e.length,s=k.relative[e[0].type],o=s||k.relative[" "],a=s?1:0,l=d(function(e){return e===t},o,!0),c=d(function(e){return ee(t,e)>-1},o,!0),u=[function(e,i,r){var n=!s&&(r||i!==C)||((t=i).nodeType?l(e,i,r):c(e,i,r));return t=null,n}];a1&&f(u),a>1&&h(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(ae,"$1"),i,a0,s=e.length>0,o=function(r,o,a,l,c){var u,p,h,d=0,f="0",m=r&&[],y=[],v=C,w=r||s&&k.find.TAG("*",c),b=R+=null==v?1:Math.random()||.1,S=w.length;for(c&&(C=o===E||o||c);f!==S&&null!=(u=w[f]);f++){if(s&&u){for(p=0,o||u.ownerDocument===E||(O(u),a=!I);h=e[p++];)if(h(u,o||E,a)){l.push(u);break}c&&(R=b)}n&&((u=!h&&u)&&d--,r&&m.push(u))}if(d+=f,n&&f!==d){for(p=0;h=i[p++];)h(m,y,o,a);if(r){if(d>0)for(;f--;)m[f]||y[f]||(y[f]=Y.call(l));y=g(y)}K.apply(l,y),c&&!r&&y.length>0&&d+i.length>1&&t.uniqueSort(l)}return c&&(R=b,C=v),m};return n?r(o):o}var b,S,k,_,x,T,j,A,C,P,J,O,E,$,I,L,F,M,D,N="sizzle"+1*new Date,H=e.document,R=0,q=0,z=i(),V=i(),B=i(),W=function(e,t){return e===t&&(J=!0),0},U=1<<31,Q={}.hasOwnProperty,G=[],Y=G.pop,X=G.push,K=G.push,Z=G.slice,ee=function(e,t){for(var i=0,r=e.length;i+~]|"+ie+")"+ie+"*"),ue=new RegExp("="+ie+"*([^\\]'\"]*?)"+ie+"*\\]","g"),pe=new RegExp(se),he=new RegExp("^"+re+"$"),de={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+ne),PSEUDO:new RegExp("^"+se),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ie+"*(even|odd|(([+-]|)(\\d*)n|)"+ie+"*(?:([+-]|)"+ie+"*(\\d+)|))"+ie+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ie+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ie+"*((?:-\\d)?\\d*)"+ie+"*\\)|)(?=[^-]|$)","i")},fe=/^(?:input|select|textarea|button)$/i,me=/^h\d$/i,ge=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,we=/'|\\/g,be=new RegExp("\\\\([\\da-f]{1,6}"+ie+"?|("+ie+")|.)","ig"),Se=function(e,t,i){var r="0x"+t-65536;return r!=r||i?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},ke=function(){O()};try{K.apply(G=Z.call(H.childNodes),H.childNodes),G[H.childNodes.length].nodeType}catch(e){K={apply:G.length?function(e,t){X.apply(e,Z.call(t))}:function(e,t){for(var i=e.length,r=0;e[i++]=t[r++];);e.length=i-1}}}for(b in S=t.support={},x=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},O=t.setDocument=function(e){var t,i,r=e?e.ownerDocument||e:H;return r!==E&&9===r.nodeType&&r.documentElement?($=(E=r).documentElement,I=!x(E),(i=E.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",ke,!1):i.attachEvent&&i.attachEvent("onunload",ke)),S.attributes=n(function(e){return e.className="i",!e.getAttribute("className")}),S.getElementsByTagName=n(function(e){return e.appendChild(E.createComment("")),!e.getElementsByTagName("*").length}),S.getElementsByClassName=ge.test(E.getElementsByClassName),S.getById=n(function(e){return $.appendChild(e).id=N,!E.getElementsByName||!E.getElementsByName(N).length}),S.getById?(k.find.ID=function(e,t){if(void 0!==t.getElementById&&I){var i=t.getElementById(e);return i?[i]:[]}},k.filter.ID=function(e){var t=e.replace(be,Se);return function(e){return e.getAttribute("id")===t}}):(delete k.find.ID,k.filter.ID=function(e){var t=e.replace(be,Se);return function(e){var i=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return i&&i.value===t}}),k.find.TAG=S.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):S.qsa?t.querySelectorAll(e):void 0}:function(e,t){var i,r=[],n=0,s=t.getElementsByTagName(e);if("*"===e){for(;i=s[n++];)1===i.nodeType&&r.push(i);return r}return s},k.find.CLASS=S.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&I)return t.getElementsByClassName(e)},F=[],L=[],(S.qsa=ge.test(E.querySelectorAll))&&(n(function(e){$.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&L.push("[*^$]="+ie+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||L.push("\\["+ie+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+N+"-]").length||L.push("~="),e.querySelectorAll(":checked").length||L.push(":checked"),e.querySelectorAll("a#"+N+"+*").length||L.push(".#.+[+~]")}),n(function(e){var t=E.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&L.push("name"+ie+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||L.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),L.push(",.*:")})),(S.matchesSelector=ge.test(M=$.matches||$.webkitMatchesSelector||$.mozMatchesSelector||$.oMatchesSelector||$.msMatchesSelector))&&n(function(e){S.disconnectedMatch=M.call(e,"div"),M.call(e,"[s!='']:x"),F.push("!=",se)}),L=L.length&&new RegExp(L.join("|")),F=F.length&&new RegExp(F.join("|")),t=ge.test($.compareDocumentPosition),D=t||ge.test($.contains)?function(e,t){var i=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(i.contains?i.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},W=t?function(e,t){if(e===t)return J=!0,0;var i=!e.compareDocumentPosition-!t.compareDocumentPosition;return i||(1&(i=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!S.sortDetached&&t.compareDocumentPosition(e)===i?e===E||e.ownerDocument===H&&D(H,e)?-1:t===E||t.ownerDocument===H&&D(H,t)?1:P?ee(P,e)-ee(P,t):0:4&i?-1:1)}:function(e,t){if(e===t)return J=!0,0;var i,r=0,n=e.parentNode,s=t.parentNode,a=[e],l=[t];if(!n||!s)return e===E?-1:t===E?1:n?-1:s?1:P?ee(P,e)-ee(P,t):0;if(n===s)return o(e,t);for(i=e;i=i.parentNode;)a.unshift(i);for(i=t;i=i.parentNode;)l.unshift(i);for(;a[r]===l[r];)r++;return r?o(a[r],l[r]):a[r]===H?-1:l[r]===H?1:0},E):E},t.matches=function(e,i){return t(e,null,null,i)},t.matchesSelector=function(e,i){if((e.ownerDocument||e)!==E&&O(e),i=i.replace(ue,"='$1']"),S.matchesSelector&&I&&!B[i+" "]&&(!F||!F.test(i))&&(!L||!L.test(i)))try{var r=M.call(e,i);if(r||S.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return t(i,E,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==E&&O(e),D(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==E&&O(e);var i=k.attrHandle[t.toLowerCase()],r=i&&Q.call(k.attrHandle,t.toLowerCase())?i(e,t,!I):void 0;return void 0!==r?r:S.attributes||!I?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,i=[],r=0,n=0;if(J=!S.detectDuplicates,P=!S.sortStable&&e.slice(0),e.sort(W),J){for(;t=e[n++];)t===e[n]&&(r=i.push(n));for(;r--;)e.splice(i[r],1)}return P=null,e},_=t.getText=function(e){var t,i="",r=0,n=e.nodeType;if(n){if(1===n||9===n||11===n){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)i+=_(e)}else if(3===n||4===n)return e.nodeValue}else for(;t=e[r++];)i+=_(t);return i},k=t.selectors={cacheLength:50,createPseudo:r,match:de,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(be,Se),e[3]=(e[3]||e[4]||e[5]||"").replace(be,Se),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,i=!e[6]&&e[2];return de.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":i&&pe.test(i)&&(t=T(i,!0))&&(t=i.indexOf(")",i.length-t)-i.length)&&(e[0]=e[0].slice(0,t),e[2]=i.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(be,Se).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=z[e+" "];return t||(t=new RegExp("(^|"+ie+")"+e+"("+ie+"|$)"))&&z(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,i,r){return function(n){var s=t.attr(n,e);return null==s?"!="===i:!i||(s+="","="===i?s===r:"!="===i?s!==r:"^="===i?r&&0===s.indexOf(r):"*="===i?r&&s.indexOf(r)>-1:"$="===i?r&&s.slice(-r.length)===r:"~="===i?(" "+s.replace(oe," ")+" ").indexOf(r)>-1:"|="===i&&(s===r||s.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,i,r,n){var s="nth"!==e.slice(0,3),o="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===n?function(e){return!!e.parentNode}:function(t,i,l){var c,u,p,h,d,f,m=s!==o?"nextSibling":"previousSibling",g=t.parentNode,y=a&&t.nodeName.toLowerCase(),v=!l&&!a,w=!1;if(g){if(s){for(;m;){for(h=t;h=h[m];)if(a?h.nodeName.toLowerCase()===y:1===h.nodeType)return!1;f=m="only"===e&&!f&&"nextSibling"}return!0}if(f=[o?g.firstChild:g.lastChild],o&&v){for(w=(d=(c=(u=(p=(h=g)[N]||(h[N]={}))[h.uniqueID]||(p[h.uniqueID]={}))[e]||[])[0]===R&&c[1])&&c[2],h=d&&g.childNodes[d];h=++d&&h&&h[m]||(w=d=0)||f.pop();)if(1===h.nodeType&&++w&&h===t){u[e]=[R,d,w];break}}else if(v&&(w=d=(c=(u=(p=(h=t)[N]||(h[N]={}))[h.uniqueID]||(p[h.uniqueID]={}))[e]||[])[0]===R&&c[1]),!1===w)for(;(h=++d&&h&&h[m]||(w=d=0)||f.pop())&&((a?h.nodeName.toLowerCase()!==y:1!==h.nodeType)||!++w||(v&&((u=(p=h[N]||(h[N]={}))[h.uniqueID]||(p[h.uniqueID]={}))[e]=[R,w]),h!==t)););return(w-=n)===r||w%r===0&&w/r>=0}}},PSEUDO:function(e,i){var n,s=k.pseudos[e]||k.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return s[N]?s(i):s.length>1?(n=[e,e,"",i],k.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,n=s(e,i),o=n.length;o--;)e[r=ee(e,n[o])]=!(t[r]=n[o])}):function(e){return s(e,0,n)}):s}},pseudos:{not:r(function(e){var t=[],i=[],n=j(e.replace(ae,"$1"));return n[N]?r(function(e,t,i,r){ for(var s,o=n(e,null,r,[]),a=e.length;a--;)(s=o[a])&&(e[a]=!(t[a]=s))}):function(e,r,s){return t[0]=e,n(t,null,s,i),t[0]=null,!i.pop()}}),has:r(function(e){return function(i){return t(e,i).length>0}}),contains:r(function(e){return e=e.replace(be,Se),function(t){return(t.textContent||t.innerText||_(t)).indexOf(e)>-1}}),lang:r(function(e){return he.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(be,Se).toLowerCase(),function(t){var i;do{if(i=I?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(i=i.toLowerCase())===e||0===i.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var i=e.location&&e.location.hash;return i&&i.slice(1)===t.id},root:function(e){return e===$},focus:function(e){return e===E.activeElement&&(!E.hasFocus||E.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!k.pseudos.empty(e)},header:function(e){return me.test(e.nodeName)},input:function(e){return fe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,i){return[i<0?i+t:i]}),even:c(function(e,t){for(var i=0;i=0;)e.push(r);return e}),gt:c(function(e,t,i){for(var r=i<0?i+t:i;++r2&&"ID"===(o=s[0]).type&&S.getById&&9===t.nodeType&&I&&k.relative[s[1].type]){if(!(t=(k.find.ID(o.matches[0].replace(be,Se),t)||[])[0]))return i;c&&(t=t.parentNode),e=e.slice(s.shift().value.length)}for(n=de.needsContext.test(e)?0:s.length;n--&&(o=s[n],!k.relative[a=o.type]);)if((l=k.find[a])&&(r=l(o.matches[0].replace(be,Se),ve.test(s[0].type)&&u(t.parentNode)||t))){if(s.splice(n,1),!(e=r.length&&h(s)))return K.apply(i,r),i;break}}return(c||j(e,p))(r,t,!I,i,!t||ve.test(e)&&u(t.parentNode)||t),i},S.sortStable=N.split("").sort(W).join("")===N,S.detectDuplicates=!!J,O(),S.sortDetached=n(function(e){return 1&e.compareDocumentPosition(E.createElement("div"))}),n(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||s("type|href|height|width",function(e,t,i){if(!i)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),S.attributes&&n(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||s("value",function(e,t,i){if(!i&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),n(function(e){return null==e.getAttribute("disabled")})||s(te,function(e,t,i){var r;if(!i)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);de.find=ve,de.expr=ve.selectors,de.expr[":"]=de.expr.pseudos,de.uniqueSort=de.unique=ve.uniqueSort,de.text=ve.getText,de.isXMLDoc=ve.isXML,de.contains=ve.contains;var we=function(e,t,i){for(var r=[],n=void 0!==i;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(n&&de(e).is(i))break;r.push(e)}return r},be=function(e,t){for(var i=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&i.push(e);return i},Se=de.expr.match.needsContext,ke=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,_e=/^.[^:#\[\.,]*$/;de.filter=function(e,t,i){var r=t[0];return i&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?de.find.matchesSelector(r,e)?[r]:[]:de.find.matches(e,de.grep(t,function(e){return 1===e.nodeType}))},de.fn.extend({find:function(e){var t,i=[],r=this,n=r.length;if("string"!=typeof e)return this.pushStack(de(e).filter(function(){for(t=0;t1?de.unique(i):i)).selector=this.selector?this.selector+" "+e:e,i},filter:function(e){return this.pushStack(r(this,e||[],!1))},not:function(e){return this.pushStack(r(this,e||[],!0))},is:function(e){return!!r(this,"string"==typeof e&&Se.test(e)?de(e):e||[],!1).length}});var xe,Te=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(de.fn.init=function(e,t,i){var r,n;if(!e)return this;if(i=i||xe,"string"==typeof e){if(!(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:Te.exec(e))||!r[1]&&t)return!t||t.jquery?(t||i).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof de?t[0]:t,de.merge(this,de.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:re,!0)),ke.test(r[1])&&de.isPlainObject(t))for(r in t)de.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}if((n=re.getElementById(r[2]))&&n.parentNode){if(n.id!==r[2])return xe.find(e);this.length=1,this[0]=n}return this.context=re,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):de.isFunction(e)?void 0!==i.ready?i.ready(e):e(de):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),de.makeArray(e,this))}).prototype=de.fn,xe=de(re);var je=/^(?:parents|prev(?:Until|All))/,Ae={children:!0,contents:!0,next:!0,prev:!0};de.fn.extend({has:function(e){var t,i=de(e,this),r=i.length;return this.filter(function(){for(t=0;t-1:1===i.nodeType&&de.find.matchesSelector(i,e))){s.push(i);break}return this.pushStack(s.length>1?de.uniqueSort(s):s)},index:function(e){return e?"string"==typeof e?de.inArray(this[0],de(e)):de.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(de.uniqueSort(de.merge(this.get(),de(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),de.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return we(e,"parentNode")},parentsUntil:function(e,t,i){return we(e,"parentNode",i)},next:function(e){return n(e,"nextSibling")},prev:function(e){return n(e,"previousSibling")},nextAll:function(e){return we(e,"nextSibling")},prevAll:function(e){return we(e,"previousSibling")},nextUntil:function(e,t,i){return we(e,"nextSibling",i)},prevUntil:function(e,t,i){return we(e,"previousSibling",i)},siblings:function(e){return be((e.parentNode||{}).firstChild,e)},children:function(e){return be(e.firstChild)},contents:function(e){return de.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:de.merge([],e.childNodes)}},function(e,t){de.fn[e]=function(i,r){var n=de.map(this,t,i);return"Until"!==e.slice(-5)&&(r=i),r&&"string"==typeof r&&(n=de.filter(r,n)),this.length>1&&(Ae[e]||(n=de.uniqueSort(n)),je.test(e)&&(n=n.reverse())),this.pushStack(n)}});var Ce,Pe,Je=/\S+/g;for(Pe in de.Callbacks=function(e){e="string"==typeof e?s(e):de.extend({},e);var t,i,r,n,o=[],a=[],l=-1,c=function(){for(n=e.once,r=t=!0;a.length;l=-1)for(i=a.shift();++l-1;)o.splice(i,1),i<=l&&l--}),this},has:function(e){return e?de.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return n=a=[],o=i="",this},disabled:function(){return!o},lock:function(){return n=!0,i||u.disable(),this},locked:function(){return!!n},fireWith:function(e,i){return n||(i=[e,(i=i||[]).slice?i.slice():i],a.push(i),t||c()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!r}};return u},de.extend({Deferred:function(e){var t=[["resolve","done",de.Callbacks("once memory"),"resolved"],["reject","fail",de.Callbacks("once memory"),"rejected"],["notify","progress",de.Callbacks("memory")]],i="pending",r={state:function(){return i},always:function(){return n.done(arguments).fail(arguments),this},then:function(){var e=arguments;return de.Deferred(function(i){de.each(t,function(t,s){var o=de.isFunction(e[t])&&e[t];n[s[1]](function(){var e=o&&o.apply(this,arguments);e&&de.isFunction(e.promise)?e.promise().progress(i.notify).done(i.resolve).fail(i.reject):i[s[0]+"With"](this===r?i.promise():this,o?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?de.extend(e,r):r}},n={};return r.pipe=r.then,de.each(t,function(e,s){var o=s[2],a=s[3];r[s[1]]=o.add,a&&o.add(function(){i=a},t[1^e][2].disable,t[2][2].lock),n[s[0]]=function(){return n[s[0]+"With"](this===n?r:this,arguments),this},n[s[0]+"With"]=o.fireWith}),r.promise(n),e&&e.call(n,n),n},when:function(e){var t,i,r,n=0,s=ne.call(arguments),o=s.length,a=1!==o||e&&de.isFunction(e.promise)?o:0,l=1===a?e:de.Deferred(),c=function(e,i,r){return function(n){i[e]=this,r[e]=arguments.length>1?ne.call(arguments):n,r===t?l.notifyWith(i,r):--a||l.resolveWith(i,r)}};if(o>1)for(t=new Array(o),i=new Array(o),r=new Array(o);n0||(Ce.resolveWith(re,[de]),de.fn.triggerHandler&&(de(re).triggerHandler("ready"),de(re).off("ready"))))}}),de.ready.promise=function(t){if(!Ce)if(Ce=de.Deferred(),"complete"===re.readyState||"loading"!==re.readyState&&!re.documentElement.doScroll)e.setTimeout(de.ready);else if(re.addEventListener)re.addEventListener("DOMContentLoaded",a),e.addEventListener("load",a);else{re.attachEvent("onreadystatechange",a),e.attachEvent("onload",a);var i=!1;try{i=null==e.frameElement&&re.documentElement}catch(e){}i&&i.doScroll&&function t(){if(!de.isReady){try{i.doScroll("left")}catch(i){return e.setTimeout(t,50)}o(),de.ready()}}()}return Ce.promise(t)},de.ready.promise(),de(pe))break;pe.ownFirst="0"===Pe,pe.inlineBlockNeedsLayout=!1,de(function(){var e,t,i,r;(i=re.getElementsByTagName("body")[0])&&i.style&&(t=re.createElement("div"),(r=re.createElement("div")).style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",i.appendChild(r).appendChild(t),void 0!==t.style.zoom&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",pe.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(i.style.zoom=1)),i.removeChild(r))}),function(){var e=re.createElement("div");pe.deleteExpando=!0;try{delete e.test}catch(e){pe.deleteExpando=!1}e=null}();var Oe,Ee=function(e){var t=de.noData[(e.nodeName+" ").toLowerCase()],i=+e.nodeType||1;return(1===i||9===i)&&(!t||!0!==t&&e.getAttribute("classid")===t)},$e=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Ie=/([A-Z])/g;de.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return!!(e=e.nodeType?de.cache[e[de.expando]]:e[de.expando])&&!c(e)},data:function(e,t,i){return u(e,t,i)},removeData:function(e,t){return p(e,t)},_data:function(e,t,i){return u(e,t,i,!0)},_removeData:function(e,t){return p(e,t,!0)}}),de.fn.extend({data:function(e,t){var i,r,n,s=this[0],o=s&&s.attributes;if(void 0===e){if(this.length&&(n=de.data(s),1===s.nodeType&&!de._data(s,"parsedAttrs"))){for(i=o.length;i--;)o[i]&&0===(r=o[i].name).indexOf("data-")&&l(s,r=de.camelCase(r.slice(5)),n[r]);de._data(s,"parsedAttrs",!0)}return n}return"object"==typeof e?this.each(function(){de.data(this,e)}):arguments.length>1?this.each(function(){de.data(this,e,t)}):s?l(s,e,de.data(s,e)):void 0},removeData:function(e){return this.each(function(){de.removeData(this,e)})}}),de.extend({queue:function(e,t,i){var r;if(e)return t=(t||"fx")+"queue",r=de._data(e,t),i&&(!r||de.isArray(i)?r=de._data(e,t,de.makeArray(i)):r.push(i)),r||[]},dequeue:function(e,t){t=t||"fx";var i=de.queue(e,t),r=i.length,n=i.shift(),s=de._queueHooks(e,t),o=function(){de.dequeue(e,t)};"inprogress"===n&&(n=i.shift(),r--),n&&("fx"===t&&i.unshift("inprogress"),delete s.stop,n.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var i=t+"queueHooks";return de._data(e,i)||de._data(e,i,{empty:de.Callbacks("once memory").add(function(){de._removeData(e,t+"queue"),de._removeData(e,i)})})}}),de.fn.extend({queue:function(e,t){var i=2;return"string"!=typeof e&&(t=e,e="fx",i--),arguments.length
a",pe.leadingWhitespace=3===Le.firstChild.nodeType,pe.tbody=!Le.getElementsByTagName("tbody").length,pe.htmlSerialize=!!Le.getElementsByTagName("link").length,pe.html5Clone="<:nav>"!==re.createElement("nav").cloneNode(!0).outerHTML,Me.type="checkbox",Me.checked=!0,Fe.appendChild(Me),pe.appendChecked=Me.checked,Le.innerHTML="",pe.noCloneChecked=!!Le.cloneNode(!0).lastChild.defaultValue,Fe.appendChild(Le),(Me=re.createElement("input")).setAttribute("type","radio"),Me.setAttribute("checked","checked"),Me.setAttribute("name","t"),Le.appendChild(Me),pe.checkClone=Le.cloneNode(!0).cloneNode(!0).lastChild.checked,pe.noCloneEvent=!!Le.addEventListener,Le[de.expando]=1,pe.attributes=!Le.getAttribute(de.expando);var Qe={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:pe.htmlSerialize?[0,"",""]:[1,"X
","
"]};Qe.optgroup=Qe.option,Qe.tbody=Qe.tfoot=Qe.colgroup=Qe.caption=Qe.thead,Qe.th=Qe.td;var Ge=/<|&#?\w+;/,Ye=/-1&&(f=d.split("."),d=f.shift(),f.sort()),o=d.indexOf(":")<0&&"on"+d,(t=t[de.expando]?t:new de.Event(d,"object"==typeof t&&t)).isTrigger=n?2:3,t.namespace=f.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),i=null==i?[t]:de.makeArray(i,[t]),c=de.event.special[d]||{},n||!c.trigger||!1!==c.trigger.apply(r,i))){if(!n&&!c.noBubble&&!de.isWindow(r)){for(l=c.delegateType||d,et.test(l+d)||(a=a.parentNode);a;a=a.parentNode)h.push(a),u=a;u===(r.ownerDocument||re)&&h.push(u.defaultView||u.parentWindow||e)}for(p=0;(a=h[p++])&&!t.isPropagationStopped();)t.type=p>1?l:c.bindType||d,(s=(de._data(a,"events")||{})[t.type]&&de._data(a,"handle"))&&s.apply(a,i),(s=o&&a[o])&&s.apply&&Ee(a)&&(t.result=s.apply(a,i),!1===t.result&&t.preventDefault());if(t.type=d,!n&&!t.isDefaultPrevented()&&(!c._default||!1===c._default.apply(h.pop(),i))&&Ee(r)&&o&&r[d]&&!de.isWindow(r)){(u=r[o])&&(r[o]=null),de.event.triggered=d;try{r[d]()}catch(e){}de.event.triggered=void 0,u&&(r[o]=u)}return t.result}},dispatch:function(e){e=de.event.fix(e);var t,i,r,n,s,o=[],a=ne.call(arguments),l=(de._data(this,"events")||{})[e.type]||[],c=de.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,e)){for(o=de.event.handlers.call(this,e,l),t=0;(n=o[t++])&&!e.isPropagationStopped();)for(e.currentTarget=n.elem,i=0;(s=n.handlers[i++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(s.namespace)||(e.handleObj=s,e.data=s.data,void 0!==(r=((de.event.special[s.origType]||{}).handle||s.handler).apply(n.elem,a))&&!1===(e.result=r)&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,t){var i,r,n,s,o=[],a=t.delegateCount,l=e.target;if(a&&l.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(!0!==l.disabled||"click"!==e.type)){for(r=[],i=0;i-1:de.find(n,this,null,[l]).length),r[n]&&r.push(s);r.length&&o.push({elem:l,handlers:r})}return a]","i"),nt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,st=/\s*$/g,ct=d(re).appendChild(re.createElement("div"));de.extend({htmlPrefilter:function(e){return e.replace(nt,"<$1>")},clone:function(e,t,i){var r,n,s,o,a,l=de.contains(e.ownerDocument,e);if(pe.html5Clone||de.isXMLDoc(e)||!rt.test("<"+e.nodeName+">")?s=e.cloneNode(!0):(ct.innerHTML=e.outerHTML,ct.removeChild(s=ct.firstChild)),!(pe.noCloneEvent&&pe.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||de.isXMLDoc(e)))for(r=f(s),a=f(e),o=0;null!=(n=a[o]);++o)r[o]&&j(n,r[o]);if(t)if(i)for(a=a||f(e),r=r||f(s),o=0;null!=(n=a[o]);o++)T(n,r[o]);else T(e,s);return(r=f(s,"script")).length>0&&m(r,!l&&f(e,"script")),r=a=n=null,s},cleanData:function(e,t){for(var i,r,n,s,o=0,a=de.expando,l=de.cache,c=pe.attributes,u=de.event.special;null!=(i=e[o]);o++)if((t||Ee(i))&&(s=(n=i[a])&&l[n])){if(s.events)for(r in s.events)u[r]?de.event.remove(i,r):de.removeEvent(i,r,s.handle);l[n]&&(delete l[n],c||void 0===i.removeAttribute?i[a]=void 0:i.removeAttribute(a),ie.push(n))}}}),de.fn.extend({domManip:A,detach:function(e){return C(this,e,!0)},remove:function(e){return C(this,e)},text:function(e){return qe(this,function(e){return void 0===e?de.text(this):this.empty().append((this[0]&&this[0].ownerDocument||re).createTextNode(e))},null,e,arguments.length)},append:function(){return A(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||k(this,e).appendChild(e)})},prepend:function(){return A(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=k(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return A(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return A(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&de.cleanData(f(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&de.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return de.clone(this,e,t)})},html:function(e){return qe(this,function(e){var t=this[0]||{},i=0,r=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(it,""):void 0;if("string"==typeof e&&!st.test(e)&&(pe.htmlSerialize||!rt.test(e))&&(pe.leadingWhitespace||!We.test(e))&&!Qe[(Ve.exec(e)||["",""])[1].toLowerCase()]){e=de.htmlPrefilter(e);try{for(;it",c.childNodes[0].style.borderCollapse="separate",(t=c.getElementsByTagName("td"))[0].style.cssText="margin:0;border:0;padding:0;display:none",(s=0===t[0].offsetHeight)&&(t[0].style.display="",t[1].style.display="none",s=0===t[0].offsetHeight)),p.removeChild(l)} var i,r,n,s,o,a,l=re.createElement("div"),c=re.createElement("div");c.style&&(c.style.cssText="float:left;opacity:.5",pe.opacity="0.5"===c.style.opacity,pe.cssFloat=!!c.style.cssFloat,c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",pe.clearCloneStyle="content-box"===c.style.backgroundClip,(l=re.createElement("div")).style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",c.innerHTML="",l.appendChild(c),pe.boxSizing=""===c.style.boxSizing||""===c.style.MozBoxSizing||""===c.style.WebkitBoxSizing,de.extend(pe,{reliableHiddenOffsets:function(){return null==i&&t(),s},boxSizingReliable:function(){return null==i&&t(),n},pixelMarginRight:function(){return null==i&&t(),r},pixelPosition:function(){return null==i&&t(),i},reliableMarginRight:function(){return null==i&&t(),o},reliableMarginLeft:function(){return null==i&&t(),a}}))}();var gt,yt,vt=/^(top|right|bottom|left)$/;e.getComputedStyle?(gt=function(t){var i=t.ownerDocument.defaultView;return i&&i.opener||(i=e),i.getComputedStyle(t)},yt=function(e,t,i){var r,n,s,o,a=e.style;return""!==(o=(i=i||gt(e))?i.getPropertyValue(t)||i[t]:void 0)&&void 0!==o||de.contains(e.ownerDocument,e)||(o=de.style(e,t)),i&&!pe.pixelMarginRight()&&dt.test(o)&&ht.test(t)&&(r=a.width,n=a.minWidth,s=a.maxWidth,a.minWidth=a.maxWidth=a.width=o,o=i.width,a.width=r,a.minWidth=n,a.maxWidth=s),void 0===o?o:o+""}):mt.currentStyle&&(gt=function(e){return e.currentStyle},yt=function(e,t,i){var r,n,s,o,a=e.style;return null==(o=(i=i||gt(e))?i[t]:void 0)&&a&&a[t]&&(o=a[t]),dt.test(o)&&!vt.test(t)&&(r=a.left,(s=(n=e.runtimeStyle)&&n.left)&&(n.left=e.currentStyle.left),a.left="fontSize"===t?"1em":o,o=a.pixelLeft+"px",a.left=r,s&&(n.left=s)),void 0===o?o:o+""||"auto"});var wt=/alpha\([^)]*\)/i,bt=/opacity\s*=\s*([^)]*)/i,St=/^(none|table(?!-c[ea]).+)/,kt=new RegExp("^("+De+")(.*)$","i"),_t={position:"absolute",visibility:"hidden",display:"block"},xt={letterSpacing:"0",fontWeight:"400"},Tt=["Webkit","O","Moz","ms"],jt=re.createElement("div").style;de.extend({cssHooks:{opacity:{get:function(e,t){if(t){var i=yt(e,"opacity");return""===i?"1":i}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:pe.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,i,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var n,s,o,a=de.camelCase(t),l=e.style;if(t=de.cssProps[a]||(de.cssProps[a]=E(a)||a),o=de.cssHooks[t]||de.cssHooks[a],void 0===i)return o&&"get"in o&&void 0!==(n=o.get(e,!1,r))?n:l[t];if(!("string"===(s=typeof i)&&(n=Ne.exec(i))&&n[1]&&(i=h(e,t,n),s="number"),null==i||i!=i||("number"===s&&(i+=n&&n[3]||(de.cssNumber[a]?"":"px")),pe.clearCloneStyle||""!==i||0!==t.indexOf("background")||(l[t]="inherit"),o&&"set"in o&&void 0===(i=o.set(e,i,r)))))try{l[t]=i}catch(e){}}},css:function(e,t,i,r){var n,s,o,a=de.camelCase(t);return t=de.cssProps[a]||(de.cssProps[a]=E(a)||a),(o=de.cssHooks[t]||de.cssHooks[a])&&"get"in o&&(s=o.get(e,!0,i)),void 0===s&&(s=yt(e,t,r)),"normal"===s&&t in xt&&(s=xt[t]),""===i||i?(n=parseFloat(s),!0===i||isFinite(n)?n||0:s):s}}),de.each(["height","width"],function(e,t){de.cssHooks[t]={get:function(e,i,r){if(i)return St.test(de.css(e,"display"))&&0===e.offsetWidth?ft(e,_t,function(){return F(e,t,r)}):F(e,t,r)},set:function(e,i,r){var n=r&>(e);return I(e,i,r?L(e,t,r,pe.boxSizing&&"border-box"===de.css(e,"boxSizing",!1,n),n):0)}}}),pe.opacity||(de.cssHooks.opacity={get:function(e,t){return bt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var i=e.style,r=e.currentStyle,n=de.isNumeric(t)?"alpha(opacity="+100*t+")":"",s=r&&r.filter||i.filter||"";i.zoom=1,(t>=1||""===t)&&""===de.trim(s.replace(wt,""))&&i.removeAttribute&&(i.removeAttribute("filter"),""===t||r&&!r.filter)||(i.filter=wt.test(s)?s.replace(wt,n):s+" "+n)}}),de.cssHooks.marginRight=O(pe.reliableMarginRight,function(e,t){if(t)return ft(e,{display:"inline-block"},yt,[e,"marginRight"])}),de.cssHooks.marginLeft=O(pe.reliableMarginLeft,function(e,t){if(t)return(parseFloat(yt(e,"marginLeft"))||(de.contains(e.ownerDocument,e)?e.getBoundingClientRect().left-ft(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}):0))+"px"}),de.each({margin:"",padding:"",border:"Width"},function(e,t){de.cssHooks[e+t]={expand:function(i){for(var r=0,n={},s="string"==typeof i?i.split(" "):[i];r<4;r++)n[e+He[r]+t]=s[r]||s[r-2]||s[0];return n}},ht.test(e)||(de.cssHooks[e+t].set=I)}),de.fn.extend({css:function(e,t){return qe(this,function(e,t,i){var r,n,s={},o=0;if(de.isArray(t)){for(r=gt(e),n=t.length;o1)},show:function(){return $(this,!0)},hide:function(){return $(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Re(this)?de(this).show():de(this).hide()})}}),de.Tween=M,M.prototype={constructor:M,init:function(e,t,i,r,n,s){this.elem=e,this.prop=i,this.easing=n||de.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=s||(de.cssNumber[i]?"":"px")},cur:function(){var e=M.propHooks[this.prop];return e&&e.get?e.get(this):M.propHooks._default.get(this)},run:function(e){var t,i=M.propHooks[this.prop];return this.options.duration?this.pos=t=de.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):M.propHooks._default.set(this),this}},M.prototype.init.prototype=M.prototype,M.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=de.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){de.fx.step[e.prop]?de.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[de.cssProps[e.prop]]&&!de.cssHooks[e.prop]?e.elem[e.prop]=e.now:de.style(e.elem,e.prop,e.now+e.unit)}}},M.propHooks.scrollTop=M.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},de.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},de.fx=M.prototype.init,de.fx.step={};var At,Ct,Pt=/^(?:toggle|show|hide)$/,Jt=/queueHooks$/;de.Animation=de.extend(z,{tweeners:{"*":[function(e,t){var i=this.createTween(e,t);return h(i.elem,e,Ne.exec(t),i),i}]},tweener:function(e,t){de.isFunction(e)?(t=e,e=["*"]):e=e.match(Je);for(var i,r=0,n=e.length;r
a",e=i.getElementsByTagName("a")[0],t.setAttribute("type","checkbox"),i.appendChild(t),(e=i.getElementsByTagName("a")[0]).style.cssText="top:1px",pe.getSetAttribute="t"!==i.className,pe.style=/top/.test(e.getAttribute("style")),pe.hrefNormalized="/a"===e.getAttribute("href"),pe.checkOn=!!t.value,pe.optSelected=n.selected,pe.enctype=!!re.createElement("form").enctype,r.disabled=!0,pe.optDisabled=!n.disabled,(t=re.createElement("input")).setAttribute("value",""),pe.input=""===t.getAttribute("value"),t.value="t",t.setAttribute("type","radio"),pe.radioValue="t"===t.value}();var Ot=/\r/g,Et=/[\x20\t\r\n\f]+/g;de.fn.extend({val:function(e){var t,i,r,n=this[0];return arguments.length?(r=de.isFunction(e),this.each(function(i){var n;1===this.nodeType&&(null==(n=r?e.call(this,i,de(this).val()):e)?n="":"number"==typeof n?n+="":de.isArray(n)&&(n=de.map(n,function(e){return null==e?"":e+""})),(t=de.valHooks[this.type]||de.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,n,"value")||(this.value=n))})):n?(t=de.valHooks[n.type]||de.valHooks[n.nodeName.toLowerCase()])&&"get"in t&&void 0!==(i=t.get(n,"value"))?i:"string"==typeof(i=n.value)?i.replace(Ot,""):null==i?"":i:void 0}}),de.extend({valHooks:{option:{get:function(e){var t=de.find.attr(e,"value");return null!=t?t:de.trim(de.text(e)).replace(Et," ")}},select:{get:function(e){for(var t,i,r=e.options,n=e.selectedIndex,s="select-one"===e.type||n<0,o=s?null:[],a=s?n+1:r.length,l=n<0?a:s?n:0;l-1)try{r.selected=i=!0}catch(e){r.scrollHeight}else r.selected=!1;return i||(e.selectedIndex=-1),n}}}}),de.each(["radio","checkbox"],function(){de.valHooks[this]={set:function(e,t){if(de.isArray(t))return e.checked=de.inArray(de(e).val(),t)>-1}},pe.checkOn||(de.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var $t,It,Lt=de.expr.attrHandle,Ft=/^(?:checked|selected)$/i,Mt=pe.getSetAttribute,Dt=pe.input;de.fn.extend({attr:function(e,t){return qe(this,de.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){de.removeAttr(this,e)})}}),de.extend({attr:function(e,t,i){var r,n,s=e.nodeType;if(3!==s&&8!==s&&2!==s)return void 0===e.getAttribute?de.prop(e,t,i):(1===s&&de.isXMLDoc(e)||(t=t.toLowerCase(),n=de.attrHooks[t]||(de.expr.match.bool.test(t)?It:$t)),void 0!==i?null===i?void de.removeAttr(e,t):n&&"set"in n&&void 0!==(r=n.set(e,i,t))?r:(e.setAttribute(t,i+""),i):n&&"get"in n&&null!==(r=n.get(e,t))?r:null==(r=de.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!pe.radioValue&&"radio"===t&&de.nodeName(e,"input")){var i=e.value;return e.setAttribute("type",t),i&&(e.value=i),t}}}},removeAttr:function(e,t){var i,r,n=0,s=t&&t.match(Je);if(s&&1===e.nodeType)for(;i=s[n++];)r=de.propFix[i]||i,de.expr.match.bool.test(i)?Dt&&Mt||!Ft.test(i)?e[r]=!1:e[de.camelCase("default-"+i)]=e[r]=!1:de.attr(e,i,""),e.removeAttribute(Mt?i:r)}}),It={set:function(e,t,i){return!1===t?de.removeAttr(e,i):Dt&&Mt||!Ft.test(i)?e.setAttribute(!Mt&&de.propFix[i]||i,i):e[de.camelCase("default-"+i)]=e[i]=!0,i}},de.each(de.expr.match.bool.source.match(/\w+/g),function(e,t){var i=Lt[t]||de.find.attr;Dt&&Mt||!Ft.test(t)?Lt[t]=function(e,t,r){var n,s;return r||(s=Lt[t],Lt[t]=n,n=null!=i(e,t,r)?t.toLowerCase():null,Lt[t]=s),n}:Lt[t]=function(e,t,i){if(!i)return e[de.camelCase("default-"+t)]?t.toLowerCase():null}}),Dt&&Mt||(de.attrHooks.value={set:function(e,t,i){if(!de.nodeName(e,"input"))return $t&&$t.set(e,t,i);e.defaultValue=t}}),Mt||($t={set:function(e,t,i){var r=e.getAttributeNode(i);if(r||e.setAttributeNode(r=e.ownerDocument.createAttribute(i)),r.value=t+="","value"===i||t===e.getAttribute(i))return t}},Lt.id=Lt.name=Lt.coords=function(e,t,i){var r;if(!i)return(r=e.getAttributeNode(t))&&""!==r.value?r.value:null},de.valHooks.button={get:function(e,t){var i=e.getAttributeNode(t);if(i&&i.specified)return i.value},set:$t.set},de.attrHooks.contenteditable={set:function(e,t,i){$t.set(e,""!==t&&t,i)}},de.each(["width","height"],function(e,t){de.attrHooks[t]={set:function(e,i){if(""===i)return e.setAttribute(t,"auto"),i}}})),pe.style||(de.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+""}});var Nt=/^(?:input|select|textarea|button|object)$/i,Ht=/^(?:a|area)$/i;de.fn.extend({prop:function(e,t){return qe(this,de.prop,e,t,arguments.length>1)},removeProp:function(e){return e=de.propFix[e]||e,this.each(function(){try{this[e]=void 0,delete this[e]}catch(e){}})}}),de.extend({prop:function(e,t,i){var r,n,s=e.nodeType;if(3!==s&&8!==s&&2!==s)return 1===s&&de.isXMLDoc(e)||(t=de.propFix[t]||t,n=de.propHooks[t]),void 0!==i?n&&"set"in n&&void 0!==(r=n.set(e,i,t))?r:e[t]=i:n&&"get"in n&&null!==(r=n.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=de.find.attr(e,"tabindex");return t?parseInt(t,10):Nt.test(e.nodeName)||Ht.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),pe.hrefNormalized||de.each(["href","src"],function(e,t){de.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),pe.optSelected||(de.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),de.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){de.propFix[this.toLowerCase()]=this}),pe.enctype||(de.propFix.enctype="encoding");var Rt=/[\t\r\n\f]/g;de.fn.extend({addClass:function(e){var t,i,r,n,s,o,a,l=0;if(de.isFunction(e))return this.each(function(t){de(this).addClass(e.call(this,t,V(this)))});if("string"==typeof e&&e)for(t=e.match(Je)||[];i=this[l++];)if(n=V(i),r=1===i.nodeType&&(" "+n+" ").replace(Rt," ")){for(o=0;s=t[o++];)r.indexOf(" "+s+" ")<0&&(r+=s+" ");n!==(a=de.trim(r))&&de.attr(i,"class",a)}return this},removeClass:function(e){var t,i,r,n,s,o,a,l=0;if(de.isFunction(e))return this.each(function(t){de(this).removeClass(e.call(this,t,V(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(Je)||[];i=this[l++];)if(n=V(i),r=1===i.nodeType&&(" "+n+" ").replace(Rt," ")){for(o=0;s=t[o++];)for(;r.indexOf(" "+s+" ")>-1;)r=r.replace(" "+s+" "," ");n!==(a=de.trim(r))&&de.attr(i,"class",a)}return this},toggleClass:function(e,t){var i=typeof e;return"boolean"==typeof t&&"string"===i?t?this.addClass(e):this.removeClass(e):de.isFunction(e)?this.each(function(i){de(this).toggleClass(e.call(this,i,V(this),t),t)}):this.each(function(){var t,r,n,s;if("string"===i)for(r=0,n=de(this),s=e.match(Je)||[];t=s[r++];)n.hasClass(t)?n.removeClass(t):n.addClass(t);else void 0!==e&&"boolean"!==i||((t=V(this))&&de._data(this,"__className__",t),de.attr(this,"class",t||!1===e?"":de._data(this,"__className__")||""))})},hasClass:function(e){var t,i,r=0;for(t=" "+e+" ";i=this[r++];)if(1===i.nodeType&&(" "+V(i)+" ").replace(Rt," ").indexOf(t)>-1)return!0;return!1}}),de.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){de.fn[t]=function(e,i){return arguments.length>0?this.on(t,null,e,i):this.trigger(t)}}),de.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}});var qt=e.location,zt=de.now(),Vt=/\?/,Bt=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;de.parseJSON=function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t+"");var i,r=null,n=de.trim(t+"");return n&&!de.trim(n.replace(Bt,function(e,t,n,s){return i&&t&&(r=0),0===r?e:(i=n||t,r+=!s-!n,"")}))?Function("return "+n)():de.error("Invalid JSON: "+t)},de.parseXML=function(t){var i;if(!t||"string"!=typeof t)return null;try{e.DOMParser?i=(new e.DOMParser).parseFromString(t,"text/xml"):((i=new e.ActiveXObject("Microsoft.XMLDOM")).async="false",i.loadXML(t))}catch(e){i=void 0}return i&&i.documentElement&&!i.getElementsByTagName("parsererror").length||de.error("Invalid XML: "+t),i};var Wt=/#.*$/,Ut=/([?&])_=[^&]*/,Qt=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Gt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Yt=/^(?:GET|HEAD)$/,Xt=/^\/\//,Kt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Zt={},ei={},ti="*/".concat("*"),ii=qt.href,ri=Kt.exec(ii.toLowerCase())||[];de.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ii,type:"GET",isLocal:Gt.test(ri[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":ti,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":de.parseJSON,"text xml":de.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?U(U(e,de.ajaxSettings),t):U(de.ajaxSettings,e)},ajaxPrefilter:B(Zt),ajaxTransport:B(ei),ajax:function(t,i){function r(t,i,r,n){var s,p,v,w,S,_=i;2!==b&&(b=2,l&&e.clearTimeout(l),u=void 0,a=n||"",k.readyState=t>0?4:0,s=t>=200&&t<300||304===t,r&&(w=Q(h,k,r)),w=G(h,w,k,s),s?(h.ifModified&&((S=k.getResponseHeader("Last-Modified"))&&(de.lastModified[o]=S),(S=k.getResponseHeader("etag"))&&(de.etag[o]=S)),204===t||"HEAD"===h.type?_="nocontent":304===t?_="notmodified":(_=w.state,p=w.data,s=!(v=w.error))):(v=_,!t&&_||(_="error",t<0&&(t=0))),k.status=t,k.statusText=(i||_)+"",s?m.resolveWith(d,[p,_,k]):m.rejectWith(d,[k,_,v]),k.statusCode(y),y=void 0,c&&f.trigger(s?"ajaxSuccess":"ajaxError",[k,h,s?p:v]),g.fireWith(d,[k,_]),c&&(f.trigger("ajaxComplete",[k,h]),--de.active||de.event.trigger("ajaxStop")))}"object"==typeof t&&(i=t,t=void 0),i=i||{};var n,s,o,a,l,c,u,p,h=de.ajaxSetup({},i),d=h.context||h,f=h.context&&(d.nodeType||d.jquery)?de(d):de.event,m=de.Deferred(),g=de.Callbacks("once memory"),y=h.statusCode||{},v={},w={},b=0,S="canceled",k={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!p)for(p={};t=Qt.exec(a);)p[t[1].toLowerCase()]=t[2];t=p[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var i=e.toLowerCase();return b||(e=w[i]=w[i]||e,v[e]=t),this},overrideMimeType:function(e){return b||(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(b<2)for(t in e)y[t]=[y[t],e[t]];else k.always(e[k.status]);return this},abort:function(e){var t=e||S;return u&&u.abort(t),r(0,t),this}};if(m.promise(k).complete=g.add,k.success=k.done,k.error=k.fail,h.url=((t||h.url||ii)+"").replace(Wt,"").replace(Xt,ri[1]+"//"),h.type=i.method||i.type||h.method||h.type,h.dataTypes=de.trim(h.dataType||"*").toLowerCase().match(Je)||[""],null==h.crossDomain&&(n=Kt.exec(h.url.toLowerCase()),h.crossDomain=!(!n||n[1]===ri[1]&&n[2]===ri[2]&&(n[3]||("http:"===n[1]?"80":"443"))===(ri[3]||("http:"===ri[1]?"80":"443")))),h.data&&h.processData&&"string"!=typeof h.data&&(h.data=de.param(h.data,h.traditional)),W(Zt,h,i,k),2===b)return k;for(s in(c=de.event&&h.global)&&0===de.active++&&de.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Yt.test(h.type),o=h.url,h.hasContent||(h.data&&(o=h.url+=(Vt.test(o)?"&":"?")+h.data,delete h.data),!1===h.cache&&(h.url=Ut.test(o)?o.replace(Ut,"$1_="+zt++):o+(Vt.test(o)?"&":"?")+"_="+zt++)),h.ifModified&&(de.lastModified[o]&&k.setRequestHeader("If-Modified-Since",de.lastModified[o]),de.etag[o]&&k.setRequestHeader("If-None-Match",de.etag[o])),(h.data&&h.hasContent&&!1!==h.contentType||i.contentType)&&k.setRequestHeader("Content-Type",h.contentType),k.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+ti+"; q=0.01":""):h.accepts["*"]),h.headers)k.setRequestHeader(s,h.headers[s]);if(h.beforeSend&&(!1===h.beforeSend.call(d,k,h)||2===b))return k.abort();for(s in S="abort",{success:1,error:1,complete:1})k[s](h[s]);if(u=W(ei,h,i,k)){if(k.readyState=1,c&&f.trigger("ajaxSend",[k,h]),2===b)return k;h.async&&h.timeout>0&&(l=e.setTimeout(function(){k.abort("timeout")},h.timeout));try{b=1,u.send(v,r)}catch(e){if(!(b<2))throw e;r(-1,e)}}else r(-1,"No Transport");return k},getJSON:function(e,t,i){return de.get(e,t,i,"json")},getScript:function(e,t){return de.get(e,void 0,t,"script")}}),de.each(["get","post"],function(e,t){de[t]=function(e,i,r,n){return de.isFunction(i)&&(n=n||r,r=i,i=void 0),de.ajax(de.extend({url:e,type:t,dataType:n,data:i,success:r},de.isPlainObject(e)&&e))}}),de._evalUrl=function(e){return de.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},de.fn.extend({wrapAll:function(e){if(de.isFunction(e))return this.each(function(t){de(this).wrapAll(e.call(this,t))});if(this[0]){var t=de(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return de.isFunction(e)?this.each(function(t){de(this).wrapInner(e.call(this,t))}):this.each(function(){var t=de(this),i=t.contents();i.length?i.wrapAll(e):t.append(e)})},wrap:function(e){var t=de.isFunction(e);return this.each(function(i){de(this).wrapAll(t?e.call(this,i):e)})},unwrap:function(){return this.parent().each(function(){de.nodeName(this,"body")||de(this).replaceWith(this.childNodes)}).end()}}),de.expr.filters.hidden=function(e){return pe.reliableHiddenOffsets()?e.offsetWidth<=0&&e.offsetHeight<=0&&!e.getClientRects().length:X(e)},de.expr.filters.visible=function(e){return!de.expr.filters.hidden(e)};var ni=/%20/g,si=/\[\]$/,oi=/\r?\n/g,ai=/^(?:submit|button|image|reset|file)$/i,li=/^(?:input|select|textarea|keygen)/i;de.param=function(e,t){var i,r=[],n=function(e,t){t=de.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=de.ajaxSettings&&de.ajaxSettings.traditional),de.isArray(e)||e.jquery&&!de.isPlainObject(e))de.each(e,function(){n(this.name,this.value)});else for(i in e)K(i,e[i],t,n);return r.join("&").replace(ni,"+")},de.fn.extend({serialize:function(){return de.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=de.prop(this,"elements");return e?de.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!de(this).is(":disabled")&&li.test(this.nodeName)&&!ai.test(e)&&(this.checked||!ze.test(e))}).map(function(e,t){var i=de(this).val();return null==i?null:de.isArray(i)?de.map(i,function(e){return{name:t.name,value:e.replace(oi,"\r\n")}}):{name:t.name,value:i.replace(oi,"\r\n")}}).get()}}),de.ajaxSettings.xhr=void 0!==e.ActiveXObject?function(){return this.isLocal?ee():re.documentMode>8?Z():/^(get|post|head|put|delete|options)$/i.test(this.type)&&Z()||ee()}:Z;var ci=0,ui={},pi=de.ajaxSettings.xhr();e.attachEvent&&e.attachEvent("onunload",function(){for(var e in ui)ui[e](void 0,!0)}),pe.cors=!!pi&&"withCredentials"in pi,(pi=pe.ajax=!!pi)&&de.ajaxTransport(function(t){var i;if(!t.crossDomain||pe.cors)return{send:function(r,n){var s,o=t.xhr(),a=++ci;if(o.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)o[s]=t.xhrFields[s];for(s in t.mimeType&&o.overrideMimeType&&o.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest"),r)void 0!==r[s]&&o.setRequestHeader(s,r[s]+"");o.send(t.hasContent&&t.data||null),i=function(e,r){var s,l,c;if(i&&(r||4===o.readyState))if(delete ui[a],i=void 0,o.onreadystatechange=de.noop,r)4!==o.readyState&&o.abort();else{c={},s=o.status,"string"==typeof o.responseText&&(c.text=o.responseText);try{l=o.statusText}catch(e){l=""}s||!t.isLocal||t.crossDomain?1223===s&&(s=204):s=c.text?200:404}c&&n(s,l,c,o.getAllResponseHeaders())},t.async?4===o.readyState?e.setTimeout(i):o.onreadystatechange=ui[a]=i:i()},abort:function(){i&&i(void 0,!0)}}}),de.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return de.globalEval(e),e}}}),de.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),de.ajaxTransport("script",function(e){if(e.crossDomain){var t,i=re.head||de("head")[0]||re.documentElement;return{send:function(r,n){(t=re.createElement("script")).async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,i){(i||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,i||n(200,"success"))},i.insertBefore(t,i.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var hi=[],di=/(=)\?(?=&|$)|\?\?/;de.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=hi.pop()||de.expando+"_"+zt++;return this[e]=!0,e}}),de.ajaxPrefilter("json jsonp",function(t,i,r){var n,s,o,a=!1!==t.jsonp&&(di.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&di.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return n=t.jsonpCallback=de.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(di,"$1"+n):!1!==t.jsonp&&(t.url+=(Vt.test(t.url)?"&":"?")+t.jsonp+"="+n),t.converters["script json"]=function(){return o||de.error(n+" was not called"),o[0]},t.dataTypes[0]="json",s=e[n],e[n]=function(){o=arguments},r.always(function(){void 0===s?de(e).removeProp(n):e[n]=s,t[n]&&(t.jsonpCallback=i.jsonpCallback,hi.push(n)),o&&de.isFunction(s)&&s(o[0]),o=s=void 0}),"script"}),de.parseHTML=function(e,t,i){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(i=t,t=!1),t=t||re;var r=ke.exec(e),n=!i&&[];return r?[t.createElement(r[1])]:(r=y([e],t,n),n&&n.length&&de(n).remove(),de.merge([],r.childNodes))};var fi=de.fn.load;de.fn.load=function(e,t,i){if("string"!=typeof e&&fi)return fi.apply(this,arguments);var r,n,s,o=this,a=e.indexOf(" ");return a>-1&&(r=de.trim(e.slice(a,e.length)),e=e.slice(0,a)),de.isFunction(t)?(i=t,t=void 0):t&&"object"==typeof t&&(n="POST"),o.length>0&&de.ajax({url:e,type:n||"GET",dataType:"html",data:t}).done(function(e){s=arguments,o.html(r?de("
").append(de.parseHTML(e)).find(r):e)}).always(i&&function(e,t){o.each(function(){i.apply(this,s||[e.responseText,t,e])})}),this},de.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){de.fn[t]=function(e){return this.on(t,e)}}),de.expr.filters.animated=function(e){return de.grep(de.timers,function(t){return e===t.elem}).length},de.offset={setOffset:function(e,t,i){var r,n,s,o,a,l,c=de.css(e,"position"),u=de(e),p={};"static"===c&&(e.style.position="relative"),a=u.offset(),s=de.css(e,"top"),l=de.css(e,"left"),("absolute"===c||"fixed"===c)&&de.inArray("auto",[s,l])>-1?(o=(r=u.position()).top,n=r.left):(o=parseFloat(s)||0,n=parseFloat(l)||0),de.isFunction(t)&&(t=t.call(e,i,de.extend({},a))),null!=t.top&&(p.top=t.top-a.top+o),null!=t.left&&(p.left=t.left-a.left+n),"using"in t?t.using.call(e,p):u.css(p)}},de.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){de.offset.setOffset(this,e,t)});var t,i,r={top:0,left:0},n=this[0],s=n&&n.ownerDocument;return s?(t=s.documentElement,de.contains(t,n)?(void 0!==n.getBoundingClientRect&&(r=n.getBoundingClientRect()),i=te(s),{top:r.top+(i.pageYOffset||t.scrollTop)-(t.clientTop||0),left:r.left+(i.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):r):void 0},position:function(){if(this[0]){var e,t,i={top:0,left:0},r=this[0];return"fixed"===de.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),de.nodeName(e[0],"html")||(i=e.offset()),i.top+=de.css(e[0],"borderTopWidth",!0),i.left+=de.css(e[0],"borderLeftWidth",!0)),{top:t.top-i.top-de.css(r,"marginTop",!0),left:t.left-i.left-de.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&!de.nodeName(e,"html")&&"static"===de.css(e,"position");)e=e.offsetParent;return e||mt})}}),de.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var i=/Y/.test(t);de.fn[e]=function(r){return qe(this,function(e,r,n){var s=te(e);if(void 0===n)return s?t in s?s[t]:s.document.documentElement[r]:e[r];s?s.scrollTo(i?de(s).scrollLeft():n,i?n:de(s).scrollTop()):e[r]=n},e,r,arguments.length,null)}}),de.each(["top","left"],function(e,t){de.cssHooks[t]=O(pe.pixelPosition,function(e,i){if(i)return i=yt(e,t),dt.test(i)?de(e).position()[t]+"px":i})}),de.each({Height:"height",Width:"width"},function(e,t){de.each({padding:"inner"+e,content:t,"":"outer"+e},function(i,r){de.fn[r]=function(r,n){var s=arguments.length&&(i||"boolean"!=typeof r),o=i||(!0===r||!0===n?"margin":"border");return qe(this,function(t,i,r){var n;return de.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(n=t.documentElement,Math.max(t.body["scroll"+e],n["scroll"+e],t.body["offset"+e],n["offset"+e],n["client"+e])):void 0===r?de.css(t,i,o):de.style(t,i,r,o)},t,s?r:void 0,s,null)}})}),de.fn.extend({bind:function(e,t,i){return this.on(e,null,t,i)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,i,r){return this.on(t,e,i,r)},undelegate:function(e,t,i){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",i)}}),de.fn.size=function(){return this.length},de.fn.andSelf=de.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return de});var mi=e.jQuery,gi=e.$;return de.noConflict=function(t){return e.$===de&&(e.$=gi),t&&e.jQuery===de&&(e.jQuery=mi),de},t||(e.jQuery=e.$=de),de}),function(e){e.fn.classes=function(t){var i=[];if(e.each(this,function(e,t){var r=t.className.split(/\s+/);for(var n in r){var s=r[n];-1===i.indexOf(s)&&i.push(s)}}),"function"==typeof t)for(var r in i)t(i[r]);return i}}(jQuery),function(e,t){"function"==typeof define&&define.amd?define(["jquery"],function(i){return t(e,i)}):"object"==typeof exports?module.exports=t(e,require("jquery")):t(e,jQuery)}("undefined"!=typeof window?window:this,function(e,t,i){"use strict";function r(){"hidden"!==n&&(o.hidden=l.pageVisibility?o[n]:i)}for(var n,s,o=e.document,a=["webkit","o","ms","moz",""],l=t.support||{},c=("onfocusin"in o&&"hasFocus"in o?"focusin focusout":"focus blur");(s=a.pop())!==i;)if(n=(s?s+"H":"h")+"idden",l.pageVisibility=o[n]!==i,l.pageVisibility){c=s+"visibilitychange";break}r(),t(/blur$/.test(c)?e:o).on(c,function(e){ var s=e.type,a=e.originalEvent;if(a){var l=a.toElement;(!/^focus./.test(s)||l===i&&a.fromElement===i&&a.relatedTarget===i)&&t(o).triggerHandler(n&&o[n]||/^(?:blur|focusout)$/.test(s)?"hide":"show"),r()}})}),function(){function e(e){function t(t,i,r,n,s,o){for(;s>=0&&s0?0:a-1;return arguments.length<3&&(n=i[o?o[l]:l],l+=e),t(i,r,n,o,l,a)}}function t(e){return function(t,i,r){i=b(i,r);for(var n=T(t),s=e>0?0:n-1;s>=0&&s0?o=s>=0?s:Math.max(s+a,o):a=s>=0?Math.min(s+1,a):s+a+1;else if(i&&s&&a)return r[s=i(r,n)]===n?s:-1;if(n!=n)return(s=t(u.call(r,o,a),v.isNaN))>=0?s+o:-1;for(s=e>0?o:a-1;s>=0&&s=0&&t<=x};v.each=v.forEach=function(e,t,i){var r,n;if(t=w(t,i),j(e))for(r=0,n=e.length;r=0},v.invoke=function(e,t){var i=u.call(arguments,2),r=v.isFunction(t);return v.map(e,function(e){var n=r?t:e[t];return null==n?n:n.apply(e,i)})},v.pluck=function(e,t){return v.map(e,v.property(t))},v.where=function(e,t){return v.filter(e,v.matcher(t))},v.findWhere=function(e,t){return v.find(e,v.matcher(t))},v.max=function(e,t,i){var r,n,s=-1/0,o=-1/0;if(null==t&&null!=e)for(var a=0,l=(e=j(e)?e:v.values(e)).length;as&&(s=r);else t=b(t,i),v.each(e,function(e,i,r){((n=t(e,i,r))>o||n===-1/0&&s===-1/0)&&(s=e,o=n)});return s},v.min=function(e,t,i){var r,n,s=1/0,o=1/0;if(null==t&&null!=e)for(var a=0,l=(e=j(e)?e:v.values(e)).length;ar||void 0===i)return 1;if(it?(o&&(clearTimeout(o),o=null),a=c,s=e.apply(r,n),o||(r=n=null)):o||!1===i.trailing||(o=setTimeout(l,u)),s}},v.debounce=function(e,t,i){var r,n,s,o,a,l=function(){var c=v.now()-o;c=0?r=setTimeout(l,t-c):(r=null,i||(a=e.apply(s,n),r||(s=n=null)))};return function(){s=this,n=arguments,o=v.now();var c=i&&!r;return r||(r=setTimeout(l,t)),c&&(a=e.apply(s,n),s=n=null),a}},v.wrap=function(e,t){return v.partial(t,e)},v.negate=function(e){return function(){return!e.apply(this,arguments)}},v.compose=function(){var e=arguments,t=e.length-1;return function(){for(var i=t,r=e[t].apply(this,arguments);i--;)r=e[i].call(this,r);return r}},v.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},v.before=function(e,t){var i;return function(){return--e>0&&(i=t.apply(this,arguments)),e<=1&&(t=null),i}},v.once=v.partial(v.before,2);var J=!{toString:null}.propertyIsEnumerable("toString"),O=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];v.keys=function(e){if(!v.isObject(e))return[];if(f)return f(e);var t=[];for(var i in e)v.has(e,i)&&t.push(i);return J&&r(e,t),t},v.allKeys=function(e){if(!v.isObject(e))return[];var t=[];for(var i in e)t.push(i);return J&&r(e,t),t},v.values=function(e){for(var t=v.keys(e),i=t.length,r=Array(i),n=0;n":">",'"':""","'":"'","`":"`"},I=v.invert($),L=function(e){var t=function(t){return e[t]},i="(?:"+v.keys(e).join("|")+")",r=RegExp(i),n=RegExp(i,"g");return function(e){return e=null==e?"":""+e,r.test(e)?e.replace(n,t):e}};v.escape=L($),v.unescape=L(I),v.result=function(e,t,i){var r=null==e?void 0:e[t];return void 0===r&&(r=i),v.isFunction(r)?r.call(e):r};var F=0;v.uniqueId=function(e){var t=++F+"";return e?e+t:t},v.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var M=/(.)^/,D={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},N=/\\|'|\r|\n|\u2028|\u2029/g,H=function(e){return"\\"+D[e]};v.template=function(e,t,i){!t&&i&&(t=i),t=v.defaults({},t,v.templateSettings);var r=RegExp([(t.escape||M).source,(t.interpolate||M).source,(t.evaluate||M).source].join("|")+"|$","g"),n=0,s="__p+='";e.replace(r,function(t,i,r,o,a){return s+=e.slice(n,a).replace(N,H),n=a+t.length,i?s+="'+\n((__t=("+i+"))==null?'':_.escape(__t))+\n'":r?s+="'+\n((__t=("+r+"))==null?'':__t)+\n'":o&&(s+="';\n"+o+"\n__p+='"),t}),s+="';\n",t.variable||(s="with(obj||{}){\n"+s+"}\n"),s="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+s+"return __p;\n";try{var o=new Function(t.variable||"obj","_",s)}catch(e){throw e.source=s,e}var a=function(e){return o.call(this,e,v)},l=t.variable||"obj";return a.source="function("+l+"){\n"+s+"}",a},v.chain=function(e){var t=v(e);return t._chain=!0,t};var R=function(e,t){return e._chain?v(t).chain():t};v.mixin=function(e){v.each(v.functions(e),function(t){var i=v[t]=e[t];v.prototype[t]=function(){var e=[this._wrapped];return c.apply(e,arguments),R(this,i.apply(v,e))}})},v.mixin(v),v.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=o[e];v.prototype[e]=function(){var i=this._wrapped;return t.apply(i,arguments),"shift"!==e&&"splice"!==e||0!==i.length||delete i[0],R(this,i)}}),v.each(["concat","join","slice"],function(e){var t=o[e];v.prototype[e]=function(){return R(this,t.apply(this._wrapped,arguments))}}),v.prototype.value=function(){return this._wrapped},v.prototype.valueOf=v.prototype.toJSON=v.prototype.value,v.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return v})}.call(this),function(e,t){var i=[],r=[],n=[],s={gsub:function(e,t,i){var r=new RegExp(t.source||t,"gi");return r.test(e)?e.replace(r,i):null},plural:function(e,t){i.unshift([e,t])},pluralize:function(r,s,o){var a;if(s!==t)s=parseFloat(s),a=1===s?this.singularize(r):this.pluralize(r),a=o?[s,a].join(" "):a;else{if(e(n).include(r))return r;a=r,e(i).detect(function(e){var t=this.gsub(r,e[0],e[1]);return!!t&&(a=t)},this)}return a},singular:function(e,t){r.unshift([e,t])},singularize:function(t){if(e(n).include(t))return t;var i=t;return e(r).detect(function(e){var r=this.gsub(t,e[0],e[1]);return!!r&&(i=r)},this),i},irregular:function(e,t){this.plural("\\b"+e+"\\b",t),this.singular("\\b"+t+"\\b",e)},uncountable:function(e){n.unshift(e)},ordinalize:function(e){if(isNaN(e))return e;var t=(e=e.toString()).slice(-1),i=e.slice(-2);if("11"===i||"12"===i||"13"===i)return e+"th";switch(t){case"1":return e+"st";case"2":return e+"nd";case"3":return e+"rd";default:return e+"th"}},titleize:function(e){return"string"!=typeof e?e:e.replace(/\S+/g,function(e){return e.charAt(0).toUpperCase()+e.slice(1)})},resetInflections:function(){return i=[],r=[],n=[],this.plural(/$/,"s"),this.plural(/s$/,"s"),this.plural(/(ax|test)is$/,"$1es"),this.plural(/(octop|vir)us$/,"$1i"),this.plural(/(octop|vir)i$/,"$1i"),this.plural(/(alias|status)$/,"$1es"),this.plural(/(bu)s$/,"$1ses"),this.plural(/(buffal|tomat)o$/,"$1oes"),this.plural(/([ti])um$/,"$1a"),this.plural(/([ti])a$/,"$1a"),this.plural(/sis$/,"ses"),this.plural(/(?:([^f])fe|([lr])?f)$/,"$1$2ves"),this.plural(/(hive)$/,"$1s"),this.plural(/([^aeiouy]|qu)y$/,"$1ies"),this.plural(/(x|ch|ss|sh)$/,"$1es"),this.plural(/(matr|vert|ind)(?:ix|ex)$/,"$1ices"),this.plural(/([m|l])ouse$/,"$1ice"),this.plural(/([m|l])ice$/,"$1ice"),this.plural(/^(ox)$/,"$1en"),this.plural(/^(oxen)$/,"$1"),this.plural(/(quiz)$/,"$1zes"),this.singular(/s$/,""),this.singular(/(n)ews$/,"$1ews"),this.singular(/([ti])a$/,"$1um"),this.singular(/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/,"$1$2sis"),this.singular(/(^analy)ses$/,"$1sis"),this.singular(/([^f])ves$/,"$1fe"),this.singular(/(hive)s$/,"$1"),this.singular(/(tive)s$/,"$1"),this.singular(/([lr])ves$/,"$1f"),this.singular(/([^aeiouy]|qu)ies$/,"$1y"),this.singular(/(s)eries$/,"$1eries"),this.singular(/(m)ovies$/,"$1ovie"),this.singular(/(x|ch|ss|sh)es$/,"$1"),this.singular(/([m|l])ice$/,"$1ouse"),this.singular(/(bus)es$/,"$1"),this.singular(/(o)es$/,"$1"),this.singular(/(shoe)s$/,"$1"),this.singular(/(cris|ax|test)es$/,"$1is"),this.singular(/(octop|vir)i$/,"$1us"),this.singular(/(alias|status)es$/,"$1"),this.singular(/^(ox)en/,"$1"),this.singular(/(vert|ind)ices$/,"$1ex"),this.singular(/(matr)ices$/,"$1ix"),this.singular(/(quiz)zes$/,"$1"),this.singular(/(database)s$/,"$1"),this.irregular("person","people"),this.irregular("man","men"),this.irregular("child","children"),this.irregular("sex","sexes"),this.irregular("move","moves"),this.irregular("cow","kine"),this.uncountable("equipment"),this.uncountable("information"),this.uncountable("rice"),this.uncountable("money"),this.uncountable("species"),this.uncountable("series"),this.uncountable("fish"),this.uncountable("sheep"),this.uncountable("jeans"),this}};e.mixin(s.resetInflections())}(_),function(e){var t="object"==typeof self&&self.self==self&&self||"object"==typeof global&&global.global==global&&global;if("function"==typeof define&&define.amd)define(["underscore","jquery","exports"],function(i,r,n){t.Backbone=e(t,n,i,r)});else if("undefined"!=typeof exports){var i,r=require("underscore");try{i=require("jquery")}catch(e){}e(t,exports,r,i)}else t.Backbone=e(t,{},t._,t.jQuery||t.Zepto||t.ender||t.$)}(function(e,t,i,r){var n=e.Backbone,s=[].slice;t.VERSION="1.2.1",t.$=r,t.noConflict=function(){return e.Backbone=n,this},t.emulateHTTP=!1,t.emulateJSON=!1;var o=function(e,t,r){switch(e){case 1:return function(){return i[t](this[r])};case 2:return function(e){return i[t](this[r],e)};case 3:return function(e,n){return i[t](this[r],e,n)};case 4:return function(e,n,s){return i[t](this[r],e,n,s)};default:return function(){var e=s.call(arguments);return e.unshift(this[r]),i[t].apply(i,e)}}},a=function(e,t,r){i.each(t,function(t,n){i[n]&&(e.prototype[n]=o(t,n,r))})},l=t.Events={},c=/\s+/,u=function(e,t,r,n,s){var o,a=0;if(r&&"object"==typeof r){void 0!==n&&"context"in s&&void 0===s.context&&(s.context=n);for(o=i.keys(r);ai.size(e))&&(e="."),p=e,c=RegExp("[\\"+p+"\\[\\]]+","g"),u=RegExp("[^\\"+p+"\\[\\]]+","g")};try{Object.defineProperty(t.Associations,"SEPARATOR",{enumerable:!0,get:m,set:g})}catch(e){}t.Associations.Many=t.Many="Many",t.Associations.One=t.One="One",t.Associations.Self=t.Self="Self",t.Associations.SEPARATOR=".",t.Associations.getSeparator=m,t.Associations.setSeparator=g,t.Associations.EVENTS_BUBBLE=!0,t.Associations.EVENTS_WILDCARD=!0,t.Associations.EVENTS_NC=!1,g(),l=t.AssociatedModel=t.Associations.AssociatedModel=r.extend({relations:void 0,_proxyCalls:void 0,on:function(e,r,n){var s=o.on.apply(this,arguments);if(t.Associations.EVENTS_NC)return s;var a=/\s+/;return i.isString(e)&&e&&!a.test(e)&&r&&(a=v(e))&&(f[a]=void 0===f[a]?1:f[a]+1),s},off:function(e,r,n){if(t.Associations.EVENTS_NC)return o.off.apply(this,arguments);var s=/\s+/,a=this._events,l={},c=a?i.keys(a):[],u=!e&&!r&&!n,p=i.isString(e)&&!s.test(e);if(u||p){s=0;for(var h=c.length;si.size(e))){for(r=0;rLoad More").addClass("j-paginate juicer-button");this.box.append(t)},_moveLoadMore:function(){var e=this.box.find(".j-paginate");e.length>0&&this.box.append(e.detach())},_setName:function(e,t){return t=t||"",e?this._setName(--e,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz".charAt(Math.floor(60*Math.random()))+t):t},_setCols:function(){this.calculated=Math.floor(this.box.outerWidth()/this.options.width),this.cols=Math.min(this.options.columns,this.calculated),this.cols<1&&(this.cols=1),diff=(this.box.width()-this.cols*this.options.width)/this.cols,w=(this.options.width+diff)/this.box.width()*100,this.w=w,this.spacing=this.options.gutter/this.cols;for(var t=e("
").addClass("j-stacker-wrapper").css({marginLeft:-this.options.gutter/2,marginRight:-this.options.gutter/2}),i=e("
").addClass("j-stacker"),r=0;r":"
",s=e(n).addClass("j-stack galcolumn column-"+r+"-"+this.name).attr("id","j-column-"+r).css({width:w+"%",paddingLeft:this.options.gutter/2,paddingRight:this.options.gutter/2});i.append(s)}t.append(i),this.box.append(t),this.box.find(e("#clear"+this.name)).remove();var o=e("
").css({clear:"both",height:"0",width:"0",display:"block"}).attr("id","clear"+this.name);this.box.append(o)},_renderGrid:function(t,i,r){var n=[],s=[],o=0,a=(this.prependCount,this.appendCount),l=this.options.gutter,c=this.cols,u=this.name;e(".j-stack").width();i?(s=i,"append"==t&&(a+=r,o=this.appendCount),"prepend"==t&&(this.isPrepending=!0,(o=Math.round(r%c))<=0&&(o=c)),"renderAfterPrepend"==t&&(a+=r,o=r)):(s=this.gridArr,a=e(this.gridArr).length),e.each(s,function(i,r){var s=e(r),p="100%";s.hasClass("not-responsive")&&(p="auto"),s.css({marginBottom:l,zoom:"1"}).find(".j-image img, object, embed, iframe").css({width:p,height:"auto",display:"block","margin-left":"auto","margin-right":"auto"}),"prepend"==t?(o--,e(".column-"+o+"-"+u).prepend(s),n.push(s),0==o&&(o=c)):(e(".column-"+o+"-"+u).append(s),n.push(s),++o>=c&&(o=0),a>=c&&(a-=c))}),this.appendCount=a,this.itemCount=o,"append"==t||"prepend"==t?("prepend"==t&&this._updateAfterPrepend(this.gridArr,s),this._renderItem(n),this.isPrepending=!1):this._renderItem(this.gridArr)},_collectItems:function(){var t=[] ;return e(this.box).find(this.options.selector).each(function(){t.push(e(this))}),t},_renderItem:function(t){var i=this.options.animationOptions.speed,r=this.options.animationOptions.effect,n=this.options.animationOptions.duration,s=this.options.animationOptions.queue,o=this.options.animate,a=this.options.animationOptions.complete,l=0,c=0;!0!==o||this.isResizing?(e.each(t,function(t,i){e(i).css({opacity:"1"})}),this.ifCallback&&a.call(t)):(!0===s&&"fadeInOnAppear"==r?(this.isPrepending&&t.reverse(),e.each(t,function(r,s){setTimeout(function(){e(s).animate({opacity:"1.0"},n),++c==t.length&&a.call(void 0,t)},l*i),l++})):!1===s&&"fadeInOnAppear"==r&&(this.isPrepending&&t.reverse(),e.each(t,function(i,r){e(r).animate({opacity:"1.0"},n),++c==t.length&&this.ifCallback&&a.call(void 0,t)})),!0!==s||r||e.each(t,function(i,r){e(r).css({opacity:"1"}),++c==t.length&&this.ifCallback&&a.call(void 0,t)}))},_updateAfterPrepend:function(t,i){var r=this.gridArr;e.each(i,function(e,t){r.unshift(t)}),this.gridArr=r},resize:function(){this.box.width()!=this.initialWidth&&(this.initialWidth=this.box.width(),this.box.find(e(".j-stacker-wrapper")).remove(),this._setCols(),this._moveLoadMore(),this.ifCallback=!1,this.isResizing=!0,this._renderGrid("append"),this.ifCallback=!0,this.isResizing=!1)},append:function(t){var i=this.gridArr,r=this.gridArrPrepend;e.each(t,function(e,t){i.push(t),r.push(t)}),this._renderGrid("append",t,e(t).length),this._addLoadMore()},prepend:function(t){this.ifCallback=!1,this._renderGrid("prepend",t,e(t).length),this.ifCallback=!0}},e.fn.gridalicious=function(t,i){return"string"==typeof t?this.each(function(){var r=e.data(this,"gridalicious");r[t].apply(r,[i])}):this.each(function(){e.data(this,"gridalicious",new e.Gal(t,this))}),this}}(jQuery),function(){function e(e){return(e||"").split(" ")}function t(e,t,i){return s(e,t,i)}function i(e,t,i,r){return"number"!=typeof i&&"string"!=typeof i||null!=r||(r=i,i=void 0),s(e,t,i,{timezone:r})}function r(e,t,i){return s(e,t,i,{utc:!0})}function n(e){return function(i,r,n){return t(i,r,e,n)}}function s(e,t,i,r){r=r||{},t&&!a(t)&&(i=t,t=void 0),t=t||new Date,(i=i||d).formats=i.formats||{};var n=t.getTime(),h=r.timezone,f=typeof h;if((r.utc||"number"==f||"string"==f)&&(t=o(t)),h){if("string"==f){var m="-"==h[0]?-1:1,g=parseInt(h.slice(1,3),10),y=parseInt(h.slice(3,5),10);h=m*(60*g+y)}f&&(t=new Date(t.getTime()+6e4*h))}return e.replace(/%([-_0]?.)/g,function(e,o){var a,d;if(2==o.length){if("-"==(a=o[0]))d="";else if("_"==a)d=" ";else{if("0"!=a)return e;d="0"}o=o[1]}switch(o){case"A":return i.days[t.getDay()];case"a":return i.shortDays[t.getDay()];case"B":return i.months[t.getMonth()];case"b":case"h":return i.shortMonths[t.getMonth()];case"C":return l(Math.floor(t.getFullYear()/100),d);case"D":return s(i.formats.D||"%m/%d/%y",t,i);case"d":return l(t.getDate(),d);case"e":return l(t.getDate(),null==d?" ":d);case"F":return s(i.formats.F||"%Y-%m-%d",t,i);case"H":return l(t.getHours(),d);case"I":return l(c(t),d);case"j":var f=new Date(t.getFullYear(),0,1);return l(m=Math.ceil((t.getTime()-f.getTime())/864e5),3);case"k":return l(t.getHours(),null==d?" ":d);case"L":return l(Math.floor(n%1e3),3);case"l":return l(c(t),null==d?" ":d);case"M":return l(t.getMinutes(),d);case"m":return l(t.getMonth()+1,d);case"n":return"\n";case"o":return String(t.getDate())+u(t.getDate());case"P":return t.getHours()<12?i.am:i.pm;case"p":return t.getHours()<12?i.AM:i.PM;case"R":return s(i.formats.R||"%H:%M",t,i);case"r":return s(i.formats.r||"%I:%M:%S %p",t,i);case"S":return l(t.getSeconds(),d);case"s":return Math.floor(n/1e3);case"T":return s(i.formats.T||"%H:%M:%S",t,i);case"t":return"\t";case"U":return l(p(t,"sunday"),d);case"u":var m;return 0==(m=t.getDay())?7:m;case"v":return s(i.formats.v||"%e-%b-%Y",t,i);case"W":return l(p(t,"monday"),d);case"w":return t.getDay();case"Y":return t.getFullYear();case"y":return(f=String(t.getFullYear())).slice(f.length-2);case"Z":if(r.utc)return"GMT";var g=t.toString().match(/\(([\w\s]+)\)/);return g&&g[1]||"";case"z":if(r.utc)return"+0000";var y="number"==typeof h?h:-t.getTimezoneOffset();return(y<0?"-":"+")+l(Math.floor(Math.abs(y)/60))+l(Math.abs(y)%60);default:return o}})}function o(e){var t=6e4*(e.getTimezoneOffset()||0);return new Date(e.getTime()+t)}function a(e){var t=0,i=f.length;for(t=0;t12&&(t-=12),t}function u(e){var t=e%10,i=e%100;if(i>=11&&i<=13||0===t||t>=4)return"th";switch(t){case 1:return"st";case 2:return"nd";case 3:return"rd"}}function p(e,t){t=t||"sunday";var i=e.getDay();"monday"==t&&(0==i?i=6:i--);var r=new Date(e.getFullYear(),0,1),n=((e-r)/864e5+7-i)/7;return Math.floor(n)}var h;h="undefined"!=typeof module?module.exports=t:function(){return this||(0,eval)("this")}();var d={days:e("Sunday Monday Tuesday Wednesday Thursday Friday Saturday"),shortDays:e("Sun Mon Tue Wed Thu Fri Sat"),months:e("January February March April May June July August September October November December"),shortMonths:e("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec"),AM:"AM",PM:"PM",am:"am",pm:"pm"};h.strftime=t,h.strftimeTZ=t.strftimeTZ=i,h.strftimeUTC=t.strftimeUTC=r,h.localizedStrftime=t.localizedStrftime=n;var f=["getTime","getTimezoneOffset","getDay","getDate","getMonth","getFullYear","getYear","getHours","getMinutes","getSeconds"]}(),function(){var e,t=[].slice;e=function(){var e,i,r,n,s,o;return s=/(^|[\s\n]|)((?:https?|ftp):\/\/[\-A-Z0-9+\u0026\u2019@#\/%?=()~_|!:,.;]*[\-A-Z0-9+\u0026@#\/%=~()_|])/gi,(n=1<=arguments.length?t.call(arguments,0):[]).length>0?(r=n[0],i=function(){var t;for(e in t=[],r)o=r[e],"callback"!==e&&t.push(" "+e+"='"+o+"'");return t}().join(""),this.replace(s,function(e,t,n){return""+t+(("function"==typeof r.callback?r.callback(n):void 0)||""+n+"")})):this.replace(s,"$1$2")},String.prototype.autoLink=e}.call(this),Object.create||(Object.create=function(e,t){function i(){}if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("Object prototype may only be an Object: "+e);if(null===e)throw new Error("This browser's implementation of Object.create is a shim and doesn't support 'null' as the first argument.");if(void 0!==t)throw new Error("This browser's implementation of Object.create is a shim and doesn't support a second argument.");return i.prototype=e,new i}),function(e,t){"use strict";e.jQueryBridget=t(e,e.jQuery)}(window,function(e,t){"use strict";function i(i,s,a){function l(e,t,r){var n,s="$()."+i+'("'+t+'")';return e.each(function(e,l){var c=a.data(l,i);if(c){var u=c[t];if(u&&"_"!=t.charAt(0)){var p=u.apply(c,r);n=void 0===n?p:n}else o(s+" is not a valid method")}else o(i+" not initialized. Cannot call methods, i.e. "+s)}),void 0!==n?n:e}function c(e,t){e.each(function(e,r){var n=a.data(r,i);n?(n.option(t),n._init()):(n=new s(r,t),a.data(r,i,n))})}(a=a||t||e.jQuery)&&(s.prototype.option||(s.prototype.option=function(e){a.isPlainObject(e)&&(this.options=a.extend(!0,this.options,e))}),a.fn[i]=function(e){return"string"==typeof e?l(this,e,n.call(arguments,1)):(c(this,e),this)},r(a))}function r(e){!e||e&&e.bridget||(e.bridget=i)}var n=Array.prototype.slice,s=e.console,o=void 0===s?function(){}:function(e){s.error(e)};return r(t||e.jQuery),i}),function(e,t){"use strict";e.getWindowSize=t()}(window,function(){"use strict";function e(e){var t=parseFloat(e);return-1==e.indexOf("%")&&!isNaN(t)&&t}function t(){}function i(){for(var e={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},t=0;t
","undefined"!=typeof white_labeled&&null!==white_labeled||(e+=''),e})}}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST.source_form=function(){return this.Skim={access:function(e){var t;return"function"==typeof(t=this[e])&&(t=t.call(this)),!0===t?[this]:!1!==t&&null!=t&&("[object Array]"!==Object.prototype.toString.call(t)?[t]:0!==t.length&&t)},withContext:function(e,t){var i;return(e=function(e){var t;return(t=function(){}).prototype=e,new t}(e)).safe||(e.safe=this.safe||function(e){var t;return(null!=e?e.skimSafe:void 0)?e:((t=new String(null!=e?e:"")).skimSafe=!0,t)}),e.isArray=Array.isArray||function(e){return"[object Array]"==={}.toString.call(e)},e.flatten=i=function(e){var t,r,n,s;for(r=[],n=0,s=e.length;n\"]/.test(e)?e:this.safe((""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,"""))}),t.call(e)}},function(e){return null==e&&(e={}),Skim.withContext.call({},e,function(){var e,t,i;return e="",i={source:this.source,csrf:this.csrf,feed:this.feed,type:this.type,socialAccounts:this.socialAccounts,results:this.results,isLoading:this.isLoading},e+='
',this.feed&&(this.plan&&this.plan.get("feed_limit_exceeded?")||!this.feed.get("more_sources_allowed?"))?(e+='

Upgrade to add more sources

',this.plan.get("feed_limit_exceeded?")?(t=1===this.plan.get("max_feeds")?"1 feed":this.plan.get("max_feeds")+" feeds",e+="

Unfortunately, the ",e+=this.escape(this.feed.get("plan")),e+=" plan only allows ",e+=this.escape(t),e+=' and you have exceeded this limit.

Please upgrade your plan or delete the excessive feeds to add more sources.

'):(e+='

Unfortunately, the ',e+=this.escape(this.feed.get("plan")),e+=" plan only allows ",e+=this.escape(this.feed.get("max_sources")),e+=" sources per feed.

"),window.juicerWL||(e+=Juicer.Helpers.renderPartial("upgrade_plan",{feed:this.feed,mpevent:"source_form_upgrade_plan"})),e+="
"):e+=Juicer.Helpers.renderPartial("source_form/new",i),e+="
"})}}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST["sources/manual"]=function(){return this.Skim={access:function(e){var t;return"function"==typeof(t=this[e])&&(t=t.call(this)),!0===t?[this]:!1!==t&&null!=t&&("[object Array]"!==Object.prototype.toString.call(t)?[t]:0!==t.length&&t)},withContext:function(e,t){var i;return(e=function(e){var t;return(t=function(){}).prototype=e,new t}(e)).safe||(e.safe=this.safe||function(e){var t;return(null!=e?e.skimSafe:void 0)?e:((t=new String(null!=e?e:"")).skimSafe=!0,t)}),e.isArray=Array.isArray||function(e){return"[object Array]"==={}.toString.call(e)},e.flatten=i=function(e){var t,r,n,s;for(r=[],n=0,s=e.length;n\"]/.test(e)?e:this.safe((""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,"""))}),t.call(e)}},function(e){return null==e&&(e={}),Skim.withContext.call({},e,function(){var e;return e="",e+='

Add a Post Manually to ',e+=this.escape(this.source.displayName()),e+="

",this.feed.notSmall()||this.feed.isTrial()?(e+='',"LinkedIn"===this.source.source()&&(e+='

To receive the URL to your post click on the 3 dots menu in the top right of the post on LinkedIn and then "Copy link to post"

'),e+='
'):(e+='

Unfortunately, the ',e+=this.escape(this.feed.get("plan")),e+=" plan doesn't allow you to manually enter posts. Please upgrade!

", e+=Juicer.Helpers.renderPartial("upgrade_plan",{feed:this.feed,mpevent:"moderation_manual_add_upgrade"})),e+="
"})}}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST["sources/moderation"]=function(){return this.Skim={access:function(e){var t;return"function"==typeof(t=this[e])&&(t=t.call(this)),!0===t?[this]:!1!==t&&null!=t&&("[object Array]"!==Object.prototype.toString.call(t)?[t]:0!==t.length&&t)},withContext:function(e,t){var i;return(e=function(e){var t;return(t=function(){}).prototype=e,new t}(e)).safe||(e.safe=this.safe||function(e){var t;return(null!=e?e.skimSafe:void 0)?e:((t=new String(null!=e?e:"")).skimSafe=!0,t)}),e.isArray=Array.isArray||function(e){return"[object Array]"==={}.toString.call(e)},e.flatten=i=function(e){var t,r,n,s;for(r=[],n=0,s=e.length;n\"]/.test(e)?e:this.safe((""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,"""))}),t.call(e)}},function(e){return null==e&&(e={}),Skim.withContext.call({},e,function(){var e,t,i;return e="",e+='

These work the same way as the moderation and filtering for your whole feed, but just apply to this one sources posts. Read more about it here.

',i="list words, @usernames, or #hastags",t="Separate filters with a comma. Filters are case-insensitive.",e+='

Disallow posts with these words:

Only allow posts with these words:

',this.source.get("queue")?e+='':e+='',e+='
'})}}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST["sources/rename"]=function(){return this.Skim={access:function(e){var t;return"function"==typeof(t=this[e])&&(t=t.call(this)),!0===t?[this]:!1!==t&&null!=t&&("[object Array]"!==Object.prototype.toString.call(t)?[t]:0!==t.length&&t)},withContext:function(e,t){var i;return(e=function(e){var t;return(t=function(){}).prototype=e,new t}(e)).safe||(e.safe=this.safe||function(e){var t;return(null!=e?e.skimSafe:void 0)?e:((t=new String(null!=e?e:"")).skimSafe=!0,t)}),e.isArray=Array.isArray||function(e){return"[object Array]"==={}.toString.call(e)},e.flatten=i=function(e){var t,r,n,s;for(r=[],n=0,s=e.length;n\"]/.test(e)?e:this.safe((""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,"""))}),t.call(e)}},function(e){return null==e&&(e={}),Skim.withContext.call({},e,function(){var e;return e="",e+='

Edit ',e+=this.escape(this.source.displayName()),e+='\'s filter button

This will not show different posts but only change the label of the filter button above your feed. To display different posts through a new source, delete this source, and add a new one with your new hashtag or social account.

'})}}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST["sources/source_unavailable_for_small_plan"]=function(){return this.Skim={access:function(e){var t;return"function"==typeof(t=this[e])&&(t=t.call(this)),!0===t?[this]:!1!==t&&null!=t&&("[object Array]"!==Object.prototype.toString.call(t)?[t]:0!==t.length&&t)},withContext:function(e,t){var i;return(e=function(e){var t;return(t=function(){}).prototype=e,new t}(e)).safe||(e.safe=this.safe||function(e){var t;return(null!=e?e.skimSafe:void 0)?e:((t=new String(null!=e?e:"")).skimSafe=!0,t)}),e.isArray=Array.isArray||function(e){return"[object Array]"==={}.toString.call(e)},e.flatten=i=function(e){var t,r,n,s;for(r=[],n=0,s=e.length;n\"]/.test(e)?e:this.safe((""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,"""))}),t.call(e)}},function(e){return null==e&&(e={}),Skim.withContext.call({},e,function(){var e;return e="",e+='

Upgrade to add ',e+=this.escape(this.source),e+='

The Free plan doesn\'t allow adding ',e+=this.escape(this.source),e+=" sources after the end of the trial period.

",e+=Juicer.Helpers.renderPartial("upgrade_plan",{mpevent:"source_form_unavailable_provider"}),e+="
"})}}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST.widget=function(){return this.Skim={access:function(e){var t;return"function"==typeof(t=this[e])&&(t=t.call(this)),!0===t?[this]:!1!==t&&null!=t&&("[object Array]"!==Object.prototype.toString.call(t)?[t]:0!==t.length&&t)},withContext:function(e,t){var i;return(e=function(e){var t;return(t=function(){}).prototype=e,new t}(e)).safe||(e.safe=this.safe||function(e){var t;return(null!=e?e.skimSafe:void 0)?e:((t=new String(null!=e?e:"")).skimSafe=!0,t)}),e.isArray=Array.isArray||function(e){return"[object Array]"==={}.toString.call(e)},e.flatten=i=function(e){var t,r,n,s;for(r=[],n=0,s=e.length;n\"]/.test(e)?e:this.safe((""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,"""))}),t.call(e)}},function(e){return null==e&&(e={}),Skim.withContext.call({},e,function(){var e;return e="",e+='
',"v2"===this.model.get("embed_layout")?(e+='
    ',e+=Juicer.Helpers.renderPartial("widget_card",{post:this.first,isOnFeedsDashboard:this.isOnFeedsDashboard}),e+='
    ',e+=Juicer.Helpers.renderPartial("widget_card",{post:this.second,isOnFeedsDashboard:this.isOnFeedsDashboard}),e+="
"):(e+='
',e+=Juicer.Helpers.renderPartial("widget_card",{post:this.first,isOnFeedsDashboard:this.isOnFeedsDashboard}),e+='
',e+=Juicer.Helpers.renderPartial("widget_card",{post:this.second,isOnFeedsDashboard:this.isOnFeedsDashboard}),e+="
"),e+="
"})}}.call(this)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Models.AdReport=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.urlRoot=function(){return Juicer.Constants.API_ROOT+"/api/ad_reports"},i.prototype.save=function(e,t){return(t=null!=t?_u.clone(t):{}).xhrFields||(t.xhrFields={}),t.xhrFields.withCredentials=!1,i.__super__.save.call(this,e,t)},i}(JuicerBackbone.Model)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Models.Assignment=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.urlRoot="/api/assignments",i}(JuicerBackbone.Model)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Models.Click=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.urlRoot=function(){return Juicer.Constants.API_ROOT+"/api/clicks"},i.prototype.save=function(e,t){return(t=null!=t?_u.clone(t):{}).xhrFields||(t.xhrFields={}),t.xhrFields.withCredentials=!1,i.__super__.save.call(this,e,t)},i}(JuicerBackbone.Model)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Models.Enterprise=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.idAttribute="slug",i.prototype.urlRoot="/api/enterprise",i.prototype.page=1,i.prototype.fetch=function(e){return(e=null!=e?_u.clone(e):{}).data=null!=e.data?_u.extend(e.data,this.data()):this.data(),i.__super__.fetch.call(this,e)},i.prototype.parse=function(e,t){var r,n;return e.current_page>1&&e.feeds.length>0&&(r=_u.map(this.get("feeds").models,function(e){return e.attributes}),n=e.feeds,e.feeds=r.concat(n),e.new_feeds=n),i.__super__.parse.call(this,e,t)},i.prototype.data=function(){var e;return e={page:this.page},this.query&&(e.query=this.query),e},i.prototype.nextPage=function(){return this.page+=1},i.prototype.resetPage=function(){return this.page=1},i.prototype.moreFeeds=function(){return this.get("current_page")per Source per month
(with a minimum fee of US$"+Juicer.Constants.MINIMUM_ENTERPRISE_FEE_IN_DOLLARS+"/mo)":"per month
(with a minimum fee of US$"+Juicer.Constants.MINIMUM_ENTERPRISE_FEE_IN_DOLLARS+"/mo)"},i.prototype.sources=function(){return this.maxSources()?"20+":this.get("sources")},i.prototype.maxSources=function(){return this.get("sources")>20},i}(JuicerBackbone.Model)}.call(this),function(){var e=function(e,t){return function(){return e.apply(t,arguments)}},t=function(e,t){function r(){this.constructor=e}for(var n in t)i.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},i={}.hasOwnProperty;Juicer.Models.Feed=function(i){function r(){return this.fetchNewPosts=e(this.fetchNewPosts,this),this.poll=e(this.poll,this),this.startPolling=e(this.startPolling,this),r.__super__.constructor.apply(this,arguments)}return t(r,i),r.prototype.idAttribute="slug",r.prototype.urlRoot=function(){return Juicer.Constants.API_ROOT+"/api/feeds"},r.prototype.parse=function(e,t){return null!=this.get("css")&&delete e.css,r.__super__.parse.call(this,e,t)},r.prototype.sync=function(e,t,i){var n;return n=i.url,"read"!==e&&(i.url="/api/feeds/"+this.get("id")),n&&(n.match("fetch_all")||n.match("bulk_moderate"))&&(i.url=n),i.headers={"X-Juicer-Referrer":window.location.href},r.__super__.sync.call(this,e,t,i)},r.prototype.defaults={slug:"error"},r.prototype.manualSourceLimitReached=function(){return!!this.get("manual_source_limit")&&!this.get("more_sources_allowed?")},r.prototype.allowed=function(){return null!=this.get("allowed")?this.get("allowed"):""},r.prototype.disallowed=function(){return null!=this.get("disallowed")?this.get("disallowed"):""},r.prototype.moderation=function(){return!!(this.get("allowed")||this.get("disallowed")||this.get("profanity")||this.get("queue")||this.get("prevent_duplicates"))},r.prototype.entertainment=function(){return"entertainment"===this.get("css")},r.prototype.autoScroll=function(){return"autoscroll"===this.get("css")},r.prototype.widget=function(){return"widget"===this.get("css")},r.prototype.slider=function(){return"slider"===this.get("css")},r.prototype.livingWall=function(){return"living-wall"===this.get("css")},r.prototype.defaultHeight=function(){switch(this.get("css")){case"slider":return 300;case"widget":return 400;default:return null}},r.prototype.height=function(){return this.get("height")||this.defaultHeight()},r.prototype.defaultWidth=function(){return this.widget()?400:null},r.prototype.numberOfPostsPerOneAd=function(){switch(this.get("css")){case"slider":return this.get("columns");case"widget":return 3;default:return _u.min([10,this.per])}},r.prototype.initialize=function(e){return null==e&&(e={}),this.endingAt=e.endingAt,this.filter=e.filter,this.isOnFeedsDashboard=e.isOnFeedsDashboard,this.page=e.page,this.per=e.per,this.search=e.search,this.startingAt=e.startingAt,this.truncate=e.truncate,this.origin=e.origin,this.initial_data_filter=e.initial_data_filter,this.per=this.per||100,this.page=this.page||1,this.once("sync",this.startPolling)},r.prototype.startPolling=function(){if(this.shouldPoll())return this.poll()},r.prototype.shouldPoll=function(){return this.pollingAllowed()&&this.isGrid()},r.prototype.pollingAllowed=function(){return this.notSmall()&&!!this.get("poll")&&!!this.get("update_frequency")},r.prototype.poll=function(){return this.pollingStarted=!0,this.timeout=setTimeout(this.fetchNewPosts,this.pollInterval())},r.prototype.fetchNewPosts=function(e){var t,i;return null==e&&(e=!0),this.polling=!0,t=this.get("requested_at"),this.fetch({success:(i=this,function(){if(i.get("requested_at")!==t&&i.trigger("new-posts"),i.polling=!1,e)return i.poll()})})},r.prototype.pollInterval=function(){var e;return e=60*this.get("update_frequency")*1e3/this.divisor(),e=Math.floor(e),e=Math.max(e,15e3)},r.prototype.divisor=function(){var e;return(e=this.get("sources").length)<2&&(e=2),e>10&&(e=10),e},r.prototype.fetch=function(e){var t;return t=null!=(e=null!=e?_u.clone(e):{}).data?_u.extend(e.data,this.queryParams()):this.queryParams(),e.data=this.queryParamsToArray(t),e.xhrFields||(e.xhrFields={}),e.xhrFields.withCredentials=!1,e.beforeSend=function(e){return e.setRequestHeader("Cache-Control","no-cache")},r.__super__.fetch.call(this,e)},r.prototype.queryParams=function(){var e;return e={},this.per&&(e=_u.extend(e,{per:this.per})),this.endingAt&&(e=_u.extend(e,{ending_at:this.endingAt})),this.filter&&(e=_u.extend(e,{filter:this.filter})),this.initial_data_filter&&(e=_u.extend(e,{initial_data_filter:this.initial_data_filter})),this.origin&&(e=_u.extend(e,{origin:this.origin})),this.isOnFeedsDashboard&&(e=_u.extend(e,{is_on_feeds_dashboard:!0})),this.page&&!this.polling&&(e=_u.extend(e,{page:this.page})),this.search&&(e=_u.extend(e,{search:this.search})),this.startingAt&&(e=_u.extend(e,{starting_at:this.startingAt})),this.truncate&&(e=_u.extend(e,{truncate:this.truncate})),this.pollingStarted&&(e=_u.extend(e,{poll_request:this.pollingStarted})),e},r.prototype.queryParamsToArray=function(e){return Object.keys(e).reduce(function(t,i){return t.concat({name:i,value:e[i]})},[]).sort(function(e,t){return e.name>t.name})},r.prototype.nextPage=function(){return this.page+=1,this},r.prototype.previousPage=function(){return this.page-=1,this},r.prototype.resetPage=function(){return this.page=1,this},r.prototype.nextSync=function(){var e;return(e=new Date(this.get("last_synced"))).setMinutes(e.getMinutes()+this.get("update_frequency")),e},r.prototype.paid=function(){return _u.contains(Juicer.Constants.PAID_PLANS,this.get("plan"))},r.prototype.showBlurredPosts=function(){return!this.paid()&&!this.isTrial()&&this.themeSupportsBlurredPosts()&&this.get("eligible_for_mini_lite?")},r.prototype.themeSupportsBlurredPosts=function(){return _u.contains(["modern","image-grid","widget"],this.get("css"))},r.prototype.hideBanner=function(){return this.paid()&&!this.onMiniLite()},r.prototype.onMiniLite=function(){return"mini_lite"===this.get("plan")},r.prototype.notSmall=function(){return"small"!==this.get("plan")},r.prototype.onSmallPlan=function(){return"small"===this.get("plan")},r.prototype.isTrial=function(){return this.get("trial?")},r.prototype.cssClass=function(){var e;return"widget"===(e=this.get("css")||"image-grid")&&(e="juicer-widget"),"autoscroll"===e&&(e="modern"),this.get("colored_icons")&&"classic"!==this.get("css")&&(e+=" colored-icons"),this.hoverImages()&&(e+=" hover-images"),e},r.prototype.isGrid=function(){return!_u.contains(["classic","dark","slider","widget","living-wall"],this.get("css"))},r.prototype.classic=function(){return"classic"===this.get("css")},r.prototype.hasInterval=function(){return _u.contains(["widget","slider","living-wall"],this.get("css"))},r.prototype.hasColumns=function(){return!_u.contains(["widget","classic"],this.get("css"))},r.prototype.hoverImages=function(){return _u.contains(["image-grid","slider","hip","night"],this.get("css"))},r.prototype.hasHeight=function(){return this.get("height")},r.prototype.termsByType=function(e){var t;return t=this.get("sources").where({source:e}),_u.map(t,function(e){return e.get("term")})},r.prototype.fetchAll=function(){var e;return e={url:this.url()+"/fetch_all",type:"POST"},(this.sync||JuicerBackbone.sync).call(this,null,this,e)},r.prototype.bulkModerate=function(e,t){var i,r,n;return null==e&&(e=!0),null==t&&(t=null),n="/api/feeds/"+this.get("slug")+"/bulk_moderate",i={},e&&(i.approve=!0),null!=t&&(i.filter=t),r={url:n,type:"POST",data:$.param(i)},(this.sync||JuicerBackbone.sync).call(this,null,this,r)},r.prototype.partial=function(){switch(this.get("css")||this.get("style")){case"modern":case"autoscroll":case"user":return"user";case"slider":case"image-grid":case"hip":return"image";case"classic":return"classic";case"living-wall":return"wall";case"polaroid":return"polaroid";case"night":return"night";default:return"standard"}},r.prototype.displayFilters=function(){return _u.contains(this.validFilters,this.get("display_filter"))&&!this.hasInterval()&&this.get("sources").length>1},r.prototype.validFilters=["Social Type","Social Account","Grouped Terms"],r.prototype.filterPartial=function(){var e,t;t=void 0;try{t=new URLSearchParams(window.location.search).get("display_filter_type")}catch(i){e=i,console.error(e),t=null}return t||(this.get("display_filter_type")?"new":"old")},r.prototype.filters=function(){var e;return(e=(e=function(){switch(this.get("display_filter")){case"Social Type":return this.accountTypes();case"Social Account":return this.get("sources").models;case"Grouped Terms":return this.uniqSources()}}.call(this)).slice(0)).unshift(this.allSource()),e},r.prototype.allSource=function(){return new Juicer.Models.Source({source:"All",id:this.initial_data_filter})},r.prototype.accountTypes=function(){var e,t;return e=[],t=[],_u.each(this.get("sources").models,function(i){if(!_u.contains(t,i.source()))return e.push(i),t.push(i.source())}),e},r.prototype.uniqSources=function(){var e,t;return e=[],t=[],_u.map(this.get("sources").models,function(i){if(!_u.contains(t,i.displayName()))return e.push(i),t.push(i.displayName())}),e},r.prototype.moderationStatus=function(){return this.moderation()?"ON":"OFF"},r.prototype.colors=["text","link","data","hover","post_background","feed_background"],r.prototype.customColors=function(){return _u.some(this.getColors())},r.prototype.getColor=function(e){return this.getCustomColor(e)||this.getDefaultColor(e)},r.prototype.getCustomColor=function(e){return this.getColors()[e+"_color"]},r.prototype.getColors=function(){return this.get("colors")},r.prototype.getDefaultColor=function(e){var t;return"cta_button"===e?"#4AB890":"cta_text"===e?"#fff":"hover"===e?"#F17E6F":"feed_background"===e?"#f9fafb":(t=this.customColorMap[e],(e=jQuery(t.selector).css(t.attribute))?Juicer.Helpers.rgb2hex(e):"#fff")},r.prototype.customColorMap={text:{label:"Text",selector:".juicer-feed .feed-item .j-message, .juicer-feed .feed-item .j-message p",attribute:"color"},link:{label:"Link",selector:".juicer-feed .is-not-youTube a, .is-not-youTube .j-poster h3",attribute:"color"},data:{label:"Metadata",description:"The color of metadata such as the post creation date, the number of likes, or the number of comments.",selector:".juicer-feed .is-not-youTube .j-meta a, .juicer-feed .is-not-youTube .j-meta a *, .is-not-youTube .j-poster .j-date",attribute:"color"},hover:{label:"Hover",selector:".juicer-feed .is-not-youTube a:hover",attribute:"color"},post_background:{label:"Post Background",selector:".juicer-feed li.feed-item",attribute:"background-color"},feed_background:{label:"Feed Background",selector:".juicer-feed",attribute:"background-color"},cta_button_color:{label:"Button Color",selector:".juicer-feed .cta-button",attribute:"background-color"},cta_text_color:{label:"Text Color",selector:".juicer-feed .cta-button",attribute:"color"}},r.prototype.customStyles=function(){var e,t;return e="",_u.each(this.colors,(t=this,function(i){var r,n;if(n=t.customColorMap[i],r=t.getCustomColor(i))return e+=n.selector+" { "+n.attribute+": "+r+" !important; }"})),this.get("custom_css")&&(e+=this.get("custom_css")),e},r.prototype.updateColor=function(e,t){var i,r,n;if((i=this.getColors())[r=e+"_color"]=t,this.set("colors",i),this.set(r,t),this.trigger("update:colors"),e.match(/cta_/))return n=this.customColorMap[e+"_color"],$(n.selector).css(n.attribute,t)},r.prototype.resetColors=function(){return _u.each(this.colors,(e=this,function(t){return e.set(t+"_color",null)}));var e},r.prototype.shouldShowGallery=function(){var e;return e=this.get("css")||this.get("style"),_u.contains(["modern","polaroid","image-grid","hip","night"],e)},r.prototype.relations=[{type:JuicerBackbone.Many,key:"posts",collectionType:"Juicer.Collections.Posts"},{type:JuicerBackbone.Many,key:"sources",relatedModel:"Juicer.Models.Source"},{type:JuicerBackbone.Many,key:"assignments",relatedModel:"Juicer.Models.Assignment"},{type:JuicerBackbone.Many,key:"social_accounts",collectionType:"Juicer.Collections.SocialAccounts"}],r.prototype.getLastSynced=function(){return $.get(this.urlRoot()+"/"+this.get("id")+"/last_synced_time",function(e){return e})},r}(JuicerBackbone.AssociatedModel)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Models.JuicerAd=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.defaults=function(){return{poster_name:"Juicer",poster_image:Juicer.Constants.BASE_URL+"/logo-without-text.svg",external_created_at:new Date}},i.prototype.ad=!0,i.prototype.toJSON=function(){return _u.clone(_u.omit(this.attributes,"feed"))},i.prototype.twitter=function(){return!1},i.prototype.hashtag=function(){return!1},i.prototype.instagram=function(){return!1},i.prototype.gallery=function(){return!1},i.prototype.poster=function(){return!0},i.prototype.stickied=function(){return!1},i.prototype.tumblr=function(){return!1},i.prototype.tumblrTitle=function(){return!1},i.prototype.sourceType=function(){return"Juicer"},i.prototype.postType=function(){return"image-post"},i.prototype.isVideo=function(){return!1},i.prototype.edited=function(){return!1},i.prototype.editClass=function(){return""},i.prototype.userId=function(){return 1},i.prototype.lowerType=function(){return"juicer"},i.prototype.term=function(){return"juicer"},i.prototype.link=function(){return"https://www.juicer.io/?"+this.utm_params()},i.prototype.utm_params=function(){return jQuery.param({utm_source:"JuicerFreeFeed",utm_medium:"feed_ads",utm_campaign:"ad"+this.imagePosition(),utm_content:"message"+this.messagePosition(),utm_term:window.location.href,utm_id:this.feed_slug(),referrer:window.location.hostname})},i.prototype.feed_slug=function(){return this.get("feed")?this.get("feed").get("slug"):""},i.prototype.blogPost=function(){return!1},i.prototype.commentClass=function(){return""},i.prototype.likeClass=function(){return""},i.prototype.classes=function(){return"feed-item juicer image-post juicer-about"},i.prototype.alt=function(){return"Embed Social Media Feeds on your website with Juicer!"},i.prototype.message=function(){var e;return e=this.messages()[this.messagePosition()],window.juicerDashboard&&(e+=this.callToAction()),e},i.prototype.callToAction=function(){return"
Remove Juicer Branding
"},i.prototype.posterImage=function(){return this.get("poster_image")},i.prototype.messages=function(){return["Like this feed? Want one of your own? Visit Juicer.io to get your own free social media feed!","Juicer.io lets you easily create and embed social media feeds like this one on to your site for free!","Juicer.io lets you easily create and embed social media feeds like this one on to your site for free!","Engage your users on social media with a Juicer.io feed on your website or blog for free.","This feed is Powered by Juicer.io"]},i.prototype.randomImage=function(){return"https://static.juicer.io/about/juicer-about-"+this.imagePosition()+".svg"},i.prototype.image=function(){return this.randomImage()},i.prototype.leadingMedia=function(){return{url:this.image(),image:this.image()}},i.prototype.posterUrl=function(){return this.link()},i.prototype.imagePosition=function(){return this.randomImagePosition?this.randomImagePosition:(this.randomImagePosition=_u.random(1,12),this.randomImagePosition<10?this.randomImagePosition="0"+this.randomImagePosition:void 0)},i.prototype.messagePosition=function(){return this.randomMessagePosition?this.randomMessagePosition:this.randomMessagePosition=_u.random(1,4)},i.prototype.noMeta=function(){return!0},i}(JuicerBackbone.Model)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Models.Moderated=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.url=function(){return"/api/feeds/"+this.slug+"/moderated"},i.prototype.initialize=function(e){return this.revalidating=!0,this.slug=e.slug,this.starting_at=e.starting_at,this.once("sync",this.startPolling)},i.prototype.moderated=!0,i}(Juicer.Models.Feed)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Models.PageView=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.urlRoot=function(){return Juicer.Constants.API_ROOT+"/api/page_views"},i.prototype.save=function(e,t){return(t=null!=t?_u.clone(t):{}).xhrFields||(t.xhrFields={}),t.xhrFields.withCredentials=!1,i.__super__.save.call(this,e,t)},i}(JuicerBackbone.Model)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Models.Plan=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.urlRoot="/api/plan",i.prototype.downgradeDate=function(){var e;if(this.get("next_billing_date"))return e=new Date(this.get("next_billing_date")),strftime("%B %-d, %Y",e)},i.prototype.planCapital=function(){return this.planToDisplatName(this.get("plan"))},i.prototype.newPlanCapital=function(){return this.planToDisplatName(this.get("new_plan"))},i.prototype.planToDisplatName=function(e){return Juicer.Constants.PLAN_TO_DISPLAY_NAME[e]||this.capitalize(e)},i.prototype.newInterval=function(){return this.get("new_plan_yearly")?"year":"month"},i.prototype.capitalize=function(e){return"ad_free"===e?"Ad-Free":_u.titleize(e)},i}(JuicerBackbone.Model)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Models.Post=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.urlRoot="/api/posts",i.prototype.blurred=!1,i.prototype.restore=function(){return this.callSubUrl("/restore")},i.prototype.reject=function(){return this.callSubUrl("/reject")},i.prototype.blur=function(){return this.blurred=!0},i.prototype.stick=function(e){return this.callSubUrl("/stick",e)},i.prototype.unstick=function(e){return this.callSubUrl("/unstick",e)},i.prototype.hardDeletePost=function(e){var t;return t={url:this.url()+"?hard_delete=true",type:"DELETE"},_u.extend(t,e),(this.sync||JuicerBackbone.sync).call(this,null,this,t)},i.prototype.callSubUrl=function(e,t){var i;return null==t&&(t={}),i={url:e=this.url()+e,type:"POST"},_u.extend(i,t),(this.sync||JuicerBackbone.sync).call(this,null,this,i)},i.prototype.stickied=function(){return!!this.get("position")},i.prototype.ctaAdded=function(){return!!this.get("cta_added?")},i.prototype.edited=function(){return!!this.get("edit")},i.prototype.editClass=function(){return this.edited()?"j-edited":""},i.prototype.stickyClass=function(){return this.stickied()?"j-sticky":""},i.prototype.classes=function(){return"feed-item j-"+this.lowerType()+" j-"+this.lowerType()+"-bg "+this.postType()+" "+this.term()+" "+this.editClass()+" j-"+this.termType()+" "+this.stickyClass()+" "+("YouTube"!==this.sourceType()?"is-not-youTube":"")},i.prototype.sourceType=function(){return this.get("source").source()},i.prototype.blogPost=function(){return"Blog"===this.sourceType()},i.prototype.linkedin=function(){return"LinkedIn"===this.sourceType()},i.prototype.tiktok=function(){ return"TikTok"===this.sourceType()},i.prototype.twitter=function(){return"Twitter"===this.sourceType()},i.prototype.instagram=function(){return"Instagram"===this.sourceType()},i.prototype.tumblrTitle=function(){return"Tumblr"===this.sourceType()&&!!this.get("source").get("options")&&!!this.get("source").get("options").match("title")},i.prototype.gallery=function(){return!!this.get("media")&&this.get("media").length>1},i.prototype.leadingMedia=function(){return this.get("media")[0]},i.prototype.postType=function(){return this.gallery()?"video"===this.leadingMedia().type?"j-video j-gallery":"j-gallery":this.isVideo()?"j-video":this.get("image")?"image-post":"words"},i.prototype.isVideo=function(){return _u.contains(["youtube","vine","vimeo","soundcloud"],this.lowerType())||!!this.leadingMedia()&&"video"===this.leadingMedia().type},i.prototype.termType=function(){return this.get("source").termType()},i.prototype.hashtag=function(){return"hashtag"===this.termType()},i.prototype.term=function(){return this.get("source").get("term")},i.prototype.userId=function(){return this.term()},i.prototype.lowerType=function(){return this.get("source").lowerSource()},i.prototype.likes=function(){return this.pluralize(this.get("like_count"),"like")},i.prototype.comments=function(){return this.pluralize(this.get("comment_count"),"comment")},i.prototype.poster=function(){return this.get("poster_name")||this.get("poster_image")},i.prototype.posterImage=function(){return"facebook"===this.lowerType()&&"username"!==this.get("source").termType()?this.facebookPosterImage():this.get("poster_image")},i.prototype.facebookPosterImage=function(){var e,t,i,r;return this.get("source").fetchedFacebookPosterUrls[this.get("poster_id")]||(this.get("source").fetchedFacebookPosterUrls[this.get("poster_id")]=Juicer.Constants.BASE_URL+"/silhouette-avatar.jpg",i=(e=this.get("poster_image")).match("\\?")?"&":"?",t=e+i+"redirect=false",jQuery.getJSON(t,(r=this,function(e){var t;return t=e.data.url,r.get("source").fetchedFacebookPosterUrls[r.get("poster_id")]=t,jQuery("[data-poster-id='"+r.get("poster_id")+"']").attr("src",t)}))),this.get("source").fetchedFacebookPosterUrls[this.get("poster_id")]},i.prototype.pluralize=function(e,t){return 1===e?e+" "+t:e+" "+_u.pluralize(t)},i.prototype.link=function(){switch(this.lowerType()){case"facebook":return"reviews"===this.termType()?"https://www.facebook.com/"+this.term()+"/reviews":"group"===this.termType()||"username"===this.termType()?"https://www.facebook.com/"+this.term()+"/posts/"+this.get("external_id"):"https://www.facebook.com/"+this.get("poster_id")+"/posts/"+this.get("external_id");case"twitter":case"x-twitter":return"https://twitter.com/"+this.get("poster_name")+"/status/"+this.get("external_id");case"instagram":return this.get("full_url");case"youtube":return"https://www.youtube.com/watch?v="+this.get("external_id");case"googleplus":return this.get("poster_url")+"/posts/"+this.get("external_id");case"tumblr":return"https://"+this.get("poster_name")+".tumblr.com/post/"+this.get("external_id");case"pinterest":return"https://www.pinterest.com/pin/"+this.get("external_id");case"vimeo":return"https://vimeo.com/"+this.get("external_id");case"linkedin":return this.get("linkedin_external_id")?"https://www.linkedin.com/feed/update/urn:li:activity:"+this.get("linkedin_external_id")+"/":"https://www.linkedin.com/company/"+this.term();case"soundcloud":return this.get("description");case"slack":return this.get("poster_url");case"spotify":return"https://open.spotify.com/track/"+this.get("external_id");case"blog":return this.blogLink();case"giphy":case"google":return this.get("external");case"tiktok":return"https://tiktok.com/"+this.get("poster_display_name")+"/video/"+this.get("external_id");default:return this.get("external_id")}},i.prototype.blogLink=function(){return this.get("external")||this.get("external_id")},i.prototype.parseBlogUrl=function(){var e;if((e=this.term().match(/^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i))&&e[1])return e[1]},i.prototype.termLink=function(){switch(this.lowerType()){case"twitter":return"https://twitter.com/hashtag/"+this.term();case"instagram":return this.link();case"tumblr":return"https://tumblr.com/tagged/"+this.term();case"vine":return"https://vine.co/tags/"+this.term();case"facebook":return"https://www.facebook.com/hashtag/"+this.term();case"youtube":return"https://www.youtube.com/results?search_query=%23"+this.term();default:return this.get("external_id")}},i.prototype.commentClass=function(){switch(this.lowerType()){case"twitter":return"retweets";case"pinterest":return"repins";default:return"comments"}},i.prototype.likeClass=function(){switch(this.lowerType()){case"twitter":case"instagram":case"tumblr":return"heart";case"youtube":return"views";default:return"likes"}},i.prototype.likeVerb=function(){return"twitter"===this.lowerType()?"favorites":"likes"},i.prototype.alt=function(){return this.leadingMedia()&&this.leadingMedia().alt_text?this.leadingMedia().alt_text:"Photo from "+this.get("poster_name")+" on "+this.sourceType()+" at "+this.postedDate()},i.prototype.postedDate=function(){return Juicer.Helpers.fullDate(this.get("external_created_at"))},i.prototype.noMeta=function(){var e,t;return t=_u.includes(["Blog","YouTube"],this.sourceType()),e=this.get("comment_count")<=0&&this.get("like_count")<=0,t||e},i.prototype.encodedImage=function(){return encodeURIComponent(this.get("image"))},i.prototype.image=function(){if(this.get("media").length>0)return this.leadingMedia().image},i.prototype.message=function(){return this.blogPost()||this.tumblrTitle()?this.get("message")===this.get("description")?this.get("excerpt"):""+this.get("message")+" "+this.get("excerpt"):this.get("excerpt")?this.get("excerpt"):this.get("message")},i.prototype.fullMessage=function(){return this.blogPost()||this.tumblrTitle()?this.get("message")===this.get("description")?this.get("description"):""+this.get("message")+" "+this.get("description"):this.get("message")},i.prototype.stripped=function(){return null!=this.get("unformatted_message")?this.get("unformatted_message").replace(/<(?:.|\n)*?>/gm," ").replace(this.emojiRegex,""):""},i.prototype.emojiRegex=/([\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2694-\u2697]|\uD83E[\uDD10-\uDD5D])/g,i.prototype.status=function(){return encodeURIComponent(this.stripped())},i.prototype.twitterStatus=function(){var e;return this.stripped().length<=140?this.status():(e=this.stripped().substr(0,137)).substr(e.length-1).codePointAt(0)>255?encodeURIComponent(e.slice(0,-1)+"..."):encodeURIComponent(e+"...")},i.prototype.shouldIncludeLink=function(){return(this.twitterStatus()+this.currentUrl).length<=140},i.prototype.currentUrl=function(){return window.location.href},i.prototype.replyIntent=function(){return"https://twitter.com/intent/tweet?in_reply_to="+this.get("external_id")},i.prototype.retweetIntent=function(){return"https://twitter.com/intent/retweet?tweet_id="+this.get("external_id")},i.prototype.likeIntent=function(){return"https://twitter.com/intent/like?tweet_id="+this.get("external_id")},i.prototype.relations=[{type:JuicerBackbone.One,key:"source",relatedModel:"Juicer.Models.Source"}],i}(JuicerBackbone.AssociatedModel)}.call(this),function(){var e,t=function(e,t){function r(){this.constructor=e}for(var n in t)i.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},i={}.hasOwnProperty;e=["Facebook","Instagram","Pinterest","Tumblr","Twitter","YouTube","InstagramReels"],Juicer.Models.Source=function(i){function r(){return r.__super__.constructor.apply(this,arguments)}return t(r,i),r.prototype.urlRoot="/api/sources",r.prototype.toJSON=function(){return{source:_u.clone(this.attributes)}},r.prototype.source=function(){return this.get("source").startsWith("Twitter")||"X (Twitter)"===this.get("source")?"Twitter":this.get("source")},r.prototype.termType=function(){return this.get("term_type")},r.prototype.lowerSource=function(){return"Twitter"===this.source()?"x-twitter":this.source().toLowerCase()},r.prototype.allowed=function(){return null!=this.get("allowed")?this.get("allowed"):""},r.prototype.disallowed=function(){return null!=this.get("disallowed")?this.get("disallowed"):""},r.prototype.findProvider=function(){return"Instagram"!==this.source()&&"InstagramReels"!==this.source()||"hashtag"!==this.termType()?Juicer.Constants.SOURCE_TO_PROVIDER_MAP[this.source()]||this.source().toLowerCase():"facebook"},r.prototype.fetchedFacebookPosterUrls={},r.prototype.title=function(){switch(this.source()){case"Blog":return"Add an RSS feed";case"Facebook":return"Add a Facebook business page";case"Flickr":return"Add a Flickr user's photos";case"Giphy":return"Add a Giphy search term";case"Hashtag":return"Choose a type of hashtag";case"Instagram":return"Import Instagram user posts";case"LinkedIn":return"Add a LinkedIn company or school";case"Pinterest":return"Add a Pinterest user's pins";case"Slack":return"Add a Slack channel";case"Soundcloud":return"Add a Soundcloud account";case"Tumblr":return"Add a Tumblr blog";case"Twitter":return"Add a X (Twitter) account";case"Vimeo":return"Add a Vimeo user's videos";case"YouTube":return"Add a YouTube channel";case"TikTok":return"Add a TikTok user's videos"}},r.prototype.label=function(){switch(this.source()){case"Blog":return"RSS Feed URL: ";case"Facebook":return"https://www.facebook.com/";case"Flickr":return"https://www.flickr.com/photos/";case"Giphy":case"Slack":return"#";case"Instagram":return"https://www.instagram.com/";case"LinkedIn":return"https://www.linkedin.com/company/";case"Pinterest":return"https://www.pinterest.com/";case"Soundcloud":return"https://soundcloud.com/";case"Twitter":return"@";case"Vimeo":return"http://vimeo.com/";case"YouTube":return"https://www.youtube.com/user/";case"TikTok":return"https://www.tiktok.com/@"}},r.prototype.options=function(){var e,t,i,r,n,s,o;if(o=[],"Twitter"===this.source()){for(r=[],t=[],i=0,n=(e="hashtag"===this.get("term_type")?["retweets"]:["retweets","replies"]).length;i0&&o.push("including: "+r.join(", ")),t.length>0&&o.push("excluding: "+t.join(", "))}else"Instagram"===this.source()&&"reel"===this.get("post_type")?o.push("reels"):"Instagram"===this.source()&&"stories"===this.get("term_type")&&o.push("stories");return o},r.prototype.placeholder=function(){switch(this.source()){case"Blog":return"RSS_or_Atom_or_FeedBurner_URL";case"Facebook":return"Facebook_page_vanity_URL";case"Flickr":return"Flickr_username";case"Giphy":return"search_term";case"Instagram":return"Instagram_username";case"LinkedIn":return"company_OR_school_name";case"Pinterest":return"Pinterest_username";case"Slack":return"Slack_channel_name";case"Soundcloud":return"Soundcloud_username";case"Tumblr":return"Tumblr_username";case"Twitter":return"X (Twitter)_username";case"Vimeo":return"Vimeo_username";case"YouTube":return"YouTube_username_or_channel_ID"}},r.prototype.placeholderHashtag=function(){switch(this.source()){case"Twitter":return"X (Twitter)_hashtag";case"Pinterest":return"pinterest-username/board-name";case"YouTube":return"YouTube_hashtag";case"Tumblr":return"Tumblr_hashtag"}},r.prototype.typeSymbol=function(){return"hashtag"===this.get("term_type")?"#":"location"===this.get("term_type")?"\u25c9":"@"},r.prototype.displayTerm=function(){var e;return this.get("name")&&(e=this.get("name")),e||(e=this.get("term")),e},r.prototype.displayName=function(){return""+this.typeSymbol()+this.displayTerm()},r.prototype.displayNameWithOptions=function(){var e;return e=this.displayName(),"Instagram"===this.source()&&"reel"===this.get("post_type")?e+" (reels)":"Instagram"===this.source()&&"stories"===this.get("term_type")?e+" (stories)":e},r.prototype.hashtags=function(){return _u.contains(this.hashtagSupporters,this.source())},r.prototype.needsLogin=function(){return _u.contains(this.requiresLogin,this.source())},r.prototype.manual=function(){return _u.contains(Juicer.Constants.SOURCES_WHERE_POSTS_CAN_BE_ADDED_MANUALLY,this.source())},r.prototype.hashtagSupporters=e,r.prototype.requiresLogin=["Facebook","Instagram","InstagramReels","Slack","TikTok"],r.prototype.alternateNames=["location","group"],r.prototype.filterClass=function(e,t,i){var r,n,s;return null==t&&(t=null),null==i&&(i=!1),n=s="j-"+this.lowerSource().replace(/@|#/,""),i||(n+=" "+s+"-bg"),i&&(n+=" "+s+"-text "+s+"-hover j-social-icon"),this.all()&&(n="all j-social-icon"),r=n,"Grouped Terms"===e&&(r+=" grouped"),t&&(r+=" highlight"),r},r.prototype.all=function(){return"all"===this.lowerSource()},r.prototype.filter=function(e){if(this.all())return this.get("id");switch(e){case"Social Type":return this.source();case"Social Account":return this.get("id");case"Grouped Terms":return this.get("term")}},r.prototype.filterDisplay=function(e){if(this.all())return"All";switch(e){case"Social Type":return this.source();case"Social Account":return this.displayNameWithOptions();case"Grouped Terms":return this.displayName()}},r.prototype.youtubeChannelNameExample=function(){return{name:"mkbhd (Marques Brownlee)",link:"https://www.youtube.com/mkbhd",formattedLink:"https://www.youtube.com/mkbhd"}},r.prototype.usernameExample=function(){return this.usernameExamples[this.lowerSource()]},r.prototype.usernameHelpLink=function(){return this.usernameHelpLinks[this.lowerSource()]},r.prototype.usernameExamples={facebook:{name:"Netflix",link:"https://www.facebook.com/netflix",formattedLink:"https://www.facebook.com/netflix"},twitter:{name:"SpaceX",link:"https://twitter.com/spacex",formattedLink:"https://twitter.com/spacex"},instagram:{name:"Dwayne Johnson",link:"https://www.instagram.com/therock",formattedLink:"https://www.instagram.com/therock"},youtube:{name:"NASA",link:"https://www.youtube.com/@NASA",formattedLink:"https://www.youtube.com/@NASA"},tumblr:{name:"A Well Traveled Woman",link:"http://awelltraveledwoman.tumblr.com",formattedLink:"http://awelltraveledwoman.tumblr.com"},pinterest:{name:"The New Yorker",link:"https://www.pinterest.com/thenewyorker",formattedLink:"https://www.pinterest.com/thenewyorker"},blog:{name:"Wired",link:"https://www.wired.com/feed/rss",formattedLink:"https://www.wired.com/feed/rss"},soundcloud:{name:"Imagine Dragons",link:"https://soundcloud.com/imaginedragons",formattedLink:"https://soundcloud.com/imaginedragons"},linkedin:{name:"Harvard University",link:"https://www.linkedin.com/school/harvard-university",formattedLink:"https://www.linkedin.com/school/harvard-university"},flickr:{name:"NASA Johnson",link:"https://www.flickr.com/photos/nasa2explore",formattedLink:"https://www.flickr.com/photos/nasa2explore"},vimeo:{name:"The New Yorker",link:"https://vimeo.com/newyorker",formattedLink:"https://vimeo.com/newyorker"},tiktok:{name:"@pepsi",link:"https://www.tiktok.com/@pepsi",formattedLink:"https://www.tiktok.com/@pepsi"}},r.prototype.manualPostExamples={Facebook:"https://www.facebook.com/your-page/posts/4424595830956366",LinkedIn:"https://www.linkedin.com/posts/your-post-6805790914514816-iOSl",Twitter:"https://twitter.com/your-profile/status/14320590123109220999058",YouTube:"https://www.youtube.com/watch?v=Fasd9wbHWU_v8",Vimeo:"https://vimeo.com/4488123012127",Soundcloud:"https://soundcloud.com/profile-862007284/song",Tumblr:"https://you.tumblr.com/post/239123054282105"},r.prototype.usernameHelpLinks={linkedin:{link:"https://help.juicer.io/hc/en-us/articles/360040406391-LinkedIn-sources-Adding-troubleshooting-and-limitations",text:"LinkedIn - notes and troubleshooting"}},r}(JuicerBackbone.AssociatedModel)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Models.User=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.relations=[{type:JuicerBackbone.Many,key:"feeds",relatedModel:"Juicer.Models.Feed"}],i}(JuicerBackbone.AssociatedModel)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Models.FeedValidation=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.validation={name:{required:!0}},i}(JuicerBackbone.Model)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Models.UserSignupValidation=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.validation={email:{required:!0,pattern:"email"},password:{required:!0,minLength:8,validatePassword:!0}},i}(JuicerBackbone.Model)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Models.UserUpdateValidation=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.initialize=function(e){return this.email=e.email,this.noPassword=e.noPassword,this.passwordAlreadyUpdated=e.passwordAlreadyUpdated,this.signedUpWithSocialAccount=e.signedUpWithSocialAccount},i.prototype.validation={email:{required:function(){if(this.noPassword)return!1}},current_password:{required:function(){return!this.noPassword&&((!this.get("password")||"false"!==this.passwordAlreadyUpdated||"true"!==this.signedUpWithSocialAccount)&&this.email!==this.get("email"))},minLength:8},password:{minLength:8,required:function(){if(this.noPassword)return!1},validatePassword:function(){return!this.noPassword&&!!$("#user_password").val()}},current_password_two:{minLength:8,required:function(){return(!this.get("password")||"false"!==this.passwordAlreadyUpdated||"true"!==this.signedUpWithSocialAccount)&&!!$("#user_password").val()}},password_confirmation:{required:function(){return!this.noPassword&&(!!$("#user_password").val()&&"false"===this.passwordAlreadyUpdated&&"true"===this.signedUpWithSocialAccount)},fn:function(){if($("#user_password").val()!==$("#user_password_confirmation").val())return"Password confirmation does not match the password."}}},i}(JuicerBackbone.Model)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Models.UserValidation=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.validation={email:{required:!0,pattern:"email"},password:{required:!0,minLength:8}},i}(JuicerBackbone.Model)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Collections.FacebookResults=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.initialize=function(e){return this.type={username:"pages",reviews:"reviews"}[e.type]},i.prototype.url=function(){return"/api/facebook_results/"+this.type},i}(JuicerBackbone.Collection)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Collections.InstagramBusinessAccounts=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.url=function(){return"/api/instagram_business_accounts/"},i}(JuicerBackbone.Collection)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Collections.Posts=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.paginatingAttributes=["current_page","limit_value"],i.prototype.model=Juicer.Models.Post,i.prototype.parse=function(e){var t;return _u.each(this.paginatingAttributes,(t=this,function(i){return t[i]=e[i]})),i.__super__.parse.call(this,e.items)},i}(JuicerBackbone.Collection)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Collections.SocialAccounts=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.url="/api/social_accounts",i.prototype.socialAccountForSource=function(e){var t;return t=e.findProvider(),"Instagram"!==e.source()&&"InstagramReels"!==e.source()||"hashtag"!==e.termType()?this.findWhere({provider:t}):this.filter(function(e){return e.attributes.provider===t&&(void 0===e.attributes.instagramBusinessAccounts||0!==e.attributes.instagramBusinessAccounts.length)})[0]},i.prototype.socialAccount=function(e){return this.findWhere({provider:e})},i.prototype.findAllWithProvider=function(e){var t;return"instagramreels"===e&&(e="instagram_login"),t=function(t){return t.attributes.provider===e&&t.attributes.name},this.filter(t).sort(function(e,t){return e.attributes.name>t.attributes.name})},i}(JuicerBackbone.Collection)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Collections.Users=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.model=Juicer.Models.User,i.prototype.url="/api/users",i}(JuicerBackbone.Collection)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Views.AdminDowngrade=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.template=JST.admin_downgrade,i.prototype.initialize=function(e){return this.userId=e.userId,this.csrf=$('meta[name="csrf-token"]').attr("content")},i.prototype.events={click:"openOverlay"},i.prototype.openOverlay=function(e){var t;return e.preventDefault(),t=$(e.target).attr("href"),this.overlay=new Juicer.Views.Overlay({content:this.template({userId:this.userId,reasons:this.reasons,csrf:this.csrf,action:t}),element:"body",width:"50%"}),this.overlay.render()},i.prototype.reasons=["Temporary campaign/event is over","Switching to another service","Too expensive","Too difficult to use","They had technical issues","Not satisfied with the support team","Other"],i}(JuicerBackbone.View)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Views.AdminPasswordReset=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.template=JST.admin_password_reset,i.prototype.initialize=function(e){return this.userId=e.userId,this.csrf=$('meta[name="csrf-token"]').attr("content")},i.prototype.events={click:"openOverlay"},i.prototype.openOverlay=function(e){var t;return e.preventDefault(),t=$(e.target).attr("href"),this.overlay=new Juicer.Views.Overlay({content:this.template({userId:this.userId,csrf:this.csrf,action:t}),element:"body",width:"50%"}),this.overlay.render()},i}(JuicerBackbone.View)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Views.AdminUsers=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.events={"click .toggle-favorite":"toggleFavorite"},i.prototype.toggleFavorite=function(e){var t,i;return e.preventDefault(),i=(t=this.$(e.target)).data("id"),jQuery.get("/admin/users/"+i+"/favorite"),"\u2605"===t.html()?t.html("\u2606"):t.html("\u2605")},i}(JuicerBackbone.View)}.call(this),function(){var e=function(e,t){return function(){return e.apply(t,arguments)}},t=function(e,t){function r(){this.constructor=e}for(var n in t)i.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},i={}.hasOwnProperty;Juicer.Views.AutoScroll=function(i){function r(){return this.close=e(this.close,this),this.stopListening=e(this.stopListening,this),this.reEnalbeScrolling=e(this.reEnalbeScrolling,this),this.clearTimeouts=e(this.clearTimeouts,this),this.fetchNewPosts=e(this.fetchNewPosts,this),this.initiateFetchNewPosts=e(this.initiateFetchNewPosts,this),this.togglePlay=e(this.togglePlay,this),this.findStackWithFewestPosts=e(this.findStackWithFewestPosts,this),this.getTranslateY=e(this.getTranslateY,this),this.moveElementTo=e(this.moveElementTo,this),this.initiateScroll=e(this.initiateScroll,this),this.triageGrid=e(this.triageGrid,this),this.manageEmptySpace=e(this.manageEmptySpace,this),this.managePostsOutOfView=e(this.managePostsOutOfView,this),this.manageSpeed=e(this.manageSpeed,this),this.currentTranslateYPosition=e(this.currentTranslateYPosition,this),this.initiateSpeedManager=e(this.initiateSpeedManager,this),this.initiateTriageGrid=e(this.initiateTriageGrid,this),this.manageCanvas=e(this.manageCanvas,this),this.setupInfiniteScroll=e(this.setupInfiniteScroll,this),this.preventScroll=e(this.preventScroll,this),this.updateInterval=e(this.updateInterval,this),r.__super__.constructor.apply(this,arguments)}return t(r,i),r.prototype.card=JST["partials/_auto_scroll_card"],r.prototype.paddingSize=21,r.prototype.postStacks=[],r.prototype.postQueue=[],r.prototype.isPlaying=!0,r.prototype.scrollSpeed="slow",r.prototype.updateInterval=function(e){return this.scrollSpeed=e,this.manageSpeed(),this.model.set("auto_scroll_interval",e),this.model.save()},r.prototype.assignFreshPostStacks=function(){return this.postStacks=this.el.querySelectorAll("ul.j-stack"),this.postStacksContainer=this.el.querySelector(".j-stacker")},r.prototype.initialize=function(e){var t;return this.columns=e.columns,this.interval=e.interval,this.isOnFeedsDashboard=e.isOnFeedsDashboard,this.scrollSpeed=this.model.get("auto_scroll_interval"),this.initiateFetchNewPosts(),this.boundTogglePlay=(t=this,function(e){return t.togglePlay(e.detail.forced_action).bind(t)}),this.boundUpdateInterval=function(e){return function(t){return e.updateInterval(t.detail.interval)}}(this)},r.prototype.speedSettings=function(e){switch(e){case"slow":return[40,1];case"medium":return[20,2];case"fast":return[10,2];default:return null}},r.prototype.preventScroll=function(e){return e.preventDefault()},r.prototype.setupInfiniteScroll=function(){var e;return this.assignFreshPostStacks(),this.el.addEventListener("wheel",this.preventScroll,{passive:!0}),this.el.addEventListener("touchmove",this.preventScroll,{passive:!0}),this.el.addEventListener("togglePlay",this.boundTogglePlay),this.el.addEventListener("updateAutoScrollInterval",this.boundUpdateInterval),this.initiateScroll(),this.initiateTriageGrid(),this.initiateSpeedManager(),this.manageCanvas(),this.$(window).on("resize",(e=this,function(){return e.resizeWindowTimeoutId&&clearTimeout(e.resizeWindowTimeoutId),e.resizeWindowTimeoutId=setTimeout(function(){return e.close(),e.setupInfiniteScroll(),e.manageSpeed(!1)},400)})),this.$(window).on("blur",function(e){return function(){return e.pauseStack()}}(this)),this.$(window).on("focus",function(e){return function(){if(e.model.autoScroll())return e.playStack()}}(this))},r.prototype.manageCanvas=function(){var e,t,i,r,n;return(e=this.el.querySelector(".j-stacker-wrapper")).style.overflow="hidden",e.style.maxHeight="100vh",this.el.querySelector(".j-paginate").style.display="none",t=window.innerHeight,r=this.postStacks[0].querySelector("li.feed-item").clientHeight,i=Math.ceil(t/r)+3,this.postStacks.forEach((n=this,function(e){var t,r,s,o,a,l,c,u,p,h,d,f;if((t=e.querySelectorAll("li.feed-item").length)u;r=c<=u?++s:--s)0===n.postQueue.length&&n.el.querySelectorAll("li.feed-item").forEach(function(e){var t;return(t=n.clonePost(e)).style.opacity=1,n.postQueue.push(t)}),d.push(e.appendChild(n.postQueue.shift()));return d}for(l=e.querySelectorAll("li.feed-item"),f=[],r=o=p=i,h=t;p<=h?o<=h:o>=h;r=p<=h?++o:--o)(a=l[r])?f.push(a.remove()):f.push(void 0);return f}))},r.prototype.initiateTriageGrid=function(){return this.triageGridTimeoutId&&clearTimeout(this.triageGridTimeoutId),this.triageGridTimeoutId=setTimeout((e=this,function(){return e.triageGrid()}),1e4);var e},r.prototype.initiateSpeedManager=function(){return this.speedManagerTimeoutId&&clearTimeout(this.speedManagerTimeoutId),this.speedManagerTimeoutId=setTimeout((e=this,function(){return e.manageSpeed(!0)}),5e3);var e},r.prototype.currentTranslateYPosition=function(){var e,t;return e=((t=window.getComputedStyle(this.postStacksContainer)).transform||t.webkitTransform||t.mozTransform).match(/^matrix\((.+)\)$/),parseFloat(e[1].split(", ")[5])},r.prototype.manageSpeed=function(e){if(null==e&&(e=!1),e&&this.initiateSpeedManager(),this.isPlaying)return this.postStacksContainer.style.transition="transform "+this.speedSettings(this.scrollSpeed)[0]+"s linear 0s",this.postStacksContainer.style.transform="translateY("+(this.currentTranslateYPosition()-800)+"px)"},r.prototype.playStack=function(){return this.isPlaying=!0,this.manageSpeed(!1)},r.prototype.managePostsOutOfView=function(){return this.postStacks.forEach((e=this,function(t){return t.querySelectorAll("li.feed-item").forEach(function(t){var i,r,n,s,o;if(i=e.el.getBoundingClientRect().top,o=t.getBoundingClientRect().bottom,s=t.closest("ul.j-stack"),ot.childNodes.length)return e=t}),e},r.prototype.clonePost=function(e){var t,i,r,n,s;for((i=document.createElement("li")).innerHTML=e.innerHTML,i.classList=e.classList,i.style.opacity=1,r=0,n=(s=e.attributes).length;rthis.triggerPoint&&!this.loaded)return this.loadDisqus()},i.prototype.loadDisqus=function(){var e;return this.loaded=!0,(e=document.createElement("script")).type="text/javascript",e.async=!0,e.src="//juicerio.disqus.com/embed.js",(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(e)},i.prototype.scrollPoint=function(){return this.$el.scrollTop()+this.$el.height()},i}(JuicerBackbone.View)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Views.DowngradeOverlay=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.template=JST.downgrade_overlay,i.prototype.initialize=function(){return!!this.$el.data("downgrade-at")&&(this.plan=this.$el.data("plan"),this.downgradeAt=this.$el.data("downgrade-at"),this.overlay=new Juicer.Views.Overlay({content:this.template({plan:this.plan,downgradeAt:this.downgradeAt}),element:this.el,width:"50%"}),this.overlay.render())},i.prototype.events={"click .delete":"closeOverlay"},i.prototype.closeOverlay=function(){return this.overlay.removeView()},i}(JuicerBackbone.View)}.call(this),function(){var e=function(e,t){return function(){return e.apply(t,arguments)}},t=function(e,t){function r(){this.constructor=e}for(var n in t)i.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},i={}.hasOwnProperty;Juicer.Views.Calculator=function(i){function r(){return this.updateValues=e(this.updateValues,this),this.render=e(this.render,this),r.__super__.constructor.apply(this,arguments)}return t(r,i),r.prototype.template=JST["enterprise/calculator"],r.prototype.initialize=function(){return this.model=new Juicer.Models.Estimate,this.model.on("change",this.updateValues),this.render()},r.prototype.render=function(){return this.$el.html(this.template({model:this.model}))},r.prototype.updateValues=function(){return this.$(".calculator-sources").html(this.model.sources()),this.$(".calculator-frequency").html(this.model.frequencyInWords()),this.$(".calculator-price").html(this.model.priceString()),this.$(".calculator-price-label").html(this.model.priceLabel())},r.prototype.events={"change input":"updateModel","input input":"updateModel"},r.prototype.updateModel=function(e){var t;return t=$(e.target),this.model.set(t.data("attribute"),t.val())},r}(JuicerBackbone.View)}.call(this),function(){var e=function(e,t){return function(){return e.apply(t,arguments)}},t=function(e,t){function r(){this.constructor=e}for(var n in t)i.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},i={}.hasOwnProperty;Juicer.Views.Enterprise=function(i){function r(){return this.close=e(this.close,this),this.append=e(this.append,this),this.afterRender=e(this.afterRender,this),this.render=e(this.render,this),r.__super__.constructor.apply(this,arguments)}return t(r,i),r.prototype.template=JST["enterprise/show"],r.prototype.initialize=function(e){return this.on("render",this.afterRender),this.model=new Juicer.Models.Enterprise({slug:e.slug}),this.model.on("sync",this.render),this.model.fetch({error:function(){return alert("Something went wrong. Please try again.")}})},r.prototype.render=function(){return this.model.get("current_page")>1&&this.model.get("new_feeds")?this.append():(this.$el.html(this.template({model:this.model})),this.renderFeeds(this.model.get("feeds"))),this.trigger("render")},r.prototype.afterRender=function(){var e,t;if(this.focusedInput)return t=(e=$("#js-enterprise-search")).val(),e.focus().val("").val(t)},r.prototype.renderFeeds=function(e){return this.feeds=new Juicer.Views.EnterpriseFeeds({el:"ul.feeds",collection:e,model:this.model}).render(),this.feeds.on("removeFocus",(t=this,function(){return t.focusedInput=!1}));var t},r.prototype.append=function(){return this.feeds.append()},r.prototype.events={"input input[type=search]":_u.debounce(function(e){return this.search(e)},500),"search input[type=search]":"search"},r.prototype.search=function(e){return this.model.resetPage(),this.focusedInput=!0,e.preventDefault(),this.model.query=$(e.target).val(),this.model.get("feeds"),this.model.fetch()},r.prototype.close=function(){return this.model.off("sync"),this.feeds.close()},r}(JuicerBackbone.View),Juicer.Views.EnterpriseFeeds=function(i){function r(){return this.close=e(this.close,this),this.loadNextPage=e(this.loadNextPage,this),r.__super__.constructor.apply(this,arguments)}return t(r,i),r.prototype.render=function(){return this.addToSubViews(this.collection.models),this.model.moreFeeds()&&this.addLoadMore(),this.$el.html(this.subviews),this},r.prototype.addToSubViews=function(e){return this.subviews||(this.subviews=[]),_u.each(e,(t=this,function(e){var i;return i=new Juicer.Views.EnterpriseFeed({model:e,account:t.model}).render(),t.subviews.push(i.el)}));var t},r.prototype.addLoadMore=function(){var e;return this.loadMore=new Juicer.Views.EnterpriseLoadMore,this.loadMore.on("next:page:clicked",this.loadNextPage),this.loadMore.on("removeFocus",(e=this,function(){return e.trigger("removeFocus")})),this.loadMore.render(),this.subviews.push(this.loadMore.el)},r.prototype.removeLoadMore=function(){var e;return this.loadMore.off("next:page:clicked"),e=this.subviews.indexOf(this.loadMore.el),this.subviews.splice(e,1),this.loadMore.remove(),e},r.prototype.loadNextPage=function(){return this.model.nextPage(),this.model.fetch()},r.prototype.append=function(){var e;return e=this.removeLoadMore(),this.addToSubViews(this.model.get("new_feeds").models),this.model.moreFeeds()&&this.addLoadMore(),this.$el.append(this.subviews.slice(e))},r.prototype.close=function(){return _u.each(this.subviews,function(e){return e.remove()}),this.loadMore&&this.loadMore.off("next:page:clicked"),this.$el.empty().off(),this.stopListening(),this},r}(JuicerBackbone.View),Juicer.Views.EnterpriseFeed=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return t(i,e),i.prototype.template=JST["enterprise/feed"],i.prototype.createAssignmentForm=JST["enterprise/create_assignment_form"],i.prototype.tagName="li",i.prototype.className="border bg-white p-25 relative mb-20 tal",i.prototype.initialize=function(e){return this.account=e.account},i.prototype.render=function(){return this.$el.html(this.template({model:this.model,assignments:this.model.get("assignments").models,sources:this.model.get("sources").models,account:this.account})),this},i.prototype.events={"click .delete-dashboard-assignment":"deleteAssignment","click .add-assignment":"openAssignmentForm","click .fetch-all":"fetchAllPosts","submit .new-assignment":"createAssignment"},i.prototype.deleteAssignment=function(e){var t;if(e.preventDefault(),t=$(e.target).parents(".enterprise-user-dashboard-assignment"),Juicer.Helpers.confirm("Are you sure you want to remove this user from this feed?"))return new Juicer.Models.Assignment({id:$(e.target).data("id")}).destroy({success:function(){return t.remove()},error:function(e,t){return 422===t.status?alert(t.responseJSON.errors):alert("Something went wrong!")}})},i.prototype.openAssignmentForm=function(){return new Juicer.Views.Overlay({content:this.createAssignmentForm({model:this.model,csrf:this.csrf,account:this.account}),width:"35%",element:this.el}).render()},i.prototype.createAssignment=function(e){var t,i;return e.preventDefault(),!!(t=$(e.target).serializeHash()).email&&(this.assignment=new Juicer.Models.Assignment(t),this.assignment.save(null,{success:(i=this,function(){return i.model.get("assignments").add(i.assignment),i.render()}),error:function(e,t){return 422===t.status?alert(t.responseJSON.errors.base.join()):alert("Something went wrong!")}}))},i.prototype.fetchAllPosts=function(e){return!!Juicer.Helpers.confirm("Fetching all posts for this feed can take 10+ minutes. Please be patient and check back later.")&&(e.preventDefault(),this.model.fetchAll(),$(e.target).replaceWith("Fetching all posts."))},i.prototype.close=function(){return this.$el.remove()},i}(JuicerBackbone.View),Juicer.Views.EnterpriseLoadMore=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return t(i,e),i.prototype.tagName="a",i.prototype.className="load-more j-button mt-30",i.prototype.render=function(){return this.$el.text("Load More Feeds"),this},i.prototype.events={click:"triggerClick"},i.prototype.triggerClick=function(){return this.trigger("removeFocus"),this.trigger("next:page:clicked")},i}(JuicerBackbone.View)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Views.EnterpriseAdmin=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.template=JST["enterprise/admin"],i.prototype.tagName="li",i.prototype.className="enterprise-user",i.prototype.initialize=function(e){return this.account=e.account,this.index=e.index},i.prototype.render=function(){return this.$el.html(this.template({model:this.model,account:this.account,index:this.index}))},i}(JuicerBackbone.View)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Views.EnterpriseUser=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.template=JST["enterprise/user"],i.prototype.tagName="li",i.prototype.className="bg-white border mb-25",i.prototype.initialize=function(e){return this.account=e.account},i.prototype.render=function(){return this.$el.html(this.template({model:this.model,account:this.account}))},i.prototype.events={"click .delete-assignment":"deleteAssignment"},i.prototype.deleteAssignment=function(e){var t;if(e.preventDefault(),t=$(e.target).parents(".enterprise-user-assignment"),Juicer.Helpers.confirm("Are you sure you want to remove this user from this feed?"))return new Juicer.Models.Assignment({id:$(e.target).data("id")}).destroy({success:function(){return t.remove()},error:function(){return alert("Something went wrong!")}})},i}(JuicerBackbone.View)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Views.EnterpriseUsers=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.template=JST["enterprise/users"],i.prototype.inviteAdminForm=JST["enterprise/invite_admin"],i.prototype.initialize=function(e){return this.model=new Juicer.Models.EnterpriseUsers({slug:e.slug}),this.model.fetch({success:(t=this,function(){return t.render()}),error:function(){return alert("uh oh something went wrong")}});var t},i.prototype.render=function(){return this.$el.html(this.template({model:this.model})),this.renderAdmins(),this.renderUsers()},i.prototype.renderAdmins=function(){var e,t;return e=[],_u.each(this.model.get("admins").models,(t=this,function(i,r){return e.push(new Juicer.Views.EnterpriseAdmin({model:i,account:t.model,index:r}).render())})),this.$(".enterprise-admins").html(e)},i.prototype.renderUsers=function(){var e,t;return e=_u.map(this.model.get("users").models,(t=this,function(e){return new Juicer.Views.EnterpriseUser({model:e,account:t.model}).render()})),this.$(".enterprise-users").html(e)},i.prototype.events={"click a.new-enterprise-admin":"openNewAdminOverlay"},i.prototype.openNewAdminOverlay=function(e){return e.preventDefault(),this.csrf=$('meta[name="csrf-token"]').attr("content"),new Juicer.Views.Overlay({content:this.inviteAdminForm({model:this.model,csrf:this.csrf}),width:"35%"}).render()},i}(JuicerBackbone.View)}.call(this),function(){var e=function(e,t){return function(){return e.apply(t,arguments)}},t=function(e,t){function r(){this.constructor=e}for(var n in t)i.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},i={}.hasOwnProperty;Juicer.Views.Entertainment=function(i){function r(){return this.setPostSizes=e(this.setPostSizes,this),this.setPosts=e(this.setPosts,this),r.__super__.constructor.apply(this,arguments)}return t(r,i),r.prototype.template=JST.entertainment,r.prototype.card=JST["partials/_widget_card"],r.prototype.customCss=JST["partials/_custom_styles"],r.prototype.initialize=function(e){return this.interval=e.interval,this.isOnFeedsDashboard=e.isOnFeedsDashboard,this.setPosts(),this.setPostSizes(),this.render()},r.prototype.setPosts=function(){return this.posts=this.model.get("posts").models.slice(0,9)},r.prototype.setPostSizes=function(){return this.largePosts=this.posts.filter(function(e){return e.get("edit")}),this.smallPosts=this.posts-this.largePosts},r.prototype.render=function(){return this.$el.append(this.template({model:this.model,largePosts:this.largePosts,smallPosts:this.smallPosts,chunks:this.chunkArray(this.posts,3),posts:this.posts,feed:this.model,isOnFeedsDashboard:this.isOnFeedsDashboard})),this.container=this.$(".entertainment-container"),this.handleBrokenImages(),this.$el.append(this.customCss({feed:this.model}))},r.prototype.handleBrokenImages=function(){return new Juicer.Views.BrokenImage({el:this.el,feed:this.model})},r.prototype.chunkArray=function(e,t){var i,r,n,s;for(n=0,i=e.length,s=[];n=0&&i}catch(e){t=e,console.error(t),i=null}return e.filter&&(e.initial_data_filter=e.filter),e.slug=e.feedId,e.css=i||e.style,e.per||(e.per=100),e.page||(e.page=1),null!=e.overlay&&(e.overlay=!!e.overlay),e},r.prototype.newModel=function(){var e;return e=["origin","slug","per","page","filter","startingAt","endingAt","search","css","truncate","initial_data_filter"],new Juicer.Models.Feed(_u.pick(this.userOptions,e))},r.prototype.events=function(){return{"click li.feed-item":"triggerEvent","click ul.j-filters li":"filterFeed","click ul.j-display-filters li":"filterFeed","click .j-paginate":"appendNextPage","keyup li.feed-item":"triggerEventByKeyboard"}},r.prototype.render=function(){var e;return null!=this.model.get("posts")?this.renderFeed():this.model.fetch({success:(e=this,function(){return e.renderFeed()}),error:function(){return console.log("Juicer Problem")}}),this},r.prototype.renderFeed=function(){if(!this.rewriteFeedTag())return document.body.addEventListener("jcr.rerenderfeed",this.reRenderFeedAfterEvent),this.hideLoader(),this.setUserOptionsFromModel(),this.model.showBlurredPosts()&&this.addBlurredPosts(),this.model.paid()||this.model.isTrial()||this.adsAdded||this.addJuicerAds(),this.setDimensions(),this.determineBrowser(),this.model.widget()?this.renderWidget():this.model.slider()?this.renderSlider():this.model.livingWall()?this.renderLivingWall():this.model.entertainment()?this.renderEntertainment():this.model.autoScroll()?this.renderAutoScroll():this.renderFeedList(),this.setupAccessibilityAttributes(),this.setClass(),this.userOptions.overlay&&this.$el.addClass("j-overlay-enabled"),this.model.hasInterval()||this.handleBrokenImages(),this.$el.addClass("loaded"),this.shouldTrackAnalytics()&&this.trackPageView(),this.runAfter("load"),this.dispatchFeedEvent("feedLoaded"),this.sendFeedDimensions(),window.juicerDashboard&&this.addJuicerAlerts(),this},r.prototype.rewriteFeedTag=function(){var e,t;return t=function(e,t){var i;return e.wrap("<"+t+">"),i=e.parent(),jQuery.each(e.prop("attributes"),function(){return i.attr(this.name,this.value)}),e.contents().unwrap(),i},!!(e="v1"===this.model.get("embed_layout")&&this.$el.is("div")?"ul":"v2"===this.model.get("embed_layout")&&this.$el.is("ul")?"div":void 0)&&(this.$el=t(this.$el,e),this.$el.empty(),new Juicer.Views.Feed({el:this.$el.get()}).render(),!0)},r.prototype.setUserOptionsFromModel=function(){var e;return _u.each(this.modelAttrs,(e=this,function(t){if(null==e.userOptions[t]&&0!==e.userOptions[t])return e.userOptions[t]=e.model.get(t)})),null==this.userOptions.gutter&&(this.userOptions.gutter=this.defaultGutter()),this.userOptions},r.prototype.modelAttrs=["columns","interval","overlay"],r.prototype.defaultGutter=function(){return this.noGutter()?0:20},r.prototype.noGutter=function(){return _u.contains(["image-grid","hip","living-wall"],this.model.get("css"))},r.prototype.determineBrowser=function(){var e,t;return e=navigator.userAgent.match(/MSIE|Trident|Edge/)?"j-ie":"j-modern",t=navigator.userAgent.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i)?"j-mobile":"j-desktop",this.$el.addClass(e).addClass(t)},r.prototype.runAfter=function(e){if(null==e&&(e="load"),void 0!==this.userOptions.after)return window.runJuicerAfterCallback(e,this.userOptions.after)},r.prototype.dispatchFeedEvent=function(e){return document.dispatchEvent(new CustomEvent("juicer:"+e,{detail:{feed:{id:this.model.get("id"),name:this.model.get("name"),slug:this.model.get("slug")}}}))},r.prototype.sendFeedDimensions=function(e){var t,i;return null==e&&(e=75),t={width:document.body.scrollWidth,height:document.body.scrollHeight},window.parent.postMessage({type:"juicer:feedSize",dimensions:t},"*"),e>50?setTimeout((i=this,function(){return i.sendFeedDimensions(e-1)}),200):e>=1?setTimeout(function(t){return function(){return t.sendFeedDimensions(e-1)}}(this),500):void 0},r.prototype.showLoader=function(e,t){return null==e&&(e=!1),null==t&&(t=!1),this.$el.append(this.loading({container:e,wrapper:t}))},r.prototype.hideLoader=function(){return this.$(".j-loading-container, .j-loading-wrapper, .j-loading").remove()},r.prototype.renderEntertainment=function(){return this.entertainment=new Juicer.Views.Entertainment(this.feedOptions())},r.prototype.renderAutoScroll=function(){return this.autoScroll=new Juicer.Views.AutoScroll(this.feedOptions()),this.renderFeedList()},r.prototype.renderWidget=function(){return this.widget=new Juicer.Views.Widget(this.feedOptions())},r.prototype.renderSlider=function(){return this.handleReferral(),this.slider=new Juicer.Views.Slider(this.feedOptions()).render(),this.slider.on("slide",(e=this,function(){return e.stopCurrentlyPlaying()}));var e},r.prototype.renderLivingWall=function(){var e,t;return t=this.feedOptions(),"v2"===this.model.get("embed_layout")&&(e=document.createElement("ul"),t.el=this.el.appendChild(e)),this.livingWall=new Juicer.Views.LivingWall(t).render(),this.handleReferral()},r.prototype.feedOptions=function(){return{columns:this.userOptions.columns,el:this.el,equal:this.userOptions.equal,gutter:this.userOptions.gutter,interval:this.userOptions.interval,isOnFeedsDashboard:this.isOnFeedsDashboard,visible:this.userOptions.visible,model:this.model}},r.prototype.renderFeedList=function(){return this.$el.append(this.template({isOnFeedsDashboard:this.isOnFeedsDashboard,feed:this.model,filter:this.currentFilter()})),this.handleReferral(),this.infiniteScroll=new Juicer.Views.InfiniteScroll({container:this.$el,isOnFeedsDashboard:this.isOnFeedsDashboard,model:this.model,pages:this.userOptions.pages,template:JST.infinite_scroll}),this.model.isGrid()&&this.setupGrid(),this.model.autoScroll()&&this.autoScroll.setupInfiniteScroll(),this.model.classic()&&this.setGutterOnClassic(),this.infiniteScroll.on("paginate",(e=this,function(){return e.runAfter("paginate"),e.dispatchFeedEvent("feedPaginated"),null!=e.lazyLoad&&e.lazyLoad.checkImages(),e.handleBrokenImages(),window.WCAGCompliance&&WCAGCompliance.addNewWindowLabels(e.$el),e.sendFeedDimensions()}));var e},r.prototype.setupAccessibilityAttributes=function(){if(this.$el.attr("aria-label","Social media posts"),this.$(".feed-item").attr("tabindex","0"),this.$(".feed-item").find("a, input, button, select").attr("tabindex","-1"),window.WCAGCompliance)return WCAGCompliance.addNewWindowLabels(this.$el)},r.prototype.handleBrokenImages=function(){return new Juicer.Views.BrokenImage({el:this.el,feed:this.model})},r.prototype.currentFilter=function(){return null!=this.model&&null!=this.model.filter?this.model.filter:this.userOptions.filter},r.prototype.setDimensions=function(){if(this.$el.removeAttr("style"),this.dimensions["max-width"]=this.$el.data("width")||this.model.get("width")||this.model.defaultHeight(),this.dimensions["max-height"]=this.$el.data("height")||this.model.get("height")||this.model.defaultWidth(),!this.model.slider())return this.$el.css(this.dimensions)},r.prototype.dimensions={"max-width":null,"max-height":null},r.prototype.addBlurredPosts=function(){var e;if((e=this.model.get("posts")).length>1)return _u.sample(e.toArray(),Math.max(1,Math.floor(.2*e.length))).forEach(function(e){return e.blur()})},r.prototype.addJuicerAds=function(){var e,t,i,r;return i=this.model.numberOfPostsPerOneAd(),e=this.model.get("posts").length+1,(t=Math.floor(e/i))>0&&_u(t).times((r=this,function(e){var t,n,s;return s=Math.floor(Math.random()*i),t=e*i+s,n=new Juicer.Models.JuicerAd({feed:r.model}),r.model.get("posts").add(n,{at:t})})),this.adsAdded=!0,this.adRemovalReported=!1,this.currentInterval=100,setTimeout(this.forceShowJuicerAds,this.currentInterval)},r.prototype.forceShowJuicerAds=function(){var e,t,i,r,n,s;return t=function(e){return e.style.setProperty("display","block","important"),e.style.setProperty("visibility","visible","important"),e.style.setProperty("opacity","1","important")},s=this,n=function(e){if(!window.juicerDashboard)return s.adRemovalReported?void 0:(new Juicer.Models.AdReport(_u.extend(e,{feed_id:s.model.get("id"),url:window.location.href})).save(),s.adRemovalReported=!0)},r=(i=jQuery("h1.referral")).find("a"),0!==i.length&&0!==r.length||(this.handleReferral(),n({reason:"powered_by_header_removed"})),(i.is(":hidden")||r.is(":hidden"))&&(t(i[0]),t(r[0]),n({reason:"powered_by_header_hidden"})),0===(e=jQuery(".juicer-about")).length&&n({reason:"ads_removed"}),e.each(function(){if(jQuery(this).is(":hidden"))return t(this),n({reason:"ads_hidden"})}),this.currentInterval*=2,setTimeout(this.forceShowJuicerAds,this.currentInterval)},r.prototype.addJuicerAlerts=function(){var e,t;if(this.model.get("show_trial_notifications")&&(t=this,e=this.model.isTrial()?"ends on "+this.model.get("trial_ends_at"):"ended",this.$(".feed-item.j-linkedin").each(function(){var i;return i="Your LinkedIn Power-Up "+e+": Upgrade to keep your feed active.",jQuery(this).append(t.postNotificationBanner({content:i,backgroundClass:"yellow"}))}),this.$(".feed-item.j-x-twitter").each(function(){var i;return i="Your X (Twitter) Power-Up "+e+": Upgrade to keep your feed active.",jQuery(this).append(t.postNotificationBanner({content:i,backgroundClass:"yellow"}))}),this.$(".feed-item.j-instagram.j-stories").each(function(){var i;return i="Your Instagram Stories Power-Up "+e+": Upgrade to keep your feed active.",jQuery(this).append(t.postNotificationBanner({content:i,backgroundClass:"yellow"}))}),this.model.get("free_hashtags_disabled")))return this.$(".feed-item.j-hashtag").not(".j-twitter").not(".j-linkedin").each(function(){var i;return i="Your Hashtag Power-Up "+e+": Upgrade to keep your feed active.",jQuery(this).append(t.postNotificationBanner({content:i,backgroundClass:"yellow"}))})},r.prototype.setupGrid=function(){var e,t,i;if((t=Math.floor(this.$el.outerWidth()/this.userOptions.columns))<(e=window.devicePixelRatio>2?225:200)&&(t=e),this.$el.gridalicious({animate:!0,selector:".feed-item",width:t,gutter:this.userOptions.gutter,columns:this.userOptions.columns,embedLayout:this.model.get("embed_layout"),animationOptions:{queue:!0,speed:100,duration:300,complete:(i=this,function(){return null==i.infiniteScroll||(i.infiniteScroll.shouldShowLoadMore()?void 0:i.infiniteScroll.removeLoadMore())})}}),this.model.get("lazy_load"))return this.lazyLoad=new Juicer.Views.LazyLoad({model:this.model,view:this})},r.prototype.setGutterOnClassic=function(){var e,t;return e="2%",null==this.userOptions.gutter&&(t=e),this.$(".feed-item").css("margin-bottom",t)},r.prototype.appendNextPage=function(e){ return null==e&&(e=null),e&&e.preventDefault(),this.$(".j-paginate").replaceWith(this.loading({inFeed:!0})),this.infiniteScroll.nextPage()},r.prototype.setClass=function(){if(this.$el.removeClass(Juicer.Constants.FEED_CLASSES.join(" ")),this.$el.removeClass(this.cssClasses),this.$el.addClass(this.model.cssClass()),this.model.slider()&&(this.$el.attr("role","region"),this.$el.attr("aria-label","Carousel")),this.model.get("photos"))return this.$el.addClass("photos-only")},r.prototype.cssClasses="photo photos-only juicer-widget gridalicious slick-initialized slick-slider modern ie colored-icons hover-images",r.prototype.handleReferral=function(){var e,t,i;if(t=this.model.get("ad_text"),e=this.model.get("ad_link"),i=this.$el.find("h1.referral"),this.model.hideBanner()||this.isOnFeedsDashboard||i.length>0?i.length>0&&(i.text().trim()!==t||i.find("a").attr("href")!==e)&&(i.remove(),this.$el.prepend(this.referral({feed:this.model}))):this.$el.prepend(this.referral({feed:this.model})),this.model.paid())return i.remove()},r.prototype.isCrawler=function(e){return Juicer.Constants.CRAVLER_USER_AGENTS.some(function(t){return-1!==e.toLowerCase().indexOf(t)})},r.prototype.trackPageView=function(){if(!this.isCrawler(navigator.userAgent)&&!this.tracked)return new Juicer.Models.PageView({feed_id:this.model.get("id")}).save(),this.tracked=!0},r.prototype.shouldTrackAnalytics=function(){return!window.juicerDashboard},r.prototype.triggerEvent=function(e){var t,i,r,n,s,o;if(o=jQuery(e.target),this.shouldTrackAnalytics()&&this.trackClick(o),o.parents('[data-blurred="true"]').length>0)return e.preventDefault(),void(this.isOnFeedsDashboard&&htmx.ajax("GET","/dashboard/lite_upgrade_modal?mpevent=lite_upgrade_modal_exposed_by_blurred_post_click",{target:"body",swap:"beforeend"}));if(o.hasClass("delete"))return e.preventDefault(),this.deletePost(o);if(o.hasClass("cta-button")){if((s=o.data("post-id"))&&this.shouldTrackAnalytics())return htmx.ajax("POST","/posts/"+s+"/cta/track")}else{if(o.hasClass("edit-cta"))return i=function(e,t){return t.xhr.response.length>0?jQuery("body").append(t.xhr.response):htmx.ajax("GET","/posts/"+o.parents("ul.actions").data("id")+"/cta/edit",{target:"body",swap:"beforeend"})},htmx.ajax("GET","/paywall?source=cta&feed_id="+this.model.get("id"),{target:"body",swap:"beforeend",handler:i});if(o.hasClass("sticky"))return e.preventDefault(),this.toggleSticky(o,"stick");if(o.hasClass("unstick"))return e.preventDefault(),this.toggleSticky(o,"un-stick");if(o.hasClass("edit"))return new Juicer.Views.PostEdit({id:o.parents("ul.actions").data("id"),model:this.model}).render();if(o.hasClass("copy-post-id"))return e.preventDefault(),Juicer.Views.Feed.copyPostId(e);if(o.hasClass("j-gallery-arrow"))return e.preventDefault(),new Juicer.Views.Gallery({target:o,el:this.el,model:this.model});if(o.hasClass("j-image")&&o.parents("li.j-video").length>0&&!this.model.get("video_overlay"))return e.preventDefault(),this.model.hasInterval()&&this.userOptions.overlay||o.parents("li.j-tiktok").length>0?(this.stopCurrentlyPlaying(),this.userOptions.overlay?this.openOverlay({target:o}):(r=o.parents(".feed-item").data("id"),n=this.model.get("posts").findWhere({id:r}),window.open(n.link(),"_blank"))):this.playVideo(o,o.parents("li.j-video"));if(o.parents(".j-twitter-intents").length>0)return e.preventDefault(),this.handleTwitterIntent(o);if(o.parents(".feed-item.j-twitter").length>0){if(!(o.is("a")||o.parents("a").length>0))return r=o.parents(".feed-item").data("id"),n=this.model.get("posts").findWhere({id:r}),window.open(n.link(),"_blank")}else{if(o.is("a")&&!o.hasClass("j-image")&&0===o.parents("li.j-video").length)return e.preventDefault(),window.open(o.attr("href"),"_blank");if(this.userOptions.overlay&&!o.hasClass(".feed-item.juicer")&&!o.parents(".feed-item.juicer").length>0&&!o.parents(".feed-item.j-twitter").length>0)return e.preventDefault(),this.stopCurrentlyPlaying(),this.openOverlay({target:o});if(o.is(".juicer-ad-cta")||o.parents(".juicer-ad-cta").length>0)return htmx.ajax("GET","/paywall?source=dashboard_ads&feed_id="+this.model.get("id"),{target:"body",swap:"beforeend",handler:i});if(o.is(".juicer-about")||o.parents(".juicer-about").length>0)return e.preventDefault(),t=o.is(".juicer-about")?o:o.parents(".juicer-about"),window.open(t.find("a").attr("href"),"_blank");if(!this.userOptions.overlay&&13===e.keyCode)return e.preventDefault(),r=(o.hasClass("feed-item")?o:o.parents(".feed-item")).data("id"),n=this.model.get("posts").findWhere({id:r}),window.open(n.link(),"_blank")}}},r.copyPostId=function(e){var t,i;return t=(i=jQuery(e.target)).parents("ul.actions").data("id"),navigator.clipboard.writeText(t),i.text("Copied!"),setTimeout(function(){return i.text("Copy Post ID")},2e3)},r.prototype.triggerEventByKeyboard=function(e){var t,i,r,n;if(13===e.keyCode)return(n=(r=jQuery(e.target)).hasClass("j-video")?r:r.parents("li.j-video")).length>0&&(t=n.find(".j-image")).length>0?((i=jQuery.Event(e)).target=t[0],i.currentTarget=t[0],void this.triggerEvent(i)):this.triggerEvent(e)},r.prototype.trackClick=function(e){return e=e.is("li.feed-item")?e:e.parents("li.feed-item"),new Juicer.Models.Click({feed_id:this.model.get("id"),post_id:e.data("id")}).save()},r.prototype.openOverlay=function(e){var t;return this.postOverlay=new Juicer.Views.PostOverlay({target:e.target,model:this.model,feedView:this}),this.postOverlay.on("render",(t=this,function(){return t.runAfter("overlay"),t.dispatchFeedEvent("overlayRendered")})),this.postOverlay.render()},r.prototype.deletePost=function(e){var t;return!!Juicer.Helpers.confirm("Are you sure you want to delete this post?")&&(e=e.parents("ul.actions"),t=new Juicer.Models.Post({id:e.data("id")}),e.parents(".feed-item").remove(),t.destroy())},r.prototype.toggleSticky=function(e,t){var i,r,n;return null==t&&(t="stick"),e=e.parents("ul.actions"),r=new Juicer.Models.Post({id:e.data("id")}),i={success:(n=this,function(e){return n.model.set(e,{parse:!0}),n.model.trigger("action")}),error:function(){return alert("Something went wrong.")}},"stick"===t?r.stick(i):r.unstick(i)},r.prototype.openPopupOnError=function(e,t){return this.hasVideoLoadingErrorOccurred?(this.hasVideoLoadingErrorOccurred=!1,window.open(e)):t>0?setTimeout((i=this,function(){return i.openPopupOnError(e,t-1)}),100):void 0;var i},r.prototype.playVideo=function(e,t,i){var r,n;return null==i&&(i={}),(e=e.is(".j-image")?e:e.parents(".j-image")).hasClass("playing")?this.stopVideoAndResumeJuicerSlider(e):(this.stopCurrentlyPlaying(),this.slider&&this.slider.stop(),e.addClass("playing"),e.find("img").remove(),0===(r=e.find("video")).length?e.append(this.embedVideo(e.data("external-id"),t,e.data("video-url"),i)):r[0].play(),setTimeout((n=this,function(){return n.openPopupOnError(jQuery(e).attr("href"),29)}),100),jQuery(e).find("video source").on("error",function(t){return function(){return t.hasVideoLoadingErrorOccurred=!0,t.stopVideoAndResumeJuicerSlider(e),console.log("broken video in feed, stopping playback and redirecting to target url")}}(this)),null!=this.slider?this.slider.$el.slick("slickPause"):void 0)},r.prototype.stopVideo=function(e){var t,i;return e.removeClass("playing"),null!=this.slider&&0!==this.userOptions.interval?(t="height:"+this.model.height()+"px",this.slider.$el.slick("slickPlay")):t="width:100%;display:block;",(i=e.find(".video-wrapper")).hasClass("j-no-remove")?i.find("video")[0].pause():(i.remove(),e.append(""))},r.prototype.stopVideoAndResumeJuicerSlider=function(e){if(this.stopVideo(e),this.slider&&0!==this.userOptions.interval)return this.slider.play()},r.prototype.embedVideo=function(e,t,i,r){var n,s;return null==i&&(i=null),null==r&&(r={}),"tumblr"===(n=t.data("source"))&&(i=this.parseTumblrVideo(t,i)),null!=this.slider&&(s=this.model.height()),JST["partials/video/_"+n+"_embed"]({id:e,video:i,height:s,overlay:r.overlay})},r.prototype.parseTumblrVideo=function(e,t){var i,r;return(i=jQuery(jQuery.parseHTML(t))).removeAttr("id class width height poster preload data-crt-video data-crt-options"),i.attr("src")&&(r=i.attr("src")+"&autoplay=1",i.attr("src",r)),window.setTimeout(function(){return e.find("video")[0].play()},500),i[0].outerHTML},r.prototype.stopCurrentlyPlaying=function(){return _u.each(this.$(".playing"),(e=this,function(t){return e.stopVideo(jQuery(t))}));var e},r.prototype.handleTwitterIntent=function(e){var t,i,r,n,s,o;return n=550,t=420,s=screen.height,o=screen.width,r=0,i=Math.round(o/2-n/2),s>t&&(r=Math.round(s/2-t/2)),window.open(e.attr("href"),"intent","scrollbars=yes,resizable=yes,toolbar=no,location=yes,width="+n+",height="+t+",top="+r+",left="+i)},r.prototype.filterFeed=function(e){var t,i;return e.preventDefault(),(t=jQuery(e.target)).attr("data-filter"),t.attr("class").replace("selected","").replace(" ",""),this.model.filter!==t.data("filter")&&(this.model.filter=t.data("filter"),this.filter=t.data("filter"),this.model.resetPage(),this.model.fetch({success:(i=this,function(){return i.$el.empty(),i.infiniteScroll&&i.infiniteScroll.close(),i.render(),i.delegateEvents()})}))},r.prototype.close=function(){return this.unbindChildren(),this.$el.removeClass("j-initialized"),this.model.off("new-posts"),this.model.off("showLoader"),this},r.prototype.unbindChildren=function(){return null!=this.widget&&this.widget.close(),null!=this.livingWall&&this.livingWall.close(),null!=this.infiniteScroll&&this.infiniteScroll.close(),null!=this.lazyLoad&&this.lazyLoad.close(),null!=this.slider&&this.slider.off("slide"),this.$el.empty().off(),document.body.removeEventListener("jcr.rerenderfeed",this.reRenderFeedAfterEvent),this.stopListening()},r.prototype.reRender=function(){return this.unbindChildren(),this.userOptions=_u.pick(this.$el.data(),this.permittedOptions),this.userOptions=this.setDefaultOptions(this.userOptions),this.render(),this.delegateEvents()},r.prototype.toggleAutoScroll=function(e){var t;return t=new CustomEvent("togglePlay",{detail:{forced_action:e}}),this.el.dispatchEvent(t)},r.prototype.updateAutoScrollInterval=function(e){var t;return t=new CustomEvent("updateAutoScrollInterval",{detail:{interval:e}}),this.el.dispatchEvent(t)},r.prototype.updateLastSyncedTime=function(){return this.model.getLastSynced().then((e=this,function(t){if(t)return e.model.set("last_synced",t.last_synced)}));var e},r}(JuicerBackbone.View)}.call(this),function(){var e=function(e,t){return function(){return e.apply(t,arguments)}},t=function(e,t){function r(){this.constructor=e}for(var n in t)i.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},i={}.hasOwnProperty;Juicer.Views.Design=function(i){function r(){return this.parseAndSaveCSS=e(this.parseAndSaveCSS,this),r.__super__.constructor.apply(this,arguments)}return t(r,i),r.prototype.template=JST["feeds/design"],r.prototype.colorPicker=JST["feeds/color_picker"],r.prototype.cssOverlay=JST["feeds/css_overlay"],r.prototype.title="Feed Design",r.prototype.events={"change #theme-selector":"updateStyle","input input.width":"updateDimensions","input input.height":"updateDimensions","input input.columns":"updateColumns","input input.interval":"updateInterval","click .feed-color":"showColorPicker","change .color-input":"updateColor","input .hex-input":"updateColor","click .save-style":"saveStyle","click .reset-style":"resetStyle","click .customize-css":"openCustomCssOverlay","submit .css-form":"submitCssForm","change input[type=checkbox]":"updateCheckbox","click #reload-feed":"reloadFeed","click #play-toggle":"togglePlay","change select#autoscroll-interval":"updateAutoScrollInterval"},r.prototype.showColorPicker=function(e){var t,i;return(i=$(e.target)).hasClass("feed-color")||(i=i.parents(".feed-color")),this.$(".color-fields").remove(),t=i.data("color"),i.after(this.colorPicker({color:this.feed.getColor(t),pattern:this.pattern,colorAttr:t}))},r.prototype.pattern="^#+([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$",r.prototype.render=function(){return r.__super__.render.apply(this,arguments),this.toggleSettings()},r.prototype.toggleSettings=function(){return this.toggleInterval(this.feed.hasInterval()),this.toggleColumns(this.feed.hasColumns())},r.prototype.toggleColumns=function(e){return this.$(".columns").toggle(e)},r.prototype.toggleInterval=function(e){return this.$(".interval").toggle(e)},r.prototype.saveAndRender=function(){return this.feed.trigger("showLoader"),this.feed.save(null,{success:(e=this,function(){return e.feed.trigger("action"),e.toggleSettings()}),error:function(){return alert("Something went wrong.")}});var e},r.prototype.updateCheckbox=function(e){var t,i;return i=(t=$(e.target)).is(":checked")?"1":"0",this.feed.set(t.data("attribute"),i),this.saveAndRender()},r.prototype.updateColor=function(e){var t,i,r,n;return!!(n=(r=$(e.target)).val()).match(this.pattern)&&(i=r.hasClass("hex-input")?".color-input":".hex-input",this.$(i).val(n),t=r.parents(".color-fields").data("color"),this.$(".color-example, .feed-color[data-color='"+t+"'] .color-picker-circle").css({backgroundColor:n}),this.updateModel(t,n))},r.prototype.updateStyle=function(e){var t;return t=$(e.target).val(),this.feed.set("css",t),this.saveAndRender(),this.autoScrollThemeCallbacks(t)},r.prototype.autoScrollThemeCallbacks=function(e){if(this.toggleAutoScrollThemeControls(),"autoscroll"===e&&!this.feed.get("autoscroll_theme_enabled?"))return this.paywallModal()},r.prototype.paywallModal=function(){var e;return e=function(e,t){if(t.xhr.response.length>0)return jQuery("body").append(t.xhr.response)},htmx.ajax("GET","/paywall?source=auto_scroll_theme&feed_id="+this.feed.get("id"),{target:"body",swap:"beforeend",handler:e})},r.prototype.updateDimensions=function(e){var t,i,r,n;if(n=(r=$(e.target)).val(),t=r.attr("class"),2<(i=n.length)&&i<5&&99/g,"\n"),e.html(this.template({embed:i,feed:this.feed}))},r.prototype.showWordPress=function(e){return e.html(this.wordpress({feed:this.feed}))},r.prototype.showIframe=function(e){var t,i,r;return t=this.feed.get("height")||1e3,r=this.feed.get("width")||1e3,1e3===t&&this.feed.slider()&&(t=300),i="",e.html(this.iframe({iframe:i,feed:this.feed}))},r.prototype.highlightField=function(e){var t;if(t!==$(e.target))return t=$(e.target),setTimeout(function(){return t.select()},50)},r}(Juicer.Views.SubView)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Views.Features=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.template=JST["feeds/features"],i}(Juicer.Views.SubViewSlide)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Views.Hub=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.template=JST["feeds/hub"],i}(Juicer.Views.SubViewSlide)}.call(this),function(){var e=function(e,t){return function(){return e.apply(t,arguments)}},t=function(e,t){function r(){this.constructor=e}for(var n in t)i.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},i={}.hasOwnProperty;Juicer.Views.Moderate=function(i){function r(){return this.pollForRevalidating=e(this.pollForRevalidating,this),this.revalidatingPoll=e(this.revalidatingPoll,this),this.closeOverlay=e(this.closeOverlay,this),r.__super__.constructor.apply(this,arguments)}return t(r,i),r.prototype.template=JST["feeds/moderate"],r.prototype.revalidateOverlay=JST["feeds/revalidate_overlay"],r.prototype.title="Moderate and Filter",r.prototype.initialize=function(){return r.__super__.initialize.apply(this,arguments),this.initialAttributes=_u.pick(this.feed.attributes,"lazy_load","css")},r.prototype.render=function(){return r.__super__.render.apply(this,arguments),this.toggleFilterBlocker()},r.prototype.events={"submit .filters":"openOverlay","click .moderate-confirm":"submitConfirmation","click .moderated":"viewModeratedPosts","click .public":"showPublic","change input#queue":"toggleAndSubmit"},r.prototype.showPublic=function(e){return this.fetchFeed(),$(".moderation-nav .active").removeClass("active"),$(e.target).addClass("active")},r.prototype.viewModeratedPosts=function(e){return e.preventDefault(),$(window).unbind("scroll"),this.renderModeratedPosts()},r.prototype.renderModeratedPosts=function(){return this.moderated=new Juicer.Models.Moderated({slug:this.feed.get("slug")}),$(".moderation-nav .active").removeClass("active"),$(".moderation-nav .moderated").addClass("active"),this.moderated.fetch({success:(e=this,function(){return e.feedView&&e.feedView.close(),new Juicer.Views.Moderated({el:".juicer-feed",model:e.moderated}).render()}),error:function(){return alert("Something went wrong pulling in your moderated posts.")}});var e},r.prototype.openOverlay=function(e){var t;return e.preventDefault(),t=$(e.target).serializeHash().feed,htmx.ajax("POST","/track",{values:{event_name:"moderation_save_started"}}),this.overlay=new Juicer.Views.Overlay({content:this.revalidateOverlay({data:t}),element:this.el,width:"50%"}),this.overlay.render()},r.prototype.closeOverlay=function(){return this.overlay.removeView()},r.prototype.submitConfirmation=function(e){var t,i;return e.preventDefault(),t=(i=$(e.target)).parents("form").serializeHash(),i.data("revalidate")?(i.parents(".submits").html("
Loading...
Applying filter settings to existing posts. This can take a while. Please hold.
"),t.revalidating=!0,this.updateFilters(t,this.revalidatingPoll)):(i.parents(".submits").html("
Loading...
"),this.updateFilters(t,this.closeOverlay))},r.prototype.updateFilters=function(e,t){return this.feed.set(e),this.feed.save(null,{success:function(){return t()},error:function(){return alert("Something went wrong!")}})},r.prototype.revalidatingPoll=function(){return setTimeout(this.pollForRevalidating,5e3)},r.prototype.pollForRevalidating=function(){return this.feed.fetch({success:(e=this,function(){return e.feed.get("revalidating")?e.revalidatingPoll():(e.closeOverlay(),e.feed.trigger("action"))}),error:function(){return alert("Something happened with polling. Please refresh page.")}});var e},r.prototype.toggleAndSubmit=function(){if(this.toggleFilterBlocker(),this.queueChecked())return this.$("form").trigger("submit")},r.prototype.toggleFilterBlocker=function(){var e;return e=this.$(".filter-blocker"),this.queueChecked()?e.show():e.hide()},r.prototype.queueChecked=function(){return this.$("#queue").is(":checked")},r.prototype.close=function(e){if(null==e&&(e=null),null!=e&&e.preventDefault(),$("li.selected").removeClass("selected"),r.__super__.close.apply(this,arguments),null!=this.moderated)return this.fetchFeed()},r.prototype.fetchFeed=function(){return this.feed.set(this.initialAttributes),this.feed.moderated?window.location="/feeds/"+this.feed.get("slug"):this.feed.fetch({success:(e=this,function(){return e.feed.trigger("action")})});var e},r}(Juicer.Views.SubView)}.call(this),function(){var e=function(e,t){return function(){return e.apply(t,arguments)}},t=function(e,t){function r(){this.constructor=e}for(var n in t)i.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},i={}.hasOwnProperty;Juicer.Views.Settings=function(i){function r(){return this.reRender=e(this.reRender,this),r.__super__.constructor.apply(this,arguments)}return t(r,i),r.prototype.template=JST["feeds/settings"],r.prototype.title="Feed Settings",r.prototype.events={"click #hide_ads_checkbox":"handleHideAdsCheckbox","change input[type=checkbox]":"updateCheckbox","change .order":"updateOrder","change .filter_setting":"updateFilter","focus input[type=number]":"highlightField"},r.prototype.render=function(){return r.__super__.render.apply(this,arguments),this.toggleSettings()},r.prototype.toggleSettings=function(){return this.toggleFilter(!this.feed.hasInterval())},r.prototype.toggleFilter=function(e){return this.$(".filter_setting").toggle(e)},r.prototype.renderTemplate=function(){return this.$el.html(this.template({feed:this.feed,checkboxes:this.checkboxes}))},r.prototype.reRender=function(){return this.$el.html(this.template({feed:this.feed,checkboxes:this.checkboxes})),this.renderTitle(),this.toggleSettings()},r.prototype.checkboxes=[{attr:"photos",label:"Only show posts with images"},{attr:"videos",label:"Only show posts with videos"},{attr:"lazy_load",label:"Lazy-load images",tooltip:"Won't load images until they are scrolled to on your site. This will save on bandwidth and decrease page load time. Only use if Juicer feed is below the fold."},{attr:"overlay",label:"Open overlay on post click",tooltip:"With this box checked, when you click on a post it will open in an overlay view with the post larger and sharing icons. Otherwise it will link directly to the post."},{attr:"video_overlay",label:"Only play videos in overlay",tooltip:"With this box checked, videos will open in an overlay and play. If not checked, the videos will play inline in the feed."},{attr:"infinite_scroll",label:"Infinite Scroll",tooltip:'If you scroll to the bottom of your Juicer feed, automatically load in more posts. If not, you\'ll see a "Load More" button instead'},{attr:"poll",label:"Auto-Refresh for Live Events",tooltip:"Refreshes the feed automatically when new posts are imported. Great for using on a display at a live event."},{attr:"hide_title_on_hub_page",label:"Hide title on hub page",tooltip:"Hides title on feeds hub page"}],r.prototype.updateCheckbox=function(e){var t,i;return i=(t=$(e.target)).is(":checked")?"1":"0",this.feed.set(t.data("attribute"),i),this.saveAndRender()},r.prototype.handleHideAdsCheckbox=function(e){if(e.preventDefault(),!$("#hide_ads").is(":checked"))return htmx.ajax("GET","/paywall?source=dashboard_ads&feed_id="+this.feed.get("id"),{target:"body",swap:"beforeend"})},r.prototype.updateOrder=function(e){return this.feed.set("order",$(e.target).val()),this.saveAndRender()},r.prototype.updateFilter=function(e){return this.feed.set("display_filter",$(e.target).val()),this.saveAndRender()},r.prototype.saveAndRender=function(){return this.feed.trigger("showLoader"),this.feed.save(null,{success:(e=this,function(){return e.feed.trigger("action")}),error:function(){return alert("Something went wrong.")}});var e},r.prototype.highlightField=function(e){var t;if(t!==$(e.target))return t=$(e.target),setTimeout(function(){return t.select()},50)},r}(Juicer.Views.SubView)}.call(this),function(){var e=function(e,t){return function(){return e.apply(t,arguments)}},t=function(e,t){function r(){this.constructor=e}for(var n in t)i.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},i={}.hasOwnProperty;Juicer.Views.Sources=function(i){function r(){return this.reRender=e(this.reRender,this),this.sort=e(this.sort,this),r.__super__.constructor.apply(this,arguments)}return t(r,i),r.prototype.template=JST["feeds/sources"],r.prototype.title="Social Media Sources",r.prototype.render=function(e){if(r.__super__.render.apply(this,arguments),jQuery(".juicer-feed").hasClass("j-modern"))return sortable(".source-list",{items:".existing-source",forcePlaceholderSize:!0})[0].addEventListener("sortupdate",this.sort)},r.prototype.events={"click .delete":"removeSource","click .source-submenu-item":"openSourceOverlay","click .rename":"openSourceEditOverlay","click .moderate":"openSourceModerateOverlay","submit #manual_post":"addPostManually","submit .source-update":"updateSource","click .existing-source .js-warning":"handleWarningClick","click .existing-source":"toggleSubMenu","click .js-add-source-submenu:not(.disabled)":"openSourceForm"},r.prototype.handleWarningClick=function(e){return e.stopPropagation(),jQuery("body").html("
")},r.prototype.removeSource=function(e){var t,i,r;if(e.preventDefault(),i=$(e.target),Juicer.Helpers.confirm("Confirm source deletion?\nThis action will permanently delete all posts from your Juicer feed.\nNote: Re-adding the source may not retrieve all posts."))return t=i.data("id"),new Juicer.Models.Source({id:t}).destroy({success:(r=this,function(e,n){return r.feed.set(n,{parse:!0}),$(".existing-source[data-id='"+t+"']").remove(),"htmx"===r.feed.get("version")&&window.juicerUtil.updateSidebarSourcesMenu(),i.parents(".source-submenu").remove(),r.feed.trigger("action")}),error:function(){return alert("uh oh, something went wrong.")}})},r.prototype.openSourceForm=function(){return this.trigger("openSourceForm",this)},r.prototype.openSourceOverlay=function(e){var t,i,r,n,s,o;return e.preventDefault(),n=$(e.target),r=this.feed.get("sources").findWhere({id:n.data("id")}),s=n.data("template"),o=this,i=function(){return o.overlay=new Juicer.Views.Overlay({content:JST["sources/"+s]({source:r,feed:o.feed}),width:"50%",element:o.el}),o.overlay.render()},"manual"===s?(t=function(e,t){return t.xhr.response.length>0?jQuery("body").append(t.xhr.response):i()},htmx.ajax("GET","/paywall?source=manual_add_post&feed_id="+this.feed.get("id"),{target:"body",swap:"beforeend",handler:t})):i()},r.prototype.addPostManually=function(e){var t,i,r;return e.preventDefault(),(i=$(e.target)).find(".j-loading-wrapper").html("
Loading...
"),i.find(".j-button").attr("disabled",!0),i.find("ul.errors").remove(),t=i.serializeHash(),this.post=new Juicer.Models.Post(t),this.post.save(null,{success:(r=this,function(e,t){return r.feed.set(t,{parse:!0}),r.reRender(),r.feed.trigger("action")}),error:function(e,t){return i.find(".j-button").attr("disabled",!1), new Juicer.Views.Errors({el:i,errors:t})}})},r.prototype.updateSource=function(e){var t,i;return e.preventDefault(),t=$(e.target).serializeHash(),this.source=new Juicer.Models.Source(t),this.source.save(null,{success:(i=this,function(e,t){return i.feed.set(t,{parse:!0}),i.reRender(),i.feed.trigger("action")}),error:function(){return alert("Something went wrong.")}})},r.prototype.sort=function(e){var t;return t=_u.map($(e.target).find(".existing-source"),function(e){return $(e).data("id")}),this.feed.set({source_ids:t}),this.saveAndRender()},r.prototype.reRender=function(){return this.sidebarView.renderSidebar()},r.prototype.toggleSubMenu=function(e){var t;return(t=jQuery(e.target)).hasClass("existing-source")||(t=t.parents(".existing-source")),t.next(".source-submenu").slideToggle(),t.toggleClass("open")},r.prototype.saveAndRender=function(){return this.feed.trigger("showLoader"),this.feed.save(null,{success:(e=this,function(){return e.feed.set({source_ids:null}),e.feed.trigger("action")})});var e},r}(Juicer.Views.SubView)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Views.Synced=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.template=JST["feeds/synced"],i}(Juicer.Views.SubViewSlide)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Views.ChurnForm=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.namespace="churn",i.prototype.createModel=function(){return new JuicerBackbone.Model},i}(Juicer.Views.FormView)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Views.FeedForm=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.namespace="feed",i.prototype.createModel=function(){return new Juicer.Models.FeedValidation},i}(Juicer.Views.FormView)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Views.UserForm=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.namespace="user",i.prototype.createModel=function(){return new Juicer.Models.UserValidation},i}(Juicer.Views.FormView)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Views.UserSignupForm=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.namespace="user",i.prototype.createModel=function(){return new Juicer.Models.UserSignupValidation},i}(Juicer.Views.FormView)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Views.UserUpdateForm=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.namespace="user",i.prototype.createModel=function(){var e;return e={email:$("#user_email").val(),noPassword:$("#user_password").length<1,passwordAlreadyUpdated:$("#user_password_updated").val(),signedUpWithSocialAccount:$("#user_signed_up_with_social_account").val()},new Juicer.Models.UserUpdateValidation(e)},i}(Juicer.Views.FormView)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Views.Gallery=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.initialize=function(e){var t,i,r,n,s,o,a,l,c;return t=(s=(l=e.target).parents(".j-gallery")).data("id"),o=this.model.get("posts").findWhere({id:t}),i=s.find(".j-image img"),c=s.find("video source"),a=i.attr("src")||c.attr("src"),-1===(r=(n=JSON.parse(JSON.stringify(o.get("media")))).findIndex(function(e){return e.image===a||e.url===a}))&&(r=0),l.hasClass("j-gallery-next")?r+=1:l.hasClass("j-gallery-previous")&&(r-=1),r>=n.length&&(r=0),r<0&&(r=n.length-1),"video"===n[r].type?(i.attr("src",n[r].image),c.attr("src",n[r].video),i.parents(".feed-item").addClass("j-video"),i.parents(".j-image").data("video-url",n[r].video),i.parents(".j-image").data("image",n[r].image),this.currentMediaType="video"):"image"===n[r].type&&(i.attr("src",n[r].url),i.parents(".feed-item").removeClass("j-video"),this.currentMediaType="image",n[r].alt_text)?i.attr("alt",n[r].alt_text):void 0},i}(JuicerBackbone.View)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Views.GdprOverlay=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.template=JST.gdpr_form,i.prototype.initialize=function(){return this.overlay=new Juicer.Views.Overlay({content:this.template(),element:this.el,width:"50%"}),this.overlay.render()},i}(JuicerBackbone.View)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Views.Home=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.initialize=function(){return this.$("input").placeholder(),new Juicer.Views.HomeSlider({el:".js-features"})},i.prototype.events={"click .show":"renderExample","change select":"reRenderFeed","click .hide-feed":"hideFeed"},i.prototype.renderExample=function(e){var t,i;return e.preventDefault(),(t=jQuery(e.target)).html("Loading..."),this.model=new Juicer.Models.Feed({slug:"juicer",per:16,order:"random"}),this.model.fetch({success:(i=this,function(){return i.renderFeed(),jQuery(".style-picker").css("display","inline-block"),jQuery(".hide-feed").show(),t.hide()}),error:function(){return console.log("Example did not load!")}})},i.prototype.reRenderFeed=function(e){var t,i,r;return this.$(".juicer-feed").remove(),i="v2"===this.model.get("embed_layout")?"
":"
    ",this.$(".js-juicer-example .container-fluid").append(i),r=jQuery(e.target).val(),t=this.map(r),this.model.set(t),this.renderFeed()},i.prototype.renderFeed=function(){return new Juicer.Views.Feed({el:".juicer-feed",model:this.model}).render()},i.prototype.hideFeed=function(e){return e.preventDefault(),this.$(".juicer-feed").html(""),jQuery(".style-picker").hide(),jQuery(e.target).hide(),this.$(".show").show().html("Show me an example feed!")},i.prototype.map=function(e){switch(e){case"classic":return{css:"classic",photos:!1};case"white":return{css:"white",photos:!1};case"widget":return{css:"widget",photos:!1};case"colored-icons":return{css:"colored-icons",photos:!1};case"gray":return{css:"gray",photos:!1};case"slider":return{css:"slider",photos:!0};case"user":return{css:"user",photos:!1};case"hip":return{css:"hip",photos:!1};case"living-wall":return{css:"living-wall",photos:!1};case"modern":return{css:"modern",photos:!1};case"polaroid":return{css:"polaroid",photos:!1};case"night":return{css:"night",photos:!1};default:return{css:"image-grid",photos:!0}}},i}(JuicerBackbone.View)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Views.HomeSlider=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.item=".explainer-list-item",i.prototype.initialize=function(){return this.activate(this.$(this.item).first())},i.prototype.events={"mouseenter .explainer-list-item":"toggleSlider","click .explainer-list-item":"toggleSlider"},i.prototype.toggleSlider=function(e){var t;if((t=this.$(e.target)).is(this.item)||(t=t.parents(this.item)),!t.hasClass("active"))return this.activate(t)},i.prototype.activate=function(e){var t,i;return i=e.data("slide"),this.$(".explainer-list-item.active").removeClass("active"),e.addClass("active"),t=this.$(".slider-images ."+i),this.$(".slider-images .active").removeClass("active"),t.addClass("active")},i}(JuicerBackbone.View)}.call(this),function(){var e=function(e,t){return function(){return e.apply(t,arguments)}},t=function(e,t){function r(){this.constructor=e}for(var n in t)i.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},i={}.hasOwnProperty;Juicer.Views.ImageHandler=function(i){function r(){return this.levelGridHeight=e(this.levelGridHeight,this),r.__super__.constructor.apply(this,arguments)}return t(r,i),r.prototype.initialize=function(e){return null==e&&(e={}),this.image=this.$(e.target),this.feedItem=this.image.parents(".feed-item"),this.postId=this.feedItem.data("id"),this.theme=e.theme,this.feed=e.feed,this.el=e.el||null,this.testRefreshed=e.testRefreshedImages||!1,this.handeBrokenImage()},r.prototype.handeBrokenImage=function(){return!this.postId||"facebook"!==this.feedItem.data("source")||this.image.attr("src").match(Juicer.Constants.BASE_URL)?this.invokeFallback():(this.image.attr("src",Juicer.Constants.BASE_URL+"/api/posts/"+this.postId+"/image"),this.testRefreshed?this.testImage():void 0)},r.prototype.testImage=function(){return imagesLoaded(this.image).on("fail",function(){return this.invokeFallback()}.bind(this))},r.prototype.invokeFallback=function(){switch(this.theme){case"widget":case"slider":case"entertainment":case"autoscroll":this.convertToText();break;case"livingWall":this.removeImage();break;default:this.tryConvertingThenHide()}if(r.reportInvalidImage(this.postId,"content","feed"),this.feed.isGrid()&&this.el)return this.levelGridHeight()},r.prototype.tryConvertingThenHide=function(){if(!this.feed.get("photos")||!this.feed.get("isOnFeedsDashboard"))return this.feedItem.find(".j-message").length>0?this.convertToText():this.hidePost()},r.prototype.convertToText=function(){var e;return this.logFallback("Converting to a text post."),(e=this.image.parents(".feed-item")).removeClass("image-post").removeClass("j-video").addClass("words"),e.find(".j-image").remove()},r.prototype.hidePost=function(){return this.logFallback("Hiding the post."),this.image.parents(".feed-item").hide()},r.prototype.hideImage=function(){return this.logFallback("Hiding the image."),this.image.hide()},r.prototype.removeImage=function(){return this.logFallback("Removing the image."),this.image.remove()},r.prototype.logFallback=function(e){var t;return t=this.feedItem.data("source"),console.log("Juicer: "+t+" post with id "+this.postId+" has a broken image. "+e)},r.prototype.levelGridHeight=function(){var e,t,i,r,n,s,o;if(o=this.el.querySelectorAll(".j-stack"),s={},e=0,o.forEach(function(t,i){var r,n;if(n=t.querySelectorAll("li.feed-item"),r=Array.from(t.querySelectorAll("li.feed-item")).reduce(function(e,t){return e+t.clientHeight},0),s[i]=r,n.length>0&&0===e)return e=r/n.length}),t=Object.entries(s).reduce(function(e,t){return e[1]>t[1]?e:t})[0],n=Object.entries(s).reduce(function(e,t){return e[1]t[1]?e:t})[0],n=Object.entries(s).reduce(function(e,t){return e[1]1.5*e&&r<20)return a=o[t].querySelector("li.feed-item:last-child"),o[n].appendChild(a),s[t]-=a.clientHeight,s[n]+=a.clientHeight,r+=1,i()},s[t]-s[n]>1.5*e)return i()},r.reportInvalidImage=function(){return null},r}(JuicerBackbone.View)}.call(this),function(){var e=function(e,t){return function(){return e.apply(t,arguments)}},t=function(e,t){function r(){this.constructor=e}for(var n in t)i.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},i={}.hasOwnProperty;Juicer.Views.InfiniteScroll=function(i){function r(){return this.checkForPagination=e(this.checkForPagination,this),r.__super__.constructor.apply(this,arguments)}return t(r,i),r.prototype.el=function(){return this.model.hasHeight()?".juicer-feed":window},r.prototype.initialize=function(e){if(this.template=e.template||JST["partials/_moderated_posts"],this.container=e.container,this.isOnFeedsDashboard=e.isOnFeedsDashboard||!1,this.posts=this.model.get("posts"),this.pages=_u.min([e.pages,1e3]),this.stopped=this.pages<2||this.limitReached(),this.shouldInfinitelyScroll())return this.$el.on("scroll.juicerInfiniteScroll",_u.debounce(this.checkForPagination,300))},r.prototype.limitReached=function(){return this.lessThanLimit()||this.setPagesLimit()},r.prototype.lessThanLimit=function(){return this.posts.length=this.pages},r.prototype.removeLoadMore=function(){return jQuery(".j-paginate").remove()},r.prototype.checkForPagination=function(){if(this.scrollPoint()>this.triggerPoint()&&!this.stopped)return this.nextPage()},r.prototype.shouldInfinitelyScroll=function(){return this.model.get("infinite_scroll")&&!this.stopped},r.prototype.shouldShowLoadMore=function(){return!this.model.get("infinite_scroll")&&!this.stopped},r.prototype.nextPage=function(){return this.stop(),this.model.nextPage(),this.model.fetch({remove:!1,success:(e=this,function(t,i){return e.appendPosts(i),e.trigger("paginate")}),error:function(){return console.log("Juicer Infinite Scroll Problem.")}});var e},r.prototype.appendPosts=function(e){var t,i;if(jQuery(".j-loading, .j-loading-wrapper").remove(),i=new Juicer.Models.Feed(e,{parse:!0}),this.posts=i.get("posts"),this.posts.length>0&&(t=jQuery(this.template({isOnFeedsDashboard:this.isOnFeedsDashboard,feed:i}))),this.model.isGrid()?this.container.gridalicious("append",t):this.container.append(t),this.limitReached()||this.start(),!this.shouldShowLoadMore())return this.removeLoadMore()},r.prototype.scrollPoint=function(){return this.$el.scrollTop()+2*this.$el.outerHeight()},r.prototype.triggerPoint=function(){return this.model.hasHeight()?this.container.prop("scrollHeight"):this.container.offset().top+this.container.outerHeight()},r.prototype.start=function(){return this.stopped=!1},r.prototype.stop=function(){return this.stopped=!0},r.prototype.close=function(){return this.$el.empty().off("scroll.juicerInfiniteScroll"),this.model.resetPage(),this.stopListening(),this},r}(JuicerBackbone.View)}.call(this),function(){var e=function(e,t){return function(){return e.apply(t,arguments)}},t=function(e,t){function r(){this.constructor=e}for(var n in t)i.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},i={}.hasOwnProperty;Juicer.Views.LazyLoad=function(i){function r(){return this.checkImages=e(this.checkImages,this),r.__super__.constructor.apply(this,arguments)}return t(r,i),r.prototype.el=window,r.prototype.initialize=function(e){return this.view=e.view,this.$el.on("scroll",_u.debounce(this.checkImages,_u.random(250,350))),this.model.hasHeight()&&this.feed().on("scroll",_u.debounce(this.checkImages,_u.random(250,350))),this.checkImages()},r.prototype.checkImages=function(){return _u.each(this.view.$el.find("img[data-lazy]:not([src])"),(e=this,function(t){if((t=jQuery(t)).offset().topthis.total&&(this.visible=this.total),i=_u.map(this.initialPosts(),(r=this,function(e){var t;return(t=r.renderPost(e)).find("img").on("error",function(e){var t;return t=jQuery(e.target),this.imageHandler({target:t,feed:this.model,theme:"livingWall",testRefreshedImages:!0})}.bind(r)),t})),t=_u.sample(i,this.largeCount),_u.each(t,function(e){return function(t){return t.addClass("j-large"),e.setDimensions(t)}}(this)),_u.each(i,function(e){return function(t){return!t.hasClass("j-large")&&(t.addClass("j-small"),e.setDimensions(t))}}(this)),this.$el.append(this.customCss({feed:this.model})),this.$el.append(i),this.$el.packery(this.packeryOptions()),this.handleInterval(),this.ensureProperSize(),this},r.prototype.resize=function(){if(this.$el.outerWidth()!==this.windowWidth)return this.reRender()},r.prototype.reRender=function(){return this.setSizes(),this.render()},r.prototype.setLargeCount=function(){return this.largeCount=this.equal?0:this.columns%2!=0?this.columns-1:this.columns},r.prototype.packeryOptions=function(){return{gutter:this.gutter,itemSelector:".feed-item",resize:!1}},r.prototype.handleInterval=function(){var e;return document.hidden||this.startInterval(),jQuery(document).on("show",(e=this,function(){return e.startInterval()})),jQuery(document).on("hide",function(e){return function(){return e.stopInterval()}}(this))},r.prototype.startInterval=function(){if(null==this.id)return this.id=setInterval(this.rotatePost,this.interval)},r.prototype.stopInterval=function(){return null!=this.id&&window.clearInterval(this.id),this.id=null},r.prototype.ensureProperSize=function(){var e,t,i;return!(this.retryTimes>9)&&(i=3*this.gutter,e=4*this.small,Math.floor(e)-i<=(t=this.$el.height())&&t<=Math.ceil(e)+i?void 0:(this.retryTimes++,this.close(),this.render()))},r.prototype.renderPost=function(e,t,i){var r,n;return null==t&&(t=null),null==i&&(i=null),r=jQuery(this.template({isOnFeedsDashboard:this.isOnFeedsDashboard,post:e})),(n=imagesLoaded(r[0])).on("done",function(){var e;if(t&&t(r),(e=r.find("img")).width()>e.height())return e.addClass("landscape")}),n.on("fail",function(e){return this.brokenImageCallback(e)}.bind(this)),r},r.prototype.brokenImageCallback=function(e){var t;return t=$(e.images[0].img),this.imageHandler({target:t,feed:this.model,theme:"livingWall",testRefreshedImages:!0})},r.prototype.imageHandler=function(e){return new Juicer.Views.ImageHandler(e)},r.prototype.initialPosts=function(){var e;return e=this.visible-1,this.posts().slice(0,+e+1||9e9)},r.prototype.nextPost=function(){return this.total++,this.total>=this.posts().length&&(this.model.pollingAllowed()&&this.model.fetchNewPosts(!1),this.total=0),this.posts()[this.total]},r.prototype.posts=function(){var e;return e=this.model.get("posts").models,e=_u.filter(e,function(e){return"Twitter"!==e.sourceType()&&"YouTube"!==e.sourceType()})},r.prototype.randomPost=function(){return jQuery(_u.sample(this.$(".feed-item").not(".j-sticky")))},r.prototype.setDimensions=function(e){return e.hasClass("j-small")?this.small:this.large,e.css({width:this.size(e),height:this.size(e)})},r.prototype.rotatePost=function(){var e,t,i;return t=this.randomPost(),(e=this.nextPost())&&e.stickied()&&(e=this.nextPost()),this.renderPost(e,(i=this,function(e){return i.cloneStyle(t,e)}))},r.prototype.cloneStyle=function(e,t){var i,r,n,s,o,a,l;return t.addClass(e.hasClass("j-small")?"j-small":"j-large"),this.setDimensions(t),r={top:l=this.size(e),left:l},i=this.merge(this.vectorMap(),r,"*"),n=a=e.position(),s=this.merge(a,i,"-"),o=this.merge(a,i,"+"),t.css(_u.extend(s,this.underCss)),e.css(this.underCss),e.before(t),window.setTimeout(function(){return e.css(o),t.css(n),window.setTimeout(function(){return e.remove(),t.css({zIndex:2})},500)},100)},r.prototype.size=function(e){return e.hasClass("j-small")?this.small:this.large},r.prototype.merge=function(e,t,i){var r;return null==i&&(i="+"),r={},_u.each(_u.keys(e),function(n){return"+"===i?r[n]=e[n]+t[n]:"*"===i?r[n]=e[n]*t[n]:"-"===i?r[n]=e[n]-t[n]:void 0}),r},r.prototype.vectorMap=function(){var e,t;return t=_u.sample([-1,1]),{top:(e=_u.shuffle([t,0]))[0],left:e[1]}},r.prototype.underCss={zIndex:1},r.prototype.close=function(){return this.stopInterval(),this.$el.empty(),this.$el.packery("destroy"),jQuery(document).off("show hide"),this.stopListening(),this},r}(JuicerBackbone.View)}.call(this),function(){var e=function(e,t){return function(){return e.apply(t,arguments)}},t=function(e,t){function r(){this.constructor=e}for(var n in t)i.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},i={}.hasOwnProperty;Juicer.Views.Moderated=function(i){function r(){return this.reRender=e(this.reRender,this),r.__super__.constructor.apply(this,arguments)}return t(r,i),r.prototype.template=JST.moderated,r.prototype.loading=JST["partials/_loading"],r.prototype.events={"click ul.j-filters li":"filterFeed","click ul.j-display-filters li":"filterFeed","click .approve":"restorePost","click .reject":"rejectPost","click .j-paginate":"appendNextPage","click .bulk-moderate":"bulkModerate","click .delete":"deletePost","click .copy-post-id":"copyPostId"},r.prototype.render=function(){var e;return this.model.set({lazy_load:!1,css:"modern"}),this.$el.css({maxWidth:"none",maxHeight:"none"}),this.startInfiniteScroll(),this.$el.html(this.template({feed:this.model,menuItems:this.menuItems()})),(e=Math.floor(this.$el.outerWidth()/3))<200&&(e=200),this.model.on("new-posts",this.reRender),!(this.model.get("posts").models.length<1)&&(this.$el.removeClass(Juicer.Constants.FEED_CLASSES.join(" ")),this.$el.addClass("modern"),this.$el.removeClass("hover-images"),this.$el.gridalicious({selector:".feed-item",width:e,gutter:this.gutter}),null==this.infiniteScroll||(this.infiniteScroll.shouldShowLoadMore()?void 0:this.infiniteScroll.removeLoadMore()))},r.prototype.startInfiniteScroll=function(){return this.model.resetPage(),this.infiniteScroll=new Juicer.Views.InfiniteScroll({container:this.$el,model:this.model})},r.prototype.appendNextPage=function(e){return e.preventDefault(),this.$(".j-paginate").replaceWith(this.loading()),this.infiniteScroll.nextPage()},r.prototype.restorePost=function(e){return this.hidePost(e,"Approving...").restore()},r.prototype.rejectPost=function(e){return this.hidePost(e,"Rejecting...").reject()},r.prototype.deletePost=function(e){return this.hidePost(e,"Deleting...").hardDeletePost()},r.prototype.copyPostId=function(e){return e.preventDefault(),Juicer.Views.Feed.copyPostId(e)},r.prototype.hidePost=function(e,t,i){var r,n;return null==i&&(i=!0),e.preventDefault(),null!=t&&this.$(e.target).html(t),n=this.$(e.target).parents(".actions"),r=this.fetchPost(n.data("id")),i&&n.parents(".feed-item").hide().remove(),r},r.prototype.fetchPost=function(e){return this.model.get("posts").findWhere({id:e})},r.prototype.filterFeed=function(e){var t,i;return e.preventDefault(),(t=jQuery(e.target)).attr("data-filter"),t.parents("ul"),this.model.filter=t.data("filter"),this.model.resetPage(),this.model.fetch({success:(i=this,function(){return i.reRender()})})},r.prototype.bulkModerate=function(e){var t,i;if(i=(t=null!=$(e.target).data("approve"))?"approve":"reject",Juicer.Helpers.confirm("Are you sure you want to "+i+" all of these posts?"))return this.$(".bulk-moderate-nav").html("
    Loading...
    "),this.model.bulkModerate(t,this.model.filter),setTimeout(function(){return location.reload()},1e4)},r.prototype.unbindChildren=function(){return this.$el.empty().off(),this.infiniteScroll&&this.infiniteScroll.close(),this.model.off("new-posts",this.reRender),this.stopListening()},r.prototype.reRender=function(){return this.unbindChildren(),this.render(),this.delegateEvents()},r.prototype.menuItems=function(){var e;return e=this.baseMenuItems,e=this.allMenu.concat(e)},r.prototype.baseMenuItems=[{filter:"Filter",title:"Text Filtered"},{filter:"Profanity",title:"Profanity"},{filter:"User",title:"Manually Deleted"},{filter:"Queue",title:"Moderation Queue"},{filter:"Similarity",title:"Duplicate Posts"},{filter:"Rejected",title:"Rejected"}],r.prototype.allMenu=[{filter:void 0,title:"All"}],r}(JuicerBackbone.View)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Views.Nav=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.events={"click .js-Header_burgerMenu":"toggleMenuOpen","click .sidebar-toggle":"toggleSidebarOpen","click .main-container":"toggleMenuClose"},i.prototype.toggleMenuOpen=function(){var e;return $(".main-container").removeClass("open-right open-right_mobile").toggleClass("open-left"),(e=$(".side-nav")).hasClass("opened")?e.removeClass("opened"):setTimeout(function(){return e.addClass("opened")},200)},i.prototype.toggleMenuClose=function(){var e;if((e=$(".side-nav")).hasClass("opened"))return e.removeClass("opened")},i.prototype.toggleSidebarOpen=function(){return $(".main-container").hasClass("open-right_mobile")?$(".main-container").removeClass("open-left").removeClass("open-right_mobile"):$(".main-container").removeClass("open-left").toggleClass("open-right"),$(".opened-sidebar-option").removeClass("visible")},i}(JuicerBackbone.View)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Views.NewFeed=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.template=JST.new_feed,i.prototype.initialize=function(){return this.autoOpenNetwork=this.$el.data("auto-open-network"),this.preselectedNetworks=this.$el.data("preselected-networks"),this.socialAccounts=new Juicer.Collections.SocialAccounts,this.socialAccounts.fetch({success:(e=this,function(){return e.sourceForm=new Juicer.Views.SourceForm({el:e.el,socialAccounts:e.socialAccounts}),e.sourceForm.on("create",e.nextPage,e),e.render(),new Juicer.Views.OverlayReopener({model:e.feed,sourceForm:e.sourceForm}).render(e.el),e.autoOpenNetworkIfNeeded()}),error:function(){return alert("Something went wrong while fetching your connected social accounts")}});var e},i.prototype.render=function(){return this.$el.html(this.template())},i.prototype.autoOpenNetworkIfNeeded=function(){var e;if(this.autoOpenNetwork)return this.trackAutoOpen(),setTimeout((e=this,function(){return e.clickNetworkIcon()}),1e3)},i.prototype.trackAutoOpen=function(){if(null!=window.mixpanel&&mixpanel.track("homepage-network-auto-open",{network:this.autoOpenNetwork,source_type:this.getSourceType(),preselected_networks:this.preselectedNetworks}),null!=window.htmx)return htmx.ajax("POST","/track",{values:{event_name:"connection_auto_triggered",properties:{network:this.autoOpenNetwork,all_selected_networks:this.preselectedNetworks}}})},i.prototype.getSourceType=function(){var e,t;return null!=(e=window.juicerData)&&null!=(t=e.homepageNetworkToSource)?t[this.autoOpenNetwork]:void 0},i.prototype.clickNetworkIcon=function(){var e;if(e=this.getSourceType())return this.$el.find(".js-source.j-social-icon").each(function(t,i){var r,n;if((null!=(n=(r=$(i)).data("type"))?n.toLowerCase():void 0)===e.toLowerCase())return r.click(),!1})},i.prototype.nextPage=function(e){return window.location="/feeds/"+e.get("slug")},i}(JuicerBackbone.View)}.call(this),function(){var e=function(e,t){return function(){return e.apply(t,arguments)}},t=function(e,t){function r(){this.constructor=e}for(var n in t)i.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},i={}.hasOwnProperty;Juicer.Views.Overlay=function(i){function r(){return this.handleKeypress=e(this.handleKeypress,this),r.__super__.constructor.apply(this,arguments)}return t(r,i),r.prototype.className="j-overlay",r.prototype.template=JST.overlay,r.prototype.initialize=function(e){return this.element=e.element||"body",this.content=e.content,this.width=e.width,this.close=!1!==e.close,this.ariaLabel=e.ariaLabel,this.closedViaKeyboard=!1,jQuery(document).bind("keydown",this.handleKeypress)},r.prototype.render=function(){return this.$el.html(this.template({content:this.content,close:this.close})),jQuery(this.element).children(".j-overlay")&&jQuery(this.element).children(".j-overlay").remove(),this.$el.attr("role","dialog").attr("aria-modal","true"),this.ariaLabel&&this.$el.attr("aria-label",this.ariaLabel),jQuery(this.element).append(this.el),this.$el.find(".j-close").first().focus(),this.handleBrokenImages(),this},r.prototype.events=function(){return{"click .j-close":"closeOverlay","click .juicer2-close":"closeOverlay",mousedown:"removeOverlay","click .j-navigate button":"triggerNavigate","click a.share":"openPopup","click .j-gallery-arrow":"gallery"}},r.prototype.gallery=function(e){return e.preventDefault(),this.trigger("trigger:gallery",jQuery(e.target))},r.prototype.removeOverlay=function(e){var t;if(!((t=jQuery(e.target)).hasClass("j-overlay-content")||t.parents(".j-overlay-content").length>0))return this.removeView()},r.prototype.closeOverlay=function(e){var t;return e.preventDefault(),(t=this.$el.find(".j-close")).length&&t.is(":focus")&&(this.closedViaKeyboard=!0),this.removeView()},r.prototype.removeView=function(){return this.trigger("close",this.closedViaKeyboard),this.unbind(),this.remove(),this.$(".j-overlay").remove(),jQuery(this.element).find(".j-overlay").remove(),jQuery(document).unbind("keydown",this.handleKeypress)},r.prototype.triggerNavigate=function(e){return e.preventDefault(),this.trigger("trigger:navigate",jQuery(e.target).data("post-id"))},r.prototype.openPopup=function(e){var t;return e.preventDefault(),t=jQuery(e.target),window.open(t.attr("href"),"pop","width=600, height=400, scrollbars=no")},r.prototype.handleKeypress=function(e){var t,i,r,n,s;switch(e.keyCode){case 37:this.$(".j-previous").click();break;case 39:this.$(".j-next").click();break;case 27:this.closedViaKeyboard=!0,this.closeOverlay(e)}if(9===e.keyCode&&(i=jQuery(e.target)).parents("[role=dialog]").length&&(s=e.shiftKey,n=i.closest("[role=dialog]").find("input:visible,select:visible,button:visible,textarea:visible"),r=s?n.first():n.last(),(t=jQuery(r)).length))return!i.is(t)},r.prototype.handleBrokenImages=function(){var e;return this.$(".j-poster img").on("error",(e=this,function(t){return console.log("hiding broken profile image in overlay."),jQuery(t.target).hide(),Juicer.Views.ImageHandler.reportInvalidImage(e.postId,"poster","overlay")})), this.$("img.j-content-image").on("error",function(e){return function(t){var i,r,n;if(i=(n=jQuery(t.target)).parents(".image"),r=n.parents(".j-post-overlay[data-id]").data("id"),Juicer.Views.ImageHandler.reportInvalidImage(e.postId,"content","overlay"),!r||!n.attr("src").match("fbcdn.net")||n.attr("src").match(Juicer.Constants.BASE_URL))return i.length>0?(console.log("Hiding broken image in overlay."),i.hide()):void 0;n.attr("src",Juicer.Constants.BASE_URL+"/api/posts/"+r+"/image")}}(this)),this.$("video source").on("error",function(e){var t,i,r;return r=jQuery(e.target).parents(".instagram-wrapper, .twitter-wrapper, .video-wrapper"),i=jQuery(e.target).parents("video").first(),t=r.children(".j-video-fallback").first(),jQuery(e.target),t.length?(console.log("converting broken video in overlay to thumbnail"),i.hide(),t.children("img").each(function(e,t){if(!jQuery(t).attr("src")&&jQuery(t).attr("data-lazy"))return jQuery(t).attr("src",jQuery(t).attr("data-lazy"))}),t.show()):(console.log("hiding broken video in overlay"),r.hide())})},r}(JuicerBackbone.View)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Views.OverlayReopener=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.storageKey="juicer_overlay_open",i.prototype.initialize=function(e){return null==e&&(e={}),this.sourceForm=e.sourceForm,this.sidebarView=e.sidebarView,this.reopened=!1},i.prototype.render=function(e){var t,i,r,n;return this.overlayShouldReopen()&&(null==this.sourceForm&&(this.sourceForm=new Juicer.Views.SourceForm({el:e,feed:this.model})),n=this.get(),this.sourceForm.openOverlay(n),n.htmx?(t=this.sourceForm.overlay.$el.find(".new-source-container .load-form-async"),r="/sources/new?show_success_message=true&source="+n.source+"&feed_id="+(n.feed_id||"")+"&type="+n.term_type+"&selected_type="+n.type,t.length>0?(htmx.trigger(t[0],"htmx:abort"),i=jQuery(""),t.replaceWith(i),htmx.process(i[0]),htmx.trigger(i[0],"load")):this.sourceForm.overlay.$el.find(".new-source-container").append(""),jQuery(".new-source-container").addClass("jcr-p-0"),jQuery(".new-source-container").parents(".j-overlay-content").addClass("jcr-w-[800px] jcr-rounded-xl"),jQuery(".new-source-container").parents(".j-overlay-content").find(".j-close").remove()):null!=this.sidebarView&&this.sourceForm.on("create",this.sidebarView.renderSidebar),this.clear(),this.reopened=!0),this},i.prototype.overlayShouldReopen=function(){return!!this.get()},i.prototype.get=function(){var e;return e=window.localStorage.getItem(this.storageKey),JSON.parse(e)},i.prototype.set=function(e){var t;return t=JSON.stringify(e),window.localStorage.setItem(this.storageKey,t)},i.prototype.clear=function(){return window.localStorage.setItem(this.storageKey,null)},i}(JuicerBackbone.View)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Views.Payment=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.initialize=function(){return window.location.search.indexOf("interval=year")>-1&&(this.$("#year").prop("checked",!0),$("#invisible-form").find('input[name="year"]').val(1)),this.toggleYear()},i.prototype.events={"change #year":"toggleYear"},i.prototype.toggleYear=function(){var e,t,i,r,n;return r=this.$("#year"),i=$("[data-price]"),t=$(".simple-plan-monthly"),e=i.data("price"),r.is(":checked")?($(".js-discount-applied").length>0?0:.1,n=parseFloat(i.data("yearly-price")).toFixed(2),i.html("$"+n),t.html("/ yr"),$(".simple-plan-discounted-price .yearly").removeClass("hide"),$(".simple-plan-discounted-price .monthly").addClass("hide"),$(".year-hidden").addClass("hide")):(i.html("$"+e),t.html("/ mo"),$(".simple-plan-discounted-price .yearly").addClass("hide"),$(".simple-plan-discounted-price .monthly").removeClass("hide"),$(".year-hidden").removeClass("hide"))},i}(JuicerBackbone.View)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Views.Plans=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.template=JST.plan_change,i.prototype.initialize=function(){var e,t;return this.queryParams=new URLSearchParams(window.location.search),(e=this.queryParams.get("plan"))&&$("button[data-plan='"+e+"']").click(),$(window).on("load",(t=this,function(){return t.changePrices()}))},i.prototype.events={"change #pricing-switch":"changePrices"},i.prototype.changePrices=function(){return $("#pricing-switch").prop("checked")?($(".Plans_plan .monthly").addClass("hidden"),$(".Plans_plan .yearly").removeClass("hidden"),$(".plan-monthly").each(function(){return $(this).html($(this).html().replace("Per month","Per year"))}),$(".js-plans a").each(function(){}),$(".year-hidden").addClass("hidden")):($(".Plans_plan .monthly").removeClass("hidden"),$(".Plans_plan .yearly").addClass("hidden"),$(".plan-monthly").each(function(){return $(this).html($(this).html().replace("Per year","Per month"))}),$(".year-hidden").removeClass("hidden"))},i}(JuicerBackbone.View)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Views.PostEdit=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.template=JST.post_edit,i.prototype.message=JST["partials/_message"],i.prototype.className="j-overlay",i.prototype.initialize=function(e){return this.setPost(e)},i.prototype.setPost=function(e){var t;return t=this.model.get("posts"),this.post=t.get(e.id)},i.prototype.render=function(){var e,t;return t=this,e=function(e,i){return i.xhr.response.length>0?jQuery("body").append(i.xhr.response):(t.overlay=new Juicer.Views.Overlay({content:t.template({post:t.post,feed:t.model}),width:"50%",el:t.el}),t.overlay.render())},htmx.ajax("POST","/track",{values:{event_name:"post_editing_started",properties:{post_id:this.post.get("id")}}}),htmx.ajax("GET","/paywall?source=feed_edit_post&feed_id="+this.model.get("id"),{target:"body",swap:"beforeend",handler:e})},i.prototype.events=function(){return{"input textarea":"updatePreview","submit form":"savePost","change .datetime-external-created-at":"updateTimestamp"}},i.prototype.updatePreview=function(e){return this.post.set("edit",$(e.target).val()),this.$(".message-container").html(this.message({post:this.post}))},i.prototype.updateTimestamp=function(e){return this.post.set("external_created_at",$(e.target).val())},i.prototype.savePost=function(e){return e.preventDefault(),this.post.save(null,{success:(t=this,function(e,i){return t.overlay.removeView(),t.model.set(i,{parse:!0}),t.model.trigger("action")}),error:function(){return alert("Something went wrong. Please try again.")}});var t},i}(JuicerBackbone.View)}.call(this),function(){var e=function(e,t){return function(){return e.apply(t,arguments)}},t=function(e,t){function r(){this.constructor=e}for(var n in t)i.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},i={}.hasOwnProperty;Juicer.Views.PostOverlay=function(i){function r(){return this.handleOverlayClose=e(this.handleOverlayClose,this),this.cycleGallery=e(this.cycleGallery,this),this.navigateOverlay=e(this.navigateOverlay,this),r.__super__.constructor.apply(this,arguments)}return t(r,i),r.prototype.template=JST.post_overlay,r.prototype.initialize=function(e){return this.model=e.model,this.setPost(e.target),this.feedView=e.feedView},r.prototype.triggers=function(){return{"click a.next":"navigateOverlay","click a.previous":"navigateOverlay"}},r.prototype.setPost=function(e){var t;return t=(e=e.is("li.feed-item")?e:e.parents("li.feed-item")).data("id"),this.assignPosts(t)},r.prototype.assignPosts=function(e){var t,i,r,n;if(r=this.model.get("posts"),this.post=r.get(e),i=(t=r.indexOf(this.post))+1=0?t-1:r.length-1,this.next=r.at(i),"Juicer"===this.next.sourceType()&&(this.next=r.at(i+1)),this.previous=r.at(n),"Juicer"===this.previous.sourceType())return this.previous=r.at(n-1)},r.prototype.render=function(){return this.overlay=new Juicer.Views.Overlay({element:"body",ariaLabel:this.post.sourceType()+" content",content:this.template({post:this.post,next:this.next,previous:this.previous,feed:this.model}),width:"75%"}),this.overlay.on("trigger:navigate",this.navigateOverlay),this.overlay.on("trigger:gallery",this.cycleGallery),this.overlay.on("close",this.handleOverlayClose),this.overlay.render(),this.trigger("render",this),window.htmx&&htmx.process(this.overlay.el),setTimeout(function(){if(window.WCAGCompliance)return WCAGCompliance.addNewWindowLabels(".j-overlay")},100)},r.prototype.navigateOverlay=function(e){return this.overlay.removeView(),this.assignPosts(e),this.render()},r.prototype.cycleGallery=function(e){var t;return(t=e.parents(".j-image")).hasClass("playing")&&this.feedView.stopVideo(t),"video"===new Juicer.Views.Gallery({target:e,el:this.el,model:this.model}).currentMediaType&&this.feedView?(e.parents(".media-preview").removeClass("image"),this.feedView.playVideo(t,e.parents(".j-post-overlay"),{overlay:!0})):e.parents(".media-preview").addClass("image")},r.prototype.handleOverlayClose=function(e){var t;if(e)return(t=this.feedView.$("li.feed-item[data-id='"+this.post.id+"']")).length>0?setTimeout(function(){return t.focus()},250):void 0},r}(JuicerBackbone.View)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Views.PosterImageHandler=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.initialize=function(e){return null==e&&(e={}),this.image=this.$(e.target),this.feedItem=this.image.parents(".feed-item"),this.postId=this.feedItem.data("id"),this.theme=e.theme,this.feed=e.feed,this.invokeFallback()},i.prototype.invokeFallback=function(){return"polaroid"===this.theme?this.convertToNoPoster():this.hideImage(),Juicer.Views.ImageHandler.reportInvalidImage(this.postId,"poster","feed")},i.prototype.hideImage=function(){return this.logFallback("Hiding the image."),this.image.hide()},i.prototype.convertToNoPoster=function(){return this.logFallback("Converting to a no-poster post."),this.image.parents(".j-post-container").addClass("no-poster"),this.image.parents(".j-poster").hide()},i.prototype.logFallback=function(e){var t;return t=this.feedItem.data("source"),console.log("Juicer: "+t+" post with id "+this.postId+" has a broken poster image. "+e)},i}(JuicerBackbone.View)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Views.SideNav=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.events={"click li#collapseable":"toggleOtherFeeds"},i.prototype.toggleOtherFeeds=function(e){var t,i;return e.preventDefault(),(t=(i=$(e.target)).next()).is(":visible")?(t.slideUp(),i.removeClass("selected")):(t.slideDown(),i.addClass("selected"))},i}(JuicerBackbone.View)}.call(this),function(){var e=function(e,t){return function(){return e.apply(t,arguments)}},t=function(e,t){function r(){this.constructor=e}for(var n in t)i.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},i={}.hasOwnProperty;Juicer.Views.Sidebar=function(i){function r(){return this.openSourceFormFromSources=e(this.openSourceFormFromSources,this),this.closeSubViewSlide=e(this.closeSubViewSlide,this),this.closeSubView=e(this.closeSubView,this),this.openSubView=e(this.openSubView,this),this.openNewSource=e(this.openNewSource,this),this.handleSkipOpeningSubView=e(this.handleSkipOpeningSubView,this),this.renderSidebar=e(this.renderSidebar,this),this.reRenderCss=e(this.reRenderCss,this),this.reRender=e(this.reRender,this),this.render=e(this.render,this),r.__super__.constructor.apply(this,arguments)}return t(r,i),r.prototype.template=JST.sidebar,r.prototype.nameEdit=JST["feeds/feed_name_edit"],r.prototype.newSource=JST["feeds/new_source"],r.prototype.initialize=function(e){var t,i;return this.renderedFromModerationUrl=e.renderedFromModerationUrl,this.renderedFromModerationUrl?this.model=new Juicer.Models.Moderated({slug:e.slug}):this.model=new Juicer.Models.Feed({isOnFeedsDashboard:!0,slug:e.slug,starting_at:e.starting_at,origin:Juicer.Constants.PAGE_URL_DASHBOARD_ORIGIN}),this.model.fetch({success:(i=this,function(){if(i.hideLoader(),i.renderSidebar(),null==i.reopener||!i.reopener.reopened)return i.setupNewSources()}),error:function(e){return function(){return e.hideLoader(),alert("Sorry something is going wrong.")}}(this)}),this.model.on("action",this.reRender,this),this.model.once("sync",this.initialRender,this),this.model.on("update:colors",this.reRenderCss,this),t=new URLSearchParams(window.location.search),this.renderAddSourceModalOnLoad="dashboard_add_source"===t.get("mpevent")},r.prototype.openSourceModalIfAddSourceParamPresent=function(){if(this.renderAddSourceModalOnLoad)return this.openNewSource({showFeedName:this.model.get("name")}),this.renderAddSourceModalOnLoad=!1},r.prototype.initialRender=function(){return this.render(!0)},r.prototype.render=function(e){return null==e&&(e=!1),1===this.model.get("posts").current_page&&(this.renderedFromModerationUrl&&e?($(".main-container").addClass("open-right_mobile"),this.renderModeration()):this.feed=new Juicer.Views.Feed({el:".juicer-feed",isOnFeedsDashboard:!0,model:this.model}).render()),this.openSourceModalIfAddSourceParamPresent(),this.toggleAddSourceButton(),htmx.process(this.el)},r.prototype.toggleAddSourceButton=function(){return this.model.manualSourceLimitReached()?(jQuery(".add-source-sidebar-container").removeClass("add-source"),jQuery(".add-source-container").find("a.j-button").addClass("disabled"),jQuery(".add-source-container").each(function(){return this.dispatchEvent(new CustomEvent("disable-add-source-button"))})):(jQuery(".add-source-sidebar-container").addClass("add-source"),jQuery(".add-source-container").find("a.j-button").removeClass("disabled"),jQuery(".add-source-container").each(function(){return this.dispatchEvent(new CustomEvent("enable-add-source-button"))}))},r.prototype.reRender=function(){return null!=this.feed&&this.feed.close(),null!=this.overlay&&this.overlay.removeView(),null!=this.sourcesView&&this.sourcesView.reRender(),this.sourcesView=null,this.subView=null,this.render()},r.prototype.reRenderCss=function(){return jQuery(".juicer-custom-styles").length>0?jQuery(".juicer-custom-styles").html(""):jQuery(".juicer-feed").prepend("
    ")},r.prototype.renderSidebar=function(){return this.$el.html(this.template({feed:this.model})),this.reopener=new Juicer.Views.OverlayReopener({model:this.model,sidebarView:this}).render(this.el)},r.prototype.hideLoader=function(){return jQuery(".loading-overlay").fadeOut()},r.prototype.setupNewSources=function(){return this.sourceForm=new Juicer.Views.SourceForm({feed:this.model,el:this.el,socialAccounts:this.model.get("social_accounts")}),this.sourceForm.on("create",this.reRender)},r.prototype.renderModeration=function(){if(this.renderSubView(this.viewMap.moderate,this.$("#moderate")),this.subView)return this.subView.renderModeratedPosts()},r.prototype.events=function(){return{"click .js-feed-name-edit":"renderFeedNameEdit","submit .js-feed-name-edit-form":"updateFeedName","click .add-source:not(.disabled)":"openNewSource","click .menu-item .js-warning":"handleWarningClick","click .menu-item *[data-skip_opening_sub_view]":"handleSkipOpeningSubView","click .menu-item":"openSubView","click .slide-menu-item.active":"closeSubViewSlide","change #slug_update":"toggleSlugWarning","click .hide-embed-info-popover":"handleEmbedInfoPopover","click .hide-embed-layout-popover":"handleEmbedLayoutPopover","click .popover-hide-button":"handlePopoverHide"}},r.prototype.handleSkipOpeningSubView=function(e){return e.stopPropagation()},r.prototype.handleWarningClick=function(e){return e.stopPropagation(),jQuery("body").html("
    ")},r.prototype.openNewSource=function(e){var t,i;return i=this,t=function(t,r){return r.xhr.response.length>0?jQuery("body").append(r.xhr.response):(i.overlay=new Juicer.Views.Overlay({content:i.newSource({showFeedName:null!=e?e.showFeedName:void 0,model:i.model}),width:"85%",element:i.el}),i.overlay.render())},htmx.ajax("GET","/paywall?source=feed_add_source&feed_id="+this.model.get("id"),{target:"body",swap:"beforeend",handler:t})},r.prototype.openSubView=function(e){var t,i,r,n,s;return"cta"===(t=$(e.currentTarget)).prop("id")?(s=this,i=function(e,t){var r;return t.xhr.response.length>0?(jQuery("body").append(t.xhr.response),(r=htmx.find(".cta-global-settings-modal"))?htmx.process(r):void 0):htmx.ajax("GET","/feed/"+s.model.get("id")+"/cta_settings",{target:"body",swap:"beforeend",handler:i})},void htmx.ajax("GET","/paywall?source=cta&feed_id="+this.model.get("id"),{target:"body",swap:"beforeend",handler:i})):($(".slide-menu-item").removeClass("active"),t.addClass("active"),t.prop("id")&&htmx.ajax("POST","/track",{values:{event_name:"feed_sidebar_modal_opened",properties:{feature_name:t.prop("id"),feed_id:this.model.get("id")}}}),"social_accounts"!==t.prop("id")?(e.preventDefault(),n=t.prop("id"),r=function(e){return function(){var i;return i=e.viewMap[n],e.renderSubView(i,t)}}(this),"moderate"===n?(i=function(e,t){return t.xhr.response.length>0?jQuery("body").append(t.xhr.response):r()},htmx.ajax("GET","/paywall?source=sidebar_"+n+"&feed_id="+this.model.get("id"),{target:"body",swap:"beforeend",handler:i})):("embed"===n&&htmx.ajax("POST","/track",{values:{event_name:"embed_started",mixpanel_version:"v2",properties:{location_button:"Feed"}}}),r())):void 0)},r.prototype.closeSubView=function(){return this.subView=null},r.prototype.closeSubViewSlide=function(){if($(".slide-menu-item").removeClass("active"),this.subView)return this.subView.close()},r.prototype.renderSubView=function(e,t){if((this.subView&&this.subView.$target.prop("id"))!==t.prop("id"))return this.subView&&this.subView.close(),this.subView=new e({feed:this.model,$target:t,sidebarView:this,feedView:this.feed}),this.subView.on("openSourceForm",this.openSourceFormFromSources),this.subView.render()},r.prototype.openSourceFormFromSources=function(e){return this.sourcesView=e,this.openNewSource()},r.prototype.viewMap={design:Juicer.Views.Design,embed:Juicer.Views.Embed,features:Juicer.Views.Features,hub:Juicer.Views.Hub,moderate:Juicer.Views.Moderate,settings:Juicer.Views.Settings,sources:Juicer.Views.Sources,synced:Juicer.Views.Synced},r.prototype.renderFeedNameEdit=function(e){return e.preventDefault(),this.overlay=new Juicer.Views.Overlay({content:this.nameEdit({feed:this.model}),element:this.el,width:"50%"}),this.overlay.render()},r.prototype.updateFeedName=function(e){var t;return e.preventDefault(),t=$(e.target).serializeHash(),this.model.set(t),this.model.save(null,{success:function(e,t){return window.location="/feeds/"+t.slug}})},r.prototype.toggleSlugWarning=function(){return this.$(".slug-warning").toggle()},r.prototype.handleEmbedInfoPopover=function(e){var t;return e.stopPropagation(),Array.from(document.getElementsByClassName("embed-popover")).forEach(function(e){return e.remove()}),t={url:"/tour",type:"PUT",data:$.param({tour:{tour_show_embed_info_block:!1}})},(this.sync||JuicerBackbone.sync).call(this,null,this,t)},r.prototype.handleEmbedLayoutPopover=function(){var e;return e={url:"/tour",type:"PUT",data:$.param({tour:{tour_show_embed_layout:!1}})},(this.sync||JuicerBackbone.sync).call(this,null,this,e)},r.prototype.handlePopoverHide=function(e){var t,i,r;return e.preventDefault(),e.stopPropagation(),t=e.target.dataset.key,r=e.target.parentNode.parentNode,i=r.parentNode,r.remove(),setTimeout(function(){return r.classList.add("hide-popover"),i.appendChild(r)},200),localStorage.setItem("hide"+t+"Popover",!0)},r}(JuicerBackbone.View)}.call(this),function(){var e=function(e,t){return function(){return e.apply(t,arguments)}},t=function(e,t){function r(){this.constructor=e}for(var n in t)i.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},i={}.hasOwnProperty;Juicer.Views.Slider=function(i){function r(){return this.posterImageHandler=e(this.posterImageHandler,this),this.imageHandler=e(this.imageHandler,this),this.setFeedItemHeight=e(this.setFeedItemHeight,this),this.beforeChange=e(this.beforeChange,this),r.__super__.constructor.apply(this,arguments)}return t(r,i),r.prototype.template=JST.feed,r.prototype.initialize=function(e){return this.columns=e.columns,this.interval=e.interval,this.isOnFeedsDashboard=e.isOnFeedsDashboard,this.slidesToShow=this.columns},r.prototype.render=function(){var e;return this.$el.append(this.template({isOnFeedsDashboard:this.isOnFeedsDashboard,feed:this.model})),this.$(".j-image, .j-image img, li.words, .slick-track").css({height:this.model.height()}),this.$el.slick(this.sliderSettings()),this.$el.on("beforeChange",this.beforeChange),this.$el.on("afterChange",(e=this,function(){return e.trigger("slide")})),window.imagesLoaded(this.$el,this.setFeedItemHeight),this.$el.hasClass("j-ie")&&this.setBackgroundImages(),jQuery(window).on("resize",_u.debounce(function(e){return function(){return e.setFeedItemHeight()}}(this),300)),this},r.prototype.beforeChange=function(e,t,i,r){if(0===r&&this.model.pollingAllowed())return this.model.fetchNewPosts(!1)},r.prototype.sliderSettings=function(){return jQuery.extend(this.sliderDefaults(),{responsive:this.breakpoints()})},r.prototype.breakpoints=function(){return _u.map(this.breakpointArray,(e=this,function(t){return{breakpoint:t[0],settings:{slidesToShow:_u.min([t[1],e.slidesToShow]),slidesToScroll:_u.min([t[1],e.slidesToShow])}}}));var e},r.prototype.breakpointArray=[[1700,6],[1450,5],[1024,4],[960,3],[786,2],[480,1]],r.prototype.sliderDefaults=function(){return{slidesToShow:this.slidesToShow,autoplay:0!==this.interval,autoplaySpeed:this.interval,slidesToScroll:this.slidesToShow,slide:"li",adaptiveHeight:0===!this.$("a.j-images").length,cssEase:"ease",pauseOnHover:!0,prevArrow:'',nextArrow:''}},r.prototype.setBackgroundImages=function(){return _u.each(this.$("[data-image]"),function(e){var t;return(t=jQuery(e)).css("background-image","url('"+t.data("image")+"')")})},r.prototype.setFeedItemHeight=function(e){return _u.each(this.$(".j-image img"),function(e){if(e.width>e.height)return jQuery(e).addClass("j-landscape")}),this.$(".j-image img, li.words, .slick-track").css({height:this.model.height()}),!this.model.get("lazy_load")&&(null!=e&&(_u.each(e.images,(t=this,function(e){var i;if(!e.isLoaded)return(i=t.$(e.img)).parents(".j-poster").length>0?t.posterImageHandler({target:i,feed:t.model,theme:"slider"}):t.imageHandler({target:i,feed:t.model,theme:"slider",testRefreshedImages:!0})})),jQuery(".words > .j-text").each(function(){return jQuery(this).css("display","none"),jQuery(this).height(),jQuery(this).css("display","")})));var t},r.prototype.imageHandler=function(e){return new Juicer.Views.ImageHandler(e)},r.prototype.posterImageHandler=function(e){return new Juicer.Views.PosterImageHandler(e)},r.prototype.stop=function(){return this.$el.slick("stop")},r.prototype.play=function(){return this.$el.slick("play")},r}(JuicerBackbone.View)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Views.SourceForm=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.template=JST.source_form,i.prototype.pleaseWait=JST.please_wait,i.prototype.sourceUnavailableForSmallPlan=JST["sources/source_unavailable_for_small_plan"],i.prototype.initialize=function(e){var t;return this.feed=e.feed,(new Juicer.Models.Plan).fetch({success:(t=this,function(e){return t.plan=e,t.currentPlanName=e.get("plan"),t.isTrial=e.get("trial")})}),this.socialAccounts=e.socialAccounts?e.socialAccounts:this.feed.get("social_accounts"),this.rendered=!1,this.submitting=!1,this.isLoading=!0},i.prototype.events=function(){return{'input #source_term[data-filter_invalid_instagram_hashtag_characters="true"]':"filterInvalidInstagramHashtagCharacters","click .add-a-hashtag li":"openHashtag",'click .js-source[data-term="hashtag"]':"openHashtag",'click .js-source:not([data-term="hashtag"])':"handleOverlay","submit .source-form":"createSource","click .source-type":"redrawOverlay","click a.social-account":"setOverlayStorage","click .search-result":"submitSearchResult"}},i.prototype.filterInvalidInstagramHashtagCharacters=function(){var e,t,i,r,n;if(r=(i=(e=$('#source_term[data-filter_invalid_instagram_hashtag_characters="true"]'))[0]).selectionStart,t=/[# \/]/gi,n=e.val(),t.test(n))return e.val(n.replace(t,"")),r--,i.setSelectionRange(r,r)},i.prototype.handleOverlay=function(e,t){var i,r;return null==t&&(t="username"),(i=$(e.target)).hasClass("j-social-icon")||(i=i.parents(".j-social-icon")),r=i.data("type"),window.mixpanel&&mixpanel.track("ui-action",{action:"social-icon-clicked",source:r,trial:juicerData.user.trial}),htmx.ajax("POST","/track",{values:{event_name:"source_selected",properties:{source_name:r}}}),juicerUtil.doesPlanContainPlatform(juicerData.user.plan,r)?this.openOverlay({type:t,source:r}):(alert("Sorry, please upgrade to a paid plan to create a "+r+" source."),!1)},i.prototype.openOverlay=function(e){return this.type=e.type,this.source=e.source,("Twitter"===this.source||"LinkedIn"===this.source||"Hashtag"===this.source&&this.feed&&this.feed.get("free_hashtags_disabled"))&&"small"===this.currentPlanName&&!1===this.isTrial?htmx.ajax("GET","/paywall?source=add_"+this.source.toLowerCase()+"_source",{target:"body",swap:"beforeend"}):(this.model=new Juicer.Models.Source({source:this.source,term_type:this.type}),this.renderOverlay())},i.prototype.openHashtag=function(e){return this.handleOverlay(e,"hashtag")},i.prototype.drawTemplate=function(){return this.template({source:this.model,feed:this.feed,plan:this.plan,type:this.type,results:this.results,socialAccounts:this.socialAccounts,isLoading:this.isLoading})},i.prototype.renderOverlay=function(){var e;if(this.overlay=new Juicer.Views.Overlay({content:this.drawTemplate(),element:this.el,width:"50%",close:!0}),this.overlay.render(),e=htmx.find(".load-form-async"),this.resultsNeedFetching()?(this.fetchResults(this.type),this.isLoading=!1):this.instagramHashtagStatusNeedsFetching()&&!e&&(this.fetchInstagramHashtagStatus(),this.isLoading=!1),e)return htmx.process(".new-source-container"),htmx.trigger(e,"click"),jQuery(".new-source-container").addClass("jcr-p-0"),jQuery(".new-source-container").parents(".j-overlay-content").addClass("jcr-w-[800px] jcr-rounded-xl"),jQuery(".new-source-container").parents(".j-overlay-content").find(".j-close").remove()},i.prototype.resultsNeedFetching=function(){var e;return e=this.socialAccounts.socialAccount("facebook"),"Facebook"===this.source&&e&&_u.contains(["username","groups","reviews"],this.type)&&this.rendered!==this.type},i.prototype.redrawOverlay=function(e){return e.preventDefault(),this.type=$(e.target).data("type"),"hashtag"===this.type&&"small"===this.currentPlanName&&!1===this.isTrial&&this.feed.get("free_hashtags_disabled")?htmx.ajax("GET","/paywall?source=add_hashtag_source",{target:"body",swap:"beforeend"}):(this.overlay.removeView(),this.renderOverlay())},i.prototype.fetchResults=function(e){return null==e&&(e="pages"),this.results=new Juicer.Collections.FacebookResults({type:e}),this.results.fetch({success:(t=this,function(){return t.rendered=t.type,t.renderOverlay()}),error:function(e){return function(){if(e.results.reset(),e.rendered=e.type,e.renderOverlay(),confirm("Something went wrong. Hit okay to go to the social accounts page and reset your Facebook token."))return window.location="/social-accounts"}}(this)});var t},i.prototype.instagramHashtagStatusNeedsFetching=function(){return"Instagram"===this.source&&"hashtag"===this.type&&"hashtag"!==this.rendered},i.prototype.setMissingInstagramBusinessAccounts=function(){return this.socialAccounts.findAllWithProvider("facebook").forEach(function(e){return e.set({instagramBusinessAccounts:[]})})},i.prototype.fetchInstagramHashtagStatus=function(){var e;if(this.socialAccounts.socialAccount("facebook"))return this.results=new Juicer.Collections.InstagramBusinessAccounts,this.results.fetch({success:(e=this,function(t){return 0===t.length&&e.setMissingInstagramBusinessAccounts(),e.rendered="hashtag",e.renderOverlay()}),error:function(e){return function(){return e.setMissingInstagramBusinessAccounts(),e.rendered="hashtag",e.renderOverlay()}}(this)})},i.prototype.createSource=function(e){var t,i;if(e.preventDefault(),!this.submitting)return this.submitting=!0,(t=$(e.target)).find("input[type=submit]").hide(),t.append("
    Loading...
    "),this.timeout=setTimeout((i=this,function(){return t.append(i.pleaseWait())}),5e3),t.find("ul.errors").remove(),window.hj&&window.hj("event","source_creation_initated"),this.submitSource(t.serializeHash())},i.prototype.submitSource=function(e){return this.model.set(e),this.model.save(null,{success:(t=this,function(e,i){if(t.submitting=!1,t.feedObject().set(i,{parse:!0}),t.feed.trigger("action"),t.timeout&&window.clearInterval(t.timeout),t.trigger("create",t.feed),juicerUtil.showFlashMessage(i.juicer_flash_message),"htmx"===t.feed.get("version"))return window.juicerUtil.updateSidebarSourcesMenu()}),error:function(e){return function(t,i){return e.submitting=!1,e.timeout&&window.clearInterval(e.timeout),new Juicer.Views.Errors({el:e.$("form"),errors:i,source:Juicer.Constants.PROVIDER_TO_SOURCE_MAP[e.model.findProvider()]||e.source})}}(this)});var t},i.prototype.feedObject=function(){return this.feed||(this.feed=new Juicer.Models.Feed)},i.prototype.submitSearchResult=function(e){var t;return e.preventDefault(),t=$(e.target),this.$(".result-term").val(t.data("id")),this.$(".result-name").val(t.data("name")),t.parents("form").trigger("submit")},i.prototype.setOverlayStorage=function(e){return e.preventDefault(),(new Juicer.Views.OverlayReopener).set({type:this.type,source:this.source}),window.location=jQuery(e.target).attr("href")},i}(JuicerBackbone.View)}.call(this),function(){var e=function(e,i){function r(){this.constructor=e}for(var n in i)t.call(i,n)&&(e[n]=i[n]);return r.prototype=i.prototype,e.prototype=new r,e.__super__=i.prototype,e},t={}.hasOwnProperty;Juicer.Views.UserAccount=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.prototype.initialize=function(){return this.toggleDigest()},i.prototype.events={"change input[type=checkbox]":"toggleDigest"},i.prototype.toggleDigest=function(){var e,t;return t=this.$("#user_digest"),e=this.$(".digest-label"),this.$("input[type=checkbox]").is(":checked")?(t.removeAttr("disabled"),e.removeClass("disabled")):(t.attr("disabled","disabled"),e.addClass("disabled"),t.val("Never"))},i}(JuicerBackbone.View)}.call(this),function(){var e=function(e,t){return function(){return e.apply(t,arguments)}},t=function(e,t){function r(){this.constructor=e}for(var n in t)i.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},i={}.hasOwnProperty;Juicer.Views.Widget=function(i){function r(){ return this.addPost=e(this.addPost,this),this.showNextPost=e(this.showNextPost,this),this.setPosts=e(this.setPosts,this),r.__super__.constructor.apply(this,arguments)}return t(r,i),r.prototype.template=JST.widget,r.prototype.card=JST["partials/_widget_card"],r.prototype.referral=JST["partials/_referral"],r.prototype.customCss=JST["partials/_custom_styles"],r.prototype.initialize=function(e){return this.interval=e.interval,this.isOnFeedsDashboard=e.isOnFeedsDashboard,this.index=0,this.setPosts(),this.render(),5e3!==this.model.get("interval")&&5e3===this.interval&&(this.interval=this.model.get("interval")),0===this.interval&&(this.interval=5e7),window.juicerWidget=this,this.id=setInterval(this.showNextPost,this.interval)},r.prototype.setPosts=function(){return this.posts=this.model.get("posts").models},r.prototype.render=function(){return this.$el.append(this.template({model:this.model,first:this.posts[this.index],isOnFeedsDashboard:this.isOnFeedsDashboard,second:this.posts[this.index+1]})),this.container=this.$(".flip-container"),this.handleReferral(),this.handleBrokenImages(),this.$el.append(this.customCss({feed:this.model}))},r.prototype.handleBrokenImages=function(){return new Juicer.Views.BrokenImage({el:this.el,feed:this.model})},r.prototype.showNextPost=function(){if(this.container.toggleClass("flip"),setTimeout(this.addPost,600),this.index++,this.index>=this.posts.length-1)return this.model.pollingAllowed()&&this.model.fetchNewPosts(!1),this.index=-1},r.prototype.addPost=function(){return this.element().html(this.card({isOnFeedsDashboard:this.isOnFeedsDashboard,post:this.posts[this.index+1],truncate:this.truncate})),this.handleBrokenImages()},r.prototype.element=function(){return this.container.hasClass("flip")?this.$(".front"):this.$(".back")},r.prototype.other=function(){return this.element().siblings()},r.prototype.handleReferral=function(){if(this.model.paid()||this.isOnFeedsDashboard||this.$el.find("h1.referral").length>0||this.$el.append(this.referral({feed:this.model})),this.model.paid())return this.$el.find("h1.referral").remove()},r.prototype.close=function(){return null!=this.id&&window.clearInterval(this.id),this.$el.empty().off(),this.stopListening(),this},r}(JuicerBackbone.View)}.call(this),Juicer.Constants=Juicer.Constants||{},Juicer.railsSetup?Juicer.Constants.API_ROOT=Juicer.Constants.API_ROOT||"":Juicer.Constants.API_ROOT=Juicer.Constants.API_ROOT||"//www.juicer.io",Juicer.Constants.BASE_URL="https://www.juicer.io",Juicer.Constants.FACEBOOK_APP_ID="731223346944897",Juicer.Constants.FEED_CLASSES=["modern","night","polaroid","image-grid","widget","slider","hip","living-wall","autoscroll"],Juicer.Constants.HELP_CENTER_URL="http://help.juicer.io/hc/en-us",Juicer.Constants.MINIMUM_ENTERPRISE_FEE_IN_DOLLARS=199,Juicer.Constants.PAID_ONLY_PLATFORMS=[],Juicer.Constants.PLATFORMS_WITHOUT_LIKES=["LinkedIn","Instagram","Blog","Giphy","YouTube"],Juicer.Constants.PAID_PLANS=["mini_lite","ad_free","lite","medium","large","team","enterprise","custom","archive"],Juicer.Constants.PLAN_TO_DISPLAY_NAME={small:"Free",mini_lite:"Mini Lite",lite:"Lite",medium:"Starter",large:"Pro",team:"Team",enterprise:"Enterprise",ad_free:"Ad-Free",archive:"Archive",custom:"Custom"},Juicer.Constants.SOURCES_REQUIRING_OAUTH_TOKENS=["Facebook","Instagram","Slack","TikTok"],Juicer.Constants.SOURCES_WHERE_POSTS_CAN_BE_ADDED_MANUALLY=["Facebook","LinkedIn","Soundcloud","Tumblr","Twitter","Vimeo","YouTube","Instagram"],Juicer.Constants.SOURCE_TO_PROVIDER_MAP={Facebook:"facebook",Instagram:"instagram_login",Slack:"slack",Tumblr:"tumblr",TwitterAPIv2:"twitter",TwitterV3:"twitter",TwitterV4:"twitter",TikTok:"tiktok"},Juicer.Constants.PROVIDER_TO_SOURCE_MAP={facebook:"Facebook",instagram_login:"Instagram",slack:"Slack",tumblr:"Tumblr",tiktok:"TikTok"},Juicer.Constants.PROVIDERS_WITH_MULTIPLE_SOCIAL_ACCOUNTS=["instagram_login","instagramreels","tiktok"],Juicer.Constants.STRIPE_PUBLISHABLE_KEY="pk_live_O4R3D1OryggCLZEsquEjTNBW",Juicer.Constants.SVG_ICONS={externalLink:'',play:''},Juicer.Constants.REQUEST_FEATURE_URL="https://feedback.juicer.io/?t=requests",Juicer.Constants.PAGE_URL_EMBED_CODE_ORIGIN="embed-code",Juicer.Constants.PAGE_URL_DASHBOARD_ORIGIN="dashboard",Juicer.Constants.AUTH_WINDOW_SOFT_RELEASE_DATE="2026-05-19T00:00:00+00:00",Juicer.Constants.CRAVLER_USER_AGENTS=["200pleasebot","360spider","abot","addthis","adldxbot","admantx","adsbot-google","adstxtcrawler","advbot","ahrefsbot","alexa","anderspink","apache-httpclient","apachebench","apis-google","appengine-google","applebot","appsignal","archive.org_bot","archiveteam archivebot","ask jeeves","asynchttpclient","awe.sm","baidu","barkrowler","bdcbot","bingbot","bingpreview","bitlybot","blekkobot","blexbot","bot@linkfluence.net","bubing","bufferbot","buibui-checkbot","butterfly","buzzbot","buzztalk","catchbot","check_http","checkly","chrome-lighthouse","cipacrawler","cliqzbot","cloudflare","cmradar/0.1","coldfusion","commoncrawl","comodo ssl checker","comodo-webinspector-crawler","copypants","crowsnest","curabot","curl","dap/nethttp","datafeedwatch","datagnionbot","datanyze","daumoa","developers.google.com/+/web/snippet/","diffbot","digitalpersona fingerprint software","domain re-animator bot","domainsbot","domaintunocrawler","dotbot","duckduckbot","elb-healthchecker","embedly","eoaagent","everyonesocialbot","evrinid","exabot","exaleadcloudview","ez publish","facebookexternalhit","facebot","feedburner","feedfetcher-google","findxbot","flipboardproxy","friendfeedbot","fyrebot","garlik","genieo","germcrawler","getprismatic.com","gigabot","gimme60bot","gimmeusabot","go http package","go-http-client","google page speed insights","google web preview","google-site-verification","google-structured-data-testing-tool","google-structureddatatestingtool","google-xrawler","googlebot","googleimageproxy","googlestackdrivermonitoring-uptimechecks","grapeshotcrawler","gravitybot","hatena::bookmark","heritrix","https://developers.google.com/+/web/snippet","httrack","hubspot","ia_archiver","icoreservice","idmarch","implisensebot","inagist","insieve","insitesbot","instapaper","istellabot","jaunt","jetslide","jobseeker","jooble","js-kit","kemvibot","kimengi","knows.is","kojitsubot","komodiabot","kraken","laconica","lijit crawler","linkdexbot","linkedinbot","linkscrawler","linode","lipperhey","livelapbot","loadtimebot","longurl","ltx71","lumibot","magpie-crawler","mail.ru_bot","mappydata","mastodon","mauibot","meanpathbot","mediapartners-google","megaindex.ru","memorybot","metauri","mfe_expand","mir web crawler","mj12bot","mojeekbot","ms search 6.0 robot","msnbot-media","msnbot","nerdybot","netcraft","netstate","netvibes","netzcheckbot","newrelicmonitor","newrelicpinger","newsme","niki-bot","ning","nutch","openhosebot","orangebot","paessler","pagesinventory","panopta","paperlibot","peerindex","percolatecrawler","perfectmarketkwtbot","phantomjs","pingdom","pinterest","plukkie","pr-cy.ru","privacyawarebot","proximic","psbot-page","pu_in","publiclibraryarchive.org","pycurl","python-httplib2","python-requests","python-urllib","queryseeker","quick-crawler","quicklook","re-animator","readability","rebelmouse","redditbot","relateiq","riddler","rogerbot","rssmicro","scouturlmonitor","scrapy","screaming frog seo spider","searchmetricsbot","semanticbot","semrushbot","seo-audit","seobilitybot","seodiver","seokicks","seznambot","shopwiki","shortlinktranslate","showyoubot","siege","sistrix","sitecheck","siteuptime","skypeuripreview","slack-imgproxy","slack-linkexpanding","slack","slackbot","slurp","smtbot","snapchat","socialrank","sogou","spbot","spinn3r","sputnikbot","squider","statuscake","swiftbot","tangibleebot","teeraid","test certificate info","the knowledge ai","tineye","traackr","trendictionbot","trendsmap","turnitinbot","tweetedtimes","tweetmemebot","twikle","twitjobsearch","twitmunin","twitterbot","twurly","typhoeus","umbot","unwindfetch","updown","uptimerobot","vagabondo","vb project","vigil","vkshare","voilabot","vrcrawler","wasalive-bot","watchsumo","wbsearchbot","webceo","webscout","wesee","wget","whatsapp","wikido","woorank","wordpress","woriobot","wormly","wotbox","xenu link sleuth","xing-contenttabreceiver","xovibot","yacybot","yahoo-ad-monitoring","yandex","yanga","yeti","yourls","zabbix","zelist.ro","zibb","zitebot","zoombot","zoominfobot","zyborg","amazonbot","anthropic-ai","bytespider","ccbot","chatgpt-user","claude-web","cohere-ai","facebookbot","google-extended","googleother","gptbot","omgili","perplexitybot","webz.io","youbot","httpie","eventmachine httpclient","go 1.1 package http","htmlparser","http_request2","httpclient","jakarta commons","java","libwww-perl","lwp-trivial","ruby"];