PageSourceSearch

https://app.buddyup3000.com/assets/vote-team-points-result-CDw-h9ic.js

js buddyup3000.com collected 2026-10-07 03:22:21 UTC 3,169 bytes, 54 lines download raw bytes

1import{h as n,i as r,aq as v,q as l,ap as m,j as d,k as h}from"./index-Db445JXE.js";import{E as p}from"./routeChild-BNjE9EJU.js";class c extends p{static get template(){return n`
2      <style include="shared-styles">
3        .css-class {
4          margin-left: 1em;
5          margin-right: 1em;
6        }
7        .title {
8          font-size: 5vw;
9        }
10        .description {
11          font-size: 4vw;
12        }
13        .flex {
14          display: flex;
15        }
16        .left-points {
17          margin-left: 1em;
18        }
19        .teams {
20          margin: 1em;
21          font-size: 5vw;
22        }
23        .team {
24          margin: 0.5em 0;
25          display: flex;
26        }
27        .point {
28          margin-left: auto;
29        }
30      </style>
31
32      <article class="css-class">
33        <template is="dom-if" if="[[voteNotExists]]">
34          この投票IDは存在しません。
35        </template>
36
37        <template is="dom-if" if="[[!voteNotExists]]">
38          <h2 class="title">投票結果</h2>
39          <div class="flex description">
40            <div>総投票ポイント</div>
41            <div class="left-points">[[allPoints]]点</div>
42          </div>
43
44          <div class="teams">
45            <template is="dom-repeat" items="[[teams]]" as="team">
46              <div class="team">
47                <div class="label">[[team.name]]</div>
48                <div class="point">[[team.points]]</div>
49              </div>
50            </template>
51          </div>
52        </template>
53      </article>
54    `}constructor(){super(),this.voteNotExists=!0,this.allPoints=0}static get properties(){return{voteid:{type:String}}}static get observers(){return["getAllVotes(user,event,voteid)"]}async getAllVotes(){if(!this.user||!this.user.uid||!this.event||!this.event.id)return;if(this.getVoteSetting(),!this.voteid){this.teams=[];return}if(this.voteid===this.prevVoteid&&this.user.uid===this.prevUid&&this.event.id===this.prevEventid)return;this.watcher&&this.watcher(),this.prevEventid=this.event.id,this.prevUid=this.user.uid,this.prevVoteid=this.voteid;const o=await this.getTeams(),i=r("events/{eid}/members/{uid}",{eid:this.event.id});this.watcher=v(i,a=>{const s=[];this.allPoints=0,o.forEach(t=>{t.points=0,s.push(Object.assign({},t))}),a.docs.map(t=>Object.assign({id:t.id},(t.data().votes||{})[this.voteid]||{})).forEach(t=>{s.forEach(e=>{e.points+=Number((t.teams||{})[e.id]||0)||0,this.allPoints+=Number((t.teams||{})[e.id]||0)||0})}),s.sort((t,e)=>{if(t.points>e.points)return-1;if(t.points===e.points)return 0;if(t.points<e.points)return 1}),this.set("teams",s)},a=>{console.error("error in event/pages/vote-team-points.js getMyVote: ",a)})}getVoteSetting(){this.event.pages.votes[this.voteid]?this.voteNotExists=!1:this.voteNotExists=!0,this.vote=this.event.pages.votes[this.voteid],this.vote.id=this.voteid,this.myPoints=this.vote.initialPoints}async getTeams(){const o=l(r("teams/{teamid}",{}),m("eventids","array-contains",this.event.id));try{return(await d(o)).docs.map(s=>h(s))}catch(i){console.error("error in event/pages/vote-team-points-result.js getTeams: ",i)}}}window.customElements.define("event-pages-vote-team-points-result",c);

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.