PageSourceSearch

https://marketplace.com.mm/_nuxt/6GXg2aZV.js

js marketplace.com.mm collected 2026-10-03 20:11:08 UTC 12,251 bytes, 1 lines download raw bytes

1import{c as D,a as N,j as T,g as O}from"./DNRaoYND.js";import{_ as S,a as I}from"./BfE5Nsi8.js";import{w as Z,Y as l,a3 as B,a5 as f,V as m,u as r,a7 as e,aa as c,M as i,F as A,ac as z,a8 as V,ah as G,r as h,k as U,Q as Y,P as q,a6 as Q,a9 as W,a4 as j,m as H}from"./BLnc0_ce.js";import{r as J}from"./34wpvB6e.js";import{Dialog as K,TransitionChild as P,DialogPanel as X,DialogTitle as ee,TransitionRoot as te}from"./B7fzZxyQ.js";const oe=Y(()=>N(()=>Promise.resolve().then(()=>Ue),void 0,import.meta.url).then(o=>o.default||o)),se={class:"fixed inset-0 overflow-y-auto"},le={class:"flex min-h-full items-center justify-center p-4 text-center"},ae={class:"text-lg font-bold leading-6 text-[#FF5200]"},ie={class:"mt-5"},ne={class:"mt-5"},re={class:"flex justify-between rating-wrapper bg-[#F5F5F5] py-4 px-1"},de={class:"flex"},ce=["onClick"],ue=["onClick"],pe={class:"rating"},ve={class:"text-[#2D2C2C] text-sm"},me={class:"mt-3"},fe={for:"review",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},he=["placeholder"],we={for:"images_upload",class:"absolute cursor-pointer rounded-full flex mt-3"},ge={class:"mx-1 mt-1 text-md"},_e={class:"flex gap-x-0.5 mt-12"},xe=["src"],ye={class:"mt-4 flex justify-end"},be={class:"flex"},ke={__name:"Review",props:{visible:{type:Boolean,default:!1},product:{type:Object,default:()=>{}}},emits:"dismiss",setup(o,{emit:b}){const w=o,M=b,g=h(!1),u=h([]),d=h([]),C=h(!1),k=h(!1),_=h(null),p=U({rating:null,review:"",upload_images:[]});Z(()=>w.visible,t=>{g.value=t,L()});const R=t=>{var y;var s=t.target;let v=+s.files.length;var a=0;if(s.files&&((y=d.value)==null?void 0:y.length)<=3)for(;v--;){var n=new FileReader;n.onload=E=>{u.value.push(E.target.result),console.log("Preview List =>",u.value)},d.value.push(s.files[a]),console.log("Image List =>",d.value),n.readAsDataURL(s.files[a]),a++}},$=t=>(console.log("index",t),p.rating=t);async function F(){var v,a;let t=new FormData;d.value.forEach((n,y)=>{t.append(`upload_images[${y}]`,n)}),t.append("product_id",(v=w.product)==null?void 0:v.id),t.append("shop_hash",(a=w.product)==null?void 0:a.shop_hash),t.append("rating",p.rating),t.append("review",p.review),t.append("product_type","normal"),k.value=!0;let{error:s}=D("/api/file-poster/reviews",{method:"POST",body:t,transform:n=>{n!=null&&n.data.success&&(g.value=!1,k.value=!1)}});s.value&&(k.value=!1,T().$toast.error("Review Failed!"))}async function L(){C.value=!0;try{await D("/api/reviews/can-review",{method:"GET",params:{product_id:w.product.id},transform:t=>{_.value=t.data.data,p.rating=_.value.rating,p.review=_.value.review,u.value=_.value.image}})}catch(t){console.log("Error",t)}finally{C.value=!1}}const x=()=>{g.value=!1,M("dismiss",!1)};return(t,s)=>{const v=oe;return l(),B(r(te),{appear:"",show:r(g),as:"template"},{default:f(()=>[m(r(K),{as:"div",onClose:x,class:"relative z-10"},{default:f(()=>[m(r(P),{as:"template",enter:"duration-300 ease-out","enter-from":"opacity-0","enter-to":"opacity-100",leave:"duration-200 ease-in","leave-from":"opacity-100","leave-to":"opacity-0"},{default:f(()=>[...s[1]||(s[1]=[e("div",{class:"fixed inset-0 bg-black/25"},null,-1)])]),_:1}),e("div",se,[e("div",le,[m(r(P),{as:"template",enter:"duration-300 ease-out","enter-from":"opacity-0 scale-95","enter-to":"opacity-100 scale-100",leave:"duration-200 ease-in","leave-from":"opacity-100 scale-100","leave-to":"opacity-0 scale-95"},{default:f(()=>[m(r(X),{class:"w-full max-w-2xl transform overflow-hidden rounded-sm bg-white p-5 text-left align-middle shadow-xl transition-all"},{default:f(()=>[m(r(ee),{as:"h3",class:"flex justify-between"},{default:f(()=>[e("h3",ae,c(t.$t("write-review")),1),e("div",{onClick:x,class:"cursor-pointer"},[m(r(J),{class:"h-5 w-5 text-red-500","aria-hidden":"true"})])]),_:1}),e("div",ie,[m(v,{product:o.product,"is-review":!0},null,8,["product"]),e("form",ne,[e("div",null,[e("label",null,c(t.$t("rating")),1),e("div",re,[e("div",de,[(l(),i(A,null,z(5,(a,n)=>e("div",{key:n},[n<Math.floor(r(p).rating)?(l(),i("svg",{key:0,onClick:y=>$(a),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
1currentColor",class:"w-5 h-5 text-[#FFCA63]"},[...s[2]||(s[2]=[e("path",{"fill-rule":"evenodd",d:"M10.788 3.21c.448-1.077 1.976-1.077 2.424 0l2.082 5.007 5.404.433c1.164.093 1.636 1.545.749 2.305l-4.117 3.527 1.257 5.273c.271 1.136-.964 2.033-1.96 1.425L12 18.354 7.373 21.18c-.996.608-2.231-.29-1.96-1.425l1.257-5.273-4.117-3.527c-.887-.76-.415-2.212.749-2.305l5.404-.433 2.082-5.006z","clip-rule":"evenodd"},null,-1)])],8,ce)):(l(),i("svg",{key:1,onClick:y=>$(a),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-5 h-5 text-[#FFCA63]"},[...s[3]||(s[3]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z"},null,-1)])],8,ue))])),64))]),e("div",pe,[e("p",ve,c(r(p).rating),1)])])]),e("div",me,[e("label",fe,c(t.$t("review")),1),V(e("textarea",{"onUpdate:modelValue":s[0]||(s[0]=a=>r(p).review=a),id:"review",rows:"4",class:"block p-2.5 w-full text-sm text-gray-900 bg-gray-100 rounded-sm border-0 dark:bg-gray-700 focus:outline-none",placeholder:t.$t("text-here")},null,8,he),[[G,r(p).review]])]),e("label",we,[s[4]||(s[4]=e("div",{class:"w-[30px] rounded-full text-red-500"},[e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"{1.5}",stroke:"currentColor",className:"size-6"},[e("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.827 6.175A2.31 2.31 0 0 1 5.186 7.23c-.38.054-.757.112-1.134.175C2.999 7.58 2.25 8.507 2.25 9.574V18a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9.574c0-1.067-.75-1.994-1.802-2.169a47.865 47.865 0 0 0-1.134-.175 2.31 2.31 0 0 1-1.64-1.055l-.822-1.316a2.192 2.192 0 0 0-1.736-1.039 48.774 48.774 0 0 0-5.232 0 2.192 2.192 0 0 0-1.736 1.039l-.821 1.316Z"}),e("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 12.75a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0ZM18.75 10.5h.008v.008h-.008V10.5Z"})])],-1)),e("span",ge,c(t.$t("add-review-image")),1),e("input",{type:"file",multiple:"multiple",name:"",class:"text-sm ml-3 text-slate-300 hidden",id:"images_upload",onChange:R,accept:"image/*",required:""},null,32)]),e("div",_e,[(l(!0),i(A,null,z(r(u),a=>(l(),i("div",{key:a,class:"bg-slate-200 p-0.5 rounded-lg"},[e("img",{src:a,alt:"preview",class:"w-[78px] h-[78px] object-cover rounded-lg"},null,8,xe)]))),128))])])]),e("div",ye,[e("div",be,[e("button",{type:"button",class:"rounded-md mx-1 border border-transparent text-gray-500 bg-gray-100 px-4 py-2 text-sm font-medium hover:bg-gray-200",onClick:x},c(t.$t("cancel")),1),e("button",{type:"button",class:"rounded-md border border-transparent bg-[#FF5200] px-4 py-2 text-sm font-medium text-white hover:bg-[#ff4200]",onClick:F},c(t.$t("submit")),1)])])]),_:1})]),_:1})])])]),_:1})]),_:1},8,["show"])}}},Ce={class:"grid grid-cols-3 gap-x-4"},$e={class:"col-span-1"},Fe={class:"product-card-body relative"},Le={class:"product-card-image"},Me=["data-url"],Re={class:"product-card-favorite absolute bottom-1 right-1"},je=["fill"],Be={class:"col-span-2"},Ae={class:"text-lg font-semibold truncate"},ze={key:0,class:""},De={class:"text-black"},Pe={class:"text-[#FF5200]"},Ve={key:1,class:"text-[#FF5200]"},Ee={key:2,class:"flex items-center mt-1"},Ne={key:0,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",class:"w-5 h-5 text-[#FFCA63]"},Te={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",class:"w-5 h-5 text-[#FFCA63]"},Oe={key:2,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-5 h-5 text-[#FFCA63]"},Se={key:0,class:"pl-2 text-sm text-[#2F2F2F] font-medium"},Ie={key:3,class:"inset-0 mt-1 flex"},Ze={class:"ml-1"},Ge={__name:"NormalProductReviewCard",props:{product:{type:Object,default:()=>{}},isEdit:{type:Boolean,default:!0},isReview:{type:Boolean,default:!1}},setup(o){const b=h(!1),w=u=>u?"#FF0000":"none",M=()=>{b.value=!0},g=()=>{b.value=!1};return(u,d)=>{var F,L,x,t;const C=O,k=q("strike"),_=S,p=I,R=ke,$=Q("lazyload");return l(),i("div",{class:H(["p-2 rounded-md",o.isReview?"":"bg-white"]),style:{"box-shadow":"0px 1.7px 3.41px 0px #0000001a"}},[e("div",Ce,[e("div",$e,[e("div",Fe,[m(C,{to:`/products/${(F=o.product)==null?void 0:F.id}`},{default:f(()=>{var s;return[e("div",Le,[V((l(),i("img",{"data-url":o.product.image,key:(s=o.product)==null?void 0:s.image,alt:"product_image",class:"w-[130px] h-[120px] object-cover rounded-lg"},null,8,Me)),[[$]])])]}),_:1},8,["to"]),e("div",Re,[(l(),i("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:w((L=o.product)==null?void 0:L.is_favorite),class:"cursor-pointer",xmlns:"http://www.w3.org/2000/svg"},[...d[0]||(d[0]=[e("rect",{y:"0.332031",width:"29.4545",height:"29.4545",rx:"14.7273",fill:"white"},null,-1),e("path",{d:"M14.7298 21.6046L8.50655 15.5681L8.51562 15.5593C7.03118 13.8824 7.10794 11.3527 8.7459 9.76386C10.3839 8.17506 12.9918 8.1006 14.7207 9.54049L14.7298 9.53169L14.7388 9.54049C16.4677 8.1006 19.0757 8.17506 20.7136 9.76386C22.3516 11.3527 22.4283 13.8824 20.9439 15.5593L20.953 15.5681L14.7298 21.6046Z",stroke:"#ADB1B4","stroke-width":"0.727273","stroke-linejoin":"round"},null,-1)])],8,je))])])]),e("div",Be,[e("h3",Ae,c((x=o.product)==null?void 0:x.name),1),o.product.discounted_sale_price?(l(),i("p",ze,[e("span",De,[m(k,null,{default:f(()=>[W(c(u.$formatCurrency(o.product.discounted_sale_price)),1)]),_:1})]),e("span",Pe,c(u.$formatCurrency(o.product.sale_price)),1)])):(l(),i("p",Ve,c(u.$formatCurrency(o.product.sale_price)),1)),o.isReview?j("",!0):(l(),i("div",Ee,[(l(),i(A,null,z(5,(s,v)=>{var a,n;return e("div",{key:v},[v<Math.floor((a=o.product)==null?void 0:a.rating)?(l(),i("svg",Ne,[...d[1]||(d[1]=[e("path",{"fill-rule":"evenodd",d:"M10.788 3.21c.448-1.077 1.976-1.077 2.424 0l2.082 5.007 5.404.433c1.164.093 1.636 1.545.749 2.305l-4.117 3.527 1.257 5.273c.271 1.136-.964 2.033-1.96 1.425L12 18.354 7.373 21.18c-.996.608-2.231-.29-1.96-1.425l1.257-5.273-4.117-3.527c-.887-.76-.415-2.212.749-2.305l5.404-.433 2.082-5.006z","clip-rule":"evenodd"},null,-1)])])):v<Math.ceil((n=o.product)==null?void 0:n.rating)?(l(),i("svg",Te,[...d[2]||(d[2]=[e("defs",null,[e("linearGradient",{id:"half-fill",x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e("stop",{offset:"50%","stop-color":"#FFCA63"}),e("stop",{offset:"50%","stop-color":"#f3f4f6","stop-opacity":"1"}
1)])],-1),e("path",{fill:"url(#half-fill)",stroke:"#FFCA63",d:"M10.788 3.21c.448-1.077 1.976-1.077 2.424 0l2.082 5.007 5.404.433c1.164.093 1.636 1.545.749 2.305l-4.117 3.527 1.257 5.273c.271 1.136-.964 2.033-1.96 1.425L12 18.354 7.373 21.18c-.996.608-2.231-.29-1.96-1.425l1.257-5.273-4.117-3.527c-.887-.76-.415-2.212.749-2.305l5.404-.433 2.082-5.006z","clip-rule":"evenodd"},null,-1)])])):(l(),i("svg",Oe,[...d[3]||(d[3]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z"},null,-1)])]))])}),64)),o.product.rating?(l(),i("p",Se,c((t=o.product)==null?void 0:t.rating),1)):j("",!0)])),o.isReview?j("",!0):(l(),i("div",Ie,[e("button",{type:"button",onClick:M,class:"flex items-center rounded-md p-1.5 text-sm font-medium hover:bg-black/10 focus:outline-none cursor-pointer text-[#ff5100]"},[o.isEdit?(l(),B(_,{key:0})):(l(),B(p,{key:1})),e("span",Ze,c(o.isEdit?u.$t("edit-comment"):u.$t("add-comment")),1)])]))]),m(R,{product:o.product,visible:r(b),onDismiss:g},null,8,["product","visible"])])],2)}}},Ue=Object.freeze(Object.defineProperty({__proto__:null,default:Ge},Symbol.toStringTag,{value:"Module"}));export{Ge 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.