PageSourceSearch

https://members.salesamurai.io/build/assets/CLyweNAY.js

js salesamurai.io collected 2026-09-27 20:56:17 UTC 10,234 bytes, 1 lines download raw bytes

1import{_ as Z,a as ee,b as M}from"./ZNC6ErOm.js";import{I as v,a as x}from"./Xoi1hU5U.js";import{_ as te}from"./CHRB8wXb.js";import{a as se}from"./DGSQx9gj.js";import{_ as le}from"./Dh2ccLNZ.js";import{_ as oe}from"./DXi3aIq8.js";import{u as ae}from"./C-UEDonU.js";import{d as H,r as O,Q as k,w as L,c as p,f as e,q as o,_ as l,y as n,F as C,p as ne,t as Q,bi as re,l as ie,e as d,z as ce,v as h,j as de}from"./edfHDTum.js";import"./B_ipyhYZ.js";import"./DlAUqK2U.js";import"./BfPKaf7i.js";import"./DCi-oGBp.js";import"./BYecEvQY.js";import"./XsR6ZTSk.js";import"./SYllU1se.js";import"./gMVYLUlo.js";import"./CvuVP51M.js";const ue={class:"flex flex-col md:flex-row md:justify-between md:items-center gap-4 mb-2.5"},pe={class:"flex gap-3 justify-end w-full"},me=["disabled"],_e={class:"rounded-lg overflow-hidden"},fe={class:"overflow-x-auto [&::-webkit-scrollbar-thumb]:bg-transparent! [&::-webkit-scrollbar-thumb]:transition-colors [&::-webkit-scrollbar-thumb]:duration-200 hover:[&::-webkit-scrollbar-thumb]:bg-tropical-blue-200! dark:hover:[&::-webkit-scrollbar-thumb]:bg-lynch-500!"},ge={class:"table-auto w-full text-left min-w-[800px]"},ve={class:"bg-tropical-blue-200/30 dark:bg-fiord-550/29 text-woodsmoke-900 dark:text-zumthor-100"},xe={class:"*:px-4 *:py-4"},he={class:"w-[35%]"},be={class:"flex flex-col items-center"},we={class:"flex flex-col items-center"},ye={class:"flex flex-col items-center"},ke={class:"flex flex-col items-center"},Se={class:"flex flex-col items-center"},Le={class:"flex flex-col items-center"},Ce={class:"flex flex-col items-center"},$e={key:0},Ie={class:"px-4 py-4.5 max-w-0"},Ue={class:"flex items-center gap-2 w-full"},je=["src","alt"],Pe={class:"px-4 py-4.5"},Ve={class:"block text-nowrap"},Te={class:"px-4 py-4.5"},Be={class:"block text-nowrap"},Fe={class:"px-4 py-4.5"},Ne={class:"block text-nowrap"},Ae={class:"px-4 py-4.5"},ze={class:"block text-nowrap"},De={class:"px-4 py-4.5"},Ee={class:"block text-nowrap"},Re={class:"px-4 py-4.5"},qe={class:"block text-nowrap"},Me={class:"px-4 py-4.5"},Oe={key:1,colspan:"8",class:"px-4 py-4.5 text-center"},Qe={class:"flex items-center justify-center px-4 py-2"},Ge={key:1},He={colspan:"8",class:"bg-tropical-blue-200/15 dark:bg-polo-blue-500b px-4 py-2 text-center text-gray-500 dark:text-link-water-200"},Je={key:0,class:"flex flex-col items-center justify-center gap-2 py-4"},Ke={key:1,class:"flex flex-col items-center justify-center gap-2 py-4"},We={class:"flex flex-col sm:flex-row items-end sm:items-center justify-end sm:justify-between mt-0 py-1 gap-1"},G=H({__name:"ListingsTable",setup(J){const m=se(),u=O(1),b=O(5),{currentSortColumn:$,currentSortOrder:K,toggleSort:g,getSortIconClass:a}=ae(()=>{u.value=1}),W=i=>{const t=i.target;m.setSearchItem(t.value)},X=(i,t,_)=>[...i].sort((r,s)=>{var U,j,P,V,T,B,F,N,A,z,D,E,R,q;let c,f;switch(t){case"title":c=((U=r.title)==null?void 0:U.toLowerCase())||"",f=((j=s.title)==null?void 0:j.toLowerCase())||"";break;case"price_in_dollars":c=parseFloat(((P=r.price_in_dollars)==null?void 0:P.toString())||"0"),f=parseFloat(((V=s.price_in_dollars)==null?void 0:V.toString())||"0");break;case"images_count":c=parseInt(((T=r.images_count)==null?void 0:T.toString())||"0",10),f=parseInt(((B=s.images_count)==null?void 0:B.toString())||"0",10);break;case"views":c=parseInt(((F=r.views)==null?void 0:F.toString())||"0",10),f=parseInt(((N=s.views)==null?void 0:N.toString())||"0",10);break;case"shipping_days":c=((A=r.shipping_days)==null?void 0:A.toLowerCase())||"",f=((z=s.shipping_days)==null?void 0:z.toLowerCase())||"";break;case"tags_count":c=parseInt(((D=r.tags)==null?void 0:D.length.toString())||"0",10),f=parseInt(((E=s.tags)==null?void 0:E.length.toString())||"0",10);break;case"num_favorers":c=parseInt(((R=r.num_favorers)==null?void 0:R.toString())||"0",10),f=parseInt(((q=s.num_favorers)==null?void 0:q.toString())||"0",10);break;default:return 0}let y=0;return c>f?y=1:c<f&&(y=-1),_==="desc"?y*-1:y}),S=k(()=>{var r;const i=m.favoriteListings??[];if(i.length===0)return[];const t=((r=m.searchItem)==null?void 0:r.toLowerCase())||"";let _=[...i];return t.trim()&&(_=_.filter(s=>s.title.toLowerCase().includes(t))),$.value&&(_=X(_,$.value,K.value)),_}),Y=k(()=>S.value.length),w=k(()=>Math.ceil(Y.value/b.value)),I=k(()=>{const i=(u.value-1)*b.value,t=i+b.value;return S.value.slice(i,t)});return L(S,()=>{u.value>w.value&&w.value>0&&(u.value=w.value),w.value===0&&(u.value=1)}),L(b,()=>{u.value=1}),L(()=>m.selectedCategory,i=>
1{i&&(u.value=1)},{immediate:!0}),(i,t)=>{var r;const _=ie("RouterLink");return d(),p("div",null,[e("div",ue,[e("div",pe,[e("input",{disabled:!l(m).selectedCategory,id:"searchListing",type:"text",placeholder:"Search...",onInput:W,class:"block w-full md:w-[250px] rounded-lg text-lynch-500 px-3 h-[42px] disabled:cursor-not-allowed outline-1 -outline-offset-1 outline-tropical-blue-200 placeholder:text-lynch-500 placeholder:text-base placeholder:font-light focus:outline-1 focus:-outline-offset-1 focus:outline-blue-ribbon-500 dark:bg-big-stone-950a dark:text-polo-blue-500a dark:outline-lynch-500 dark:focus:outline-dodger-blue-430"},null,40,me),o(Z,{type:"listings","category-id":(r=l(m).selectedCategory)==null?void 0:r.id},null,8,["category-id"])])]),e("div",_e,[e("div",fe,[e("table",ge,[e("thead",ve,[e("tr",xe,[e("th",he,[e("div",{class:"flex items-center gap-2 cursor-pointer",onClick:t[0]||(t[0]=s=>l(g)("title"))},[t[9]||(t[9]=e("span",{class:"font-medium text-sm"},"Product",-1)),e("div",be,[o(v,{class:n(["h-2 w-2",l(a)("title","asc")])},null,8,["class"]),o(x,{class:n(["h-2 w-2",l(a)("title","desc")])},null,8,["class"])])])]),e("th",null,[e("div",{class:"flex items-center gap-2 cursor-pointer",onClick:t[1]||(t[1]=s=>l(g)("price_in_dollars"))},[t[10]||(t[10]=e("span",{class:"font-medium text-sm"},"Price",-1)),e("div",we,[o(v,{class:n(["h-2 w-2",l(a)("price_in_dollars","asc")])},null,8,["class"]),o(x,{class:n(["h-2 w-2",l(a)("price_in_dollars","desc")])},null,8,["class"])])])]),e("th",null,[e("div",{class:"flex items-center gap-2 cursor-pointer",onClick:t[2]||(t[2]=s=>l(g)("views"))},[t[11]||(t[11]=e("span",{class:"font-medium text-sm"},"Views",-1)),e("div",ye,[o(v,{class:n(["h-2 w-2",l(a)("views","asc")])},null,8,["class"]),o(x,{class:n(["h-2 w-2",l(a)("views","desc")])},null,8,["class"])])])]),e("th",null,[e("div",{class:"flex items-center gap-2 cursor-pointer",onClick:t[3]||(t[3]=s=>l(g)("images_count"))},[t[12]||(t[12]=e("span",{class:"font-medium text-sm"},"Photos",-1)),e("div",ke,[o(v,{class:n(["h-2 w-2",l(a)("images_count","asc")])},null,8,["class"]),o(x,{class:n(["h-2 w-2",l(a)("images_count","desc")])},null,8,["class"])])])]),e("th",null,[e("div",{class:"flex items-center gap-2 cursor-pointer",onClick:t[4]||(t[4]=s=>l(g)("shipping_days"))},[t[13]||(t[13]=e("span",{class:"font-medium text-sm text-nowrap"},"Shipping days",-1)),e("div",Se,[o(v,{class:n(["h-2 w-2",l(a)("shipping_days","asc")])},null,8,["class"]),o(x,{class:n(["h-2 w-2",l(a)("shipping_days","desc")])},null,8,["class"])])])]),e("th",null,[e("div",{class:"flex items-center gap-2 cursor-pointer",onClick:t[5]||(t[5]=s=>l(g)("tags_count"))},[t[14]||(t[14]=e("span",{class:"font-medium text-sm"},"Tags",-1)),e("div",Le,[o(v,{class:n(["h-2 w-2",l(a)("tags_count","asc")])},null,8,["class"]),o(x,{class:n(["h-2 w-2",l(a)("tags_count","desc")])},null,8,["class"])])])]),e("th",null,[e("div",{class:"flex items-center gap-2 cursor-pointer",onClick:t[6]||(t[6]=s=>l(g)("num_favorers"))},[t[15]||(t[15]=e("span",{class:"font-medium text-sm"},"Likes",-1)),e("div",Ce,[o(v,{class:n(["h-2 w-2",l(a)("num_favorers","asc")])},null,8,["class"]),o(x,{class:n(["h-2 w-2",l(a)("num_favorers","desc")])}
1,null,8,["class"])])])]),t[16]||(t[16]=e("th",null,null,-1))])]),I.value.length>0?(d(),p("tbody",$e,[(d(!0),p(C,null,ne(I.value,s=>{var c;return d(),p("tr",{key:s.id,class:"bg-tropical-blue-40 dark:bg-polo-blue-500b text-lynch-500 dark:text-white hover:bg-tropical-blue-200/30 dark:hover:bg-fiord-550/29 transition-colors"},[l(m).updatingEntry!==s.id?(d(),p(C,{key:0},[e("td",Ie,[e("div",Ue,[e("img",{src:s.image,alt:s.title,class:"shrink-0 rounded-full w-11.5 h-11.5 object-cover"},null,8,je),o(_,{to:{name:"listing-detail",params:{listingId:s.listing_id}},class:"truncate min-w-10 pr-4 text-blue-ribbon-500 dark:text-dodger-blue-430 hover:text-blue-ribbon-500/80 dark:hover:text-dodger-blue-430/80"},{default:ce(()=>[Q(h(s.title),1)]),_:2},1032,["to"])])]),e("td",Pe,[e("span",Ve,h((s.price_in_dollars??0).toLocaleString("en-US",{style:"currency",currency:"USD"})),1)]),e("td",Te,[e("span",Be,h((s.views??0).toLocaleString("en-US")),1)]),e("td",Fe,[e("span",Ne,h((s.images_count??0).toLocaleString("en-US")),1)]),e("td",Ae,[e("span",ze,h((s==null?void 0:s.shipping_days)||"N/A"),1)]),e("td",De,[e("span",Ee,h((((c=s.tags)==null?void 0:c.length)??0).toLocaleString("en-US")),1)]),e("td",Re,[e
1("span",qe,h((s.num_favorers??0).toLocaleString("en-US")),1)]),e("td",Me,[(d(),de(ee,{key:s.id,type:"listing",id:s.id,name:s.title||"","category-id":(s==null?void 0:s.favorite_category_id)||0},null,8,["id","name","category-id"]))])],64)):(d(),p("td",Oe,[e("div",Qe,[o(te,{classColor:"text-blue-ribbon-500 dark:text-dodger-blue-430 mr-2"}),t[17]||(t[17]=e("span",null,"Updating...",-1))])]))])}),128))])):(d(),p("tbody",Ge,[e("tr",null,[e("td",He,[l(m).isLoading?(d(),p("div",Ke," Loading... ")):(d(),p("div",Je,[o(l(re),{class:"h-12 w-12 text-gray-300"}),t[18]||(t[18]=Q(" No listings found. ",-1))]))])])]))])])]),e("div",We,[o(oe,{modelValue:b.value,"onUpdate:modelValue":t[7]||(t[7]=s=>b.value=s),class:"order-2 sm:order-1"},null,8,["modelValue"]),o(le,{"current-page":u.value,"onUpdate:currentPage":t[8]||(t[8]=s=>u.value=s),"total-pages":w.value,class:"order-1 sm:order-2 my-3"},null,8,["current-page","total-pages"])])])}}}),Xe={class:"hidden lg:flex lg:flex-row gap-1 lg:gap-4 min-w-0"},Ye={class:"lg:w-4/12 min-w-0"},Ze={class:"lg:w-8/12 min-w-0"},et={class:"lg:hidden"},tt={class:"min-w-0 mb-4"},st={class:"w-screen relative left-1/2 right-1/2 -ml-[50vw] -mr-[50vw] p-12"},bt=H({__name:"ListingsTab",setup(J){return(m,u)=>(d(),p(C,null,[e("div",Xe,[e("div",Ye,[o(M)]),e("div",Ze,[o(G)])]),e("div",et,[e("div",tt,[o(M)]),e("div",st,[o(G)])])],64))}});export{bt 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.