PageSourceSearch

https://tixel.com/_nuxt/B_HgIQ3u.js

js tixel.com collected 2026-10-02 14:46:05 UTC 8,602 bytes, 7 lines download raw bytes

1import{d as C,X as E,o as l,k as r,F as D,r as L,a5 as b,b as T,at as R,l as _,h as o,t as k,a0 as H,aq as F,x as K,cT as Z,c0 as q,N as V,bV as J,g as e,ag as $,f as p,n as x,dr as X,ds as Y,a7 as G,e as w,p as Q,a8 as W,dt as ee,u as z,z as O,S as te,w as se,al as ae,ab as oe,du as ne,am as le,O as N,U as S,R as ie,ao as re,aP as ce,j as ue,i as de,ah as pe,T as me,J as ve,I as fe,s as j}from"./DGIKR7ju.js";import{r as ge}from"./CZVSYRS2.js";import{_ as _e}from"./Dxkb3e7i.js";import{u as xe}from"./BvGpKGl9.js";import"./COlrDvtV.js";const he=["aria-pressed","onClick"],ye=C({__name:"Selector",props:H({variant:{default:"plain"},options:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const s={plain:{list:"gap-2",option:"min-w-20 py-4",selected:"bg-black text-white",unselected:`
2      bg-gray-50 text-black
3      hover:bg-gray-100
4    `},ghost:{list:"gap-0",option:"py-3",selected:"bg-gray-100 text-black",unselected:`
5      bg-transparent text-gray-500
6      hover:bg-gray-50 hover:text-black
7    `}},c=E(t,"modelValue");return(u,f)=>(l(),r("div",{class:b(["flex overflow-x-auto max-lg:scrollbar-hide",s[t.variant].list])},[(l(!0),r(D,null,L(t.options,a=>(l(),r("button",{key:a.value,type:"button","aria-pressed":c.value===a.value,class:b(["flex shrink-0 cursor-pointer items-center justify-center gap-2 rounded-full px-4 text-base leading-[1.2] font-bold tracking-tight whitespace-nowrap transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-black",[s[t.variant].option,c.value===a.value?s[t.variant].selected:s[t.variant].unselected]]),onClick:n=>c.value=a.value},[a.icon?(l(),T(R(a.icon),{key:0,class:"size-5 shrink-0"})):_("",!0),o("span",null,k(a.label),1)],10,he))),128))],2))}});function be(t,s){return l(),r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[o("path",{d:"M5.85 3.5a.75.75 0 0 0-1.117-1 9.719 9.719 0 0 0-2.348 4.876.75.75 0 0 0 1.479.248A8.219 8.219 0 0 1 5.85 3.5ZM19.267 2.5a.75.75 0 1 0-1.118 1 8.22 8.22 0 0 1 1.987 4.124.75.75 0 0 0 1.48-.248A9.72 9.72 0 0 0 19.266 2.5Z"}),o("path",{"fill-rule":"evenodd",d:"M12 2.25A6.75 6.75 0 0 0 5.25 9v.75a8.217 8.217 0 0 1-2.119 5.52.75.75 0 0 0 .298 1.206c1.544.57 3.16.99 4.831 1.243a3.75 3.75 0 1 0 7.48 0 24.583 24.583 0 0 0 4.83-1.244.75.75 0 0 0 .298-1.205 8.217 8.217 0 0 1-2.118-5.52V9A6.75 6.75 0 0 0 12 2.25ZM9.75 18c0-.034 0-.067.002-.1a25.05 25.05 0 0 0 4.496 0l.002.1a2.25 2.25 0 1 1-4.5 0Z","clip-rule":"evenodd"})])}const ke={class:"flex items-center gap-2"},we={class:"mt-4 flex justify-center"},Ce=["href"],Me="chat_app_prompt_dismissed",Ae=3600*24*30,$e=C({__name:"AppPromptPanel",setup(t){const s=F(import.meta.url),c=K(),{isMobile:u}=Z(),{isAppView:f}=q(),a=V(),n=J(Me,{maxAge:Ae,path:"/",sameSite:"lax"}),h=x(()=>u&&!f.value&&!n.value&&a.hasAnyConversation),d=()=>{n.value="1"};return(g,i)=>e(h)?(l(),r("div",$({key:0},e(s)(),{class:"mx-4 my-2 rounded-2xl bg-tixel-gradient-light p-4 text-black"}),[o("div",ke,[p(e(be),{class:"size-5 shrink-0 text-red-500"}),i[0]||(i[0]=o("p",{class:"flex-1 font-semibold"}," Never miss a reply with the app ",-1)),o("button",$({type:"button","aria-label":"Dismiss",class:"shrink-0 p-1"},e(s)("dismiss"),{onClick:d}),[p(e(ge),{class:"size-5"})],16)]),i[1]||(i[1]=o("p",{class:"mt-2 text-sm"}," Use the Tixel app and chat with buyers and sellers on the go. You'll get a notification the second someone replies. ",-1)),o("div",we,[o("a",$({href:e(c).onelinkInAppPromptUrl,class:"rounded-full border border-gray-200 bg-white px-5 py-2 text-sm font-semibold shadow-sm"},e(s)("cta"),{onClick:d}),"Use the app",16,Ce)])],16)):_("",!0)}}),De=Object.assign($e,{__name:"MessageAppPromptPanel"}),Se=X({activeClass:"bg-gray-50",exactActiveClass:""}),Te={class:"flex items-center space-x-lg"},Ve={class:"relative size-16"},Pe={class:"min-w-0 flex-1 flex-row"},Ie={class:"flex flex-1 items-center space-x-2 text-left"},Ne={class:"text-lg font-semibold"},je={key:0,class:"flex size-5 flex-none items-center justify-center rounded-full bg-red-500 text-xs text-red-100"},Le={key:1,class:"flex-1 text-right text-xs text-gray-500"},ze=["innerHTML"],Oe=C({__name:"Conversation",props:{conversation:{}
7,type:{}},setup(t){const s=t,c=x(()=>{const[d,g]=s.conversation.counterpart.name.split(" ");return`${d} ${g?.charAt(0)||""}`}),u=x(()=>s.conversation.latestMessageDate),f=u.value?Y(u):null,a=u.value?G(u,"d MMM"):null,n=x(()=>{if(!s.conversation.latestMessageDate)return null;const d=Math.floor(new Date(s.conversation.latestMessageDate).getTime()/1e3);return ee(d)?a?.value??null:f?.value??null}),h=xe(s.conversation);return(d,g)=>{const i=_e,m=Se;return l(),r("div",null,[p(m,{class:"m-2 block rounded-lg p-2 hover:bg-gray-50",to:`/inbox/${t.type}/conversation/${t.conversation.ticket.uuid}`},{default:w(()=>[p(e(Q),{space:"sm"},{default:w(()=>[o("div",Te,[o("div",Ve,[p(i,{image:t.conversation.event.coverImage,quality:"70",sizes:"120px",class:"size-full rounded-xl object-cover",alt:`Conversation cover image for event ${t.conversation.event.title}`},null,8,["image","alt"]),p(e(W),{class:"absolute right-0 bottom-0 -mr-2 -mb-2 border-2 border-white",size:"sm",alt:"Counterpart avatar",src:t.conversation.counterpart.avatar,name:t.conversation.counterpart.name},null,8,["src","name"])]),o("div",Pe,[o("div",Ie,[o("p",Ne,k(e(c)),1),t.conversation.unreadMessageCount?(l(),r("span",je,k(t.conversation.unreadMessageCount),1)):_("",!0),e(n)?(l(),r("time",Le,k(e(n)),1)):_("",!0)]),o("div",{class:b(["w-full overflow-hidden",{"text-gray-500":!t.conversation.unreadMessageCount}])},[o("p",{class:b(["line-clamp-1 wrap-break-word",{"font-semibold":t.conversation.unreadMessageCount}])},k(t.conversation.counterpart.latestMessage),3),o("span",{class:"line-clamp-1",innerHTML:e(h)},null,8,ze)],2)])])]),_:1})]),_:1},8,["to"])])}}}),Ue=Object.assign(Oe,{__name:"MessageConversation"}),Be={key:0,class:"flex justify-center p-lg"},Ee={key:1},Re={key:0,class:"flex justify-center p-xl"},He=C({__name:"Conversations",async setup(t){let s,c;const u=new AbortController,f=z(),a=x(()=>f.params.type),n=V(),{lastPage:h,current:d,loadedType:g}=O(n),i=te(),m=ie(null),y=([s,c]=se(()=>n.$poll({type:a.value,abortController:u,quietly:!0})),s=await s,c(),s),A=re();async function M(v){g.value!==v&&await n.$fetchFirstPage(v)}async function U(){h.value>d.value&&(await n.$fetchMore({type:a.value,abortController:u}),m.value&&(m.value.scrollTop=m.value?.offsetHeight+(m.value.offsetHeight-m.value.clientHeight)))}return ae(async()=>{await M(a.value),y.resume()}),oe(()=>{ne(m,U,{distance:10})}),le(()=>{y.pause(),u.abort()}),N(a,async(v,P)=>{!v||v===P||(n.$setPollType(v),await M(v))}),N(A,v=>{if(v==="hidden"){y.pause();return}y.resume()}),(v,P)=>{const B=Ue;return l(),r(D,null,[e(i).isLoadingAny([e(n).loadingKey(e(a))])?(l(),r("div",Be,[p(e(S))])):_("",!0),e(i).isLoadingAny([e(n).loadingKey(e(a))])?_("",!0):(l(),r("div",Ee,[o("div",{ref_key:"conversationsContainer",ref:m,class:"scrollbar-hide h-full overflow-x-hidden overflow-y-scroll"},[(l(!0),r(D,null,L(e(n).getAll,I=>(l(),T(B,{key:I.ticket.uuid,conversation:I,type:e(a)},null,8,["conversation","type"]))),128)),e(i).isLoadingAny([e(n).loadingMoreKey])?(l(),r("div",Re,[p(e(S))])):_("",!0)],512)]))],64)}}}),Fe=Object.assign(He,{__name:"MessageConversations"}),Ke={key:0,class:"p-5"},Ze={class:"scrollbar-hide min-h-0 overflow-x-hidden overflow-y-scroll"},qe={class:"hidden flex-1 justify-center py-8 md:flex"},Je={class:"flex flex-1 flex-col"},et=C({__name:"inbox",setup(t){const s=z(),c=V(),u=ce(),{isAppView:f}=O(u),a=x(()=>j(s.params.ticketUuid)),n=x(()=>!!a.value||!!c.getById(a.value)),h=[{label:"Listed",value:"/inbox/listed"},{label:"Purchased",value:"/inbox/purchased"}],d=x({get:()=>`/inbox/${j(s.params.type)}`,set:g=>fe(g)});return(g,i)=>{const m=De,y=Fe,A=me;return l(),r("main",{id:"main",class:b(["flex h-screen-without-header divide-x divide-gray-200",{"flex-col md:flex-row":!e(n)}])},[o("div",{class:b(["w-full flex-col md:w-96",{"hidden md:flex":e(n),flex:!e(n),"h-screen-without-header":!e(c).isEmpty}])},[e(f)?_("",!0):(l(),r("div",Ke,[p(e(de),{h:"1","looks-like":"3"},{default:w(()=>[...i[1]||(i[1]=[ue(" Chat ",-1)])]),_:1})])),!e(f)||!e(n)?(l(),T(e(ye),{key:1,modelValue:e(d),"onUpdate:modelValue":i[0]||(i[0]=M=>pe(d)?d.value=M:null),variant:"ghost",class:"px-5 py-2",options:h},null,8,["modelValue"])):_("",!0),p(m),o("div",Ze,[p(A,null,{fallback:w(()=>[o("div",qe,[p(e(S))])]),default:w(()=>[p(y)]),_:1})])],2),o("div",Je,[ve(g.$slots,"default")])],2)}}});
7export{et 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.