PageSourceSearch

https://cdn.archidekt.com/_next/static/chunks/1092-25161386a0a917fe.js

js archidekt.com collected 2026-10-03 21:39:33 UTC 14,935 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1092],{618:e=>{e.exports={container:"contestSubmission_container__K_rxE",content:"contestSubmission_content__mcsfR",controls:"contestSubmission_controls__Nd2AE"}},12223:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var s=n(36601),o=n(81639);class a extends s.B{create=async e=>super.post("/api/comments/contestSubmission/",{owner:e.ownerId,parentPost:e.parentPostId,deck:e.deckId});remove=async e=>super.delete(`/api/comments/contestSubmission/delete/${e}/`,void 0,!0);list=async(e,t)=>super.get(`/api/comments/contestSubmission/decks/${e}/?${o.stringify(t)}`);review=async(e,t)=>super.patch(`/api/comments/contestSubmission/reviewer/${e.id}/`,{...e,reviewed:t})}let r=new a},28667:e=>{e.exports={flex:"flair_flex__5YtZD",flair:"flair_flair__V2vjH"}},44641:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var s=n(81639),o=n(36601),a=n(64708);class r extends o.B{unpackComments=e=>({...e,children:e.children?e.children.results?e.children.results.map(e=>this.unpackComments(e)):e.children.map(e=>this.unpackComments(e)):[],nextPage:"",activePage:e.page?e.page:1,featured:e.featured||null,type:e.type?e.type:0});list(e={}){return this.get(`/api/comments/?${s.stringify(e)}`)}forums(){return super.get("/api/comments/forum/")}sections(e){let t=(0,a.p)(e);return super.get(`/api/comments/${t}`)}hardDelete(e){return super.delete(`/api/comments/${e.id}/`)}details(e,t=1,n="-points"){return super.get(`/api/comments/${e}/?page=${t}&orderBy=${n}`).then(this.unpackComments)}update(e){return super.patch(`/api/comments/${e.id}/`,{text:e.text,archived:e.archived,locked:e.locked}).then(this.unpackComments)}vote(e,t){return super.put(`/api/comments/vote/${e.id}/`,t)}createComment(e,t){return super.post("/api/comments/createComment/",{parent:e,text:t}).then(this.unpackComments)}createGlobalNotification(e,t){return super.post("/api/comments/createGlobalNotification/",{threadId:e,text:t})}editCommentText(e,t){return super.patch(`/api/comments/${e}/`,{text:t,locked:!0}).then(this.unpackComments)}}let i=new r},61092:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>J,dt:()=>G,C$:()=>K});var s=n(75038),o=n(76430),a=n(40120),r=n(92910),i=n(44641),c=n(21159),l=n(15918),d=n(98381),m=n(39642),u=n(22335),h=n(81993),p=n(3957),_=n(97359),b=n(84919),x=n(98611),g=n(8682),v=n(82185),C=n(28667),A=n.n(C);let k={alpha:"Alpha User",common:"Common Patron",uncommon:"Uncommon Patron",rare:"Rare Patron",mythic:"Mythic Patron",masterpiece:"Masterpiece Patron",moderator:"Archidekt Moderator"},f=({comment:e})=>{let t=(0,v.GV)(e=>e.deck.ownerid),n=(e=>{if(!e)return null;let t=e.split("/"),n=t[t.length-1];for(let e of Object.keys(k))if(n.startsWith(e))return k[e];return null})(e.owner.frame);return t===e.owner.id?(0,s.jsx)("div",{className:A().flair,children:"(Deck owner)"}):n?(0,s.jsxs)("div",{className:A().flair,children:["(",n,")"]}):null};var w=n(65678),j=n(49435),N=n(47116),y=n(72770),I=n(78393),$=n(63299),S=n.n($);let M=({comment:e,style:t={},className:n="",onCommentChange:v,onCollapse:C,archived:A,locked:k,newsPostStyling:$=!1,onMinimize:M})=>{let[{tbId:R,tbR:U=[]}]=(0,l.A)(["tbId","tbR"]),P=(0,d.useRouter)(),[D,T]=(0,o.useState)(!1),[O,L]=(0,o.useState)(e.text),[B,E]=(0,o.useState)(!1),[W,z]=(0,o.useState)(!1);(0,o.useEffect)(()=>L(e.text),[e]);let V=t=>{let n=e.userInput!==m.gM.NONE&&(e.userInput===m.gM.UP&&t||e.userInput===m.gM.DOWN&&!t),s=n?m.gM.NONE:t?m.gM.UP:m.gM.DOWN,o=e.points;e.userInput===m.gM.NONE&&t&&(o+=1),e.userInput!==m.gM.NONE||t||(o-=1),e.userInput===m.gM.UP&&t&&(o-=1),e.userInput===m.gM.DOWN&&t&&(o+=2),e.userInput!==m.gM.UP||t||(o-=2),e.userInput!==m.gM.DOWN||t||(o+=1),i.A.vote(e,{remove:n,up:t}).then(()=>v({...e,userInput:s,points:o})).catch(()=>c.A.create("Oops! Something went wrong voting. Unable to vote right now"))},F=()=>{P.push("/login")},Q=U.includes(u.gg.MOD),Z=!A&&Q||`${e.owner.id}`===R,K=!A&&Q,G=A||k,H=e.userInput===m.gM.UP,J=e.userInput===m.gM.DOWN,Y=new Date(e.createdAt),q=new Date(e.editedAt||""),X=e.editedAt&&q.getTime()-6e4>Y.getTime();return(0,s.jsxs)("div",{className:`${S().container} ${$?S().newsPost:""} ${n}`,style:t,children:[(0,s.jsx)("div",{className:S().avatar,onClick:e=>{!C||$||C()},children:(0,s.jsx)(_.A,{src:e.owner.avatar})}),(0,s.jsxs)("div",{className:S().content,children:[(0,s.jsx)("div",{children:(0,s.jsxs)("div",{className:S().metaInfo,children:[(0,s.jsxs)(r.A,{href:`/u/${(0,I.O)(e.owner.username)}`,className:S().username,children:[(0,s.jsx)(a.A,{name:"user",className:S().userIcon}),(0,s.jsx)(j.A,{className:S().smallUserIcon,src:e.owner.avatar,alt:`${e.owner.username} avatar`}),e.owner.username,(0,s.jsx)(f,{comment:e})]})," ",(0,s.jsx)("button",{onClick:M,className:S().secretMinimizeCommentButton,children:(0,y._)(e.createdAt)})]})}),!D&&(0,s.jsx)(b.A,{className:S().commentBody,value:e.text,readOnly:!0}),D&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(b.A,{autofocus:!0,value:O,onChange:L,onSubmit:()=>i.A.update({...e,text:O}).then(e=>{T(!1),v(e)}).catch(()=>c.A.create("Unable to update comment at this time")),onCancel:()=>T(!1)})}),X&&(0,s.jsxs)("div",{className:S().edited,children:["Edited ",q.toLocaleStr
1ing()," "]}),-1!==e.owner.id&&(0,s.jsxs)("div",{className:S().controls,children:[(0,s.jsxs)("div",{className:S().gap,children:[(0,s.jsx)(N.yM,{onClick:()=>R?E(!0):F(),icon:"reply",disabled:G,children:"Reply"}),(0,s.jsx)(N.yM,{disabled:G,onClick:()=>R?V(!0):F(),icon:"thumbs up",className:H?S().upvote:""}),(0,s.jsx)("span",{children:e.points}),(0,s.jsx)(N.yM,{disabled:G,onClick:()=>R?V(!1):F(),icon:"thumbs down",className:J?S().downvote:""})]}),(0,s.jsx)(g.A,{triggerIcon:"ellipsis horizontal",menuClassName:S().options,options:[{label:"Minimize",icon:"minus circle",onClick:M,hidden:!M},{type:"spacer",hidden:!M},{label:"Share",icon:"share alternate",onClick:()=>{let t=`${window.location.origin}/forum/thread/${e.id}`,n={title:e.title||"Check out this comment on Archidekt!",text:e.text,url:t};if(navigator.share&&navigator.canShare(n))return navigator.share(n);navigator.clipboard.writeText(t),c.A.create("Comment link copied!","","success")}},{label:"Root post",icon:"tree",onClick:()=>{let t=window.open(`/forum/thread/${e.originalPost}`,"_blank");t?.focus()},hidden:!e.originalPost},{label:"Parent post",icon:"level up alternate",onClick:()=>{let t=window.open(`/forum/thread/${e.parent}`,"_blank");t?.focus()},hidden:!e.parent},{label:"Archive",icon:"archive",onClick:()=>{i.A.update({...e,archived:!0}).then(v).then(()=>c.A.create("Thread has been archived","Comment Service","success")).catch(()=>c.A.create("Unable to archive comment at this time"))},hidden:!K},{label:"Lock thread",icon:"lock",onClick:()=>{i.A.update({...e,locked:!0}).then(v).then(()=>c.A.create("Thread has been locked","Comment Service","success")).catch(()=>c.A.create("Unable to lock comment at this time"))},hidden:!Q},{label:"Lock user",icon:"gavel",onClick:()=>{let t=`Are you sure you want to lock user '${e.owner.username}'? Doing so will prevent them from doing anything on the site until unlocked, but will not delete any of their existing data.`;window.confirm(t)&&p.A.lock(e.owner.id).then(()=>c.A.create("User has been locked","User Service","success")).catch(()=>c.A.create("Unable to lock user at this time","User Service"))},hidden:!Q},{label:"Edit",icon:"edit",onClick:()=>T(!D),hidden:!Z},{label:"Delete",icon:"trash alternate",onClick:()=>{if(e.children.length)return c.A.create("Unable to delete comment with children");let t={owner:{id:-1,username:"removed",avatar:""},text:h.cR};i.A.hardDelete(e).then(()=>v({...e,...t})).catch(()=>c.A.create("Unable to delete comment"))},hidden:!Z},{label:"Report",icon:"flag outline",onClick:()=>z(!0)}]})]}),(0,s.jsx)(x.A,{show:B,parentComment:e,onClose:()=>E(!1),onReplySubmitted:v}),(0,s.jsx)(w.A,{open:W,onClose:()=>z(!1),type:"Comment",header:"Report comment",url:`/forum/thread/${e.id}`})]})]})};var R=n(68835),U=n(69433),P=n(41944),D=n(12223),T=n(4444),O=n(7648),L=n(75249),B=n(618),E=n.n(B);let W=({open:e,onClose:t,threadId:n})=>{let a=(0,d.useRouter)(),[{tbId:r}]=(0,l.A)(["tbId"]),[i,m]=(0,o.useState)(!1),[u,p]=(0,o.useState)([]),[_,x]=(0,o.useState)(),[g,v]=(0,o.useState)(h.cR),[C,A]=(0,o.useState)(!1),k=async()=>{if(!_)return void c.A.create("Choose a deck to submit","Contest submission","warning");if(g===h.cR)return void c.A.create("Deck summary needed for submission","Contest submission","warning");m(!0);try{await P.A.update(_.id,{description:g}),await D.A.create({ownerId:r,parentPostId:Number(n),deckId:_.id}),U.A.signalEvent("Contest submission created"),c.A.create(`${_.name} submitted`,"Contest submission","success"),t(),a.push(`/contest/${n}/`)}catch(e){c.A.create(e,"Contest submission","error")}finally{m(!1)}};return(0,o.useEffect)(()=>{!e||r&&(m(!0),P.A.listV3({ownerId:r}).then(e=>p(e.results)).catch(()=>c.A.create("Unable to fetch decks","Contest submissions","error")).finally(()=>m(!1)))},[e]),(0,s.jsxs)(T.A,{open:e,onClose:t,className:E().container,children:[i&&(0,s.jsx)(L.A,{}),!i&&(0,s.jsxs)("div",{className:E().content,children:[(0,s.jsx)("h3",{children:"Submit to contest"}),(0,s.jsx)(O.A,{className:E().decks,inlineHeader:!0,header:"Choose one of your decks",value:_?.id,placeholder:"Choose one of your decks",options:u.map(e=>({label:e.name,id:`${e.id}`,onClick:()=>{x(e),A(!0),P.A.details(e.id).then(e=>v(""===e.description?h.cR:e.description)).catch(t=>c.A.create(`Unable to fetch existing deck description for ${e.name}`,"Contest submission","error")).finally(()=>A(!1))}}))}),(0,s.jsx)(b.A,{header:"Deck description",value:g,onChange:v,placeholder:"This deck does so many cool things, this is what they are...",disable:C}),(0,s.jsx)("div",{className:E().controls,children:(0,s.jsx)(R.A,{color:"green",onClick:k,children:"Create contest submission"})})]})]})};var z=n(80920),V=n.n(z);let F=({threadId:e,showAll:t})=>{let n=(0,d.useRouter)(),[{tbId:a}]=(0,l.A)(["tbId"]),[i,c]=(0,o.useState)(!1);return(0,s.jsxs)("div",{className:V().container,children:[(0,s.jsx)("div",{className:V().options,children:(0,s.jsx)("div",{className:V().submitButton,children:a?(0,s.jsx)(R.A,{color:"orange",onClick:()=>c(!0),children:"Submit a deck to this contest"}):(0,s.jsx)(r.A,{href:"/login",className:V().loginLink,children:(0,s.jsx)(R.A,{color:"orange",children:"Login to submit a deck"})})})}),(0,s.jsxs)("div",{className:V().tabs,children:[(0,s.jsx)(r.A,{className:"/contest/[threadId]"===n.pathname?V().selected:"",href:`/contest/${e}/`,children:"Submissions"}),(0,s.jsx)(r.A,{className:"/contest/discussion/[threadId]"===n.pathname?V().selected:"",href:`/contest/discussion/${e}/`,children:"Discussion"})]}),(0,s.jsx)(W,{open:i,onClose:()=>c(!1),threadId:e})]})};var Q=n(72881),Z=n.n(Q);let K=(e,t)=>e.id===t.id?t:{...e,children:e.children.map(e=>K(e,t))},G=e=>
1e.children?{...e,userInput:0,children:e.children.map(e=>G(e))}:{...e,userInput:0},H=({comment:e,noCollapse:t,onCommentUpdate:n,children:l,className:d="",level:m=0,archived:u=!1,locked:h=!1,newsPostStyling:p=!1,rootPageComment:_=!1,noPaginatorView:b=!1,contestPage:x=!1,noChildren:g=!1,commentClassName:v,noMarginOnFirstChildren:C=!1})=>{let A=e.points<-2&&!_,[k,f]=(0,o.useState)(A),w=async()=>{await i.A.details(e.id).then(n).catch(()=>c.A.create("Unable to fetch child comments"))};return k?(0,s.jsxs)("button",{className:Z().uncollapse,onClick:()=>f(!1),children:[(0,s.jsxs)("span",{className:Z().collapsedLeft,children:[(0,s.jsx)(a.A,{name:"circle-plus"}),e.owner.username,A&&(0,s.jsx)("span",{className:Z().belowThreshold,children:"(Comment scored below threshold)"})]})," ",(0,s.jsxs)("span",{className:Z().collapsedRight,children:["(Replies ",e.childrenCount,")"]})]}):(0,s.jsxs)("div",{className:`${Z().thread} ${_||C&&1===m?Z().noMargin:""} ${d}`,children:[void 0===l?(0,s.jsx)(M,{comment:e,onCommentChange:n,onCollapse:0!==m?()=>f(!0):void 0,archived:u,locked:h,newsPostStyling:p,className:v,onMinimize:t?void 0:()=>f(!0)}):(0,s.jsx)(s.Fragment,{children:l}),x&&(0,s.jsx)(F,{threadId:e.id,showAll:g}),!g&&e.children.map((e,t)=>(0,s.jsx)(H,{comment:e,onCommentUpdate:n,level:m+1,archived:u,noMarginOnFirstChildren:C},t)),e.children.length!==e.childrenCount&&m<6&&!_&&(0,s.jsxs)("button",{className:Z().loadMore,onClick:w,children:["Load child comments ",(0,s.jsx)(a.A,{name:"level down"})]}),e.children.length!==e.childrenCount&&m>=6&&(0,s.jsxs)(r.A,{className:Z().loadMore,href:`/forum/thread/${e.id}`,children:["Continue this thread on new page ",(0,s.jsx)(a.A,{name:"arrow right"})]}),b&&0===m&&e.childrenCount>e.children.length&&!!e.deck?.id&&(0,s.jsx)("div",{className:Z().center,children:(0,s.jsx)(r.A,{href:`/forum/thread/${e.id}`,children:(0,s.jsx)(R.A,{color:"orange",children:"View all comments"})})})]})},J=H},63299:e=>{e.exports={flex:"comment_flex__pM_jQ",container:"comment_container__m2JD4",avatar:"comment_avatar__o8OnY",username:"comment_username__nBdNk",metaInfo:"comment_metaInfo__2pPXC",controls:"comment_controls__OLMKm",newsPost:"comment_newsPost__DQ3bA",content:"comment_content__pRyDB",userIcon:"comment_userIcon__LIbDZ",smallUserIcon:"comment_smallUserIcon__nOKbv",gap:"comment_gap__wnoMW",upvote:"comment_upvote__4W75v",downvote:"comment_downvote___ITFJ",edited:"comment_edited__MV_xw",commentBody:"comment_commentBody__hBTez",secretMinimizeCommentButton:"comment_secretMinimizeCommentButton__xuIkH",options:"comment_options__mtA6s"}},64708:(e,t,n)=>{"use strict";function s(e){let t="?";for(let n of Object.keys(e)){let s=e[n];Array.isArray(s)&&s.length?t+=`${n}=${encodeURIComponent(s.join(`&${n}=`))}`:t+=`${n}=${encodeURIComponent(s)}`,t+="&"}return t}n.d(t,{p:()=>s})},72881:e=>{e.exports={flex:"thread_flex__Paz_n",uncollapse:"thread_uncollapse__e_fgy",loadMore:"thread_loadMore__Q76NQ",thread:"thread_thread__mBzsF",button:"thread_button__Z6j6c",collapse:"thread_collapse__5I2cV",collapsedLeft:"thread_collapsedLeft__T4UwC",collapsedRight:"thread_collapsedRight__5i8VI",belowThreshold:"thread_belowThreshold__5hbWW",center:"thread_center__qQvE0",noMargin:"thread_noMargin__KW3LR"}},80920:e=>{e.exports={container:"contestSubmissionTabs_container__cAgvA",options:"contestSubmissionTabs_options__rcD8I",submitButton:"contestSubmissionTabs_submitButton__NcOnm",tabs:"contestSubmissionTabs_tabs__LL3gu",selected:"contestSubmissionTabs_selected__E_6TL",loginLink:"contestSubmissionTabs_loginLink__yZZD2"}},98611:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var s=n(75038),o=n(76430),a=n(81993),r=n(44641),i=n(21159),c=n(84919);let l=({show:e,parentComment:t,onClose:n,onReplySubmitted:l,className:d})=>{let[m,u]=(0,o.useState)(a.cR);return e?(0,s.jsx)("div",{className:d,style:{marginTop:".5rem"},children:(0,s.jsx)(c.A,{autofocus:!0,placeholder:"Reply to ...",value:m,onChange:u,onSubmit:()=>r.A.createComment(t.id,m).then(e=>{let s={...t,children:[e,...t.children],childrenCount:t.childrenCount+1};u(a.cR),l(s),n()}).catch(e=>i.A.create(e,"Comment Service","error")),onCancel:n})}):null}}}]);
2//# sourceMappingURL=1092-25161386a0a917fe.js.map

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.