PageSourceSearch

https://www.petfairs.com/_nuxt_/search.CH59WCs9.js

js petfairs.com collected 2026-10-04 04:27:15 UTC 12,698 bytes, 1 lines download raw bytes

1import{u as X,t as J,_ as Z,b as ce,h as ue,B as pe,k as de,i as me,f1 as fe,x as he,W as ye,y as ge,aD as ve,a5 as _e}from"./entry.7xP3lhx6.js";import{E as we}from"./index.D9YQ9ToP.js";import{E as j}from"./index.DvWTmUlA.js";import{E as G}from"./index.C27E2pB4.js";import{e as ee,v as te,r as w,R as oe,ah as e,al as u,aB as q,ad as k,ag as be,d as O,a as ke,w as H,n as Y,f as p,g as i,a6 as Q,a0 as h,aa as L,D as a,ac as R,aF as K,a5 as V}from"./icons-bundle.DYat3NJ6.js";import{E as xe}from"./index.CTyJFe-2.js";import{E as De,a as Pe}from"./index.Cy653fRd.js";/* empty css                     *//* empty css                  *//* empty css               *//* empty css                  *//* empty css                    *//* empty css                       *//* empty css                 *//* empty css                  *//* empty css                   *//* empty css                  */import{_ as Se}from"./PreSaleItem.AjYZIec8.js";import{C as Ce}from"./ColGoodsItem.BxnThoae.js";import{E as Be}from"./index.CrddndOE.js";import{E as Le}from"./index.BmuCoQqd.js";/* empty css                 *//* empty css                      */import{F as Ve}from"./FooterNav.BbAC1vNi.js";import{P as $e}from"./product-empty.08Gv9iPm.js";import{C as Ie}from"./BundleItem.CoGZFOqL.js";import"./swiper.BIVuQwUB.js";import"./index.DMTA3cYb.js";import"./constants.Dnj8X3EN.js";import"./index.BKa-etup.js";import"./event.BB_Ol6Sd.js";import"./index.CnNqLI6a.js";import"./index.BJkEq-8Q.js";import"./use-form-item.CoCvYQ7C.js";import"./omit.CJZUpTGO.js";import"./_baseClone.6eyJ9h9Q.js";import"./index.CpM0q6cB.js";import"./strings.BpY3cYnm.js";import"./toNumber.BdQclItu.js";import"./index.CS94Lnhq.js";import"./index.C4Rzlq_k.js";import"./index.BCMN295R.js";import"./vnode.Cww5UQBW.js";import"./index.BHwMhXgB.js";import"./scroll.CSznCSvl.js";import"./castArray.CfQOZYkh.js";import"./index.C7adz4VG.js";import"./index.YmqfApwx.js";import"./index.CNlJjBvW.js";import"./index.Cb99EMgR.js";import"./LockPrice.BSl9xmdK.js";import"./usePreSaleCart.DAO3yDLM.js";/* empty css                       */import"./index.CsgnFy6P.js";import"./index.GkybupUN.js";import"./index.TsuPWsWe.js";import"./index.C7yQ45Ai.js";import"./index.DBdn0JAF.js";import"./index.B87MXwAl.js";import"./index.DImbuqQl.js";import"./index.uGQqJE3T.js";import"./index.opjTr5z2.js";import"./raf.BUWCON41.js";import"./debounce.phFFh9WG.js";import"./index.DB-NQtE8.js";import"./dropdown.hnGDJIqH.js";import"./index.DbBwZcYj.js";import"./index.Byjm-SXH.js";import"./index.Bw1dGlAf.js";import"./index.ddGW1Vvf.js";import"./index.C2-N7aGP.js";import"./index.DipJhEd2.js";import"./numbers.CXlhhiiX.js";import"./use-wheel.BH2ruMQp.js";import"./index.CXyJM0MF.js";import"./index.RkMH3A26.js";import"./index.BD-m9mH7.js";import"./index.R9zevg1f.js";import"./debounce.Cp4i3rXA.js";import"./isObject.C3e4t58V.js";import"./isObjectLike.Dipz0mOK.js";import"./isSymbol.D1m0iwPA.js";import"./useWholesaleCart.rgtavtZl.js";/* empty css                         */import"./index.CLFQZTmw.js";import"./logo-white.CumMB4Uc.js";import"./OverflowTooltip.BzlIy5rK.js";import"./el-tooltip.l0sNRNKZ.js";import"./useIsMobile.DLpOpICM.js";function Ee(f){return typeof f=="function"||Object.prototype.toString.call(f)==="[object Object]"&&!be(f)}const Ue=ee({name:"filter-box",props:{categories:{type:Array,default:()=>[]},sortData:{type:Object,required:!0},screenWidth:{type:Number,default:0}},emits:["search"],setup(f,{emit:s}){const T=te({categoryId:"",minPrices:"",highPrices:""}),{t:x}=X(),D=w(!1),W=w("rtl"),y=w(""),N=w([{value:"priceUp",label:"Price: Low to High"},{value:"priceDown",label:"Price: High to Low"}]),P=w(""),o=m=>{P.value=m,D.value=!0},$=()=>{D.value=!1},I=m=>{var l=m.map(g=>({value:g.id,label:g.title,children:Array.isArray(g.children)&&g.children.length>0?I(g.children):[]}));return l};function d(){s("search",{categoryId:S.value,minPrices:v.value,highPrices:_.value})}function E(){f.sortData.isPriceByLow=!f.sortData.isPriceByLow}const M=()=>{if(P.value==="Sort"){let m=y.value;m==="priceUp"?f.sortData.isPriceByLow=!0:m==="priceDown"&&(f.sortData.isPriceByLow=!1)}else s("search",{categoryId:S.value,minPrices:v.value,highPrices:_.value});D.value=!1},{categoryId:S,minPrices:v,highPrices:_}=oe(T);return()=>{let m;return e("div",{class:"filter-drawer"},[e("div",{class:"filter-box flex justify-between align-center pc-filter"},[e("div",{class:"filter-box__left flex"},[e(J,null,{default:()=>[e(we,{clearable:!0,modelValue:S.value,"onUpdate:modelValue":l=>S.value=l,placeholder:"Category","check-strictly":!0,data:I(f.categories)},null)]}),e("div",{class:"price-range flex align-center justify-between"},[e("div",{class:"flex align-center"},[e(j,{placeholder:"",modelValue:v.value,"onUpdate:modelValue":l=>v.value=l,clearable:!0},{prefix:()=>e("span",null,[u("$")])}),e("div",{class:"divery"},[u("-")]),e(j,{class:"w-120",placeholder:"",modelValue:_.value,"onUpdate:modelValue":l=>_.value=l,clearable:!0},{prefix:()=>e("span",null,[u("$")])})]),e(G,{type:"primary",round:!0,onClick:d},Ee(m=x("common.confirm"))?m:{default:()=>[m]})])]),e("div",{class:"filter-box__right flex"},[e("div",{class:"sort-item"},[e("span",{class:"font-bold"},[u("Best Match")])]),e("div",{class:"sort-item",onClick:E},[e("span",null,[u("Price")]),f.sortData.isPriceByLow?e(q,{name:"arrow-up",filled:!0},null):e(q,{name:"arrow-down",filled:!0},null)])])]),e("div",{class:"filter-box flex justify-between align-center mobile-filter"},[e("div",{class:"filter-box__left y-filter-box flex",onClick:()=>o("Sort")},[e(q,{name:"sort",filled:!0},null),e("span",null,[u("Sort")])]),e("div",{class:"filter-box__right y-filter-box flex",onClick:()=>o("Filter")},[e(q,{name:"filter",filled:!0},null),e("span",null,[u("Filter")])])]),e(xe,{modelValue:D.value,direction:W.value,size:"100%","append-to-body":!0,"close-on-click-modal":!1,"show-close":!1,title:P.value,class:"filter-drawer"},{default:()=>[P.value==="Sort"?e(De,{modelValue:y.value,placeholder:"Select",size:"large",style:{width:"308px",display:"block",margin:"auto"},onChange:l=>y.value=l},{default:()=>{var l;return[(l=N.value)==null?void 0:l.map((g,A)=>e(Pe,{key:A,label:g.label,value:g.value},null))]}}):e(k,null,[e(J,null,null),e("div",{class:"price-range"},[e("div",{class:"flex align-center"},[e(j,{placeholder:"",modelValue:v.value,"onUpdate:modelValue":l=>v.value=l,clearable:!0},{prefix:()=>e("span",null,[u("$")])}),e("div",{class:"divery"},[u("-")]),e(j,{placeholder:"",modelValue:_.value,"onUpdate:modelValue":l=>_.value=l,clearable:!0},{prefix:()=>e("span",null,[u("$")])})])])])],footer:()=>e("div",{class:"draw-footer"},[e(G,{type:"primary",plain:!0,onClick:$},{default:()=>[u("Cancel")]}),e(G,{type:"primary",onClick:M},{default:()=>[u("Apply")]})])})])}}}),ze=Z(Ue,[["__scopeId","data-v-06414422"]]),je={class:"search-root"},qe={class:"basic-container"},Oe={key:0,class:"filter-wrap flex align-center mobile-filter"},Te={class:"search-title"},Ne={class:"product-wrap"},Me={key:0,class:"product-main flex flex-wrap"},Ae=["href"],Fe={class:"product-header flex justify-center"},Ge={class:"product-empty flex flex-wrap align-center justify-center"},He={class:"image-box"},Re={key:0,class:"empty-goods-container"},We={class:"empty-goods flex"},Je=["href"],Ye={key:2,class:"pagination-box flex align-center justify-center"},Qe={class:"footer"},Ke=ee({__name:"search",setup(f){const s=ce(),T=ue(),{$loading:x}=pe(),{t:D}=X(),y=de().public.siteUrl,N=me(),P=w(null),o=te({productData:[],otherData:[],page:{current:s.query.page?Number(s.query.page):1,size:60,total:0},search:{},sortData:{isPriceByLow:"unset",isPublishedByHigh:!0,isListingTimeByHigh:!0},recommendGoodList:[]}),$=w([]),I=w(),d=O(()=>{const t=s.query.keywords;return Array.isArray(t)?t[0]:t});ke(()=>{I.value=window.screen.width});function E(t){return t.packageVO?`/kit-product/${t.packageVO.seoUrl}`:t.salesMode===0?`/product/${t.seoUrl}`:`/private-label/${t.seoUrl}`}H(()=>s.query.keywords,t=>{o.sortData.isPriceByLow="unset",b()}),H(()=>s.query.catId,t=>{o.search.categoryId=t==null?void 0:t.toString(),b()}),H(()=>[o.sortData.isPriceByLow,o.sortData.isPublishedByHigh,o.sortData.isListingTimeByHigh],()=>{o.sortData.isPriceByLow!=="unset"&&b(o.sortData)},{deep:!0});const M=async()=>{const{data:t}=await ve({current:1,size:24,status:0});o.recommendGoodList=t.value.data.records};function S(t){o.search=t,b()}function v(t){o.page.current=1,o.page.size=t,b()}async function _(t){o.page.current=t,await T.replace({query:{...s.query,page:t}}),b()}function m(){window==null||window.scrollTo({top:0,behavior:"smooth"})}async function l(){const{data:t}=await _e();$.value=t.value.data}async function g(){var t,r;await Y(),s.query.catId&&(o.search.categoryId=(t=s.query.catId)==null?void 0:t.toString()),s.query.page&&(o.page.current=Number(s.query.page)),s.params.categorySeo&&(o.search.categorySeo=(r=s.params.categorySeo)==null?void 0:r.toString()),await b({},!0),await l()}g();function A(t){const r=[],c=[];o.sortData.isPriceByLow!=="unset"&&(o.sortData.isPriceByLow?r.push("wholesale_price"):c.push("wholesale_price")),t.ascs=r.join(","),t.descs=c.join(",")}async function b(t={},r=!1){x.show(),A(t),Object.assign(t,o.search);const{data:c}=await fe({current:o.page.current,size:o.page.size,search:s.query.keywords,...t,ascs:r?"":t.ascs,descs:r?"":t.descs,status:0});o.productData=c.value.data.records,x.hide(),o.page.total=c.value.data.total,o.productData.length===0&&(o.search={},M()),await Y(),window.scrollTo({top:0,behavior:"smooth"}),m()}const ae=O(()=>d.value?`${y}/product/search?keywords=${encodeURIComponent(d.value)}`:`${y}${s.path}`),re=O(()=>{const t=o.productData||[],r=s.fullPath;return{"@context":"https://schema.org","@type":"CollectionPage",name:d.value?`Search results for ${d.value}`:"Product Search",url:`${y}${r}`,mainEntity:{"@type":"ItemList",numberOfItems:o.page.total,itemListElement:t.map((c,U)=>{const z=c.packageVO?`${y}/kit-product/${c.packageVO.seoUrl}`:c.salesMode===0?`${y}/product/${c.seoUrl}`:`${y}/private-label/${c.seoUrl}`;return{"@type":"ListItem",position:(o.page.current-1)*o.page.size+U+1,url:z,name:c.name}})}}});he({title:d.value?` Wholesale ${d.value} for Pet Stores & Distributors | Petfairs`:"Product Search",meta:[{name:"robots",content:"noindex, follow"}],link:[{rel:"canonical",href:ae.value}],script:[{type:"application/ld+json",children:O(()=>JSON.stringify(re.value))}]});const{productData:B,page:C,sortData:se}=oe(o);return(t,r)=>{const c=ze,U=Se,z=Ce,le=Be,ie=Le,ne=ge;return i(),p("div",je,[e(ne,{ref_key:"layout",ref:P,name:"default"},{footer:Q(()=>[h("div",Qe,[e(Ve)])]),default:Q(()=>[h("div",qe,[a(N).getShowPrice?(i(),p("div",Oe,[e(c,{categories:a($),sortData:a(se),onSearch:S},null,8,["categories","sortData"])])):L("",!0),h("h1",Te,[a(d)&&a(B).length>0?(i(),p(k,{key:0},[u(" Wholesale "+R(a(d))+" in Bulk ",1)],64)):a(d)&&a(B).length===0&&!a(x).state.value?(i(),p(k,{key:1},[u(' No results for "'+R(a(d))+'" ',1)],64)):(i(),p(k,{key:2},[u(" Search Petfairs Wholesale Catalog ")],64))]),h("div",Ne,[a(B).length>0?(i(),p("div",Me,[(i(!0),p(k,null,K(a(B),(n,F)=>(i(),p("a",{class:"product-item",key:F+"-"+n.id,href:E(n)},[n.packageVO?(i(),V(Ie,{key:0,bundleData:n.packageVO,page:"search"},null,8,["bundleData"])):n.salesMode&&[1,2].includes(n.salesMode)?(i(),V(U,{key:1,showSelect:!1,showProfit:!0,detail:n},null,8,["detail"])):(i(),V(z,{key:2,item:n,showTitle:""},null,8,["item"]))],8,Ae))),128))])):L("",!0)]),a(B).length===0&&!a(x).state.value?(i(),p(k,{key:1},[h("div",Fe,[h("div",Ge,[h("div",He,[e(le,{src:a($e),fit:"cover"},null,8,["src"])]),r[2]||(r[2]=h("div",{class:"product-empty__label"}," We couldn't find the product you're looking for ",-1)),r[3]||(r[3]=h("div",{class:"product-empty__tig"}," You might be interested in the following products ",-1))])]),a(o).recommendGoodList.length?(i(),p("div",Re,[h("h3",null,R(a(D)("common.You May Also Like")),1),h("div",We,[(i(!0),p(k,null,K(a(o).recommendGoodList,(n,F)=>(i(),p("a",{class:"product-item",key:F,href:E(n)},[n.salesMode===0?(i(),V(z,{key:0,item:n,showTitle:""},null,8,["item"])):(i(),V(U,{key:1,showSelect:!1,showProfit:!0,detail:n},null,8,["detail"]))],8,Je))),128))])])):L("",!0)],64)):L("",!0),a(C).total>0?(i(),p("div",Ye,[e(ie,{background:"","current-page":a(C).current,"onUpdate:currentPage":r[0]||(r[0]=n=>a(C).current=n),"page-size":a(C).size,"onUpdate:pageSize":r[1]||(r[1]=n=>a(C).size=n),"page-sizes":[20,40,60,100],layout:"total, prev, pager, next",total:a(C).total,onSizeChange:v,onCurrentChange:_,"pager-count":("isMobile"in t?t.isMobile:a(ye))?3:7}
1,null,8,["current-page","page-size","total","pager-count"])])):L("",!0)])]),_:1},512)])}}}),Uo=Z(Ke,[["__scopeId","data-v-4363b013"]]);export{Uo 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.