1import{A as V,B as k,s,C as y,H as h,T as L,p as T,q as p,y as r,E as f,z as c,I as w,L as R,D as re,aa as j,r as S,f as B,j as P,k as ne,w as H,n as z,af as W,W as D,x as i,v as M,b as oe,Z as G,V as ye,a4 as N,G as ve,X as he,U as F,_ as ge,ae as be,O as ke,a as _e}from"./framework-WJp1PeKY.js";import{_ as we}from"./Layout-1K0znu5a.js";import $e from"./ForumLayout-CmXpbepA.js";import{a as Z,h as xe}from"./SyntaxHighlighting-Bxa7LI06.js";import{R as se,L as ie}from"./LikesButton-CwVkJpvf.js";import{p as K}from"./Helpers-DQb75S44.js";import{_ as le}from"./Dropdown-CNZHH_kJ.js";import{_ as A}from"./DropdownMenuItem.vue_vue_type_script_setup_true_lang-BRZ7475r.js";import{_ as ae,d as O,a as Ce,l as Re,u as Ie,m as Se,r as ee}from"./app-D8IPa_ef.js";import{_ as J}from"./AvatarImage.vue_vue_type_script_setup_true_lang-Bw_I63yQ.js";import{A as Ae}from"./AwardIcon-DnW78sjS.js";import{_ as De}from"./Dialog.vue_vue_type_style_index_0_lang-BdGC3_Cp.js";import{q as Q,a as de}from"./index-C_SHgnPd.js";import{u as Te,e as Le,_ as Ue,a as Ee}from"./Textarea--jaj0ZLZ.js";import{_ as qe}from"./FormSwitch.vue_vue_type_style_index_0_lang-CtL3HEw1.js";import{R as Be}from"./Recaptcha-l7m2P9Po.js";import{_ as ue}from"./CommentsIconPixelized.vue_vue_type_script_setup_true_lang-vrgseGgy.js";import{_ as Me}from"./EyeIconPixelized.vue_vue_type_script_setup_true_lang-CnhrgK-A.js";import{_ as Pe}from"./ConversationDialog.vue_vue_type_script_setup_true_lang-CB_5SVGS.js";import{_ as je}from"./Pagination-DpQaP9QT.js";import{_ as ze}from"./CalendarIcon.vue_vue_type_script_setup_true_lang-BL3WdAqr.js";import{_ as Fe}from"./ConversationBreadcrumbs.vue_vue_type_script_setup_true_lang-DMZtC_VT.js";import"./BaseLayout-DskCoMxe.js";import"./useTaxonomyColors-BAdPUBBV.js";import"./DialogButton-BIegSsh3.js";import"./BtnPixel.vue_vue_type_script_setup_true_lang-CNNSrqBp.js";import"./LaryIconPixelized-DmvMNt-9.js";import"./DialogFooter-DdBG0C_0.js";import"./StreakIndicator-DDk9n9_1.js";import"./UserStatsController-C7ZQUTqa.js";import"./ClientTeleport-BbaR1A7O.js";import"./useUrlHelpers-CI9XB-XI.js";import"./PreferencesStore-C_mU24HX.js";import"./SearchIconPixelized.vue_vue_type_script_setup_true_lang-BqAYO8DI.js";import"./DarkModeIcon.vue_vue_type_script_setup_true_lang-Bxg6BKhy.js";import"./CloseSidebarIcon-BvRjDnNA.js";import"./Logo.vue_vue_type_script_setup_true_lang-CEJf8vfh.js";import"./LogoTrianglePixelized.vue_vue_type_script_setup_true_lang-DCQBBOaA.js";import"./AppSectionWithFixedSidebar.vue_vue_type_script_setup_true_lang-C1zBwfno.js";import"./AppFooter-9rcdMFLE.js";import"./BellIcon-CyQzcp7a.js";import"./FixedSidebarNavSectionLink.vue_vue_type_script_setup_true_lang-Brd3s7m3.js";import"./FixedSidebarNavSectionHeading.vue_vue_type_script_setup_true_lang-Q6ANjb8u.js";import"./platform-DzSs9H_q.js";import"./FixedSidebarFeaturedLink.vue_vue_type_style_index_0_lang-So0z4JZ2.js";import"./EpisodeIcon-Cko0kyQj.js";import"./GraphIcon-CXVWRDbj.js";import"./yaml-D8BbUEyL.js";import"./HeartIconPixelized-xRXe1EeY.js";import"./LazyImg-CZ_8Ulh2.js";import"./DropdownRadioList.vue_vue_type_style_index_0_lang-DXsGHFTa.js";import"./DropdownChecklistTrigger.vue_vue_type_script_setup_true_lang-BzqmRRj9.js";import"./ArrowBackPixelized-D_Wz6DtB.js";import"./useStringHelpers-DiTtQwfg.js";const Ve={components:{DropdownMenuItem:A},props:["url"],methods:{deleteReply(){this.flashOverlay({title:"Are you sure?",text:"This will erase your reply.",buttons:["Cancel","Delete"]}).then(e=>{e.confirmed&&this.$inertia.delete(this.url,{onSuccess:()=>{this.$emit("deleted"),e.dialog.close(),this.flash("Okay, your reply has been deleted.")},preserveScroll:!0})})}}};function He(e,o,a,u,m,n){const t=V("DropdownMenuItem");return s(),k(t,{onClick:L(n.deleteReply,["prevent"])},{default:y(()=>[...o[0]||(o[0]=[h(" Delete ",-1)])]),_:1},8,["onClick"])}const Oe=ae(Ve,[["render",He]]),Ne={class:"col-span-3 grid grid-cols-[32px_1fr_50px] items-center gap-x-5"},Ke={class:"relative"},We={class:"flex flex-wrap items-center gap-x-2"},Ge=["href"],Je={key:0,class:"bg-blue/10 text-blue text-2xs rounded-sm px-1 font-medium","aria-label":"Creator of Thread",title:"Creator of Thread"}
1,Qe={key:1,class:"bg-blue/10 text-blue text-2xs rounded-sm px-1 font-medium","aria-label":"Laracasts AI. Not a real human.",title:"Laracasts AI. Not a real human."},Xe={class:"text-2xs"},Ye={class:"text-blue text-2xs flex gap-x-1"},Ze={class:"text-2xs font-dank text-text-tertiary"},et={key:0,class:"ml-auto"},pe=T({__name:"ForumCommentHeader",props:{id:{},user:{},op:{type:Boolean,default:!1},ai:{type:Boolean,default:!1},publishedAt:{default:!1},bestAnswer:{type:Boolean,default:!1}},setup(e){return(o,a)=>{const u=V("InertiaLink");return s(),p("header",Ne,[r("div",Ke,[c(J,{user:o.user,width:"32",height:"32",style:{}},null,8,["user"])]),r("div",null,[r("div",We,[r("a",{href:o.user.links.profile,class:"text-text-primary text-sm hover:underline"},w(o.user.fullName??o.user.username),9,Ge),o.op?(s(),p("div",Je," OP ")):f("",!0),o.ai?(s(),p("div",Qe," AI ")):f("",!0),o.publishedAt?(s(),p(R,{key:2},[a[0]||(a[0]=r("div",{class:"bg-text-tertiary size-[3px]","aria-hidden":!0},null,-1)),r("div",Xe,[c(u,{class:"link text-2xs text-text-secondary",href:"?reply="+o.id,only:["initialReplies"],"preserve-scroll":!0},{default:y(()=>[h(w(o.publishedAt),1)]),_:1},8,["href"])])],64)):f("",!0),o.bestAnswer?(s(),p(R,{key:3},[a[2]||(a[2]=r("div",{class:"bg-text-tertiary size-[3px]","aria-hidden":!0},null,-1)),r("div",Ye,[c(Ae),a[1]||(a[1]=h(" Best Answer ",-1))])],64)):f("",!0)]),r("div",Ze,"Level "+w(o.user.experience?.level??1),1)]),o.$slots.dropdown?(s(),p("div",et,[re(o.$slots,"dropdown")])):f("",!0)])}}}),tt=["id"],rt=["id","aria-expanded","aria-controls","onClick"],nt={class:"col-span-2 col-start-2 mt-6 grid grid-cols-subgrid"},ot={class:"col-span-full"},st={class:"relative"},it=["innerHTML"],lt={key:0,class:"from-fg pointer-events-none absolute inset-x-0 bottom-0 h-24 bg-gradient-to-t to-transparent"},at={class:"col-span-full -mt-2 flex justify-between text-sm"},dt={class:"flex gap-x-4"},ut={key:0},pt=["data-tooltip","aria-label"],te=T({__name:"ForumReply",props:{reply:{},originalPosterId:{},replyDialog:{}},setup(e){const o=e;let a=j("el"),u=j("userContent"),m=O(),n=S(!1),t=S(!1);const d=B(()=>o.reply.user.ai);let g=null;P(()=>{$(),!(!d.value||!u.value)&&(g=new ResizeObserver(()=>{u.value&&(t.value=u.value.scrollHeight>u.value.clientHeight)}),g.observe(u.value))}),ne(()=>g?.disconnect()),H(()=>o.reply.body,async function(){await z(),I()},{immediate:!0});function $(){a.value.querySelectorAll("pre code").forEach(Z)}function I(){if(u.value)for(const l of u.value.querySelectorAll("pre code"))Z(l)}const x=B(()=>m.signedIn&&o.reply.user.ai&&(m.get("id")===o.originalPosterId||m.admin||m.get("elite")));let _=B(()=>({op:o.originalPosterId===m.get("id"),edit:m.admin||m.is(o.reply.user),delete:m.admin||m.is(o.reply.user)}));const b=()=>{G.post(o.reply.links.like,{},{preserveScroll:!0,only:["initialReplies","flash"]})};return(l,v)=>{const Y=W("requires-trust");return s(),p("article",{id:l.reply.best_answer?`best-reply-${l.reply.id}`:`reply-${l.reply.id}`,ref_key:"el",ref:a,class:"forum-reply text-text-tertiary group relative col-span-full grid grid-cols-[32px_1fr_50px] gap-x-5"},[c(pe,{id:l.reply.id,user:l.reply.user,op:l.originalPosterId==l.reply.user.id,ai:l.reply.user.ai,"published-at":l.reply.dateSegments.createdDiff,"best-answer":l.reply.best_answer},{dropdown:y(()=>[c(le,{"data-js":"reply-edit-dropdown","data-test":"edit-reply-dropdown",position:"right"},{trigger:y(({toggle:C,isOpen:me,triggerId:ce,dropdownId:fe})=>[r("button",{id:ce,class:"hover:text-blue text-on-lifted-strong flex cursor-pointer gap-x-[2px] py-2","aria-haspopup":"true","aria-expanded":me,"aria-controls":fe,onClick:C},[...v[4]||(v[4]=[r("span",{class:"size-1 bg-current"},null,-1),r("span",{class:"size-1 bg-current"},null,-1),r("span",{class:"size-1 bg-current"},null,-1)])],8,rt)]),default:y(()=>[D((s(),k(A,{onClick:v[0]||(v[0]=L(C=>l.replyDialog.open(null,l.reply),["prevent"]))},{default:y(()=>[...v[5]||(v[5]=[h("Reply",-1)])]),_:1})),[[Y]]),!l.reply.best_answer&&(i(m).admin||l.originalPosterId===i(m).get("id"))?(s(),k(A,{key:0,tag:"InertiaLink",method:"POST",href:l.reply.links.best_answer,data:{answer_id:l.reply.id},role:"menuitem",tabindex:"-1"},{default:y(()=>[...v[6]||(v[6]=[h(" Mark as Best Reply ",-1)])]),_:1},8,["href","data"])):f("",!0),l.reply.best_answer&&(i(m).admin||l.originalPosterId===i(m).get("id"))?(s(),k(A,{key:1,tag:"InertiaLink",method:"DELETE",href:l.reply.links.best_answer},{default:y(()=>[...v[7]||(v[7]=[h(" Remove Best Reply ",-1)])]),_:1},8,["href"])):f("",!0),i(m).admin||i(m).is(l.reply.user)?(s(),k(A,{key:2,onClick:v[1]||(v[1]=C=>l.replyDialog.open(l.reply))},{default:y(()=>[...v[8]||(v[8]=[h("Edit",-1)])]),_:1})):f("",!0),i(_).delete||i(m).admin?(s(),k(Oe,{key:3,url:l.reply.links.delete},null,8,["url"])):f("",!0),x.value?(s(),k(A,{key:4,tag:"InertiaLink",method:"POST",href:l.reply.links.report},{default:y(()=>[...v[9]||(v[9]=[h(" Report as Unhelpful ",-1)])]),_:1},8,["href"])):f("",!0),i(_).op?f("",!0):(s(),k(se,{key:5,url:`/admin/reported-users/${l.reply.user.id}`,message:"Is this reply full of spam? Sheesh - people, right?"},null,8,["url"]))]),_:1})]),_:1},8,["id","user","op","ai","published-at","best-answer"]),r("div",nt,[r("div",ot,[r("div",st,[r("div",{ref_key:"userContent",ref:u,class:M(["content user-content",{"mb-0 max-h-[300px] overflow-hidden":d.value&&!i(n)}]),innerHTML:l.reply.body},null,10,it),d.value&&i(t)&&!i(n)?(s(),p("div",lt)):f("",!0)]),d.value&&i(t)&&!i(n)?(s(),p("button",{key:0,class:"text-text-secondary hover:text-text-primary border-stroke mt-4 mb-8 cursor-pointer rounded-md border px-3 py-1.5 text-xs font-medium",onClick:v[2]||(v[2]=C=>oe(n)?n.value=!0:n=!0)}," Expand reply ")):f("",!0)]),r("div",at,[r("div",dt,[c(ie,{likes:l.reply.likes,"show-count":!1,class:"px-0! font-normal","data-test":"like-conversation",onLike:b},{default:y(({liked:C})=>[h(w(C?"Liked":"Like"),1)]),_:1},8,["likes"]),D((s(),p("button",{class:"cursor-pointer font-normal hover:underline","data-test":"forum-reply-reply-button",onClick:v[3]||(v[3]=C=>l.replyDialog.open(null,l.reply))},[...v[10]||(v[10]=[h(" Reply ",-1)])])),[[Y]])]),l.reply.likes.length?(s(),p("div",ut,[r("div",{"data-tooltip":"Liked by "+l.reply.likes.map(C=>C.username).join(", "),"aria-label":"Liked by "+l.reply.likes.map(C=>C.username).join(", "),class:"font-normal"}
1,w(l.reply.likes.length.toLocaleString())+" "+w(i(K)("like",l.reply.likes.length)),9,pt)])):f("",!0)])])],8,tt)}}}),U=e=>({url:U.url(e),method:"post"});U.definition={methods:["post"],url:"/discuss/replies"};U.url=e=>U.definition.url+Q(e);U.post=e=>({url:U.url(e),method:"post"});const E=(e,o)=>({url:E.url(e,o),method:"patch"});E.definition={methods:["patch"],url:"/discuss/replies/{reply}"};E.url=(e,o)=>{(typeof e=="string"||typeof e=="number")&&(e={reply:e}),typeof e=="object"&&!Array.isArray(e)&&"id"in e&&(e={reply:e.id}),Array.isArray(e)&&(e={reply:e[0]}),e=de(e);const a={reply:typeof e.reply=="object"?e.reply.id:e.reply};return E.definition.url.replace("{reply}",a.reply.toString()).replace(/\/+$/,"")+Q(o)};E.patch=(e,o)=>({url:E.url(e,o),method:"patch"});const mt={class:"relative px-6 pt-6 pb-4"},ct={class:"relative h-full"},ft={class:"grid h-full md:grid-cols-[32px_1fr] md:gap-x-5"},yt={class:"relative grid grid-rows-[auto_auto_1fr]"},vt={class:"font-dank text-text-tertiary text-xs"},ht={key:0,class:"font-bold"},gt={key:1},bt={class:"fade-in absolute top-[-5px] right-0 flex items-center gap-x-2"},kt=["textContent"],_t=T({__name:"ReplyForm",props:{user:{},conversationId:{},replyToEdit:{},parentReply:{},readyForRecaptcha:{type:Boolean},mentionableUsernames:{}},emits:["success","cancel"],setup(e,{emit:o}){const a=ve(()=>ge(()=>import("./framework-WJp1PeKY.js").then(_=>_.aj),[]).then(_=>_.VueTribute)),u=e,m=o,n=B(()=>u.replyToEdit?"edit":"create"),t=ye({body:"",excerpt:"",conversation_id:u.conversationId,parent_id:null,recaptchaResponse:""}),{showPreview:d,compiledHtml:g}=Te(B(()=>t.body));function $(){const _=n.value==="edit"?E({reply:u.replyToEdit.id}):U();t.submit(_,{onSuccess:()=>m("success")})}H(()=>u.replyToEdit,_=>{t.defaults({body:_?.bodyInMarkdown||"",parent_id:u.parentReply?.id,recaptchaResponse:""}).reset()},{immediate:!0});let I=j("textarea"),x={values:u.mentionableUsernames.map(_=>({key:_,value:_}))};return P(()=>{Le(I.value)}),(_,b)=>(s(),p("form",{class:"grid h-full grid-rows-[auto_1fr]",onSubmit:L($,["prevent"])},[c(Ue,{user:u.user,mode:n.value,processing:i(t).processing,"show-channel":!1,onCancel:b[0]||(b[0]=l=>m("cancel")),onSubmit:$},null,8,["user","mode","processing"]),r("div",mt,[n.value==="create"?(s(),k(Be,{key:0,modelValue:i(t).recaptchaResponse,"onUpdate:modelValue":b[1]||(b[1]=l=>i(t).recaptchaResponse=l),ready:u.readyForRecaptcha},null,8,["modelValue","ready"])):f("",!0),r("div",ct,[D(c(Ee,{html:i(g)},null,8,["html"]),[[N,i(d)]]),D(r("div",ft,[b[7]||(b[7]=r("div",{class:"bg-stroke mx-auto hidden h-full w-px md:block"},null,-1)),r("div",yt,[r("p",vt,[n.value==="create"?(s(),p(R,{key:0},[b[5]||(b[5]=h(" Reply to ",-1)),u.parentReply?(s(),p("span",ht,"@"+w(u.parentReply.user.username),1)):(s(),p("span",gt,"Conversation"))],64)):(s(),p(R,{key:1},[h("Edit Your Reply")],64))]),b[6]||(b[6]=r("div",{class:"border-stroke mb-4 border-b pb-3"},null,-1)),c(i(a),{options:i(x)},{default:y(()=>[D(r("textarea",{ref_key:"textarea",ref:I,"onUpdate:modelValue":b[2]||(b[2]=l=>i(t).body=l),class:"text-text-secondary h-full w-full resize-none focus:outline-none",name:"body",placeholder:"Here's what I think...","data-test":"reply-body","data-autosize":"",required:"",autofocus:""},null,512),[[he,i(t).body]])]),_:1},8,["options"])])],512),[[N,!i(d)]]),D(r("div",bt,[b[8]||(b[8]=r("a",{href:"https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax",target:"_blank",class:"text-text-tertiary font-dank text-xs hover:underline"}," Markdown Preview ",-1)),c(qe,{modelValue:i(d),"onUpdate:modelValue":b[3]||(b[3]=l=>oe(d)?d.value=l:null),class:"dark:bg-on-lifted-strong shrink-0 bg-white",title:"Toggle with Meta + /","data-test":"markdown-preview-button"},null,8,["modelValue"])],512),[[N,i(t).body.length>=3]]),i(t).hasErrors?(s(),p("div",{key:0,class:M(["bg-on-lifted-strongest text-text-primary pixel-corners absolute right-0 bottom-4 left-0 mx-6 flex justify-between px-4 py-3 text-[.875rem] font-normal",Object.keys(i(t).errors).length===1?"items-center":"items-start"])},[r("div",null,[(s(!0),p(R,null,F(i(t).errors,(l,v)=>(s(),p("p",{key:v,textContent:w(l)},null,8,kt))),128))]),r("button",{type:"button",class:"hover:text-blue cursor-pointer",onClick:b[4]||(b[4]=l=>i(t).clearErrors())},[c(Ce,{width:16,class:"text-current"})])],2)):f("",!0)])])],32))}}),X=T({__name:"ReplyDialog",props:{conversationId:{type:[Number,String],required:!0},mentionableUsernames:{type:Array,default:()=>[]}},setup(e,{expose:o}){const a=O(),u=S(null),m=S(null),n=S(!1),t=S(!1);let d=S(null);const g=B(()=>({avatar:a.get("avatar"),username:a.get("username"),fullName:a.get("fullName"),links:{profile:a.get("links.profile")},experience:{level:a.get("experience.level")??1}}));function $(x=null,_=null){const b=x&&"preventDefault"in x?null:x;d.value=_,u.value=b,t.value=!0,z(()=>{m.value?.show(),n.value=!0})}function I(){m.value.close(),t.value=!1,n.value=!1,u.value=null}return be("Enter",x=>{!t.value||!x.metaKey||(x.preventDefault(),document.querySelector("#reply-dialog [data-test=comment-submit]")?.click())}),o({open:$}),(x,_)=>(s(),p(R,null,[re(x.$slots,"trigger",{open:$}),t.value?(s(),k(De,{key:0,id:"reply-dialog",ref_key:"dialog",ref:m,anchor:"bottom",height:"500px","content-classes":"bg-fg-lifted border-b-transparent","close-on-success":!1,"show-close-button":!1,blurred:!1,inert:!1,"restrict-page-scrolling":!1,autofocus:"body"},{inner:y(()=>[c(_t,{user:g.value,"conversation-id":e.conversationId,"reply-to-edit":u.value,"parent-reply":i(d),"ready-for-recaptcha":n.value,"mentionable-usernames":e.mentionableUsernames,onSuccess:I,onCancel:I},null,8,["user","conversation-id","reply-to-edit","parent-reply","ready-for-recaptcha","mentionable-usernames"])]),_:1},512)):f("",!0)],64))}}),wt={class:"forum-replies *:not-last:pb-10"},$t=["data-replies-count"],xt={key:1,class:"relative col-span-2 col-start-2 *:not-last:pb-7"},Ct=T({__name:"ForumReplies",props:{replies:{},bestAnswer:{},conversation:{},meta:{},mentionableUsernames:{}},setup(e){let o=e,a=j("replyDialog");function u(){const n=Re.parse(window.location.search);(n?.replyId??null)&&setTimeout(()=>m("#reply-"+n.replyId),200)}async function m(n){document.querySelector(n)?.scrollIntoView({behavior:"smooth",block:"center"})}return P(async()=>{await z(),u()}),H(()=>o.replies,async()=>{await z(),u()}),(n,t)=>(s(),p("div",null,[r("div",wt,[(s(!0),p(R,null,F(n.replies,d=>(s(),p("div",{key:d.id,class:M(["forum-reply relative grid grid-cols-[32px_1fr_50px] gap-x-5 *:not-last:pb-7",d.replies.length?"has-replies":"has-no-replies"]),"data-replies-count":d.replies.length},[d.user.reported_at?f("",!0):(s(),k(te,{key:0,reply:d,"original-poster-id":n.meta.originalPosterId,"reply-dialog":i(a)},null,8,["reply","original-poster-id","reply-dialog"])),d.replies.length?(s(),p("div",xt,[(s(!0),p(R,null,F(d.replies,g=>(s(),p(R,{key:g.id},[g.user.reported_at?f("",!0):(s(),k(te,{key:0,reply:g,"original-poster-id":n.meta.originalPosterId,"reply-dialog":i(a)},null,8,["reply","original-poster-id","reply-dialog"]))],64))),128))])):f("",!0)],10,$t))),128))]),c(X,{ref_key:"replyDialog",ref:a,"conversation-id":n.conversation.id,"mentionable-usernames":n.mentionableUsernames},null,8,["conversation-id","mentionable-usernames"])]))}});let{overlay:Rt}=Ie();const It={components:{DropdownMenuItem:A},props:{endpoint:String},methods:{deleteConversation(){Rt({title:"Are you sure?",text:"This will erase your conversation and all replies immediately.",buttons:["Cancel","Delete"]}).then(e=>{e.confirmed&&this.$inertia.delete(this.endpoint)})}}};function St(e,o,a,u,m,n){const t=V("DropdownMenuItem");return s(),k(t,{onClick:L(n.deleteConversation,["prevent"])},{default:y(()=>[...o[0]||(o[0]=[h(" Delete ",-1)])]),_:1},8,["onClick"])}const At=ae(It,[["render",St]]),q=(e,o)=>({url:q.url(e,o),method:"post"});q.definition={methods:["post"],url:"/discuss/conversations/{conversation}/subscriptions"};q.url=(e,o)=>{(typeof e=="string"||typeof e=="number")&&(e={conversation:e}),typeof e=="object"&&!Array.isArray(e)&&"id"in e&&(e={conversation:e.id}),Array.isArray(e)&&(e={conversation:e[0]}),e=de(e);const a={conversation:typeof e.conversation=="object"?e.conversation.id:e.conversation};return q.definition.url.replace("{conversation}",a.conversation.toString()).replace(/\/+$/,"")+Q(o)};q.post=(e,o)=>({url:q.url(e,o),method:"post"});const Dt=T({__name:"FollowConversationButton",props:{conversation:{},active:{type:Boolean}},setup(e){const o=e;let a=S(o.active);function u(){a.value=!a.value,G.post(q.url(o.conversation.id),{},{preserveScroll:!0,only:["errors","flash"]})}return(m,n)=>{const t=W("requires-auth");return D((s(),p("button",{type:"button",title:"Want an email each time this conversation receives a new reply?",class:M(["hover:text-blue group flex cursor-pointer items-center gap-x-[5px] text-sm",{"text-blue":i(a)}]),"data-test":"follow-conversation",onClick:u},[c(Me,{width:"20",class:M(i(a)?"text-current":"text-text-primary group-hover:text-current")},null,8,["class"]),h(" "+w(i(a)?"Following":"Follow"),1)],2)),[[t]])}}}),Tt={class:"forum-question relative","data-test":"forum-question"},Lt=["id","aria-expanded","aria-controls","onClick"],Ut={class:"mt-8 mb-7"},Et={class:"text-2xl leading-8 font-bold"},qt=["innerHTML"],Bt={class:"border-stroke text-text-tertiary flex justify-between border-t pt-4 text-sm font-normal"},Mt={class:"flex gap-x-4"},Pt=["onClick"],jt={class:"flex items-center gap-x-2"},zt={key:0,class:"mr-1 hidden md:flex md:gap-x-2"},Ft=T({__name:"ForumQuestion",props:{conversation:{},mentionableUsernames:{},permissions:{},following:{type:Boolean,default:!1}},setup(e){const o=e,a=O();P(()=>{u()});const u=()=>{xe(".forum-question")},m=()=>{G.post(o.conversation.links.like,{},{preserveScroll:!0,only:["conversation","flash"]})};return(n,t)=>{const d=W("requires-auth");return s(),p("div",Tt,[c(pe,{id:n.conversation.id,user:n.conversation.owner,op:!0,"published-at":n.conversation.dateSegments.createdDiff},{dropdown:y(()=>[i(a).signedIn?(s(),k(le,{key:0,"data-js":"conversation-edit-dropdown","data-test":"conversation-edit-dropdown",position:"right"},{trigger:y(({toggle:g,isOpen:$,triggerId:I,dropdownId:x})=>[r("button",{id:I,class:"hover:text-blue text-on-lifted-strong flex cursor-pointer gap-x-[2px] py-2","aria-haspopup":"true","aria-expanded":$,"aria-controls":x,onClick:g},[...t[0]||(t[0]=[r("span",{class:"size-1 bg-current"},null,-1),r("span",{class:"size-1 bg-current"},null,-1),r("span",{class:"size-1 bg-current"},null,-1)])],8,Lt)]),default:y(()=>[n.permissions.edit?(s(),k(Pe,{key:0},{trigger:y(({open:g})=>[c(A,{onClick:$=>g(n.conversation)},{default:y(()=>[...t[1]||(t[1]=[h("Edit",-1)])]),_:1},8,["onClick"])]),_:1})):f("",!0),n.permissions.delete?(s(),k(At,{key:1,endpoint:`/discuss/conversations/${n.conversation.id}`},null,8,["endpoint"])):f("",!0),i(a).is(n.conversation.owner)?f("",!0):(s(),k(se,{key:2,url:`/admin/reported-users/${n.conversation.owner.id}`,message:"Is this conversation full of spam? Sheesh - people, right?"},null,8,["url"]))]),_:1})):f("",!0)]),_:1},8,["id","user","published-at"]),r("div",Ut,[r("h1",Et,w(n.conversation.title),1),r("div",{class:"content user-content mt-5",innerHTML:n.conversation.body},null,8,qt)]),r("footer",Bt,[r("div",Mt,[c(ie,{likes:n.conversation.likes,"show-count":!1,class:"text-text-primary px-0!","data-test":"like-conversation",onLike:m},null,8,["likes"]),c(X,{"conversation-id":n.conversation.id,"mentionable-usernames":n.mentionableUsernames},{trigger:y(({open:g})=>[D((s(),p("button",{class:"hover:text-blue group flex cursor-pointer items-center gap-x-[5px] text-sm","data-test":"reply-to-conversation",onClick:g},[c(ue,{type:"basic",width:"20",class:"group-hover:text-blue"}),t[2]||(t[2]=h(" Reply ",-1))],8,Pt)),[[d]])]),_:1},8,["conversation-id","mentionable-usernames"]),c(Dt,{conversation:n.conversation,active:n.following},null,8,["conversation","active"])]),r("div",jt,[n.conversation.likes_count?(s(),p("div",zt,[(s(!0),p(R,null,F(n.conversation.likes.slice(0,3),g=>(s(),k(i(ke),null,{default:y(()=>[c(J,{user:g,width:20,height:20,alt:g.username+" liked this conversation."},null,8,["user","alt"])]),_:2},1024))),256))])):f("",!0),r("div",null,w(n.conversation.likes_count.toLocaleStr
1ing())+" "+w(i(K)("like",n.conversation.likes_count)),1),t[3]||(t[3]=r("div",{class:"bg-text-tertiary size-[3px]","aria-hidden":"true"},null,-1)),r("div",null,w(n.conversation.reply_count.toLocaleString())+" "+w(i(K)("reply",n.conversation.reply_count)),1)])])])}}}),Vt=["content"],Ht=["href"],Ot={class:"border-stroke flex h-[58px] items-center justify-between border-b px-4 md:px-6"},Nt={class:"hidden gap-x-6 xl:flex"},Kt={class:"text-text-tertiary flex gap-[10px] text-sm font-normal tracking-tight"},Wt=["aria-label"],Gt={class:"mx-auto max-w-screen-md"},Jt={id:"js-conversation-replies"},Qt={key:0,class:"mt-7"},Xt=["onClick"],Yt={key:2,class:"mt-16 text-center font-normal"},Zt={key:3,class:"mt-16 text-center font-normal"},en=T({layout:[we],__name:"Show",props:{conversation:{},initialReplies:{},bestAnswer:{},channels:{},channel:{}},setup(e){const o=e,a=_e({data:o.initialReplies.data,meta:o.initialReplies.meta});let u=O();H(()=>o.initialReplies,t=>{a.data=t.data,a.meta=t.meta});const m=S(null);function n(){m.value?.open()}return P(()=>{window.addEventListener("open-reply-dialog",n)}),ne(()=>{window.removeEventListener("open-reply-dialog",n)}),(t,d)=>{const g=V("InertiaHead");return s(),p(R,null,[c(g,null,{default:y(()=>[r("title",null,w(t.conversation.data.title),1),r("meta",{name:"description",content:t.conversation.data.excerpt},null,8,Vt),r("link",{rel:"canonical",href:t.conversation.data.path},null,8,Ht)]),_:1}),c(Se,{title:t.conversation.data.title,description:t.conversation.data.excerpt,url:t.conversation.data.path,image:t.fullUrl("/images/laracasts-twitter-card.webp"),card:"summary_large_image"},null,8,["title","description","url","image"]),c(i($e),null,{"main-top":y(()=>[r("div",Ot,[c(Fe,{channel:t.channel,title:t.conversation.data.title},null,8,["channel","title"]),r("div",Nt,[r("div",Kt,[c(ze,{class:"text-icon-secondary"}),h(" "+w(t.conversation.data.dateSegments.createdForHumans),1)]),r("div",{class:"text-text-tertiary flex gap-[10px] text-sm font-normal tracking-tight","aria-label":t.conversation.data.reply_count+" comments"},[c(ue,{type:"basic",class:"text-icon-secondary shrink-0",width:"20"}),h(" "+w(t.conversation.data.reply_count),1)],8,Wt)])])]),default:y(()=>[r("div",Gt,[a.meta.current_page===1?(s(),k(i(Ft),{key:0,conversation:t.conversation.data,permissions:t.conversation.can,following:t.conversation.favorited,"mentionable-usernames":t.conversation.mentionableUsernames,class:"mb-11"},null,8,["conversation","permissions","following","mentionable-usernames"])):f("",!0),r("div",Jt,[c(i(Ct),{conversation:t.conversation.data,replies:a.data,"best-answer":t.bestAnswer,meta:a.meta,"mentionable-usernames":t.conversation.mentionableUsernames},null,8,["conversation","replies","best-answer","meta","mentionable-usernames"])]),c(je,{class:"my-8",links:a.meta.links,only:["initialReplies"]},null,8,["links"]),i(u).get("trusted")?(s(),k(X,{key:1,ref_key:"replyDialog",ref:m,"conversation-id":t.conversation.data.id,"mentionable-usernames":t.conversation.mentionableUsernames},{trigger:y(({open:$})=>[t.initialReplies.data.length>0?(s(),p("div",Qt,[r("button",{class:"hover:text-blue flex w-full cursor-pointer items-center py-6",onClick:L($,["prevent"])},[c(J,{user:{username:i(u).get("username"),avatar:i(u).get("avatar")},width:32,height:32,class:"mr-5"},null,8,["user"]),d[3]||(d[3]=h(" Join the conversation ",-1))],8,Xt)])):f("",!0)]),_:1},8,["conversation-id","mentionable-usernames"])):i(u).signedIn?(s(),p("p",Yt,[d[4]||(d[4]=h(" Please ",-1)),r("button",{class:"link",onClick:d[0]||(d[0]=(...$)=>i(ee)&&i(ee)(...$))},"confirm your email address"),d[5]||(d[5]=h(" to participate in this conversation. ",-1))])):(s(),p("p",Zt,[d[6]||(d[6]=h(" Please ",-1)),r("button",{class:"link",onClick:d[1]||(d[1]=L($=>t.dialog("login"),["prevent"]))},"sign in"),d[7]||(d[7]=h(" or ",-1)),r("button",{class:"link",onClick:d[2]||(d[2]=L($=>t.dialog("signup"),["prevent"]))},"create an account"),d[8]||(d[8]=h(" to participate in this conversation. ",-1))]))])]),_:1})],64)}}});export{en as default};
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.