PageSourceSearch

https://privote.live/_next/static/chunks/app/polls/page-ee3134308d876355.js

js privote.live collected 2026-10-04 13:17:11 UTC 8,557 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6223],{9800:e=>{e.exports={"polls-list-item":"PollItem_polls-list-item__7FguV","poll-status":"PollItem_poll-status__WxcFB",notStarted:"PollItem_notStarted__5cC2d",ended:"PollItem_ended__3g_iV",container:"PollItem_container__X54Jg",left:"PollItem_left__99Ce_",right:"PollItem_right__cM2Gn",heading:"PollItem_heading__Dzwe8",viewButton:"PollItem_viewButton__907Ty"}},19658:(e,t,r)=>{"use strict";r.d(t,{A:()=>p});var n=r(95155),s=r(66789),a=r(83717),i=r(7132);function l(e){return new Date(1e3*Number(e)).toLocaleString(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}var o=r(66766),c=r(6874),d=r.n(c);r(12115);var h=r(9800),u=r.n(h);let p=e=>{let{poll:t}=e;return(0,n.jsx)("li",{className:u()["polls-list-item"],children:(0,n.jsxs)(d(),{href:"/polls/".concat(t.id),children:[(0,n.jsxs)("div",{className:"".concat(u()["poll-status"]," ").concat(t.status===a.Wf.OPEN?u().live:t.status===a.Wf.NOT_STARTED?u().notStarted:u().ended),children:[(0,n.jsx)(o.default,{src:s.A,alt:"circle"}),t.status===a.Wf.OPEN?"Live now":t.status===a.Wf.NOT_STARTED?"Not Started":"Ended"]}),(0,n.jsxs)("div",{className:u().container,children:[(0,n.jsxs)("div",{className:u().left,children:[(0,n.jsxs)("div",{className:u().heading,children:[(0,n.jsxs)("h2",{children:[t.name," "]}),i._n[t.policyTrait]&&(0,n.jsx)(o.default,{src:i._n[t.policyTrait],width:26,height:26,alt:"icon"})]}),(0,n.jsxs)("p",{children:[Number(t.voteOptions)," Options"]})]}),(0,n.jsxs)("div",{className:u().right,children:[(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{children:"Start Time"}),(0,n.jsx)("span",{children:":"}),(0,n.jsx)("span",{children:l(t.startDate)})]}),(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{children:"End Time"}),(0,n.jsx)("span",{children:":"}
1),(0,n.jsx)("span",{children:l(t.endDate)})]})]})]}),t.status===a.Wf.RESULT_COMPUTED&&(0,n.jsx)(d(),{href:"/poll/".concat(t.id),className:u().viewButton,children:(0,n.jsx)("p",{children:"View Results"})})]})})}},51262:e=>{e.exports={"polls-list":"PollsList_polls-list__WjdcN",loadMoreButton:"PollsList_loadMoreButton__0Ltbd","spinner-wrapper":"PollsList_spinner-wrapper__EnwwD","empty-state":"PollsList_empty-state__p9ZJ9","error-state":"PollsList_error-state__kaAoX"}},66789:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n={src:"/_next/static/media/circle.3f8a44ea.svg",height:5,width:4,blurWidth:0,blurHeight:0}},68754:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>P});var n=r(95155),s=r(72151),a=r(83583),i=r(12115),l=r(19658),o=r(51262),c=r.n(o);let d=e=>{let{searchTerm:t}=e,{data:r,fetchNextPage:o,hasNextPage:d,isFetchingNextPage:h,isLoading:u,isError:p,error:_,refetch:m}=(0,a.A)({searchTerm:t});return u?(0,n.jsx)("div",{className:"spinner-wrapper",children:(0,n.jsx)("div",{className:"spinner large"})}):p?(0,n.jsx)(s.W5,{title:"Error Loading Polls",error:_,retryAction:m}):!(null==r?void 0:r.pages)||r.pages.every(e=>0===e.length)?(0,n.jsx)(s.pp,{title:"No Polls Found",description:"There are no polls for you"}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("ul",{className:c()["polls-list"],children:null==r?void 0:r.pages.map((e,t)=>(0,n.jsx)(i.Fragment,{children:e.map(e=>(0,n.jsx)(l.A,{poll:e},e.id))},t))}),d&&(0,n.jsx)(s.$n,{action:()=>o(),disabled:h,className:c().loadMoreButton,children:h?(0,n.jsx)(s.w3,{size:"small",text:"Loading...",variant:"check"}):"Load More"})]})},h={src:"/_next/static/media/search.22503f36.svg",height:21,width:21,blurWidth:0,blurHeight:0},u={src:"/_next/static/media/send.0cf02853.svg",height:28,width:29,blurWidth:0,blurHeight:0};r(66789);var p=r(66766),_=r(85004),m=r.n(_);let g=e=>{let{searchTerm:t,setSearchTerm:r,onSearch:s}=e;return(0,n.jsxs)("div",{className:m().searchContainer,children:[(0,n.jsx)(p.default,{src:h,alt:"Search",className:m().searchIcon}),(0,n.jsx)("input",{type:"text",placeholder:"Search",value:t,onChange:e=>r(e.target.value),onKeyDown:e=>{"Enter"===e.key&&s()},className:m().searchInput}),(0,n.jsx)("button",{onClick:s,className:m().sendButton,children:(0,n.jsx)(p.default,{src:u,alt:"Send"})})]})};var x=r(88163),f=r.n(x);let P=()=>{let[e,t]=(0,i.useState)(""),[r,s]=(0,i.useState)("");return(0,n.jsx)("div",{className:f().container,children:(0,n.jsx)("div",{className:f()["poll-wrapper"],children:(0,n.jsxs)("div",{className:f()["polls-container"],children:[(0,n.jsx)("h2",{children:"Polls"}),(0,n.jsxs)("div",{className:f()["search-poll-container"],children:[(0,n.jsx)(g,{searchTerm:e,setSearchTerm:t,onSearch:()=>{s(e)}}),(0,n.jsx)(d,{searchTerm:r})]})]})})})}},83583:(e,t,r)=>{"use strict";r.d(t,{A:()=>d,q:()=>o});var n=r(95863),s=r(83717),a=r(79038),i=r(99145),l=r(41491);function o(e){let t=Math.round(new Date().getTime()/1e3),r=parseInt(e.startDate,10),n=parseInt(e.endDate,10);return r>t?s.Wf.NOT_STARTED:n>t?s.Wf.OPEN:s.Wf.CLOSED}let c=async e=>{let{pageParam:t,queryKey:r}=e,[,s,i,l,c,d,h,u]=r,p={};i&&(p.name_contains_nocase=i),l&&(p.owner=l),u&&(p.endDate_gt=Math.round(Date.now()/1e3),p.startDate_lt=Math.round(Date.now()/1e3));let _={first:h||10,skip:t*(h||10),where:Object.keys(p).length>0?p:void 0,orderBy:c||"createdAt",orderDirection:d||"desc"};return(await (0,a.G)([s,n.J,_])).polls.map(e=>({...e,status:o(e)}))},d=e=>{let{searchTerm:t="",ownerAddress:r,orderBy:n,orderDirection:s,limit:a=10,isTrending:o=!1}=e,{subgraphUrl:d}=(0,l.A)();return(0,i.q)({queryKey:["polls",d,t,r,n,s,a,o],queryFn:c,initialPageParam:0,getNextPageParam:(e,t)=>{if(!(e.length<a))return t.length}})}},85004:e=>{e.exports={searchContainer:"SearchBar_searchContainer__d0PLy",searchIcon:"SearchBar_searchIcon__nL2AG",searchInput:"SearchBar_searchInput___QDSC",sendButton:"SearchBar_sendButton__MxFyN"}},88163:e=>{e.exports={"main-page":"home_main-page__ygRzE","poll-wrapper":"home_poll-wrapper__SOX85","polls-container":"home_polls-container__jkzuI","search-poll-container":"home_search-poll-container__M1Hdy"}},89161:(e,t,r)=>{Promise.resolve().then(r.bind(r,68754))},95863:(e,t,r)=>{"use strict";r.d(t,{J:()=>l,i:()=>o});var n=r(15933),s=r(82935);function a(){let e=(0,n._)(["\n  query GetPolls(\n    $first: Int!\n    $skip: Int!\n    $where: Poll_filter\n    $orderBy: Poll_orderBy\n    $orderDirection: OrderDirection\n  ) {\n    polls(first: $first, skip: $skip, orderBy: $orderBy, orderDirection: $orderDirection, where: $where) {\n      id\n      pollId\n      name\n      startDate\n      endDate\n      voteOptions\n      owner\n      policyTrait\n    }\n  }\n"]);return a=function(){return e},e}function i(){let e=(0,n._)(["\n  query GetPoll($id: Bytes!) {\n    poll(id: $id) {\n      id\n      pollId\n      name\n      coordinatorPublicKey\n      description\n      pollType\n      startDate\n      endDate\n      duration\n      voteOptions\n      mode\n      policyTrait\n      policyData\n      totalSignups\n      numMessages\n      owner\n      createdAt\n      options {\n        id\n        name\n        description\n        link\n        cid\n      }\n      users {\n        id\n        createdAt\n        accounts {\
1n          id\n          nullifier\n          voiceCreditBalance\n          createdAt\n        }\n      }\n      maci {\n        id\n      }\n    }\n  }\n"]);return i=function(){return e},e}let l=(0,s.J1)(a()),o=(0,s.J1)(i())},99145:(e,t,r)=>{"use strict";r.d(t,{q:()=>l});var n=r(76347),s=r(64275),a=class extends n.${constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:(0,s.PL)()})}getOptimisticResult(e){return e.behavior=(0,s.PL)(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){let{state:r}=e,n=super.createResult(e,t),{isFetching:a,isRefetching:i,isError:l,isRefetchError:o}=n,c=r.fetchMeta?.fetchMore?.direction,d=l&&"forward"===c,h=a&&"forward"===c,u=l&&"backward"===c,p=a&&"backward"===c;return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,s.rB)(t,r.data),hasPreviousPage:(0,s.RQ)(t,r.data),isFetchNextPageError:d,isFetchingNextPage:h,isFetchPreviousPageError:u,isFetchingPreviousPage:p,isRefetchError:o&&!d&&!u,isRefetching:i&&!h&&!p}}},i=r(64079);function l(e,t){return(0,i.t)(e,a,t)}}},e=>{var t=t=>e(e.s=t);e.O(0,[4106,7284,8956,5795,5479,6711,512,6827,5760,1973,6596,7869,8520,9268,8451,153,9934,4799,8441,1684,7358],()=>t(89161)),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.