PageSourceSearch

https://www.alb.net.pk/_webx/BL0OAUjO.js

js alb.net.pk collected 2026-10-04 01:44:51 UTC 8,583 bytes, 1 lines download raw bytes

1import{_ as O}from"./B1nZwSkp.js";import{_ as T}from"./Dp8oxn1D.js";import{r as E,l as G,q as M,m as L,H as r,U as n,Z as g,u as a,V as e,ab as v,_ as i,ac as C,aj as B,P as y,W as R,a0 as U,a5 as Y,aJ as H,S as J}from"./BIaCPJ4S.js";import{h as D,o as V,a3 as $,G as z,bl as Z,bm as N,aR as K}from"./BdEtjDPP.js";import{_ as S}from"./BIBR4A3o.js";function Q(){const{SecureOFetch:p}=D();return V(),{fetchRatingSummary:c=>$(`product-rating-summary-${c}`,()=>p("/ProductReview/GetProductRatingSummary",{query:{ProductID:c}}),{transform(u){var d,_;let o=!1;if((d=u==null?void 0:u.data)!=null&&d.ratingBreakdown){for(const l of(_=u==null?void 0:u.data)==null?void 0:_.ratingBreakdown)if(Number(l.count)>0){o=!0;break}u.data.ratingBreakdown.reverse(2)}return u.data.is_count_exist=o,u.data},getCachedData:z,server:!1,lazy:!0})}}const X=Z("feedback",{state:()=>({feedback_review_ids:[]}),actions:{setFeedbackReviews(p){this.feedback_review_ids.includes(p)||this.feedback_review_ids.push(p)}},persist:!0});function ee(p){const{SecureOFetch:b}=D();V();const c=X(),m=E({reviews:[],is_load_more:!1,is_initial_request:!0,params:{product_id:p,sort_by:N[0].value,start_row:1,results:5}});return{state:m,fetchProductReviews:d=>$(`product-reviews-${d.product_id}`,()=>b("/ProductReview/GetProductReviews",{query:{ProductID:d.product_id,SortBy:d.sort_by,StartRow:d.start_row,Results:d.results}}),{transform(l){return m.is_initial_request=!1,l.data.data&&(l.data.data=l.data.data.map(f=>(c.feedback_review_ids.includes(f.reviewID)?f.is_feedback_submitted=2:f.is_feedback_submitted=0,f))),l.data},getCachedData:z,server:!1,lazy:!0}),addReviewFeedback:async(d,_)=>{const l=m.reviews.findIndex(f=>f.reviewID==d);l>-1&&(m.reviews[l].is_feedback_submitted=1,c.setFeedbackReviews(d)),await b("/ProductReview/AddReviewFeedback",{method:"POST",body:{productID:p,reviewID:d,feedback:_}})}}}const te={key:0,class:"flex flex-col ps-2"},se={key:0,class:"grid grid-cols-12 gap-4 pt-5 pb-8 justify-center border-b wx-border-color"},oe={class:"lg:col-span-6 col-span-12 flex items-center gap-10"},ne={class:"flex flex-col"},ae={class:"flex items-center gap-2"},re={class:"flex flex-wrap gap-1"},ie={class:"font-bold"},ce={class:"lg:col-span-6 col-span-12"},le={key:1,class:"grid grid-cols-12 gap-4 justify-center"},de={class:"lg:col-span-6 col-span-12 flex flex-col"},ue={class:"flex flex-col gap-y-2 flex-1 pb-4"},pe={class:"flex w-[80px] justify-end"},_e={class:"wx-rating-progress ms-3"},fe={class:"px-3 text-sm"},ve={class:"text-sm"},me={key:0,class:"lg:col-span-6 col-span-12 flex flex-col"},xe={class:"pe-3 w-[150px]"},ge={class:"flex"},we={class:"text-sm ps-3"},he={key:2,class:"flex lg:justify-center justify-between py-10"},be={class:"flex flex-col gap-3"},ke={class:"flex items-center"},ye={key:1},Re={class:"mb-2 mt-7 flex justify-between w-full"},Ce=["value"],Se={class:"flex items-start gap-4"},Ie={class:"text-[11px] min-w-[35px] aspect-square rounded-full flex justify-center items-center bg-[#85858534] leading-none"},Pe={class:"flex flex-col"},Fe={class:""},je={class:"font-[600]"},Be={class:"ps-1"},De={class:"flex items-center gap-2"},Ve={class:"font-[500] opacity-60"},$e={class:"flex items-center"},ze={class:"font-[500] px-2"},Ne={class:"pt-2 font-[500]"},qe={class:"text-sm"},Ae={key:0,class:"flex gap-2 flex-col mt-3 items-start"},We={class:"flex gap-2"},Oe=["onClick"],Te=["onClick"],Ee=["onClick"],Ge={key:1,class:"text-sm font-[600] mt-3"},Me={key:0,class:"flex items-center w-full justify-center"},Le={key:0},Ue={key:2,class:"flex items-center justify-center w-full h-[200px]"},Qe=G({__name:"ProductReviewsV1",props:{product:{}},emits:["showAddReview"],setup(p,{emit:b}){const c=p,m=b,{fetchRatingSummary:u}=Q(),{state:o,fetchProductReviews:d,addReviewFeedback:_}=ee(c.product.productID),{data:l,status:f}=u(c.product.productID),{data:w,status:I,refresh:P}=d(o.params);M(()=>w,()=>{w.value&&w.value.data&&w.value.data.length>0&&(o.params.start_row===1?o.reviews=[...w.value.data]:o.reviews=[...o.reviews,...w.value.data],parseInt(w.value.totalRecords)>o.reviews.length?o.is_load_more=!0:o.is_load_more=!1)},{immediate:!0,deep:!0});const q=()=>{o.is_load_more&&(o.params.start_row+=o.params.results,P())},A=k=>{const x=k.target.value;o.params.sort_by=x,o.params.start_row=1,P()},W=L(()=>{var k,s;return parseInt((k=c.product.productRating)==null?void 0:k.recommendedCount)&&parseInt((s=c.product.productRating)==null?void 0:s.ratingCount)?(parseInt(c.product.productRating.recommendedCount)/parseInt(c.product.productRating.ratingCount)*100).toFixed()+"%":"0"});return(k,s)=>{const x=O,F=T;return n(),r(y,null,[a(f)==="success"?(n(),r("div",te,[a(l).is_count_exist?(n(),r("div",se,[e("div",oe,[e("div",ne,[e("div",ae,[v(x,{size:"15px",ratings:c.product.productRating.rating},null,8,["ratings"]),e("span",null,i(c.product.productRating.rating)+" (Based on "+i(c.product.productRating.ratingCount)+" Ratings)",1)]),e("div",re,[e("span",ie,i(a(W)),1),s[3]||(s[3]=e("span",null," of reviewers would recommend this product to a friend ",-1)),e("span",null," ("+i(c.product.productRating.recommendedCount)+" out of "+i(c.product.productRating.ratingCount)+")",1)])])]),e("div",ce,[v
1(S,{onClick:s[0]||(s[0]=t=>m("showAddReview")),class:"w-[180px]"},{default:C(()=>s[4]||(s[4]=[B("Write a review")])),_:1,__:[4]})])])):g("",!0),a(l).is_count_exist?(n(),r("div",le,[e("div",de,[s[5]||(s[5]=e("span",{class:"font-[600] mb-5 mt-3 text-xl text-[#000000]"},"Rating Breakdown",-1)),e("div",ue,[(n(!0),r(y,null,R(a(l).ratingBreakdown,(t,h)=>(n(),r("div",{class:"w-full flex",key:h},[e("div",pe,[v(x,{hidezero:!0,ratings:t.star+".0"},null,8,["ratings"])]),e("div",_e,[e("span",{style:U({width:t.percent+"%"})},null,4)]),e("span",fe,i(t.percent)+"%",1),e("span",ve,"("+i(t.count)+" Reviews)",1)]))),128))])]),a(l).ratingFactors.length>0?(n(),r("div",me,[s[6]||(s[6]=e("span",{class:"font-[600] my-4 text-xl text-[#000000]"},"Rating Factors",-1)),(n(!0),r(y,null,R(a(l).ratingFactors,(t,h)=>(n(),r("div",{class:"w-full flex",key:h},[e("span",xe,i(t.factorName),1),e("div",ge,[v(x,{ratings:t.rating},null,8,["ratings"])]),e("span",we,i(t.rating),1)]))),128))])):g("",!0)])):(n(),r("div",he,[e("div",be,[v(x,{size:"16px",ratings:"0"}),s[7]||(s[7]=e("span",{class:"lg:text-lg"},"Be the first to write a review",-1))]),s[9]||(s[9]=e("span",{class:"wx-border-color lg:border-r w-[1px] lg:mx-[100px] mx-[10px]"},null,-1)),e("div",ke,[v(S,{onClick:s[1]||(s[1]=t=>m("showAddReview")),class:"w-[180px]"},{default:C(()=>s[8]||(s[8]=[B("Write a review")])),_:1,__:[8]})])]))])):g("",!0),a(o).reviews.length>0?(n(),r("div",ye,[e("div",Re,[s[10]||(s[10]=e("span",{class:"font-[600] text-xl text-[#000000]"},"Customer Reviews",-1)),Y(e("select",{class:"py-2 cursor-pointer","onUpdate:modelValue":s[2]||(s[2]=t=>a(o).params.sort_by=t),onChange:A},[(n(!0),r(y,null,R(a(N),(t,h)=>(n(),r("option",{key:h,value:t.value},i(t.label),9,Ce))),128))],544),[[H,a(o).params.sort_by]])]),(n(!0),r(y,null,R(a(o).reviews,(t,h)=>(n(),r("div",{key:h,class:"border-t wx-border-color py-4 flex flex-col items-start"},[e("div",Se,[e("div",Ie,i(a(K)(t.nickname)),1),e("div",Pe,[e("div",Fe,[e("span",je,i(t.nickname),1),e("span",Be," from "+i(t.location),1)]),e("div",De,[e("span",Ve,i(t.date),1),e("div",$e,[v(x,{size:"11px",ratings:t.rating},null,8,["ratings"]),e("span",ze,"("+i(t.rating)+")",1)])]),e("span",Ne,i(t.subject),1),e("p",null,i(t.comments),1),s[12]||(s[12]=e("span",{class:"pt-2 font-[500]"},"I would recommend this to a friend!",-1)),e("span",qe,i(t.upvoteCount)+" out of "+i(t.totalVoteCount)+" users found this review helpful.",1),t.is_feedback_submitted==0?(n(),r("span",Ae,[s[11]||(s[11]=e("span",{class:"text-sm"},"Was this review helpful?",-1)),e("div",We,[e("button",{onClick:j=>a(_)(t.reviewID,"1"),class:"underline cursor-pointer text-sm"},"Yes",8,Oe),e("button",{onClick:j=>a(_)(t.reviewID,"0"),class:"underline cursor-pointer text-sm"},"No",8,Te),e("button",{onClick:j=>a(_)(t.reviewID,"-1"),class:"underline cursor-pointer text-sm"},"Report Abuse",8,Ee)])])):g("",!0),t.is_feedback_submitted==1?(n(),r("span",Ge," Thank you! You have successfully submitted feedback for this review.")):g("",!0)])])]))),128)),a(o).is_load_more?(n(),r("div",Me,[v(S,{size:"sm",class:"w-[180px] mt-5 flex items-center justify-center",onClick:q},{default:C(()=>[a(I)=="success"?(n(),r("span",Le,"Load More Reviews")):(n(),J(F,{key:1}))]),_:1})])):g("",!0)])):g("",!0),(a(f)!="success"||a(I)!="success")&&a(o).is_initial_request?(n(),r("div",Ue,[v(F,{class:"w-[35px] h-[35px] text-black"})])):g("",!0)],64)}}});export{Qe 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.