function VoterVoiceAPI(n,t,i){if(!(this instanceof arguments.callee))throw new Error("Constructor called as a function");this._rootUrl=n;this._apiKey=t;typeof i!="undefined"&&i!==null&&(this._language=i)}function VoterVoiceLogger(n){if(!(this instanceof arguments.callee))throw new Error("Constructor called as a function");this._api=n;vvLatestApi=n}function EmailAddressService(){if(!(this instanceof arguments.callee))throw new Error("Constructor called as a function");}function VoterVoiceApplication(n){if(!(this instanceof arguments.callee))throw new Error("Constructor called as a function");this.__base__(n);this.displayChanged=new VoterVoiceApplication.RepeatEvent;this.waitsChanged=new VoterVoiceApplication.RepeatEvent;this.initializeStates=function(n,t){function i(r){n(r)&&t(r);for(var u in r.states)r.states[u].machine&&i(r.states[u].machine)}if(this.currentState)throw new Error("This StateMachine is already running");i(this)};this.ui={}}function StateMachine(n,t,i){this._context=t===undefined?this:t;this.startState=n.startState;this.states=n.states;this._waits=[];this.waitActivitiesChanged=new VoterVoiceApplication.Event;i===undefined?(this.transitionGuarded=new VoterVoiceApplication.Event,this.transitionStarted=new VoterVoiceApplication.Event,this.promptingForInput=new VoterVoiceApplication.Event,this.transitionFailed=new VoterVoiceApplication.Event,this.stateEntering=new VoterVoiceApplication.Event):(this.transitionGuarded=i.transitionGuarded,this.transitionStarted=i.transitionStarted,this.promptingForInput=i.promptingForInput,this.transitionFailed=i.transitionFailed,this.stateEntering=i.stateEntering);for(var r in this.states)this.states[r].machine!==undefined&&(this.states[r].machine=new StateMachine(this.states[r].machine,this._context,this))}function BillTrackerApplication(n){this._api=n;this._page=0;this.spotlightCategoriesFound=new VoterVoiceApplication.RepeatEvent;this.spotlightsFound=new VoterVoiceApplication.RepeatEvent;this.spotlightsLoaded=new VoterVoiceApplication.RepeatEvent;this.filterSpotlights=new VoterVoiceApplication.RepeatEvent;this.keyLegislationGovernmentsFound=new VoterVoiceApplication.RepeatEvent;this.governmentsFound=new VoterVoiceApplication.RepeatEvent;this.governmentSelected=new VoterVoiceApplication.RepeatEvent;this.keyLegislationGovernmentSelected=new VoterVoiceApplication.RepeatEvent;this.searching=new VoterVoiceApplication.Event;this.legislativeProposalsFound=new VoterVoiceApplication.Event;this.preSearchDisplaySetup=new VoterVoiceApplication.Event;this.openingLegislationFull=new VoterVoiceApplication.RepeatEvent}function VoterVoiceUserInterface(n,t,i){if(!(this instanceof arguments.callee))throw new Error("Constructor called as a function");this._application=n;this._api=t;this.displayUpdaters=[];this.guardMessages={};this.modalDialogs={};this._navigationOverrides={};this._buttonTextTranslations={};this._languageTranslator=i||new VoterVoiceTranslator;try{this.modalOpened=new VoterVoiceApplication.Event}catch(r){}}function LegislationDetail(n){if(!(this instanceof arguments.callee))throw new Error("Constructor called as a function");this.identifier=n.identifier;this.identifierDisplay=n.identifierDisplay;this.sessionDisplayName=n.sessionDisplayName;this.displayTitle=n.identifierDisplay+": "+n.shortTitle;this.fullTitle=n.fullTitle;this.primarySponsors=n.primarySponsors;this.otherSponsors=n.otherSponsors;this.actions=[];for(var t=0;t<n.actions.length;t++)this.actions.push(n.actions[t].display);this.committees=n.committees;this.urls=n.urls;this.relatedProposals=n.relatedProposals;this.governmentAbbreviation=n.governmentAbbreviation}function GovernmentsBinder(n){if(!(this instanceof arguments.callee))throw new Error("Constructor called as a function");this._selector=n}var vvLatestApi;(function(){function i(){t===!1&&(n=window.onerror,window.onerror=r,t=!0)}function r(){window.onerror=n;try{var i="Error Location: "+arguments.callee.caller;vvLatestApi.postLogEntry({severity:"information",message:i})}catch(r){}n&&n.apply(this,arguments);t=!1}function u(n){var u,r,t,o,f,e,s;try{if(u=[],n.stack)for(r=n.stack.split("\n"),t=0;t<r.length;t++)u.push(r[t]);else if(window.opera&&n.message)for(r=n.message.split("\n"),t=0;t<r.length;t++)r[t].match(/^\s*[A-Za-z0-9\-_\$]+\(/)&&(o=r[t],r[t+1]&&(o+=" at "+r[t+1],t++),u.push(o));else for(i(),f=arguments.callee.caller;f;)e=f.toString(),s=e.substring(e.indexOf("function")+8,e.indexOf("("))||"anonymous",u.push(s),f=f.caller;return u}catch(h){return["getStackTrace error: "+h]}}function f(n){var i="getExceptionMessage error",r,t;try{for(i=n.name&&n.message?n.name+": "+n.message:typeof n+": "+n,r=u(n),t=0;t<r.length;t++)i+="\n"+r[t]}catch(f){}return i}var t=!1,n;VoterVoiceLogger.prototype={logException:function(n,t){var i={severity:"error",message:f(n)};arguments.length>1&&(i.url=t);this._api.postLogEntry(i)}}})(),function(){var n;(function(){var i="a-z0-9!#$%&'*+\\-/=?^_`{|}~",t="["+i+"]+(\\.["+i+"]+)*";n=new RegExp("^"+t+"@"+t+"\\."+t+"$","i")})();EmailAddressService.prototype={isValid:function(t){return t.search(n)!=-1}}}(),function(n){function f(n){return/^[a-z][\w\+\-\.]*:/i.test(n)}function e(n,t,i){if(t=t.toLowerCase(),i=i.toLowerCase(),n.toLowerCase().indexOf(t)!==0)return!1;var r=/^[a-z][\w\+\-\.]*:[\/]*([^:|\/|?]*)/i.exec(n);return r==null||r[1].toLowerCase()!==i?!1:!0}function o(t){return window!==n&&f(t)&&!e(t,window.location.protocol,window.location.hostname)}function s(n,t){var r=n==t,i;if(t.length)for(i=0;i<t.length;i++)t[i]==n&&(r=!0);return r}function t(t,i,r,u,f){var e,s={open:function(n,t){this._action=n;this._url=t;e.open(n,t)},send:function(i,r){arguments.length>=2&&e.setRequestHeader!==n&&e.setRequestHeader("Content-Type",r);e.setRequestHeader!==n&&(e.setRequestHeader("Authorization",t._apiKey),t._language!==n&&(e.setRequestHeader("Accept-Language",t._language),e.setRequestHeader("VV-Language",t._language)));e.send(i)},abort:function(){e.abort()},response:null,onerror:null,onload:null,error:function(n){return onerror=n,s},success:function(n){return onload=n,s}};if(o(r)&&typeof XDomainRequest!="undefined")e=new XDomainRequest,e.onerror=function(){if(t.requestError&&t.requestError(e),s.onerror)s.onerror(e)},e.onload=function(){var n=e.responseText,t=n.indexOf(" "),i=n.indexOf("\n"),r=n.substring(0,t),u=n.substring(t+1,i);if(n=n.substring(i+1),s.response={status:r,statusText:u,responseText:n},s.onload)s.onload(s.response)};else if(window.XMLHttpRequest!==n)e=new XMLHttpRequest,e.onreadystatechange=function(){if(e.readyState==4)if(e.status==0){if(t.requestError&&t.requestError(e),s.onerror)s.onerror(e)}else if(s.response={status:e.status,statusText:e.statusText,responseText:e.responseText},s.onload)s.onload(s.response)};else throw"XMLHTTP support is disabled";try{s.open(i,r)}catch(c){alert(VoterVoiceAPI.toJson(e,null,4));alert(i+" "+r+":\r\n"+c.description);throw c;}return h(s,u,f,t),s}function h(n,t,i,r){t&&i&&(n.onload=function(n){c.call(this,n,t,i,r)})}function c(n,t,i,r){try{if(i.responseStatus=n.status,s(n.status,t)){var f=n.responseText===""?null:VoterVoiceAPI.fromJson(n.responseText);i(f)}else i(n.responseText,n.status+" "+n.statusText)}catch(u){new VoterVoiceLogger(r).logException(u,this._action+" "+this._url);throw u;}}function r(n){var r=this._rootUrl+"/LogEntries",i;try{n=VoterVoiceAPI.toJson(n)}catch(u){alert("JSON serialization failed...\r\n"+u);return}i=t(this,"POST",r,201,null);i.send(n,"application/json; charset=utf-8")}function u(n){var t={severity:"error",message:n};r.call(this,t)}function l(n){var t={severity:"warning",message:n};r.call(this,t)}function a(n,i){var u=[],r,f,e;for(r in n)u.push(r+"="+encodeURIComponent(n[r]));f=this._rootUrl+"/Addresses?"+u.join("&");e=t(this,"GET",f,200,i);e.send()}function v(n,i,r){var f=[],u,e,o;for(u in n)u==="alternateCities"&&n[u]!==null?f.push(u+"="+encodeURIComponent(null)):u!=="coordinates"&&n[u]!==null&&f.push(u+"="+encodeURIComponent(n[u]));f.push("latitude="+i.lat());f.push("longitude="+i.lng());e=this._rootUrl+"/Addresses?"+f.join("&");o=t(this,"PUT",e,[200,201],r);o.send()}function y(i,r){var e=i.countryCodeISO3166_1!==n?"/"+i.countryCodeISO3166_1:"",u=this._rootUrl+"/Governments"+e+"?association="+i.association,f;i.legislativeProposals!==n&&(u+="&legislativeProposals="+i.legislativeProposals);i.activeScorecards!==n&&(u+="&activeScorecards="+i.activeScorecards);f=t(this,"GET",u,200,r);f.send()}function p(n,i,r){var u=this._rootUrl+"/Governments/"+n+"/Officials?association="+i,f=t(this,"GET",u,200,r);f.send()}function w(n,i){var r=this._rootUrl+"/Governments/"+n+"/LegislativeSessions",u=t(this,"GET",r,200,i);u.send()}function b(n,i,r,u,f){var e=this._rootUrl+"/Governments/"+n+"/LegislativeProposals?",o,s;for(e+="search="+encodeURIComponent(r),o=0;o<i.length;o++)e+="&session="+i[o].name;e+="&page="+u;s=t(this,"GET",e,200,f);s.send()}function k(n,i){var r=this._rootUrl+"/Governments/"+n,u=t(this,"GET",r,200,i);u.send()}function d(n,i){var r=this._rootUrl+"/Associations/"+n+"/KeyContactRelationshipTypes",u=t(this,"GET",r,200,i);u.send()}function g(n,i){var r=this._rootUrl+"/Associations/"+n+"/LegislativeProposalSpotlights",u=t(this,"GET",r,200,i);u.send()}function nt(n,i,r){var u=this._rootUrl+"/Associations/"+n+"/LegislativeProposalSpotlights?primarySponsorOfficialId="+i,f=t(this,"GET",u,200,r);f.send()}function tt(n,i,r){var u=this._rootUrl+"/Associations/"+n+"/LegislativeProposalSpotlights?cosponsorOfficialId="+i,f=t(this,"GET",u,200,r);f.send()}function it(n,i,r,u){var f=this._rootUrl+"/Scorecards?association="+n+"&government="+i+"&active="+r,e=t(this,"GET",f,200,u);e.send()}function rt(n,i,r,u,f){var e=this._rootUrl+"/Scorecards/Scorees?association="+n,o,s;i&&(e+="&user="+i);for(o in u)e+="&"+o+"="+encodeURIComponent(VoterVoiceAPI.toJson(u[o]));return f&&(e+="&name="+f),s=t(this,"GET",e,200,r),s.send(),s}function ut(n,i){var r=this._rootUrl+"/Scorecards/"+n+"/Scorings",u=t(this,"GET",r,200,i);u.send()}function ft(n,i,r){var u=this._rootUrl+"/Scorecards/Criteria/"+i+"?association="+n,f=t(this,"GET",u,200,r);f.send()}function et(n,i,r,u){var f=this._rootUrl+"/Scorecards/Politicians/"+i+"?association="+n+"&user="+r,e=t(this,"GET",f,200,u);e.send()}function ot(n,i,r,u){var f=this._rootUrl+"/Scorecards/Officials/"+i+"?association="+n,e;r&&(f+="&user="+r);e=t(this,"GET",f,200,u);e.send()}function st(n,i){var r=this._rootUrl+"/Officials/TypeAheadSource?association="+n,u=t(this,"GET",r,200,i);u.send()}function ht(n,i,r,u){var f=this._rootUrl+"/Districts?association="+n+"&zip="+i,e;r===!0&&(f+="&context=candidates");e=t(this,"GET",f,200,u);e.send()}function ct(n,i,r){var u=this._rootUrl+"/Advocacy/CampaignSummaries?association="+n,f;i&&(u+="&siteNumber="+i);f=t(this,"GET",u,200,r);f.send()}function lt(n,i){var r=this._rootUrl+"/Advocacy/CampaignSummaries/"+n,u=t(this,"GET",r,200,i);u.send()}function at(n,i,r){var u=this._rootUrl+"/Advocacy/TargetedMessages?association="+n,f;i&&(u+="&campaignId="+i);f=t(this,"GET",u,200,r);f.send()}function vt(n,i,r,u,f){var e=this._rootUrl+"/Advocacy/MatchedTargets?association="+n,o,s;r!==null&&(e+="&campaignId="+r);i&&(e+="&user="+i);for(o in f)e+="&"+o+"="+encodeURIComponent(VoterVoiceAPI.toJson(f[o]));return s=t(this,"GET",e,200,u),s.send(),s}function yt(n,i,r,u){var f=this._rootUrl+"/Candidates?association="+n,e,o;i&&(f+="&user="+i);for(e in u)f+="&"+e+"="+encodeURIComponent(VoterVoiceAPI.toJson(u[e]));return o=t(this,"GET",f,200,r),o.send(),o}function pt(n,i,r,u,f){var e=this._rootUrl+"/Advocacy/MessageDeliveryOptions?association="+r+"&targetType="+n+"&targetId="+i,o;u!==null&&(e+="&targetedMessage="+u);o=t(this,"GET",e,200,f);o.send()}function wt(n,i){var r=this._rootUrl+"/Advocacy/SharedQuestions/"+n,u=t(this,"GET",r,200,i);u.send()}function bt(n,i,r,u){var f=this._rootUrl+"/Profiles/"+i+"?type="+r+"&association="+n,e=t(this,"GET",f,200,u);e.send()}function kt(n,i,r){i=VoterVoiceAPI.toJson(i);i=encodeURIComponent(i);var u=this._rootUrl+"/Profiles?filter="+i+"&association="+n,f=t(this,"GET",u,200,r);f.send()}function dt(n,i,r,u,f,e){var o=this._rootUrl+"/SocialMedia/Shared?association="+n,s;i.userToken!=null&&(o+="&userUrlToken="+i.userToken);o+="&applicationType="+encodeURIComponent(i.subject.type)+"&actionId="+i.subject.id+"&fingerprint="+i.fingerprint+"&referringNugget="+(i.referringNugget||"")+"&promoteUrl="+encodeURIComponent(u)+"&message="+encodeURIComponent(f)+"&medium="+encodeURIComponent(r);s=t(this,"POST",o,200,e);s.send()}function gt(n,i){var r=this._rootUrl+"/Shares/"+n+"/Visits",u;document.referrer&&(r+="?referrer="+encodeURIComponent(document.referrer));u=t(this,"POST",r,201,i);u.send()}function ni(n,i){var u=this._rootUrl+"/Activity/Visits",r;try{n=VoterVoiceAPI.toJson(n)}catch(f){alert("JSON serialization failed...\r\n"+f);return}r=t(this,"POST",u,201,i);r.send(n,"application/json; charset=utf-8")}function ti(n,i){var r=this._rootUrl+"/Newsletters?association="+n,u=t(this,"GET",r,200,i);u.send()}function ii(n,i,r){var u=this._rootUrl+"/Newsletters/"+i+"?association="+n,f=t(this,"GET",u,200,r);f.send()}function ri(n,i,r){var u=this._rootUrl+"/Newsletters/Archive/Articles?association="+n+"&searchText="+i,f=t(this,"GET",u,200,r);f.send()}function ui(n,i,r){var u=this._rootUrl+"/Petitions/"+n+"?association="+i,f=t(this,"GET",u,200,r);f.send()}function fi(n,i,r){var f=this._rootUrl+"/Petitions/"+n+"/Signatures",u;try{i=VoterVoiceAPI.toJson(i)}catch(e){alert("JSON serialization failed...\r\n"+e);return}u=t(this,"POST",f,201,r);u.send(i,"application/json; charset=utf-8")}function ei(n,i){var r=this._rootUrl+"/Surveys/"+n,u=t(this,"GET",r,200,i);u.send()}function oi(n,i,r){var u=this._rootUrl+"/Surveys?association="+n,f;i&&(u+="&siteNumber="+i);f=t(this,"GET",u,200,r);f.send()}function si(i,r,u,f,e){var o=this._rootUrl+"/Surveys/"+i+"/Responses",s;r!==n&&r!==null&&r!==""?(o=o+"?user="+r,u!==n&&u!==null&&u!==""&&(o=o+"&surveyResponseId="+u),f!==n&&f!==null&&f!==""&&(o=o+"&meetingId="+f)):u!==n&&u!==null&&u!==""&&(o=o+"?surveyResponseId="+u);s=t(this,"GET",o,200,e);s.send()}function hi(n,i){var r=this._rootUrl+"/Surveys/"+n+"/Results",u=t(this,"GET",r,200,i);u.send()}function ci(n,i,r){var u=this._rootUrl+"/Surveys/"+n+"/Questions/"+i+"/Responses",f=t(this,"GET",u,200,r);f.send()}function li(i,r,u,f){var e=this._rootUrl+"/Surveys/"+r+"/MeetingReportResponses?association="+i,o;u!==n&&u!==null&&u!==""&&(e+="&user="+u);o=t(this,"GET",e,200,f);o.send()}function ai(i,r,u,f){var e=this._rootUrl+"/Surveys/"+i+"/Responses",o;u!==n&&u!==null&&u!==""&&(e=e+"?user="+u);try{r=VoterVoiceAPI.toJson(r)}catch(s){alert("JSON serialization failed...\r\n"+s);return}o=t(this,"POST",e,200,f);o.send(r,"application/json; charset=utf-8")}function vi(n,i){var r=this._rootUrl+"/Users/Identities?",u;n.emailAddress&&(r+="&email="+n.emailAddress);n.ownershipProof&&(r+="&ownershipProof="+n.ownershipProof);u=t(this,"GET",r,200,i);u.send()}function yi(n,i,r,u,f){var e=this._rootUrl+"/Users/"+u+"?association="+n,o;i&&(e+="&siteNumber="+i);r&&(e+="&area="+r);o=t(this,"GET",e,200,f);o.send()}function pi(i,r,u,f,e,o,s,h){var l,c,a;u?(l="PUT",c=this._rootUrl+"/Users/"+u+"?nocache&"):(l="POST",c=this._rootUrl+"/Users?");i&&(c+="association="+i);r&&(c+="&siteNumber="+r);try{o!==n&&(f.standAloneRegistration=o);s!==n&&(f.broadcastReceipt=s);h!==n&&(f.visitIdentifier=h);f=VoterVoiceAPI.toJson(f);f||this.logWarning("empty user JSON result = "+typeof f+":"+f+"\nVoterVoiceAPI.toJson = "+VoterVoiceAPI.toJson)}catch(v){alert("JSON serialization failed...\r\n"+v);return}a=t(this,l,c,[200,201],e);a.send(f,"application/json; charset=utf-8")}function wi(n,i,r,u,f){var e=[],o,s;e.push("streetAddress="+encodeURIComponent(i.streetAddress));e.push("city="+encodeURIComponent(i.city));i.county&&e.push("county="+encodeURIComponent(i.county));e.push("state="+encodeURIComponent(i.state));e.push("zipCode="+encodeURIComponent(i.zipCode));i.zipCodeExtension&&e.push("zipCodeExtension="+encodeURIComponent(i.zipCodeExtension));i.country&&e.push("country="+encodeURIComponent(i.country));e.push("checksum="+encodeURIComponent(i.checksum));e.push("latitude="+r.lat());e.push("longitude="+r.lng());e.push("purpose="+u);o=this._rootUrl+"/Users/"+n+"/Locations?"+e.join("&");s=t(this,"POST",o,[200],f);s.send()}function bi(n,i,r,u){var f=this._rootUrl+"/Users/"+r+"/Memberships?association="+n,e;i&&(f+="&siteNumber="+i);e=t(this,"GET",f,200,u);e.send()}function ki(i,r,u,f,e){var o=this._rootUrl+"/Users/"+u+"/Memberships?association="+i,s;r&&(o+="&siteNumber="+r);f.mobileNumber!==n&&(o+="&receivesMessages="+f.receivesMessages,f.receivesTextMessages!==null&&f.receivesTextMessages!==n&&(o+="&receivesTextMessages="+f.receivesTextMessages,o+="&mobileNumber="+encodeURIComponent(f.mobileNumber)));s=t(this,"POST",o,200,e);s.send()}function di(n,i,r){var u=this._rootUrl+"/Users/"+i+"/Relationships?association="+n,f=t(this,"GET",u,200,r);f.send()}function gi(n,i,r){var u=this._rootUrl+"/Users/"+i+"/GeographicRelationships?association="+n,f=t(this,"GET",u,200,r);f.send()}function nr(n,i,r,u){var f=this._rootUrl+"/Users/"+i+"/Relationships?association="+n+"&politicianId="+r,e=t(this,"DELETE",f,200,u);e.send()}function tr(n,i,r,u){var f=this._rootUrl+"/Users/"+i+"/GeographicRelationships?association="+n+"&relationshipId="+r,e=t(this,"DELETE",f,200,u);e.send()}function ir(n,i,r,u,f,e){var h={politicianId:r,type:{id:u},details:f},o=[h],c=this._rootUrl+"/Users/"+i+"/Relationships?association="+n,s;try{o=VoterVoiceAPI.toJson(o)}catch(l){alert("JSON serialization failed...\r\n"+l);return}s=t(this,"POST",c,200,e);s.send(o,"application/json; charset=utf-8")}function rr(n,i,r,u){var o=this._rootUrl+"/Users/"+i+"/GeographicRelationships?association="+n,f=r,e;try{f=VoterVoiceAPI.toJson(f)}catch(s){alert("JSON serialization failed...\r\n"+s);return}e=t(this,"POST",o,200,u);e.send(f,"application/json; charset=utf-8")}function ur(n,i,r){for(var f=this._rootUrl+"/Users/"+n+"/Validations?",e,u=0;u<i.length;u++)f+="&field="+i[u];e=t(this,"GET",f,200,r);e.send()}function fr(n,i,r,u){var f=this._rootUrl+"/Users/"+i+"/Subscriptions?nocache&association="+n+"&unregisteredUser="+r,e=t(this,"GET",f,200,u);e.send()}function er(n,i,r,u){var e=this._rootUrl+"/Users/"+i+"/Subscriptions?nocache&association="+n,f;try{r=VoterVoiceAPI.toJson(r)}catch(o){alert("JSON serialization failed...\r\n"+o);return}f=t(this,"PUT",e,200,u);f.send(r,"application/json; charset=utf-8")}function or(n,i,r){var u=this._rootUrl+"/VoterRegistration?association="+n+"&user="+i,f=t(this,"GET",u,200,r);f.send()}function sr(i,r,u,f){var e=this._rootUrl+"/VoterRegistration?association="+i,o;r!==n&&r!=null&&(e+="&user="+r);try{u=VoterVoiceAPI.toJson(u)}catch(s){alert("JSON serialization failed...\r\n"+s);return}o=t(this,"POST",e,200,f);o.send(u,"application/json; charset=utf-8")}function hr(n,i){var r=this._rootUrl+"/VoterRegistration/Instructions?state="+n,u=t(this,"GET",r,200,i);u.send()}function cr(n,i){var r=this._rootUrl+"/Events/"+n,u=t(this,"GET",r,200,i);u.send()}function lr(i,r,u,f){var e=this._rootUrl+"/Events/"+u+"/Registration?association="+i,o;r!==n&&r!=null&&r!==""&&(e+="&user="+r);o=t(this,"GET",e,200,f);o.send()}function ar(n,i,r,u){var e=this._rootUrl+"/Events/"+r.eventId+"/Registration?association="+n+"&user="+i,f;try{r=VoterVoiceAPI.toJson(r)}catch(o){alert("JSON serialization failed...\r\n"+o);return}f=t(this,"POST",e,200,u);f.send(r,"application/json; charset=utf-8")}function vr(n,i,r,u){var f=this._rootUrl+"/Events/"+r+"/CancelRegistration?association="+n+"&user="+i,e=t(this,"POST",f,200,u);e.send()}function yr(n,i){var r=this._rootUrl+"/BlogPosts?association="+n,u=t(this,"GET",r,200,i);u.send()}function pr(n,i,r){var u=this._rootUrl+"/BlogPosts/"+i+"?association="+n,f=t(this,"GET",u,200,r);f.send()}function wr(n,i,r,u){var f=this._rootUrl+"/Comments?association="+n+"&subjectType="+i+"&subjectId="+r,e=t(this,"GET",f,200,u);e.send()}function br(i,r,u,f,e,o){var s=this._rootUrl+"/Comments?association="+i+"&subjectType="+f+"&subjectId="+e,h;r!==n&&r!=null&&(s+="&user="+r);try{u=VoterVoiceAPI.toJson(u)}catch(c){alert("JSON serialization failed...\r\n"+c);return}h=t(this,"POST",s,200,o);h.send(u,"application/json; charset=utf-8")}function kr(i,r,u,f){var e=this._rootUrl+"/Meetings/"+u+"?association="+i,o;r!==n&&r!=null&&r!==""&&(e+="&user="+r);o=t(this,"GET",e,200,f);o.send()}function dr(i,r,u,f,e,o,s){var h=this._rootUrl+"/Meetings?association="+i+"&startDate="+e+"&endDate="+o,c;u!==n&&u!=null&&u!==""&&(h+="&user="+u);f!==n&&f!=null&&f!==""&&f>0&&(h+="&politicianId="+f);r&&(h+="&siteNumber="+r);c=t(this,"GET",h,200,s);c.send()}function gr(n,i,r){var u=this._rootUrl+"/Meetings/"+i+"/Attendees?association="+n,f=t(this,"GET",u,200,r);f.send()}function nu(i,r,u,f,e,o){var s=this._rootUrl+"/Meetings?association="+i,h;u!==n&&u!=null&&u!==""&&(s+="&user="+u);e!==n&&e!=null&&e!==""&&(s+="&thirdPartyVendorId="+e);r&&(s+="&siteNumber="+r);try{f=VoterVoiceAPI.toJson(f)}catch(c){alert("JSON serialization failed...\r\n"+c);return}h=t(this,"POST",s,200,o);h.send(f,"application/json; charset=utf-8")}function tu(i,r,u,f){var e=this._rootUrl+"/Meetings/"+r+"?association="+i,o;u!==n&&u!=null&&u!==""&&(e+="&user="+u);o=t(this,"DELETE",e,200,f);o.send()}function iu(n,i,r,u){var f=this._rootUrl+"/Meetings/"+r+"/MeetingReports/"+i+"?association="+n,e=t(this,"GET",f,200,u);e.send()}function ru(n,i,r,u){var e=this._rootUrl+"/Meetings/"+r.meetingId+"/MeetingReports/"+i+"?association="+n,f;try{r=VoterVoiceAPI.toJson(r)}catch(o){alert("JSON serialization failed...\r\n"+o);return}f=t(this,"POST",e,200,u);f.send(r,"application/json; charset=utf-8")}function uu(n,i,r,u){var f=this._rootUrl+"/MeetingReportResponses/"+r+"?user="+i+"&association="+n,e=t(this,"GET",f,200,u);e.send()}function fu(n,i,r){var u={emailAddress:n},e=this._rootUrl+"/EmailOwnershipVerifications?association="+i,f;try{u=VoterVoiceAPI.toJson(u)}catch(o){alert("JSON serialization failed...\r\n"+o);return}f=t(this,"POST",e,[200,429],r);f.send(u,"application/json; charset=utf-8")}function eu(n,i,r){var u={code:i},e=this._rootUrl+"/EmailOwnershipVerifications/"+n+"/Proof",f;try{u=VoterVoiceAPI.toJson(u)}catch(o){alert("JSON serialization failed...\r\n"+o);return}f=t(this,"POST",e,201,r);f.send(u,"application/json; charset=utf-8")}function ou(i,r,f){var e=this._rootUrl+"/Advocacy/Responses",o;i!==n&&(e+="?user="+i);try{r||u.call(this,"Empty advocacyResponse argument:"+r);r=VoterVoiceAPI.toJson(r);r||u.call(this,"Empty advocacyResponse JSON:"+r+" implying suspicious stringify:"+VoterVoiceAPI.toJson)}catch(s){alert("JSON serialization failed...\r\n"+s);return}o=t(this,"POST",e,201,f);o.send(r,"application/json; charset=utf-8")}function su(n,i,r){var f=this._rootUrl+"/TellAFriend?user="+n,u;try{i=VoterVoiceAPI.toJson(i)}catch(e){alert("JSON serialization failed (tellAFriendContract)...\r\n"+e);return}u=t(this,"POST",f,201,r);u.send(i,"application/json; charset=utf-8")}function hu(n,i,r,u){var e,f,o;for(arguments.length===3&&(u=r,r=[]),e=this._rootUrl+"/Advocacy/Responses?",n!==""&&(e+="user="+n),f=0;f<i.length;f++)e+="&deliveredMessageIds="+i[f];for(f=0;f<r.length;f++)e+="&destinationIds="+r[f];o=t(this,"GET",e,200,u);o.send()}function cu(n,i){var r=this._rootUrl+"/Advocacy/Responses/"+n,u=t(this,"GET",r,200,i);u.send()}function lu(n,i){var r=this._rootUrl+"/Users/Honorifics?honorific="+encodeURIComponent(n),u=t(this,"GET",r,200,i);u.send()}function au(n,i){var r=this._rootUrl+"/Users/Honorifics/Equivalents?honorific="+encodeURIComponent(n),u=t(this,"GET",r,200,i);u.send()}function vu(n,i,r){var u=this._rootUrl+"/Activities/Authorization/"+n+"?association="+i,f=t(this,"GET",u,200,r);f.send()}function yu(n,i,r){var e=this._rootUrl+"/Activities/Authorization/"+n+"?association="+i,u={token:n},f;try{u=VoterVoiceAPI.toJson(u)}catch(o){alert("JSON serialization failed...\r\n"+o);return}f=t(this,"POST",e,200,r);f.send(u,"application/json; charset=utf-8")}function pu(n,i,r){var u=this._rootUrl+"/Users/"+n+"/Activities?association="+i,f=t(this,"GET",u,200,r);f.send()}function wu(n,i,r){var u=this._rootUrl+"/Officials/"+i+"/Staff?association="+n,f=t(this,"GET",u,200,r);f.send()}function bu(n,i,r){var u=this._rootUrl+"/Maps/GeoJson?entityId="+i,f=t(this,"GET",u,200,r);f.send()}function ku(n,i,r,u,f){var e=this._rootUrl+"/Maps/Bounds?areaId="+i,o;r&&(e+="&country="+r);u&&(e+="&district="+u);o=t(this,"GET",e,200,f);o.send()}function du(n,r,u){var f=this._rootUrl+"/Maps/ConstituencyColors/"+r.id+"?association="+n,e;f=i(f,r);e=t(this,"GET",f,200,u);e.send()}function gu(n,r,u){var f=this._rootUrl+"/Maps/ConstituencyInfo/"+r.id+"?association="+n,e;f=i(f,r);e=t(this,"GET",f,200,u);e.send()}function nf(n,r,u){var f=this._rootUrl+"/Maps/Legend/"+r.id+"?association="+n,e;f=i(f,r);r.strategyName&&(f+="&strategyName="+r.strategyName);e=t(this,"GET",f,200,u);e.send()}function tf(n,r,u){var f=this._rootUrl+"/Maps/CampaignMessagesCount/"+r.id+"?association="+n,e;f=i(f,r,n);e=t(this,"GET",f,200,u);e.send()}function i(n,t){return t.entityId&&(n+="&entityId="+t.entityId),t.drillDownEntityId&&(n+="&drillDownEntityId="+t.drillDownEntityId),n}typeof JSON=="undefined"&&alert("JSON is undefined ... try using json2.js");VoterVoiceAPI.fromJson=JSON.parse;VoterVoiceAPI.toJson=JSON.stringify;VoterVoiceAPI.prototype={version:1,isSupported:function(){return window.XMLHttpRequest!==n},postLogEntry:r,logWarning:l,searchAddresses:a,validateAddressCoordinates:v,searchGovernments:y,searchGovernmentOfficials:p,searchGovernmentLegislativeSessions:w,searchGovernmentLegislativeProposals:b,getGovernmentLegislativeProposalDetails:k,getKeyContactRelationshipTypes:d,getLegislativeProposalSpotlights:g,getSponsoredLegislativeProposalSpotlights:nt,getCosponsoredLegislativeProposalSpotlights:tt,queryScorecards:it,queryScorees:rt,queryScorings:ut,getScorecardCriterion:ft,getPoliticianScorecard:et,getOfficialScorecard:ot,getOfficialTypeAheadSource:st,hasMultipleDistrictsPerEntity:ht,getCampaigns:ct,getCampaign:lt,getTargetedMessages:at,matchUser:vt,getCandidates:yt,getDeliveryOptions:pt,getSharedQuestion:wt,getProfile:bt,searchProfiles:kt,shared:dt,createVisit:gt,logVisit:ni,getNewsletters:ti,getNewsletter:ii,searchArchivedNewsletterArticles:ri,getPetition:ui,signPetition:fi,getSurvey:ei,getSurveys:oi,getSurveyResponses:si,getSurveyResults:hi,getQuestionResponses:ci,getSurveyMeetingReportResponses:li,submitSurvey:ai,findUserIdentities:vi,getUser:yi,saveUser:pi,saveUserLocation:wi,getMembership:bi,registerUser:ki,getUserRelationships:di,getUserGeographicRelationships:gi,deleteUserRelationship:nr,deleteGeographicRelationship:tr,saveUserRelationship:ir,saveGeographicRelationship:rr,validateUserFields:ur,getSubscriptions:fr,saveSubscriptions:er,getVoterRegistration:or,saveVoterRegistration:sr,getVoterRegistrationInstructions:hr,getEvent:cr,getEventRegistration:lr,saveEventRegistration:ar,cancelEventRegistration:vr,getBlogPosts:yr,getBlogPost:pr,getComments:wr,saveComment:br,getMeeting:kr,getMeetings:dr,getMeetingAttendees:gr,saveMeeting:nu,deleteMeeting:tu,getMeetingReportResponses:iu,saveMeetingReportResponse:ru,getMeetingReportResponse:uu,getEmailOwnershipVerification:fu,getEmailOwnershipProof:eu,sendMessages:ou,tellAFriend:su,getAdvocacyResponse:cu,getResponses:hu,requestError:null,sanitizeHonorific:lu,getHonorificEquivalents:au,getActivitiesAuthorization:vu,requestActivitiesAuthorization:yu,getActivitiesSummaries:pu,getOfficialStaffMemberships:wu,getGeoJson:bu,getConstituencyColors:du,getConstituencyInfo:gu,getBounds:ku,getLegend:nf,getCampaignMessagesCount:tf}}();VoterVoiceApplication.Event=function(){if(!(this instanceof arguments.callee))throw new Error("Constructor called as a function");this._callbacks=[]};VoterVoiceApplication.Event.prototype={dispatch:function(){for(var n=0;n<this._callbacks.length;n++)this._callbacks[n].apply(this,arguments)},attach:function(n){this._callbacks.push(n)}};VoterVoiceApplication.RepeatEvent=function(){if(!(this instanceof arguments.callee))throw new Error("Constructor called as a function");this._callbacks=[];this._lastPayload=null};VoterVoiceApplication.RepeatEvent.prototype={dispatch:function(){this._lastPayload=arguments;for(var n=0;n<this._callbacks.length;n++)this._callbacks[n].apply(this,arguments)},run:function(n){this._callbacks.push(n);this._lastPayload!==null&&n.apply(this,this._lastPayload)}};VoterVoiceApplication.FilteredRepeatEvent=function(n){if(!(this instanceof arguments.callee))throw new Error("Constructor called as a function");this._callbacks={};this._tokenizePayload=n;this._lastPayload={}};VoterVoiceApplication.FilteredRepeatEvent.prototype={dispatch:function(){var i=this._tokenizePayload.apply(this,arguments),n,t;if(this._lastPayload[i]=arguments,n=this._callbacks[i],typeof n!="undefined")for(t=0;t<n.length;t++)n[t].apply(this,arguments)},run:function(n,t){var i=this._tokenizePayload.apply(this,t),r=this._callbacks[i];typeof r=="undefined"&&(r=this._callbacks[i]=[]);r.push(n);typeof this._lastPayload[i]!="undefined"&&n.apply(this,this._lastPayload[i])}};VoterVoiceApplication.combineGuards=function(n,t){var i=function(){var i=n.apply(this,arguments);return i===!0&&(i=t.apply(this,arguments)),i};return i.getBlockingWaits=function(){return n.blockingWaits.concat(t.blockingWaits)},i};VoterVoiceApplication.GuardResult=function(n){if(!(this instanceof arguments.callee))throw new Error("Constructor called as a function");this.transition=n;this.blockingWaits=[]};VoterVoiceApplication.GuardResult.prototype={getResult:function(){return this.blockingTransition!==undefined?this.blockingTransition:this.blockingWaits.length!==0?this.blockingWaits[0]:this.activeBlock!==undefined?this.activeBlock:!0},setActiveBlock:function(n){this.activeBlock=n.userPromptKey!==undefined?[n]:n},isBlocked:function(){return this.blockingTransition!==undefined||this.blockingWaits.length!==0||this.activeBlock!==undefined&&this.activeBlock!==!0&&(this.activeBlock==null||!(this.activeBlock instanceof Array))},isInBackgroundWait:function(){return this.blockingWaits.length!==0},isInLongTransition:function(){return this.blockingTransition!==undefined?this.blockingTransition.action!==undefined&&this.blockingTransition.action.waitToken!==undefined:!1},isWaiting:function(){return this.blockingTransition!==undefined?this.blockingTransition.action!==undefined&&this.blockingTransition.action.waitToken!==undefined:this.blockingWaits.length!==0},getInputRequests:function(){return(this.activeBlock instanceof Array)?this.activeBlock:null}},function(n){function r(n,t){for(var i=0;i<n.length;i++)if(n[i]===t)return i;return-1}function i(t){var f=[],r=t.getBlockingWaits===n?t.blockingWaits:t.getBlockingWaits(),i,u;if(r!==n)for(i=0;i<r.length;i++)u=r[i],this.hasWaitActivity(u)===!0&&f.push(u);return f}function t(t,i){var r=t.transition,f=this.getCommonGuard(r,!0);if(f.isBlocked()===!1&&r.guard!==n&&f.setActiveBlock(r.guard.call(this._context)),f.isBlocked()===!0){this.transitionGuarded.dispatch(f);return}this._context.currentTransition=r;this.transitionStarted.dispatch(r);u.call(this,t,f.getInputRequests(),i)}function u(t,r,u){function e(){while(t.targetStates.length>0){var i=t.targetStates.pop();i.state===n&&delete i.machine.currentState}i.machine.takeState(i.state,u)}function f(i){var r=function(){t.transition.failTransition!==n&&t.machine._context.navigateByName(t.transition.failTransition)};t.machine.abortTransition(i,r)}function h(){t.transition.action!==n?t.transition.action.call(t.machine._context,o,f,u):o()}function s(n,t,i){if(n===null)t();else{function u(){r===n.length?t():c.promptingForInput.dispatch(n[r],function(){n[r].userInput?(r++,u()):i()})}var r=0;u()}}var o=t.transition.exitGuard===n?e:function(){var n=new VoterVoiceApplication.GuardResult(t.transition),u,o,h;if(n.blockingWaits=i.call(t.machine._context,t.transition.exitGuard),n.isBlocked()===!0)setTimeout(arguments.callee,10);else if(n.setActiveBlock(t.transition.exitGuard.call(t.machine._context)),n.isBlocked()===!0)t.machine.transitionGuarded.dispatch(n),f();else{if(u=n.getInputRequests(),r&&u)for(o=u.length-1;o>=0;o--)for(h=0;h<r.length;h++)if(u[o].userPromptKey===r[h].userPromptKey){u.splice(o,1);break}s(u,e,f)}},c=this;s(r,h,f)}function f(){if(this.currentState===n)return n;for(var t in this.states)if(this.states[t]===this.currentState)return t;return null}StateMachine.prototype={buildTransitionPlan:function(t){var i,f,u,r;if(this.currentState===n)return{};if(this.currentState.machine!==n&&this.currentState.machine.currentState!==n&&(i=this.currentState.machine.buildTransitionPlan(t),i.transition!==n))return i.targetStates[0].state===n&&i.targetStates.unshift({machine:this,state:this.states[i.transition.stateName]}),i;f=n;for(u in this.currentState.transitions)t(u,this.currentState.transitions[u])===!0&&(f=this.currentState.transitions[u]);return r={machine:this,transition:f},r.transition!==n&&(r.targetStates=[{machine:this,state:this.states[r.transition.stateName]}]),r},getCommonGuard:function(t,r){var u=new VoterVoiceApplication.GuardResult(t),f;return this._context.currentTransition!==n?u.blockingTransition=this._context.currentTransition:(f=r===!0&&t.anteGuard!==n?t.anteGuard.call(this._context):!0,f!==!0?u.setActiveBlock(f):t.guard!==n&&(u.blockingWaits=i.call(this,t.guard))),u},switchWaitActivity:function(n,t){for(var i=this._waits.length-1;i>=0;i--)this._waits[i]===n&&this._waits.splice(i,1);arguments.length>1&&this._waits.push(t);this.waitActivitiesChanged.dispatch()},hasWaitActivity:function(n){return r(this._waits,n)!==-1},navigateByName:function(i,r){var u=this.buildTransitionPlan(function(n){return n==i});if(u.transition===n)throw new Error("Missing transition named '"+i+"' (currentState: "+f.call(this)+")");arguments.length<2&&u.transition.getStateArg!==n&&(r=u.transition.getStateArg.call(this._context));t.call(this,u,r)},navigateByRedo:function(i){var r=this.buildTransitionPlan(function(n,t){return t==i}),u;if(r.transition===n)throw new Error("Missing redo transition (name: "+i.name+", stateName: "+i.stateName+")");u=n;arguments.length<2&&r.transition.getStateArg!==n&&(u=r.transition.getStateArg.call(this._context));t.call(this,r,u)},navigateByPageHash:function(i,r){var u,e,o,f;this.currentState.display.dialog!==n&&this.navigateByName("closeDialog");i===n?(e=this.startState,u=function(n,t){return t.stateName===e}):(o=this,u=function(t,r){var u=o.states[r.stateName];return u!==n&&u.display!==n&&u.display.pageHash===i});f=this.buildTransitionPlan(u);f.transition!==n&&t.call(this,f,r)},abortTransition:function(n,t){delete this._context.currentTransition;this.transitionFailed.dispatch(n,t)},start:function(){this.takeState(this.states[this.startState],n)},takeState:function(t,i){function f(){if(t===r.currentState){for(var i in t.transitions)if(t.transitions[i].automatic===!0&&(r._context.navigateByName(i),t!==r.currentState))return;t.machine!==n&&t.machine.start()}}var u,r;delete this._context.currentTransition;u=this.currentState;this.currentState=t;this.stateEntering.dispatch(t,u,i);r=this;t.entry!==n?t.entry.call(this._context,f,i):f()}};StateMachine.extendPrototype=function(n){function t(n){this.__base__=n}t.prototype=this.prototype;for(var i in n)t.prototype[i]=n[i];return new t(this)}}(),function(n){function t(n){n=n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i="[\\?&]"+n+"=([^&#]*)",r=new RegExp(i),t=r.exec(window.location.search);if(t!==null)return decodeURIComponent(t[1].replace(/\+/g," "))}VoterVoiceApplication.prototype=StateMachine.extendPrototype({appendCurrentQueries:function(i,r){for(var f,e,o,u=0;u<r.length;u++)f=r[u],e=t(f),e!==n&&(o=i.indexOf("?")===-1?"?":"&",i+=o+f+"="+e);return i},enableWaitsAndDisplayChanged:function(){function i(){var i=t.buildTransitionPlan(function(n){return n==="forward"}),r=t.getCommonGuard(i.transition===n?{}:i.transition,!1);t.waitsChanged.dispatch(r)}var t=this;this.waitActivitiesChanged.attach(function(){i()});this.transitionStarted.attach(function(t){t.action!==n&&i()});this.transitionFailed.attach(function(){i()});this.stateEntering.attach(function(r,u,f){i();r.display!==n&&t.displayChanged.dispatch(r,f,u,function(){return t._userTracker.getIdentity()})})},mixin:function(n,t){for(var i in n.prototype)this[i]=n.prototype[i];n.apply(this,t)}})}();VoterVoiceApplication.prototype.enableBillTracker=function(){this.mixin(BillTrackerApplication,arguments)},function(n){function t(n,t){for(var i=0;i<n.length;i++)if(n[i]===t)return i;return-1}function i(n,t){return t.sortOrder-n.sortOrder}function r(){return!0}function u(n,t){if(this.searching.dispatch(),this._searchText===""){n();return}var i=this;i.preSearchDisplaySetup.dispatch();i._api.searchGovernmentLegislativeProposals(i._governmentUri,i.selectedSessions,i._searchText,i._page,function(r){if(arguments.length>1){var u=r;i.legislativeProposalsFound.dispatch(null,u);t(u)}else i.legislativeProposalsFound.dispatch(r),n()})}function f(n,t){this.getBillDetails(this.legislationUrl,n,t)}function e(t,i,r){var f=r,u=this;this._api.getGovernmentLegislativeProposalDetails(f,function(r){arguments.length>1?i(r):(u.legislationDetail=new LegislationDetail(r),u.spotlightsLoaded.run(function(r){for(var e,s,o,f=0;f<r.length;f++)if(s=u.legislationDetail.identifier.replace(/\./g,"").toUpperCase(),o=r[f].legislativeProposalUrl.split("/").pop().toUpperCase(),r[f].governmentAbbreviation===u.legislationDetail.governmentAbbreviation&&(o===s||o===u.legislationDetail.identifier.toUpperCase())){e=r[f];break}e!==n&&u.legislationDetail.addSpotlightData(e);u.openingLegislationFull.dispatch(u.legislationDetail,t,i)}))})}BillTrackerApplication.billTrackerMachine={startState:"bills",states:{bills:{display:{pageHash:null},transitions:{forward:{name:"ButtonTextSearch",guard:r,action:u,stateName:"bills"},viewLegislation:{action:f,stateName:"viewingLegislation"},viewLegislationFull:{action:e,stateName:"viewingLegislationFull"}}},viewingLegislation:{display:{dialog:"legislationDialog"},transitions:{closeDialog:{stateName:"bills"}}},viewingLegislationFull:{display:{pageHash:"legislation",showLegislation:!0},transitions:{back:{stateName:"bills"}}}}};BillTrackerApplication.prototype={initializeBillTracker:function(n,r,u){this._associationIdName=n;var f=this;this._api.getLegislativeProposalSpotlights(n,function(n){var r,s,u,e,o;if(arguments.length>1)vvui.alert(n);else{for(f._spotlights=n,f.spotlightsLoaded.dispatch(f._spotlights),f._categories=[],r=0;r<f._spotlights.length;r++)s={sortOrder:f._spotlights[r].categorySortOrder,name:f._spotlights[r].categoryName},s.name!==null&&f._categories.push(s);for(f._categories.length>0&&f._categories.sort(i),u=[],e=0;e<f._categories.length;e++)o=f._categories[e].name,o!==null&&t(u,o)===-1&&u.push(o);f._categoryNames=u;f.spotlightCategoriesFound.dispatch(u)}});this.switchWaitActivity(null,"fetchingGovernments");this._api.searchGovernments({association:n,legislativeProposals:!0},function(n){var t,e,o,i;if(arguments.length>1)vvui.alert(n);else{for(t=n,f.keyLegislationGovernmentsFound.dispatch(t),f.governmentsFound.dispatch(t),e=t[0],i=0;i<t.length;i++)if(t[0].name!=="Federal"&&(u=t[0].name),t[i].name===u){e=t[i];break}for(f.selectKeyLegislationGovernment(e.uri,e.name),o=t[0],i=0;i<t.length;i++)if(t[0].name!=="Federal"&&(r=t[0].name),t[i].name===r){o=t[i];break}f.selectGovernment(o.uri,o.name)}})},hasCategories:function(){return this._categoryNames!=n?this._categoryNames.length>0:!1},hasSpotlights:function(){return this._spotlights!=n?this._spotlights.length>0:!1},findSpotlights:function(r){for(var v=[],u=[],y=this._spotlights!=n?this._spotlights.length:0,e,o,h,s,c,l,a,f=0;f<y;f++)e=this._spotlights[f].categoryName,this._keyLegislationGovernmentUri==this._spotlights[f].governmentUrl&&(r===""||e===r)&&(e!==null&&t(u,e)===-1&&u.push(e),v.push(this._spotlights[f]));if(o=[],this._categories){for(h=0;h<u.length;h++)for(s=0;s<this._categories.length;s++)u[h]===this._categories[s].name&&o.push(this._categories[s]);for(c=[],o.sort(i),l=0;l<o.length;l++)a=o[l].name,t(c,a)===-1&&c.push(a);u=c}this.spotlightsFound.dispatch(v,u)},selectKeyLegislationGovernment:function(n,t){this._keyLegislationGovernmentUri=n;this.keyLegislationGovernmentSelected.dispatch(n,t);this.filterSpotlights.dispatch()},selectGovernment:function(n,t){this._governmentUri=n;this.governmentSelected.dispatch(n,t);this.switchWaitActivity("fetchingGovernments","fetchingSessions");var i=this;i._page=0;this._api.searchGovernmentLegislativeSessions(n,function(n){var r,t;if(arguments.length>1)vvui.alert(n);else{for(r=[],t=0;t<n.length;t++)r.push({name:n[t].name,displayName:n[t].displayName});i.selectedSessions=r;i.switchWaitActivity("fetchingSessions")}})},setSearchText:function(n){this._searchText!==n&&(this._page=0);this._searchText=n},getLegislation:function(n,t){this._api.getGovernmentLegislativeProposalDetails(n,function(n){arguments.length>1?fail(n):t(n)})}};r.blockingWaits=["fetchingGovernments","fetchingSessions"];u.waitToken="searchingProposals"}(),function(n){function f(n){if(!(this instanceof arguments.callee))throw new Error("Constructor called as a function");this._jQueryAddress=n}function c(n,i){i?(t(n).show(),i==="full"&&t(n).css("float","none").css("margin-left","0px").css("width","auto")):t(n).hide()}function e(){o.call(this,"#backLink",this._shownState.transitions.back,"back");o.call(this,"#forwardLink",this._shownState.transitions.forward,"forward");t("#backLink").is(":visible")?t("#forwardLink").addClass("vv-action-last"):t("#forwardLink").removeClass("vv-action-last")}function o(i,r,u){var f,e;this._navigationOverrides[this._shownState.display.pageHash]!==n?(e=this._navigationOverrides[this._shownState.display.pageHash][u],e!==null&&(f=e)):r!==n&&r.name!==n&&(f=r.name);f!==n?(this._buttonTextTranslations[f]!==n&&(f=this._buttonTextTranslations[f]),t(i).show(),t(i).val(this.translateLanguage(f))):t(i).hide()}function u(n,r){arguments.length<2&&(r="#vvSpinner");i(function(){t(r).css("visibility",n?"visible":"hidden")})}function l(t,i,r){var u,o,f,s,h,l;if(this._currentDialog!==n&&(this._currentDialog.closingForTransition=!0,this._currentDialog.dialog("close"),delete this._currentDialog),u=t.display,o=t.transitions===n?{}:t.transitions,u.dialog===n){for(f=0;f<this.displayUpdaters.length;f++){s=this.displayUpdaters[f](u,o,r);for(h in s)c(h,s[h])}u.pageHash!==n&&(l=i!==n&&i.display!==n&&i.display.dialog!==n,l===!1&&VoterVoiceUserInterface.doNotScrollToTop!==!0&&window.scroll(0,0));this._shownState={display:u,transitions:o};e.call(this)}else this._currentDialog=this.modalDialogs[u.dialog]()}function a(){var i=t("input:radio[name=vvDialogChoice]:checked").val();return i===n&&(i=!1),i}function r(n,t){try{return arguments.length>1?n.apply(this,t):n.call(this)}catch(i){try{new VoterVoiceLogger(this._api).logException(i)}catch(r){}throw i;}}var t,i=function(t){if(arguments.callee.callbacks===n)t();else if(arguments.length===0){for(var i=0;i<arguments.callee.callbacks.length;i++)arguments.callee.callbacks[i]();delete arguments.callee.callbacks}else arguments.callee.callbacks.push(t)},s,h;i.callbacks=[];f.prototype={_serializePage:function(t,i){var r=t;return i!==n&&(r+="-"+JSON.stringify(i)),r},_deserializePage:function(t){var r,i;return t!==n&&(t.indexOf("-")===-1?r=t:(r=t.substring(0,t.indexOf("-")),r==="null"&&(r=null),i=t.substring(t.indexOf("-")+1),i.indexOf("%22")===0&&(i=decodeURIComponent(i)),i=JSON.parse(i))),{hash:r,stateArg:i}},getCurrentPage:function(){return this._deserializePage(this._jQueryAddress.parameter("page"))},reflectStateChange:function(t,i){if(t!==n){var r=this.getCurrentPage();(r.hash!==t||r.stateArg!=i)&&this._browserNavigating!==!0&&this._jQueryAddress.parameter("page",this._serializePage(t,i))}},onNavigated:function(n){var t=this;this._jQueryAddress.externalChange(function(i){t._browserNavigating=!0;var r=t._deserializePage(i.parameters.page);n(r);delete t._browserNavigating})}};VoterVoiceUserInterface.uiReady=function(n){t=n;try{i()}catch(r){try{var u=new VoterVoiceLogger(s);u.logException(r)}catch(f){}throw r;}};VoterVoiceUserInterface._onReady=i;VoterVoiceUserInterface._jQuery=function(){return t};VoterVoiceUserInterface.prototype={extend:function(n){for(var t in n)this.attachBehaviour(t,n[t])},attachBehaviour:function(n,t){this[n]=function(){return r.call(this,t,arguments)}},initialize:function(){function e(t){var f=t.getResult(),e,u,i;return f===!1?null:(f===null&&r._api.logWarning("guardResult is null (transition: "+t.transition.name+", state: "+t.transition.stateName+")"),typeof f.action=="function"?(e="result.action.waitToken",u=f.action.waitToken):(e="result",u=f),i=r.guardMessages[u],i===n?(i=null,r._api.logWarning("Unknown transitionGuarded token: "+e+" = "+u+" (transition: "+t.transition.name+", state: "+t.transition.stateName+")")):u.formatGuardMessage!==n?i=u.formatGuardMessage(i,r):i!==null&&i.toString!==n&&(i=i.toString()),i)}s=this._api;var r=this;i(function(){if(t.datepicker!==n&&(t.datepicker.regional[""]=r._languageTranslator.GetDatePickerCultureSettings(),t.datepicker.setDefaults(t.datepicker.regional[""])),t.address!==n){var i=new f(t.address),u=i.getCurrentPage();u.hash!==n&&r._application.navigateByPageHash(u.hash,u.stateArg);r._application.displayChanged.run(function(n,t){i.reflectStateChange(n.display.pageHash,t)});i.onNavigated(function(n){r._application.navigateByPageHash(n.hash,n.stateArg)})}});this._application.transitionGuarded.attach(function(t){t.isInBackgroundWait()===!0&&r._pendingTransition===n&&(r._pendingTransition=t.transition,u(!0));var i=e(t);i!==null&&t.activeBlock!==n&&r.alert(i)});this._application.promptingForInput.attach(function(t,i){var f=r.translateLanguage(t.userPromptKey),u,e;if(t.userPromptParameters!==n)for(u=0;u<t.userPromptParameters.length;u++)f=f.replace("{"+u+"}",t.userPromptParameters[u]);e={text:f,buttons:t.userPromptButtons};r.confirm(e,function(){t.userInput=!0},function(){t.userInput=!1},function(){i()})});this._application.transitionFailed.attach(function(t,i){t!==n?r.alert(t,i):i()});this._application.waitsChanged.run(function(f){if(i(function(){t("#processingImage").toggle(f.isWaiting())}),f.isInLongTransition()?u(!0):r._pendingTransition===n&&u(!1),f.isWaiting()===!1&&r._pendingTransition!==n){var e=r._pendingTransition;delete r._pendingTransition;r._application.navigateByRedo(e)}});this._application.displayChanged.run(function(n,t,u,f){i(function(){l.call(r,n,u,f)})});this._application.states.final={entry:function(t){this.finalRedirect!==n&&(window.location=this.finalRedirect);t()}}},registerWaitSpinner:function(r,u){var f=this._application._waits;this._application.waitActivitiesChanged.attach(function(){for(var o=!1,e=0;e<f.length;e++)if(f[e]===u.waitActivity){o=!0;break}i(function(){t(r).toggle(o);u.hide!==n&&t(u.hide).toggle(!o)})})},navigateForward:function(){var n,u,i,e,o,s,f;if(typeof vvuimobile!="undefined"){if(n=t(".vv-form").filter(":visible"),u=!1,n.length>0)for(i=0;i<n.length;i++)if(e=t(n[i]),o=e.visible(!0),o){u=!0;break}n.length===0||u?r.call(this,function(){this._application.navigateByName("forward")}):(f=t(".vv-form-scroll-target").filter(":visible"),s=f.length>0?f.first().offset().top:n.first().offset().top,t("html, body").animate({scrollTop:s},2e3))}else r.call(this,function(){this._application.navigateByName("forward")})},navigateBack:function(){r.call(this,function(){this._application.navigateByName("back")})},navigateCancel:function(){r.call(this,function(){this._application.navigateByName("cancel")})},navigateSpecial:function(n){r.call(this,function(){this._application.navigateByName(n)})},openModalDialog:function(i,r){function c(n){n.parent().css({top:t(window).scrollTop()+"px"});t(".vvDialog").focus()}var f=this,e={autoOpen:!1,modal:!0,draggable:!1,resizable:!1,width:r.width,open:function(){setTimeout(function(){t(":focus").blur()},0);t(".ui-dialog-titlebar-close",this.parentNode).empty().remove();r.open!==n&&r.open();f.modalOpened!==n&&f.modalOpened.dispatch(i)},close:function(){r.closeCallback!==n&&r.closeCallback();r.closeTransition!==n&&f.closeModalDialog(i,r.closeTransition);(r.removeDialogContainer===n||r.removeDialogContainer===!0)&&(i.empty().remove(),i.parent().empty().remove())}},u,o,l,s,h;r.title!==n&&(e.title=r.title);r.maxWidth!==n&&(e.maxWidth=r.maxWidth);i.dialog(e);u=i.parent(".ui-dialog");t("body").append(u);r.id!==n&&i.attr("id",r.id);r.minWidth!==n&&(o=t(document).width()-8,l=o>=r.minWidth?r.minWidth:o,i.dialog({minWidth:l+"px"}));i.dialog("open");r.title===n?u.find(".ui-dialog-title").html(i.find("header").html()):u.find(".ui-dialog-title").html(r.title);s=u.find(".ui-dialog-titlebar");s.addClass("vvDialogHeader");r.showCloseX===!0&&(h=t('<div style="display: inline; position: absolute; right: -0.8em; top: 0em;"><input type="button" class="vv_button vvDialogCloseButton" value="&times;" /><\/div>'),h.find("input").click(function(){i.dialog("close")}),s.append(h));i.addClass("vvBody");u.addClass("vvDialog");r.maxWidth!==n&&r.maxWidth<i.dialog("widget").width()&&(i.dialog("option","width",r.maxWidth),i.dialog("widget").width(r.maxWidth),i.dialog("option","position","center"));r.maxHeight===n?i.parent().height()>t(window).height()&&(c(i),window.setTimeout(function(){c(i)},80)):i.parent().height()>r.maxHeight&&(i.dialog("option","height",r.maxHeight),i.dialog("widget").height(r.maxHeight),i.dialog("option","position","center"));c(i)},closeModalDialog:function(n,t){r.call(this,function(){n.closingForTransition!==!0&&this._application.navigateByName(t);n.empty().remove()})},openPrivacyPolicy:function(n){n=typeof vvuimobile!="undefined"?"/Mobile"+n:"/iframes"+n;var r=this,i=t("<div><\/div>");i.load(n,null,function(){i.find("section > header").first().hide();r.openModalDialog(i,{draggable:!0,width:t(".vvBody").first().width()-10+"px",maxWidth:600,maxHeight:t(window).height()-50,showCloseX:!0})})},overrideNavigation:function(t,i){i===n?delete this._navigationOverrides[t]:this._navigationOverrides[t]=i;e.call(this)},translateButtonText:function(n,i){this._buttonTextTranslations[n]=i;var r=t("#forwardLink"),u=this.translateLanguage(n);r.val()===u&&r.val(this.translateLanguage(i))},translateLanguage:function(t){return this._languageTranslator!==n?this._languageTranslator.GetTextForCulture(t):"Error: Translate object is null"},formatDate:function(n){return n.format(this.translateLanguage("JavascriptDateFormat"))},formatTime:function(n){var r=this.translateLanguage("JavascriptTimeHourFormat")!==""?n.format(this.translateLanguage("JavascriptTimeHourFormat")):"",u=this.translateLanguage("JavascriptTimeSeparatorFormat"),i=this.translateLanguage("JavascriptTimeMinuteFormat")!==" "?n.format(this.translateLanguage("JavascriptTimeMinuteFormat")):"",f=this.translateLanguage("JavascriptTimePeriodFormat")!==""?n.format(this.translateLanguage("JavascriptTimePeriodFormat")):"";return i==="0"&&(i=""),t.trim(r+u+i+f)},formatTimeFrom24Hour:function(t,i){return this._languageTranslator!==n?this._languageTranslator.FormatTimeFrom24Hour(t,i):"Error: Translate object is null"},showNotificationModal:function(i,r,u,f,e,o,s){function tt(t,i,r,u){var f=t.find(".vvNotificationButton").eq(u);f.val(i[u]);f.click(function(){r[u]!==n&&r[u]();t.dialog("close")})}function nt(n){n.parent().css({top:t(window).scrollTop()+"px"})}var l=u.text.replace(/\r\n/g,"<br />"),v="",c,h,w,a,y,p;if(arguments.length===7){for(c=0;c<s.length;c++)v+='<div style="text-align: left;"><label><input type="radio" name="vvDialogChoice" value="'+c+'" display="'+s[c]+'" onclick="javascript:vvui.selectDialogChoice(this);" />'+s[c]+"<\/label><\/div>";l="<p>"+l+"<\/p>"}for(h=i.clone(!0).removeAttr("id"),h.find(".vvNotification").html(l),t("#notificationWidth").html(l),w=u.buttons==="Yes|No"?[this.translateLanguage("ButtonTextYes"),this.translateLanguage("ButtonTextNo")]:u.buttons==="Same|Different"?[this.translateLanguage("ButtonTextSamePerson"),this.translateLanguage("ButtonTextDifferentPeople")]:u.buttons==="ViewMap|Cancel"?[this.translateLanguage("MapExplanation"),this.translateLanguage("ButtonTextCancel")]:[this.translateLanguage("ButtonTextOkay"),this.translateLanguage("ButtonTextCancel")],a=0;a<o.length;a++)tt(h,w,o,a);h.dialog({autoOpen:!1,modal:!0,draggable:!0,open:function(){t(".ui-dialog-titlebar",this.parentNode).empty().remove();setTimeout(function(){t(":focus").blur()},0)},beforeClose:function(){return f!==n&&(y=f()),y},close:function(){e!==n&&e(y);h.empty().remove();h.parent().empty().remove()}});h.attr("id",r);h.dialog("option","zIndex",9999999);t("body").append(h.parent(".ui-dialog"));var b=t(".vvBody").width(),k=t(window).width()/2,d=b>k?b:k,g=t(window).width()-20;h.parent().css({minWidth:(d<g?d:g)+"px"});p=t("#notificationWidth").width()+50;p<h.parent().width()&&(h.parent().css({minWidth:p+"px"}),h.css({textAlign:"center"}));h.dialog("open");h.addClass("vvBody");v!==""&&h.find(".vvNotification").append(v);h.parent().height()>t(window).height()&&(nt(h),window.setTimeout(function(){nt(h)},80))},alert:function(i,r){var u={text:i};this.showNotificationModal(t("#alertTemplate"),"vvAlert",u,n,r,[n])},choose:function(i,r,u){var f={text:i};this.showNotificationModal(t("#alertTemplate"),"vvAlert",f,a,u,[n],r)},confirm:function(i,r,u,f){i.text===n&&(i={text:i});this.showNotificationModal(t("#confirmTemplate"),"vvConfirm",i,n,f,[r,u])},selectDialogChoice:function(n){setTimeout(function(){t(n).prop("checked",!0)},1)},applyDatepicker:function(n){n.datepicker({changeMonth:!0,changeYear:!0,showOtherMonths:!0,selectOtherMonths:!0})},defaultLinksToNewWindow:function(n){this.appendDefaultAttributeValue(n.find("a"),"target","_blank")},appendDefaultAttributeValue:function(i,r,u){for(var o=t(i),f,s,e=0;e<o.length;e++)f=t(o[e]),s=f.attr(r)===null||f.attr(r)===n?"":t.trim(f.attr(r)),s===""&&f.attr(r,u);return o},emitContentLoadedEvent:function(){const n=document.createEvent("Event");n.initEvent("vvContentLoaded",!0,!0);document.dispatchEvent(n)}};h=window.alert;window.alert=function(i){typeof t!="undefined"&&typeof vvui!="undefined"&&vvui.alert!==n?vvui.alert(i):h(i)}}();LegislationDetail.prototype={addSpotlightData:function(n){this.displayTitle=n.name;this.explanation=n.explanation;this.categoryName=n.categoryName;this.position=n.position}},function(n,t,i){function u(n,t){var y=vvui,a=r("#legislationDialogTemplate").clone(!0).removeAttr("id"),s,u,h,p,f,it,l,e,o;if(a.find("header").eq(0).html(n.identifierDisplay),s=a.find("section > section"),u=s.eq(0),u.find(".vv-state-icon").addClass("stateface-"+n.governmentAbbreviation.toLowerCase().replace(/\./gi,"")),u.find("p").eq(0).html(n.displayTitle),u.find("p").eq(1).html(n.sessionDisplayName),h=u.find("div").eq(0),p=300,n.fullTitle.length>p){var ut=r("<span>"+n.fullTitle.substring(0,p)+"<\/span>"),v=r("<span>"+n.fullTitle.substring(p,n.fullTitle.length)+"<\/span>"),b=r("<span> ...<\/span>"),d="<div><a>Show More...<\/a><\/div>",ft="<div><a>Show Less...<\/a><\/div>",g=r("<br><br>"+d);g.click(function(){var n=r(this);v.is(":visible")?(n.html(d),b.show(),v.hide()):(n.html(ft),b.hide(),v.show())});h.append(ut);h.append(b);h.append(v);v.hide();h.append(g)}else h.html(n.fullTitle);if(u=s.eq(1),n.relatedProposals&&n.relatedProposals.length>0){function et(n){var i=n.url,t=r("<a>"+n.identifierDisplay+"<\/a>");return t.click(function(){y._application.getLegislation(i,function(n){y._application.legislationDetail=n;y.modalDialogs.legislationDialog(!0)})}),t}for(f=0;f<n.relatedProposals.length;f++)e=r("<tr><\/tr>"),o=r('<td style="white-space: nowrap;"><\/td>').append(et(n.relatedProposals[f])),e.append(o),o=r("<td><\/td>").append(n.relatedProposals[f].shortTitle),e.append(o),u.find("tbody").append(e)}else u.toggle(!1);if(u=s.eq(2),n.categoryName||n.position||n.explanation?(n.categoryName||n.position?(n.categoryName?u.find("p > span").eq(1).html(n.categoryName):u.find("p > span").hide(),n.position===1?u.find("p").eq(1).append('<span class="fas fa-times vvOpposeContainer" aria-hidden="true"><\/span> We oppose this bill'):n.position===2&&u.find("p").eq(1).append('<span class="fas fa-check vvSupportContainer" aria-hidden="true"><\/span> We support this bill')):u.find("p").eq(1).hide(),n.explanation?(u.find("p").eq(2).html(n.explanation),this.defaultLinksToNewWindow(u.find("p").eq(2))):u.find("p").eq(2).hide()):u.hide(),u=s.eq(3),n.primarySponsors.length>0||n.otherSponsors.length>0){function nt(n){var i=n.officeOccupancyId!==0,t;return i===!0?(t=r('<a class="vv-profile-link-text">'+n.description+"<\/a>"),tt(t,n),t):r("<span>"+n.description+"<\/span>")}function tt(n,t){n.click(function(){y.openProfileDialog(t.officeOccupancyId,"E")})}for(f=0;f<n.primarySponsors.length;f++){var w=r('<div class="vv-profile-link-container"><\/div>'),c=n.primarySponsors[f],ot=c.photoUrl!==null?c.photoUrl:"https://d3dkdvqff0zqx.cloudfront.net/photos/nopicture.jpg",k=r('<img class="vv-profile-thumbnail" src="'+ot+'"><\/img>');w.append(k);c.officeOccupancyId!==0?(w.append(nt(c)),k.css("cursor","pointer"),tt(k,c)):(it=r("<span>"+c.description+"<\/span>"),w.append(it));u.find("ul").eq(0).append(w)}if(n.otherSponsors.length>0)for(l=u.find("table").eq(0).parent(),l.hide(),u.children("a").click(function(){l.is(":visible")?l.slideUp():l.slideDown()}),f=0;f<n.otherSponsors.length;f++)e=r("<tr><\/tr>"),o=r("<td><\/td>").append(nt(n.otherSponsors[f])),e.append(o),l.find("tbody").append(e);else u.children("a").toggle(!1)}else u.toggle(!1);if(u=s.eq(4),n.actions.length>0)for(f=0;f<n.actions.length;f++){var rt=n.actions[f].display?n.actions[f].display:n.actions[f],st=rt.split(/-(.+)/)[0],ht=rt.split(/-(.+)/)[1],e=r("<tr><\/tr>"),o=r('<td style="white-space: nowrap;"><\/td>').append(st);e.append(o);o=r("<td><\/td>").append(ht);e.append(o);u.find("tbody").append(e)}else u.toggle(!1);if(u=s.eq(5),n.committees.length>0)for(f=0;f<n.committees.length;f++)e=r("<tr><\/tr>"),o=r("<td><\/td>").append(n.committees[f]),e.append(o),u.find("tbody").append(e);else u.toggle(!1);if(u=s.eq(6),n.urls.length>0)for(f=0;f<n.urls.length;f++)u.find("ul").append('<li><a href="'+n.urls[f]+'" target="_blank">'+n.urls[f]+"<\/a><\/li>");else u.toggle(!1);return a.find("nav input").click(function(){t===i?a.dialog("close"):t()}),a}var r;n(function(){r=t();vvui.modalDialogs.legislationDialog=function(n){var t=vvui.createBillDetailsDialog(vvui._application.legislationDetail);vvui.openModalDialog(t,{draggable:!0,width:r(".vvBody").first().width()-10+"px",maxWidth:800,showCloseX:!0,closeTransition:n===!0?i:"closeDialog",open:function(){navigator.userAgent.toLowerCase().indexOf("votervoice/")>-1&&(navigator.userAgent.toLowerCase().indexOf("iphone")>-1||navigator.userAgent.toLowerCase().indexOf("ipad")>-1)&&(r(".ui-widget-overlay").css("z-index","-1"),r(".jsIndexView").css("position","relative"),r(".jsIndexView").css("z-index","-2"))},closeCallback:function(){navigator.userAgent.toLowerCase().indexOf("votervoice/")>-1&&(navigator.userAgent.toLowerCase().indexOf("iphone")>-1||navigator.userAgent.toLowerCase().indexOf("ipad")>-1)&&r(".jsIndexView").css("z-index","")}});vvui.emitContentLoadedEvent()};var n=vvui._application;vvui.openBillDetailsDialog=function(t){n.getBillDetails(t,function(){vvui.modalDialogs.legislationDialog(!0)})};n.getBillDetails=function(t,r,u){var f=n.legislationSpotlight;n._api.getGovernmentLegislativeProposalDetails(t,function(t){arguments.length>1?u(t):(n.legislationDetail=new LegislationDetail(t),f!==i&&n.legislationDetail.addSpotlightData(f),r(n.legislationDetail))})}});VoterVoiceUserInterface.prototype.extend({createBillDetailsDialog:u})}(VoterVoiceUserInterface._onReady,VoterVoiceUserInterface._jQuery),function(n,t,i){function u(n,t){var h=r("#profileDialogTemplate").clone(!0).removeAttr("id"),e,st,b,k,d,ht,kt,ct,ni,o,g,nt,l,ti,tt,at,it,a,vt,yt,pt,c,u,rt,ut,ft,et,v,wt,ot,f,s;if(n===null)h.children("section").html(vvui.translateLanguage("OutOfOfficeErrorMessage"));else{e=n.profile!==i?n.profile:n;st=h.find("header");st.html(vvui.translateLanguage("Profile"));st.hide();var y=h.find(".vv_ProfileFull"),p=h.find(".vv_ProfileContainer"),w=r("#profileMenuTemplate").clone(!0).removeAttr("id"),fi=e.photoUrl!==null,bt=p.find(".vv_roundedImage > img");fi&&e.photoUrl.indexOf("nopicture.jpg")<0?bt.prop("src",e.photoUrl):(bt.hide(),p.find(".vv-no-profile-picture").show());b=p.find(".vv_ProfiledEntityDescriptionContainer > ul");b.empty();k=r("<li />");d=e.displayName.search("\\(");d!==-1?(k.html(e.displayName.slice(0,d-1)),b.append(k),ht=r("<li />"),kt=e.displayName.slice(d).replace("(","").replace(")",""),ht.html(kt),b.append(ht)):(k.html(e.displayName),b.append(k));ct=p.find(".vvNavigationProfile");t!==i?ct.find("input").click(function(){vvui.navigateSpecial(t)}):ct.remove();y.append(p);y.append(w);function dt(n){return r('<li class="vv-tab-menu-item-definition">'+n.replace(/\sInformation/gi,"").replace(/\sMembers/gi,"")+"<\/li>")}function gt(){return r("#profileSectionTemplate").clone(!0).removeAttr("id")}for(g=0;g<e.sections.length;g++)for(l=e.sections[g],c=w.children().length,ni!==l.category&&(ni=l.category,nt=dt(l.name,c),w.append(nt),o=gt(c),y.append(o)),ti=o.find("ul"),tt=0;tt<l.properties.length;tt++){var ii=l.properties[tt],lt=r("#profilePropertyTemplate").clone(!0).removeAttr("id"),ei=lt.find(".vv_ProfilePropertyHeader"),oi=lt.find(".vv_ProfilePropertyBody");for(ei.html(ii.name),at=ii.value.split("\r\n"),it=0;it<at.length;it++)a=at[it],vt=a.indexOf("http://")===0||a.indexOf("https://")===0?r('<div><a href="'+a+'" target="_new">'+a+"<\/a><\/div>"):r("<div>"+a+"<\/div>"),oi.append(vt);ti.append(lt)}if(yt=n.sponsoredProposals!==i&&n.sponsoredProposals.length>0,pt=n.cosponsoredProposals!==i&&n.cosponsoredProposals.length>0,n.scorecards!==null&&n.scorecards!==i&&n.scorecards.length>0||yt||pt){c=w.children().length;nt=dt(vvui.translateLanguage("HeaderBills"),c);w.append(nt);o=gt(c);o.hide();y.append(o);function ri(n){for(var o=r('<table width="100%" class="vvScorecardDetail" />'),s=r("<tbody />"),e,u,f=0;f<n.length;f++){function c(n,t){t.click(function(){vvui.openBillDetailsDialog(n.legislativeProposalUrl)})}var t=n[f],i=r("<tr />"),h=r("<a>"+t.name+"<\/a>");c(t,h);e=r('<td style="width: 90%; text-align: left;" />');e.append(h);e.append(r('<span class="vv-remark"> | '+t.sessionDisplayName+"<\/span>"));i.append(e);u=r('<td style="width: 10%; text-align:center;" />');t.position===2?i.append(u.append(r('<span class="fas fa-check vvSupportContainer" aria-hidden="true" title="We support this bill"><\/span>'))):t.position===1?i.append(u.append(r('<span class="fas fa-times vvOpposeContainer" aria-hidden="true" title="We oppose this bill"><\/span>'))):t.position===0?i.append(u.append(r('<span class="fas fa-minus vvNeutralContainer" aria-hidden="true"><\/span>'))):i.append(u);s.append(i)}return o.append(s),o}if(yt&&(u=r('<section style="margin-bottom: 15px;"><\/section>'),u.append(r("<header>Sponsor<\/header>")),u.append(ri(n.sponsoredProposals)),o.append(u)),pt&&(u=r('<section style="margin-bottom: 15px;"><\/section>'),u.append(r("<header>Co-sponsor<\/header>")),u.append(ri(n.cosponsoredProposals)),o.append(u)),n.scorecards!==null&&n.scorecards!==i&&n.scorecards.length>0)for(u=r("<section><\/section>"),u.append(r("<header>Scorecard<\/header>")),o.append(u),rt=0;rt<n.scorecards.length;rt++){for(ut=n.scorecards[rt],ft=r('<section class="vv-profile-section-scorecard" />'),ft.append(r('<header style="font-size: 1em;" />').html(ut.cardName)),et=r('<table width="100%" class="vvScorecardDetail" />'),v=r("<tr />"),v.append(r('<th class="rowSmall" />').html("Result")),v.append(r('<th class="rowName" />').html("Name of the Legislation")),v.append(r('<th class="rowSmall" />').html("Vote")),v.append(r('<th class="rowSmall" />').html("Score")),et.append(r("<thead />").append(v)),wt=r("<tbody />"),ot=0;ot<ut.scores.length;ot++){f=ut.scores[ot];s=r("<tr />");s.append(r("<td />").html(f.voteOutcome));var si=f.displayName.replace(/'/g,"&apos;"),hi="javascript: vvui.openCriterionDialog('"+f.criterionId+"', '"+si+"');",ui=r("<td />").append(r("<a />").attr("href",hi).html(f.displayName));r.trim(f.notes)!==""&&ui.append(r("<br/><span />").css("font-size","smaller").html("* "+f.notes));s.append(ui);s.append(r("<td />").html(f.symbol));f.score>0?s.append(r("<td />").append(r('<span class="fas fa-check vvSupportContainer" aria-hidden="true" title="Voted with us"><\/span>'))):f.score<0?s.append(r("<td />").append(r('<span class="fas fa-times vvOpposeContainer" aria-hidden="true" title="Voted against us"><\/span>'))):f.score===0?s.append(r("<td />").append(r('<span class="fas fa-minus vvNeutralContainer" aria-hidden="true" title="No position"><\/span>'))):s.append(r("<td />"));wt.append(s)}et.append(wt);ft.append(et);u.append(ft)}}y.sectionedTabs({headerDefinitionSelector:".vv-tab-menu-item-definition",sectionSelector:".vv_ProfileSection",blockBreakindex:1})}return h.find("nav input").click(function(){h.dialog("close")}),h}var r;n(function(){r=t();vvui.modalDialogs.profileDialog=function(){var n=vvui.createProfileDialog(vvui._application._currentTarget.profile,"composeSingleMessage");return vvui.openModalDialog(n,{draggable:!0,width:r(".vvBody").first().width()-10+"px",id:"profileDialog",minWidth:800,showCloseX:!0,closeTransition:"closeDialog"}),n};var n=vvui._application;vvui.openProfileDialog=function(t,i){n.getProfile(t,i,function(n){var t=vvui.createProfileDialog(n);vvui.openModalDialog(t,{draggable:!0,width:r(".vvBody").first().width()-10+"px",id:"profileDialog",maxWidth:800,showCloseX:!0})})};n.getProfile=function(t,i,r,u){function o(t){n._isLoadingProfile=!1;r(t)}function f(t){n._isLoadingProfile=!1;u(t)}var e=vvui._application._associationIdName;n._currentTarget={targetId:t,targetType:i};i==="E"?n._api.getOfficialScorecard(e,t,null,function(i){arguments.length>1?f(i):(n._currentTarget.profile=i,n._api.getSponsoredLegislativeProposalSpotlights(e,t,function(i){arguments.length>1?f(i):(n._currentTarget.profile.sponsoredProposals=i,n._api.getCosponsoredLegislativeProposalSpotlights(e,t,function(t){arguments.length>1?f(t):(n._currentTarget.profile.cosponsoredProposals=t,o(n._currentTarget.profile))}))}))}):n._api.getProfile(e,t,i,function(t){arguments.length>1?f(t):(n._currentTarget.profile=t,o(n._currentTarget.profile))})}});VoterVoiceUserInterface.prototype.extend({createProfileDialog:u})}(VoterVoiceUserInterface._onReady,VoterVoiceUserInterface._jQuery),function(n,t){function u(n,t){var r=this;r._application.getScorecardCriterion(n,function(n){var u=r.createCriterionDialog(n);r.openModalDialog(u,{width:i(".vvBody").first().width()-10+"px",minWidth:600,maxHeight:i(window).height()-50,showCloseX:!0,title:t,closeCallback:function(){}});r.emitContentLoadedEvent()})}function r(n){var d=n.legislativeMotion?"Votes":"Positions",s=i("<div />"),t=i('<section class="vvScorecardMotion ck-content" />'),h=i("<p />").html(n.explanationHtml),c,o,l,a,u,f,r,e;for(vvui.defaultLinksToNewWindow(h),t.append(h),n.legislativeMotion?(n.legislativeMotion.legislativeProposal.externalUrls.length!==0&&(c='<a href="'+n.legislativeMotion.legislativeProposal.externalUrls[0]+'">Bill Info<\/a>',o=i("<p />").html(c),vvui.defaultLinksToNewWindow(o),t.append(o)),l=n.legislativeMotion.associationStance.associationName+" "+(n.legislativeMotion.associationStance.supportsMotion===!0?'<span style="font-weight:bold;" class="vvSupportContainer">supported<\/span>':n.legislativeMotion.associationStance.supportsMotion===!1?'<span style="font-weight:bold;" class="vvOpposeContainer">opposed<\/span>':'had <span style="font-weight:bold;">no position<\/span> on')+" this "+(n.legislativeMotion.legislativeProposal.isNomination===!0?"nomination":"bill")+".",a=n.legislativeMotion.passed===!0?i('<span class="vvSupportContainer">Passed<\/span>'):n.legislativeMotion.passed===!1?i('<span class="vvOpposeContainer">Failed<\/span>'):i("<span>Unknown<\/span>"),t.append(i("<p />").html(l)),t.append(i("<p />").append("The final result : ").append(a))):n.outcome!=null&&t.append(i("<p />").append("The final result : ").append(i("<span />").html(n.outcome))),u=i("<section />").append(i("<header />").html(d)),f=0;f<n.positions.length;f++)if(r=n.positions[f],r.officials.length>0){u.append(i("<span />").html(r.description+" ("+r.officials.length+")"));function g(n){var t=n.officeOccupancyId!==0;return n.description}function nt(n,t){n.click(function(){vvui.openProfileDialog(t.officeOccupancyId,"E")})}var v=i('<div class="vv-scrolly-table-container" style="margin-bottom: 20px;" />'),y=i("<table />"),p=i("<tbody />");for(e=0;e<r.officials.length;e++){var w=r.officials[e],b=i("<tr />"),k=i("<td />");k.append(g({officeOccupancyId:w.occupancyId,description:w.displayName}));b.append(k);p.append(b)}y.append(p);v.append(y);u.append(v)}return t.append(u),s.append(t),s}var i;n(function(){i=t();var n=vvui._application;vvui.openCriterionDialog=function(t,u){n.getScorecardCriterion(t,function(n){var t=r(n);vvui.openModalDialog(t,{draggable:!0,width:i(".vvBody").first().width()-10+"px",id:"profileDialog",maxWidth:800,title:u,showCloseX:!0});vvui.emitContentLoadedEvent()})};n.getScorecardCriterion=function(n,t){this._api.getScorecardCriterion(this._associationIdName,n,function(n){var i;if(arguments.length>1)if(arguments.callee.responseStatus===404)i=null;else{vvui.alert(n);return}else i=n;t(i)})}});VoterVoiceUserInterface.prototype.extend({createCriterionDialog:r,openCriterionDialog:u})}(VoterVoiceUserInterface._onReady,VoterVoiceUserInterface._jQuery),function(n,t){var i;n(function(){i=t()});GovernmentsBinder.prototype={loadGovernments:function(n,t){var u,f,r;if(this.governmentRendering=n.length>6?"compact":n.length>1?"compact":"none",u=i(this._selector),u.html("<select><\/select>"),f=u.find("span:not(.vvSelectedGovernment)"),r=u.find("select"),this.governmentRendering==="full"){function e(n,r){return i("<a>"+r+"<\/a>").click(function(){t(n,r)})}i.each(n,function(){var n=i("<span> | <\/span>");n.append(e(this.uri,this.name));f.append(n)})}else this.governmentRendering==="compact"&&(f.html(" | "),i.each(n,function(){r.append(i("<option />").val(this.uri).text(this.name))}),r.children().first().attr("selected","selected"),r.change(function(){var n=r.find("option:selected").val(),i=r.find("option:selected").html();t(n,i)}));r.toggle(this.governmentRendering==="compact")},selectGovernment:function(n,t){switch(this.governmentRendering){case"full":var r=i(this._selector).find("span:not(.vvSelectedGovernment)");i.each(r.find("span"),function(){var n=i(this).find("a").html()===t;i(this).toggle(!n)});case"compact":i(this._selector).find("span.vvSelectedGovernment").html(t)}}}}(VoterVoiceUserInterface._onReady,VoterVoiceUserInterface._jQuery),function(n,t){var i;n(function(){i=t()});VoterVoiceUserInterface.prototype.extend({initializeBillTracker:function(t){var r=this;this.displayUpdaters.push(function(n){return n.showLegislation===!0?(r._onKeyLegislationScreen=!1,{".jsBillView":n.showLegislation,".jsKeyLegislation":!n.showLegislation&&r._hasKeyLegislation,".jsIndexView":!n.showLegislation}):(r._onKeyLegislationScreen=!0,{".jsBillView":!1,".jsKeyLegislation":!!r._hasKeyLegislation,".jsIndexView":!0})});this.guardMessages.fetchingGovernments=null;this.guardMessages.fetchingSessions=null;this.guardMessages.searchingProposals="Searching ...";this._application.openingLegislationFull.run(function(n,t){var r=vvui.createBillDetailsDialog(vvui._application.legislationDetail,function(){vvui.navigateBack()}),f,u;r.addClass("vvBody");f=r.find("nav input");f.val("View Other Bills");u=i(".jsBillContent");u.html("");u.append(r);vvui.emitContentLoadedEvent();t()});n(function(){var n,u;r._application.filterSpotlights.run(function(){r._application.findSpotlights(i("#vvSpotlightCategory").val())});r._application.spotlightCategoriesFound.run(function(n){var u=i("#vvSpotlightCategory"),t;if(u.append(i("<option />").val("").text("All Categories")),n.length===0)u.parent().hide();else{for(t=0;t<n.length;t++)u.append(i("<option />").val(n[t]).text(n[t]));u.change(function(){r._application.filterSpotlights.dispatch()})}r._application.filterSpotlights.dispatch()});r._application.spotlightsFound.run(function(n,t){function e(n){var u=i("<table>"),t;for(u.empty(),t=0;t<n.length;t++){function f(n){var e=n.sessionDisplayName,o="<a>"+n.name+"<\/a>",s=n.position===1?'<span class="fas fa-times" aria-hidden="true" title="We oppose this bill"><\/span>':n.position===2?'<span class="fas fa-check" aria-hidden="true" title="We support this bill"><\/span>':'<span class="fas fa-minus" aria-hidden="true"><\/span>',f,u;return f=n.position===1?"vvOpposeContainer":n.position===2?"vvSupportContainer":"vvNeutralContainer",u=i('<tr><td class="vv-name-column">'+o+'<span style="color:#A9A9A9"> | '+e+'<\/span><\/td><td class="'+f+'">'+s+"<\/td><\/tr>"),t%2==0&&u.toggleClass("vvOddRow",!0),u.find("a").click(function(){r.viewLegislation(n.legislativeProposalUrl,n)}),u}u.append(f(n[t]))}return u}function o(n,t){var r=i("<section><\/section>"),f=i.grep(t,function(t){return t.categoryName===n}),o,u;return f.length>0&&(o=e(f),u=i('<header class="vv_bold vv-bill-category-header"><\/header>'),u.text(n===null?"Uncategorized":n),r.append(u),r.append(o)),r}var u=i(".jsSpotlightContainer"),f,s,h,c;if(u.empty(),r._application.hasCategories){for(f=0;f<t.length;f++)s=o(t[f],n),u.append(s);i.grep(n,function(n){return n.categoryName===null}).length>0&&(h=o(null,n),u.append(h))}else c=e(n),u.append(c);n.length==0&&u.append(i("<span>None Found <br/>(Change Jurisdiction or Category above to see more results)<\/span>"));r._hasKeyLegislation=r._application.hasSpotlights();u.parent("section").toggle(r._hasKeyLegislation&&r._onKeyLegislationScreen)});n=new GovernmentsBinder("#vvKeyLegislationJurisdictions");r._application.keyLegislationGovernmentsFound.run(function(t){n.loadGovernments(t,function(n,t){r._application.selectKeyLegislationGovernment(n,t)})});r._application.keyLegislationGovernmentSelected.run(function(t,r){n.selectGovernment(t,r);i("#vvJurisdictions > select").find("option:contains("+r+")").prop("selected",!0);i("#vvKeyLegislationJurisdictions > select").find("option:contains("+r+")").prop("selected",!0)});u=new GovernmentsBinder("#vvJurisdictions");r._application.governmentsFound.run(function(n){u.loadGovernments(n,function(n,t){r._application.selectGovernment(n,t)})});r._application.governmentSelected.run(function(n,t){u.selectGovernment(n,t)});r._application.searching.attach(function(){if(r._application.setSearchText(i("#vvSearchText").val()),r._application._searchText==""){var n=i("#vvSearchResults");n.slideUp();n.empty()}});document.querySelector("#vvSearchText").addEventListener("keyup",function(n){n.key==="Enter"&&(document.querySelector("#forwardLink").click(),n.preventDefault())});t!==null&&(i("#vvSearchText").val(t),r.navigateForward())});this._application.preSearchDisplaySetup.attach(function(){var n=i("#vvSearchResults"),t;n.slideUp();n.empty();t=i("<section><\/section>");t.appendTo(n)});this._application.legislativeProposalsFound.attach(function(n,t){var w=i("#vvSearchResults"),f=w.children("section").eq(0),o=i("<header><\/header>"),s,h,v,c,l,p;if(t)s=i("<div><div>"),s.text("Error fetching search results"),s.css("color","red"),o.appendTo(f),s.appendTo(f);else{h=n.totalResults;v=n.sessions.length===1?n.sessions[0].displayName:n.sessions.length>1?"Multiple Sessions":"";h>0?o.html("Displaying "+n.proposals.length+" of "+h+" bills matched ("+v+")"):o.html("0 bills matched ("+v+")");c=i("<ul><\/ul>");c.addClass("vvLegislationDetailList");function b(n){var t=i("<li><a>"+n.display+"<\/a><\/li>");return t.find("a").click(function(){r.viewLegislation(n.url)}),t}for(l=0;l<n.proposals.length;l++)c.append(b(n.proposals[l]));if(o.appendTo(f),c.appendTo(f),n.proposals.length<h){var e=n.page,y=n.totalPages,u=i("<div><\/div>");u.addClass("pagination");a(r,"«",0,u);e>0&&a(r,"Prev",e-1,u);p=i("<span><\/span>");p.html("Page "+(e+1)+" of "+y);p.appendTo(u);e<y-1&&a(r,"Next",e+1,u);a(r,"»",y-1,u);function a(n,t,r,u){var f=i("<a>"+t+"<\/a>").click(function(){n._application._page=r;n.navigateForward()});f.addClass("paginationLink");f.appendTo(u)}u.appendTo(f)}}w.slideDown()});n(function(){i(".vvBody input").placeholder()})},viewLegislation:function(n,t){this._application.legislationUrl=n;this._application.legislationSpotlight=t;this._application.navigateByName("viewLegislation")},getPage:function(n){this._application.search(n)}})}(VoterVoiceUserInterface._onReady,VoterVoiceUserInterface._jQuery);VoterVoiceStack={},function(n){VoterVoiceStack.startUi=function(t){var i=function(){var r=new VoterVoiceAPI(t.api.url,t.api.key,t.api.language),o,s,h,f,u,i,e,c,l,v;try{if(o=new VoterVoiceTranslator,t.translations!==n)for(s in t.translations)t.translations.hasOwnProperty(s)&&(h=s.substring(0,1).toUpperCase()+s.substring(1),o.phrases[h]=t.translations[s]);return t.api.supportErrorUrl!==n&&r.isSupported()!==!0&&(window.location.href=t.api.supportErrorUrl),window.onbeforeunload=function(){r.requestError=null},r.requestError=function(){setTimeout(function(){alert(o.GetTextForCulture("MessageNetworkError"))},2e3)},t.referrer!==n&&(f=new VisitTracker(r,t.referrer),f.initializeVisit()),t.user!==n&&(u=new UserTracker(r,t.user.rememberMeUrl),t.user.identity!==n&&u.initIdentity(t.user.identity),f!==n&&u.initializeVisit(f),t.user.setBusinessAddressFromLogin===!0&&u.setBusinessAddressFromLogin(),t.user.homeSectionVisible!==!0&&u.skipHomeValidation(),t.user.businessSectionVisible!==!0&&u.skipBusinessValidation()),i=new VoterVoiceApplication(t.stateMachine),f!==n&&i.enableVisitTracking(),t.billTracker!==n&&i.enableBillTracker(r),t.addresses!==n&&(u===n&&(u=new UserTracker(r)),i.enableAddresses(u),t.addresses!==!0&&i.enableAdvocacyAddress()),t.user!==n&&i.enableUserProfile(new EmailAddressService),t.candidates!=n&&i.enableCandidates(r),t.forward!==n&&i.enableForwardToFriend(r,u,new EmailAddressService),t.relationships!==n&&i.enableRelationships(r),t.scorecard!==n&&i.enableScorecard(r),t.advocacy!==n&&(e=new AdvocacyResponseFactory(r),e.friendlyError=function(n,t){JSON.stringify(t).indexOf("500 ")!==-1?alert(o.GetTextForCulture("MessageErrorOccurred")):alert(n)},t.advocacy.viaFacebook===!0&&e.viaFacebook(),(t.advocacy.campaign!==n||t.advocacy.directory!==n)&&(i.enableAdvocacy(e),t.advocacy.campaign!==n&&(t.advocacy.campaign.trackingId!==null&&(e.trackingId=t.advocacy.campaign.trackingId),i.enableCampaignResponse(e)),t.advocacy.directory!==n&&i.enableDirectory(r)),t.advocacy.confirm!==n&&i.enableAdvocacyConfirm(e)),t.newsletters!==n&&i.enableNewsletters(r),t.activities!==n&&i.enableActivities(r),t.voterRegistration!==n&&i.enableVoterRegistration(r),t.petition!==n&&i.enablePetitionResponse(r),t.surveys!==n&&i.enableSurveys(r,t.surveys.sectionCount),t.subscriptions!==n&&i.enableSubscriptions(r,u),t.events!==n&&i.enableEvents(r,u),t.blogPost!==n&&i.enableBlogPost(r,u),t.commentSubject!==n&&i.enableComments(r,u),t.meetings!==n&&(i.enableSurveys(r,u),i.enableMeetings(r,u)),t.scheduleMeeting!==n&&i.enableScheduleMeeting(r,u),t.mapInfo!==n&&i.enableMapApplication(r),i.enableWaitsAndDisplayChanged(),f!==n&&i.initializeVisit(f),t.billTracker!==n&&i.initializeBillTracker(t.billTracker.association,t.billTracker.defaultGovernmentName,t.billTracker.defaultKeyLegislationGovernmentName),t.addresses!==n&&(i.initializeAddresses(),t.addresses!==!0&&t.addresses.disableAdvocacy!==!0&&i.initializeAdvocacyAddress(t.addresses.associationIdName,t.addresses.associationCountry,t.lookUpDistricts,t.addresses.addressQueryParameter,t.addresses.finalRedirect,t.bypassPostalCode)),t.user!==n&&i.initializeUser(t.user.associationIdName,t.user.siteNumber,t.user.associationCountry,t.user.skipLogin,t.user.useInternationalUi),t.candidates!==n&&i.initializeCandidates(t.candidates.associationIdName,t.candidates.address.type,t.candidates.user,t.candidates.address.value),t.forward!==n&&i.initializeForwardToFriend(t.forward.associationId,t.forward.associationIdName,t.forward.userToken,t.forward.referringNugget,t.forward.subject.applicationName,t.forward.subject.id,t.forward.subject.headlines,t.forward.subject.details,t.forward.shareUrl,t.forward.forwardConfirmationCallback),t.relationships!==n&&i.initializeRelationships(t.relationships.associationIdName,t.relationships.countryCodeISO3166_1),t.scorecard!==n&&i.initializeScorecard(t.scorecard.associationIdName),t.events!==n&&i.initializeEvents(t.events.id,t.events.associationIdName,t.events.confirmRegistrationRedirect),t.blogPost!==n&&i.initializeBlogPost(t.blogPost.associationIdName),t.commentSubject!==n&&i.initializeComments(t.commentSubject.type,t.commentSubject.id,t.commentSubject.associationIdName,t.commentSubject.maximumCharacterLength),t.meetings!==n&&i.initializeMeetings({associationIdName:t.meetings.associationIdName,siteNumber:t.meetings.siteNumber,countryCodeISO3166_1:t.meetings.countryCodeISO3166_1,timeZones:t.timeZones},t.meetings.meeting),t.scheduleMeeting!==n&&i.initializeScheduleMeeting(t.scheduleMeeting.associationIdName,t.scheduleMeeting.siteNumber,t.scheduleMeeting.countryCodeISO3166_1,t.scheduleMeeting.confirmationUrl),i.start(),t.advocacy!==n&&(c=t.advocacy.campaign!==n?t.advocacy.campaign.id:null,l=t.advocacy.campaign!==n?t.advocacy.campaign.confirmResponseUrl:null,(t.advocacy.campaign!==n||t.advocacy.directory!==n)&&(i.initializeAdvocacy(c,t.advocacy.associationIdName,l),t.advocacy.campaign!==n&&i.initializeCampaignResponse(!1),t.advocacy.directory!==n&&(t.advocacy.directory.singleOfficial!==n?i.initializeDirectory(t.advocacy.associationIdName,t.advocacy.directory.singleOfficial):t.advocacy.directory.address!==n?i.initializeDirectory(t.advocacy.associationIdName,t.advocacy.directory.address.type,t.advocacy.directory.address.value):i.initializeDirectory(t.advocacy.associationIdName),i.setComposeSectionVisibility(t.advocacy.directory.hideComposeMessage))),t.advocacy.confirm!==n&&i.initializeAdvocacyConfirm(t.advocacy.confirm.campaignId,t.advocacy.confirm.userToken,t.advocacy.confirm.deliveredMessages,t.advocacy.confirm.transactionIds,t.association,t.advocacy.confirm.allowMessage,t.advocacy.confirm.allowTwitter,t.advocacy.confirm.allowFacebook,t.advocacy.confirm.allowPhone)),t.newsletters!==n&&(t.newsletters.associationIdName!==n?i.initializeNewsletters(t.newsletters.associationIdName):i.initializeNewsletters()),t.activities!==n&&i.initializeActivities(t.activities.resource,t.activities.associationIdName,t.activities.associationDisplayName),t.voterRegistration!==n&&i.initializeVoterRegistration(t.voterRegistration.associationIdName),t.petition!==n&&i.initializePetitionResponse(t.petition.id,t.petition.showBackButton,t.petition.hideAlert),t.surveys!==n&&(t.surveys.meetingInformation!==n?i.initializeSurveys(t.surveys.surveyId,t.surveys.associationIdName,t.surveys.siteNumber,t.surveys.countryCodeISO3166_1,t.surveys.meetingInformation,t.surveys.confirmResponseUrl,t.surveys.confirmResponseCallback,t.surveys.hideAlert):i.initializeSurveys(t.surveys.surveyId,t.surveys.associationIdName,t.surveys.siteNumber,t.surveys.countryCodeISO3166_1,n,t.surveys.confirmResponseUrl,t.surveys.confirmResponseCallback,t.surveys.hideAlert)),t.subscriptions!==n&&(t.user!==n&&t.user.associationIdName!==n?i.initializeSubscriptions(t.user.associationIdName,t.subscriptions.unsubscribeCallback):i.initializeSubscriptions(t.subscriptions.unsubscribeCallback)),t.mapInfo!==n&&i.initializeMapApplication(t.associationIdName,t.mapInfo),t.finalRedirect!==n&&(i.finalRedirect=t.finalRedirect),new VoterVoiceUserInterface(i,r,o)}catch(a){v=new VoterVoiceLogger(r);v.logException(a);throw a;}}(),r,u;if(t.scorecard!==n&&i.initializeScorecard(),t.relationships!==n&&i.initializeRelationships(),t.forward!==n&&i.initializeForwardToFriend(),t.advocacy!==n){if(t.advocacy.campaign!==n||t.advocacy.directory!==n){t.advocacy.directory!==n&&(i.initializeDirectory(t.advocacy.directory.hiddenDisplayCategories,t.advocacy.associationIdName),t.advocacy.directory.hideComposeMessage&&i.hideOfficialCheckboxes());var f=!1,e=!1,o=n;t.advocacy.campaign!==n&&(f=t.advocacy.campaign.enableMessageSetChangedAlert,e=t.advocacy.campaign.useNoDeliveriesMessage,t.advocacy.campaign.forwardUrl!==n&&(o=t.advocacy.campaign.forwardUrl));i.initializeAdvocacy(f,e,o)}t.advocacy.confirm!==n&&i.initializeAdvocacyConfirm()}if(t.newsletters!==n&&i.initializeNewsletters(),t.activities!==n&&i.initializeActivities(t.activities.resource,t.activities.associationDisplayName),t.voterRegistration!==n&&i.initializeVoterRegistration(),t.petition!==n&&i.initializePetitions(),t.user!==n&&(t.user.readOnly!==!0&&i.initializeUserEmail(),t.addresses!==n)){var s=t.advocacy!==n&&t.advocacy.campaign!==n?t.advocacy.campaign.startNonRegisteredMatching:t.user.identity!==n?t.user.identity.id===0:!1,h=t.user.hideLoginLink!==n?t.user.hideLoginLink:!1,c=t.user.confirmEmailChange!==n?t.user.confirmEmailChange:!0;i.initializeUser!==n&&i.initializeUser(s,t.user.weaklyMatchedAddressTypes,c);i.initializeUserDisplay!==n&&i.initializeUserDisplay(h)}return t.candidates!==n&&i.initializeCandidates(t.candidates.hiddenDisplayCategories),t.addresses!==n&&(t.addresses===!0?(r={bindUserAddresses:!0},t.user!==n&&(u=t.user.associationCountry)):(r=t.addresses.ui,u=t.addresses.associationCountry),i.initializeAddresses(r,u),(r.postalCodeSelector!==n||r.addressIdPrefix!==n)&&i.initializeAdvocacyAddress(r.postalCodeSelector)),t.billTracker!==n&&i.initializeBillTracker(t.billTracker.initialSearch),t.surveys!==n&&(t.surveys.showPercentagesOnly!==n?i.initializeSurveys({countryCodeISO3166_1:t.surveys.countryCodeISO3166_1,showPercentagesOnly:t.surveys.showPercentagesOnly,renderTitle:t.surveys.renderTitle,timeZones:t.timeZones},t.surveys.meetingInformation):i.initializeSurveys({countryCodeISO3166_1:t.surveys.countryCodeISO3166_1,showPercentagesOnly:n,renderTitle:t.surveys.renderTitle,timeZones:t.timeZones},t.surveys.meetingInformation)),t.subscriptions!==n&&i.initializeSubscriptions(),t.events!==n&&i.initializeEvents(t.events.country),t.blogPost!==n&&i.initializeBlogPost(),t.commentSubject!==n&&i.initializeComments(t.commentSubject.maximumCharacterLength,t.commentSubject.commentsRequireApproval),t.meetings!==n&&i.initializeMeetings(t.meetings.associationIdName,t.meetings.siteNumber,t.meetings.displaySettings,t.meetings.detailsUrlTemplate,t.meetings.meeting),t.scheduleMeeting!==n&&i.initializeScheduleMeeting(t.scheduleMeeting.meetingId,t.scheduleMeeting.countryCodeISO3166_1,t.scheduleMeeting.isReadOnlyInvitation,t.timeZones),t.mapInfo!==n&&i.initializeMapUi(t.mapInfo),i.initialize(),i}}(),function(n){n.fn.sectionedTabs=function(t){function u(n,t,r){n.click(function(u){var e=-1,f=i.find(".vv-tab-menu-item-active");(e=f.attr("vv-tab-section-index"),r!=e)&&(f.removeClass("vv-tab-menu-item-active"),i._options.sectionSelector!==undefined?i.find(i._options.sectionSelector).hide():i.children().slice(2).hide(),t.slideDown(),f=n.find(".vv-tab-menu-item"),f.addClass("vv-tab-menu-item-active"),i._options.activate!==undefined&&i._options.activate(u,t,f))})}function f(){var o,s,l,t,f,e,y;for(i.find(".vv-tab-menu-spacer").remove(),o=i._options.headerDefinitionSelector!==undefined?i.find(i._options.headerDefinitionSelector):i.find("ul").first().children(),o.parent().hide(),s=i._options.sectionSelector!==undefined?i.find(i._options.sectionSelector):r.length===0?i.children().slice(1):i.children().slice(2),l=!1,r.length===0?(r=n('<div class="vv-tab-menu"><\/div>'),l=!0,s.length>0?r.insertBefore(s.eq(0)):i.prepend(r)):r.empty(),t=0;t<o.length;t++){var a=n(o[t]),c=n(s[t]),h=n('<div class="vv-tab-menu-item-container"><\/div>'),v;v=i._options.headerDefinitionSelector!==undefined?a.removeAttr(i._options.headerDefinitionSelector.replace(/[\.#]/gi,"")).html():a.html();h.append(n('<div class="vv-tab-menu-item-spacer"><\/div>').append(n('<div class="vv-tab-menu-item"><\/div>').attr("vv-tab-section-index",t).html(v)));r.append(h);c.attr("vv-tab-section-index",t);u(h,c,t);t===0?h.find(".vv-tab-menu-item").addClass("vv-tab-menu-item-active"):c.hide()}if(f=r.children(),f.length<2&&r.hide(),i._options.blockBreakindex!==undefined&&i._options.blockBreakindex>0&&f.length>i._options.blockBreakindex+1)for(e=0;e<f.length;e++)y=f.eq(e),(e+1)%(i._options.blockBreakindex+1)==0&&e!==f.length-1&&n('<div class="vv-tab-menu-spacer"><\/div>').insertAfter(y)}typeof n=="undefined"&&(n=jQuery());var i=n(this),r=i.find(".vv-tab-menu");t!==undefined&&(i._options=t);f()}}(jQuery)