/*! jQuery v1.9.0 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license */(function(e,t){"use strict";function n(e){var t=e.length,n=st.type(e);return st.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}function r(e){var t=Tt[e]={};return st.each(e.match(lt)||[],function(e,n){t[n]=!0}),t}function i(e,n,r,i){if(st.acceptData(e)){var o,a,s=st.expando,u="string"==typeof n,l=e.nodeType,c=l?st.cache:e,f=l?e[s]:e[s]&&s;if(f&&c[f]&&(i||c[f].data)||!u||r!==t)return f||(l?e[s]=f=K.pop()||st.guid++:f=s),c[f]||(c[f]={},l||(c[f].toJSON=st.noop)),("object"==typeof n||"function"==typeof n)&&(i?c[f]=st.extend(c[f],n):c[f].data=st.extend(c[f].data,n)),o=c[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[st.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[st.camelCase(n)])):a=o,a}}function o(e,t,n){if(st.acceptData(e)){var r,i,o,a=e.nodeType,u=a?st.cache:e,l=a?e[st.expando]:st.expando;if(u[l]){if(t&&(r=n?u[l]:u[l].data)){st.isArray(t)?t=t.concat(st.map(t,st.camelCase)):t in r?t=[t]:(t=st.camelCase(t),t=t in r?[t]:t.split(" "));for(i=0,o=t.length;o>i;i++)delete r[t[i]];if(!(n?s:st.isEmptyObject)(r))return}(n||(delete u[l].data,s(u[l])))&&(a?st.cleanData([e],!0):st.support.deleteExpando||u!=u.window?delete u[l]:u[l]=null)}}}function a(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(Nt,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:wt.test(r)?st.parseJSON(r):r}catch(o){}st.data(e,n,r)}else r=t}return r}function s(e){var t;for(t in e)if(("data"!==t||!st.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function u(){return!0}function l(){return!1}function c(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function f(e,t,n){if(t=t||0,st.isFunction(t))return st.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return st.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=st.grep(e,function(e){return 1===e.nodeType});if(Wt.test(t))return st.filter(t,r,!n);t=st.filter(t,r)}return st.grep(e,function(e){return st.inArray(e,t)>=0===n})}function p(e){var t=zt.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function d(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function h(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function g(e){var t=nn.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function m(e,t){for(var n,r=0;null!=(n=e[r]);r++)st._data(n,"globalEval",!t||st._data(t[r],"globalEval"))}function y(e,t){if(1===t.nodeType&&st.hasData(e)){var n,r,i,o=st._data(e),a=st._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)st.event.add(t,n,s[n][r])}a.data&&(a.data=st.extend({},a.data))}}function v(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!st.support.noCloneEvent&&t[st.expando]){r=st._data(t);for(i in r.events)st.removeEvent(t,i,r.handle);t.removeAttribute(st.expando)}"script"===n&&t.text!==e.text?(h(t).text=e.text,g(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),st.support.html5Clone&&e.innerHTML&&!st.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Zt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}function b(e,n){var r,i,o=0,a=e.getElementsByTagName!==t?e.getElementsByTagName(n||"*"):e.querySelectorAll!==t?e.querySelectorAll(n||"*"):t;if(!a)for(a=[],r=e.childNodes||e;null!=(i=r[o]);o++)!n||st.nodeName(i,n)?a.push(i):st.merge(a,b(i,n));return n===t||n&&st.nodeName(e,n)?st.merge([e],a):a}function x(e){Zt.test(e.type)&&(e.defaultChecked=e.checked)}function T(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Nn.length;i--;)if(t=Nn[i]+n,t in e)return t;return r}function w(e,t){return e=t||e,"none"===st.css(e,"display")||!st.contains(e.ownerDocument,e)}function N(e,t){for(var n,r=[],i=0,o=e.length;o>i;i++)n=e[i],n.style&&(r[i]=st._data(n,"olddisplay"),t?(r[i]||"none"!==n.style.display||(n.style.display=""),""===n.style.display&&w(n)&&(r[i]=st._data(n,"olddisplay",S(n.nodeName)))):r[i]||w(n)||st._data(n,"olddisplay",st.css(n,"display")));for(i=0;o>i;i++)n=e[i],n.style&&(t&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=t?r[i]||"":"none"));return e}function C(e,t,n){var r=mn.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function k(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;4>o;o+=2)"margin"===n&&(a+=st.css(e,n+wn[o],!0,i)),r?("content"===n&&(a-=st.css(e,"padding"+wn[o],!0,i)),"margin"!==n&&(a-=st.css(e,"border"+wn[o]+"Width",!0,i))):(a+=st.css(e,"padding"+wn[o],!0,i),"padding"!==n&&(a+=st.css(e,"border"+wn[o]+"Width",!0,i)));return a}function E(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=ln(e),a=st.support.boxSizing&&"border-box"===st.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=un(e,t,o),(0>i||null==i)&&(i=e.style[t]),yn.test(i))return i;r=a&&(st.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+k(e,t,n||(a?"border":"content"),r,o)+"px"}function S(e){var t=V,n=bn[e];return n||(n=A(e,t),"none"!==n&&n||(cn=(cn||st("
").css("cssText","display:block !important")).appendTo(t.documentElement),t=(cn[0].contentWindow||cn[0].contentDocument).document,t.write(""),t.close(),n=A(e,t),cn.detach()),bn[e]=n),n}function A(e,t){var n=st(t.createElement(e)).appendTo(t.body),r=st.css(n[0],"display");return n.remove(),r}function j(e,t,n,r){var i;if(st.isArray(t))st.each(t,function(t,i){n||kn.test(e)?r(e,i):j(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==st.type(t))r(e,t);else for(i in t)j(e+"["+i+"]",t[i],n,r)}function D(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(lt)||[];if(st.isFunction(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function L(e,n,r,i){function o(u){var l;return a[u]=!0,st.each(e[u]||[],function(e,u){var c=u(n,r,i);return"string"!=typeof c||s||a[c]?s?!(l=c):t:(n.dataTypes.unshift(c),o(c),!1)}),l}var a={},s=e===$n;return o(n.dataTypes[0])||!a["*"]&&o("*")}function H(e,n){var r,i,o=st.ajaxSettings.flatOptions||{};for(r in n)n[r]!==t&&((o[r]?e:i||(i={}))[r]=n[r]);return i&&st.extend(!0,e,i),e}function M(e,n,r){var i,o,a,s,u=e.contents,l=e.dataTypes,c=e.responseFields;for(o in c)o in r&&(n[c[o]]=r[o]);for(;"*"===l[0];)l.shift(),i===t&&(i=e.mimeType||n.getResponseHeader("Content-Type"));if(i)for(o in u)if(u[o]&&u[o].test(i)){l.unshift(o);break}if(l[0]in r)a=l[0];else{for(o in r){if(!l[0]||e.converters[o+" "+l[0]]){a=o;break}s||(s=o)}a=a||s}return a?(a!==l[0]&&l.unshift(a),r[a]):t}function q(e,t){var n,r,i,o,a={},s=0,u=e.dataTypes.slice(),l=u[0];if(e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u[1])for(n in e.converters)a[n.toLowerCase()]=e.converters[n];for(;i=u[++s];)if("*"!==i){if("*"!==l&&l!==i){if(n=a[l+" "+i]||a["* "+i],!n)for(r in a)if(o=r.split(" "),o[1]===i&&(n=a[l+" "+o[0]]||a["* "+o[0]])){n===!0?n=a[r]:a[r]!==!0&&(i=o[0],u.splice(s--,0,i));break}if(n!==!0)if(n&&e["throws"])t=n(t);else try{t=n(t)}catch(c){return{state:"parsererror",error:n?c:"No conversion from "+l+" to "+i}}}l=i}return{state:"success",data:t}}function _(){try{return new e.XMLHttpRequest}catch(t){}}function F(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function O(){return setTimeout(function(){Qn=t}),Qn=st.now()}function B(e,t){st.each(t,function(t,n){for(var r=(rr[t]||[]).concat(rr["*"]),i=0,o=r.length;o>i;i++)if(r[i].call(e,t,n))return})}function P(e,t,n){var r,i,o=0,a=nr.length,s=st.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=Qn||O(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;u>a;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),1>o&&u?n:(s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:st.extend({},t),opts:st.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Qn||O(),duration:n.duration,tweens:[],createTween:function(t,n){var r=st.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return t?s.resolveWith(e,[l,t]):s.rejectWith(e,[l,t]),this}}),c=l.props;for(R(c,l.opts.specialEasing);a>o;o++)if(r=nr[o].call(l,e,c,l.opts))return r;return B(l,c),st.isFunction(l.opts.start)&&l.opts.start.call(e,l),st.fx.timer(st.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function R(e,t){var n,r,i,o,a;for(n in e)if(r=st.camelCase(n),i=t[r],o=e[n],st.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=st.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function W(e,t,n){var r,i,o,a,s,u,l,c,f,p=this,d=e.style,h={},g=[],m=e.nodeType&&w(e);n.queue||(c=st._queueHooks(e,"fx"),null==c.unqueued&&(c.unqueued=0,f=c.empty.fire,c.empty.fire=function(){c.unqueued||f()}),c.unqueued++,p.always(function(){p.always(function(){c.unqueued--,st.queue(e,"fx").length||c.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===st.css(e,"display")&&"none"===st.css(e,"float")&&(st.support.inlineBlockNeedsLayout&&"inline"!==S(e.nodeName)?d.zoom=1:d.display="inline-block")),n.overflow&&(d.overflow="hidden",st.support.shrinkWrapBlocks||p.done(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}));for(r in t)if(o=t[r],Zn.exec(o)){if(delete t[r],u=u||"toggle"===o,o===(m?"hide":"show"))continue;g.push(r)}if(a=g.length){s=st._data(e,"fxshow")||st._data(e,"fxshow",{}),"hidden"in s&&(m=s.hidden),u&&(s.hidden=!m),m?st(e).show():p.done(function(){st(e).hide()}),p.done(function(){var t;st._removeData(e,"fxshow");for(t in h)st.style(e,t,h[t])});for(r=0;a>r;r++)i=g[r],l=p.createTween(i,m?s[i]:0),h[i]=s[i]||st.style(e,i),i in s||(s[i]=l.start,m&&(l.end=l.start,l.start="width"===i||"height"===i?1:0))}}function $(e,t,n,r,i){return new $.prototype.init(e,t,n,r,i)}function I(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=wn[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function z(e){return st.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}var X,U,V=e.document,Y=e.location,J=e.jQuery,G=e.$,Q={},K=[],Z="1.9.0",et=K.concat,tt=K.push,nt=K.slice,rt=K.indexOf,it=Q.toString,ot=Q.hasOwnProperty,at=Z.trim,st=function(e,t){return new st.fn.init(e,t,X)},ut=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,lt=/\S+/g,ct=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ft=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,pt=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,dt=/^[\],:{}\s]*$/,ht=/(?:^|:|,)(?:\s*\[)+/g,gt=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,mt=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,yt=/^-ms-/,vt=/-([\da-z])/gi,bt=function(e,t){return t.toUpperCase()},xt=function(){V.addEventListener?(V.removeEventListener("DOMContentLoaded",xt,!1),st.ready()):"complete"===V.readyState&&(V.detachEvent("onreadystatechange",xt),st.ready())};st.fn=st.prototype={jquery:Z,constructor:st,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:ft.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof st?n[0]:n,st.merge(this,st.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:V,!0)),pt.test(i[1])&&st.isPlainObject(n))for(i in n)st.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=V.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=V,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):st.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),st.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return nt.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=st.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return st.each(this,e,t)},ready:function(e){return st.ready.promise().done(e),this},slice:function(){return this.pushStack(nt.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(st.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:tt,sort:[].sort,splice:[].splice},st.fn.init.prototype=st.fn,st.extend=st.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),"object"==typeof s||st.isFunction(s)||(s={}),l===u&&(s=this,--u);l>u;u++)if(null!=(e=arguments[u]))for(n in e)r=s[n],i=e[n],s!==i&&(c&&i&&(st.isPlainObject(i)||(o=st.isArray(i)))?(o?(o=!1,a=r&&st.isArray(r)?r:[]):a=r&&st.isPlainObject(r)?r:{},s[n]=st.extend(c,a,i)):i!==t&&(s[n]=i));return s},st.extend({noConflict:function(t){return e.$===st&&(e.$=G),t&&e.jQuery===st&&(e.jQuery=J),st},isReady:!1,readyWait:1,holdReady:function(e){e?st.readyWait++:st.ready(!0)},ready:function(e){if(e===!0?!--st.readyWait:!st.isReady){if(!V.body)return setTimeout(st.ready);st.isReady=!0,e!==!0&&--st.readyWait>0||(U.resolveWith(V,[st]),st.fn.trigger&&st(V).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===st.type(e)},isArray:Array.isArray||function(e){return"array"===st.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?Q[it.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==st.type(e)||e.nodeType||st.isWindow(e))return!1;try{if(e.constructor&&!ot.call(e,"constructor")&&!ot.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||ot.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||V;var r=pt.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=st.buildFragment([e],t,i),i&&st(i).remove(),st.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=st.trim(n),n&&dt.test(n.replace(gt,"@").replace(mt,"]").replace(ht,"")))?Function("return "+n)():(st.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||st.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&st.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(yt,"ms-").replace(vt,bt)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,r){var i,o=0,a=e.length,s=n(e);if(r){if(s)for(;a>o&&(i=t.apply(e[o],r),i!==!1);o++);else for(o in e)if(i=t.apply(e[o],r),i===!1)break}else if(s)for(;a>o&&(i=t.call(e[o],o,e[o]),i!==!1);o++);else for(o in e)if(i=t.call(e[o],o,e[o]),i===!1)break;return e},trim:at&&!at.call("\ufeff\u00a0")?function(e){return null==e?"":at.call(e)}:function(e){return null==e?"":(e+"").replace(ct,"")},makeArray:function(e,t){var r=t||[];return null!=e&&(n(Object(e))?st.merge(r,"string"==typeof e?[e]:e):tt.call(r,e)),r},inArray:function(e,t,n){var r;if(t){if(rt)return rt.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else for(;n[o]!==t;)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,r){var i,o=0,a=e.length,s=n(e),u=[];if(s)for(;a>o;o++)i=t(e[o],o,r),null!=i&&(u[u.length]=i);else for(o in e)i=t(e[o],o,r),null!=i&&(u[u.length]=i);return et.apply([],u)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(r=e[n],n=e,e=r),st.isFunction(e)?(i=nt.call(arguments,2),o=function(){return e.apply(n||this,i.concat(nt.call(arguments)))},o.guid=e.guid=e.guid||st.guid++,o):t},access:function(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===st.type(r)){o=!0;for(u in r)st.access(e,n,u,r[u],!0,a,s)}else if(i!==t&&(o=!0,st.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(st(e),n)})),n))for(;l>u;u++)n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):a},now:function(){return(new Date).getTime()}}),st.ready.promise=function(t){if(!U)if(U=st.Deferred(),"complete"===V.readyState)setTimeout(st.ready);else if(V.addEventListener)V.addEventListener("DOMContentLoaded",xt,!1),e.addEventListener("load",st.ready,!1);else{V.attachEvent("onreadystatechange",xt),e.attachEvent("onload",st.ready);var n=!1;try{n=null==e.frameElement&&V.documentElement}catch(r){}n&&n.doScroll&&function i(){if(!st.isReady){try{n.doScroll("left")}catch(e){return setTimeout(i,50)}st.ready()}}()}return U.promise(t)},st.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){Q["[object "+t+"]"]=t.toLowerCase()}),X=st(V);var Tt={};st.Callbacks=function(e){e="string"==typeof e?Tt[e]||r(e):st.extend({},e);var n,i,o,a,s,u,l=[],c=!e.once&&[],f=function(t){for(n=e.memory&&t,i=!0,u=a||0,a=0,s=l.length,o=!0;l&&s>u;u++)if(l[u].apply(t[0],t[1])===!1&&e.stopOnFalse){n=!1;break}o=!1,l&&(c?c.length&&f(c.shift()):n?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function r(t){st.each(t,function(t,n){var i=st.type(n);"function"===i?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==i&&r(n)})})(arguments),o?s=l.length:n&&(a=t,f(n))}return this},remove:function(){return l&&st.each(arguments,function(e,t){for(var n;(n=st.inArray(t,l,n))>-1;)l.splice(n,1),o&&(s>=n&&s--,u>=n&&u--)}),this},has:function(e){return st.inArray(e,l)>-1},empty:function(){return l=[],this},disable:function(){return l=c=n=t,this},disabled:function(){return!l},lock:function(){return c=t,n||p.disable(),this},locked:function(){return!c},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!l||i&&!c||(o?c.push(t):f(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},st.extend({Deferred:function(e){var t=[["resolve","done",st.Callbacks("once memory"),"resolved"],["reject","fail",st.Callbacks("once memory"),"rejected"],["notify","progress",st.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return st.Deferred(function(n){st.each(t,function(t,o){var a=o[0],s=st.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&st.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?st.extend(e,r):r}},i={};return r.pipe=r.then,st.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=nt.call(arguments),a=o.length,s=1!==a||e&&st.isFunction(e.promise)?a:0,u=1===s?e:st.Deferred(),l=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?nt.call(arguments):i,r===t?u.notifyWith(n,r):--s||u.resolveWith(n,r)}};if(a>1)for(t=Array(a),n=Array(a),r=Array(a);a>i;i++)o[i]&&st.isFunction(o[i].promise)?o[i].promise().done(l(i,r,o)).fail(u.reject).progress(l(i,n,t)):--s;return s||u.resolveWith(r,o),u.promise()}}),st.support=function(){var n,r,i,o,a,s,u,l,c,f,p=V.createElement("div");if(p.setAttribute("className","t"),p.innerHTML="
a ",r=p.getElementsByTagName("*"),i=p.getElementsByTagName("a")[0],!r||!i||!r.length)return{};o=V.createElement("select"),a=o.appendChild(V.createElement("option")),s=p.getElementsByTagName("input")[0],i.style.cssText="top:1px;float:left;opacity:.5",n={getSetAttribute:"t"!==p.className,leadingWhitespace:3===p.firstChild.nodeType,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(i.getAttribute("style")),hrefNormalized:"/a"===i.getAttribute("href"),opacity:/^0.5/.test(i.style.opacity),cssFloat:!!i.style.cssFloat,checkOn:!!s.value,optSelected:a.selected,enctype:!!V.createElement("form").enctype,html5Clone:"<:nav>"!==V.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===V.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},s.checked=!0,n.noCloneChecked=s.cloneNode(!0).checked,o.disabled=!0,n.optDisabled=!a.disabled;try{delete p.test}catch(d){n.deleteExpando=!1}s=V.createElement("input"),s.setAttribute("value",""),n.input=""===s.getAttribute("value"),s.value="t",s.setAttribute("type","radio"),n.radioValue="t"===s.value,s.setAttribute("checked","t"),s.setAttribute("name","t"),u=V.createDocumentFragment(),u.appendChild(s),n.appendChecked=s.checked,n.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,p.attachEvent&&(p.attachEvent("onclick",function(){n.noCloneEvent=!1}),p.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})p.setAttribute(l="on"+f,"t"),n[f+"Bubbles"]=l in e||p.attributes[l].expando===!1;return p.style.backgroundClip="content-box",p.cloneNode(!0).style.backgroundClip="",n.clearCloneStyle="content-box"===p.style.backgroundClip,st(function(){var r,i,o,a="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",s=V.getElementsByTagName("body")[0];s&&(r=V.createElement("div"),r.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",s.appendChild(r).appendChild(p),p.innerHTML="
",o=p.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",c=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",n.reliableHiddenOffsets=c&&0===o[0].offsetHeight,p.innerHTML="",p.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",n.boxSizing=4===p.offsetWidth,n.doesNotIncludeMarginInBodyOffset=1!==s.offsetTop,e.getComputedStyle&&(n.pixelPosition="1%"!==(e.getComputedStyle(p,null)||{}).top,n.boxSizingReliable="4px"===(e.getComputedStyle(p,null)||{width:"4px"}).width,i=p.appendChild(V.createElement("div")),i.style.cssText=p.style.cssText=a,i.style.marginRight=i.style.width="0",p.style.width="1px",n.reliableMarginRight=!parseFloat((e.getComputedStyle(i,null)||{}).marginRight)),p.style.zoom!==t&&(p.innerHTML="",p.style.cssText=a+"width:1px;padding:1px;display:inline;zoom:1",n.inlineBlockNeedsLayout=3===p.offsetWidth,p.style.display="block",p.innerHTML="
",p.firstChild.style.width="5px",n.shrinkWrapBlocks=3!==p.offsetWidth,s.style.zoom=1),s.removeChild(r),r=p=o=i=null)}),r=o=u=a=i=s=null,n}();var wt=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,Nt=/([A-Z])/g;st.extend({cache:{},expando:"jQuery"+(Z+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?st.cache[e[st.expando]]:e[st.expando],!!e&&!s(e)},data:function(e,t,n){return i(e,t,n,!1)},removeData:function(e,t){return o(e,t,!1)},_data:function(e,t,n){return i(e,t,n,!0)},_removeData:function(e,t){return o(e,t,!0)},acceptData:function(e){var t=e.nodeName&&st.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),st.fn.extend({data:function(e,n){var r,i,o=this[0],s=0,u=null;if(e===t){if(this.length&&(u=st.data(o),1===o.nodeType&&!st._data(o,"parsedAttrs"))){for(r=o.attributes;r.length>s;s++)i=r[s].name,i.indexOf("data-")||(i=st.camelCase(i.substring(5)),a(o,i,u[i]));st._data(o,"parsedAttrs",!0)}return u}return"object"==typeof e?this.each(function(){st.data(this,e)}):st.access(this,function(n){return n===t?o?a(o,e,st.data(o,e)):null:(this.each(function(){st.data(this,e,n)}),t)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){st.removeData(this,e)})}}),st.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=st._data(e,n),r&&(!i||st.isArray(r)?i=st._data(e,n,st.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=st.queue(e,t),r=n.length,i=n.shift(),o=st._queueHooks(e,t),a=function(){st.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return st._data(e,n)||st._data(e,n,{empty:st.Callbacks("once memory").add(function(){st._removeData(e,t+"queue"),st._removeData(e,n)})})}}),st.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?st.queue(this[0],e):n===t?this:this.each(function(){var t=st.queue(this,e,n);st._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&st.dequeue(this,e)})},dequeue:function(e){return this.each(function(){st.dequeue(this,e)})},delay:function(e,t){return e=st.fx?st.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=st.Deferred(),a=this,s=this.length,u=function(){--i||o.resolveWith(a,[a])};for("string"!=typeof e&&(n=e,e=t),e=e||"fx";s--;)r=st._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u));return u(),o.promise(n)}});var Ct,kt,Et=/[\t\r\n]/g,St=/\r/g,At=/^(?:input|select|textarea|button|object)$/i,jt=/^(?:a|area)$/i,Dt=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,Lt=/^(?:checked|selected)$/i,Ht=st.support.getSetAttribute,Mt=st.support.input;st.fn.extend({attr:function(e,t){return st.access(this,st.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){st.removeAttr(this,e)})},prop:function(e,t){return st.access(this,st.prop,e,t,arguments.length>1)},removeProp:function(e){return e=st.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,u="string"==typeof e&&e;if(st.isFunction(e))return this.each(function(t){st(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(lt)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(Et," "):" ")){for(o=0;i=t[o++];)0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=st.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,u=0===arguments.length||"string"==typeof e&&e;if(st.isFunction(e))return this.each(function(t){st(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(lt)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(Et," "):"")){for(o=0;i=t[o++];)for(;r.indexOf(" "+i+" ")>=0;)r=r.replace(" "+i+" "," ");n.className=e?st.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return st.isFunction(e)?this.each(function(n){st(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n)for(var i,o=0,a=st(this),s=t,u=e.match(lt)||[];i=u[o++];)s=r?s:!a.hasClass(i),a[s?"addClass":"removeClass"](i);else("undefined"===n||"boolean"===n)&&(this.className&&st._data(this,"__className__",this.className),this.className=this.className||e===!1?"":st._data(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,r=this.length;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(Et," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=st.isFunction(e),this.each(function(r){var o,a=st(this);1===this.nodeType&&(o=i?e.call(this,r,a.val()):e,null==o?o="":"number"==typeof o?o+="":st.isArray(o)&&(o=st.map(o,function(e){return null==e?"":e+""})),n=st.valHooks[this.type]||st.valHooks[this.nodeName.toLowerCase()],n&&"set"in n&&n.set(this,o,"value")!==t||(this.value=o))});if(o)return n=st.valHooks[o.type]||st.valHooks[o.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(o,"value"))!==t?r:(r=o.value,"string"==typeof r?r.replace(St,""):null==r?"":r)}}}),st.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;s>u;u++)if(n=r[u],!(!n.selected&&u!==i||(st.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&st.nodeName(n.parentNode,"optgroup"))){if(t=st(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n=st.makeArray(t);return st(e).find("option").each(function(){this.selected=st.inArray(st(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return e.getAttribute===t?st.prop(e,n,r):(a=1!==s||!st.isXMLDoc(e),a&&(n=n.toLowerCase(),o=st.attrHooks[n]||(Dt.test(n)?kt:Ct)),r===t?o&&a&&"get"in o&&null!==(i=o.get(e,n))?i:(e.getAttribute!==t&&(i=e.getAttribute(n)),null==i?t:i):null!==r?o&&a&&"set"in o&&(i=o.set(e,r,n))!==t?i:(e.setAttribute(n,r+""),r):(st.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(lt);if(o&&1===e.nodeType)for(;n=o[i++];)r=st.propFix[n]||n,Dt.test(n)?!Ht&&Lt.test(n)?e[st.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:st.attr(e,n,""),e.removeAttribute(Ht?n:r)},attrHooks:{type:{set:function(e,t){if(!st.support.radioValue&&"radio"===t&&st.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!st.isXMLDoc(e),a&&(n=st.propFix[n]||n,o=st.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):At.test(e.nodeName)||jt.test(e.nodeName)&&e.href?0:t}}}}),kt={get:function(e,n){var r=st.prop(e,n),i="boolean"==typeof r&&e.getAttribute(n),o="boolean"==typeof r?Mt&&Ht?null!=i:Lt.test(n)?e[st.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return o&&o.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?st.removeAttr(e,n):Mt&&Ht||!Lt.test(n)?e.setAttribute(!Ht&&st.propFix[n]||n,n):e[st.camelCase("default-"+n)]=e[n]=!0,n}},Mt&&Ht||(st.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return st.nodeName(e,"input")?e.defaultValue:r&&r.specified?r.value:t
},set:function(e,n,r){return st.nodeName(e,"input")?(e.defaultValue=n,t):Ct&&Ct.set(e,n,r)}}),Ht||(Ct=st.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&("id"===n||"name"===n||"coords"===n?""!==r.value:r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},st.attrHooks.contenteditable={get:Ct.get,set:function(e,t,n){Ct.set(e,""===t?!1:t,n)}},st.each(["width","height"],function(e,n){st.attrHooks[n]=st.extend(st.attrHooks[n],{set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}})})),st.support.hrefNormalized||(st.each(["href","src","width","height"],function(e,n){st.attrHooks[n]=st.extend(st.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null==r?t:r}})}),st.each(["href","src"],function(e,t){st.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),st.support.style||(st.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),st.support.optSelected||(st.propHooks.selected=st.extend(st.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),st.support.enctype||(st.propFix.enctype="encoding"),st.support.checkOn||st.each(["radio","checkbox"],function(){st.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),st.each(["radio","checkbox"],function(){st.valHooks[this]=st.extend(st.valHooks[this],{set:function(e,n){return st.isArray(n)?e.checked=st.inArray(st(e).val(),n)>=0:t}})});var qt=/^(?:input|select|textarea)$/i,_t=/^key/,Ft=/^(?:mouse|contextmenu)|click/,Ot=/^(?:focusinfocus|focusoutblur)$/,Bt=/^([^.]*)(?:\.(.+)|)$/;st.event={global:{},add:function(e,n,r,i,o){var a,s,u,l,c,f,p,d,h,g,m,y=3!==e.nodeType&&8!==e.nodeType&&st._data(e);if(y){for(r.handler&&(a=r,r=a.handler,o=a.selector),r.guid||(r.guid=st.guid++),(l=y.events)||(l=y.events={}),(s=y.handle)||(s=y.handle=function(e){return st===t||e&&st.event.triggered===e.type?t:st.event.dispatch.apply(s.elem,arguments)},s.elem=e),n=(n||"").match(lt)||[""],c=n.length;c--;)u=Bt.exec(n[c])||[],h=m=u[1],g=(u[2]||"").split(".").sort(),p=st.event.special[h]||{},h=(o?p.delegateType:p.bindType)||h,p=st.event.special[h]||{},f=st.extend({type:h,origType:m,data:i,handler:r,guid:r.guid,selector:o,needsContext:o&&st.expr.match.needsContext.test(o),namespace:g.join(".")},a),(d=l[h])||(d=l[h]=[],d.delegateCount=0,p.setup&&p.setup.call(e,i,g,s)!==!1||(e.addEventListener?e.addEventListener(h,s,!1):e.attachEvent&&e.attachEvent("on"+h,s))),p.add&&(p.add.call(e,f),f.handler.guid||(f.handler.guid=r.guid)),o?d.splice(d.delegateCount++,0,f):d.push(f),st.event.global[h]=!0;e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,m=st.hasData(e)&&st._data(e);if(m&&(u=m.events)){for(t=(t||"").match(lt)||[""],l=t.length;l--;)if(s=Bt.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){for(f=st.event.special[d]||{},d=(r?f.delegateType:f.bindType)||d,p=u[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&f.teardown.call(e,h,m.handle)!==!1||st.removeEvent(e,d,m.handle),delete u[d])}else for(d in u)st.event.remove(e,d+t[l],n,r,!0);st.isEmptyObject(u)&&(delete m.handle,st._removeData(e,"events"))}},trigger:function(n,r,i,o){var a,s,u,l,c,f,p,d=[i||V],h=n.type||n,g=n.namespace?n.namespace.split("."):[];if(s=u=i=i||V,3!==i.nodeType&&8!==i.nodeType&&!Ot.test(h+st.event.triggered)&&(h.indexOf(".")>=0&&(g=h.split("."),h=g.shift(),g.sort()),c=0>h.indexOf(":")&&"on"+h,n=n[st.expando]?n:new st.Event(h,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=g.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:st.makeArray(r,[n]),p=st.event.special[h]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!st.isWindow(i)){for(l=p.delegateType||h,Ot.test(l+h)||(s=s.parentNode);s;s=s.parentNode)d.push(s),u=s;u===(i.ownerDocument||V)&&d.push(u.defaultView||u.parentWindow||e)}for(a=0;(s=d[a++])&&!n.isPropagationStopped();)n.type=a>1?l:p.bindType||h,f=(st._data(s,"events")||{})[n.type]&&st._data(s,"handle"),f&&f.apply(s,r),f=c&&s[c],f&&st.acceptData(s)&&f.apply&&f.apply(s,r)===!1&&n.preventDefault();if(n.type=h,!(o||n.isDefaultPrevented()||p._default&&p._default.apply(i.ownerDocument,r)!==!1||"click"===h&&st.nodeName(i,"a")||!st.acceptData(i)||!c||!i[h]||st.isWindow(i))){u=i[c],u&&(i[c]=null),st.event.triggered=h;try{i[h]()}catch(m){}st.event.triggered=t,u&&(i[c]=u)}return n.result}},dispatch:function(e){e=st.event.fix(e);var n,r,i,o,a,s=[],u=nt.call(arguments),l=(st._data(this,"events")||{})[e.type]||[],c=st.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){for(s=st.event.handlers.call(this,e,l),n=0;(o=s[n++])&&!e.isPropagationStopped();)for(e.currentTarget=o.elem,r=0;(a=o.handlers[r++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(a.namespace))&&(e.handleObj=a,e.data=a.data,i=((st.event.special[a.origType]||{}).handle||a.handler).apply(o.elem,u),i!==t&&(e.result=i)===!1&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],u=n.delegateCount,l=e.target;if(u&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(l.disabled!==!0||"click"!==e.type){for(i=[],r=0;u>r;r++)a=n[r],o=a.selector+" ",i[o]===t&&(i[o]=a.needsContext?st(o,this).index(l)>=0:st.find(o,this,null,[l]).length),i[o]&&i.push(a);i.length&&s.push({elem:l,handlers:i})}return n.length>u&&s.push({elem:this,handlers:n.slice(u)}),s},fix:function(e){if(e[st.expando])return e;var t,n,r=e,i=st.event.fixHooks[e.type]||{},o=i.props?this.props.concat(i.props):this.props;for(e=new st.Event(r),t=o.length;t--;)n=o[t],e[n]=r[n];return e.target||(e.target=r.srcElement||V),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,i.filter?i.filter(e,r):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,a=n.button,s=n.fromElement;return null==e.pageX&&null!=n.clientX&&(r=e.target.ownerDocument||V,i=r.documentElement,o=r.body,e.pageX=n.clientX+(i&&i.scrollLeft||o&&o.scrollLeft||0)-(i&&i.clientLeft||o&&o.clientLeft||0),e.pageY=n.clientY+(i&&i.scrollTop||o&&o.scrollTop||0)-(i&&i.clientTop||o&&o.clientTop||0)),!e.relatedTarget&&s&&(e.relatedTarget=s===e.target?n.toElement:s),e.which||a===t||(e.which=1&a?1:2&a?3:4&a?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return st.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==V.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===V.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=st.extend(new st.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?st.event.trigger(i,null,t):st.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},st.removeEvent=V.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,n,r){var i="on"+n;e.detachEvent&&(e[i]===t&&(e[i]=null),e.detachEvent(i,r))},st.Event=function(e,n){return this instanceof st.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?u:l):this.type=e,n&&st.extend(this,n),this.timeStamp=e&&e.timeStamp||st.now(),this[st.expando]=!0,t):new st.Event(e,n)},st.Event.prototype={isDefaultPrevented:l,isPropagationStopped:l,isImmediatePropagationStopped:l,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=u,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=u,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u,this.stopPropagation()}},st.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){st.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!st.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),st.support.submitBubbles||(st.event.special.submit={setup:function(){return st.nodeName(this,"form")?!1:(st.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=st.nodeName(n,"input")||st.nodeName(n,"button")?n.form:t;r&&!st._data(r,"submitBubbles")&&(st.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),st._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&st.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return st.nodeName(this,"form")?!1:(st.event.remove(this,"._submit"),t)}}),st.support.changeBubbles||(st.event.special.change={setup:function(){return qt.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(st.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),st.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),st.event.simulate("change",this,e,!0)})),!1):(st.event.add(this,"beforeactivate._change",function(e){var t=e.target;qt.test(t.nodeName)&&!st._data(t,"changeBubbles")&&(st.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||st.event.simulate("change",this.parentNode,e,!0)}),st._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return st.event.remove(this,"._change"),!qt.test(this.nodeName)}}),st.support.focusinBubbles||st.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){st.event.simulate(t,e.target,st.event.fix(e),!0)};st.event.special[t]={setup:function(){0===n++&&V.addEventListener(e,r,!0)},teardown:function(){0===--n&&V.removeEventListener(e,r,!0)}}}),st.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(s in e)this.on(s,n,r,e[s],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=l;else if(!i)return this;return 1===o&&(a=i,i=function(e){return st().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=st.guid++)),this.each(function(){st.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,st(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=l),this.each(function(){st.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){st.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?st.event.trigger(e,n,r,!0):t},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),st.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){st.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)},_t.test(t)&&(st.event.fixHooks[t]=st.event.keyHooks),Ft.test(t)&&(st.event.fixHooks[t]=st.event.mouseHooks)}),function(e,t){function n(e){return ht.test(e+"")}function r(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>C.cacheLength&&delete e[t.shift()],e[n]=r}}function i(e){return e[P]=!0,e}function o(e){var t=L.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}}function a(e,t,n,r){var i,o,a,s,u,l,c,d,h,g;if((t?t.ownerDocument||t:R)!==L&&D(t),t=t||L,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(!M&&!r){if(i=gt.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&O(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return Q.apply(n,K.call(t.getElementsByTagName(e),0)),n;if((a=i[3])&&W.getByClassName&&t.getElementsByClassName)return Q.apply(n,K.call(t.getElementsByClassName(a),0)),n}if(W.qsa&&!q.test(e)){if(c=!0,d=P,h=t,g=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(l=f(e),(c=t.getAttribute("id"))?d=c.replace(vt,"\\$&"):t.setAttribute("id",d),d="[id='"+d+"'] ",u=l.length;u--;)l[u]=d+p(l[u]);h=dt.test(e)&&t.parentNode||t,g=l.join(",")}if(g)try{return Q.apply(n,K.call(h.querySelectorAll(g),0)),n}catch(m){}finally{c||t.removeAttribute("id")}}}return x(e.replace(at,"$1"),t,n,r)}function s(e,t){for(var n=e&&t&&e.nextSibling;n;n=n.nextSibling)if(n===t)return-1;return e?1:-1}function u(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return i(function(t){return t=+t,i(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function f(e,t){var n,r,i,o,s,u,l,c=X[e+" "];if(c)return t?0:c.slice(0);for(s=e,u=[],l=C.preFilter;s;){(!n||(r=ut.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),u.push(i=[])),n=!1,(r=lt.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(at," ")}),s=s.slice(n.length));for(o in C.filter)!(r=pt[o].exec(s))||l[o]&&!(r=l[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?a.error(e):X(e,u).slice(0)}function p(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function d(e,t,n){var r=t.dir,i=n&&"parentNode"===t.dir,o=I++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||i)return e(t,n,o)}:function(t,n,a){var s,u,l,c=$+" "+o;if(a){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,n,a))return!0}else for(;t=t[r];)if(1===t.nodeType||i)if(l=t[P]||(t[P]={}),(u=l[r])&&u[0]===c){if((s=u[1])===!0||s===N)return s===!0}else if(u=l[r]=[c],u[1]=e(t,n,a)||N,u[1]===!0)return!0}}function h(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function g(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;u>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s));return a}function m(e,t,n,r,o,a){return r&&!r[P]&&(r=m(r)),o&&!o[P]&&(o=m(o,a)),i(function(i,a,s,u){var l,c,f,p=[],d=[],h=a.length,m=i||b(t||"*",s.nodeType?[s]:s,[]),y=!e||!i&&t?m:g(m,p,e,s,u),v=n?o||(i?e:h||r)?[]:a:y;if(n&&n(y,v,s,u),r)for(l=g(v,d),r(l,[],s,u),c=l.length;c--;)(f=l[c])&&(v[d[c]]=!(y[d[c]]=f));if(i){if(o||e){if(o){for(l=[],c=v.length;c--;)(f=v[c])&&l.push(y[c]=f);o(null,v=[],l,u)}for(c=v.length;c--;)(f=v[c])&&(l=o?Z.call(i,f):p[c])>-1&&(i[l]=!(a[l]=f))}}else v=g(v===a?v.splice(h,v.length):v),o?o(null,a,v,u):Q.apply(a,v)})}function y(e){for(var t,n,r,i=e.length,o=C.relative[e[0].type],a=o||C.relative[" "],s=o?1:0,u=d(function(e){return e===t},a,!0),l=d(function(e){return Z.call(t,e)>-1},a,!0),c=[function(e,n,r){return!o&&(r||n!==j)||((t=n).nodeType?u(e,n,r):l(e,n,r))}];i>s;s++)if(n=C.relative[e[s].type])c=[d(h(c),n)];else{if(n=C.filter[e[s].type].apply(null,e[s].matches),n[P]){for(r=++s;i>r&&!C.relative[e[r].type];r++);return m(s>1&&h(c),s>1&&p(e.slice(0,s-1)).replace(at,"$1"),n,r>s&&y(e.slice(s,r)),i>r&&y(e=e.slice(r)),i>r&&p(e))}c.push(n)}return h(c)}function v(e,t){var n=0,r=t.length>0,o=e.length>0,s=function(i,s,u,l,c){var f,p,d,h=[],m=0,y="0",v=i&&[],b=null!=c,x=j,T=i||o&&C.find.TAG("*",c&&s.parentNode||s),w=$+=null==x?1:Math.E;for(b&&(j=s!==L&&s,N=n);null!=(f=T[y]);y++){if(o&&f){for(p=0;d=e[p];p++)if(d(f,s,u)){l.push(f);break}b&&($=w,N=++n)}r&&((f=!d&&f)&&m--,i&&v.push(f))}if(m+=y,r&&y!==m){for(p=0;d=t[p];p++)d(v,h,s,u);if(i){if(m>0)for(;y--;)v[y]||h[y]||(h[y]=G.call(l));h=g(h)}Q.apply(l,h),b&&!i&&h.length>0&&m+t.length>1&&a.uniqueSort(l)}return b&&($=w,j=x),v};return r?i(s):s}function b(e,t,n){for(var r=0,i=t.length;i>r;r++)a(e,t[r],n);return n}function x(e,t,n,r){var i,o,a,s,u,l=f(e);if(!r&&1===l.length){if(o=l[0]=l[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&9===t.nodeType&&!M&&C.relative[o[1].type]){if(t=C.find.ID(a.matches[0].replace(xt,Tt),t)[0],!t)return n;e=e.slice(o.shift().value.length)}for(i=pt.needsContext.test(e)?-1:o.length-1;i>=0&&(a=o[i],!C.relative[s=a.type]);i--)if((u=C.find[s])&&(r=u(a.matches[0].replace(xt,Tt),dt.test(o[0].type)&&t.parentNode||t))){if(o.splice(i,1),e=r.length&&p(o),!e)return Q.apply(n,K.call(r,0)),n;break}}return S(e,l)(r,t,M,n,dt.test(e)),n}function T(){}var w,N,C,k,E,S,A,j,D,L,H,M,q,_,F,O,B,P="sizzle"+-new Date,R=e.document,W={},$=0,I=0,z=r(),X=r(),U=r(),V=typeof t,Y=1<<31,J=[],G=J.pop,Q=J.push,K=J.slice,Z=J.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},et="[\\x20\\t\\r\\n\\f]",tt="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",nt=tt.replace("w","w#"),rt="([*^$|!~]?=)",it="\\["+et+"*("+tt+")"+et+"*(?:"+rt+et+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+nt+")|)|)"+et+"*\\]",ot=":("+tt+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+it.replace(3,8)+")*)|.*)\\)|)",at=RegExp("^"+et+"+|((?:^|[^\\\\])(?:\\\\.)*)"+et+"+$","g"),ut=RegExp("^"+et+"*,"+et+"*"),lt=RegExp("^"+et+"*([\\x20\\t\\r\\n\\f>+~])"+et+"*"),ct=RegExp(ot),ft=RegExp("^"+nt+"$"),pt={ID:RegExp("^#("+tt+")"),CLASS:RegExp("^\\.("+tt+")"),NAME:RegExp("^\\[name=['\"]?("+tt+")['\"]?\\]"),TAG:RegExp("^("+tt.replace("w","w*")+")"),ATTR:RegExp("^"+it),PSEUDO:RegExp("^"+ot),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+et+"*(even|odd|(([+-]|)(\\d*)n|)"+et+"*(?:([+-]|)"+et+"*(\\d+)|))"+et+"*\\)|)","i"),needsContext:RegExp("^"+et+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+et+"*((?:-\\d)?\\d*)"+et+"*\\)|)(?=[^-]|$)","i")},dt=/[\x20\t\r\n\f]*[+~]/,ht=/\{\s*\[native code\]\s*\}/,gt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,mt=/^(?:input|select|textarea|button)$/i,yt=/^h\d$/i,vt=/'|\\/g,bt=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,xt=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,Tt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{K.call(H.childNodes,0)[0].nodeType}catch(wt){K=function(e){for(var t,n=[];t=this[e];e++)n.push(t);return n}}E=a.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},D=a.setDocument=function(e){var r=e?e.ownerDocument||e:R;return r!==L&&9===r.nodeType&&r.documentElement?(L=r,H=r.documentElement,M=E(r),W.tagNameNoComments=o(function(e){return e.appendChild(r.createComment("")),!e.getElementsByTagName("*").length}),W.attributes=o(function(e){e.innerHTML="
";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),W.getByClassName=o(function(e){return e.innerHTML="
",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),W.getByName=o(function(e){e.id=P+0,e.innerHTML="
",H.insertBefore(e,H.firstChild);var t=r.getElementsByName&&r.getElementsByName(P).length===2+r.getElementsByName(P+0).length;return W.getIdNotName=!r.getElementById(P),H.removeChild(e),t}),C.attrHandle=o(function(e){return e.innerHTML="
",e.firstChild&&typeof e.firstChild.getAttribute!==V&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},W.getIdNotName?(C.find.ID=function(e,t){if(typeof t.getElementById!==V&&!M){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},C.filter.ID=function(e){var t=e.replace(xt,Tt);return function(e){return e.getAttribute("id")===t}}):(C.find.ID=function(e,n){if(typeof n.getElementById!==V&&!M){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==V&&r.getAttributeNode("id").value===e?[r]:t:[]}},C.filter.ID=function(e){var t=e.replace(xt,Tt);return function(e){var n=typeof e.getAttributeNode!==V&&e.getAttributeNode("id");return n&&n.value===t}}),C.find.TAG=W.tagNameNoComments?function(e,n){return typeof n.getElementsByTagName!==V?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i];i++)1===n.nodeType&&r.push(n);return r}return o},C.find.NAME=W.getByName&&function(e,n){return typeof n.getElementsByName!==V?n.getElementsByName(name):t},C.find.CLASS=W.getByClassName&&function(e,n){return typeof n.getElementsByClassName===V||M?t:n.getElementsByClassName(e)},_=[],q=[":focus"],(W.qsa=n(r.querySelectorAll))&&(o(function(e){e.innerHTML="
",e.querySelectorAll("[selected]").length||q.push("\\["+et+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||q.push(":checked")}),o(function(e){e.innerHTML="
",e.querySelectorAll("[i^='']").length&&q.push("[*^$]="+et+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),q.push(",.*:")})),(W.matchesSelector=n(F=H.matchesSelector||H.mozMatchesSelector||H.webkitMatchesSelector||H.oMatchesSelector||H.msMatchesSelector))&&o(function(e){W.disconnectedMatch=F.call(e,"div"),F.call(e,"[s!='']:x"),_.push("!=",ot)}),q=RegExp(q.join("|")),_=RegExp(_.join("|")),O=n(H.contains)||H.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},B=H.compareDocumentPosition?function(e,t){var n;return e===t?(A=!0,0):(n=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&n||e.parentNode&&11===e.parentNode.nodeType?e===r||O(R,e)?-1:t===r||O(R,t)?1:0:4&n?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var n,i=0,o=e.parentNode,a=t.parentNode,u=[e],l=[t];if(e===t)return A=!0,0;if(e.sourceIndex&&t.sourceIndex)return(~t.sourceIndex||Y)-(O(R,e)&&~e.sourceIndex||Y);if(!o||!a)return e===r?-1:t===r?1:o?-1:a?1:0;if(o===a)return s(e,t);for(n=e;n=n.parentNode;)u.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;u[i]===l[i];)i++;return i?s(u[i],l[i]):u[i]===R?-1:l[i]===R?1:0},A=!1,[0,0].sort(B),W.detectDuplicates=A,L):L},a.matches=function(e,t){return a(e,null,null,t)},a.matchesSelector=function(e,t){if((e.ownerDocument||e)!==L&&D(e),t=t.replace(bt,"='$1']"),!(!W.matchesSelector||M||_&&_.test(t)||q.test(t)))try{var n=F.call(e,t);if(n||W.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return a(t,L,null,[e]).length>0},a.contains=function(e,t){return(e.ownerDocument||e)!==L&&D(e),O(e,t)},a.attr=function(e,t){var n;return(e.ownerDocument||e)!==L&&D(e),M||(t=t.toLowerCase()),(n=C.attrHandle[t])?n(e):M||W.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},a.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},a.uniqueSort=function(e){var t,n=[],r=1,i=0;if(A=!W.detectDuplicates,e.sort(B),A){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return e},k=a.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=k(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=k(t);return n},C=a.selectors={cacheLength:50,createPseudo:i,match:pt,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(xt,Tt),e[3]=(e[4]||e[5]||"").replace(xt,Tt),"~="===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]||a.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]&&a.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return pt.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&ct.test(n)&&(t=f(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(xt,Tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=z[e+" "];return t||(t=RegExp("(^|"+et+")"+e+"("+et+"|$)"))&&z(e,function(e){return t.test(e.className||typeof e.getAttribute!==V&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=a.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.substr(i.length-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s;if(m){if(o){for(;g;){for(f=t;f=f[g];)if(s?f.nodeName.toLowerCase()===y:1===f.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){for(c=m[P]||(m[P]={}),l=c[e]||[],d=l[0]===$&&l[1],p=l[0]===$&&l[2],f=d&&m.childNodes[d];f=++d&&f&&f[g]||(p=d=0)||h.pop();)if(1===f.nodeType&&++p&&f===t){c[e]=[$,d,p];break}}else if(v&&(l=(t[P]||(t[P]={}))[e])&&l[0]===$)p=l[1];else for(;(f=++d&&f&&f[g]||(p=d=0)||h.pop())&&((s?f.nodeName.toLowerCase()!==y:1!==f.nodeType)||!++p||(v&&((f[P]||(f[P]={}))[e]=[$,p]),f!==t)););return p-=i,p===r||0===p%r&&p/r>=0}}},PSEUDO:function(e,t){var n,r=C.pseudos[e]||C.setFilters[e.toLowerCase()]||a.error("unsupported pseudo: "+e);return r[P]?r(t):r.length>1?(n=[e,e,"",t],C.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,n){for(var i,o=r(e,t),a=o.length;a--;)i=Z.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:i(function(e){var t=[],n=[],r=S(e.replace(at,"$1"));return r[P]?i(function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:i(function(e){return function(t){return a(e,t).length>0}}),contains:i(function(e){return function(t){return(t.textContent||t.innerText||k(t)).indexOf(e)>-1}}),lang:i(function(e){return ft.test(e||"")||a.error("unsupported lang: "+e),e=e.replace(xt,Tt).toLowerCase(),function(t){var n;do if(n=M?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===H},focus:function(e){return e===L.activeElement&&(!L.hasFocus||L.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},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,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!C.pseudos.empty(e)},header:function(e){return yt.test(e.nodeName)},input:function(e){return mt.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"))||t.toLowerCase()===e.type)},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[0>n?n+t:n]}),even:c(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:c(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:c(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:c(function(e,t,n){for(var r=0>n?n+t:n;t>++r;)e.push(r);return e})}};for(w in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})C.pseudos[w]=u(w);for(w in{submit:!0,reset:!0})C.pseudos[w]=l(w);S=a.compile=function(e,t){var n,r=[],i=[],o=U[e+" "];if(!o){for(t||(t=f(e)),n=t.length;n--;)o=y(t[n]),o[P]?r.push(o):i.push(o);o=U(e,v(i,r))}return o},C.pseudos.nth=C.pseudos.eq,C.filters=T.prototype=C.pseudos,C.setFilters=new T,D(),a.attr=st.attr,st.find=a,st.expr=a.selectors,st.expr[":"]=st.expr.pseudos,st.unique=a.uniqueSort,st.text=a.getText,st.isXMLDoc=a.isXML,st.contains=a.contains}(e);var Pt=/Until$/,Rt=/^(?:parents|prev(?:Until|All))/,Wt=/^.[^:#\[\.,]*$/,$t=st.expr.match.needsContext,It={children:!0,contents:!0,next:!0,prev:!0};st.fn.extend({find:function(e){var t,n,r;if("string"!=typeof e)return r=this,this.pushStack(st(e).filter(function(){for(t=0;r.length>t;t++)if(st.contains(r[t],this))return!0}));for(n=[],t=0;this.length>t;t++)st.find(e,this[t],n);return n=this.pushStack(st.unique(n)),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=st(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(st.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(f(this,e,!1))},filter:function(e){return this.pushStack(f(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?$t.test(e)?st(e,this.context).index(this[0])>=0:st.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){for(var n,r=0,i=this.length,o=[],a=$t.test(e)||"string"!=typeof e?st(e,t||this.context):0;i>r;r++)for(n=this[r];n&&n.ownerDocument&&n!==t&&11!==n.nodeType;){if(a?a.index(n)>-1:st.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}return this.pushStack(o.length>1?st.unique(o):o)},index:function(e){return e?"string"==typeof e?st.inArray(this[0],st(e)):st.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?st(e,t):st.makeArray(e&&e.nodeType?[e]:e),r=st.merge(this.get(),n);return this.pushStack(st.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),st.fn.andSelf=st.fn.addBack,st.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return st.dir(e,"parentNode")},parentsUntil:function(e,t,n){return st.dir(e,"parentNode",n)},next:function(e){return c(e,"nextSibling")},prev:function(e){return c(e,"previousSibling")
},nextAll:function(e){return st.dir(e,"nextSibling")},prevAll:function(e){return st.dir(e,"previousSibling")},nextUntil:function(e,t,n){return st.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return st.dir(e,"previousSibling",n)},siblings:function(e){return st.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return st.sibling(e.firstChild)},contents:function(e){return st.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:st.merge([],e.childNodes)}},function(e,t){st.fn[e]=function(n,r){var i=st.map(this,t,n);return Pt.test(e)||(r=n),r&&"string"==typeof r&&(i=st.filter(r,i)),i=this.length>1&&!It[e]?st.unique(i):i,this.length>1&&Rt.test(e)&&(i=i.reverse()),this.pushStack(i)}}),st.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?st.find.matchesSelector(t[0],e)?[t[0]]:[]:st.find.matches(e,t)},dir:function(e,n,r){for(var i=[],o=e[n];o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!st(o).is(r));)1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});var zt="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Xt=/ jQuery\d+="(?:null|\d+)"/g,Ut=RegExp("<(?:"+zt+")[\\s/>]","i"),Vt=/^\s+/,Yt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Jt=/<([\w:]+)/,Gt=/
\s*$/g,on={option:[1,""," "],legend:[1,""," "],area:[1,""," "],param:[1,""," "],thead:[1,""],tr:[2,""],col:[2,""],td:[3,""],_default:st.support.htmlSerialize?[0,"",""]:[1,"X","
"]},an=p(V),sn=an.appendChild(V.createElement("div"));on.optgroup=on.option,on.tbody=on.tfoot=on.colgroup=on.caption=on.thead,on.th=on.td,st.fn.extend({text:function(e){return st.access(this,function(e){return e===t?st.text(this):this.empty().append((this[0]&&this[0].ownerDocument||V).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(st.isFunction(e))return this.each(function(t){st(this).wrapAll(e.call(this,t))});if(this[0]){var t=st(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 st.isFunction(e)?this.each(function(t){st(this).wrapInner(e.call(this,t))}):this.each(function(){var t=st(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=st.isFunction(e);return this.each(function(n){st(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){st.nodeName(this,"body")||st(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,r=0;null!=(n=this[r]);r++)(!e||st.filter(e,[n]).length>0)&&(t||1!==n.nodeType||st.cleanData(b(n)),n.parentNode&&(t&&st.contains(n.ownerDocument,n)&&m(b(n,"script")),n.parentNode.removeChild(n)));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&st.cleanData(b(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&st.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return st.clone(this,e,t)})},html:function(e){return st.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(Xt,""):t;if(!("string"!=typeof e||Kt.test(e)||!st.support.htmlSerialize&&Ut.test(e)||!st.support.leadingWhitespace&&Vt.test(e)||on[(Jt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(Yt,"<$1>$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(st.cleanData(b(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=st.isFunction(e);return t||"string"==typeof e||(e=st(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;(n&&1===this.nodeType||11===this.nodeType)&&(st(this).remove(),t?t.parentNode.insertBefore(e,t):n.appendChild(e))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=et.apply([],e);var i,o,a,s,u,l,c=0,f=this.length,p=this,m=f-1,y=e[0],v=st.isFunction(y);if(v||!(1>=f||"string"!=typeof y||st.support.checkClone)&&en.test(y))return this.each(function(i){var o=p.eq(i);v&&(e[0]=y.call(this,i,n?o.html():t)),o.domManip(e,n,r)});if(f&&(i=st.buildFragment(e,this[0].ownerDocument,!1,this),o=i.firstChild,1===i.childNodes.length&&(i=o),o)){for(n=n&&st.nodeName(o,"tr"),a=st.map(b(i,"script"),h),s=a.length;f>c;c++)u=i,c!==m&&(u=st.clone(u,!0,!0),s&&st.merge(a,b(u,"script"))),r.call(n&&st.nodeName(this[c],"table")?d(this[c],"tbody"):this[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,st.map(a,g),c=0;s>c;c++)u=a[c],tn.test(u.type||"")&&!st._data(u,"globalEval")&&st.contains(l,u)&&(u.src?st.ajax({url:u.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):st.globalEval((u.text||u.textContent||u.innerHTML||"").replace(rn,"")));i=o=null}return this}}),st.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){st.fn[e]=function(e){for(var n,r=0,i=[],o=st(e),a=o.length-1;a>=r;r++)n=r===a?this:this.clone(!0),st(o[r])[t](n),tt.apply(i,n.get());return this.pushStack(i)}}),st.extend({clone:function(e,t,n){var r,i,o,a,s,u=st.contains(e.ownerDocument,e);if(st.support.html5Clone||st.isXMLDoc(e)||!Ut.test("<"+e.nodeName+">")?s=e.cloneNode(!0):(sn.innerHTML=e.outerHTML,sn.removeChild(s=sn.firstChild)),!(st.support.noCloneEvent&&st.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||st.isXMLDoc(e)))for(r=b(s),i=b(e),a=0;null!=(o=i[a]);++a)r[a]&&v(o,r[a]);if(t)if(n)for(i=i||b(e),r=r||b(s),a=0;null!=(o=i[a]);a++)y(o,r[a]);else y(e,s);return r=b(s,"script"),r.length>0&&m(r,!u&&b(e,"script")),r=i=o=null,s},buildFragment:function(e,t,n,r){for(var i,o,a,s,u,l,c,f=e.length,d=p(t),h=[],g=0;f>g;g++)if(o=e[g],o||0===o)if("object"===st.type(o))st.merge(h,o.nodeType?[o]:o);else if(Qt.test(o)){for(s=s||d.appendChild(t.createElement("div")),a=(Jt.exec(o)||["",""])[1].toLowerCase(),u=on[a]||on._default,s.innerHTML=u[1]+o.replace(Yt,"<$1>$2>")+u[2],c=u[0];c--;)s=s.lastChild;if(!st.support.leadingWhitespace&&Vt.test(o)&&h.push(t.createTextNode(Vt.exec(o)[0])),!st.support.tbody)for(o="table"!==a||Gt.test(o)?""!==u[1]||Gt.test(o)?0:s:s.firstChild,c=o&&o.childNodes.length;c--;)st.nodeName(l=o.childNodes[c],"tbody")&&!l.childNodes.length&&o.removeChild(l);for(st.merge(h,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=d.lastChild}else h.push(t.createTextNode(o));for(s&&d.removeChild(s),st.support.appendChecked||st.grep(b(h,"input"),x),g=0;o=h[g++];)if((!r||-1===st.inArray(o,r))&&(i=st.contains(o.ownerDocument,o),s=b(d.appendChild(o),"script"),i&&m(s),n))for(c=0;o=s[c++];)tn.test(o.type||"")&&n.push(o);return s=null,d},cleanData:function(e,n){for(var r,i,o,a,s=0,u=st.expando,l=st.cache,c=st.support.deleteExpando,f=st.event.special;null!=(o=e[s]);s++)if((n||st.acceptData(o))&&(i=o[u],r=i&&l[i])){if(r.events)for(a in r.events)f[a]?st.event.remove(o,a):st.removeEvent(o,a,r.handle);l[i]&&(delete l[i],c?delete o[u]:o.removeAttribute!==t?o.removeAttribute(u):o[u]=null,K.push(i))}}});var un,ln,cn,fn=/alpha\([^)]*\)/i,pn=/opacity\s*=\s*([^)]*)/,dn=/^(top|right|bottom|left)$/,hn=/^(none|table(?!-c[ea]).+)/,gn=/^margin/,mn=RegExp("^("+ut+")(.*)$","i"),yn=RegExp("^("+ut+")(?!px)[a-z%]+$","i"),vn=RegExp("^([+-])=("+ut+")","i"),bn={BODY:"block"},xn={position:"absolute",visibility:"hidden",display:"block"},Tn={letterSpacing:0,fontWeight:400},wn=["Top","Right","Bottom","Left"],Nn=["Webkit","O","Moz","ms"];st.fn.extend({css:function(e,n){return st.access(this,function(e,n,r){var i,o,a={},s=0;if(st.isArray(n)){for(i=ln(e),o=n.length;o>s;s++)a[n[s]]=st.css(e,n[s],!1,i);return a}return r!==t?st.style(e,n,r):st.css(e,n)},e,n,arguments.length>1)},show:function(){return N(this,!0)},hide:function(){return N(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:w(this))?st(this).show():st(this).hide()})}}),st.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=un(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":st.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=st.camelCase(n),l=e.style;if(n=st.cssProps[u]||(st.cssProps[u]=T(l,u)),s=st.cssHooks[n]||st.cssHooks[u],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:l[n];if(a=typeof r,"string"===a&&(o=vn.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(st.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||st.cssNumber[u]||(r+="px"),st.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(l[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{l[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,u=st.camelCase(n);return n=st.cssProps[u]||(st.cssProps[u]=T(e.style,u)),s=st.cssHooks[n]||st.cssHooks[u],s&&"get"in s&&(o=s.get(e,!0,r)),o===t&&(o=un(e,n,i)),"normal"===o&&n in Tn&&(o=Tn[n]),r?(a=parseFloat(o),r===!0||st.isNumeric(a)?a||0:o):o},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),e.getComputedStyle?(ln=function(t){return e.getComputedStyle(t,null)},un=function(e,n,r){var i,o,a,s=r||ln(e),u=s?s.getPropertyValue(n)||s[n]:t,l=e.style;return s&&(""!==u||st.contains(e.ownerDocument,e)||(u=st.style(e,n)),yn.test(u)&&gn.test(n)&&(i=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=u,u=s.width,l.width=i,l.minWidth=o,l.maxWidth=a)),u}):V.documentElement.currentStyle&&(ln=function(e){return e.currentStyle},un=function(e,n,r){var i,o,a,s=r||ln(e),u=s?s[n]:t,l=e.style;return null==u&&l&&l[n]&&(u=l[n]),yn.test(u)&&!dn.test(n)&&(i=l.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),l.left="fontSize"===n?"1em":u,u=l.pixelLeft+"px",l.left=i,a&&(o.left=a)),""===u?"auto":u}),st.each(["height","width"],function(e,n){st.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&hn.test(st.css(e,"display"))?st.swap(e,xn,function(){return E(e,n,i)}):E(e,n,i):t},set:function(e,t,r){var i=r&&ln(e);return C(e,t,r?k(e,n,r,st.support.boxSizing&&"border-box"===st.css(e,"boxSizing",!1,i),i):0)}}}),st.support.opacity||(st.cssHooks.opacity={get:function(e,t){return pn.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=st.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===st.trim(o.replace(fn,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=fn.test(o)?o.replace(fn,i):o+" "+i)}}),st(function(){st.support.reliableMarginRight||(st.cssHooks.marginRight={get:function(e,n){return n?st.swap(e,{display:"inline-block"},un,[e,"marginRight"]):t}}),!st.support.pixelPosition&&st.fn.position&&st.each(["top","left"],function(e,n){st.cssHooks[n]={get:function(e,r){return r?(r=un(e,n),yn.test(r)?st(e).position()[n]+"px":r):t}}})}),st.expr&&st.expr.filters&&(st.expr.filters.hidden=function(e){return 0===e.offsetWidth&&0===e.offsetHeight||!st.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||st.css(e,"display"))},st.expr.filters.visible=function(e){return!st.expr.filters.hidden(e)}),st.each({margin:"",padding:"",border:"Width"},function(e,t){st.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];4>r;r++)i[e+wn[r]+t]=o[r]||o[r-2]||o[0];return i}},gn.test(e)||(st.cssHooks[e+t].set=C)});var Cn=/%20/g,kn=/\[\]$/,En=/\r?\n/g,Sn=/^(?:submit|button|image|reset)$/i,An=/^(?:input|select|textarea|keygen)/i;st.fn.extend({serialize:function(){return st.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=st.prop(this,"elements");return e?st.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!st(this).is(":disabled")&&An.test(this.nodeName)&&!Sn.test(e)&&(this.checked||!Zt.test(e))}).map(function(e,t){var n=st(this).val();return null==n?null:st.isArray(n)?st.map(n,function(e){return{name:t.name,value:e.replace(En,"\r\n")}}):{name:t.name,value:n.replace(En,"\r\n")}}).get()}}),st.param=function(e,n){var r,i=[],o=function(e,t){t=st.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=st.ajaxSettings&&st.ajaxSettings.traditional),st.isArray(e)||e.jquery&&!st.isPlainObject(e))st.each(e,function(){o(this.name,this.value)});else for(r in e)j(r,e[r],n,o);return i.join("&").replace(Cn,"+")};var jn,Dn,Ln=st.now(),Hn=/\?/,Mn=/#.*$/,qn=/([?&])_=[^&]*/,_n=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Fn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,On=/^(?:GET|HEAD)$/,Bn=/^\/\//,Pn=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Rn=st.fn.load,Wn={},$n={},In="*/".concat("*");try{Dn=Y.href}catch(zn){Dn=V.createElement("a"),Dn.href="",Dn=Dn.href}jn=Pn.exec(Dn.toLowerCase())||[],st.fn.load=function(e,n,r){if("string"!=typeof e&&Rn)return Rn.apply(this,arguments);var i,o,a,s=this,u=e.indexOf(" ");return u>=0&&(i=e.slice(u,e.length),e=e.slice(0,u)),st.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(o="POST"),s.length>0&&st.ajax({url:e,type:o,dataType:"html",data:n}).done(function(e){a=arguments,s.html(i?st("").append(st.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,a||[e.responseText,t,e])}),this},st.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){st.fn[t]=function(e){return this.on(t,e)}}),st.each(["get","post"],function(e,n){st[n]=function(e,r,i,o){return st.isFunction(r)&&(o=o||i,i=r,r=t),st.ajax({url:e,type:n,dataType:o,data:r,success:i})}}),st.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Dn,type:"GET",isLocal:Fn.test(jn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":In,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":st.parseJSON,"text xml":st.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?H(H(e,st.ajaxSettings),t):H(st.ajaxSettings,e)},ajaxPrefilter:D(Wn),ajaxTransport:D($n),ajax:function(e,n){function r(e,n,r,s){var l,f,v,b,T,N=n;2!==x&&(x=2,u&&clearTimeout(u),i=t,a=s||"",w.readyState=e>0?4:0,r&&(b=M(p,w,r)),e>=200&&300>e||304===e?(p.ifModified&&(T=w.getResponseHeader("Last-Modified"),T&&(st.lastModified[o]=T),T=w.getResponseHeader("etag"),T&&(st.etag[o]=T)),304===e?(l=!0,N="notmodified"):(l=q(p,b),N=l.state,f=l.data,v=l.error,l=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),w.status=e,w.statusText=(n||N)+"",l?g.resolveWith(d,[f,N,w]):g.rejectWith(d,[w,N,v]),w.statusCode(y),y=t,c&&h.trigger(l?"ajaxSuccess":"ajaxError",[w,p,l?f:v]),m.fireWith(d,[w,N]),c&&(h.trigger("ajaxComplete",[w,p]),--st.active||st.event.trigger("ajaxStop")))}"object"==typeof e&&(n=e,e=t),n=n||{};var i,o,a,s,u,l,c,f,p=st.ajaxSetup({},n),d=p.context||p,h=p.context&&(d.nodeType||d.jquery)?st(d):st.event,g=st.Deferred(),m=st.Callbacks("once memory"),y=p.statusCode||{},v={},b={},x=0,T="canceled",w={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!s)for(s={};t=_n.exec(a);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=b[n]=b[n]||e,v[e]=t),this},overrideMimeType:function(e){return x||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>x)for(t in e)y[t]=[y[t],e[t]];else w.always(e[w.status]);return this},abort:function(e){var t=e||T;return i&&i.abort(t),r(0,t),this}};if(g.promise(w).complete=m.add,w.success=w.done,w.error=w.fail,p.url=((e||p.url||Dn)+"").replace(Mn,"").replace(Bn,jn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=st.trim(p.dataType||"*").toLowerCase().match(lt)||[""],null==p.crossDomain&&(l=Pn.exec(p.url.toLowerCase()),p.crossDomain=!(!l||l[1]===jn[1]&&l[2]===jn[2]&&(l[3]||("http:"===l[1]?80:443))==(jn[3]||("http:"===jn[1]?80:443)))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=st.param(p.data,p.traditional)),L(Wn,p,n,w),2===x)return w;c=p.global,c&&0===st.active++&&st.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!On.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(Hn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=qn.test(o)?o.replace(qn,"$1_="+Ln++):o+(Hn.test(o)?"&":"?")+"_="+Ln++)),p.ifModified&&(st.lastModified[o]&&w.setRequestHeader("If-Modified-Since",st.lastModified[o]),st.etag[o]&&w.setRequestHeader("If-None-Match",st.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&w.setRequestHeader("Content-Type",p.contentType),w.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+In+"; q=0.01":""):p.accepts["*"]);for(f in p.headers)w.setRequestHeader(f,p.headers[f]);if(p.beforeSend&&(p.beforeSend.call(d,w,p)===!1||2===x))return w.abort();T="abort";for(f in{success:1,error:1,complete:1})w[f](p[f]);if(i=L($n,p,n,w)){w.readyState=1,c&&h.trigger("ajaxSend",[w,p]),p.async&&p.timeout>0&&(u=setTimeout(function(){w.abort("timeout")},p.timeout));try{x=1,i.send(v,r)}catch(N){if(!(2>x))throw N;r(-1,N)}}else r(-1,"No Transport");return w},getScript:function(e,n){return st.get(e,t,n,"script")},getJSON:function(e,t,n){return st.get(e,t,n,"json")}}),st.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return st.globalEval(e),e}}}),st.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),st.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=V.head||st("head")[0]||V.documentElement;return{send:function(t,i){n=V.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Xn=[],Un=/(=)\?(?=&|$)|\?\?/;st.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xn.pop()||st.expando+"_"+Ln++;return this[e]=!0,e}}),st.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,u=n.jsonp!==!1&&(Un.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Un.test(n.data)&&"data");return u||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=st.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,u?n[u]=n[u].replace(Un,"$1"+o):n.jsonp!==!1&&(n.url+=(Hn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||st.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Xn.push(o)),s&&st.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Vn,Yn,Jn=0,Gn=e.ActiveXObject&&function(){var e;for(e in Vn)Vn[e](t,!0)};st.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&_()||F()}:_,Yn=st.ajaxSettings.xhr(),st.support.cors=!!Yn&&"withCredentials"in Yn,Yn=st.support.ajax=!!Yn,Yn&&st.ajaxTransport(function(n){if(!n.crossDomain||st.support.cors){var r;return{send:function(i,o){var a,s,u=n.xhr();if(n.username?u.open(n.type,n.url,n.async,n.username,n.password):u.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)u[s]=n.xhrFields[s];n.mimeType&&u.overrideMimeType&&u.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)u.setRequestHeader(s,i[s])}catch(l){}u.send(n.hasContent&&n.data||null),r=function(e,i){var s,l,c,f,p;try{if(r&&(i||4===u.readyState))if(r=t,a&&(u.onreadystatechange=st.noop,Gn&&delete Vn[a]),i)4!==u.readyState&&u.abort();else{f={},s=u.status,p=u.responseXML,c=u.getAllResponseHeaders(),p&&p.documentElement&&(f.xml=p),"string"==typeof u.responseText&&(f.text=u.responseText);try{l=u.statusText}catch(d){l=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=f.text?200:404}}catch(h){i||o(-1,h)}f&&o(s,l,f,c)},n.async?4===u.readyState?setTimeout(r):(a=++Jn,Gn&&(Vn||(Vn={},st(e).unload(Gn)),Vn[a]=r),u.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Qn,Kn,Zn=/^(?:toggle|show|hide)$/,er=RegExp("^(?:([+-])=|)("+ut+")([a-z%]*)$","i"),tr=/queueHooks$/,nr=[W],rr={"*":[function(e,t){var n,r,i=this.createTween(e,t),o=er.exec(t),a=i.cur(),s=+a||0,u=1,l=20;if(o){if(n=+o[2],r=o[3]||(st.cssNumber[e]?"":"px"),"px"!==r&&s){s=st.css(i.elem,e,!0)||n||1;do u=u||".5",s/=u,st.style(i.elem,e,s+r);while(u!==(u=i.cur()/a)&&1!==u&&--l)}i.unit=r,i.start=s,i.end=o[1]?s+(o[1]+1)*n:n}return i}]};st.Animation=st.extend(P,{tweener:function(e,t){st.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,r=0,i=e.length;i>r;r++)n=e[r],rr[n]=rr[n]||[],rr[n].unshift(t)},prefilter:function(e,t){t?nr.unshift(e):nr.push(e)}}),st.Tween=$,$.prototype={constructor:$,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(st.cssNumber[n]?"":"px")},cur:function(){var e=$.propHooks[this.prop];return e&&e.get?e.get(this):$.propHooks._default.get(this)},run:function(e){var t,n=$.propHooks[this.prop];return this.pos=t=this.options.duration?st.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):$.propHooks._default.set(this),this}},$.prototype.init.prototype=$.prototype,$.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=st.css(e.elem,e.prop,"auto"),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){st.fx.step[e.prop]?st.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[st.cssProps[e.prop]]||st.cssHooks[e.prop])?st.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},$.propHooks.scrollTop=$.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},st.each(["toggle","show","hide"],function(e,t){var n=st.fn[t];st.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(I(t,!0),e,r,i)}}),st.fn.extend({fadeTo:function(e,t,n,r){return this.filter(w).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=st.isEmptyObject(e),o=st.speed(t,n,r),a=function(){var t=P(this,st.extend({},e),o);a.finish=function(){t.stop(!0)},(i||st._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=st.timers,a=st._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&tr.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&st.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=st._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=st.timers,a=r?r.length:0;for(n.finish=!0,st.queue(this,e,[]),i&&i.cur&&i.cur.finish&&i.cur.finish.call(this),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),st.each({slideDown:I("show"),slideUp:I("hide"),slideToggle:I("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){st.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),st.speed=function(e,t,n){var r=e&&"object"==typeof e?st.extend({},e):{complete:n||!n&&t||st.isFunction(e)&&e,duration:e,easing:n&&t||t&&!st.isFunction(t)&&t};return r.duration=st.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in st.fx.speeds?st.fx.speeds[r.duration]:st.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){st.isFunction(r.old)&&r.old.call(this),r.queue&&st.dequeue(this,r.queue)},r},st.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},st.timers=[],st.fx=$.prototype.init,st.fx.tick=function(){var e,n=st.timers,r=0;for(Qn=st.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||st.fx.stop(),Qn=t},st.fx.timer=function(e){e()&&st.timers.push(e)&&st.fx.start()},st.fx.interval=13,st.fx.start=function(){Kn||(Kn=setInterval(st.fx.tick,st.fx.interval))},st.fx.stop=function(){clearInterval(Kn),Kn=null},st.fx.speeds={slow:600,fast:200,_default:400},st.fx.step={},st.expr&&st.expr.filters&&(st.expr.filters.animated=function(e){return st.grep(st.timers,function(t){return e===t.elem}).length}),st.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){st.offset.setOffset(this,e,t)});var n,r,i={top:0,left:0},o=this[0],a=o&&o.ownerDocument;if(a)return n=a.documentElement,st.contains(n,o)?(o.getBoundingClientRect!==t&&(i=o.getBoundingClientRect()),r=z(a),{top:i.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:i.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):i},st.offset={setOffset:function(e,t,n){var r=st.css(e,"position");"static"===r&&(e.style.position="relative");var i,o,a=st(e),s=a.offset(),u=st.css(e,"top"),l=st.css(e,"left"),c=("absolute"===r||"fixed"===r)&&st.inArray("auto",[u,l])>-1,f={},p={};c?(p=a.position(),i=p.top,o=p.left):(i=parseFloat(u)||0,o=parseFloat(l)||0),st.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(f.top=t.top-s.top+i),null!=t.left&&(f.left=t.left-s.left+o),"using"in t?t.using.call(e,f):a.css(f)}},st.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===st.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),st.nodeName(e[0],"html")||(n=e.offset()),n.top+=st.css(e[0],"borderTopWidth",!0),n.left+=st.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-st.css(r,"marginTop",!0),left:t.left-n.left-st.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||V.documentElement;e&&!st.nodeName(e,"html")&&"static"===st.css(e,"position");)e=e.offsetParent;return e||V.documentElement})}}),st.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);st.fn[e]=function(i){return st.access(this,function(e,i,o){var a=z(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?st(a).scrollLeft():o,r?o:st(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}}),st.each({Height:"height",Width:"width"},function(e,n){st.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){st.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return st.access(this,function(n,r,i){var o;return st.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?st.css(n,r,s):st.style(n,r,i,s)},n,a?i:t,a,null)}})}),e.jQuery=e.$=st,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return st})})(window);
/*!
* jQuery Form Plugin
* version: 3.51.0-2014.06.20
* Requires jQuery v1.5 or later
* Copyright (c) 2014 M. Alsup
* Examples and documentation at: http://malsup.com/jquery/form/
* Project repository: https://github.com/malsup/form
* Dual licensed under the MIT and GPL licenses.
* https://github.com/malsup/form#copyright-and-license
*/
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):e("undefined"!=typeof jQuery?jQuery:window.Zepto)}(function(e){"use strict";function t(t){var r=t.data;t.isDefaultPrevented()||(t.preventDefault(),e(t.target).ajaxSubmit(r))}function r(t){var r=t.target,a=e(r);if(!a.is("[type=submit],[type=image]")){var n=a.closest("[type=submit]");if(0===n.length)return;r=n[0]}var i=this;if(i.clk=r,"image"==r.type)if(void 0!==t.offsetX)i.clk_x=t.offsetX,i.clk_y=t.offsetY;else if("function"==typeof e.fn.offset){var o=a.offset();i.clk_x=t.pageX-o.left,i.clk_y=t.pageY-o.top}else i.clk_x=t.pageX-r.offsetLeft,i.clk_y=t.pageY-r.offsetTop;setTimeout(function(){i.clk=i.clk_x=i.clk_y=null},100)}function a(){if(e.fn.ajaxSubmit.debug){var t="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(t):window.opera&&window.opera.postError&&window.opera.postError(t)}}var n={};n.fileapi=void 0!==e("
").get(0).files,n.formdata=void 0!==window.FormData;var i=!!e.fn.prop;e.fn.attr2=function(){if(!i)return this.attr.apply(this,arguments);var e=this.prop.apply(this,arguments);return e&&e.jquery||"string"==typeof e?e:this.attr.apply(this,arguments)},e.fn.ajaxSubmit=function(t){function r(r){var a,n,i=e.param(r,t.traditional).split("&"),o=i.length,s=[];for(a=0;o>a;a++)i[a]=i[a].replace(/\+/g," "),n=i[a].split("="),s.push([decodeURIComponent(n[0]),decodeURIComponent(n[1])]);return s}function o(a){for(var n=new FormData,i=0;i
').val(m.extraData[d].value).appendTo(w)[0]:e(' ').val(m.extraData[d]).appendTo(w)[0]);m.iframeTarget||v.appendTo("body"),g.attachEvent?g.attachEvent("onload",s):g.addEventListener("load",s,!1),setTimeout(t,15);try{w.submit()}catch(h){var x=document.createElement("form").submit;x.apply(w)}}finally{w.setAttribute("action",i),w.setAttribute("enctype",c),r?w.setAttribute("target",r):f.removeAttr("target"),e(l).remove()}}function s(t){if(!x.aborted&&!F){if(M=n(g),M||(a("cannot access response document"),t=k),t===D&&x)return x.abort("timeout"),void S.reject(x,"timeout");if(t==k&&x)return x.abort("server abort"),void S.reject(x,"error","server abort");if(M&&M.location.href!=m.iframeSrc||T){g.detachEvent?g.detachEvent("onload",s):g.removeEventListener("load",s,!1);var r,i="success";try{if(T)throw"timeout";var o="xml"==m.dataType||M.XMLDocument||e.isXMLDoc(M);if(a("isXml="+o),!o&&window.opera&&(null===M.body||!M.body.innerHTML)&&--O)return a("requeing onLoad callback, DOM not available"),void setTimeout(s,250);var u=M.body?M.body:M.documentElement;x.responseText=u?u.innerHTML:null,x.responseXML=M.XMLDocument?M.XMLDocument:M,o&&(m.dataType="xml"),x.getResponseHeader=function(e){var t={"content-type":m.dataType};return t[e.toLowerCase()]},u&&(x.status=Number(u.getAttribute("status"))||x.status,x.statusText=u.getAttribute("statusText")||x.statusText);var c=(m.dataType||"").toLowerCase(),l=/(json|script|text)/.test(c);if(l||m.textarea){var f=M.getElementsByTagName("textarea")[0];if(f)x.responseText=f.value,x.status=Number(f.getAttribute("status"))||x.status,x.statusText=f.getAttribute("statusText")||x.statusText;else if(l){var p=M.getElementsByTagName("pre")[0],h=M.getElementsByTagName("body")[0];p?x.responseText=p.textContent?p.textContent:p.innerText:h&&(x.responseText=h.textContent?h.textContent:h.innerText)}}else"xml"==c&&!x.responseXML&&x.responseText&&(x.responseXML=X(x.responseText));try{E=_(x,c,m)}catch(y){i="parsererror",x.error=r=y||i}}catch(y){a("error caught: ",y),i="error",x.error=r=y||i}x.aborted&&(a("upload aborted"),i=null),x.status&&(i=x.status>=200&&x.status<300||304===x.status?"success":"error"),"success"===i?(m.success&&m.success.call(m.context,E,"success",x),S.resolve(x.responseText,"success",x),d&&e.event.trigger("ajaxSuccess",[x,m])):i&&(void 0===r&&(r=x.statusText),m.error&&m.error.call(m.context,x,i,r),S.reject(x,"error",r),d&&e.event.trigger("ajaxError",[x,m,r])),d&&e.event.trigger("ajaxComplete",[x,m]),d&&!--e.active&&e.event.trigger("ajaxStop"),m.complete&&m.complete.call(m.context,x,i),F=!0,m.timeout&&clearTimeout(j),setTimeout(function(){m.iframeTarget?v.attr("src",m.iframeSrc):v.remove(),x.responseXML=null},100)}}}var c,l,m,d,p,v,g,x,y,b,T,j,w=f[0],S=e.Deferred();if(S.abort=function(e){x.abort(e)},r)for(l=0;l '),v.css({position:"absolute",top:"-1000px",left:"-1000px"})),g=v[0],x={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(t){var r="timeout"===t?"timeout":"aborted";a("aborting upload... "+r),this.aborted=1;try{g.contentWindow.document.execCommand&&g.contentWindow.document.execCommand("Stop")}catch(n){}v.attr("src",m.iframeSrc),x.error=r,m.error&&m.error.call(m.context,x,r,t),d&&e.event.trigger("ajaxError",[x,m,r]),m.complete&&m.complete.call(m.context,x,r)}},d=m.global,d&&0===e.active++&&e.event.trigger("ajaxStart"),d&&e.event.trigger("ajaxSend",[x,m]),m.beforeSend&&m.beforeSend.call(m.context,x,m)===!1)return m.global&&e.active--,S.reject(),S;if(x.aborted)return S.reject(),S;y=w.clk,y&&(b=y.name,b&&!y.disabled&&(m.extraData=m.extraData||{},m.extraData[b]=y.value,"image"==y.type&&(m.extraData[b+".x"]=w.clk_x,m.extraData[b+".y"]=w.clk_y)));var D=1,k=2,A=e("meta[name=csrf-token]").attr("content"),L=e("meta[name=csrf-param]").attr("content");L&&A&&(m.extraData=m.extraData||{},m.extraData[L]=A),m.forceSync?o():setTimeout(o,10);var E,M,F,O=50,X=e.parseXML||function(e,t){return window.ActiveXObject?(t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!=t.documentElement.nodeName?t:null},C=e.parseJSON||function(e){return window.eval("("+e+")")},_=function(t,r,a){var n=t.getResponseHeader("content-type")||"",i="xml"===r||!r&&n.indexOf("xml")>=0,o=i?t.responseXML:t.responseText;return i&&"parsererror"===o.documentElement.nodeName&&e.error&&e.error("parsererror"),a&&a.dataFilter&&(o=a.dataFilter(o,r)),"string"==typeof o&&("json"===r||!r&&n.indexOf("json")>=0?o=C(o):("script"===r||!r&&n.indexOf("javascript")>=0)&&e.globalEval(o)),o};return S}if(!this.length)return a("ajaxSubmit: skipping submit process - no element selected"),this;var u,c,l,f=this;"function"==typeof t?t={success:t}:void 0===t&&(t={}),u=t.type||this.attr2("method"),c=t.url||this.attr2("action"),l="string"==typeof c?e.trim(c):"",l=l||window.location.href||"",l&&(l=(l.match(/^([^#]+)/)||[])[1]),t=e.extend(!0,{url:l,success:e.ajaxSettings.success,type:u||e.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},t);var m={};if(this.trigger("form-pre-serialize",[this,t,m]),m.veto)return a("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(t.beforeSerialize&&t.beforeSerialize(this,t)===!1)return a("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var d=t.traditional;void 0===d&&(d=e.ajaxSettings.traditional);var p,h=[],v=this.formToArray(t.semantic,h);if(t.data&&(t.extraData=t.data,p=e.param(t.data,d)),t.beforeSubmit&&t.beforeSubmit(v,this,t)===!1)return a("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[v,this,t,m]),m.veto)return a("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var g=e.param(v,d);p&&(g=g?g+"&"+p:p),"GET"==t.type.toUpperCase()?(t.url+=(t.url.indexOf("?")>=0?"&":"?")+g,t.data=null):t.data=g;var x=[];if(t.resetForm&&x.push(function(){f.resetForm()}),t.clearForm&&x.push(function(){f.clearForm(t.includeHidden)}),!t.dataType&&t.target){var y=t.success||function(){};x.push(function(r){var a=t.replaceTarget?"replaceWith":"html";e(t.target)[a](r).each(y,arguments)})}else t.success&&x.push(t.success);if(t.success=function(e,r,a){for(var n=t.context||this,i=0,o=x.length;o>i;i++)x[i].apply(n,[e,r,a||f,f])},t.error){var b=t.error;t.error=function(e,r,a){var n=t.context||this;b.apply(n,[e,r,a,f])}}if(t.complete){var T=t.complete;t.complete=function(e,r){var a=t.context||this;T.apply(a,[e,r,f])}}var j=e("input[type=file]:enabled",this).filter(function(){return""!==e(this).val()}),w=j.length>0,S="multipart/form-data",D=f.attr("enctype")==S||f.attr("encoding")==S,k=n.fileapi&&n.formdata;a("fileAPI :"+k);var A,L=(w||D)&&!k;t.iframe!==!1&&(t.iframe||L)?t.closeKeepAlive?e.get(t.closeKeepAlive,function(){A=s(v)}):A=s(v):A=(w||D)&&k?o(v):e.ajax(t),f.removeData("jqxhr").data("jqxhr",A);for(var E=0;Ec;c++)if(d=u[c],f=d.name,f&&!d.disabled)if(t&&o.clk&&"image"==d.type)o.clk==d&&(a.push({name:f,value:e(d).val(),type:d.type}),a.push({name:f+".x",value:o.clk_x},{name:f+".y",value:o.clk_y}));else if(m=e.fieldValue(d,!0),m&&m.constructor==Array)for(r&&r.push(d),l=0,h=m.length;h>l;l++)a.push({name:f,value:m[l]});else if(n.fileapi&&"file"==d.type){r&&r.push(d);var v=d.files;if(v.length)for(l=0;li;i++)r.push({name:a,value:n[i]});else null!==n&&"undefined"!=typeof n&&r.push({name:this.name,value:n})}}),e.param(r)},e.fn.fieldValue=function(t){for(var r=[],a=0,n=this.length;n>a;a++){var i=this[a],o=e.fieldValue(i,t);null===o||"undefined"==typeof o||o.constructor==Array&&!o.length||(o.constructor==Array?e.merge(r,o):r.push(o))}return r},e.fieldValue=function(t,r){var a=t.name,n=t.type,i=t.tagName.toLowerCase();if(void 0===r&&(r=!0),r&&(!a||t.disabled||"reset"==n||"button"==n||("checkbox"==n||"radio"==n)&&!t.checked||("submit"==n||"image"==n)&&t.form&&t.form.clk!=t||"select"==i&&-1==t.selectedIndex))return null;if("select"==i){var o=t.selectedIndex;if(0>o)return null;for(var s=[],u=t.options,c="select-one"==n,l=c?o+1:u.length,f=c?o:0;l>f;f++){var m=u[f];if(m.selected){var d=m.value;if(d||(d=m.attributes&&m.attributes.value&&!m.attributes.value.specified?m.text:m.value),c)return d;s.push(d)}}return s}return e(t).val()},e.fn.clearForm=function(t){return this.each(function(){e("input,select,textarea",this).clearFields(t)})},e.fn.clearFields=e.fn.clearInputs=function(t){var r=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var a=this.type,n=this.tagName.toLowerCase();r.test(a)||"textarea"==n?this.value="":"checkbox"==a||"radio"==a?this.checked=!1:"select"==n?this.selectedIndex=-1:"file"==a?/MSIE/.test(navigator.userAgent)?e(this).replaceWith(e(this).clone(!0)):e(this).val(""):t&&(t===!0&&/hidden/.test(a)||"string"==typeof t&&e(this).is(t))&&(this.value="")})},e.fn.resetForm=function(){return this.each(function(){("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset()})},e.fn.enable=function(e){return void 0===e&&(e=!0),this.each(function(){this.disabled=!e})},e.fn.selected=function(t){return void 0===t&&(t=!0),this.each(function(){var r=this.type;if("checkbox"==r||"radio"==r)this.checked=t;else if("option"==this.tagName.toLowerCase()){var a=e(this).parent("select");t&&a[0]&&"select-one"==a[0].type&&a.find("option").selected(!1),this.selected=t}})},e.fn.ajaxSubmit.debug=!1});
/*! jQuery Validation Plugin - v1.12.0 - 4/1/2014
* http://jqueryvalidation.org/
* Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
!function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.validateDelegate(":submit","click",function(b){c.settings.submitHandler&&(c.submitButton=b.target),a(b.target).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(b.target).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.submit(function(b){function d(){var d;return c.settings.submitHandler?(c.submitButton&&(d=a(" ").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),c.settings.submitHandler.call(c,c.currentForm,b),c.submitButton&&d.remove(),!1):!0}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c;return a(this[0]).is("form")?b=this.validate().form():(b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b})),b},removeAttrs:function(b){var c={},d=this;return a.each(b.split(/\s/),function(a,b){c[b]=d.attr(b),d.removeAttr(b)}),c},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(b,c){i[c]=f[c],delete f[c],"required"===c&&a(j).removeAttr("aria-required")}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g),a(j).attr("aria-required","true")),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}),a.extend(a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){return!!a.trim(""+a(b).val())},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&!this.blockFocusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.addWrapper(this.errorsFor(a)).hide())},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(a,b){(9!==b.which||""!==this.elementValue(a))&&(a.name in this.submitted||a===this.lastElement)&&this.element(a)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c=a.data(this[0].form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!this.is(e.ignore)&&e[d].call(c,this[0],b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ","focusin focusout keyup",b).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",b),this.settings.invalidHandler&&a(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler),a(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c=this.clean(b),d=this.validationTargetFor(c),e=!0;return this.lastElement=d,void 0===d?delete this.invalid[c.name]:(this.prepareElement(d),this.currentElements=a(d),e=this.check(d)!==!1,e?delete this.invalid[d.name]:this.invalid[d.name]=!0),a(b).attr("aria-invalid",!e),this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),e},showErrors:function(b){if(b){a.extend(this.errorMap,b),this.errorList=[];for(var c in b)this.errorList.push({message:b[c],element:this.findByName(c)[0]});this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors(),this.elements().removeClass(this.settings.errorClass).removeData("previousValue").removeAttr("aria-invalid")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)c++;return c},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){return!this.name&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in c||!b.objectLength(a(this).rules())?!1:(c[this.name]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([]),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d=a(b),e=d.attr("type");return"radio"===e||"checkbox"===e?a("input[name='"+d.attr("name")+"']:checked").val():(c=d.val(),"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f=a(b).rules(),g=a.map(f,function(a,b){return b}).length,h=!1,i=this.elementValue(b);for(d in f){e={method:d,parameters:f[d]};try{if(c=a.validator.methods[d].call(this,i,b,e.parameters),"dependency-mismatch"===c&&1===g){h=!0;continue}if(h=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(j){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",j),j}}if(!h)return this.objectLength(f)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c[0].toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+"")},formatAndAdd:function(b,c){var d=this.defaultMessage(b,c.method),e=/\$?\{(\d+)\}/g;"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),this.errorList.push({message:d,element:b,method:c.method}),this.errorMap[b.name]=d,this.submitted[b.name]=d},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d=this.errorsFor(b);d.length?(d.removeClass(this.settings.validClass).addClass(this.settings.errorClass),d.html(c)):(d=a("<"+this.settings.errorElement+">").attr("for",this.idOrName(b)).addClass(this.settings.errorClass).html(c||""),this.settings.wrapper&&(d=d.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.append(d).length||(this.settings.errorPlacement?this.settings.errorPlacement(d,a(b)):d.insertAfter(b))),!c&&this.settings.success&&(d.text(""),"string"==typeof this.settings.success?d.addClass(this.settings.success):this.settings.success(d,b)),this.toShow=this.toShow.add(d)},errorsFor:function(b){var c=this.idOrName(b);return this.errors().filter(function(){return a(this).attr("for")===c})},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(a){return this.checkable(a)&&(a=this.findByName(a.name).not(this.settings.ignore)[0]),a},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+b+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):!0},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(a){this.pending[a.name]||(this.pendingRequest++,this.pending[a.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),/min|max/.test(c)&&(null===g||/number|range|text/.test(g))&&(d=Number(d)),d||0===d?e[c]=d:g===c&&"range"!==g&&(e[c]=!0);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b);for(c in a.validator.methods)d=f.data("rule"+c[0].toUpperCase()+c.substring(1).toLowerCase()),void 0!==d&&(e[c]=d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0!==e.param?e.param:!0:delete b[d]}}),a.each(b,function(d,e){b[d]=a.isFunction(e)?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(b.min&&b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),b.minlength&&b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:a.trim(b).length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(a)},number:function(a,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(a.trim(b),c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(a.trim(b),c);return this.optional(c)||d>=e},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(a.trim(b),c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||c>=a},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d){if(this.optional(c))return"dependency-mismatch";var e,f,g=this.previousValue(c);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),g.originalMessage=this.settings.messages[c.name].remote,this.settings.messages[c.name].remote=g.message,d="string"==typeof d&&{url:d}||d,g.old===b?g.valid:(g.old=b,e=this,this.startRequest(c),f={},f[c.name]=b,a.ajax(a.extend(!0,{url:d,mode:"abort",port:"validate"+c.name,dataType:"json",data:f,context:e.currentForm,success:function(d){var f,h,i,j=d===!0||"true"===d;e.settings.messages[c.name].remote=g.originalMessage,j?(i=e.formSubmitted,e.prepareElement(c),e.formSubmitted=i,e.successList.push(c),delete e.invalid[c.name],e.showErrors()):(f={},h=d||e.defaultMessage(c,"remote"),f[c.name]=g.message=a.isFunction(h)?h(b):h,e.invalid[c.name]=!0,e.showErrors(f)),g.valid=j,e.stopRequest(c,j)}},d)),"pending")}}}),a.format=function(){throw"$.format has been deprecated. Please use $.validator.format instead."}}(jQuery),function(a){var b,c={};a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)})}(jQuery),function(a){a.extend(a.fn,{validateDelegate:function(b,c,d){return this.bind(c,function(c){var e=a(c.target);return e.is(b)?d.apply(e,arguments):void 0})}})}(jQuery);
// ADDITIONAL JQUERY VALIDATE METHODS
(function($) {
// Validate a multifield birthday
$.validator.addMethod("mc_birthday", function(date, element, grouping_class) {
var isValid = false;
var $fields = $('input:not(:hidden)' , $(element).closest(grouping_class));
if ($fields.filter(':filled').length == 0 && this.optional(element)) {
isValid = true; // None have been filled out, so no error
} else {
var dateArray = new Array();
dateArray['month'] = $fields.filter("input[name*='[month]']").val();
dateArray['day'] = $fields.filter("input[name*='[day]']").val();
// correct month value
dateArray['month'] = dateArray['month'] - 1;
var testDate = new Date(1970, dateArray['month'], dateArray['day']);
if (testDate.getDate()!=dateArray['day'] || testDate.getMonth()!=dateArray['month']) {
isValid = false;
} else {
isValid = true;
}
}
return isValid;
}, "Please enter a valid month and day.");
// Validate a multifield date
$.validator.addMethod("mc_date", function(date, element, grouping_class) {
var isValid = false;
var $fields = $('input:not(:hidden)' , $(element).closest(grouping_class));
if ($fields.filter(':filled').length == 0 && this.optional(element)) {
isValid = true; // None have been filled out, so no error
} else {
var dateArray = new Array();
dateArray['month'] = $fields.filter("input[name*='[month]']").val();
dateArray['day'] = $fields.filter("input[name*='[day]']").val();
dateArray['year'] = $fields.filter("input[name*='[year]']").val();
// correct month value
dateArray['month'] = dateArray['month'] - 1;
// correct year value
if (dateArray['year'].length < 4) {
dateArray['year'] = (parseInt(dateArray['year']) < 50) ? 2000 + parseInt(dateArray['year']) : 1900 + parseInt(dateArray['year']);
}
var testDate = new Date(dateArray['year'], dateArray['month'], dateArray['day']);
if (testDate.getDate()!=dateArray['day'] || testDate.getMonth()!=dateArray['month'] || testDate.getFullYear()!=dateArray['year']) {
isValid = false;
} else {
isValid = true;
}
}
return isValid;
}, "Please enter a valid date");
// Validate a multifield phone number
$.validator.addMethod("mc_phone", function(phone_number, element, grouping_class) {
var isValid = false;
var $fields = $('input:filled:not(:hidden)' , $(element).closest(grouping_class));
if ($fields.length == 0 && this.optional(element)) {
isValid = true; // None have been filled out, so no error
} else {
phone_number = $fields.eq(0).val() + $fields.eq(1).val() + $fields.eq(2).val();
isValid = phone_number.length == 10 && phone_number.match(/[0-9]{9}/);
}
return isValid;
}, "Please specify a valid phone number");
$.validator.addMethod("skip_or_complete_group", function(value, element, grouping_class) {
var $fields = $('input:not(:hidden)' , $(element).closest(grouping_class)),
$fieldsFirst = $fields.eq(0),
validator = $fieldsFirst.data("valid_skip") ? $fieldsFirst.data("valid_skip") : $.extend({}, this),
numberFilled = $fields.filter(function() {
return validator.elementValue(this);
}).length,
isValid = numberFilled === 0 || numberFilled === $fields.length;
// Store the cloned validator for future validation
$fieldsFirst.data("valid_skip", validator);
// If element isn't being validated, run each field's validation rules
if (!$(element).data("being_validated")) {
$fields.data("being_validated", true);
$fields.each(function() {
validator.element(this);
});
$fields.data("being_validated", false);
}
return isValid;
}, $.validator.format("Please supply missing fields."));
$.validator.addMethod("skip_or_fill_minimum", function(value, element, options) {
var $fields = $(options[1], element.form),
$fieldsFirst = $fields.eq(0),
validator = $fieldsFirst.data("valid_skip") ? $fieldsFirst.data("valid_skip") : $.extend({}, this),
numberFilled = $fields.filter(function() {
return validator.elementValue(this);
}).length,
isValid = numberFilled === 0 || numberFilled >= options[0];
console.log($fields.eq(0));
// Store the cloned validator for future validation
$fieldsFirst.data("valid_skip", validator);
// If element isn't being validated, run each skip_or_fill_minimum field's validation rules
if (!$(element).data("being_validated")) {
$fields.data("being_validated", true);
$fields.each(function() {
validator.element(this);
});
$fields.data("being_validated", false);
}
return isValid;
}, $.validator.format("Please either skip these fields or fill at least {0} of them."));
$.validator.addMethod("zipcodeUS", function(value, element) {
return this.optional(element) || /^\d{5}-\d{4}$|^\d{5}$/.test(value);
}, "The specified US ZIP Code is invalid");
$.validator.addMethod("mc_gdpr", function (value, element, grouping_class) {
//if gdpr is required the user must pick at least one option.
var $fields = $("input:not(:hidden)", $(element).closest(grouping_class));
return $fields.filter(":checked").length !== 0;
}, "Please choose an option.");
}(jQuery));
// MC
(function($) {
var err_style = '';
try {
err_style = mc_custom_error_style;
} catch(e){
err_style = '#mc_embed_signup input.mce_inline_error { border-color:#6B0505; } #mc_embed_signup div.mce_inline_error { margin: 0 0 1em 0; padding: 5px 10px; background-color:#6B0505; font-weight: bold; z-index: 1; color:#fff; }';
}
var head = document.getElementsByTagName('head')[0];
var style = document.createElement('style');
style.type = 'text/css';
if (style.styleSheet) {
style.styleSheet.cssText = err_style;
} else {
style.appendChild(document.createTextNode(err_style));
}
head.appendChild(style);
// Expose extra mc form methods in global var
window.mc = {
openPopup: function() {
$('#mc_embed_signup a.mc_embed_close').show();
setTimeout( function(){ $('#mc_embed_signup').fadeIn(); } , mc.delayPopup);
},
closePopup: function() {
$('#mc_embed_signup').hide();
var now = new Date();
var expires_date = new Date( now.getTime() + 31536000000 );
document.cookie = 'MCPopupClosed=yes;expires=' + expires_date.toGMTString()+';path=/';
},
/**
* Figure out if we should show the popup (if they've closed it before, don't show it.)
*/
evalPopup: function() {
$('#mc_embed_signup').hide();
cks = document.cookie.split(';');
for(i=0; i 1) {
var mergeName = inputs.first().attr("name");
var fieldNames = $.map(inputs, function(f) { return f.name; });
groups[mergeName.substring(0, mergeName.indexOf("["))] = fieldNames.join(" ");
}
});
return groups;
},
/**
* Check if a field is part of a multipart field
* (e.g., A date merge field is composed of individual inputs for month, day and year)
* Used in jQuery validation onkeyup method to ensure that we don't evaluate a field
* if a user hasn't reached the last input in a multipart field yet.
*/
isMultiPartField: function(element) {
return ($('input:not(:hidden)' , $(element).closest(".mc-field-group")).length > 1);
},
/**
* Checks if the element is the last input in its fieldgroup.
* If the field is not the last in a set of inputs we don't want to validate it on certain events (onfocusout, onblur)
* because the user might not be finished yet.
*/
isTooEarly: function(element) {
var fields = $('input:not(:hidden)' , $(element).closest(".mc-field-group"));
return ($(fields).eq(-1).attr('id') != $(element).attr('id'));
},
/**
* Handle the error/success message after successful form submission.
* Success messages are appended to #mce-success-response
* Error messages are displayed with the invalid input when possible, or appended to #mce-error-response
*/
mce_success_cb: function(resp){
$('#mce-success-response').hide();
$('#mce-error-response').hide();
// On successful form submission, display a success message and reset the form
if (resp.result == "success"){
$('#mce-'+resp.result+'-response').show();
$('#mce-'+resp.result+'-response').html(resp.msg);
$('#mc-embedded-subscribe-form').each(function(){
this.reset();
});
// If the form has errors, display them, inline if possible, or appended to #mce-error-response
} else {
if (resp.msg === "captcha") {
var url = $("form#mc-embedded-subscribe-form").attr("action");
var parameters = $.param(resp.params);
url = url.split("?")[0];
url += "?";
url += parameters;
window.open(url);
};
// Example errors - Note: You only get one back at a time even if you submit several that are bad.
// Error structure - number indicates the index of the merge field that was invalid, then details
// Object {result: "error", msg: "6 - Please enter the date"}
// Object {result: "error", msg: "4 - Please enter a value"}
// Object {result: "error", msg: "9 - Please enter a complete address"}
// Try to parse the error into a field index and a message.
// On failure, just put the dump thing into in the msg variable.
var index = -1;
var msg;
try {
var parts = resp.msg.split(' - ',2);
if (parts[1]==undefined){
msg = resp.msg;
} else {
i = parseInt(parts[0]);
if (i.toString() == parts[0]){
index = parts[0];
msg = parts[1];
} else {
index = -1;
msg = resp.msg;
}
}
} catch(e){
index = -1;
msg = resp.msg;
}
try {
// If index is -1 if means we don't have data on specifically which field was invalid.
// Just lump the error message into the generic response div.
if (index == -1){
$('#mce-'+resp.result+'-response').show();
$('#mce-'+resp.result+'-response').html(msg);
} else {
var fieldName = $("input[name*='"+fnames[index]+"']").attr('name'); // Make sure this exists (they haven't deleted the fnames array lookup)
var data = {};
data[fieldName] = msg;
mc.mce_validator.showErrors(data);
}
} catch(e){
$('#mce-'+resp.result+'-response').show();
$('#mce-'+resp.result+'-response').html(msg);
}
}
}
}
window.mc.mce_validator = $("#mc-embedded-subscribe-form").validate({
// Set error HTML:
errorClass: "mce_inline_error",
errorElement: "div",
// Validate fields on keyup, focusout and blur.
onkeyup: false,
onfocusout: function(element) {
if (!mc.isTooEarly(element)) {
$(element).valid();
}
},
onblur: function(element) {
if (!mc.isTooEarly(element)) {
$(element).valid();
}
},
// Grouping fields makes jQuery Validation display one error for all the fields in the group
// It doesn't have anything to do with how the fields are validated (together or separately),
// it's strictly for visual display of errors
groups: mc.getGroups(),
// Place a field's inline error HTML just before the div.mc-field-group closing tag
errorPlacement: function(error, element) {
element.closest('.mc-field-group').append(error);
},
// Submit the form via ajax (see: jQuery Form plugin)
submitHandler: function(form) {
$(form).ajaxSubmit(mc.ajaxOptions);
}
});
window.mc.ajaxOptions = {
url: mc.getAjaxSubmitUrl(),
type: 'GET',
dataType: 'json',
contentType: "application/json; charset=utf-8",
success: mc.mce_success_cb
};
// Custom validation methods for fields with certain css classes
$.validator.addClassRules("birthday", { digits: true, mc_birthday: ".datefield" });
$.validator.addClassRules("datepart", { digits: true, mc_date: ".datefield" });
$.validator.addClassRules("phonepart", { digits: true, mc_phone: ".phonefield" });
$.validator.addClassRules("gdpr", { mc_gdpr: ".gdprRequired" });
// Evil Popup
$('#mc_embed_signup a.mc_embed_close').click(function(){
mc.closePopup();
});
$(document).keydown(function(e){
keycode = (e == null) ? event.keyCode : e.which;
if (keycode == 27 && typeof mc.showPopup != 'undefined') mc.closePopup();
});
}(jQuery));
!function(e){var n={};function t(r){if(n[r])return n[r].exports;var a=n[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,t),a.l=!0,a.exports}t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var a in e)t.d(r,a,function(n){return e[n]}.bind(null,a));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=0)}([function(e,n,t){t(1),e.exports=t(6)},function(e,n,t){var r=t(2);"string"==typeof r&&(r=[[e.i,r,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};t(4)(r,a);r.locals&&(e.exports=r.locals)},function(e,n,t){(n=t(3)(!1)).push([e.i,"",""]),e.exports=n},function(e,n,t){"use strict";e.exports=function(e){var n=[];return n.toString=function(){return this.map((function(n){var t=function(e,n){var t=e[1]||"",r=e[3];if(!r)return t;if(n&&"function"==typeof btoa){var a=(i=r,l=btoa(unescape(encodeURIComponent(JSON.stringify(i)))),u="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(l),"/*# ".concat(u," */")),o=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(e," */")}));return[t].concat(o).concat([a]).join("\n")}var i,l,u;return[t].join("\n")}(n,e);return n[2]?"@media ".concat(n[2]," {").concat(t,"}"):t})).join("")},n.i=function(e,t,r){"string"==typeof e&&(e=[[null,e,""]]);var a={};if(r)for(var o=0;o
=0&&p.splice(n,1)}function b(e){var n=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var r=function(){0;return t.nc}();r&&(e.attrs.nonce=r)}return v(n,e.attrs),m(e,n),n}function v(e,n){Object.keys(n).forEach((function(t){e.setAttribute(t,n[t])}))}function y(e,n){var t,r,a,o;if(n.transform&&e.css){if(!(o="function"==typeof n.transform?n.transform(e.css):n.transform.default(e.css)))return function(){};e.css=o}if(n.singleton){var i=s++;t=c||(c=b(n)),r=k.bind(null,t,i,!1),a=k.bind(null,t,i,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(t=function(e){var n=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",v(n,e.attrs),m(e,n),n}(n),r=S.bind(null,t,n),a=function(){g(t),t.href&&URL.revokeObjectURL(t.href)}):(t=b(n),r=E.bind(null,t),a=function(){g(t)});return r(e),function(n){if(n){if(n.css===e.css&&n.media===e.media&&n.sourceMap===e.sourceMap)return;r(e=n)}else a()}}e.exports=function(e,n){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(n=n||{}).attrs="object"==typeof n.attrs?n.attrs:{},n.singleton||"boolean"==typeof n.singleton||(n.singleton=i()),n.insertInto||(n.insertInto="head"),n.insertAt||(n.insertAt="bottom");var t=h(e,n);return d(t,n),function(e){for(var r=[],a=0;aO.length&&O.push(e)}function R(e,n,t){return null==e?0:function e(n,t,r,a){var l=typeof n;"undefined"!==l&&"boolean"!==l||(n=null);var u=!1;if(null===n)u=!0;else switch(l){case"string":case"number":u=!0;break;case"object":switch(n.$$typeof){case o:case i:u=!0}}if(u)return r(a,n,""===t?"."+I(n,0):t),1;if(u=0,t=""===t?".":t+":",Array.isArray(n))for(var c=0;cn}return!1}(n,t,a,r)&&(t=null),r||null===a?function(e){return!!W.call(V,e)||!W.call(Q,e)&&(B.test(e)?V[e]=!0:(Q[e]=!0,!1))}(n)&&(null===t?e.removeAttribute(n):e.setAttribute(n,""+t)):a.mustUseProperty?e[a.propertyName]=null===t?3!==a.type&&"":t:(n=a.attributeName,r=a.attributeNamespace,null===t?e.removeAttribute(n):(t=3===(a=a.type)||4===a&&!0===t?"":""+t,r?e.setAttributeNS(r,n,t):e.setAttribute(n,t))))}J.hasOwnProperty("ReactCurrentDispatcher")||(J.ReactCurrentDispatcher={current:null}),J.hasOwnProperty("ReactCurrentBatchConfig")||(J.ReactCurrentBatchConfig={suspense:null});var X=/^(.*)[\\\/]/,Z="function"==typeof Symbol&&Symbol.for,ee=Z?Symbol.for("react.element"):60103,ne=Z?Symbol.for("react.portal"):60106,te=Z?Symbol.for("react.fragment"):60107,re=Z?Symbol.for("react.strict_mode"):60108,ae=Z?Symbol.for("react.profiler"):60114,oe=Z?Symbol.for("react.provider"):60109,ie=Z?Symbol.for("react.context"):60110,le=Z?Symbol.for("react.concurrent_mode"):60111,ue=Z?Symbol.for("react.forward_ref"):60112,ce=Z?Symbol.for("react.suspense"):60113,se=Z?Symbol.for("react.suspense_list"):60120,pe=Z?Symbol.for("react.memo"):60115,fe=Z?Symbol.for("react.lazy"):60116,de=Z?Symbol.for("react.block"):60121,he="function"==typeof Symbol&&Symbol.iterator;function me(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=he&&e[he]||e["@@iterator"])?e:null}function ge(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case te:return"Fragment";case ne:return"Portal";case ae:return"Profiler";case re:return"StrictMode";case ce:return"Suspense";case se:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case ie:return"Context.Consumer";case oe:return"Context.Provider";case ue:var n=e.render;return n=n.displayName||n.name||"",e.displayName||(""!==n?"ForwardRef("+n+")":"ForwardRef");case pe:return ge(e.type);case de:return ge(e.render);case fe:if(e=1===e._status?e._result:null)return ge(e)}return null}function be(e){var n="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var t="";break e;default:var r=e._debugOwner,a=e._debugSource,o=ge(e.type);t=null,r&&(t=ge(r.type)),r=o,o="",a?o=" (at "+a.fileName.replace(X,"")+":"+a.lineNumber+")":t&&(o=" (created by "+t+")"),t="\n in "+(r||"Unknown")+o}n+=t,e=e.return}while(e);return n}function ve(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function ye(e){var n=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===n||"radio"===n)}function xe(e){e._valueTracker||(e._valueTracker=function(e){var n=ye(e)?"checked":"value",t=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),r=""+e[n];if(!e.hasOwnProperty(n)&&void 0!==t&&"function"==typeof t.get&&"function"==typeof t.set){var a=t.get,o=t.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return a.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,n,{enumerable:t.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}(e))}function we(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var t=n.getValue(),r="";return e&&(r=ye(e)?e.checked?"true":"false":e.value),(e=r)!==t&&(n.setValue(e),!0)}function ke(e,n){var t=n.checked;return a({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=t?t:e._wrapperState.initialChecked})}function Ee(e,n){var t=null==n.defaultValue?"":n.defaultValue,r=null!=n.checked?n.checked:n.defaultChecked;t=ve(null!=n.value?n.value:t),e._wrapperState={initialChecked:r,initialValue:t,controlled:"checkbox"===n.type||"radio"===n.type?null!=n.checked:null!=n.value}}function Se(e,n){null!=(n=n.checked)&&G(e,"checked",n,!1)}function Ce(e,n){Se(e,n);var t=ve(n.value),r=n.type;if(null!=t)"number"===r?(0===t&&""===e.value||e.value!=t)&&(e.value=""+t):e.value!==""+t&&(e.value=""+t);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");n.hasOwnProperty("value")?Te(e,n.type,t):n.hasOwnProperty("defaultValue")&&Te(e,n.type,ve(n.defaultValue)),null==n.checked&&null!=n.defaultChecked&&(e.defaultChecked=!!n.defaultChecked)}function Pe(e,n,t){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var r=n.type;if(!("submit"!==r&&"reset"!==r||void 0!==n.value&&null!==n.value))return;n=""+e._wrapperState.initialValue,t||n===e.value||(e.value=n),e.defaultValue=n}""!==(t=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==t&&(e.name=t)}function Te(e,n,t){"number"===n&&e.ownerDocument.activeElement===e||(null==t?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+t&&(e.defaultValue=""+t))}function _e(e,n){return e=a({children:void 0},n),(n=function(e){var n="";return r.Children.forEach(e,(function(e){null!=e&&(n+=e)})),n}(n.children))&&(e.children=n),e}function Ne(e,n,t,r){if(e=e.options,n){n={};for(var a=0;a=t.length))throw Error(i(93));t=t[0]}n=t}null==n&&(n=""),t=n}e._wrapperState={initialValue:ve(t)}}function je(e,n){var t=ve(n.value),r=ve(n.defaultValue);null!=t&&((t=""+t)!==e.value&&(e.value=t),null==n.defaultValue&&e.defaultValue!==t&&(e.defaultValue=t)),null!=r&&(e.defaultValue=""+r)}function Re(e){var n=e.textContent;n===e._wrapperState.initialValue&&""!==n&&null!==n&&(e.value=n)}function Ie(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ze(e,n){return null==e||"http://www.w3.org/1999/xhtml"===e?Ie(n):"http://www.w3.org/2000/svg"===e&&"foreignObject"===n?"http://www.w3.org/1999/xhtml":e}var Fe,Ae=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(n,t,r,a){MSApp.execUnsafeLocalFunction((function(){return e(n,t)}))}:e}((function(e,n){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=n;else{for((Fe=Fe||document.createElement("div")).innerHTML=""+n.valueOf().toString()+" ",n=Fe.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}}));function Me(e,n){if(n){var t=e.firstChild;if(t&&t===e.lastChild&&3===t.nodeType)return void(t.nodeValue=n)}e.textContent=n}function De(e,n){var t={};return t[e.toLowerCase()]=n.toLowerCase(),t["Webkit"+e]="webkit"+n,t["Moz"+e]="moz"+n,t}var Ue={animationend:De("Animation","AnimationEnd"),animationiteration:De("Animation","AnimationIteration"),animationstart:De("Animation","AnimationStart"),transitionend:De("Transition","TransitionEnd")},He={},Be={};function We(e){if(He[e])return He[e];if(!Ue[e])return e;var n,t=Ue[e];for(n in t)if(t.hasOwnProperty(n)&&n in Be)return He[e]=t[n];return e}T&&(Be=document.createElement("div").style,"AnimationEvent"in window||(delete Ue.animationend.animation,delete Ue.animationiteration.animation,delete Ue.animationstart.animation),"TransitionEvent"in window||delete Ue.transitionend.transition);var Qe=We("animationend"),Ve=We("animationiteration"),$e=We("animationstart"),qe=We("transitionend"),Ke="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ye=new("function"==typeof WeakMap?WeakMap:Map);function Je(e){var n=Ye.get(e);return void 0===n&&(n=new Map,Ye.set(e,n)),n}function Ge(e){var n=e,t=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do{0!=(1026&(n=e).effectTag)&&(t=n.return),e=n.return}while(e)}return 3===n.tag?t:null}function Xe(e){if(13===e.tag){var n=e.memoizedState;if(null===n&&null!==(e=e.alternate)&&(n=e.memoizedState),null!==n)return n.dehydrated}return null}function Ze(e){if(Ge(e)!==e)throw Error(i(188))}function en(e){if(!(e=function(e){var n=e.alternate;if(!n){if(null===(n=Ge(e)))throw Error(i(188));return n!==e?null:e}for(var t=e,r=n;;){var a=t.return;if(null===a)break;var o=a.alternate;if(null===o){if(null!==(r=a.return)){t=r;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===t)return Ze(a),e;if(o===r)return Ze(a),n;o=o.sibling}throw Error(i(188))}if(t.return!==r.return)t=a,r=o;else{for(var l=!1,u=a.child;u;){if(u===t){l=!0,t=a,r=o;break}if(u===r){l=!0,r=a,t=o;break}u=u.sibling}if(!l){for(u=o.child;u;){if(u===t){l=!0,t=o,r=a;break}if(u===r){l=!0,r=o,t=a;break}u=u.sibling}if(!l)throw Error(i(189))}}if(t.alternate!==r)throw Error(i(190))}if(3!==t.tag)throw Error(i(188));return t.stateNode.current===t?e:n}(e)))return null;for(var n=e;;){if(5===n.tag||6===n.tag)return n;if(n.child)n.child.return=n,n=n.child;else{if(n===e)break;for(;!n.sibling;){if(!n.return||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}}return null}function nn(e,n){if(null==n)throw Error(i(30));return null==e?n:Array.isArray(e)?Array.isArray(n)?(e.push.apply(e,n),e):(e.push(n),e):Array.isArray(n)?[e].concat(n):[e,n]}function tn(e,n,t){Array.isArray(e)?e.forEach(n,t):e&&n.call(t,e)}var rn=null;function an(e){if(e){var n=e._dispatchListeners,t=e._dispatchInstances;if(Array.isArray(n))for(var r=0;rcn.length&&cn.push(e)}function pn(e,n,t,r){if(cn.length){var a=cn.pop();return a.topLevelType=e,a.eventSystemFlags=r,a.nativeEvent=n,a.targetInst=t,a}return{topLevelType:e,eventSystemFlags:r,nativeEvent:n,targetInst:t,ancestors:[]}}function fn(e){var n=e.targetInst,t=n;do{if(!t){e.ancestors.push(t);break}var r=t;if(3===r.tag)r=r.stateNode.containerInfo;else{for(;r.return;)r=r.return;r=3!==r.tag?null:r.stateNode.containerInfo}if(!r)break;5!==(n=t.tag)&&6!==n||e.ancestors.push(t),t=Ct(r)}while(t);for(t=0;t=n)return{node:r,offset:n-e};e=t}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ct(r)}}function pt(){for(var e=window,n=ut();n instanceof e.HTMLIFrameElement;){try{var t="string"==typeof n.contentWindow.location.href}catch(e){t=!1}if(!t)break;n=ut((e=n.contentWindow).document)}return n}function ft(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&("input"===n&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===n||"true"===e.contentEditable)}var dt=null,ht=null;function mt(e,n){switch(e){case"button":case"input":case"select":case"textarea":return!!n.autoFocus}return!1}function gt(e,n){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof n.children||"number"==typeof n.children||"object"==typeof n.dangerouslySetInnerHTML&&null!==n.dangerouslySetInnerHTML&&null!=n.dangerouslySetInnerHTML.__html}var bt="function"==typeof setTimeout?setTimeout:void 0,vt="function"==typeof clearTimeout?clearTimeout:void 0;function yt(e){for(;null!=e;e=e.nextSibling){var n=e.nodeType;if(1===n||3===n)break}return e}function xt(e){e=e.previousSibling;for(var n=0;e;){if(8===e.nodeType){var t=e.data;if("$"===t||"$!"===t||"$?"===t){if(0===n)return e;n--}else"/$"===t&&n++}e=e.previousSibling}return null}var wt=Math.random().toString(36).slice(2),kt="__reactInternalInstance$"+wt,Et="__reactEventHandlers$"+wt,St="__reactContainere$"+wt;function Ct(e){var n=e[kt];if(n)return n;for(var t=e.parentNode;t;){if(n=t[St]||t[kt]){if(t=n.alternate,null!==n.child||null!==t&&null!==t.child)for(e=xt(e);null!==e;){if(t=e[kt])return t;e=xt(e)}return n}t=(e=t).parentNode}return null}function Pt(e){return!(e=e[kt]||e[St])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Tt(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(i(33))}function _t(e){return e[Et]||null}function Nt(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function Ot(e,n){var t=e.stateNode;if(!t)return null;var r=h(t);if(!r)return null;t=r[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(t&&"function"!=typeof t)throw Error(i(231,n,typeof t));return t}function Lt(e,n,t){(n=Ot(e,t.dispatchConfig.phasedRegistrationNames[n]))&&(t._dispatchListeners=nn(t._dispatchListeners,n),t._dispatchInstances=nn(t._dispatchInstances,e))}function jt(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var n=e._targetInst,t=[];n;)t.push(n),n=Nt(n);for(n=t.length;0this.eventPool.length&&this.eventPool.push(e)}function Vt(e){e.eventPool=[],e.getPooled=Wt,e.release=Qt}a(Bt.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Ut)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Ut)},persist:function(){this.isPersistent=Ut},isPersistent:Ht,destructor:function(){var e,n=this.constructor.Interface;for(e in n)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=Ht,this._dispatchInstances=this._dispatchListeners=null}}),Bt.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},Bt.extend=function(e){function n(){}function t(){return r.apply(this,arguments)}var r=this;n.prototype=r.prototype;var o=new n;return a(o,t.prototype),t.prototype=o,t.prototype.constructor=t,t.Interface=a({},r.Interface,e),t.extend=r.extend,Vt(t),t},Vt(Bt);var $t=Bt.extend({data:null}),qt=Bt.extend({data:null}),Kt=[9,13,27,32],Yt=T&&"CompositionEvent"in window,Jt=null;T&&"documentMode"in document&&(Jt=document.documentMode);var Gt=T&&"TextEvent"in window&&!Jt,Xt=T&&(!Yt||Jt&&8=Jt),Zt=String.fromCharCode(32),er={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},nr=!1;function tr(e,n){switch(e){case"keyup":return-1!==Kt.indexOf(n.keyCode);case"keydown":return 229!==n.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function rr(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var ar=!1,or={eventTypes:er,extractEvents:function(e,n,t,r){var a;if(Yt)e:{switch(e){case"compositionstart":var o=er.compositionStart;break e;case"compositionend":o=er.compositionEnd;break e;case"compositionupdate":o=er.compositionUpdate;break e}o=void 0}else ar?tr(e,t)&&(o=er.compositionEnd):"keydown"===e&&229===t.keyCode&&(o=er.compositionStart);return o?(Xt&&"ko"!==t.locale&&(ar||o!==er.compositionStart?o===er.compositionEnd&&ar&&(a=Dt()):(At="value"in(Ft=r)?Ft.value:Ft.textContent,ar=!0)),o=$t.getPooled(o,n,t,r),(a||null!==(a=rr(t)))&&(o.data=a),zt(o),a=o):a=null,(e=Gt?function(e,n){switch(e){case"compositionend":return rr(n);case"keypress":return 32!==n.which?null:(nr=!0,Zt);case"textInput":return(e=n.data)===Zt&&nr?null:e;default:return null}}(e,t):function(e,n){if(ar)return"compositionend"===e||!Yt&&tr(e,n)?(e=Dt(),Mt=At=Ft=null,ar=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=document.documentMode,Dr={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Ur=null,Hr=null,Br=null,Wr=!1;function Qr(e,n){var t=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;return Wr||null==Ur||Ur!==ut(t)?null:(t="selectionStart"in(t=Ur)&&ft(t)?{start:t.selectionStart,end:t.selectionEnd}:{anchorNode:(t=(t.ownerDocument&&t.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:t.anchorOffset,focusNode:t.focusNode,focusOffset:t.focusOffset},Br&&Ar(Br,t)?null:(Br=t,(e=Bt.getPooled(Dr.select,Hr,e,n)).type="select",e.target=Ur,zt(e),e))}var Vr={eventTypes:Dr,extractEvents:function(e,n,t,r,a,o){if(!(o=!(a=o||(r.window===r?r.document:9===r.nodeType?r:r.ownerDocument)))){e:{a=Je(a),o=C.onSelect;for(var i=0;ioa||(e.current=aa[oa],aa[oa]=null,oa--)}function la(e,n){oa++,aa[oa]=e.current,e.current=n}var ua={},ca={current:ua},sa={current:!1},pa=ua;function fa(e,n){var t=e.type.contextTypes;if(!t)return ua;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===n)return r.__reactInternalMemoizedMaskedChildContext;var a,o={};for(a in t)o[a]=n[a];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=o),o}function da(e){return null!==(e=e.childContextTypes)&&void 0!==e}function ha(){ia(sa),ia(ca)}function ma(e,n,t){if(ca.current!==ua)throw Error(i(168));la(ca,n),la(sa,t)}function ga(e,n,t){var r=e.stateNode;if(e=n.childContextTypes,"function"!=typeof r.getChildContext)return t;for(var o in r=r.getChildContext())if(!(o in e))throw Error(i(108,ge(n)||"Unknown",o));return a({},t,{},r)}function ba(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ua,pa=ca.current,la(ca,e),la(sa,sa.current),!0}function va(e,n,t){var r=e.stateNode;if(!r)throw Error(i(169));t?(e=ga(e,n,pa),r.__reactInternalMemoizedMergedChildContext=e,ia(sa),ia(ca),la(ca,e)):ia(sa),la(sa,t)}var ya=o.unstable_runWithPriority,xa=o.unstable_scheduleCallback,wa=o.unstable_cancelCallback,ka=o.unstable_requestPaint,Ea=o.unstable_now,Sa=o.unstable_getCurrentPriorityLevel,Ca=o.unstable_ImmediatePriority,Pa=o.unstable_UserBlockingPriority,Ta=o.unstable_NormalPriority,_a=o.unstable_LowPriority,Na=o.unstable_IdlePriority,Oa={},La=o.unstable_shouldYield,ja=void 0!==ka?ka:function(){},Ra=null,Ia=null,za=!1,Fa=Ea(),Aa=1e4>Fa?Ea:function(){return Ea()-Fa};function Ma(){switch(Sa()){case Ca:return 99;case Pa:return 98;case Ta:return 97;case _a:return 96;case Na:return 95;default:throw Error(i(332))}}function Da(e){switch(e){case 99:return Ca;case 98:return Pa;case 97:return Ta;case 96:return _a;case 95:return Na;default:throw Error(i(332))}}function Ua(e,n){return e=Da(e),ya(e,n)}function Ha(e,n,t){return e=Da(e),xa(e,n,t)}function Ba(e){return null===Ra?(Ra=[e],Ia=xa(Ca,Qa)):Ra.push(e),Oa}function Wa(){if(null!==Ia){var e=Ia;Ia=null,wa(e)}Qa()}function Qa(){if(!za&&null!==Ra){za=!0;var e=0;try{var n=Ra;Ua(99,(function(){for(;e=n&&(_i=!0),e.firstContext=null)}function no(e,n){if(Ja!==e&&!1!==n&&0!==n)if("number"==typeof n&&1073741823!==n||(Ja=e,n=1073741823),n={context:e,observedBits:n,next:null},null===Ya){if(null===Ka)throw Error(i(308));Ya=n,Ka.dependencies={expirationTime:0,firstContext:n,responders:null}}else Ya=Ya.next=n;return e._currentValue}var to=!1;function ro(e){e.updateQueue={baseState:e.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function ao(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,baseQueue:e.baseQueue,shared:e.shared,effects:e.effects})}function oo(e,n){return(e={expirationTime:e,suspenseConfig:n,tag:0,payload:null,callback:null,next:null}).next=e}function io(e,n){if(null!==(e=e.updateQueue)){var t=(e=e.shared).pending;null===t?n.next=n:(n.next=t.next,t.next=n),e.pending=n}}function lo(e,n){var t=e.alternate;null!==t&&ao(t,e),null===(t=(e=e.updateQueue).baseQueue)?(e.baseQueue=n.next=n,n.next=n):(n.next=t.next,t.next=n)}function uo(e,n,t,r){var o=e.updateQueue;to=!1;var i=o.baseQueue,l=o.shared.pending;if(null!==l){if(null!==i){var u=i.next;i.next=l.next,l.next=u}i=l,o.shared.pending=null,null!==(u=e.alternate)&&null!==(u=u.updateQueue)&&(u.baseQueue=l)}if(null!==i){u=i.next;var c=o.baseState,s=0,p=null,f=null,d=null;if(null!==u)for(var h=u;;){if((l=h.expirationTime)s&&(s=l)}else{null!==d&&(d=d.next={expirationTime:1073741823,suspenseConfig:h.suspenseConfig,tag:h.tag,payload:h.payload,callback:h.callback,next:null}),ru(l,h.suspenseConfig);e:{var g=e,b=h;switch(l=n,m=t,b.tag){case 1:if("function"==typeof(g=b.payload)){c=g.call(m,c,l);break e}c=g;break e;case 3:g.effectTag=-4097&g.effectTag|64;case 0:if(null===(l="function"==typeof(g=b.payload)?g.call(m,c,l):g)||void 0===l)break e;c=a({},c,l);break e;case 2:to=!0}}null!==h.callback&&(e.effectTag|=32,null===(l=o.effects)?o.effects=[h]:l.push(h))}if(null===(h=h.next)||h===u){if(null===(l=o.shared.pending))break;h=i.next=l.next,l.next=u,o.baseQueue=i=l,o.shared.pending=null}}null===d?p=c:d.next=f,o.baseState=p,o.baseQueue=d,au(s),e.expirationTime=s,e.memoizedState=c}}function co(e,n,t){if(e=n.effects,n.effects=null,null!==e)for(n=0;nm?(g=p,p=null):g=p.sibling;var b=d(a,p,l[m],u);if(null===b){null===p&&(p=g);break}e&&p&&null===b.alternate&&n(a,p),i=o(b,i,m),null===s?c=b:s.sibling=b,s=b,p=g}if(m===l.length)return t(a,p),c;if(null===p){for(;mg?(b=m,m=null):b=m.sibling;var y=d(a,m,v.value,c);if(null===y){null===m&&(m=b);break}e&&m&&null===y.alternate&&n(a,m),l=o(y,l,g),null===p?s=y:p.sibling=y,p=y,m=b}if(v.done)return t(a,m),s;if(null===m){for(;!v.done;g++,v=u.next())null!==(v=f(a,v.value,c))&&(l=o(v,l,g),null===p?s=v:p.sibling=v,p=v);return s}for(m=r(a,m);!v.done;g++,v=u.next())null!==(v=h(m,a,g,v.value,c))&&(e&&null!==v.alternate&&m.delete(null===v.key?g:v.key),l=o(v,l,g),null===p?s=v:p.sibling=v,p=v);return e&&m.forEach((function(e){return n(a,e)})),s}return function(e,r,o,u){var c="object"==typeof o&&null!==o&&o.type===te&&null===o.key;c&&(o=o.props.children);var s="object"==typeof o&&null!==o;if(s)switch(o.$$typeof){case ee:e:{for(s=o.key,c=r;null!==c;){if(c.key===s){switch(c.tag){case 7:if(o.type===te){t(e,c.sibling),(r=a(c,o.props.children)).return=e,e=r;break e}break;default:if(c.elementType===o.type){t(e,c.sibling),(r=a(c,o.props)).ref=xo(e,c,o),r.return=e,e=r;break e}}t(e,c);break}n(e,c),c=c.sibling}o.type===te?((r=Pu(o.props.children,e.mode,u,o.key)).return=e,e=r):((u=Cu(o.type,o.key,o.props,null,e.mode,u)).ref=xo(e,r,o),u.return=e,e=u)}return l(e);case ne:e:{for(c=o.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){t(e,r.sibling),(r=a(r,o.children||[])).return=e,e=r;break e}t(e,r);break}n(e,r),r=r.sibling}(r=_u(o,e.mode,u)).return=e,e=r}return l(e)}if("string"==typeof o||"number"==typeof o)return o=""+o,null!==r&&6===r.tag?(t(e,r.sibling),(r=a(r,o)).return=e,e=r):(t(e,r),(r=Tu(o,e.mode,u)).return=e,e=r),l(e);if(yo(o))return m(e,r,o,u);if(me(o))return g(e,r,o,u);if(s&&wo(e,o),void 0===o&&!c)switch(e.tag){case 1:case 0:throw e=e.type,Error(i(152,e.displayName||e.name||"Component"))}return t(e,r)}}var Eo=ko(!0),So=ko(!1),Co={},Po={current:Co},To={current:Co},_o={current:Co};function No(e){if(e===Co)throw Error(i(174));return e}function Oo(e,n){switch(la(_o,n),la(To,e),la(Po,Co),e=n.nodeType){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:ze(null,"");break;default:n=ze(n=(e=8===e?n.parentNode:n).namespaceURI||null,e=e.tagName)}ia(Po),la(Po,n)}function Lo(){ia(Po),ia(To),ia(_o)}function jo(e){No(_o.current);var n=No(Po.current),t=ze(n,e.type);n!==t&&(la(To,e),la(Po,t))}function Ro(e){To.current===e&&(ia(Po),ia(To))}var Io={current:0};function zo(e){for(var n=e;null!==n;){if(13===n.tag){var t=n.memoizedState;if(null!==t&&(null===(t=t.dehydrated)||"$?"===t.data||"$!"===t.data))return n}else if(19===n.tag&&void 0!==n.memoizedProps.revealOrder){if(0!=(64&n.effectTag))return n}else if(null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}function Fo(e,n){return{responder:e,props:n}}var Ao=J.ReactCurrentDispatcher,Mo=J.ReactCurrentBatchConfig,Do=0,Uo=null,Ho=null,Bo=null,Wo=!1;function Qo(){throw Error(i(321))}function Vo(e,n){if(null===n)return!1;for(var t=0;to))throw Error(i(301));o+=1,Bo=Ho=null,n.updateQueue=null,Ao.current=bi,e=t(r,a)}while(n.expirationTime===Do)}if(Ao.current=hi,n=null!==Ho&&null!==Ho.next,Do=0,Bo=Ho=Uo=null,Wo=!1,n)throw Error(i(300));return e}function qo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Bo?Uo.memoizedState=Bo=e:Bo=Bo.next=e,Bo}function Ko(){if(null===Ho){var e=Uo.alternate;e=null!==e?e.memoizedState:null}else e=Ho.next;var n=null===Bo?Uo.memoizedState:Bo.next;if(null!==n)Bo=n,Ho=e;else{if(null===e)throw Error(i(310));e={memoizedState:(Ho=e).memoizedState,baseState:Ho.baseState,baseQueue:Ho.baseQueue,queue:Ho.queue,next:null},null===Bo?Uo.memoizedState=Bo=e:Bo=Bo.next=e}return Bo}function Yo(e,n){return"function"==typeof n?n(e):n}function Jo(e){var n=Ko(),t=n.queue;if(null===t)throw Error(i(311));t.lastRenderedReducer=e;var r=Ho,a=r.baseQueue,o=t.pending;if(null!==o){if(null!==a){var l=a.next;a.next=o.next,o.next=l}r.baseQueue=a=o,t.pending=null}if(null!==a){a=a.next,r=r.baseState;var u=l=o=null,c=a;do{var s=c.expirationTime;if(sUo.expirationTime&&(Uo.expirationTime=s,au(s))}else null!==u&&(u=u.next={expirationTime:1073741823,suspenseConfig:c.suspenseConfig,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),ru(s,c.suspenseConfig),r=c.eagerReducer===e?c.eagerState:e(r,c.action);c=c.next}while(null!==c&&c!==a);null===u?o=r:u.next=l,zr(r,n.memoizedState)||(_i=!0),n.memoizedState=r,n.baseState=o,n.baseQueue=u,t.lastRenderedState=r}return[n.memoizedState,t.dispatch]}function Go(e){var n=Ko(),t=n.queue;if(null===t)throw Error(i(311));t.lastRenderedReducer=e;var r=t.dispatch,a=t.pending,o=n.memoizedState;if(null!==a){t.pending=null;var l=a=a.next;do{o=e(o,l.action),l=l.next}while(l!==a);zr(o,n.memoizedState)||(_i=!0),n.memoizedState=o,null===n.baseQueue&&(n.baseState=o),t.lastRenderedState=o}return[o,r]}function Xo(e){var n=qo();return"function"==typeof e&&(e=e()),n.memoizedState=n.baseState=e,e=(e=n.queue={pending:null,dispatch:null,lastRenderedReducer:Yo,lastRenderedState:e}).dispatch=di.bind(null,Uo,e),[n.memoizedState,e]}function Zo(e,n,t,r){return e={tag:e,create:n,destroy:t,deps:r,next:null},null===(n=Uo.updateQueue)?(n={lastEffect:null},Uo.updateQueue=n,n.lastEffect=e.next=e):null===(t=n.lastEffect)?n.lastEffect=e.next=e:(r=t.next,t.next=e,e.next=r,n.lastEffect=e),e}function ei(){return Ko().memoizedState}function ni(e,n,t,r){var a=qo();Uo.effectTag|=e,a.memoizedState=Zo(1|n,t,void 0,void 0===r?null:r)}function ti(e,n,t,r){var a=Ko();r=void 0===r?null:r;var o=void 0;if(null!==Ho){var i=Ho.memoizedState;if(o=i.destroy,null!==r&&Vo(r,i.deps))return void Zo(n,t,o,r)}Uo.effectTag|=e,a.memoizedState=Zo(1|n,t,o,r)}function ri(e,n){return ni(516,4,e,n)}function ai(e,n){return ti(516,4,e,n)}function oi(e,n){return ti(4,2,e,n)}function ii(e,n){return"function"==typeof n?(e=e(),n(e),function(){n(null)}):null!=n?(e=e(),n.current=e,function(){n.current=null}):void 0}function li(e,n,t){return t=null!=t?t.concat([e]):null,ti(4,2,ii.bind(null,n,e),t)}function ui(){}function ci(e,n){return qo().memoizedState=[e,void 0===n?null:n],e}function si(e,n){var t=Ko();n=void 0===n?null:n;var r=t.memoizedState;return null!==r&&null!==n&&Vo(n,r[1])?r[0]:(t.memoizedState=[e,n],e)}function pi(e,n){var t=Ko();n=void 0===n?null:n;var r=t.memoizedState;return null!==r&&null!==n&&Vo(n,r[1])?r[0]:(e=e(),t.memoizedState=[e,n],e)}function fi(e,n,t){var r=Ma();Ua(98>r?98:r,(function(){e(!0)})),Ua(97<\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=u.createElement(o,{is:r.is}):(e=u.createElement(o),"select"===o&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,o),e[kt]=n,e[Et]=r,Mi(e,n),n.stateNode=e,u=at(o,r),o){case"iframe":case"object":case"embed":$n("load",e),c=r;break;case"video":case"audio":for(c=0;cr.tailExpiration&&1n)&&Ul.set(e,n))}}function ql(e,n){e.expirationTime=(e=t>(e=e.nextKnownPendingLevel)?t:e)&&n!==e?0:e}function Yl(e){if(0!==e.lastExpiredTime)e.callbackExpirationTime=1073741823,e.callbackPriority=99,e.callbackNode=Ba(Gl.bind(null,e));else{var n=Kl(e),t=e.callbackNode;if(0===n)null!==t&&(e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90);else{var r=Ql();if(r=1073741823===n?99:1===n||2===n?95:0>=(r=10*(1073741821-n)-10*(1073741821-r))?99:250>=r?98:5250>=r?97:95,null!==t){var a=e.callbackPriority;if(e.callbackExpirationTime===n&&a>=r)return;t!==Oa&&wa(t)}e.callbackExpirationTime=n,e.callbackPriority=r,n=1073741823===n?Ba(Gl.bind(null,e)):Ha(r,Jl.bind(null,e),{timeout:10*(1073741821-n)-Aa()}),e.callbackNode=n}}}function Jl(e,n){if(Wl=0,n)return Ru(e,n=Ql()),Yl(e),null;var t=Kl(e);if(0!==t){if(n=e.callbackNode,0!=(48&wl))throw Error(i(327));if(du(),e===kl&&t===Sl||eu(e,t),null!==El){var r=wl;wl|=16;for(var a=tu();;)try{iu();break}catch(n){nu(e,n)}if(Ga(),wl=r,gl.current=a,1===Cl)throw n=Pl,eu(e,t),Lu(e,t),Yl(e),n;if(null===El)switch(a=e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,r=Cl,kl=null,r){case vl:case 1:throw Error(i(345));case 2:Ru(e,2=t){e.lastPingedTime=t,eu(e,t);break}}if(0!==(o=Kl(e))&&o!==t)break;if(0!==r&&r!==t){e.lastPingedTime=r;break}e.timeoutHandle=bt(su.bind(null,e),a);break}su(e);break;case xl:if(Lu(e,t),t===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=cu(a)),Ll&&(0===(a=e.lastPingedTime)||a>=t)){e.lastPingedTime=t,eu(e,t);break}if(0!==(a=Kl(e))&&a!==t)break;if(0!==r&&r!==t){e.lastPingedTime=r;break}if(1073741823!==_l?r=10*(1073741821-_l)-Aa():1073741823===Tl?r=0:(r=10*(1073741821-Tl)-5e3,0>(r=(a=Aa())-r)&&(r=0),(t=10*(1073741821-t)-a)<(r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ml(r/1960))-r)&&(r=t)),10=(r=0|l.busyMinDurationMs)?r=0:(a=0|l.busyDelayMs,r=(o=Aa()-(10*(1073741821-o)-(0|l.timeoutMs||5e3)))<=a?0:a+r-o),10 component higher in the tree to provide a loading indicator or placeholder to display."+be(i))}5!==Cl&&(Cl=2),l=Ji(l,i),p=o;do{switch(p.tag){case 3:u=l,p.effectTag|=4096,p.expirationTime=n,lo(p,fl(p,u,n));break e;case 1:u=l;var x=p.type,w=p.stateNode;if(0==(64&p.effectTag)&&("function"==typeof x.getDerivedStateFromError||null!==w&&"function"==typeof w.componentDidCatch&&(null===Fl||!Fl.has(w)))){p.effectTag|=4096,p.expirationTime=n,lo(p,dl(p,u,n));break e}}p=p.return}while(null!==p)}El=uu(El)}catch(e){n=e;continue}break}}function tu(){var e=gl.current;return gl.current=hi,null===e?hi:e}function ru(e,n){eOl&&(Ol=e)}function ou(){for(;null!==El;)El=lu(El)}function iu(){for(;null!==El&&!La();)El=lu(El)}function lu(e){var n=hl(e.alternate,e,Sl);return e.memoizedProps=e.pendingProps,null===n&&(n=uu(e)),bl.current=null,n}function uu(e){El=e;do{var n=El.alternate;if(e=El.return,0==(2048&El.effectTag)){if(n=Ki(n,El,Sl),1===Sl||1!==El.childExpirationTime){for(var t=0,r=El.child;null!==r;){var a=r.expirationTime,o=r.childExpirationTime;a>t&&(t=a),o>t&&(t=o),r=r.sibling}El.childExpirationTime=t}if(null!==n)return n;null!==e&&0==(2048&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=El.firstEffect),null!==El.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=El.firstEffect),e.lastEffect=El.lastEffect),1(e=e.childExpirationTime)?n:e}function su(e){var n=Ma();return Ua(99,pu.bind(null,e,n)),null}function pu(e,n){do{du()}while(null!==Ml);if(0!=(48&wl))throw Error(i(327));var t=e.finishedWork,r=e.finishedExpirationTime;if(null===t)return null;if(e.finishedWork=null,e.finishedExpirationTime=0,t===e.current)throw Error(i(177));e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90,e.nextKnownPendingLevel=0;var a=cu(t);if(e.firstPendingTime=a,r<=e.lastSuspendedTime?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:r<=e.firstSuspendedTime&&(e.firstSuspendedTime=r-1),r<=e.lastPingedTime&&(e.lastPingedTime=0),r<=e.lastExpiredTime&&(e.lastExpiredTime=0),e===kl&&(El=kl=null,Sl=0),1u&&(s=u,u=l,l=s),s=st(x,l),p=st(x,u),s&&p&&(1!==k.rangeCount||k.anchorNode!==s.node||k.anchorOffset!==s.offset||k.focusNode!==p.node||k.focusOffset!==p.offset)&&((w=w.createRange()).setStart(s.node,s.offset),k.removeAllRanges(),l>u?(k.addRange(w),k.extend(p.node,p.offset)):(w.setEnd(p.node,p.offset),k.addRange(w))))),w=[];for(k=x;k=k.parentNode;)1===k.nodeType&&w.push({element:k,left:k.scrollLeft,top:k.scrollTop});for("function"==typeof x.focus&&x.focus(),x=0;x=t?Bi(e,n,t):(la(Io,1&Io.current),null!==(n=$i(e,n,t))?n.sibling:null);la(Io,1&Io.current);break;case 19:if(r=n.childExpirationTime>=t,0!=(64&e.effectTag)){if(r)return Vi(e,n,t);n.effectTag|=64}if(null!==(a=n.memoizedState)&&(a.rendering=null,a.tail=null),la(Io,Io.current),!r)return null}return $i(e,n,t)}_i=!1}}else _i=!1;switch(n.expirationTime=0,n.tag){case 2:if(r=n.type,null!==e&&(e.alternate=null,n.alternate=null,n.effectTag|=2),e=n.pendingProps,a=fa(n,ca.current),eo(n,t),a=$o(null,n,r,e,a,t),n.effectTag|=1,"object"==typeof a&&null!==a&&"function"==typeof a.render&&void 0===a.$$typeof){if(n.tag=1,n.memoizedState=null,n.updateQueue=null,da(r)){var o=!0;ba(n)}else o=!1;n.memoizedState=null!==a.state&&void 0!==a.state?a.state:null,ro(n);var l=r.getDerivedStateFromProps;"function"==typeof l&&fo(n,r,l,e),a.updater=ho,n.stateNode=a,a._reactInternalFiber=n,vo(n,r,e,t),n=Fi(null,n,r,!0,o,t)}else n.tag=0,Ni(null,n,a,t),n=n.child;return n;case 16:e:{if(a=n.elementType,null!==e&&(e.alternate=null,n.alternate=null,n.effectTag|=2),e=n.pendingProps,function(e){if(-1===e._status){e._status=0;var n=e._ctor;n=n(),e._result=n,n.then((function(n){0===e._status&&(n=n.default,e._status=1,e._result=n)}),(function(n){0===e._status&&(e._status=2,e._result=n)}))}}(a),1!==a._status)throw a._result;switch(a=a._result,n.type=a,o=n.tag=function(e){if("function"==typeof e)return Eu(e)?1:0;if(null!=e){if((e=e.$$typeof)===ue)return 11;if(e===pe)return 14}return 2}(a),e=$a(a,e),o){case 0:n=Ii(null,n,a,e,t);break e;case 1:n=zi(null,n,a,e,t);break e;case 11:n=Oi(null,n,a,e,t);break e;case 14:n=Li(null,n,a,$a(a.type,e),r,t);break e}throw Error(i(306,a,""))}return n;case 0:return r=n.type,a=n.pendingProps,Ii(e,n,r,a=n.elementType===r?a:$a(r,a),t);case 1:return r=n.type,a=n.pendingProps,zi(e,n,r,a=n.elementType===r?a:$a(r,a),t);case 3:if(Ai(n),r=n.updateQueue,null===e||null===r)throw Error(i(282));if(r=n.pendingProps,a=null!==(a=n.memoizedState)?a.element:null,ao(e,n),uo(n,r,null,t),(r=n.memoizedState.element)===a)Pi(),n=$i(e,n,t);else{if((a=n.stateNode.hydrate)&&(yi=yt(n.stateNode.containerInfo.firstChild),vi=n,a=xi=!0),a)for(t=So(n,null,r,t),n.child=t;t;)t.effectTag=-3&t.effectTag|1024,t=t.sibling;else Ni(e,n,r,t),Pi();n=n.child}return n;case 5:return jo(n),null===e&&Ei(n),r=n.type,a=n.pendingProps,o=null!==e?e.memoizedProps:null,l=a.children,gt(r,a)?l=null:null!==o&>(r,o)&&(n.effectTag|=16),Ri(e,n),4&n.mode&&1!==t&&a.hidden?(n.expirationTime=n.childExpirationTime=1,n=null):(Ni(e,n,l,t),n=n.child),n;case 6:return null===e&&Ei(n),null;case 13:return Bi(e,n,t);case 4:return Oo(n,n.stateNode.containerInfo),r=n.pendingProps,null===e?n.child=Eo(n,null,r,t):Ni(e,n,r,t),n.child;case 11:return r=n.type,a=n.pendingProps,Oi(e,n,r,a=n.elementType===r?a:$a(r,a),t);case 7:return Ni(e,n,n.pendingProps,t),n.child;case 8:case 12:return Ni(e,n,n.pendingProps.children,t),n.child;case 10:e:{r=n.type._context,a=n.pendingProps,l=n.memoizedProps,o=a.value;var u=n.type._context;if(la(qa,u._currentValue),u._currentValue=o,null!==l)if(u=l.value,0==(o=zr(u,o)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(u,o):1073741823))){if(l.children===a.children&&!sa.current){n=$i(e,n,t);break e}}else for(null!==(u=n.child)&&(u.return=n);null!==u;){var c=u.dependencies;if(null!==c){l=u.child;for(var s=c.firstContext;null!==s;){if(s.context===r&&0!=(s.observedBits&o)){1===u.tag&&((s=oo(t,null)).tag=2,io(u,s)),u.expirationTime=n&&e<=n}function Lu(e,n){var t=e.firstSuspendedTime,r=e.lastSuspendedTime;tn||0===t)&&(e.lastSuspendedTime=n),n<=e.lastPingedTime&&(e.lastPingedTime=0),n<=e.lastExpiredTime&&(e.lastExpiredTime=0)}function ju(e,n){n>e.firstPendingTime&&(e.firstPendingTime=n);var t=e.firstSuspendedTime;0!==t&&(n>=t?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:n>=e.lastSuspendedTime&&(e.lastSuspendedTime=n+1),n>e.nextKnownPendingLevel&&(e.nextKnownPendingLevel=n))}function Ru(e,n){var t=e.lastExpiredTime;(0===t||t>n)&&(e.lastExpiredTime=n)}function Iu(e,n,t,r){var a=n.current,o=Ql(),l=so.suspense;o=Vl(o,a,l);e:if(t){n:{if(Ge(t=t._reactInternalFiber)!==t||1!==t.tag)throw Error(i(170));var u=t;do{switch(u.tag){case 3:u=u.stateNode.context;break n;case 1:if(da(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break n}}u=u.return}while(null!==u);throw Error(i(171))}if(1===t.tag){var c=t.type;if(da(c)){t=ga(t,c,u);break e}}t=u}else t=ua;return null===n.context?n.context=t:n.pendingContext=t,(n=oo(o,l)).payload={element:e},null!==(r=void 0===r?null:r)&&(n.callback=r),io(a,n),$l(a,o),o}function zu(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function Fu(e,n){null!==(e=e.memoizedState)&&null!==e.dehydrated&&e.retryTime=k},l=function(){},n.unstable_forceFrameRate=function(e){0>e||125>>1,a=e[r];if(!(void 0!==a&&0<_(a,n)))break e;e[r]=n,e[t]=a,t=r}}function P(e){return void 0===(e=e[0])?null:e}function T(e){var n=e[0];if(void 0!==n){var t=e.pop();if(t!==n){e[0]=t;e:for(var r=0,a=e.length;r_(i,t))void 0!==u&&0>_(u,i)?(e[r]=u,e[l]=t,r=l):(e[r]=i,e[o]=t,r=o);else{if(!(void 0!==u&&0>_(u,t)))break e;e[r]=u,e[l]=t,r=l}}}return n}return null}function _(e,n){var t=e.sortIndex-n.sortIndex;return 0!==t?t:e.id-n.id}var N=[],O=[],L=1,j=null,R=3,I=!1,z=!1,F=!1;function A(e){for(var n=P(O);null!==n;){if(null===n.callback)T(O);else{if(!(n.startTime<=e))break;T(O),n.sortIndex=n.expirationTime,C(N,n)}n=P(O)}}function M(e){if(F=!1,A(e),!z)if(null!==P(N))z=!0,r(D);else{var n=P(O);null!==n&&a(M,n.startTime-e)}}function D(e,t){z=!1,F&&(F=!1,o()),I=!0;var r=R;try{for(A(t),j=P(N);null!==j&&(!(j.expirationTime>t)||e&&!i());){var l=j.callback;if(null!==l){j.callback=null,R=j.priorityLevel;var u=l(j.expirationTime<=t);t=n.unstable_now(),"function"==typeof u?j.callback=u:j===P(N)&&T(N),A(t)}else T(N);j=P(N)}if(null!==j)var c=!0;else{var s=P(O);null!==s&&a(M,s.startTime-t),c=!1}return c}finally{j=null,R=r,I=!1}}function U(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var H=l;n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(e){e.callback=null},n.unstable_continueExecution=function(){z||I||(z=!0,r(D))},n.unstable_getCurrentPriorityLevel=function(){return R},n.unstable_getFirstCallbackNode=function(){return P(N)},n.unstable_next=function(e){switch(R){case 1:case 2:case 3:var n=3;break;default:n=R}var t=R;R=n;try{return e()}finally{R=t}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=H,n.unstable_runWithPriority=function(e,n){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var t=R;R=e;try{return n()}finally{R=t}},n.unstable_scheduleCallback=function(e,t,i){var l=n.unstable_now();if("object"==typeof i&&null!==i){var u=i.delay;u="number"==typeof u&&0l?(e.sortIndex=u,C(O,e),null===P(N)&&e===P(O)&&(F?o():F=!0,a(M,u-l))):(e.sortIndex=i,C(N,e),z||I||(z=!0,r(D))),e},n.unstable_shouldYield=function(){var e=n.unstable_now();A(e);var t=P(N);return t!==j&&null!==j&&null!==t&&null!==t.callback&&t.startTime<=e&&t.expirationTime=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var l=t.call(o,"catchLoc"),u=t.call(o,"finallyLoc");if(l&&u){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&t.call(a,"finallyLoc")&&this.prev=0;--n){var t=this.tryEntries[n];if(t.finallyLoc===e)return this.complete(t.completion,t.afterLoc),k(t),s}},catch:function(e){for(var n=this.tryEntries.length-1;n>=0;--n){var t=this.tryEntries[n];if(t.tryLoc===e){var r=t.completion;if("throw"===r.type){var a=r.arg;k(t)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,t){return this.delegate={iterator:S(e),resultName:n,nextLoc:t},"next"===this.method&&(this.arg=void 0),s}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},function(e,n,t){},function(e,n){e.exports=function(e){var n=e.siteUrl;n=n.replace(/\/$/,""),Array.prototype.forEach.call(document.querySelectorAll("form[data-members-form]"),(function(e){var t=e.querySelector("[data-members-error]");e.addEventListener("submit",(function r(a){e.removeEventListener("submit",r),a.preventDefault(),t&&(t.innerText=""),e.classList.remove("success","invalid","error");for(var o=a.target.querySelector("input[data-members-email]"),i=a.target.querySelector("input[data-members-name]"),l=o.value,u=i&&i.value||void 0,c=void 0,s=[],p=a.target.querySelectorAll("input[data-members-label]")||[],f=0;fe.length)&&(n=e.length);for(var t=0,r=new Array(n);t=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a,o=!0,i=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){i=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(i)throw a}}}}function p(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function f(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function d(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}t(11);var m=t(1),g=t.n(m);function b(e,n,t,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void t(e)}l.done?n(u):Promise.resolve(u).then(r,a)}function v(e){return function(){var n=this,t=arguments;return new Promise((function(r,a){var o=e.apply(n,t);function i(e){b(o,r,a,i,l,"next",e)}function l(e){b(o,r,a,i,l,"throw",e)}i(void 0)}))}}function y(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function x(e,n){for(var t=0;t"},s,{ref:function(n){return e.node=n},title:l,style:c,frameBorder:"0"}),this.iframeHead&&Object(o.createPortal)(r,this.iframeHead),this.iframeRoot&&Object(o.createPortal)(t,this.iframeRoot))}}]),t}(r.Component);function O(){return(O=Object.assign||function(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}(e,["svgRef","title"]);return a.a.createElement("svg",O({id:"Regular",viewBox:"0 0 24 24",ref:n},r),t?a.a.createElement("title",null,t):null,L,j,R,I)},F=a.a.forwardRef((function(e,n){return a.a.createElement(z,O({svgRef:n},e))}));t.p;var A=function(e){var n=e.gravatar,t=function(e){var n=e.style,t=void 0===n?{}:n;return{avatarContainer:d({},t.avatarContainer||{}),gravatar:d({},t.avatarContainer||{}),userIcon:d({width:"34px",height:"34px",color:"#fff"},t.userIcon||{})}}({style:e.style});return a.a.createElement("figure",{className:"gh-portal-avatar",style:t.avatarContainer},a.a.createElement(F,{style:t.userIcon}),n?a.a.createElement("img",{style:t.gravatar,src:n,alt:""}):null)},M=t(0).createContext({site:{},member:{},action:"",brandColor:"",onAction:function(){}});function D(){return(D=Object.assign||function(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}(e,["svgRef","title"]);return a.a.createElement("svg",D({width:21,height:24,viewBox:"0 0 21 24",fill:"none",ref:n},r),t?a.a.createElement("title",null,t):null,U)},B=a.a.forwardRef((function(e,n){return a.a.createElement(H,D({svgRef:n},e))}));function W(){return(W=Object.assign||function(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}(e,["svgRef","title"]);return a.a.createElement("svg",W({width:24,height:24,viewBox:"0 0 24 24",ref:n},r),t?a.a.createElement("title",null,t):null,Q)},$=a.a.forwardRef((function(e,n){return a.a.createElement(V,W({svgRef:n},e))}));function q(){return(q=Object.assign||function(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}(e,["svgRef","title"]);return a.a.createElement("svg",q({width:25,height:24,viewBox:"0 0 25 24",fill:"none",ref:n},r),t?a.a.createElement("title",null,t):null,K,Y)},G=a.a.forwardRef((function(e,n){return a.a.createElement(J,q({svgRef:n},e))}));function X(){return(X=Object.assign||function(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}(e,["svgRef","title"]);return a.a.createElement("svg",X({width:24,height:18,viewBox:"0 0 24 18",fill:"none",ref:n},r),t?a.a.createElement("title",null,t):null,Z,ee)},te=a.a.forwardRef((function(e,n){return a.a.createElement(ne,X({svgRef:n},e))}));function re(){return(re=Object.assign||function(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}(e,["svgRef","title"]);return a.a.createElement("svg",re({width:26,height:26,viewBox:"0 0 26 26",fill:"none",ref:n},r),t?a.a.createElement("title",null,t):null,ae,oe)},le=a.a.forwardRef((function(e,n){return a.a.createElement(ie,re({svgRef:n},e))})),ue=(t.p,t(0)),ce={"icon-1":B,"icon-2":$,"icon-3":G,"icon-4":te,"icon-5":le},se=function(e){e.brandColor;var n=d({},e.hasText?{}:{width:"105px"});return{frame:d({zIndex:"3999998",position:"fixed",bottom:"0",right:"0",width:"500px",maxWidth:"500px",height:"98px",animation:"250ms ease 0s 1 normal none running animation-bhegco",transition:"opacity 0.3s ease 0s",overflow:"hidden",opacity:1},n),userIcon:{width:"34px",height:"34px",color:"#fff"},buttonIcon:{width:"24px",height:"24px",color:"#fff"},closeIcon:{width:"20px",height:"20px",color:"#fff"}}},pe=function(e){E(t,e);var n=_(t);function t(e){var r;return y(this,t),(r=n.call(this,e)).state={},r.container=ue.createRef(),r.height=null,r.width=null,r}return w(t,[{key:"updateHeight",value:function(e){this.props.updateHeight&&this.props.updateHeight(e)}},{key:"updateWidth",value:function(e){this.props.updateWidth&&this.props.updateWidth(e)}},{key:"componentDidMount",value:function(){this.container&&(this.height=this.container.current&&this.container.current.offsetHeight,this.width=this.container.current&&this.container.current.offsetWidth,this.updateHeight(this.height),this.updateWidth(this.width))}},{key:"componentDidUpdate",value:function(){if(this.container){var e=this.container.current&&this.container.current.offsetHeight,n=this.container.current&&this.container.current.offsetWidth;e!==this.height&&(this.height=e,this.updateHeight(this.height)),n!==this.width&&(this.width=n,this.updateWidth(this.width))}}},{key:"renderTriggerIcon",value:function(){var e=this.context.site||{},n=e.portal_button_icon,t=void 0===n?"":n,r=e.portal_button_style,a=void 0===r?"":r,o=se({brandColor:this.context.brandColor}),i=this.context.member&&this.context.member.avatar_image;if(!a.includes("icon"))return null;if(i)return ue.createElement(A,{gravatar:i});if(this.context.member)return ue.createElement(F,{style:o.userIcon});if(Object.keys(ce).includes(t)){var l=ce[t];return ue.createElement(l,{style:o.buttonIcon})}return t?ue.createElement("img",{style:{width:"26px",height:"26px"},src:t,alt:""}):(this.hasText()&&(o.userIcon.width="26px",o.userIcon.height="26px"),ue.createElement(F,{style:o.userIcon}))}},{key:"hasText",value:function(){var e=this.context.site,n=e.portal_button_signup_text,t=e.portal_button_style;return["icon-and-text","text-only"].includes(t)&&!this.context.member&&n}},{key:"renderText",value:function(){var e=this.context.site.portal_button_signup_text;return this.hasText()?ue.createElement("span",{className:"gh-portal-triggerbtn-label"}," ",e," "):null}},{key:"onToggle",value:function(){var e=this.context,n=e.showPopup,t=e.member;if(n)this.context.onAction("closePopup");else{var r=t?"accountHome":"signup";this.context.onAction("openPopup",{page:r})}}},{key:"render",value:function(){var e=this,n=this.hasText(),t=this.context.member?"halo":"";return n?ue.createElement("div",{className:"gh-portal-triggerbtn-wrapper",ref:this.container},ue.createElement("div",{className:"gh-portal-triggerbtn-container with-label",onClick:function(n){return e.onToggle(n)}},this.renderTriggerIcon(),n?this.renderText():"")):ue.createElement("div",{className:"gh-portal-triggerbtn-wrapper"},ue.createElement("div",{className:"gh-portal-triggerbtn-container "+t,onClick:function(n){return e.onToggle(n)}},this.renderTriggerIcon()))}}]),t}(ue.Component);pe.contextType=M;var fe=function(e){E(t,e);var n=_(t);function t(e){var r;return y(this,t),(r=n.call(this,e)).state={width:null},r}return w(t,[{key:"onWidthChange",value:function(e){this.setState({width:e})}},{key:"hasText",value:function(){var e=this.context.site,n=e.portal_button_signup_text,t=e.portal_button_style;return["icon-and-text","text-only"].includes(t)&&!this.context.member&&n}},{key:"renderFrameStyles",value:function(){var e="\n :root {\n --brandcolor: ".concat(this.context.brandColor,"\n }\n ")+'\n /* Colors\n /* ----------------------------------------------------- */\n :root {\n --black: #000;\n --grey0: #1d1d1d;\n --grey1: #333;\n --grey2: #3d3d3d;\n --grey3: #474747;\n --grey4: #515151;\n --grey5: #686868;\n --grey6: #7f7f7f;\n --grey7: #979797;\n --grey8: #aeaeae;\n --grey9: #c5c5c5;\n --grey10: #dcdcdc;\n --grey11: #e1e1e1;\n --grey12: #eaeaea;\n --grey13: #f9f9f9;\n --white: #fff;\n --red: #f02525;\n --yellow: #FFDC15;\n --green: #7FC724;\n }\n\n /* Globals\n /* ----------------------------------------------------- */\n html {\n font-size: 62.5%;\n height: 100%;\n }\n\n body {\n margin: 0px;\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;\n font-size: 1.6rem;\n height: 100%;\n line-height: 1.6em;\n font-weight: 400;\n font-style: normal;\n color: var(--grey4);\n box-sizing: border-box;\n }\n\n button,\n button span {\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;\n }\n\n *, ::after, ::before {\n box-sizing: border-box;\n }\n\n h1, h2, h3, h4, h5, h6, p {\n line-height: 1.15em;\n padding: 0;\n margin: 0;\n }\n\n h1 {\n font-size: 31px;\n font-weight: 500;\n letter-spacing: 0.2px;\n }\n\n h2 {\n font-size: 23px;\n font-weight: 500;\n letter-spacing: 0.2px;\n }\n\n h3 {\n font-size: 20px;\n font-weight: 500;\n letter-spacing: 0.2px;\n }\n\n p {\n font-size: 15px;\n line-height: 1.55em;\n margin-bottom: 24px;\n }\n\n strong {\n font-weight: 600;\n }\n\n a,\n .gh-portal-link {\n cursor: pointer;\n }\n\n svg {\n box-sizing: content-box;\n }\n\n input,\n textarea {\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;\n font-size: 1.5rem;\n }\n\n textarea {\n padding: 10px;\n line-height: 1.5em;\n }\n\n .gh-portal-triggerbtn-wrapper {\n display: inline-flex;\n align-items: flex-start;\n justify-content: flex-end;\n height: 100%;\n opacity: 1;\n transition: transform 0.16s linear 0s; opacity 0.08s linear 0s;\n user-select: none;\n line-height: 1;\n padding: 10px 28px 0 17px;\n }\n \n .gh-portal-triggerbtn-wrapper span {\n margin-bottom: 1px;\n }\n \n .gh-portal-triggerbtn-container {\n position: relative;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--brandcolor);\n height: 60px;\n min-width: 60px;\n box-shadow: rgba(0, 0, 0, 0.24) 0px 8px 16px -2px;\n border-radius: 999px;\n transition: opacity 0.3s ease;\n }\n\n .gh-portal-triggerbtn-container:before {\n position: absolute;\n content: "";\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n border-radius: 999px;\n background: rgba(255, 255, 255, 0);\n transition: background 0.3s ease;\n }\n\n .gh-portal-triggerbtn-container:hover:before {\n background: rgba(255, 255, 255, 0.08);\n }\n\n .gh-portal-triggerbtn-container.halo:before {\n top: -4px;\n right: -4px;\n bottom: -4px;\n left: -4px;\n border: 4px solid rgba(255, 255, 255, 0.15);\n }\n\n .gh-portal-triggerbtn-container.with-label {\n padding: 0 12px 0 16px;\n }\n\n .gh-portal-triggerbtn-label {\n padding: 8px;\n color: rgb(255, 255, 255);\n display: block;\n white-space: nowrap;\n max-width: 380px;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .gh-portal-avatar {\n margin-bottom: 0px !important;\n width: 60px;\n height: 60px;\n }\n\n .gh-portal-avatar {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n margin: 0 0 8px 0;\n border-radius: 999px;\n }\n\n .gh-portal-avatar img {\n position: absolute;\n display: block;\n top: -2px;\n right: -2px;\n bottom: -2px;\n left: -2px;\n width: calc(100% + 4px);\n height: calc(100% + 4px);\n opacity: 1;\n max-width: unset;\n }\n';return ue.createElement("style",{dangerouslySetInnerHTML:{__html:e}})}},{key:"render",value:function(){var e=this,n=this.context.site.portal_button,t=this.context.showPopup;if(!n)return null;var r=this.hasText(),a=d({},se({brandColor:this.context.brandColor,hasText:r}).frame);if(this.state.width){var o=this.state.width+2;a.width="".concat(o,"px")}return ue.createElement(N,{className:"gh-portal-triggerbtn-iframe",style:a,title:"portal-trigger",head:this.renderFrameStyles()},ue.createElement(pe,{isPopupOpen:t,updateWidth:function(n){return e.onWidthChange(n)}}))}}]),t}(ue.Component);function de(){return(de=Object.assign||function(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}(e,["svgRef","title"]);return a.a.createElement("svg",de({viewBox:"0 0 24 24",ref:n},r),t?a.a.createElement("title",null,t):null,he,me)},be=a.a.forwardRef((function(e,n){return a.a.createElement(ge,de({svgRef:n},e))}));function ve(){return(ve=Object.assign||function(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}(e,["svgRef","title"]);return a.a.createElement("svg",ve({viewBox:"0 0 24 24",ref:n},r),t?a.a.createElement("title",null,t):null,ye,xe)},ke=a.a.forwardRef((function(e,n){return a.a.createElement(we,ve({svgRef:n},e))}));function Ee(){return(Ee=Object.assign||function(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}(e,["svgRef","title"]);return a.a.createElement("svg",Ee({viewBox:"0 0 24 24",ref:n},r),t?a.a.createElement("title",null,t):null,Se,Ce)},Te=a.a.forwardRef((function(e,n){return a.a.createElement(Pe,Ee({svgRef:n},e))})),_e=(t.p,function(e){e.qsParams;var n=e.action,t=e.status;if(t&&["true","false"].includes(t)){var r=JSON.parse(t);return{type:n,status:r?"success":"error",duration:3e3,autoHide:!!r}}return{}}),Ne=function(e){var n=e.status,t=e.billingOnly;return!t&&["success"].includes(n)?{type:"stripe:checkout",status:["success"].includes(n)?"success":"warning",duration:3e3,autoHide:!0}:t&&["billing-update-success","billing-update-cancel"].includes(n)?{type:"stripe:billing-update",status:"billing-update-success"===n?"success":"warning",duration:3e3,autoHide:!0,closeable:!0}:void 0},Oe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=window.location.search||"",t=new URLSearchParams(n);e.forEach((function(e){t.delete(e)}));var r=t.toString()?"?".concat(t):"";window.history.replaceState({},"","".concat(window.location.pathname).concat(r))};function Le(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.billingOnly,t=void 0!==n&&n,r=window.location.search;if(!r)return null;var a=new URLSearchParams(r),o=a.get("action"),i=a.get("success"),l=a.get("stripe"),u=null;return l?Ne({qsParams:a,status:l,billingOnly:t}):o&&i&&!t?_e({qsParams:a,action:o,status:i}):u}var je=t(3),Re=t.n(je);function Ie(){var e=c(window.location.hash.substr(1).split("?"),1)[0];e&&/^\/portal\/?(?:\/(\w+(?:\/\w+)?))?\/?$/.test(e)&&window.history.pushState("",document.title,window.location.pathname+window.location.search)}function ze(e){var n=e.page,t=e.siteUrl||"".concat(window.location.protocol,"//").concat(window.location.host).concat(window.location.pathname),r=function(e){var n=e.page,t={default:"#/portal",signin:"#/portal/signin",signup:"#/portal/signup",account:"#/portal/account","account-plans":"#/portal/account/plans","account-profile":"#/portal/account/profile"};return Object.keys(t).includes(n)?t[n]:t.default}({page:n});return"".concat(t).concat(r)}function Fe(){return!(navigator&&navigator.cookieEnabled)}function Ae(e){var n=e.member,t=void 0===n?{}:n;return De({member:t})?(t.subscriptions||[]).find((function(e){return["active","trialing","unpaid","past_due"].includes(e.status)})):null}function Me(e){var n=e.member,t=Ae({member:void 0===n?{}:n});return!!t&&"Complimentary"===t.plan.nickname}function De(e){var n=e.member,t=void 0===n?{}:n;return t&&t.paid}function Ue(e){var n=e.subscription;return n&&n.plan?{type:n.plan.interval,price:n.plan.amount/100,currency:n.plan.currency_symbol,name:n.plan.nickname}:null}function He(e){return Ue({subscription:Ae({member:e.member})})}function Be(e){var n=e.site,t=Ve({site:void 0===n?{}:n});return!t||0===t.length||1===t.length&&"free"===t[0].type}function We(e){var n=e.site,t=void 0===n?{}:n,r=e.plan,a=Ve({site:t});return"free"===r?!a||0===a.length||a.find((function(e){return"free"===e.type})):"monthly"===r?a&&a.length>0&&a.find((function(e){return"month"===e.type})):"yearly"===r&&a&&a.length>0&&a.find((function(e){return"year"===e.type}))}function Qe(e){return"string"==typeof e&&e?e.charAt(0).toUpperCase()+e.slice(1):""}function Ve(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.site,t=void 0===n?{}:n,r=e.includeFree,a=void 0===r||r,o=e.pageQuery,i=t||{},l=i.plans,u=i.allow_self_signup,c=i.is_stripe_configured,s=i.portal_plans;if(!l)return[];var p=[],f=Re()(l.monthly,l.yearly),d=[{type:"month",price:l.monthly,currency_symbol:Ke(l.currency),name:"Monthly"},{type:"year",price:l.yearly,currency_symbol:Ke(l.currency),name:"Yearly",discount:f}];u&&s.includes("free")&&a&&p.push({type:"free",price:0,currency_symbol:Ke(l.currency),name:"Free"});var h="free"===o&&We({site:t,plan:"free"});return c&&!h&&d.forEach((function(e){s.includes(e.name.toLowerCase())&&p.push(e)})),p}var $e=function(e){var n=e.member;return n?n.email:""},qe=function(e){var n=e.member;return n?n.name:""},Ke=function(e){return Intl.NumberFormat("en",{currency:e,style:"currency"}).format(0).replace(/[\d\s.]/g,"")},Ye=function(e){return null==e?"":e.toLocaleString()},Je=function(e){var n=e.type,t=e.status,r=e.autoHide,a=e.duration,o=e.closeable,i=e.state,l=e.message,u=e.meta,c=void 0===u?{}:u,s=0;return i&&i.popupNotification&&(s=(i.popupNotification.count||0)+1),{type:n,status:t,autoHide:r,closeable:o,duration:a,meta:c,message:l,count:s}},Ge=t(0),Xe=function(e){var n=e.type,t=e.status,r=e.context,a=ze({page:"signin",siteUrl:r.site.url}),o=ze({page:"signup",siteUrl:r.site.url});if("signin"===n&&"success"===t&&r.member){var i=r.member.firstname||"";return Ge.createElement("p",null,"Welcome back",i?", "+i:"","!",Ge.createElement("br",null),"You've successfully signed in.")}return"signin"===n&&"error"===t?Ge.createElement("p",null,"Could not sign in. Login link expired. ",Ge.createElement("a",{href:a,target:"_parent"},"Click here to retry")):"signup"===n&&"success"===t?Ge.createElement("p",null,"You've successfully subscribed to ",Ge.createElement("br",null),Ge.createElement("strong",null,r.site.title)):"updateEmail"===n&&"success"===t?Ge.createElement("p",null,"Success! Your email is updated."):"updateEmail"===n&&"error"===t?Ge.createElement("p",null,"Could not update email! Invalid link."):"signup"===n&&"error"===t?Ge.createElement("p",null,"Signup error: Invalid link ",Ge.createElement("br",null),Ge.createElement("a",{href:o,target:"_parent"},"Click here to retry")):"stripe:checkout"===n&&"success"===t?r.member?Ge.createElement("p",null,"Success! Your account is fully activated, you now have access to all content."):Ge.createElement("p",null,"Success! Check your email for magic link to sign-in."):"stripe:checkout"===n&&"warning"===t?r.member?Ge.createElement("p",null,"Plan upgrade was cancelled."):Ge.createElement("p",null,"Plan checkout was cancelled."):Ge.createElement("p",null,"success"===t?"Success":"Error")},Ze=function(e){E(t,e);var n=_(t);function t(){var e;return y(this,t),(e=n.call(this)).state={className:""},e}return w(t,[{key:"componentWillUnmount",value:function(){clearTimeout(this.timeoutId)}},{key:"onNotificationClose",value:function(){this.props.onHideNotification()}},{key:"componentDidUpdate",value:function(){var e=this.context.showPopup;!this.state.className&&e&&this.setState({className:"slideout"})}},{key:"componentDidMount",value:function(){var e=this,n=this.props,t=n.autoHide,r=n.duration,a=void 0===r?2400:r;this.context.showPopup?this.setState({className:"slideout"}):t&&(this.timeoutId=setTimeout((function(){e.setState({className:"slideout"})}),a))}},{key:"onAnimationEnd",value:function(e){"notification-slideout"!==e.animationName&&"notification-slideout-mobile"!==e.animationName||this.props.onHideNotification(e)}},{key:"render",value:function(){var e=this,n=this.props,t=n.type,r=n.status,a=this.state.className,o=void 0===a?"":a,i=r?" ".concat(r):" neutral",l=o?" ".concat(o):"";return Ge.createElement("div",{className:"gh-portal-notification-wrapper"},Ge.createElement("div",{className:"gh-portal-notification".concat(i).concat(l),onAnimationEnd:function(n){return e.onAnimationEnd(n)}},"error"===r?Ge.createElement(Te,{className:"gh-portal-notification-icon error",alt:""}):Ge.createElement(ke,{className:"gh-portal-notification-icon success",alt:""}),Ge.createElement(Xe,{type:t,status:r,context:this.context}),Ge.createElement(be,{className:"gh-portal-notification-closeicon",alt:"Close",onClick:function(n){return e.onNotificationClose(n)}})))}}]),t}(Ge.Component);Ze.contextType=M;var en=function(e){E(t,e);var n=_(t);function t(){var e;y(this,t),e=n.call(this);var r=Le()||{},a=r.type,o=r.status,i=r.autoHide,l=r.duration;return e.state={active:!0,type:a,status:o,autoHide:i,duration:l,className:""},e}return w(t,[{key:"onHideNotification",value:function(){var e=this.state.type,n=[];["signin","signup"].includes(e)?n.push("action","success"):["stripe:checkout"].includes(e)&&n.push("stripe"),Oe(n),this.context.onAction("refreshMemberData"),this.setState({active:!1})}},{key:"renderFrameStyles",value:function(){var e="\n :root {\n --brandcolor: ".concat(this.context.brandColor,"\n }\n ")+'\n /* Colors\n /* ----------------------------------------------------- */\n :root {\n --black: #000;\n --grey0: #1d1d1d;\n --grey1: #333;\n --grey2: #3d3d3d;\n --grey3: #474747;\n --grey4: #515151;\n --grey5: #686868;\n --grey6: #7f7f7f;\n --grey7: #979797;\n --grey8: #aeaeae;\n --grey9: #c5c5c5;\n --grey10: #dcdcdc;\n --grey11: #e1e1e1;\n --grey12: #eaeaea;\n --grey13: #f9f9f9;\n --white: #fff;\n --red: #f02525;\n --yellow: #FFDC15;\n --green: #7FC724;\n }\n\n /* Globals\n /* ----------------------------------------------------- */\n html {\n font-size: 62.5%;\n height: 100%;\n }\n\n body {\n margin: 0px;\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;\n font-size: 1.6rem;\n height: 100%;\n line-height: 1.6em;\n font-weight: 400;\n font-style: normal;\n color: var(--grey4);\n box-sizing: border-box;\n }\n\n button,\n button span {\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;\n }\n\n *, ::after, ::before {\n box-sizing: border-box;\n }\n\n h1, h2, h3, h4, h5, h6, p {\n line-height: 1.15em;\n padding: 0;\n margin: 0;\n }\n\n h1 {\n font-size: 31px;\n font-weight: 500;\n letter-spacing: 0.2px;\n }\n\n h2 {\n font-size: 23px;\n font-weight: 500;\n letter-spacing: 0.2px;\n }\n\n h3 {\n font-size: 20px;\n font-weight: 500;\n letter-spacing: 0.2px;\n }\n\n p {\n font-size: 15px;\n line-height: 1.55em;\n margin-bottom: 24px;\n }\n\n strong {\n font-weight: 600;\n }\n\n a,\n .gh-portal-link {\n cursor: pointer;\n }\n\n svg {\n box-sizing: content-box;\n }\n\n input,\n textarea {\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;\n font-size: 1.5rem;\n }\n\n textarea {\n padding: 10px;\n line-height: 1.5em;\n }\n\n .gh-portal-notification-wrapper {\n position: relative;\n overflow: hidden;\n height: 100%;\n width: 100%;\n }\n\n .gh-portal-notification {\n position: absolute;\n display: flex;\n align-items: center;\n top: 12px;\n right: 12px;\n width: 100%;\n padding: 14px 44px 18px 20px;\n max-width: 380px;\n min-height: 66px;\n font-size: 1.3rem;\n letter-spacing: 0.2px;\n background: rgba(33,33,33,0.95);\n backdrop-filter: blur(8px);\n color: var(--white);\n border-radius: 5px;\n box-shadow: 0 3.2px 3.6px rgba(0, 0, 0, 0.024), 0 8.8px 10px -5px rgba(0, 0, 0, 0.08);\n animation: notification-slidein 0.55s cubic-bezier(0.215, 0.610, 0.355, 1.000);\n }\n\n .gh-portal-notification.slideout {\n animation: notification-slideout 0.4s cubic-bezier(0.550, 0.055, 0.675, 0.190);\n }\n\n .gh-portal-notification.hide {\n display: none;\n }\n\n .gh-portal-notification p {\n flex-grow: 1;\n font-size: 1.4rem;\n line-height: 1.5em;\n text-align: left;\n margin: 0;\n padding: 0 0 0 40px;\n color: var(--grey13);\n }\n\n .gh-portal-notification p strong {\n color: var(--white);\n }\n\n .gh-portal-notification a {\n color: var(--white);\n text-decoration: underline;\n transition: all 0.2s ease-in-out;\n outline: none;\n }\n\n .gh-portal-notification a:hover {\n opacity: 0.8;\n }\n\n .gh-portal-notification-icon {\n position: absolute;\n top: calc(50% - 14px);\n left: 17px;\n width: 28px;\n height: 28px;\n }\n\n .gh-portal-notification-icon.success {\n color: var(--green);\n }\n\n .gh-portal-notification-icon.error {\n color: #FF2828;\n }\n\n .gh-portal-notification-closeicon {\n position: absolute;\n top: 5px;\n bottom: 0;\n right: 5px;\n color: var(--white);\n cursor: pointer;\n width: 12px;\n height: 12px;\n padding: 10px;\n transition: all 0.2s ease-in-out forwards;\n opacity: 0.8;\n }\n\n .gh-portal-notification-closeicon:hover {\n opacity: 1.0;\n } \n\n @keyframes notification-slidein {\n 0% { transform: translateX(380px); }\n 60% { transform: translateX(-6px); }\n 100% { transform: translateX(0); }\n }\n\n @keyframes notification-slideout {\n 0% { transform: translateX(0); }\n 30% { transform: translateX(-10px); }\n 100% { transform: translateX(380px); }\n }\n\n @keyframes notification-slidein-mobile {\n 0% { transform: translateY(-150px); }\n 50% { transform: translateY(6px); }\n 100% { transform: translateY(0); }\n }\n\n @keyframes notification-slideout-mobile {\n 0% { transform: translateY(0); }\n 35% { transform: translateY(6px); }\n 100% { transform: translateY(-150px); }\n }\n\n @media (max-width: 414px) {\n .gh-portal-notification {\n left: 12px;\n max-width: calc(100% - 24px);\n animation-name: notification-slidein-mobile;\n }\n\n .gh-portal-notification.slideout {\n animation-duration: 0.55s;\n animation-name: notification-slideout-mobile;\n }\n }\n';return Ge.createElement("style",{dangerouslySetInnerHTML:{__html:e}})}},{key:"render",value:function(){var e=this,n=d({},(this.context.brandColor,{frame:{zIndex:"4000000",position:"fixed",top:"0",right:"0",maxWidth:"415px",width:"100%",height:"120px",animation:"250ms ease 0s 1 normal none running animation-bhegco",transition:"opacity 0.3s ease 0s",overflow:"hidden"}}).frame);if(!this.state.active)return null;var t=this.state,r=t.type,a=t.status,o=t.autoHide,i=t.duration;return r&&a?Ge.createElement(N,{style:n,title:"portal-notification",head:this.renderFrameStyles(),className:"gh-portal-notification-iframe"},Ge.createElement(Ze,Object.assign({type:r,status:a,autoHide:o,duration:i},{onHideNotification:function(n){return e.onHideNotification(n)}}))):null}}]),t}(Ge.Component);en.contextType=M;var nn={preview:function(){var e=c(window.location.hash.substr(1).split("?"),2),n=e[0],t=e[1];return"/portal/preview"===n||"/portal"===n&&t},dev:function(){return!1},test:function(){return!1}},tn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.some((function(e){var n=nn[e];return!(!n||!n())}))};function rn(){return(rn=Object.assign||function(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}(e,["svgRef","title"]);return a.a.createElement("svg",rn({id:"loader-1",x:"0px",y:"0px",width:"40px",height:"40px",viewBox:"0 0 40 40",enableBackground:"new 0 0 40 40",xmlSpace:"preserve",ref:n},r),t?a.a.createElement("title",null,t):null,an,on)},un=a.a.forwardRef((function(e,n){return a.a.createElement(ln,rn({svgRef:n},e))}));t.p;var cn=function(e){var n=e.label,t=(e.type,e.onClick),r=e.disabled,o=e.retry,i=e.brandColor,l=e.isRunning,u=e.isPrimary,c=void 0===u||u,s=e.isDestructive,p=void 0!==s&&s,f=e.style,h=e.tabindex,m=function(e){var n=e.style,t=void 0===n?{}:n,r=e.isPrimary,a=e.brandColor||"#3eb0ef",o="1.0",i="auto";return e.disabled&&(o="0.5",i="none"),{button:d(d(d({},r?{color:"#fff"}:{}),r?{backgroundColor:a}:{}),{},{opacity:o,pointerEvents:i},t||{})}}({disabled:r,retry:o,brandColor:i,style:f,isPrimary:c}),g="gh-portal-btn";c&&(g+=" gh-portal-btn-main gh-portal-btn-primary"),p&&(g+=" gh-portal-btn-destructive"),Fe()&&(r=!0);var b=c?"gh-portal-loadingicon":"gh-portal-loadingicon dark";return a.a.createElement("button",{className:g,style:m.button,onClick:function(e){return t(e)},disabled:r,type:"submit",tabIndex:h},l?a.a.createElement(un,{className:b}):n)};function sn(){return(sn=Object.assign||function(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}(e,["svgRef","title"]);return a.a.createElement("svg",sn({id:"Regular",viewBox:"0 0 24 24",ref:n},r),t?a.a.createElement("title",null,t):null,pn,fn)},hn=a.a.forwardRef((function(e,n){return a.a.createElement(dn,sn({svgRef:n},e))}));t.p;var mn=function(e){var n=e.label,t=void 0===n?"Back":n,r=(e.brandColor,e.hidden),o=void 0!==r&&r,i=e.onClick;return o?null:a.a.createElement("button",{className:"gh-portal-btn gh-portal-btn-back",onClick:function(e){return i(e)}},a.a.createElement(hn,null)," ",t)},gn=function(e){var n=e.id,t=e.label,o=e.onToggle,i=e.checked,l=void 0!==i&&i,u=Object(r.useContext)(M).action,s=c(Object(r.useState)(l),2),p=s[0],f=s[1],d=["updateNewsletter:failed","updateNewsletter:success"].includes(u);return Object(r.useEffect)((function(){f(l)}),[l,d]),a.a.createElement("div",{className:"gh-portal-for-switch"},a.a.createElement("label",{className:"switch",htmlFor:n},a.a.createElement("input",{type:"checkbox",checked:p,id:n,onChange:function(){},"aria-label":t}),a.a.createElement("span",{className:"input-toggle-component",onClick:function(e){f(!p),o(e)},"data-testid":"switch-input"})))},bn=function(e){E(t,e);var n=_(t);function t(){return y(this,t),n.apply(this,arguments)}return w(t,[{key:"render",value:function(){var e=this;return a.a.createElement("div",{className:"gh-portal-closeicon-container"},a.a.createElement(be,{className:"gh-portal-closeicon",alt:"Close",onClick:function(){return e.context.onAction("closePopup")}}))}}]),t}(a.a.Component);bn.contextType=M;var vn=function(e){var n=new Date(e),t=n.toDateString().substring(4,7),r=n.toDateString().substring(8,10).replace(/^0+/g,""),a=n.toDateString().substring(11,15);return"".concat(r," ").concat(t," ").concat(a)},yn=t(0),xn=function(e){var n=e.avatar,t=e.brandColor;return yn.createElement(yn.Fragment,null,yn.createElement(A,{gravatar:n,style:{userIcon:{color:t,width:"56px",height:"56px",padding:"2px"}}}))},wn=function(e){e.onClose;var n=e.handleSignout,t=e.supportAddress,r="mailto:".concat(void 0===t?"":t);return yn.createElement("footer",{className:"gh-portal-account-footer"},yn.createElement("ul",{className:"gh-portal-account-footermenu"},yn.createElement("li",null,yn.createElement("button",{className:"gh-portal-btn",name:"logout","aria-label":"logout",onClick:function(e){return n(e)}},"Sign out"))),yn.createElement("div",{className:"gh-portal-account-footerright"},yn.createElement("ul",{className:"gh-portal-account-footermenu"},yn.createElement("li",null,yn.createElement("a",{className:"gh-portal-btn gh-portal-btn-branded",href:r,onClick:function(){r&&window.open(r)}},"Contact support")))))},kn=function(e){var n=e.member,t=e.brandColor,r=n.avatar_image;return yn.createElement("header",{className:"gh-portal-account-header"},yn.createElement(xn,{avatar:r,brandColor:t}),yn.createElement("h2",{className:"gh-portal-main-title"},"Your account"))},En=function(e){var n=e.member,t=e.site,a=e.openUpdatePlan,o=e.onEditBilling,i=function(e){var n=e.defaultCardLast4;if(n){var t="**** **** **** ".concat(n);return yn.createElement("p",null,t)}return null},l=Ae({member:n});if(l){var u=Me({member:n}),c=l.plan,s=l.default_payment_card_last4;return yn.createElement(yn.Fragment,null,yn.createElement("section",null,yn.createElement("div",{className:"gh-portal-list-detail"},yn.createElement("h3",null,"Plan"),yn.createElement((function(e){var n=e.plan,t=e.isComplimentary,r=n.amount,a=void 0===r?0:r,o=n.currency,i=n.interval,l="".concat(Intl.NumberFormat("en",{currency:o,style:"currency"}).format(a/100),"/").concat(i);return t&&(l="Complimentary (".concat(l,")")),yn.createElement("p",null,l)}),{plan:c,isComplimentary:u})),yn.createElement((function(e){return e.isComplimentary||Be({site:t})?null:yn.createElement("button",{className:"gh-portal-btn gh-portal-btn-list",onClick:function(e){return a(e)}},"Change")}),{isComplimentary:u})),yn.createElement((function(e){var n=e.defaultCardLast4,t=e.isComplimentary,a="editBilling:running"===Object(r.useContext)(M).action?yn.createElement(un,{className:"gh-portal-billing-button-loader"}):"Update";return t?null:yn.createElement("section",null,yn.createElement("div",{className:"gh-portal-list-detail"},yn.createElement("h3",null,"Billing info"),yn.createElement(i,{defaultCardLast4:n})),yn.createElement("button",{className:"gh-portal-btn gh-portal-btn-list",onClick:function(e){return o(e)}},a))}),{isComplimentary:u,defaultCardLast4:s}))}return null},Sn=function(e){var n=e.member,t=e.site,r=(e.action,e.openEditProfile),a=e.openUpdatePlan,o=e.onEditBilling,i=e.onToggleSubscription,l=n.name,u=n.email,c=n.subscribed,s=c?"Subscribed":"Unsubscribed";return yn.createElement("div",{className:"gh-portal-list"},yn.createElement("section",null,yn.createElement("div",{className:"gh-portal-list-detail"},yn.createElement("h3",null,l||"Account"),yn.createElement("p",null,u)),yn.createElement("button",{className:"gh-portal-btn gh-portal-btn-list",onClick:function(e){return r(e)}},"Edit")),yn.createElement(En,{site:t,member:n,onEditBilling:o,openUpdatePlan:a}),yn.createElement("section",null,yn.createElement("div",{className:"gh-portal-list-detail"},yn.createElement("h3",null,"Email newsletter"),yn.createElement("p",null,s)),yn.createElement("div",null,yn.createElement(gn,{onToggle:function(e){i(e,c)},checked:c}))))},Cn=function(e){var n=e.site,t=e.action,r=e.openSubscribe,a=e.brandColor;if(!n.is_stripe_configured||Be({site:n}))return null;var o=["checkoutPlan:running"].includes(t);return yn.createElement(cn,{isRunning:o,label:"View plans",onClick:function(){return r()},brandColor:a,style:{width:"100%"}})},Pn=function(e){var n=e.member,t=e.action,r=e.site,a=e.openSubscribe,o=e.brandColor;if(!r.is_stripe_configured)return null;if(n.paid){var i=Ae({member:n}),l=i.current_period_end;return i.cancel_at_period_end?null:yn.createElement("div",{className:"gh-portal-section"},yn.createElement("p",{className:"gh-portal-text-center gh-portal-free-ctatext"},"Your subscription will renew on ",vn(l)))}return yn.createElement("div",{className:"gh-portal-section"},yn.createElement("p",{className:"gh-portal-text-center gh-portal-free-ctatext"},"You currently have a free membership, upgrade to a paid subscription for full access."),yn.createElement(Cn,{action:t,site:r,openSubscribe:a,brandColor:o}))},Tn=function(e){var n=e.member,t=e.onAction,r=e.action,a=e.brandColor,o=e.showOnlyContinue,i=void 0!==o&&o;if(!n.paid)return null;var l=Ae({member:n});if(!l)return null;if(i&&!l.cancel_at_period_end)return null;var u=l.cancel_at_period_end?"Continue subscription":"Cancel subscription",c=["cancelSubscription:running"].includes(r),s=!!c,p=!!l.cancel_at_period_end;return yn.createElement("div",{className:"gh-portal-cancelcontinue-container"},yn.createElement((function(){if(!l.cancel_at_period_end)return null;var e=l.current_period_end;return yn.createElement("p",{className:"gh-portal-text-center gh-portal-free-ctatext"},"Your subscription will expire on ",vn(e))}),null),yn.createElement(cn,{onClick:function(e){t("cancelSubscription",{subscriptionId:l.id,cancelAtPeriodEnd:!l.cancel_at_period_end})},isRunning:c,disabled:s,isPrimary:p,brandColor:a,label:u,style:{width:"100%"}}))},_n=function(e){var n=e.member,t=e.site,r=e.onAction,a=e.action,o=e.openSubscribe,i=e.brandColor,l=e.openEditProfile,u=e.openUpdatePlan,c=e.onEditBilling,s=e.onToggleSubscription;return yn.createElement("div",{className:"gh-portal-content gh-portal-account-main"},yn.createElement(bn,null),yn.createElement(kn,{member:n,brandColor:i}),yn.createElement("section",{className:"gh-portal-account-data"},yn.createElement(Pn,{action:a,member:n,site:t,openSubscribe:function(e){return o(e)},brandColor:i}),yn.createElement(Tn,{member:n,onAction:r,action:a,brandColor:i,showOnlyContinue:!0}),yn.createElement(Sn,{action:a,member:n,site:t,openEditProfile:function(e){return l(e)},onToggleSubscription:function(e,n){return s(e,n)},openUpdatePlan:function(e,n){return u(e,n)},onEditBilling:function(e,n){return c(e,n)}})))},Nn=function(e){E(t,e);var n=_(t);function t(){return y(this,t),n.apply(this,arguments)}return w(t,[{key:"componentDidMount",value:function(){this.context.member||this.context.onAction("switchPage",{page:"signup"})}},{key:"openSubscribe",value:function(e){this.context.onAction("switchPage",{page:"accountPlan",lastPage:"accountHome"})}},{key:"openEditProfile",value:function(){this.context.onAction("switchPage",{page:"accountProfile",lastPage:"accountHome"})}},{key:"checkoutPlan",value:function(e){(0,this.context.onAction)("checkoutPlan",{plan:e.name})}},{key:"openUpdatePlan",value:function(){this.context.site.is_stripe_configured&&this.context.onAction("switchPage",{page:"accountPlan",lastPage:"accountHome"})}},{key:"onEditBilling",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(e.subscriptionId,this.context.member),t=Ae({member:n});this.context.onAction("editBilling",{subscriptionId:t.id})}},{key:"onToggleSubscription",value:function(e,n){e.preventDefault(),this.context.onAction("updateNewsletter",{subscribed:!n})}},{key:"handleSignout",value:function(e){e.preventDefault(),this.context.onAction("signout")}},{key:"render",value:function(){var e=this,n=this.context,t=n.member,r=n.site.members_support_address;return t?yn.createElement("div",{className:"gh-portal-account-wrapper"},yn.createElement(_n,Object.assign({},this.context,{openSubscribe:function(n){return e.openSubscribe(n)},openEditProfile:function(n){return e.openEditProfile(n)},onToggleSubscription:function(n,t){return e.onToggleSubscription(n,t)},openUpdatePlan:function(n,t){return e.openUpdatePlan(n,t)},onEditBilling:function(n,t){return e.onEditBilling(n,t)}})),yn.createElement(wn,{onClose:function(){return e.context.onAction("closePopup")},handleSignout:function(n){return e.handleSignout(n)},supportAddress:r})):null}}]),t}(yn.Component);function On(e){var n=e.name,t=e.onPlanSelect,r=e.isChecked,o=e.disabled;return Fe()&&(o=!0),a.a.createElement("div",{className:"gh-portal-plan-checkbox"},a.a.createElement("input",{name:n,key:n,type:"checkbox",checked:r,"aria-label":n,onChange:function(e){return t(e,n)},disabled:o}),a.a.createElement("span",{className:"checkmark"}))}function Ln(e){var n=e.currencySymbol,t=e.price,r=3!==n.length?"gh-portal-plan-currency gh-portal-plan-currency-symbol":"gh-portal-plan-currency gh-portal-plan-currency-code";return a.a.createElement("div",{className:"gh-portal-plan-pricelabel"},a.a.createElement("span",{className:r},n),a.a.createElement("span",{className:"gh-portal-plan-price"},Ye(t)))}function jn(e){var n=e.plans,t=e.selectedPlan,r=e.onPlanSelect,o=e.changePlan,i=n.some((function(e){return"Monthly"===e.name}));return n.map((function(e,n){var l=e.name,u=e.currency_symbol,c=e.price,s=e.discount,p=t===l,f=p?"gh-portal-plan-section checked":"gh-portal-plan-section",d={},h="";switch(l){case"Free":d.feature="Free preview";break;case"Monthly":case"Complimentary":d.feature="Full access";break;case"Yearly":h="Annually",d.feature=i&&s>0?s+"% discount":"Full access"}return a.a.createElement("div",{className:f,key:l,onClick:function(e){return r(e,l)}},a.a.createElement(On,{name:l,isChecked:p,onPlanSelect:r}),a.a.createElement("h4",{className:"gh-portal-plan-name"},h||l),a.a.createElement(Ln,{name:l,currencySymbol:u,price:c}),a.a.createElement("div",{className:"gh-portal-plan-featurewrapper"},a.a.createElement("div",{className:"gh-portal-plan-feature"},d.feature),o&&t===l?a.a.createElement("span",{className:"gh-portal-plan-current"},"Current plan"):""))}))}function Rn(e){return e.showLabel?a.a.createElement("label",{className:"gh-portal-input-label"},"Plan"):null}Nn.contextType=M;var In=function(e){var n=e.plans,t=e.showLabel,r=void 0===t||t,o=(e.type,e.selectedPlan),i=e.onPlanSelect,l=e.changePlan,u=void 0!==l&&l;if(e.style,!n||0===n.length||1===n.length&&"free"===n[0].type)return null;var c=Fe();return c&&(i=function(e,n){}),a.a.createElement("section",null,a.a.createElement(Rn,{showLabel:r}),a.a.createElement("div",{className:"gh-portal-plans-container"+(u?" hide-checkbox":"")+(c?" disabled":"")},a.a.createElement(jn,{plans:n,onPlanSelect:i,selectedPlan:o,changePlan:u})))},zn=t(0),Fn=function(e){var n=e.member,t=e.lastPage,r=e.brandColor,a=e.onBack,o=e.showConfirmation,i=e.confirmationType,l=De({member:n})?"Change plan":"Choose a plan";return o&&(l=function(e){var n=e.confirmationType;return"changePlan"===n?"Confirm subscription":"cancel"===n?"Cancel subscription":"subscribe"===n?"Subscribe":void 0}({confirmationType:i})),zn.createElement("header",{className:"gh-portal-detail-header"},zn.createElement(mn,{brandColor:r,onClick:function(e){return a(e)},hidden:!t&&!o}),zn.createElement("h3",{className:"gh-portal-main-title"},l))},An=function(e){var n=e.member,t=e.onCancelContinueSubscription,r=e.action,a=e.brandColor,o=e.showOnlyContinue,i=void 0!==o&&o;if(!n.paid)return null;var l=Ae({member:n});if(!l)return null;if(i&&!l.cancel_at_period_end)return null;if(l.cancel_at_period_end)return null;var u=l.cancel_at_period_end?"Continue subscription":"Cancel subscription",c=["cancelSubscription:running"].includes(r),s=!!c,p=!!l.cancel_at_period_end,f=!l.cancelAtPeriodEnd;return zn.createElement("div",{className:"gh-portal-expire-container"},zn.createElement((function(){if(!l.cancel_at_period_end)return null;var e=l.current_period_end;return zn.createElement("p",{className:"gh-portal-expire-warning"},"Your subscription will expire on ",vn(e),".")}),null),zn.createElement(cn,{onClick:function(e){t({subscriptionId:l.id,cancelAtPeriodEnd:!l.cancel_at_period_end})},isRunning:c,disabled:s,isPrimary:p,isDestructive:f,brandColor:a,label:u,style:{width:"100%"}}))},Mn=function(e){var n=e.action,t=e.member,a=e.plan,o=e.type,i=e.brandColor,l=e.onConfirm,u=c(Object(r.useState)(""),2),s=u[0],p=u[1],f=Ae({member:t}),d=["updateSubscription:running","checkoutPlan:running","cancelSubscription:running"].includes(n),h=vn(f.current_period_end);He({member:t}).type!==a.type&&(h="today");var m=Ye(a.price),g="".concat(a.currency_symbol).concat(m,"/").concat(a.type," – Starting ").concat(h);return"changePlan"===o?zn.createElement(zn.Fragment,null,zn.createElement("div",{className:"gh-portal-list outline mb6"},zn.createElement("section",null,zn.createElement("div",{className:"gh-portal-list-detail"},zn.createElement("h3",null,"Account"),zn.createElement("p",null,t.email))),zn.createElement("section",null,zn.createElement("div",{className:"gh-portal-list-detail"},zn.createElement("h3",null,"Price"),zn.createElement("p",null,g)))),zn.createElement(cn,{onClick:function(e){return l(e,a)},isRunning:d,isPrimary:!0,brandColor:i,label:"Confirm",style:{width:"100%",height:"40px"}})):zn.createElement("div",{className:"gh-portal-cancellation-form"},zn.createElement("p",null,"If you cancel your subscription now, you will continue to have access until ",zn.createElement("strong",null,vn(f.current_period_end)),"."),zn.createElement("section",{className:"gh-portal-input-section"},zn.createElement("div",{className:"gh-portal-input-labelcontainer"},zn.createElement("label",{className:"gh-portal-input-label"},"Cancellation reason")),zn.createElement("textarea",{className:"gh-portal-input",key:"cancellation_reason",label:"Cancellation reason",type:"text",name:"cancellation_reason",placeholder:"",value:s,onChange:function(e){return p(e.target.value)},rows:"2",maxlength:"500"})),zn.createElement(cn,{onClick:function(e){return l(e,s)},isRunning:d,isPrimary:!0,brandColor:i,label:"Confirm cancellation",style:{width:"100%",height:"40px"}}))},Dn=function(e){var n=e.plans,t=e.selectedPlan,r=e.member,a=e.action,o=e.brandColor,i=e.onPlanSelect,l=e.onCancelContinueSubscription;return zn.createElement("section",null,zn.createElement("div",{className:"gh-portal-section gh-portal-accountplans-main"},zn.createElement(In,{showLabel:!1,plans:n,selectedPlan:t,onPlanSelect:function(e,n){return i(e,n)},changePlan:!0})),zn.createElement(An,{member:r,onCancelContinueSubscription:l,action:a,brandColor:o}))},Un=function(e){var n=e.plans,t=e.selectedPlan,r=e.action,a=e.brandColor,o=e.onPlanSelect,i=e.onPlanCheckout,l=["checkoutPlan:running"].includes(r),u="";return 1===n.length&&(u="singleplan"),zn.createElement("section",null,zn.createElement("div",{className:"gh-portal-section gh-portal-accountplans-main ".concat(u)},zn.createElement(In,{showLabel:!1,plans:n,selectedPlan:t,onPlanSelect:function(e,n){return o(e,n)}})),zn.createElement(cn,{onClick:function(e){return i(e)},isRunning:l,isPrimary:!0,brandColor:a,label:"Continue",style:{height:"40px",width:"100%",marginTop:"24px"}}))},Hn=function(e){var n=e.plans,t=e.selectedPlan,r=e.confirmationPlan,a=e.confirmationType,o=e.member,i=e.onAction,l=e.action,u=e.brandColor,c=e.showConfirmation,s=void 0!==c&&c,p=e.onPlanSelect,f=e.onPlanCheckout,d=e.onConfirm,h=e.onCancelContinueSubscription;return De({member:o})?s?zn.createElement(Mn,{action:l,member:o,plan:r,type:a,onConfirm:d,brandColor:u}):zn.createElement(Dn,{plans:n,selectedPlan:t,member:o,action:l,brandColor:u,onCancelContinueSubscription:h,onPlanSelect:p}):zn.createElement(Un,{plans:n,selectedPlan:t,member:o,onAction:i,action:l,brandColor:u,onPlanSelect:p,onPlanCheckout:f})},Bn=function(e){E(t,e);var n=_(t);function t(e,r){var a;return y(this,t),(a=n.call(this,e,r)).state=a.getInitialState(),a}return w(t,[{key:"componentDidMount",value:function(){this.context.member||this.context.onAction("switchPage",{page:"signup"})}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timeoutId)}},{key:"getInitialState",value:function(){var e=this.context,n=e.member,t=e.site;this.plans=Ve({site:t,includeFree:!1});var r=He({member:n}),a=r?this.plans.find((function(e){return e.name===r.name&&e.price===r.price&&e.currency===r.currency})):null;return!De({member:n})&&this.plans.length>0&&(a=this.plans[0]),{selectedPlan:a?a.name:null}}},{key:"handleSignout",value:function(e){e.preventDefault(),this.context.onAction("signout")}},{key:"onBack",value:function(e){this.state.showConfirmation?this.cancelConfirmPage():this.context.onAction("back")}},{key:"cancelConfirmPage",value:function(){this.setState({showConfirmation:!1,confirmationPlan:null,confirmationType:null})}},{key:"onPlanCheckout",value:function(e,n){var t=this.context,r=t.onAction,a=t.member,o=this.state,i=o.confirmationPlan,l=o.selectedPlan;if(De({member:a})){var u=Ae({member:a}),c=u?u.id:"";c&&r("updateSubscription",{plan:i.name,subscriptionId:c,cancelAtPeriodEnd:!1})}else r("checkoutPlan",{plan:l})}},{key:"onPlanSelect",value:function(e,n){var t=this;e.preventDefault();var r=this.context.member;if(De({member:r})){var a=this.plans.find((function(e){return e.name===n})),o=this.getActivePlanName({member:r})?"changePlan":"subscribe";n!==this.state.selectedPlan&&this.setState({confirmationPlan:a,confirmationType:o,showConfirmation:!0})}else this.timeoutId=setTimeout((function(){t.setState((function(e){return{selectedPlan:n}}))}),5)}},{key:"onCancelContinueSubscription",value:function(e){var n=e.subscriptionId,t=e.cancelAtPeriodEnd,r=Ue({subscription:function(e){var n=e.member,t=e.subscriptionId;return De({member:n})?(n.subscriptions||[]).find((function(e){return e.id===t})):null}({subscriptionId:n,member:this.context.member})});t?this.setState({showConfirmation:!0,confirmationPlan:r,confirmationType:"cancel"}):this.context.onAction("cancelSubscription",{subscriptionId:n,cancelAtPeriodEnd:t})}},{key:"onCancelSubscriptionConfirmation",value:function(e){var n=Ae({member:this.context.member});if(!n)return null;this.context.onAction("cancelSubscription",{subscriptionId:n.id,cancelAtPeriodEnd:!0,cancellationReason:e})}},{key:"getActivePlanName",value:function(e){var n=He({member:e.member});return n?n.name:null}},{key:"onConfirm",value:function(e,n){var t=this.state.confirmationType;return"cancel"===t?this.onCancelSubscriptionConfirmation(n):["changePlan","subscribe"].includes(t)?this.onPlanCheckout(n):void 0}},{key:"render",value:function(){var e=this,n=this.context,t=n.member,r=n.brandColor,a=n.lastPage,o=this.plans,i=this.state,l=i.selectedPlan,u=i.showConfirmation,c=i.confirmationPlan,s=i.confirmationType;return zn.createElement(zn.Fragment,null,zn.createElement("div",{className:"gh-portal-content"},zn.createElement(bn,null),zn.createElement(Fn,{lastPage:a,member:t,brandColor:r,onBack:function(n){return e.onBack(n)},confirmationType:s,showConfirmation:u}),zn.createElement(Hn,Object.assign({},this.context,{plans:o,selectedPlan:l,showConfirmation:u,confirmationPlan:c,confirmationType:s},{onConfirm:function(){return e.onConfirm.apply(e,arguments)},onCancelContinueSubscription:function(n){return e.onCancelContinueSubscription(n)},onPlanSelect:function(n,t){return e.onPlanSelect(n,t)},onPlanCheckout:function(n,t){return e.onPlanCheckout(n,t)}}))))}}]),t}(zn.Component);function Wn(e){var n=e.message,t=e.style;return n?a.a.createElement("p",{style:d({},t||{})},n):null}Bn.contextType=M;var Qn=function(e){var n=e.name,t=e.id,o=e.label,i=e.hideLabel,l=e.type,u=e.value,c=e.placeholder,s=e.disabled,p=e.onChange,f=void 0===p?function(){}:p,d=e.onBlur,h=void 0===d?function(){}:d,m=e.onKeyDown,g=void 0===m?function(){}:m,b=e.tabindex,v=e.maxlength,y=e.autoFocus,x=e.errorMessage,w=Object(r.useRef)(null);t=t||"input-".concat(n);var k=i?"gh-portal-input-label hidden":"gh-portal-input-label",E=x?"gh-portal-input error":"gh-portal-input";Fe()&&(s=!0);var S="",C="",P="";switch(t){case"input-email":S="off",C="off",P="off";break;case"input-name":S="off",C="off"}return Object(r.useEffect)((function(){y&&w.current.focus()}),[y]),a.a.createElement("section",{className:"gh-portal-input-section"},a.a.createElement("div",{className:"gh-portal-input-labelcontainer"},a.a.createElement("label",{htmlFor:t,className:k}," ",o," "),a.a.createElement(Wn,{message:x,name:n})),a.a.createElement("input",{ref:w,id:t,className:E,type:l,name:n,value:u,placeholder:c,onChange:function(e){return f(e,n)},onKeyDown:function(e){return g(e,n)},onBlur:function(e){return h(e,n)},disabled:s,tabIndex:b,maxLength:v,autoComplete:S,autoCorrect:C,autoCapitalize:P,"aria-label":o}))},Vn=function(e){var n=e.field,t=e.onChange,r=e.onBlur,o=void 0===r?function(){}:r,i=e.onKeyDown,l=void 0===i?function(){}:i;return n?a.a.createElement(a.a.Fragment,null,a.a.createElement(Qn,{key:n.name,label:n.label,type:n.type,name:n.name,placeholder:n.placeholder,value:n.value,onKeyDown:l,onChange:function(e){return t(e,n)},onBlur:function(e){return o(e,n)},tabIndex:n.tabindex,errorMessage:n.errorMessage,autoFocus:n.autoFocus})):null},$n=function(e){E(t,e);var n=_(t);function t(e){var r;return y(this,t),(r=n.call(this,e)).state={},r}return w(t,[{key:"render",value:function(){var e=this.props,n=e.fields,t=e.onChange,r=e.onBlur,o=e.onKeyDown,i=n.map((function(e){return a.a.createElement(Vn,{field:e,key:e.name,onChange:t,onBlur:r,onKeyDown:o})}));return a.a.createElement(a.a.Fragment,null,i)}}]),t}(r.Component),qn=function(e){var n=e.fields,t={};return n.forEach((function(e){var n=e.name,r=function(e){var n,t=e.field;if(t.required&&!t.value)switch(t.name){case"name":return"Enter your name";case"email":return"Enter your email address";default:return"Please enter ".concat(t.name)}return"email"!==t.type||(n=t.value)&&/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(String(n).toLowerCase())?null:"Invalid email address"}({field:e});t[n]=r})),t};function Kn(){return(Kn=Object.assign||function(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}(e,["svgRef","title"]);return a.a.createElement("svg",Kn({viewBox:"0 0 24 24",ref:n},r),Yn,void 0===t?Jn:t?a.a.createElement("title",null,t):null,Gn,Xn,Zn,et,nt)},rt=a.a.forwardRef((function(e,n){return a.a.createElement(tt,Kn({svgRef:n},e))})),at=(t.p,t(0)),ot=function(e){E(t,e);var n=_(t);function t(e){var r;return y(this,t),(r=n.call(this,e)).state={name:"",email:"",plan:"Free"},r}return w(t,[{key:"componentDidMount",value:function(){this.context.member&&this.context.onAction("switchPage",{page:"accountHome"});var e=this.getPlans(),n=this.state.plan,t=this.getDefaultSelectedPlan(e,this.state.plan);t!==n&&this.setState({plan:t})}},{key:"componentDidUpdate",value:function(){var e=this.getPlans(),n=this.state.plan,t=this.getDefaultSelectedPlan(e,this.state.plan);t!==n&&this.setState({plan:t})}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timeoutId)}},{key:"handleSignup",value:function(e){var n=this;e.preventDefault(),this.setState((function(e){return{errors:qn({fields:n.getInputFields({state:e})})}}),(function(){var e=n.context.onAction,t=n.state,r=t.name,a=t.email,o=t.plan,i=t.errors;i&&Object.values(i).filter((function(e){return!!e})).length>0||(e("signup",{name:r,email:a,plan:o}),n.setState({errors:{}}))}))}},{key:"handleInputChange",value:function(e,n){var t=n.name,r=e.target.value;this.setState(p({},t,r))}},{key:"handleSelectPlan",value:function(e,n){var t=this;e.preventDefault(),this.timeoutId=setTimeout((function(){t.setState((function(e){return{plan:n}}))}),5)}},{key:"onKeyDown",value:function(e){13===e.keyCode&&this.handleSignup(e)}},{key:"getDefaultSelectedPlan",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;if(!e||0===e.length)return"Free";var t=e.some((function(e){return e.name===n}));return t?n:e[0].name||"Free"}},{key:"getPlans",value:function(){var e=this.context.site,n=e.plans,t=e.allow_self_signup,r=e.is_stripe_configured,a=e.portal_plans,o=this.context.pageQuery,i=[],l=Re()(n.monthly,n.yearly),u=[{type:"month",price:n.monthly,currency_symbol:n.currency_symbol,name:"Monthly"},{type:"year",price:n.yearly,currency_symbol:n.currency_symbol,name:"Yearly",discount:l}];return t&&(void 0===a||a.includes("free"))&&i.push({type:"free",price:0,currency_symbol:n.currency_symbol,name:"Free"}),r&&"free"!==o&&u.forEach((function(e){(void 0===a||a.includes(e.name.toLowerCase()))&&i.push(e)})),i}},{key:"getInputFields",value:function(e){var n=e.state,t=e.fieldNames,r=this.context.site.portal_name,a=n.errors||{},o=[{type:"email",value:n.email,placeholder:"jamie@example.com",label:"Email",name:"email",required:!0,tabindex:2,errorMessage:a.email||""}];return r&&o.unshift({type:"text",value:n.name,placeholder:"Jamie Larson",label:"Name",name:"name",required:!0,tabindex:1,errorMessage:a.name||""}),o[0].autoFocus=!0,t&&t.length>0?o.filter((function(e){return t.includes(e.name)})):o}},{key:"renderSubmitButton",value:function(){var e=this,n=this.context,t=n.action,r=n.site,a=n.brandColor;if(0===Ve({site:r,pageQuery:n.pageQuery}).length)return null;var o="Continue";Be({site:r})&&(o="Sign up");var i=!1;"signup:running"===t&&(o="Sending...",i=!0);var l=!1;"signup:failed"===t&&(o="Retry",l=!0);var u="signup:running"===t;return at.createElement(cn,{style:{width:"100%"},retry:l,onClick:function(n){return e.handleSignup(n)},disabled:u,brandColor:a,label:o,isRunning:i,tabIndex:"3"})}},{key:"renderPlans",value:function(){var e=this,n=this.context,t=Ve({site:n.site,pageQuery:n.pageQuery});return at.createElement(at.Fragment,null,at.createElement(In,{plans:t,selectedPlan:this.state.plan,onPlanSelect:function(n,t){return e.handleSelectPlan(n,t)}}))}},{key:"renderLoginMessage",value:function(){var e=this.context,n=e.brandColor,t=e.onAction;return at.createElement("div",{className:"gh-portal-signup-message"},at.createElement("div",null,"Already a member?"),at.createElement("button",{className:"gh-portal-btn gh-portal-btn-link",style:{color:n},onClick:function(){return t("switchPage",{page:"signin"})}},at.createElement("span",null,"Sign in")))}},{key:"renderForm",value:function(){var e=this,n=this.getInputFields({state:this.state}),t=this.context;return 0===Ve({site:t.site,pageQuery:t.pageQuery}).length?at.createElement("section",null,at.createElement("div",{className:"gh-portal-section"},at.createElement("p",{className:"gh-portal-invite-only-notification"},"This site is invite-only, contact the owner for access."))):at.createElement("section",null,at.createElement("div",{className:"gh-portal-section"},at.createElement($n,{fields:n,onChange:function(n,t){return e.handleInputChange(n,t)},onKeyDown:function(n,t){return e.onKeyDown(n,t)}}),this.renderPlans()))}},{key:"renderSiteLogo",value:function(){var e=this.getPlans(),n=this.context.site,t=n.icon;return t?("url(".concat(t,")"),at.createElement("img",{className:"gh-portal-signup-logo",src:t,alt:n.title})):0===e.length?at.createElement(rt,{className:"gh-portal-icon gh-portal-icon-invitation"}):null}},{key:"renderFormHeader",value:function(){var e=this.context.site.title||"";return at.createElement("header",{className:"gh-portal-signup-header"},this.renderSiteLogo(),at.createElement("h2",{className:"gh-portal-main-title"},e))}},{key:"render",value:function(){var e=this.getPlans(),n=this.getInputFields({state:this.state}),t="",r="";return e.length<=1&&(1===e.length&&"free"===e[0].type||0===e.length?(t="noplan",1===n.length&&(t="single-field"),0===e.length&&(r="invite-only")):t="singleplan"),at.createElement(at.Fragment,null,at.createElement("div",{className:"gh-portal-content signup "+t},at.createElement(bn,null),this.renderFormHeader(),this.renderForm()),at.createElement("footer",{className:"gh-portal-signup-footer "+r},this.renderSubmitButton(),this.renderLoginMessage()))}}]),t}(at.Component);ot.contextType=M;var it=ot;function lt(){return(lt=Object.assign||function(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}(e,["svgRef","title"]);return a.a.createElement("svg",lt({viewBox:"0 0 24 24",ref:n},r),t?a.a.createElement("title",null,t):null,ut,ct,st,pt,ft)},ht=a.a.forwardRef((function(e,n){return a.a.createElement(dt,lt({svgRef:n},e))})),mt=(t.p,t(0)),gt=function(e){E(t,e);var n=_(t);function t(){return y(this,t),n.apply(this,arguments)}return w(t,[{key:"renderFormHeader",value:function(){return mt.createElement("section",{className:"gh-portal-inbox-notification"},mt.createElement("header",{className:"gh-portal-header"},mt.createElement(ht,{className:"gh-portal-icon gh-portal-icon-envelope"}),mt.createElement("h2",null,"We've sent you a login link!")),mt.createElement("p",null,"If the email doesn't arrive in 3 minutes, be sure to check your spam folder!"))}},{key:"renderLoginMessage",value:function(){var e=this;return mt.createElement(mt.Fragment,null,mt.createElement("div",{style:{color:"#1d1d1d",fontWeight:"bold",cursor:"pointer"},onClick:function(){return e.context.onAction("switchPage",{page:"signin"})}},"Back to Log in"))}},{key:"handleClose",value:function(e){this.context.onAction("closePopup")}},{key:"renderCloseButton",value:function(){var e=this;return mt.createElement(cn,{style:{width:"100%"},onClick:function(n){return e.handleClose(n)},brandColor:this.context.brandColor,label:"Close"})}},{key:"render",value:function(){return mt.createElement("div",{className:"gh-portal-content"},mt.createElement(bn,null),this.renderFormHeader(),this.renderCloseButton())}}]),t}(mt.Component);gt.contextType=M;var bt=t(5),vt=t.n(bt),yt=t(0),xt=function(e){var n=e.showLinks,t=e.toggleShowLinks,r=n?"Show Data Attributes":"Show Links";return yt.createElement("h4",{className:"gh-portal-links-cell toggle",onClick:function(){return t({showLinks:!n})}},r)},wt=function(e){var n=e.pageName,t=function(e){var n=e.page,t=e.isLink,r=e.siteUrl;return"default"===n?t?"".concat(r,"#/portal"):"data-portal":"signup"===n?t?"".concat(r,"#/portal/signup"):'data-portal="signup"':"signin"===n?t?"".concat(r,"#/portal/signin"):'data-portal="signin"':"accountHome"===n?t?"".concat(r,"#/portal/account"):'data-portal="account"':"accountPlan"===n?t?"".concat(r,"#/portal/account/plans"):'data-portal="account/plans"':"accountProfile"===n?t?"".concat(r,"#/portal/account/profile"):'data-portal="account/profile"':void 0}({page:e.page,isLink:e.isLink,siteUrl:e.siteUrl});return yt.createElement("tr",null,yt.createElement("td",{className:"pagename"},n),yt.createElement("td",{className:"page-url"},yt.createElement("input",{value:t,disabled:"disabled"})),yt.createElement("td",{className:"copy"},yt.createElement("button",{type:"button",onClick:function(e){vt()(t)}},"Copy")))},kt=function(e){E(t,e);var n=_(t);function t(e){var r;return y(this,t),(r=n.call(this,e)).state={showLinks:!0},r}return w(t,[{key:"render",value:function(){var e=this,n=this.context.site.url,t=void 0===n?"":n;return yt.createElement("div",{className:"gh-portal-links-main"},yt.createElement("p",null,"Use these links or data attributes to show the various sections of members modal."),yt.createElement("table",{className:"gh-portal-links-table"},yt.createElement("tr",{className:"header"},yt.createElement("td",null,yt.createElement("h4",null,"Section")),yt.createElement("td",{colspan:"2"},yt.createElement("div",{className:"toggle-header"},yt.createElement("h4",null,this.state.showLinks?"Link":"Data Attribute"),yt.createElement(xt,{showLinks:this.state.showLinks,toggleShowLinks:function(n){var t=n.showLinks;return e.setState({showLinks:t})}})))),yt.createElement(wt,{pageName:"Default",page:"default",isLink:this.state.showLinks,siteUrl:t}),yt.createElement(wt,{pageName:"Sign up",page:"signup",isLink:this.state.showLinks,siteUrl:t}),yt.createElement(wt,{pageName:"Sign in",page:"signin",isLink:this.state.showLinks,siteUrl:t}),yt.createElement(wt,{pageName:"Account home",page:"accountHome",isLink:this.state.showLinks,siteUrl:t}),yt.createElement(wt,{pageName:"Account/Plans",page:"accountPlan",isLink:this.state.showLinks,siteUrl:t}),yt.createElement(wt,{pageName:"Account/Profile",page:"accountProfile",isLink:this.state.showLinks,siteUrl:t})))}}]),t}(yt.Component);kt.contextType=M;var Et=function(e){var n=e.hide,t=void 0!==n&&n,r=e.onClose;return t?null:a.a.createElement(be,{className:"closeicon",alt:"Close",onClick:r})},St=function(e){var n=e.message,t=(e.site||{}).members_support_address||"",r="mailto:".concat(t);return n?a.a.createElement("p",null,n):a.a.createElement("p",null," An unexpected error occured. Please try again or ",a.a.createElement("a",{href:r,onClick:function(){r&&window.open(r)}},"contact support")," if the error persists.")},Ct=function(e){E(t,e);var n=_(t);function t(){var e;return y(this,t),(e=n.call(this)).state={className:""},e}return w(t,[{key:"onAnimationEnd",value:function(e){var n=(this.context.popupNotification||{}).type;"popupnotification-slideout"===e.animationName&&("stripe:billing-update"===n&&Oe(["stripe"]),this.context.onAction("clearPopupNotification"))}},{key:"closeNotification",value:function(e){this.context.onAction("clearPopupNotification")}},{key:"componentDidUpdate",value:function(){var e=this.context.popupNotification;e.count!==this.state.notificationCount&&(clearTimeout(this.timeoutId),this.handlePopupNotification({popupNotification:e}))}},{key:"handlePopupNotification",value:function(e){var n=this,t=e.popupNotification;if(this.setState({notificationCount:t.count}),t.autoHide){var r=t.duration,a=void 0===r?2600:r;this.timeoutId=setTimeout((function(){n.setState((function(e){return"slideout"!==e.className?{className:"slideout",notificationCount:t.count}:{}}))}),a)}}},{key:"componentDidMount",value:function(){var e=this.context.popupNotification;this.handlePopupNotification({popupNotification:e})}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timeoutId)}},{key:"render",value:function(){var e=this,n=this.context,t=n.popupNotification,r=n.site,o=this.state.className,i=t.type,l=t.status,u=t.closeable,c=t.message,s=l?" ".concat(l):"",p=o?" ".concat(o):"";return a.a.createElement("div",{className:"gh-portal-popupnotification".concat(s).concat(p),onAnimationEnd:function(n){return e.onAnimationEnd(n)}},"error"===l?a.a.createElement(Te,{className:"gh-portal-popupnotification-icon error",alt:""}):a.a.createElement(ke,{className:"gh-portal-popupnotification-icon success",alt:""}),a.a.createElement(St,{type:i,status:l,message:c,site:r}),a.a.createElement(Et,{hide:!u,onClose:function(n){return e.closeNotification(n)}}))}}]),t}(a.a.Component);Ct.contextType=M;var Pt=t(0),Tt=function(e){E(t,e);var n=_(t);function t(e){var r;return y(this,t),(r=n.call(this,e)).state={email:""},r}return w(t,[{key:"componentDidMount",value:function(){this.context.member&&this.context.onAction("switchPage",{page:"accountHome"})}},{key:"handleSignin",value:function(e){var n=this;e.preventDefault(),this.setState((function(e){return{errors:qn({fields:n.getInputFields({state:e})})}}),(function(){var e=n.state,t=e.email,r=e.errors;r&&Object.values(r).filter((function(e){return!!e})).length>0||n.context.onAction("signin",{email:t})}))}},{key:"handleInputChange",value:function(e,n){var t=n.name;this.setState(p({},t,e.target.value))}},{key:"onKeyDown",value:function(e){13===e.keyCode&&this.handleSignin(e)}},{key:"getInputFields",value:function(e){var n=e.state,t=n.errors||{};return[{type:"email",value:n.email,placeholder:"jamie@example.com",label:"Email",name:"email",required:!0,errorMessage:t.email||"",autoFocus:!0}]}},{key:"renderSubmitButton",value:function(){var e=this,n=this.context.action,t=!1,r="signin:running"===n,a=r?"Sending login link...":"Continue",o=!!r;return"signin:failed"===n&&(a="Retry",t=!0),Pt.createElement(cn,{retry:t,style:{width:"100%"},onClick:function(n){return e.handleSignin(n)},disabled:o,brandColor:this.context.brandColor,label:a,isRunning:r})}},{key:"renderSignupMessage",value:function(){var e=this,n=this.context.brandColor;return Pt.createElement("div",{className:"gh-portal-signup-message"},Pt.createElement("div",null,"Don't have an account?"),Pt.createElement("button",{className:"gh-portal-btn gh-portal-btn-link",style:{color:n},onClick:function(){return e.context.onAction("switchPage",{page:"signup"})}},Pt.createElement("span",null,"Sign up")))}},{key:"renderForm",value:function(){var e=this;return Pt.createElement("section",null,Pt.createElement("div",{className:"gh-portal-section"},Pt.createElement($n,{fields:this.getInputFields({state:this.state}),onChange:function(n,t){return e.handleInputChange(n,t)},onKeyDown:function(n,t){return e.onKeyDown(n,t)}})))}},{key:"renderSiteLogo",value:function(){var e=this.context.site.icon;return e?("url(".concat(e,")"),Pt.createElement("img",{className:"gh-portal-signup-logo",src:e,alt:this.context.site.title})):null}},{key:"renderFormHeader",value:function(){var e=this.context.site.title||"Site Title";return Pt.createElement("header",{className:"gh-portal-signin-header"},this.renderSiteLogo(),Pt.createElement("h2",{className:"gh-portal-main-title"},"Log in to ",e))}},{key:"render",value:function(){return Pt.createElement(Pt.Fragment,null,Pt.createElement("div",{className:"gh-portal-content signin"},Pt.createElement(bn,null),this.renderFormHeader(),this.renderForm()),Pt.createElement("footer",{className:"gh-portal-signin-footer"},this.renderSubmitButton(),this.renderSignupMessage()))}}]),t}(Pt.Component);Tt.contextType=M;var _t=t(0),Nt=function(e){E(t,e);var n=_(t);function t(){return y(this,t),n.apply(this,arguments)}return w(t,[{key:"render",value:function(){return _t.createElement("div",{style:{display:"flex",flexDirection:"column",color:"#313131"}},_t.createElement("div",{style:{paddingLeft:"16px",paddingRight:"16px",paddingTop:"12px"}},"Loading..."))}}]),t}(_t.Component),Ot=t(0),Lt=function(e){E(t,e);var n=_(t);function t(e,r){var a;y(this,t),a=n.call(this,e,r);var o=r.member||{},i=o.name,l=void 0===i?"":i,u=o.email,c=void 0===u?"":u;return a.state={name:l,email:c},a}return w(t,[{key:"componentDidMount",value:function(){this.context.member||this.context.onAction("switchPage",{page:"signup"})}},{key:"handleSignout",value:function(e){e.preventDefault(),this.context.onAction("signout")}},{key:"onBack",value:function(e){this.context.onAction("back")}},{key:"onProfileSave",value:function(e){var n=this;e.preventDefault(),this.setState((function(e){return{errors:qn({fields:n.getInputFields({state:e})})}}),(function(){var e=n.state,t=e.email,r=e.name,a=e.errors;a&&Object.values(a).filter((function(e){return!!e})).length>0||(n.context.onAction("clearPopupNotification"),n.context.onAction("updateProfile",{email:t,name:r}))}))}},{key:"renderSaveButton",value:function(){var e=this,n="updateProfile:running"===this.context.action,t="Save";"updateProfile:failed"===this.context.action&&(t="Retry");var r=!!n;return Ot.createElement(cn,{isRunning:n,onClick:function(n){return e.onProfileSave(n)},disabled:r,brandColor:this.context.brandColor,label:t,style:{width:"100%"}})}},{key:"renderDeleteAccountButton",value:function(){return Ot.createElement("div",{style:{cursor:"pointer",color:"red"},role:"button"},"Delete account")}},{key:"renderAccountFooter",value:function(){return Ot.createElement("footer",{className:"gh-portal-action-footer"},this.renderSaveButton())}},{key:"renderHeader",value:function(){var e=this;return Ot.createElement("header",{className:"gh-portal-detail-header"},Ot.createElement(mn,{brandColor:this.context.brandColor,hidden:!this.context.lastPage,onClick:function(n){return e.onBack(n)}}),Ot.createElement("h3",{className:"gh-portal-main-title"},"Account settings"))}},{key:"renderUserAvatar",value:function(){var e=this.context.member&&this.context.member.avatar_image;return Ot.createElement("div",{style:{position:"relative",display:"flex",width:"64px",height:"64px",marginBottom:"6px",borderRadius:"100%",boxShadow:"0 0 0 3px #fff",border:"1px solid gray",overflow:"hidden",justifyContent:"center",alignItems:"center"}},Ot.createElement(A,{gravatar:e,style:{userIcon:{color:"black",width:"56px",height:"56px"}}}))}},{key:"handleInputChange",value:function(e,n){var t=n.name;this.setState(p({},t,e.target.value))}},{key:"getInputFields",value:function(e){var n=e.state,t=e.fieldNames,r=n.errors||{},a=[{type:"text",value:n.name,placeholder:"Jamie Larson",label:"Name",name:"name",required:!0,errorMessage:r.name||""},{type:"email",value:n.email,placeholder:"jamie@example.com",label:"Email",name:"email",required:!0,errorMessage:r.email||""}];return t&&t.length>0?a.filter((function(e){return t.includes(e.name)})):a}},{key:"onKeyDown",value:function(e){13===e.keyCode&&this.onProfileSave(e)}},{key:"renderProfileData",value:function(){var e=this;return Ot.createElement("div",{className:"gh-portal-section"},Ot.createElement($n,{fields:this.getInputFields({state:this.state}),onChange:function(n,t){return e.handleInputChange(n,t)},onKeyDown:function(n,t){return e.onKeyDown(n,t)}}))}},{key:"render",value:function(){return this.context.member?Ot.createElement(Ot.Fragment,null,Ot.createElement("div",{className:"gh-portal-content with-footer"},Ot.createElement(bn,null),this.renderHeader(),Ot.createElement("div",{className:"gh-portal-section"},this.renderProfileData())),this.renderAccountFooter()):null}}]),t}(Ot.Component);Lt.contextType=M;var jt={signin:Tt,signup:it,accountHome:Nn,accountPlan:Bn,accountProfile:Lt,magiclink:gt,loading:Nt,links:kt},Rt=function(e){var n=e.page;return Object.keys(jt).includes(n)?n:"signup"},It=jt;function zt(){return(zt=Object.assign||function(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}(e,["svgRef","title"]);return a.a.createElement("svg",zt({viewBox:"0 0 156 156",ref:n},r),t?a.a.createElement("title",null,t):null,Ft)},Mt=a.a.forwardRef((function(e,n){return a.a.createElement(At,zt({svgRef:n},e))})),Dt=(t.p,t(0)),Ut=function(e){return e.member,{modalContainer:{zIndex:"3999999",position:"fixed",left:"0",top:"0",width:"100%",height:"100%",overflow:"hidden"},frame:{common:{margin:"auto",position:"relative",padding:"0",outline:"0",width:"100%",opacity:"1",overflow:"hidden",height:"100%"}},page:{links:{width:"600px"}}}};function Ht(e){var n=e.message;return Fe()?Dt.createElement("div",{className:"gh-portal-cookiebanner"},n):null}var Bt=function(e){E(t,e);var n=_(t);function t(){return y(this,t),n.apply(this,arguments)}return w(t,[{key:"componentDidMount",value:function(){var e=this;this.node&&!tn(["preview"])&&(this.node.focus(),this.keyUphandler=function(n){var t=n.target&&n.target.tagName;"Escape"===n.key&&"INPUT"!==t&&e.context.onAction("closePopup")},this.node.ownerDocument.removeEventListener("keyup",this.keyUphandler),this.node.ownerDocument.addEventListener("keyup",this.keyUphandler))}},{key:"componentWillUnmount",value:function(){this.node&&this.node.ownerDocument.removeEventListener("keyup",this.keyUphandler)}},{key:"handlePopupClose",value:function(e){e.preventDefault(),e.target===e.currentTarget&&this.context.onAction("closePopup")}},{key:"renderActivePage",value:function(){var e=this.context.page;Rt({page:e});var n=It[e];return Dt.createElement(n,null)}},{key:"renderPopupNotification",value:function(){var e=this.context.popupNotification;return e&&e.type?Dt.createElement(Ct,null):null}},{key:"render",value:function(){var e=this,n=this.context,t=n.page,r=n.site,a=r.portal_plans,o=r.is_stripe_configured,i=r.allow_self_signup;Rt({page:t});var l=d({},Ut({page:t}).page[t]),u="";"signup"!==t&&"signin"!==t||(!i||3!==a.length||"signup"!==t&&"signin"!==t||(u="gh-portal-container-wide"),(a.length<=1||!i&&a.length>1&&-1!==a.indexOf("free")||!o)&&(u="gh-portal-container-narrow"));var c="",s=t;switch(t){case"signup":c="Cookies must be enabled in your browser to sign up.";break;case"signin":c="Cookies must be enabled in your browser to sign in.";break;case"accountHome":s="account-home";break;case"accountProfile":s="account-profile";break;case"accountPlan":s="account-plan";break;default:c="Cookies must be enabled in your browser.",s=t}var p=tn(["preview","dev"])&&!r.disableBackground?"gh-portal-popup-container preview":"gh-portal-popup-container";return Dt.createElement("div",{className:"gh-portal-popup-wrapper "+s,onClick:function(n){return e.handlePopupClose(n)}},Dt.createElement("div",{className:p+" "+u+" "+s,style:l,ref:function(n){return e.node=n},tabIndex:-1},Dt.createElement(Ht,{message:c}),this.renderPopupNotification(),this.renderActivePage()),Dt.createElement("div",{className:"gh-portal-powered"+(tn(["preview"])?" hidden":"")},Dt.createElement("a",{href:"https://ghost.org",target:"_blank",rel:"noopener noreferrer",onClick:function(){window.open("https://ghost.org","_blank")}},Dt.createElement(Mt,null)," ",Dt.createElement("span",null,"Publish with Ghost"))))}}]),t}(Dt.Component);Bt.contextType=M;var Wt=function(e){E(t,e);var n=_(t);function t(e){var r;return y(this,t),(r=n.call(this,e)).state={height:null},r}return w(t,[{key:"renderCurrentPage",value:function(e){var n=It[e];return Dt.createElement(n,null)}},{key:"onHeightChange",value:function(e){this.setState({height:e})}},{key:"handlePopupClose",value:function(e){e.preventDefault(),e.target===e.currentTarget&&this.context.onAction("closePopup")}},{key:"renderFrameStyles",value:function(){var e="\n :root {\n --brandcolor: ".concat(this.context.brandColor,"\n }\n ")+'\n /* Colors\n /* ----------------------------------------------------- */\n :root {\n --black: #000;\n --grey0: #1d1d1d;\n --grey1: #333;\n --grey2: #3d3d3d;\n --grey3: #474747;\n --grey4: #515151;\n --grey5: #686868;\n --grey6: #7f7f7f;\n --grey7: #979797;\n --grey8: #aeaeae;\n --grey9: #c5c5c5;\n --grey10: #dcdcdc;\n --grey11: #e1e1e1;\n --grey12: #eaeaea;\n --grey13: #f9f9f9;\n --white: #fff;\n --red: #f02525;\n --yellow: #FFDC15;\n --green: #7FC724;\n }\n\n /* Globals\n /* ----------------------------------------------------- */\n html {\n font-size: 62.5%;\n height: 100%;\n }\n\n body {\n margin: 0px;\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;\n font-size: 1.6rem;\n height: 100%;\n line-height: 1.6em;\n font-weight: 400;\n font-style: normal;\n color: var(--grey4);\n box-sizing: border-box;\n }\n\n button,\n button span {\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;\n }\n\n *, ::after, ::before {\n box-sizing: border-box;\n }\n\n h1, h2, h3, h4, h5, h6, p {\n line-height: 1.15em;\n padding: 0;\n margin: 0;\n }\n\n h1 {\n font-size: 31px;\n font-weight: 500;\n letter-spacing: 0.2px;\n }\n\n h2 {\n font-size: 23px;\n font-weight: 500;\n letter-spacing: 0.2px;\n }\n\n h3 {\n font-size: 20px;\n font-weight: 500;\n letter-spacing: 0.2px;\n }\n\n p {\n font-size: 15px;\n line-height: 1.55em;\n margin-bottom: 24px;\n }\n\n strong {\n font-weight: 600;\n }\n\n a,\n .gh-portal-link {\n cursor: pointer;\n }\n\n svg {\n box-sizing: content-box;\n }\n\n input,\n textarea {\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;\n font-size: 1.5rem;\n }\n\n textarea {\n padding: 10px;\n line-height: 1.5em;\n }\n\n .gh-portal-main-title {\n text-align: center;\n color: var(--grey0);\n line-height: 1.35em;\n }\n\n .gh-portal-text-disabled {\n color: var(--grey3);\n font-weight: normal;\n opacity: 0.35;\n }\n\n .gh-portal-text-center {\n text-align: center;\n }\n\n .gh-portal-input-label {\n color: var(--grey1);\n font-size: 1.3rem;\n font-weight: 500;\n margin-bottom: 2px;\n letter-spacing: 0.35px;\n }\n\n .gh-portal-setting-data {\n color: var(--grey6);\n font-size: 1.3rem;\n line-height: 1.15em;\n }\n\n .gh-portal-error {\n color: var(--red);\n font-size: 1.4rem;\n line-height: 1.6em;\n margin: 12px 0;\n }\n\n /* Buttons\n /* ----------------------------------------------------- */\n .gh-portal-btn {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 1.4rem;\n font-weight: 500;\n line-height: 1em;\n letter-spacing: 0.2px;\n text-align: center;\n white-space: nowrap;\n text-decoration: none;\n color: var(--grey0);\n background: var(--white);\n border: 1px solid var(--grey12);\n min-width: 80px;\n height: 42px;\n padding: 0 1.8rem;\n border-radius: 4px;\n cursor: pointer;\n transition: all .25s ease;\n box-shadow: none;\n box-shadow: 0 2px 6px -3px rgba(0,0,0,0.19);\n user-select: none;\n outline: none;\n }\n\n .gh-portal-btn:hover {\n border-color: var(--grey10);\n }\n\n .gh-portal-btn:disabled {\n opacity: 0.3 !important;\n cursor: auto;\n }\n\n .gh-portal-btn-icon svg {\n width: 16px;\n height: 16px;\n margin-right: 4px;\n stroke: currentColor;\n }\n\n .gh-portal-btn-icon svg path {\n stroke: currentColor;\n }\n\n .gh-portal-btn-link {\n line-height: 1;\n background: none;\n padding: 0;\n height: unset;\n min-width: unset;\n box-shadow: none;\n border: none;\n }\n\n .gh-portal-btn-link:hover {\n box-shadow: none;\n opacity: 0.85;\n }\n\n .gh-portal-btn-branded {\n color: var(--brandcolor);\n }\n\n .gh-portal-btn-list {\n font-size: 1.4rem;\n color: var(--brandcolor);\n height: 38px;\n width: unset;\n min-width: unset;\n padding: 0 4px;\n margin: 0 -4px;\n box-shadow: none;\n border: none;\n }\n\n .gh-portal-btn-list:hover {\n box-shadow: none;\n opacity: 0.75;\n }\n\n .gh-portal-btn-logout {\n position: absolute;\n top: 22px;\n left: 24px;\n background: none;\n border: none;\n height: unset;\n color: var(--grey3);\n padding: 0;\n margin: 0;\n z-index: 999;\n box-shadow: none;\n }\n\n .gh-portal-btn-logout .label {\n opacity: 0;\n transform: translateX(-6px);\n transition: all 0.2s ease-in-out;\n }\n\n .gh-portal-btn-logout:hover {\n padding: 0;\n margin: 0;\n background: none;\n border: none;\n height: unset;\n box-shadow: none;\n }\n\n .gh-portal-btn-logout:hover .label {\n opacity: 1.0;\n transform: translateX(-4px);\n }\n\n .gh-portal-logouticon {\n color: var(--grey9);\n cursor: pointer;\n width: 23px;\n height: 23px;\n padding: 6px;\n transform: translateX(0);\n transition: all 0.2s ease-in-out;\n }\n\n .gh-portal-logouticon path {\n stroke: var(--grey9);\n transition: all 0.2s ease-in-out;\n }\n\n .gh-portal-btn-logout:hover .gh-portal-logouticon {\n transform: translateX(-2px);\n }\n\n .gh-portal-btn-logout:hover .gh-portal-logouticon path {\n stroke: var(--grey3);\n }\n\n /* Global layout styles\n /* ----------------------------------------------------- */\n .gh-portal-popup-background {\n position: absolute;\n display: block;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n animation: fadein 0.2s;\n background: linear-gradient(315deg , rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.3) 100%);\n backdrop-filter: blur(2px);\n -webkit-backdrop-filter: blur(2px);\n -webkit-transform: translate3d(0, 0, 0);\n -moz-transform: translate3d(0, 0, 0);\n -ms-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n\n .gh-portal-popup-background.preview {\n background: #EDF0F2;\n animation: none;\n }\n\n @keyframes fadein {\n 0% { opacity: 0; }\n 100%{ opacity: 1.0; }\n }\n\n .gh-portal-popup-wrapper {\n position: relative;\n padding: 15vmin 0 0;\n height: 100%;\n }\n\n .gh-portal-popup-container {\n outline: none;\n position: relative;\n display: flex;\n box-sizing: border-box;\n flex-direction: column;\n justify-content: flex-start;\n overflow: hidden;\n font-size: 1.5rem;\n text-align: left;\n letter-spacing: 0;\n text-rendering: optimizeLegibility;\n background: var(--white);\n width: 400px;\n margin: 0 auto;\n border-radius: 5px;\n box-shadow: 0 3.8px 2.2px rgba(0, 0, 0, 0.028), 0 9.2px 5.3px rgba(0, 0, 0, 0.04), 0 17.3px 10px rgba(0, 0, 0, 0.05), 0 30.8px 17.9px rgba(0, 0, 0, 0.06), 0 57.7px 33.4px rgba(0, 0, 0, 0.072), 0 138px 80px rgba(0, 0, 0, 0.1);\n animation: popup 0.25s ease-in-out;\n z-index: 9999;\n }\n\n @keyframes popup {\n 0% {\n transform: scale(0.9) translateY(20px);\n opacity: 0;\n }\n 75% {\n opacity: 1.0;\n }\n 100%{\n transform: scale(1) translateY(0);\n }\n }\n\n .gh-portal-powered {\n position: absolute;\n bottom: 24px;\n left: 24px;\n }\n \n .gh-portal-powered a {\n display: inline-flex;\n align-items: center;\n padding: 6px 9px 6px 6px;\n border: none;\n font-size: 12px;\n line-height: 12px;\n letter-spacing: -.3px;\n font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;\n font-weight: 600;\n text-decoration: none;\n color: #383838;\n background: #fff;\n border-radius: 5px;\n box-shadow: 0 0 0 1px rgba(0,0,0,.05),0 1px 3px rgba(0,0,0,.08);\n cursor: pointer;\n outline: none;\n background: var(--white);\n z-index: 9998;\n animation: powered-fade-in 0.25s ease-in-out;\n transform-origin: top right;\n }\n\n @keyframes powered-fade-in {\n 0% {\n transform: scale(0.98); \n opacity: 0; \n }\n 75% {\n opacity: 1.0;\n }\n 100%{\n transform: scale(1);\n }\n }\n\n .gh-portal-powered a svg {\n height: 16px;\n width: 16px;\n margin: 0 6px 0 0;\n }\n\n .gh-portal-container-wide {\n width: 440px;\n }\n\n .gh-portal-container-narrow {\n width: 380px;\n }\n\n .gh-portal-popup-container.preview {\n box-shadow:\n 0 0 0 1px rgba(0,0,0,0.02),\n 0 2.8px 2.2px rgba(0, 0, 0, 0.02),\n 0 6.7px 5.3px rgba(0, 0, 0, 0.028),\n 0 12.5px 10px rgba(0, 0, 0, 0.035),\n 0 22.3px 17.9px rgba(0, 0, 0, 0.042),\n 0 41.8px 33.4px rgba(0, 0, 0, 0.05),\n 0 100px 80px rgba(0, 0, 0, 0.07);\n animation: none;\n }\n\n /* Sets the main content area of the popup scrollable. \n /* 12vw is the sum horizontal padding of the popup container \n */\n .gh-portal-content {\n position: relative;\n overflow-y: scroll;\n padding: 24px 32px 32px;\n max-height: calc(100vh - 12vw);\n }\n\n .gh-portal-content.with-footer {\n overflow-y: scroll;\n padding-bottom: 0;\n max-height: calc(100vh - 12vw - 72px);\n }\n\n /* Hide scrollbar for Chrome, Safari and Opera */\n .gh-portal-content::-webkit-scrollbar {\n display: none;\n }\n\n /* Hide scrollbar for IE, Edge and Firefox */\n .gh-portal-content {\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n } \n \n .gh-portal-popup-container footer {\n padding: 0 32px 32px;\n height: 72px;\n }\n\n .gh-portal-closeicon-container {\n position: absolute;\n top: 14px;\n right: 14px;\n z-index: 999;\n }\n\n .gh-portal-closeicon {\n color: var(--grey9);\n cursor: pointer;\n width: 16px;\n height: 16px;\n padding: 12px;\n transition: all 0.2s ease-in-out;\n }\n\n .gh-portal-closeicon:hover {\n color: var(--grey5);\n }\n\n .gh-portal-logout-container {\n position: absolute;\n top: 8px;\n left: 8px;\n }\n\n .gh-portal-header {\n display: flex;\n flex-direction: column;\n align-items: center;\n padding-bottom: 24px;\n }\n\n .gh-portal-section {\n margin-bottom: 32px;\n }\n\n .gh-portal-section.form {\n margin-bottom: 20px;\n }\n\n .gh-portal-detail-header {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n margin: -4px 0 24px;\n }\n\n .gh-portal-detail-footer .gh-portal-btn {\n min-width: 90px;\n }\n\n .gh-portal-action-footer {\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n\n .gh-portal-list {\n background: var(--white);\n padding: 20px;\n border-radius: 3px;\n box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.07), 0px 1px 1.5px 0px rgba(0, 0, 0, 0.05);\n }\n\n .gh-portal-list.outline {\n box-shadow: none;\n border: 1px solid var(--grey12);\n }\n\n .gh-portal-list section {\n display: flex;\n align-items: center;\n margin: 0 -20px 20px;\n padding: 0 20px 20px;\n border-bottom: 1px solid var(--grey12);\n }\n\n .gh-portal-list section:last-of-type {\n margin-bottom: 0;\n padding-bottom: 0;\n border: none;\n }\n\n .gh-portal-list-detail {\n flex-grow: 1;\n }\n\n .gh-portal-list-detail h3 {\n font-size: 1.5rem;\n font-weight: 500;\n }\n\n .gh-portal-list-detail p {\n font-size: 1.3rem;\n letter-spacing: 0.3px;\n line-height: 1.15em;\n padding: 0;\n margin: 2px 0 0;\n color: var(--grey6);\n }\n\n .gh-portal-expire-warning {\n text-align: center;\n color: var(--red);\n font-weight: 500;\n font-size: 1.4rem;\n margin: 12px 0;\n }\n\n .gh-portal-cookiebanner {\n background: var(--red);\n color: var(--white);\n text-align: center;\n font-size: 1.4rem;\n letter-spacing: 0.2px;\n line-height: 1.4em;\n padding: 8px;\n }\n\n .gh-portal-popup-container.account-profile .gh-portal-action-footer {\n height: unset;\n padding-bottom: 36px;\n }\n\n /* Icons\n /* ----------------------------------------------------- */\n .gh-portal-icon {\n color: var(--brandcolor);\n }\n\n /* Spacing modifiers\n /* ----------------------------------------------------- */\n .mt1 { margin-top: 4px; }\n .mt2 { margin-top: 8px; }\n .mt3 { margin-top: 12px; }\n .mt4 { margin-top: 16px; }\n .mt5 { margin-top: 20px; }\n .mt6 { margin-top: 24px; }\n .mt7 { margin-top: 28px; }\n .mt8 { margin-top: 32px; }\n .mt9 { margin-top: 36px; }\n .mt10 { margin-top: 40px; }\n\n .mr1 { margin-right: 4px; }\n .mr2 { margin-right: 8px; }\n .mr3 { margin-right: 12px; }\n .mr4 { margin-right: 16px; }\n .mr5 { margin-right: 20px; }\n .mr6 { margin-right: 24px; }\n .mr7 { margin-right: 28px; }\n .mr8 { margin-right: 32px; }\n .mr9 { margin-right: 36px; }\n .mr10 { margin-right: 40px; }\n\n .mb1 { margin-bottom: 4px; }\n .mb2 { margin-bottom: 8px; }\n .mb3 { margin-bottom: 12px; }\n .mb4 { margin-bottom: 16px; }\n .mb5 { margin-bottom: 20px; }\n .mb6 { margin-bottom: 24px; }\n .mb7 { margin-bottom: 28px; }\n .mb8 { margin-bottom: 32px; }\n .mb9 { margin-bottom: 36px; }\n .mb10 { margin-bottom: 40px; }\n\n .ml1 { margin-left: 4px; }\n .ml2 { margin-left: 8px; }\n .ml3 { margin-left: 12px; }\n .ml4 { margin-left: 16px; }\n .ml5 { margin-left: 20px; }\n .ml6 { margin-left: 24px; }\n .ml7 { margin-left: 28px; }\n .ml8 { margin-left: 32px; }\n .ml9 { margin-left: 36px; }\n .ml10 { margin-left: 40px; }\n\n .pt1 { padding-top: 4px; }\n .pt2 { padding-top: 8px; }\n .pt3 { padding-top: 12px; }\n .pt4 { padding-top: 16px; }\n .pt5 { padding-top: 20px; }\n .pt6 { padding-top: 24px; }\n .pt7 { padding-top: 28px; }\n .pt8 { padding-top: 32px; }\n .pt9 { padding-top: 36px; }\n .pt10 { padding-top: 40px; }\n \n .pr1 { padding-right: 4px; }\n .pr2 { padding-right: 8px; }\n .pr3 { padding-right: 12px; }\n .pr4 { padding-right: 16px; }\n .pr5 { padding-right: 20px; }\n .pr6 { padding-right: 24px; }\n .pr7 { padding-right: 28px; }\n .pr8 { padding-right: 32px; }\n .pr9 { padding-right: 36px; }\n .pr10 { padding-right: 40px; }\n \n .pb1 { padding-bottom: 4px; }\n .pb2 { padding-bottom: 8px; }\n .pb3 { padding-bottom: 12px; }\n .pb4 { padding-bottom: 16px; }\n .pb5 { padding-bottom: 20px; }\n .pb6 { padding-bottom: 24px; }\n .pb7 { padding-bottom: 28px; }\n .pb8 { padding-bottom: 32px; }\n .pb9 { padding-bottom: 36px; }\n .pb10 { padding-bottom: 40px; }\n \n .pl1 { padding-left: 4px; }\n .pl2 { padding-left: 8px; }\n .pl3 { padding-left: 12px; }\n .pl4 { padding-left: 16px; }\n .pl5 { padding-left: 20px; }\n .pl6 { padding-left: 24px; }\n .pl7 { padding-left: 28px; }\n .pl8 { padding-left: 32px; }\n .pl9 { padding-left: 36px; }\n .pl10 { padding-left: 40px; }\n\n .hidden { display: none !important; }\n\n .gh-portal-account-main {\n background: var(--grey13);\n padding: 32px 32px 0;\n max-height: calc(100vh - 12vw - 104px);\n }\n\n .gh-portal-account-header {\n display: flex;\n flex-direction: column;\n align-items: center;\n margin: 0 0 32px;\n }\n\n .gh-portal-account-header .gh-portal-avatar {\n margin: 6px 0 8px !important;\n }\n\n .gh-portal-account-data {\n margin-bottom: 32px;\n }\n\n footer.gh-portal-account-footer {\n display: flex;\n padding: 32px;\n height: 104px;\n border-top: 1px solid #eaeaea;\n }\n\n .gh-portal-account-footer.paid {\n margin-top: 12px;\n }\n\n .gh-portal-account-footermenu {\n display: flex;\n list-style: none;\n padding: 0;\n margin: 0;\n }\n\n .gh-portal-account-footerright {\n display: flex;\n flex-grow: 1;\n align-items: center;\n justify-content: flex-end;\n }\n\n .gh-portal-account-footermenu li {\n margin-right: 16px;\n }\n\n .gh-portal-account-footermenu li:last-of-type {\n margin-right: 0;\n }\n\n .gh-portal-freeaccount-newsletter {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-top: 24px;\n }\n\n .gh-portal-freeaccount-newsletter .label {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n }\n\n .gh-portal-free-ctatext {\n margin-top: -12px;\n }\n\n .gh-portal-cancelcontinue-container {\n margin: 24px 0 32px;\n }\n\n .gh-portal-billing-button-loader {\n width: 32px;\n height: 32px;\n margin-right: -3px;\n opacity: 0.6;\n }\n\n .gh-portal-accountplans-main {\n margin-top: 24px;\n margin-bottom: 0;\n }\n\n .gh-portal-expire-container {\n margin: 24px 0 0;\n }\n\n .gh-portal-cancellation-form p {\n margin-bottom: 12px;\n }\n\n .gh-portal-cancellation-form .gh-portal-input-section {\n margin-bottom: 20px;\n }\n\n .gh-portal-cancellation-form .gh-portal-input {\n resize: none;\n width: 100%;\n height: 62px;\n padding: 6px 12px;\n }\n\n .gh-portal-input {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n\n display: block;\n box-sizing: border-box;\n font-size: 1.5rem;\n color: inherit;\n background: transparent;\n outline: none;\n border: 1px solid var(--grey12);\n border-radius: 3px;\n width: 100%;\n height: 40px;\n padding: 0 12px;\n margin-bottom: 18px;\n letter-spacing: 0.2px;\n box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.07), 0px 1px 1.5px 0px rgba(0, 0, 0, 0.05);\n transition: border-color 0.25s ease-in-out;\n }\n\n .gh-portal-input-labelcontainer {\n display: flex;\n justify-content: space-between;\n width: 100%;\n }\n\n .gh-portal-input-labelcontainer p {\n color: var(--red);\n font-size: 1.3rem;\n letter-spacing: 0.35px;\n line-height: 1.6em;\n margin-bottom: 0;\n }\n\n .gh-portal-input-label.hidden {\n display: none;\n }\n\n .gh-portal-input:focus {\n border-color: #cdcdcd;\n }\n\n .gh-portal-input.error {\n border-color: var(--red);\n }\n\n .gh-portal-input::placeholder {\n color: var(--grey7);\n }\n\n .gh-portal-input:disabled {\n background: var(--grey13);\n color: var(--grey9);\n box-shadow: none;\n }\n\n .gh-portal-input:disabled::placeholder {\n color: var(--grey9);\n }\n\n .gh-portal-plans-container {\n display: flex;\n align-items: stretch;\n border: 1px solid var(--grey10);\n border-radius: 5px;\n }\n\n .gh-portal-plan-section {\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n flex: 1;\n font-size: 1.4rem;\n line-height: 1.35em;\n border-right: 1px solid var(--grey10);\n padding: 16px 10px;\n cursor: pointer;\n user-select: none;\n }\n\n .gh-portal-plans-container.disabled .gh-portal-plan-section {\n cursor: auto;\n }\n\n .gh-portal-plan-section.checked::before {\n position: absolute;\n display: block;\n top: -1px;\n right: -1px;\n bottom: -1px;\n left: -1px;\n content: "";\n z-index: 999;\n border: 2px solid var(--brandcolor);\n pointer-events: none;\n }\n\n .gh-portal-plan-section:first-of-type::before {\n border-top-left-radius: 5px;\n border-bottom-left-radius: 5px;\n }\n\n .gh-portal-plan-section:last-of-type::before {\n border-top-right-radius: 5px;\n border-bottom-right-radius: 5px;\n }\n\n .gh-portal-plan-section:last-of-type {\n border-right: none;\n }\n\n .gh-portal-plans-container.disabled .gh-portal-plan-section.checked::before {\n opacity: 0.3;\n }\n\n .gh-portal-plan-pricelabel {\n display: flex;\n margin-top: 8px;\n }\n\n .gh-portal-plan-name {\n font-size: 1.2rem;\n font-weight: 500;\n letter-spacing: 0.5px;\n text-transform: uppercase;\n margin-top: 8px;\n }\n\n .gh-portal-plan-currency {\n position: relative;\n bottom: 2px;\n font-size: 1.4rem;\n font-weight: 500;\n letter-spacing: 0.4px;\n }\n\n .gh-portal-plan-currency-code {\n margin-right: 2px;\n font-size: 1.15rem;\n }\n\n .gh-portal-plan-price {\n font-size: 2.2rem;\n font-weight: 500;\n letter-spacing: 0.1px;\n }\n\n .gh-portal-plan-type {\n color: var(--grey7);\n }\n\n .gh-portal-plan-featurewrapper {\n display: flex;\n flex-direction: column;\n align-items: center;\n border-top: 1px solid var(--grey12);\n margin-top: 12px;\n padding-top: 12px;\n width: 100%;\n }\n\n .gh-portal-plan-feature {\n font-size: 1.25rem;\n font-weight: 500;\n line-height: 1.25em;\n text-align: center;\n letter-spacing: 0.2px;\n }\n\n .gh-portal-plan-checkbox {\n position: relative;\n display: block;\n font-size: 22px;\n height: 18px;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n\n .gh-portal-plans-container.disabled .gh-portal-plan-checkbox {\n cursor: auto;\n }\n\n .gh-portal-plan-checkbox input {\n position: absolute;\n height: 0;\n width: 0;\n opacity: 0;\n cursor: pointer;\n }\n\n .gh-portal-plan-checkbox .checkmark {\n position: absolute;\n top: 0;\n left: -9px;\n background-color: var(--grey12);\n border-radius: 999px;\n height: 18px;\n width: 18px;\n }\n\n .gh-portal-plan-checkbox input:checked ~ .checkmark {\n background-color: var(--brandcolor);\n }\n\n .gh-portal-plan-checkbox .checkmark::after {\n position: absolute;\n display: none;\n content: "";\n }\n\n .gh-portal-plan-checkbox input:checked ~ .checkmark:after {\n display: block;\n }\n\n .gh-portal-plan-checkbox .checkmark:after {\n left: 6.5px;\n top: 2.5px;\n width: 5px;\n height: 11px;\n border: solid var(--white);\n border-width: 0 2px 2px 0;\n -webkit-transform: rotate(45deg);\n -ms-transform: rotate(45deg);\n transform: rotate(45deg);\n }\n\n .gh-portal-plans-container.disabled .gh-portal-plan-checkbox input:checked ~ .checkmark {\n opacity: 0.3;\n }\n\n .gh-portal-content.signup.singleplan .gh-portal-plan-section {\n cursor: auto;\n }\n\n .gh-portal-content.signup.singleplan .gh-portal-plan-checkbox,\n .gh-portal-content.signup.singleplan .gh-portal-plan-section.checked::before {\n display: none;\n }\n\n .gh-portal-content.signup.singleplan .gh-portal-plan-name {\n margin-top: 0;\n }\n\n .gh-portal-plan-section:not(.checked)::before {\n position: absolute;\n display: block;\n top: -1px;\n right: -1px;\n bottom: -1px;\n left: -1px;\n content: "";\n z-index: 999;\n border: 1px solid var(--brandcolor);\n pointer-events: none;\n opacity: 0;\n transition: all 0.2s ease-in-out;\n }\n\n .gh-portal-plans-container.disabled .gh-portal-plan-section:not(.checked):hover::before {\n opacity: 0;\n }\n\n .gh-portal-plans-container.hide-checkbox .gh-portal-plan-checkbox {\n display: none;\n }\n\n .gh-portal-plans-container.hide-checkbox .gh-portal-plan-section {\n padding-top: 12px;\n padding-bottom: 20px;\n }\n\n .gh-portal-plan-current {\n display: block;\n font-size: 1.25rem;\n letter-spacing: 0.2px;\n line-height: 1.25em;\n color: var(--brandcolor);\n margin: 4px 0 -2px;\n }\n\n .gh-portal-for-switch label,\n .gh-portal-for-switch .container {\n position: relative;\n display: inline-block;\n width: 36px !important;\n height: 22px !important;\n cursor: pointer;\n }\n\n .gh-portal-for-switch label p,\n .gh-portal-for-switch .container p {\n overflow: auto;\n color: var(--grey0);\n font-weight: normal;\n }\n\n .gh-portal-for-switch input {\n opacity: 0;\n width: 0;\n height: 0;\n }\n\n .gh-portal-for-switch .input-toggle-component {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: var(--grey13);\n border: 1px solid var(--grey11);\n transition: .3s;\n width: 36px !important;\n height: 22px !important;\n border-radius: 999px;\n transition: background 0.15s ease-in-out, border-color 0.15s ease-in-out;\n cursor: pointer;\n }\n\n .gh-portal-for-switch label:hover input:not(:checked) + .input-toggle-component,\n .gh-portal-for-switch .container:hover input:not(:checked) + .input-toggle-component {\n border-color: var(--grey9);\n }\n\n .gh-portal-for-switch .input-toggle-component:before {\n position: absolute;\n content: "";\n top: 2px !important;\n left: 2px !important;\n height: 16px !important;\n width: 16px !important;\n background-color: white;\n transition: .3s;\n box-shadow: 0 0 1px rgba(0,0,0,.3), 0 4px 6px rgba(0,0,0,.1);\n border-radius: 999px;\n }\n\n .gh-portal-for-switch input:checked + .input-toggle-component {\n background: var(--brandcolor);\n border-color: transparent;\n }\n\n .gh-portal-for-switch input:checked + .input-toggle-component:before {\n transform: translateX(14px);\n box-shadow: none;\n }\n\n .gh-portal-for-switch .container {\n width: 38px !important;\n height: 22px !important;\n }\n\n .gh-portal-btn-main {\n box-shadow: none;\n position: relative;\n height: 42px;\n border: none;\n }\n\n .gh-portal-btn-main:hover,\n .gh-portal-btn-main:focus {\n box-shadow: none;\n border: none;\n }\n\n .gh-portal-btn-primary:hover,\n .gh-portal-btn-primary:focus {\n opacity: 0.92 !important;\n }\n\n .gh-portal-btn-primary:disabled:hover::before {\n display: none;\n }\n\n .gh-portal-btn-destructive:not(:disabled):hover {\n color: var(--red);\n border-color: var(--red);\n }\n\n .gh-portal-loadingicon {\n position: absolute;\n left: 50%;\n display: inline-block;\n margin-left: -19px;\n height: 31px;\n }\n\n .gh-portal-loadingicon path,\n .gh-portal-loadingicon rect {\n fill: #fff;\n }\n\n .gh-portal-loadingicon.dark path,\n .gh-portal-loadingicon.dark rect {\n fill: #1d1d1d;\n }\n\n .gh-portal-btn-back,\n .gh-portal-btn-back:hover {\n box-shadow: none;\n position: relative;\n height: unset;\n min-width: unset;\n position: absolute;\n top: -3px;\n left: -16px;\n background: none;\n padding: 8px;\n margin: 0;\n box-shadow: none;\n color: var(--grey3);\n border: none;\n }\n\n .gh-portal-btn-back:hover {\n color: var(--grey1);\n transform: translateX(-4px);\n }\n\n .gh-portal-btn-back svg {\n width: 17px;\n height: 17px;\n margin-top: 1px;\n margin-right: 2px;\n }\n\n .gh-portal-avatar {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n margin: 0 0 8px 0;\n border-radius: 999px;\n }\n\n .gh-portal-avatar img {\n position: absolute;\n display: block;\n top: -2px;\n right: -2px;\n bottom: -2px;\n left: -2px;\n width: calc(100% + 4px);\n height: calc(100% + 4px);\n opacity: 1;\n max-width: unset;\n }\n\n .gh-portal-icon-envelope {\n width: 44px;\n margin: 12px 0 10px;\n }\n\n .gh-portal-inbox-notification {\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n\n .gh-portal-inbox-notification p {\n text-align: center;\n margin-bottom: 30px;\n }\n\n .gh-portal-links-table {\n width: 100%;\n }\n\n .gh-portal-links-table tr td {\n white-space: nowrap;\n padding: 4px 12px 4px 0;\n }\n\n .gh-portal-links-table tr.header td {\n border-bottom: 1px solid var(--grey12);\n }\n\n .gh-portal-links-table tr.header h4.toggle {\n font-weight: 400;\n color: var(--brandcolor);\n cursor: pointer;\n }\n\n .gh-portal-links-table tr td:last-of-type {\n text-align: right;\n padding-right: 0;\n }\n\n .gh-portal-links-table tr.header .toggle-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n\n .gh-portal-signup-logo {\n position: relative;\n display: block;\n background-position: 50%;\n background-size: cover;\n border-radius: 2px;\n width: 56px;\n height: 56px;\n margin: 12px 0 10px;\n }\n\n .gh-portal-signup-header,\n .gh-portal-signin-header {\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 0 32px 24px;\n }\n\n .gh-portal-signup-header .gh-portal-main-title,\n .gh-portal-signin-header .gh-portal-main-title {\n margin-top: 12px;\n }\n\n .gh-portal-signup-logo + .gh-portal-main-title {\n margin: 4px 0 0;\n }\n\n .gh-portal-signup-header.nodivider {\n border: none;\n margin-bottom: 0;\n }\n\n .gh-portal-signup-message {\n display: flex;\n justify-content: center;\n color: var(--grey4);\n font-size: 1.3rem;\n letter-spacing: 0.2px;\n margin-top: 8px;\n }\n\n .gh-portal-signup-message button {\n font-size: 1.3rem;\n font-weight: 600;\n margin-left: 4px;\n }\n\n .gh-portal-signup-message button span {\n display: inline-block;\n padding-bottom: 2px;\n margin-bottom: -2px;\n }\n\n .gh-portal-content.signup {\n background: linear-gradient(#fff 30%,hsla(0,0%,100%,0)),\n linear-gradient(hsla(0,0%,100%,0),#fff 70%) 0 100%,\n linear-gradient(#fff,transparent),\n linear-gradient(transparent,rgba(0,0,0,.08)) 0 100%;\n background-repeat: no-repeat;\n background-color: #fff;\n background-size: 100% 40px,100% 40px,100% 14px,100% 14px;\n background-attachment: local,local,scroll,scroll;\n }\n\n footer.gh-portal-signup-footer,\n footer.gh-portal-signin-footer {\n padding-top: 24px;\n height: 132px;\n }\n\n .gh-portal-content.signup,\n .gh-portal-content.signin {\n max-height: calc(100vh - 12vw - 132px);\n padding-bottom: 0;\n }\n\n .gh-portal-content.signup .gh-portal-section {\n margin-bottom: 0;\n }\n\n .gh-portal-content.signup.noplan {\n margin-bottom: -8px;\n }\n\n .gh-portal-content.signup.single-field {\n margin-bottom: 0;\n }\n\n .gh-portal-content.signup.single-field .gh-portal-input,\n .gh-portal-content.signin .gh-portal-input {\n margin-bottom: 8px;\n }\n\n .gh-portal-content.signup.single-field + .gh-portal-signup-footer,\n footer.gh-portal-signin-footer {\n padding-top: 12px;\n }\n\n .gh-portal-content.signin .gh-portal-section {\n margin-bottom: 0;\n }\n\n .gh-portal-content.signup.single-field + footer.gh-portal-signup-footer,\n .gh-portal-content.signin + footer.gh-portal-signin-footer {\n height: 120px;\n }\n\n footer.gh-portal-signup-footer.invite-only {\n height: unset;\n }\n\n .gh-portal-invite-only-notification {\n margin: 8px 32px;\n padding: 0;\n text-align: center;\n color: var(--grey2);\n }\n\n .gh-portal-icon-invitation {\n width: 44px;\n margin: 12px 0 2px;\n }\n\n .gh-portal-icon-invitation path,\n .gh-portal-icon-invitation circle,\n .gh-portal-icon-invitation line {\n stroke-width: 1.2px;\n }\n\n .gh-portal-popupnotification {\n position: absolute;\n top: 8px;\n left: 8px;\n right: 8px;\n padding: 8px;\n background: var(--grey2);\n z-index: 9999;\n border-radius: 4px;\n font-size: 1.3rem;\n box-shadow: 0px 0.8151839971542358px 0.8151839971542358px 0px rgba(0,0,0,0.01),\n 0px 2.2538793087005615px 2.2538793087005615px 0px rgba(0,0,0,0.02),\n 0px 5.426473140716553px 5.426473140716553px 0px rgba(0,0,0,0.03),\n 0px 18px 18px 0px rgba(0,0,0,0.04);\n animation: popupnotification-slidein 0.6s ease-in-out;\n }\n\n .gh-portal-popupnotification.slideout {\n animation: popupnotification-slideout 0.48s ease-in;\n }\n\n .gh-portal-popupnotification p {\n color: var(--white);\n margin: 0;\n padding: 0 20px;\n font-size: 1.4rem;\n line-height: 1.5em;\n letter-spacing: 0.2px;\n text-align: center;\n }\n\n .gh-portal-popupnotification a {\n color: var(--white);\n }\n\n .gh-portal-popupnotification-icon {\n position: absolute;\n top: 10px;\n left: 10px;\n width: 16px;\n height: 16px;\n }\n\n .gh-portal-popupnotification-icon.success {\n color: var(--green);\n }\n\n .gh-portal-popupnotification-icon.error {\n color: #FF2828;\n }\n\n .gh-portal-popupnotification .closeicon {\n position: absolute;\n top: 0px;\n bottom: 0;\n right: 0;\n color: var(--white);\n cursor: pointer;\n width: 12px;\n height: 12px;\n padding: 12px;\n transition: all 0.2s ease-in-out forwards;\n opacity: 0.8;\n }\n\n .gh-portal-popupnotification .closeicon:hover {\n opacity: 1.0;\n }\n\n @keyframes popupnotification-slidein {\n 0% { transform: translateY(-100px); }\n 60% { transform: translateY(8px); }\n 100% { transform: translateY(0); }\n }\n\n @keyframes popupnotification-slideout {\n 0% { transform: translateY(0); }\n 40% { transform: translateY(8px); }\n 100% { transform: translateY(-100px); }\n }\n\n@media (max-width: 480px) {\n .gh-portal-popup-wrapper {\n height: 100%;\n padding: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: space-between;\n background: var(--white);\n }\n \n .gh-portal-popup-container {\n width: 100%;\n border-radius: 0;\n overflow: unset;\n animation: popup-mobile 0.25s ease-in-out;\n box-shadow: none !important;\n }\n\n .gh-portal-popup-wrapper.account-home,\n .gh-portal-popup-container.account-home {\n background: var(--grey13);\n }\n\n .gh-portal-popup-container.account-home .gh-portal-account-footer {\n border-top: none;\n padding-top: 0;\n height: unset;\n }\n\n .gh-portal-content {\n overflow-y: auto !important;\n max-height: unset !important;\n }\n\n .gh-portal-powered {\n position: relative;\n bottom: unset;\n left: unset;\n background: var(--white);\n display: flex;\n justify-content: center;\n width: 100%;\n padding-top: 32px;\n }\n\n .gh-portal-popup-wrapper.account-home .gh-portal-powered {\n background: var(--grey13);\n }\n\n .gh-portal-powered a {\n animation: none;\n box-shadow: none;\n background: none;\n margin-bottom: 32px;\n }\n\n .gh-portal-powered a span {\n opacity: 0.5;\n }\n\n .gh-portal-powered a svg {\n opacity: 0.65;\n }\n\n .gh-portal-popup-wrapper.account-home .gh-portal-powered a {\n box-shadow: none;\n }\n}\n\n@media (max-width: 414px) {\n .gh-portal-input {\n height: 44px;\n }\n\n .gh-portal-btn:not(.gh-portal-btn-link):not(.gh-portal-btn-back) {\n min-height: 44px;\n }\n}\n\n@media (max-width: 390px) {\n .gh-portal-plans-container {\n flex-direction: column;\n }\n\n .gh-portal-plan-section {\n flex-direction: row;\n min-height: 60px;\n border-right: none;\n border-bottom: 1px solid var(--grey10);\n }\n\n .gh-portal-plan-section:last-of-type {\n border-bottom: none;\n }\n\n .gh-portal-plan-checkbox {\n order: 1;\n margin-left: 12px;\n }\n\n .gh-portal-plan-name {\n position: absolute;\n left: 40px;\n top: 12px;\n padding: 0;\n margin: 0;\n text-transform: none;\n font-size: 1.4rem;\n letter-spacing: 0.2px;\n }\n\n .gh-portal-plan-featurewrapper {\n position: absolute;\n left: 40px;\n top: 32px;\n padding: 0;\n margin: 0;\n width: unset;\n text-align: left;\n border-top: none;\n font-weight: 400;\n letter-spacing: 0.2px;\n }\n \n .gh-portal-plan-pricelabel {\n right: 20px;\n top: 12px;\n position: absolute;\n }\n\n .gh-portal-plan-section:first-of-type.checked::before {\n border-top-left-radius: 5px;\n border-top-right-radius: 5px;\n border-bottom-left-radius: 0;\n }\n\n .gh-portal-plan-section:last-of-type.checked::before {\n border-bottom-left-radius: 5px;\n border-bottom-right-radius: 5px;\n border-top-right-radius: 0;\n }\n\n .gh-portal-plans-container.hide-checkbox .gh-portal-plan-name,\n .gh-portal-plans-container.hide-checkbox .gh-portal-plan-featurewrapper,\n .gh-portal-content.signup.singleplan .gh-portal-plan-name,\n .gh-portal-content.signup.singleplan .gh-portal-plan-featurewrapper {\n left: 12px;\n }\n\n .gh-portal-plans-container.hide-checkbox .gh-portal-plan-featurewrapper {\n flex-direction: row;\n }\n\n .gh-portal-plans-container.hide-checkbox .gh-portal-plan-featurewrapper .gh-portal-plan-current {\n margin: 0 0 0 12px;\n }\n\n .gh-portal-input {\n font-size: 1.4rem;\n margin-bottom: 16px;\n }\n\n .gh-portal-content {\n padding: 24px;\n }\n\n .gh-portal-popup-container footer {\n padding-right: 24px;\n padding-bottom: 24px;\n padding-left: 24px;\n }\n\n .gh-portal-signup-header,\n .gh-portal-signin-header {\n padding-bottom: 16px;\n }\n\n .gh-portal-account-main {\n padding: 24px 24px 0;\n }\n\n .gh-portal-powered {\n padding-top: 12px;\n }\n}\n\n@media (min-width: 768px) and (max-height: 768px) {\n .gh-portal-signup-header,\n .gh-portal-signin-header {\n padding-bottom: 16px;\n }\n}\n\n@keyframes popup-mobile {\n 0% {\n opacity: 0;\n }\n 100%{\n opacity: 1.0;\n }\n}\n';return Dt.createElement("style",{dangerouslySetInnerHTML:{__html:e}})}},{key:"renderFrameContainer",value:function(){var e=this,n=this.context,t=n.member,r=n.site,a=Ut({member:t}),o=d({},a.frame.common);tn(["preview"])&&(a.modalContainer.zIndex="3999997");var i=tn(["preview","dev"])&&!r.disableBackground?"gh-portal-popup-background preview":"gh-portal-popup-background";return Dt.createElement("div",{style:a.modalContainer},Dt.createElement(N,{style:o,title:"portal-popup",head:this.renderFrameStyles()},Dt.createElement("div",{className:i,onClick:function(n){return e.handlePopupClose(n)}}),Dt.createElement(Bt,null)))}},{key:"render",value:function(){return this.context.showPopup?this.renderFrameContainer():null}}]),t}(Dt.Component);Wt.contextType=M;var Qt=function(e){var n=e.siteUrl,t=void 0===n?window.location.origin:n;function r(e){var n=e.type,r=e.resource;if("members"===n)return"".concat(t.replace(/\/$/,""),"/").concat("members/api","/").concat(r,"/")}function a(e){var n=e.url,t=e.method,r=e.headers,a=void 0===r?{}:r,o=e.credentials,i=e.body;return fetch(n,{method:t,headers:a,credentials:o,body:i})}var o={};return o.site={read:function(){return a({url:r({type:"members",resource:"site"}),method:"GET",headers:{"Content-Type":"application/json"}}).then((function(e){if(e.ok)return e.json();throw new Error("Failed to fetch site data")}))}},o.member={identity:function(){return a({url:r({type:"members",resource:"session"}),credentials:"same-origin"}).then((function(e){return e.ok?e.text():null}))},sessionData:function(){return a({url:r({type:"members",resource:"member"}),credentials:"same-origin"}).then((function(e){return e.ok?e.json():null}))},update:function(e){var n=e.name,t=e.subscribed;return a({url:r({type:"members",resource:"member"}),method:"PUT",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({name:n,subscribed:t})}).then((function(e){return e.ok?e.json():null}))},sendMagicLink:function(e){var n=e.email,t=e.emailType,o=e.labels,i=e.name,l=e.oldEmail;return a({url:r({type:"members",resource:"send-magic-link"}),method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:i,email:n,oldEmail:l,emailType:t,labels:o,requestSrc:"portal"})}).then((function(e){if(e.ok)return"Success";throw new Error("Failed to send magic link email")}))},signout:function(){return a({url:r({type:"members",resource:"session"}),method:"DELETE"}).then((function(e){if(e.ok)return window.location.replace(t),"Success";throw new Error("Failed to signout")}))},checkoutPlan:function(){var e=arguments;return v(g.a.mark((function n(){var i,l,u,c,s,p,f,h,m,b,v,y,x;return g.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=e.length>0&&void 0!==e[0]?e[0]:{},l=i.plan,u=i.cancelUrl,c=i.successUrl,s=i.email,p=i.name,f=i.metadata,h=void 0===f?{}:f,m=new URL(t),n.next=4,o.member.identity();case 4:return b=n.sent,v=r({type:"members",resource:"create-stripe-checkout-session"}),c||((y=new URL(t)).searchParams.set("stripe","success"),c=y.href),u||((x=window.location.href.startsWith(m.href)?new URL(window.location.href):new URL(t)).searchParams.set("stripe","cancel"),u=x.href),n.abrupt("return",a({url:v,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({plan:l,identity:b,metadata:d({name:p,requestSrc:"portal"},h),successUrl:c,cancelUrl:u,customerEmail:s})}).then((function(e){if(!e.ok)throw new Error("Could not create stripe checkout session");return e.json()})).then((function(e){return window.Stripe(e.publicKey).redirectToCheckout({sessionId:e.sessionId})})).then((function(e){if(e.error)throw new Error(e.error.message)})).catch((function(e){throw e})));case 9:case"end":return n.stop()}}),n)})))()},editBilling:function(){var e=arguments;return v(g.a.mark((function n(){var i,l,u,c,s,p,f,d,h;return g.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=e.length>0&&void 0!==e[0]?e[0]:{},l=i.successUrl,u=i.cancelUrl,c=i.subscriptionId,s=new URL(t),n.next=4,o.member.identity();case 4:return p=n.sent,f=r({type:"members",resource:"create-stripe-update-session"}),l||((d=new URL(t)).searchParams.set("stripe","billing-update-success"),l=d.href),u||((h=window.location.href.startsWith(s.href)?new URL(window.location.href):new URL(t)).searchParams.set("stripe","billing-update-cancel"),u=h.href),n.abrupt("return",a({url:f,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identity:p,subscription_id:c,successUrl:l,cancelUrl:u})}).then((function(e){if(!e.ok)throw new Error("Could not create stripe checkout session");return e.json()})).then((function(e){return window.Stripe(e.publicKey).redirectToCheckout({sessionId:e.sessionId})})).then((function(e){if(e.error)throw new Error(e.error.message)})).catch((function(e){throw e})));case 9:case"end":return n.stop()}}),n)})))()},updateSubscription:function(e){return v(g.a.mark((function n(){var t,i,l,u,c,s;return g.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=e.subscriptionId,i=e.planName,l=e.cancelAtPeriodEnd,u=e.cancellationReason,n.next=3,o.member.identity();case 3:return c=n.sent,s=r({type:"members",resource:"subscriptions"})+t+"/",n.abrupt("return",a({url:s,method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({cancel_at_period_end:l,cancellation_reason:u,identity:c,planName:i})}));case 6:case"end":return n.stop()}}),n)})))()}},o.init=v(g.a.mark((function e(){var n,t,r;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.site.read();case 2:return n=e.sent,t=n.site,e.next=6,o.member.sessionData();case 6:return r=e.sent,e.abrupt("return",{site:t,member:r});case 8:case"end":return e.stop()}}),e)}))),o},Vt={title:"A Ghost site",description:"Thoughts, stories and ideas.",logo:"https://pbs.twimg.com/profile_images/1111773508231667713/mf2N0uqc_400x400.png",icon:"https://pbs.twimg.com/profile_images/1111773508231667713/mf2N0uqc_400x400.png",accent_color:"",url:"http://localhost:2368/",plans:{monthly:5e3,yearly:15e4,currency:"USD"},allow_self_signup:!0,is_stripe_configured:!0,portal_button:!0,portal_name:!0,portal_plans:["monthly","yearly"],portal_button_icon:"icon-1",portal_button_signup_text:"Subscribe now",portal_button_style:"icon-and-text",members_support_address:"support@example.com"},$t={free:{uuid:"d7d3b1a0-90f4-4b93-a51f-76b56213b535",email:"jamie@example.com",name:"Jamie Larson",firstname:"Jamie",avatar_image:"",subscriptions:[],paid:!1},paid:{uuid:"7dcc8939-3be0-4ac8-a363-96d19f909de6",email:"jamie@example.com",name:"Jamie Larson",firstname:"Jamie",avatar_image:"",subscriptions:[{id:"sub_HCLyRzHcGciDWJ",customer:{id:"cus_HCLy4Y3eLt50YJ",name:null,email:"jamie@example.com"},plan:{id:"fd43b943666b97640188afb382cca39479de30f799985679dd7a71ad2925ac6c",nickname:"Yearly",interval:"year",amount:1500,currency:"USD"},status:"active",start_date:"2019-05-01T11:42:40.000Z",default_payment_card_last4:"4242",cancel_at_period_end:!1,current_period_end:"2021-06-05T11:42:40.000Z"}],paid:!0},complimentary:{uuid:"67906ee2-c80f-4b61-9c9b-6b98c5d3a195",email:"jamie@example.com",name:"Jamie Larson",firstname:"Jamie",subscribed:!0,subscriptions:[{id:"sub_HxAis4368CZIuX",customer:{id:"cus_HxAiVNQ8C3MdAN",name:null,email:"jamie@example.com"},plan:{id:"d46f4d6de40f9bb47c86b8c9abb8285182f0b10f3ac05b5ba8633417ecac2746",nickname:"Complimentary",amount:0,interval:"year",currency:"USD"},status:"active",start_date:"2020-09-03T11:12:37.000Z",default_payment_card_last4:null,cancel_at_period_end:!1,current_period_end:"2021-09-03T11:12:37.000Z"}],paid:!0},preview:{uuid:"7dcc8939-3be0-4ac8-a363-96d19f909de6",email:"jamie@example.com",name:"Jamie Larson",firstname:"Jamie",avatar_image:"",subscriptions:[{id:"sub_HCLyRzHcGciDWJ",customer:{id:"cus_HCLy4Y3eLt50YJ",name:null,email:"jamie@example.com"},plan:{id:"fd43b943666b97640188afb382cca39479de30f799985679dd7a71ad2925ac6c",nickname:"Yearly",interval:"year",amount:500,currency:"USD"},status:"active",start_date:"2019-05-01T11:42:40.000Z",default_payment_card_last4:"4242",cancel_at_period_end:!1,current_period_end:"2021-06-05T11:42:40.000Z"}],paid:!0}};function qt(e){var n=e.state;return Ie(),{showPopup:!1,lastPage:null,pageQuery:"",popupNotification:null,page:"magiclink"===n.page?"":n.page}}function Kt(){return(Kt=v(g.a.mark((function e(n){var t,r;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.api,r=n.state,e.prev=1,e.next=4,t.member.signout();case 4:return e.abrupt("return",{action:"signout:success"});case 7:return e.prev=7,e.t0=e.catch(1),e.abrupt("return",{action:"signout:failed",popupNotification:Je({type:"signout:failed",autoHide:!1,closeable:!0,state:r,status:"error",message:"Failed to log out, please try again"})});case 10:case"end":return e.stop()}}),e,null,[[1,7]])})))).apply(this,arguments)}function Yt(){return(Yt=v(g.a.mark((function e(n){var t,r,a;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.data,r=n.api,a=n.state,e.prev=1,e.next=4,r.member.sendMagicLink(t);case 4:return e.abrupt("return",{page:"magiclink"});case 7:return e.prev=7,e.t0=e.catch(1),e.abrupt("return",{action:"signin:failed",popupNotification:Je({type:"signin:failed",autoHide:!1,closeable:!0,state:a,status:"error",message:"Failed to log in, please try again"})});case 10:case"end":return e.stop()}}),e,null,[[1,7]])})))).apply(this,arguments)}function Jt(){return(Jt=v(g.a.mark((function e(n){var t,r,a,o,i,l;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.data,r=n.state,a=n.api,e.prev=1,o=t.plan,i=t.email,l=t.name,"free"!==o.toLowerCase()){e.next=8;break}return e.next=6,a.member.sendMagicLink(t);case 6:e.next=10;break;case 8:return e.next=10,a.member.checkoutPlan({plan:o,email:i,name:l});case 10:return e.abrupt("return",{page:"magiclink"});case 13:return e.prev=13,e.t0=e.catch(1),e.abrupt("return",{action:"signup:failed",popupNotification:Je({type:"signup:failed",autoHide:!1,closeable:!0,state:r,status:"error",message:"Failed to sign up, please try again"})});case 16:case"end":return e.stop()}}),e,null,[[1,13]])})))).apply(this,arguments)}function Gt(){return(Gt=v(g.a.mark((function e(n){var t,r,a,o;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.data,r=n.state,a=n.api,e.prev=1,o=t.plan,e.next=5,a.member.checkoutPlan({plan:o,metadata:{checkoutType:"upgrade"}});case 5:e.next=10;break;case 7:return e.prev=7,e.t0=e.catch(1),e.abrupt("return",{action:"checkoutPlan:failed",popupNotification:Je({type:"checkoutPlan:failed",autoHide:!1,closeable:!0,state:r,status:"error",message:"Failed to process checkout, please try again"})});case 10:case"end":return e.stop()}}),e,null,[[1,7]])})))).apply(this,arguments)}function Xt(){return(Xt=v(g.a.mark((function e(n){var t,r,a,o,i,l,u,c;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.data,r=n.state,a=n.api,e.prev=1,o=t.plan,i=t.subscriptionId,l=t.cancelAtPeriodEnd,e.next=5,a.member.updateSubscription({planName:o,subscriptionId:i,cancelAtPeriodEnd:l});case 5:return e.next=7,a.member.sessionData();case 7:return u=e.sent,c="updateSubscription:success",e.abrupt("return",{action:c,popupNotification:Je({type:c,autoHide:!0,closeable:!0,state:r,status:"success",message:"Subscription plan updated successfully"}),page:"accountHome",member:u});case 12:return e.prev=12,e.t0=e.catch(1),e.abrupt("return",{action:"updateSubscription:failed",popupNotification:Je({type:"updateSubscription:failed",autoHide:!1,closeable:!0,state:r,status:"error",message:"Failed to update subscription, please try again"})});case 15:case"end":return e.stop()}}),e,null,[[1,12]])})))).apply(this,arguments)}function Zt(){return(Zt=v(g.a.mark((function e(n){var t,r,a,o,i,l,u;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.data,r=n.state,a=n.api,e.prev=1,o=t.subscriptionId,i=t.cancelAtPeriodEnd,l=t.cancellationReason,e.next=5,a.member.updateSubscription({subscriptionId:o,cancelAtPeriodEnd:i,cancellationReason:l});case 5:return e.next=7,a.member.sessionData();case 7:return u=e.sent,e.abrupt("return",{action:"cancelSubscription:success",page:"accountHome",member:u});case 12:return e.prev=12,e.t0=e.catch(1),e.abrupt("return",{action:"cancelSubscription:failed",popupNotification:Je({type:"cancelSubscription:failed",autoHide:!1,closeable:!0,state:r,status:"error",message:"Failed to cancel subscription, please try again"})});case 15:case"end":return e.stop()}}),e,null,[[1,12]])})))).apply(this,arguments)}function er(){return(er=v(g.a.mark((function e(n){var t,r,a;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.data,r=n.state,a=n.api,e.prev=1,e.next=4,a.member.editBilling(t);case 4:e.next=9;break;case 6:return e.prev=6,e.t0=e.catch(1),e.abrupt("return",{action:"editBilling:failed",popupNotification:Je({type:"editBilling:failed",autoHide:!1,closeable:!0,state:r,status:"error",message:"Failed to update billing information, please try again"})});case 9:case"end":return e.stop()}}),e,null,[[1,6]])})))).apply(this,arguments)}function nr(){return(nr=v(g.a.mark((function e(){return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{popupNotification:null});case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function tr(){return(tr=v(g.a.mark((function e(n){var t,r,a,o,i,l;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.data,r=n.state,a=n.api,e.prev=1,o=t.subscribed,e.next=5,a.member.update({subscribed:o});case 5:if(i=e.sent){e.next=8;break}throw new Error("Failed to update newsletter");case 8:return l="updateNewsletter:success",e.abrupt("return",{action:l,member:i,popupNotification:Je({type:l,autoHide:!0,closeable:!0,state:r,status:"success",message:"Email newsletter settings updated"})});case 12:return e.prev=12,e.t0=e.catch(1),e.abrupt("return",{action:"updateNewsletter:failed",popupNotification:Je({type:"updateNewsletter:failed",autoHide:!0,closeable:!0,state:r,status:"error",message:"Failed to update newsletter settings"})});case 15:case"end":return e.stop()}}),e,null,[[1,12]])})))).apply(this,arguments)}function rr(e){return ar.apply(this,arguments)}function ar(){return(ar=v(g.a.mark((function e(n){var t,r,a,o,i;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.data,r=n.state,a=n.api,o=t.email,i=$e({member:r.member}),o===i){e.next=13;break}return e.prev=4,e.next=7,a.member.sendMagicLink({email:o,oldEmail:i,emailType:"updateEmail"});case 7:return e.abrupt("return",{success:!0});case 10:return e.prev=10,e.t0=e.catch(4),e.abrupt("return",{success:!1,error:e.t0});case 13:return e.abrupt("return",null);case 14:case"end":return e.stop()}}),e,null,[[4,10]])})))).apply(this,arguments)}function or(e){return ir.apply(this,arguments)}function ir(){return(ir=v(g.a.mark((function e(n){var t,r,a,o,i;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.data,r=n.state,a=n.api,o=t.name,qe({member:r.member})===o){e.next=16;break}return e.prev=4,e.next=7,a.member.update({name:o});case 7:if(i=e.sent){e.next=10;break}throw new Error("Failed to update member");case 10:return e.abrupt("return",{member:i,success:!0});case 13:return e.prev=13,e.t0=e.catch(4),e.abrupt("return",{success:!1,error:e.t0});case 16:return e.abrupt("return",null);case 17:case"end":return e.stop()}}),e,null,[[4,13]])})))).apply(this,arguments)}function lr(){return(lr=v(g.a.mark((function e(n){var t,r,a;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.state,r=n.api,!t.member){e.next=14;break}return e.prev=2,e.next=5,r.member.sessionData();case 5:if(!(a=e.sent)){e.next=8;break}return e.abrupt("return",{member:a,success:!0});case 8:return e.abrupt("return",null);case 11:return e.prev=11,e.t0=e.catch(2),e.abrupt("return",{success:!1,error:e.t0});case 14:return e.abrupt("return",null);case 15:case"end":return e.stop()}}),e,null,[[2,11]])})))).apply(this,arguments)}function ur(){return(ur=v(g.a.mark((function e(n){var t,r,a,o,i,l,u,s,p,f,h,m,b,v;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.data,r=n.state,a=n.api,e.next=3,Promise.all([or({data:t,state:r,api:a}),rr({data:t,state:r,api:a})]);case 3:if(o=e.sent,i=c(o,2),l=i[0],u=i[1],!l||!u){e.next=14;break}if(!u.success){e.next=10;break}return e.abrupt("return",d(d({action:"updateProfile:success"},l.success?{member:l.member}:{}),{},{page:"accountHome",popupNotification:Je({type:"updateProfile:success",autoHide:!0,closeable:!0,status:"success",state:r,message:"Check your inbox to verify email update"})}));case 10:return s=l.success?"Failed to send verification email":"Failed to update account data",e.abrupt("return",d(d({action:"updateProfile:failed"},l.success?{member:l.member}:{}),{},{popupNotification:Je({type:"updateProfile:failed",autoHide:!0,closeable:!0,status:"error",message:s,state:r})}));case 14:if(!l){e.next=21;break}return p=l.success?"updateProfile:success":"updateProfile:failed",f=l.success?"success":"error",h=l.success?"Account details updated successfully":"Failed to update account details",e.abrupt("return",d(d(d({action:p},l.success?{member:l.member}:{}),l.success?{page:"accountHome"}:{}),{},{popupNotification:Je({type:p,autoHide:l.success,closeable:!0,status:f,state:r,message:h})}));case 21:if(!u){e.next=26;break}return m=u.success?"updateProfile:success":"updateProfile:failed",b=u.success?"success":"error",v=u.success?"Check your inbox to verify email update":"Failed to send verification email",e.abrupt("return",d(d({action:m},u.success?{page:"accountHome"}:{}),{},{popupNotification:Je({type:m,autoHide:u.success,closeable:!0,status:b,state:r,message:v})}));case 26:return e.abrupt("return",{action:"updateProfile:success",page:"accountHome",popupNotification:Je({type:"updateProfile:success",autoHide:!0,closeable:!0,status:"success",state:r,message:"Account details updated successfully"})});case 27:case"end":return e.stop()}}),e)})))).apply(this,arguments)}d(d({},Vt),{},{portal_plans:["free","monthly","yearly"]});var cr={togglePopup:function(e){return{showPopup:!e.state.showPopup}},openPopup:function(e){var n=e.data;return d({showPopup:!0,page:n.page},n.pageQuery?{pageQuery:n.pageQuery}:{})},closePopup:qt,switchPage:function(e){var n=e.data;return{page:n.page,popupNotification:null,lastPage:n.lastPage||null}},openNotification:function(e){return d({showNotification:!0},e.data)},closeNotification:function(e){return e.state,{showNotification:!1}},back:function(e){var n=e.state;return n.lastPage?{page:n.lastPage}:qt({state:n})},signout:function(e){return Kt.apply(this,arguments)},signin:function(e){return Yt.apply(this,arguments)},signup:function(e){return Jt.apply(this,arguments)},updateSubscription:function(e){return Xt.apply(this,arguments)},cancelSubscription:function(e){return Zt.apply(this,arguments)},updateNewsletter:function(e){return tr.apply(this,arguments)},updateProfile:function(e){return ur.apply(this,arguments)},refreshMemberData:function(e){return lr.apply(this,arguments)},clearPopupNotification:function(){return nr.apply(this,arguments)},editBilling:function(e){return er.apply(this,arguments)},checkoutPlan:function(e){return Gt.apply(this,arguments)}};function sr(e){return pr.apply(this,arguments)}function pr(){return(pr=v(g.a.mark((function e(n){var t,r,a,o,i;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.action,r=n.data,a=n.state,o=n.api,!(i=cr[t])){e.next=9;break}return e.next=5,i({data:r,state:a,api:o});case 5:if(e.t0=e.sent,e.t0){e.next=8;break}e.t0={};case 8:return e.abrupt("return",e.t0);case 9:return e.abrupt("return",{});case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}t(13);var fr=t(0),dr={showPopup:!0,site:Vt,member:$t.paid,page:"accountHome"},hr=function(e){E(t,e);var n=_(t);function t(e){var r;return y(this,t),r=n.call(this,e),e.testState||r.setupCustomTriggerButton(),r.state=e.testState||{site:null,member:null,page:"loading",showPopup:!1,action:"init:running",initStatus:"running",lastPage:null},r}return w(t,[{key:"componentDidMount",value:function(){this.props.testState||this.initSetup()}},{key:"componentDidUpdate",value:function(e,n){n.showPopup!==this.state.showPopup&&this.handleCustomTriggerClassUpdate()}},{key:"componentWillUnmount",value:function(){var e=this;clearTimeout(this.timeoutId),this.customTriggerButtons&&this.customTriggerButtons.forEach((function(n){n.removeEventListener("click",e.clickHandler)}))}},{key:"setupCustomTriggerButton",value:function(){var e=this;this.clickHandler=function(n){n.preventDefault();var t=n.currentTarget,r=t&&t.dataset.portal,a=e.getPageFromLinkPath(r)||{},o=a.page,i=a.pageQuery;"success"===e.state.initStatus&&!e.state.member&&["monthly","yearly"].includes(i)&&We({site:e.state.site,plan:i})&&(Ie(),e.onAction("signup",{plan:Qe(i)})),o&&e.onAction("openPopup",{page:o,pageQuery:i})},this.customTriggerButtons=document.querySelectorAll("[data-portal]")||[],this.customTriggerButtons.forEach((function(n){n.classList.add("gh-portal-close"),n.removeEventListener("click",e.clickHandler),n.addEventListener("click",e.clickHandler)}))}},{key:"handleCustomTriggerClassUpdate",value:function(){var e=this;this.customTriggerButtons.forEach((function(n){var t=e.state.showPopup?"gh-portal-open":"gh-portal-close",r=e.state.showPopup?"gh-portal-close":"gh-portal-open";n.classList.add(t),n.classList.remove(r)}))}},{key:"initSetup",value:function(){var e=v(g.a.mark((function e(){var n,t,r,a,o,i,l,u,c,s=this;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.fetchData();case 3:n=e.sent,t=n.site,r=n.member,a=n.page,o=n.showPopup,i=n.popupNotification,l=n.lastPage,u=n.pageQuery,c={site:t,member:r,page:a,lastPage:l,pageQuery:u,showPopup:o,popupNotification:i,action:"init:success",initStatus:"success"},!r&&["monthly","yearly"].includes(u)&&We({site:t,plan:u})&&(Ie(),this.onAction("signup",{plan:Qe(u)})),this.setState(c),this.hashHandler=function(){s.updateStateForPreviewLinks()},window.addEventListener("hashchange",this.hashHandler,!1),e.next=22;break;case 18:e.prev=18,e.t0=e.catch(0),console.error("[Portal] Failed to initialize:",e.t0),this.setState({action:"init:failed",initStatus:"failed"});case 22:case"end":return e.stop()}}),e,this,[[0,18]])})));return function(){return e.apply(this,arguments)}}()},{key:"fetchData",value:function(){var e=v(g.a.mark((function e(){var n,t,r,a,o,i,l,u,c,s,p,f,m,b,v;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.fetchApiData();case 2:return n=e.sent,t=n.site,r=n.member,a=this.fetchDevData(),o=a.site,i=h(a,["site"]),l=this.fetchLinkData(),u=l.site,c=h(l,["site"]),s=this.fetchPreviewData(),p=s.site,f=h(s,["site"]),m=this.fetchNotificationData(),b=m.site,v=h(m,["site"]),e.abrupt("return",d(d(d(d({member:r,page:"",site:d(d(d(d(d(d({},t),u),p),b),o),{},{plans:d(d(d({},(o||{}).plans),(t||{}).plans),(p||{}).plans)})},i),c),v),f));case 11:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"fetchDevData",value:function(){return tn(["dev"])?dr:{}}},{key:"fetchQueryStrData",value:function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=new URLSearchParams(n),r={site:{plans:{}}},a=[],o=s(t.entries());try{for(o.s();!(e=o.n()).done;){var i=e.value,l=i[0],u=decodeURIComponent(i[1]);if("button"===l)r.site.portal_button=JSON.parse(u);else if("name"===l)r.site.portal_name=JSON.parse(u);else if("isFree"===l&&JSON.parse(u))a.push("free");else if("isMonthly"===l&&JSON.parse(u))a.push("monthly");else if("isYearly"===l&&JSON.parse(u))a.push("yearly");else if("plans"===l)r.site.portal_plans=u?u.split(","):[];else if("page"===l&&u)r.page=u;else if("accentColor"!==l||""!==u&&!u)if("buttonIcon"===l&&u)r.site.portal_button_icon=u;else if("signupButtonText"===l)r.site.portal_button_signup_text=u||"";else if("buttonStyle"===l&&u)r.site.portal_button_style=u;else if("monthlyPrice"!==l||isNaN(Number(u)))if("yearlyPrice"!==l||isNaN(Number(u)))if("currency"===l&&u){var c=u.toUpperCase();r.site.plans.currency=c,r.site.plans.currency_symbol=Ke(c)}else"disableBackground"===l&&JSON.parse(u)&&(r.site.disableBackground=JSON.parse(u));else r.site.plans.yearly=Number(u);else r.site.plans.monthly=Number(u);else r.site.accent_color=u}}catch(e){o.e(e)}finally{o.f()}return r.site.portal_plans=a,r}},{key:"fetchNotificationData",value:function(){var e=Le({billingOnly:!0})||{},n=e.type,t=e.status,r=e.duration,a=e.autoHide,o=e.closeable;return["stripe:billing-update"].includes(n)?"success"===t?{showPopup:!0,popupNotification:Je({type:n,status:t,duration:r,closeable:o,autoHide:a,state:this.state,message:"success"===t?"Billing info updated successfully":""})}:{showPopup:!0}:{}}},{key:"fetchLinkData",value:function(){var e=c(window.location.hash.substr(1).split("?"),1)[0],n=/^\/portal\/?(?:\/(\w+(?:\/\w+)?))?\/?$/;if(e&&n.test(e)){var t=c(e.match(n),2)[1],r=this.getPageFromLinkPath(t)||{},a=r.page,o=r.pageQuery,i=["accountPlan","accountProfile"].includes(a)?"accountHome":null;return d(d(d({showPopup:!["monthly","yearly"].includes(o)},a?{page:a}:{}),o?{pageQuery:o}:{}),i?{lastPage:i}:{})}return{}}},{key:"fetchPreviewData",value:function(){var e=c(window.location.hash.substr(1).split("?"),2)[1];if(tn(["preview"])){var n=this.fetchQueryStrData(e);return n.showPopup=!0,n}return{}}},{key:"getColorOverride",value:function(){var e=document.querySelector("script[data-ghost]");return!(!e||!e.dataset.accentColor)&&e.dataset.accentColor}},{key:"fetchApiData",value:function(){var e=v(g.a.mark((function e(){var n,t,r,a,o;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=this.props.siteUrl,this.GhostApi=Qt({siteUrl:n}),e.next=5,this.GhostApi.init();case 5:return t=e.sent,r=t.site,a=t.member,this.setupFirstPromoter({site:r,member:a}),(o=this.getColorOverride())&&(r.accent_color=o),e.abrupt("return",{site:r,member:a});case 14:if(e.prev=14,e.t0=e.catch(0),!tn(["dev","test"])){e.next=18;break}return e.abrupt("return",{});case 18:throw e.t0;case 19:case"end":return e.stop()}}),e,this,[[0,14]])})));return function(){return e.apply(this,arguments)}}()},{key:"setupFirstPromoter",value:function(e){var n=e.site,t=e.member,r=function(e){var n=e.site;return n&&n.firstpromoter_id}({site:n}),a=function(e){var n=e.site;try{return new URL(n.url).origin.replace(/^http(s?):\/\//,"").replace(/\/$/,"")}catch(e){return n.url.replace(/^http(s?):\/\//,"").replace(/\/$/,"")}}({site:n});if(r&&a){var o=document.createElement("script");o.type="text/javascript",o.async=!0,o.src="https://cdn.firstpromoter.com/fprom.js",o.onload=o.onreadystatechange=function(){var e=this.readyState;if(!e||"complete"===e||"loaded"===e)try{if(window.$FPROM.init(r,a),t){var n=t.email,o=t.uuid;if(window.$FPROM)window.$FPROM.trackSignup({email:n,uid:o});else{var i=window._fprom||[];window._fprom=i,i.push(["event","signup"]),i.push(["email",n]),i.push(["uid",o])}}}catch(e){}};var i=document.getElementsByTagName("script")[0];i.parentNode.insertBefore(o,i)}}},{key:"onAction",value:function(){var e=v(g.a.mark((function e(n,t){var r,a,o=this;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return clearTimeout(this.timeoutId),this.setState({action:"".concat(n,":running")}),e.prev=2,e.next=5,sr({action:n,data:t,state:this.state,api:this.GhostApi});case 5:r=e.sent,this.setState(r),r&&r.action&&!r.action.includes(":failed")&&(this.timeoutId=setTimeout((function(){o.setState({action:""})}),2e3)),e.next=14;break;case 10:e.prev=10,e.t0=e.catch(2),a=Je({type:"".concat(n,":failed"),autoHide:!0,closeable:!0,status:"error",state:this.state,meta:{error:e.t0}}),this.setState({action:"".concat(n,":failed"),popupNotification:a});case 14:case"end":return e.stop()}}),e,this,[[2,10]])})));return function(n,t){return e.apply(this,arguments)}}()},{key:"updateStateForPreviewLinks",value:function(){var e=this.fetchPreviewData(),n=e.site,t=h(e,["site"]),r=this.fetchLinkData(),a=r.site,o=h(r,["site"]),i=d(d({site:d(d(d(d({},this.state.site),a||{}),n||{}),{},{plans:d(d(d({},this.state.site&&this.state.site.plans),(a||{}).plans),(n||{}).plans)})},o),t);!this.state.member&&["monthly","yearly"].includes(i.pageQuery)&&We({site:i.site,plan:i.pageQuery})&&(Ie(),this.onAction("signup",{plan:Qe(i.pageQuery)})),this.setState(i)}},{key:"getStripeUrlParam",value:function(){var e=new URL(window.location.href);return e.searchParams.get("stripe")||e.searchParams.get("portal-stripe")}},{key:"getPageFromPath",value:function(e){return"signup"===e?"signup":"signin"===e?"signin":"account"===e?"accountHome":"account/plans"===e?"accountPlan":"account/profile"===e?"accountProfile":void 0}},{key:"getPageFromLinkPath",value:function(e){return"signup"===e?{page:"signup"}:"signup/free"===e?{page:"signup",pageQuery:"free"}:"signup/monthly"===e?{page:"signup",pageQuery:"monthly"}:"signup/yearly"===e?{page:"signup",pageQuery:"yearly"}:"signin"===e?{page:"signin"}:"account"===e?{page:"accountHome"}:"account/plans"===e?{page:"accountPlan"}:"account/profile"===e?{page:"accountProfile"}:{}}},{key:"getAccentColor",value:function(){var e=(this.state.site||{}).accent_color;return(void 0===e?"#15171A":e)||"#15171A"}},{key:"getContextPage",value:function(e){var n=e.page,t=e.member;return n||(n=t?"accountHome":"signup"),"accountPlan"===n&&Me({member:t})&&(n="accountHome"),Rt({page:n})}},{key:"getContextMember",value:function(e){var n=e.page,t=e.member;return tn(["dev","preview"])?{page:n}.page.includes("account")?tn(["dev"])?t||$t.free:tn(["preview"])?$t.preview:$t.paid:null:t}},{key:"getContextFromState",value:function(){var e=this,n=this.state,t=n.site,r=n.member,a=n.action,o=n.page,i=n.lastPage,l=n.showPopup,u=n.pageQuery,c=n.popupNotification,s=this.getContextPage({page:o,member:r}),p=this.getContextMember({page:s,member:r});return{site:t,action:a,brandColor:this.getAccentColor(),page:s,pageQuery:u,member:p,lastPage:i,showPopup:l,popupNotification:c,onAction:function(n,t){return e.onAction(n,t)}}}},{key:"render",value:function(){return"success"===this.state.initStatus?fr.createElement(M.Provider,{value:this.getContextFromState()},fr.createElement(Wt,null),fr.createElement(fe,null),fr.createElement(en,null)):null}}]),t}(fr.Component),mr=t(14);!function(){var e=function(){var e=document.querySelector("script[data-ghost]");return e?e.dataset.ghost:""}()||window.location.origin;(function(e){var n=e.siteUrl;!function(){var e=document.createElement("div");e.id="ghost-portal-root",document.body.appendChild(e)}(),mr({siteUrl:n}),function(){var e=new URL(window.location.href);e.searchParams.get("token")&&(e.searchParams.delete("token"),window.history.replaceState({},document.title,e.href))}()})({siteUrl:e}),i.a.render(a.a.createElement(a.a.StrictMode,null,a.a.createElement(hr,{siteUrl:e})),document.getElementById("ghost-portal-root"))}()}])}]);
The open-plan office hijacks your brain
Remember the office? For many of us, the pre-pandemic workplace assumed a particular form: an open-plan space featuring few partitions, where we worked, or tried to work, as others tapped and talked around us. The office resembled nothing so much as a bustling coffee shop, and this was no accident: The coffee shop, a place where people have serendipitous encounters and spontaneous conversations, was the space on which influential thinkers believed the modern office should be modeled. a group of people sitting at a table with a laptop: Open plans like this have come to dominate many offices, partly because they’re cheaper. But they’re not necessarily great for creative work. © mooshny - Fotolia Open plans like this have come to dominate many offices, partly because they’re cheaper. But they’re not…
Writer Steven Johnson, for example — author of books like “Where Good Ideas Come From” — has argued that these buzzy gathering places “fertilized countless Enlightenment-era innovations; everything from the science of electricity to the insurance industry to democracy itself.” New ideas, he maintained, arise out of “the collisions that happen when different fields of expertise converge in some shared physical or intellectual space.” Leaders and managers seized on this notion. Get people to “collide” with one another, the thinking went, and magic will happen. How better to promote collisions than to remove the physical barriers that would keep them from happening? (The fact that open-plan spaces are cheaper than enclosed offices also helps explain the trend.) Before the pandemic, roughly three-fourths of American office workers labored in open-plan configurations.
But the coffee shop was always a terrible model for a place in which complex, cognitively demanding work is to be carried out. That’s because the conditions created by the open-plan workspace are in direct conflict with the unalterable realities of human biology. The brain evolved to continually monitor its immediate environment — to be, in effect, distractible, lest nearby sounds or movements signal a danger to be avoided or an opportunity to be seized. And organizational environments are full of the kind of stimuli that distract us the most: We are attuned to human movement and activity, to the sound of people’s speech, and to the nuances of social interactions.
In addition, the coffee shop is by design a generic space, intended for temporary use. A customer occupies a table for a few minutes or hours and then turns it over for the next customer to use. This feature, too, is far from ideal when applied to a workplace to which employees return day after day. Research has demonstrated that a sense of ownership and control over one’s personal space, along with the display of photos and other cues of identity and affiliation meaningful to their owner, help people work more efficiently and productively.
History gave us the model of the coffeehouse, but it has other models to offer. The disruption introduced by the COVID-19 pandemic has provided an opportunity to examine whether an alternative might better fit our needs.
For example: the ancient monastery. In the popular imagination, monks are solitary, hermit-like creatures — but historically they have lived within a communal setting that balanced time spent alone in study and contemplation with time spent with others in robust social interaction. Richard Irvine, an anthropologist at the University of Cambridge, explored this equilibrium in an ethnographic study he conducted at Downside Abbey, a Benedictine monastery in Somerset, England, where the way of life has remained little changed for centuries.
In describing the abbey’s architecture, Irvine observes that the buildings reflect their inhabitants’ daily cycles of intense engagement and hushed withdrawal, accommodating communal spaces like the library, the refectory, the workshop, and the courtyard, as well as the monks’ solitary cells. “While the monastery is the site of frequent interpersonal encounter, the importance of solitude is also structured into the timetable through the commitment to twice-daily private prayer, as well as the summum silentium (complete silence, sometimes referred to as ‘the great silence’) at the end of the day,” Irvine explains. This silence “restricts interaction and gives the monk opportunity to be alone.” (He notes that members of the community have available to them another way of limiting interaction: They can pull up the hood of their vestment, making them “less inclined to distraction from other people.”)
The monks of Downside Abbey could be said to be practicing what present-day organizational scientists call “intermittent collaboration.” Research has demonstrated that complex problem-solving tends to proceed in two stages, the first of which entails gathering the facts we need to clarify the nature of the problem and begin constructing a solution. In this stage, communication and collaboration are essential. But there is a second phase, equally vital: the process of generating and developing solutions and figuring out which of these solutions is best. During this phase, studies find, excessive collaboration is actually detrimental.
The reason can be found in our nature as a group-dwelling species. We are exquisitely sensitive to social pressure, easily drawn into consensus and conformity. When we’re constantly in touch with others, we all end up gravitating toward the same pretty-good-but-not-great answers. Research finds that people who keep lines of communication perpetually open consistently generate middling solutions — nothing terrible, but nothing exceptional either. Meanwhile, people who isolate themselves during the solution-generation phase tend to come up with a few truly extraordinary solutions — along with a lot of losers. The best of all worlds is enjoyed by those who engage in cycles of sociable interaction and quiet focus: a process that could be facilitated by the physical spaces in which we work.
Another promising model drawn from history can be viewed today at New York’s Metropolitan Museum of Art. This is a tiny gem of a room, re-creating a space in 15th-century Perugia: the studiolo of Federico da Montefeltro, Duke of Urbino. Federico, whose title called on him to be variously a royal, a politician, and a warrior, lived in the town of Gubbio in what is now central Italy. The walls of the study allowed the duke, a lover of literature, architecture, and mathematics, to retreat into quiet study and contemplation, away from the company of the townspeople he ruled.
And because his studiolo was constructed in Renaissance Italy, these were no ordinary walls. Craftsmen from Siena, Florence, and Naples created elaborate trompe l’oeil murals made entirely of inlaid wood — a technique called intarsia. In slivers of rosewood, oak, and beech, these designs depict in precise detail (and in linear perspective, a then newly invented technique) simulated cabinets full of precious objects — each one a symbol of what the duke most admired and to which he most aspired. A lute and a harp showed he was a man of culture; a mace and a pair of spurs represented his skill in battle; a bound volume of Virgil’s “Aeneid” was a sign of his erudition. Incorporated into every corner of the space were mottos and motifs that represented the duke’s personal, familial, and regional identity.
Such self-referential images and messages are not mere decorations — whether they’re built into the paneling of a duke’s splendidly outfitted retreat or tacked to the walls of an office worker’s cubicle. Research shows that in the presence of cues of identity and cues of affiliation, people perform better: They’re more motivated and more productive. Such displays may sometimes be aimed at informing other people of who we are (or who we’d like to be), but often they are intended for a more intimate audience: ourselves.
For a study published in the Academy of Management Journal, researchers examined the workspaces of people holding a variety of jobs — from engineer to event planner, from creative director to real estate agent. The investigators found that about one-third of the personal tokens these professionals had incorporated into their workspaces were positioned so as to be visible only to them. Of the objects whose stated purpose for their owners was “reminding them of their goals and values,” 70 percent were placed out of the sight of others.
Why would we need such reminders? While our sense of self may feel stable and solid, it is in fact quite fluid, dependent on external structure for its shape. The material things we arrange around us help us maintain that sturdy self-conception. As the psychologist Mihaly Csikszentmihalyi has written, we keep certain objects in view because “they tell us things about ourselves that we need to hear in order to keep our selves from falling apart.”
Moreover, we need to have close at hand those prompts that highlight particular facets of our identity. Each of us has not one identity but many — worker, student, spouse, parent, friend — and different environmental cues evoke different identities. Daphna Oyserman, a psychologist at the University of Southern California, notes that signals from the environment function to bring one of these many personas to the fore, with real effects on our thought and behavior. “Which identity is salient in the moment influences both what one pays attention to and what one chooses to do,” she writes.
Physical spaces powerfully shape the way we think and behave. History offers us a profusion of models on which to base our workplaces, and we should choose carefully the ones we adopt.
Annie Murphy Paul is the author of “The Extended Mind: The Power of Thinking Outside the Brain,” from which this essay is adapted.
Aliens are our circus in bread & circus. Don’t think about the stolen 2020 election, uniparty control of the media, corporate capture of our regulatory agencies and politicians, impending inflation, southern border disaster, persistant BLM riots etc. etc. Instead, think of aliens.
Some reality from Quillette :
The laws of Physics: Travel from another star in any reasonable time requires near-light speed travel. A ship propelled by onboard conventional rocket fuel would require more fuel than there is mass in the visible universe to accelerate to near light speed and slow down at the end of the voyage, so clearly some more advanced fuel would be required. But even using nuclear fusion one would use more than 2,000 times the mass of the ship in fuel for each acceleration and deceleration to and from near-light speed. Basic physics constraints imply that any on-board propulsion technology that could power a conventional ship-sized spacecraft to travel from one solar system to another at near light speed and decelerate it within our solar system would require using energy that is comparable to the entire amount of power used by all of humanity at the current time. Hard to imagine any civilization devoting such extensive resources to visit us only to hang around secretly spying on aircraft carriers, or abducting humans to perform kinky experiments.
It only hurts when you stop: Some reports claim UAPs travel extremely fast and stop or turn instantly. No matter what the propulsion system, g-forces experienced in such a maneuver would be enough to crush steel, not to mention the unfortunate aliens inside. That is, unless one had “inertial dampers” like they have in Star Trek, which, alas, are science fiction technobabble.
The Lunar Module was ugly for a reason: Moving in space and traveling in our atmosphere are two different things. There is no reason to have fancy aerodynamics in space because there isn’t any atmosphere to have dynamics in. Whatever craft you travel in through the galaxy will not be the same type of craft you would want to design to perform aerial acrobatics in on Earth.
Why here?: Most Stars in the galaxy are older than our sun so it is reasonable to suspect that an advanced civilization, if such civilizations survive periods like the one we are now living in, would have been able to observe the Earth since its formation. But over the past 4.5 billion years, we have only been sending out signals of technological intelligence for a century or so, meaning that observing Earth at any random time since it formed, one would only have a one in 50 million chance of detecting life here. Moreover, since our radio and TV signals have only been traveling at light speed for 100 years, any civilization that detected such signals would have to be: (a) close by, and (b) ready to immediately launch a massive, complex, and expensive light speed mission to Earth in order to have made it here by now. And that is if they were lucky enough to detect our signals in the first place. There are an infinite number of frequencies to search, and as anyone who has cable TV knows, where there are only perhaps 400 channels to scan, one generally has a hard time finding what one is looking for before the program one is seeking is over.
Why travel in the first place: In this pandemic era, many of us have learned that it is a lot easier to have a ZOOM meeting than to try to embark on air travel across international lines. This is particularly true for space travel. It is far, far easier to both search for extraterrestrial intelligences by listening for signals, or to attempt to communicate with other galactic species by cleverly sending signals, than it is to try and bridge the gap with spacecraft. If we are ever to learn about intelligent aliens, it won’t be by meeting them in the air, but by listening or watching the heavens. Even that is a longshot, but at least is possible. That truth goes for aliens as well as for us.
Twitter Link
I think I’ve had discussions w/enough Boomer-tier Trump supporters who believe the 2020 election was fraudulent to extract a general theory about their perspective. It is also the perspective of most of the people at the Capitol on 1/6, and probably even Trump himself. 1/x
Most believe some or all of the theories involving midnight ballots, voting machines, etc, but what you find when you talk to them is that, while they’ll defend those positions w/info they got from Hannity or Breitbart or whatever, they’re not particularly attached to them. 2/x
Here are the facts - actual, confirmed facts - that shape their perspective: 1) The FBI/etc spied on the 2016 Trump campaign using evidence manufactured by the Clinton campaign. We now know that all involved knew it was fake from Day 1 (see: Brennan’s July 2016 memo, etc). 3/x
These are Tea Party people. The types who give their kids a pocket Constitution for their birthday and have Founding Fathers memes in their bios. The intel community spying on a presidential campaign using fake evidence (incl forged documents) is a big deal to them. 4/x
Everyone involved lied about their involvement as long as they could. We only learned the DNC paid for the manufactured evidence because of a court order. Comey denied on TV knowing the DNC paid for it, when we have emails from a year earlier proving that he knew. 5/x
This was true with everyone, from CIA Dir Brennan & Adam Schiff - who were on TV saying they’d seen clear evidence of collusion w/Russia, while admitting under oath behind closed doors that they hadn’t - all the way down the line. In the end we learned that it was ALL fake. 6/x
At first, many Trump ppl were worried there must be some collusion, because every media & intel agency wouldn’t make it up out of nothing. When it was clear that they had made it up, people expected a reckoning, and shed many illusions about their gov’t when it didn’t happen. 7/x
We know as fact: a) The Steele dossier was the sole evidence used to justify spying on the Trump campaign, b) The FBI knew the Steele dossier was a DNC op, c) Steele’s source told the FBI the info was unserious, d) they did not inform the court of any of this and kept spying. 8/x
Trump supporters know the collusion case front and back. They went from worrying the collusion must be real, to suspecting it might be fake, to realizing it was a scam, then watched as every institution - agencies, the press, Congress, academia - gaslit them for another year. 9/x
Worse, collusion was used to scare people away from working in the administration. They knew their entire lives would be investigated. Many quit because they were being bankrupted by legal fees. The DoJ, press, & gov’t destroyed lives and actively subverted an elected admin. 10/x
This is where people whose political identity was largely defined by a naive belief in what they learned in Civics class began to see the outline of a Regime that crossed all institutional boundaries. Because it had stepped out of the shadows to unite against an interloper. 11/x
GOP propaganda still has many of them thinking in terms of partisan binaries, but A LOT of Trump supporters see that the Regime is not partisan. They all know that the same institutions would have taken opposite sides if it was a Tulsi Gabbard vs Jeb Bush election. 12/x
It’s hard to describe to people on the left (who are used to thinking of gov’t as a conspiracy… Watergate, COINTELPRO, WMD, etc) how shocking & disillusioning this was for people who encourage their sons to enlist in the Army, and hate ppl who don’t stand for the Anthem. 13/x
They could have managed the shock if it only involved the government. But the behavior of the corporate press is really what radicalized them. They hate journalists more than they hate any politician or gov’t official, because they feel most betrayed by them. 14/x
The idea that the press is driven by ratings/sensationalism became untenable. If that were true, they’d be all over the Epstein story. The corporate press is the propaganda arm of the Regime they now see in outline. Nothing anyone says will ever make them unsee that, period. 15/x
This is profoundly disorienting. Many of them don’t know for certain whether ballots were faked in November 2020, but they know for absolute certain that the press, the FBI, etc would lie to them if there was. They have every reason to believe that, and it’s probably true. 16/x
They watched the press behave like animals for four years. Tens of millions of people will always see Kavanaugh as a gang rapist, based on nothing, because of CNN. And CNN seems proud of that. They led a lynch mob against a high school kid. They cheered on a summer of riots. 17/x
They always claimed the media had liberal bias, fine, whatever. They still thought the press would admit truth if they were cornered. Now they don’t. It’s a different thing to watch them invent stories whole cloth in order to destroy regular lives and spark mass violence. 18/x
Time Mag told us that during the 2020 riots, there were weekly conference calls involving, among others, leaders of the protests, the local officials who refused to stop them, and media people who framed them for political effect. In Ukraine we call that a color revolution. 19/x
Throughout the summer, Democrat governors took advantage of COVID to change voting procedures. It wasn’t just the mail-ins (they lowered signature matching standards, etc). After the collusion scam, the fake impeachment, Trump ppl expected shenanigans by now. 20/x
Re: “fake impeachment”, we now know that Trump’s request for Ukraine to cooperate w/the DOJ regarding Biden’s $ activities in Ukraine was in support of an active investigation being pursued by the FBI and Ukraine AG at the time, and so a completely legitimate request. 21/x
Then you get the Hunter laptop scandal. Big Tech ran a full-on censorship campaign against a major newspaper to protect a political candidate. Period. Everyone knows it, all of the Tech companies now admit it was a “mistake” - but, ya know, the election’s over, so who cares? 22/x
Goes w/o saying, but: If the NY Times had Don Jr’s laptop, full of pics of him smoking crack and engaging in group sex, lots of lurid family drama, emails describing direct corruption and backed up by the CEO of the company they were using, the NYT wouldn’t have been banned. 23/x
Think back: Stories about Trump being pissed on by Russian prostitutes and blackmailed by Putin were promoted as fact, and the only evidence was a document paid for by his opposition and disavowed by its source. The NY Post was banned for reporting on true information. 24/x
The reaction of Trump ppl to all this was not, “no fair!” That’s how they felt about Romney’s “binders of women” in 2012. This is different. Now they see, correctly, that every institution is captured by ppl who will use any means to exclude them from the political process. 25/x
And yet they showed up in record numbers to vote. He got 13m more votes than in 2016, 10m more than Clinton got! As election night dragged on, they allowed themselves some hope. But when the four critical swing states (and only those states) went dark at midnight, they knew. 26/x
Over the ensuing weeks, they got shuffled around by grifters and media scam artists selling them conspiracy theories. They latched onto one, then another increasingly absurd theory as they tried to put a concrete name on something very real. 27/x
Media & Tech did everything to make things worse. Everything about the election was strange - the changes to procedure, unprecedented mail-in voting, the delays, etc - but rather than admit that and make everything transparent, they banned discussion of it (even in DMs!). 28/x
Everyone knows that, just as Don Jr’s laptop would’ve been the story of the century, if everything about the election dispute was the same, except the parties were reversed, suspicions about the outcome would’ve been Taken Very Seriously. See 2016 for proof. 29/x
Even the courts’ refusal of the case gets nowhere w/them, because of how the opposition embraced mass political violence. They’ll say, w/good reason: What judge will stick his neck out for Trump knowing he’ll be destroyed in the media as a violent mob burns down his house? 30/x
It’s a fact, according to Time Magazine, that mass riots were planned in cities across the country if Trump won. Sure, they were “protests”, but they were planned by the same people as during the summer, and everyone knows what it would have meant. Judges have families, too. 31/x
Forget the ballot conspiracies. It’s a fact that governors used COVID to unconstitutionally alter election procedures (the Constitution states that only legislatures can do so) to help Biden to make up for a massive enthusiasm gap by gaming the mail-in ballot system. 32/x
They knew it was unconstitutional, it’s right there in plain English. But they knew the cases wouldn’t see court until after the election. And what judge will toss millions of ballots because a governor broke the rules? The threat of mass riots wasn’t implied, it was direct. 33/x
a) The entrenched bureaucracy & security state subverted Trump from Day 1, b) The press is part of the operation, c) Election rules were changed, d) Big Tech censors opposition, e) Political violence is legitimized & encouraged, f) Trump is banned from social media. 34/x
They were led down some rabbit holes, but they are absolutely right that their gov’t is monopolized by a Regime that believes they are beneath representation, and will observe no limits to keep them getting it. Trump fans should be happy he lost; it might’ve kept him alive.
« __('prev') 1 … 4 5 6 7 8 … 39 __('next') »
Home
Archives
About
RSS