(()=>{"use strict";var t={45:(t,e,i)=>{i.d(e,{P9:()=>m,Rh:()=>_,nn:()=>b,oD:()=>$,yS:()=>A});var s=i(571),n=i(957),o=i(986),r=i(657),a=i(357),l=i(651);let d=0;const c=588;let p=c,u=!1,v="",g="",A=null,h=5,w=0;function m(t){window.innerWidth${r.tip_3}`:2===m.discount_incentive_conditions&&(g=`
${r.tip_1}
`)}if(""!==v){let t=374;s.A.isMobile&&(t+=20),s.A.globalStyle.textContent+=`#trustoo-slide, .write-review-slide {\n\t\t\theight: ${t}px !important;\n\t}`}let _="";if(1===t.show_privacy_policy){let e="";const s=i.privacy_policy,n=i.terms,o=i.consent_text.replace("{{privacy_policy}}",`${s}`).replace("{{terms}}",`${n}`);1===t.show_checkbox&&(e=''),_=`
\n\t\t\t${e}\n\t\t
`}let b=1===t.enabled_add_video?`\n
\n ${e.or}\n
\n
\n ${e.add_video} \n \n
\n `:"";s.A.attributeConfig&&(h+=s.A.attributeConfig.attributes.length),w=t.rating_icon_type;const S=`class="stars vstar-star" data-type="${t.rating_icon_type}"`,T=`\n
\n
\n
\n
\n
\n
${e.slide_1_title}
\n
\n
${q(5)}
${e.rating_options[0]}
\n
${q(4)}
${e.rating_options[1]}
\n
${q(3)}
${e.rating_options[2]}
\n
${q(2)}
${e.rating_options[3]}
\n
${q(1)}
${e.rating_options[4]}
\n
\n\t\t\t\t${v}\n
\n
\n
${e.slide_2_title}
\n
${e.slide_2_subtitle}
\n
\n ${g}\n
\n ${e.add_photo} \n \n
\n ${b}\n
\n \n \n
\n
\n
\n
${e.slide_3_title}
\n \n \n \n
\n\t\t\t${f(!0)}\n
\n
${e.slide_4_title}
\n \n \n ${_}\n \n \n
\n
\n\t\t\t\t\t
${e.slide_5_title}
\n\t\t\t\t\t
${e.slide_5_subtitle}
\n\t\t\t\t\t\n\t\t\t\t\t\n
\n
\n
\n
\n `;(0,o.$dqs)("#trustoo-mask").insertAdjacentHTML("beforeend",T);const k="undefined"!=typeof Review&&["ar","he"].includes(Review.lang)?"#trustoo-slide .slide-content,#trustoo-slide .slide-input {\n\t\tdirection: rtl;\n\t}":"";if(s.A.globalStyle.textContent+=`\n\t.trustoo-write-review,#tt-product-selector{\n\t\t--button-bg-color: ${t.review_button_background_color};\n\t\t--button-text-color: ${t.review_button_text_color};\n\t\t--button-radius: ${t.button_radius}px;\n\t\t--text-color: ${t.text_color};\n\t\t--light-text-color: ${(0,o.hexToRgba)(t.text_color,.4)};\n\t\t--discount-code-color:${t.discount_text_color};\n\t\t--discount-copy-color:${t.discount_copy_color};\n\t}\n\t.trustoo-write-review .slide-content{\n\t\tbackground:${(0,o.hexToRgba)(t.text_color,.05)}\n\t}\n\t.trustoo-write-review .vstar-star{\n\t\t--star-color: ${t.review_button_background_color};\n\t\t--nostar-color: ${t.review_button_text_color};\n\t}\n\t.trustoo-write-review,#tt-product-selector{\n\t\t--write-bg:${t.popup_bg_color};\n\t\tbackground: ${t.popup_bg_color};\n\t\tborder-radius: ${t.popup_radius}px;\n\t\tcolor:${t.text_color}\n\t}\n\t.trustoo-write-review .slide-upload {\n\t\tbackground: ${t.popup_bg_color};\n\t}\n\t.trustoo-widget .window-discount,.trustoo-widget .slide-discount{\n\t\tbackground:${t.discount_bg_color};\n\t\tborder-radius: ${t.discount_card_radius}px;\n\t}\n\t${k}\n\t`,function(t){const e=(0,o.$dqs)("#trustoo-slide");s.A.slide=e,(0,o.$dqs)(".window-close",e).onclick=function(){$()},(0,o.$dqsa)(".slide-option",e).forEach((t=>{t.onclick=function(){s.A.ratingVal=t.getAttribute("rating"),x()},t.onmouseover=function(){t.classList.add("active")},t.onmouseout=function(){t.classList.remove("active")}})),(0,o.$dqs)(".upload-input.tt-image-uploader",e).onchange=async function(){const e=this.files[0],i=this.getAttribute("accept").split(",").map((t=>t.slice(1))),r=e.name.split(".").pop();if(!i.includes(r.toLowerCase()))return(0,o.setToast)(s.A.lang.error_tip),!1;if(s.A.uploadType=1,(0,o.$dqs)(".upload-file-tip").style.display="block",(0,o.$dqs)(".upload-file-tip").innerHTML=a.A.loading(t)+"Uploading",x(),!Object.keys(s.A.uploadImgInfo).length){const t=await n.zG.getPolicyToken();s.A.uploadImgInfo=t[1]}const l=this;(0,o.compressImage)(e).then((e=>{n.zG.uploadImg(e).then((e=>{null===e[0]&&((0,o.$dqs)(".upload-file-tip").innerHTML=a.A.over(t),s.A.mediaUrl[0]={url:"https://img.trustoo.io/"+e[1].key,resource_type:1},l.value="")}))}))};const i=(0,o.$dqs)(".tt-video-uploader",e);i&&(i.onchange=async function(){const e=this.files[0],l=this.getAttribute("accept").split(",").map((t=>t.slice(1))),d=e.name.split(".").pop();if(!l.includes(d.toLowerCase()))return(0,o.setToast)(s.A.lang.error_tip),!1;if(parseInt(e.size/1048576)>=200)return(0,o.setToast)("The file cannot exceed 200MB"),!1;(0,o.$dqs)(".upload-file-tip").style.display="block",(0,o.$dqs)(".upload-file-tip").innerHTML=a.A.loading(t)+"Uploading",x(),s.A.uploadType=2,u=!0;const c=(0,o.$dqs)(".slide-done");c.setAttribute("disabled",!0),n.zG.getUploadVideoUrl().then((l=>{const{upload_url:d,domain:p}=l[1],u=l[1].video_service_uid;n.zG.uploadVideo(d,e).then((()=>{const e=p+"/"+u;r(c,"success"),(0,o.$dqs)(".upload-file-tip").innerHTML=a.A.over(t),s.A.mediaUrl[0]={url:e+"/iframe",resource_type:2}})).catch((()=>{i.value="",r(c,"fail")}))})).catch((()=>{i.value="",r(c,"fail")}))});function r(t,e){(0,o.$dqs)(".upload-file-tip").innerHTML="",u=!1,A(),3===d&&(t.textContent=s.A.lang.separate_review_form.done),"fail"===e&&(0,o.setToast)(s.A.lang.error_tip)}const c=(0,o.$dqs)(".slide-content",e),v=(0,o.$dqs)(".slide-next",e);c.oninput=function(){""!==this.value?v.removeAttribute("disabled"):v.setAttribute("disabled",!0)},c.onblur=function(){""===this.value&&v.setAttribute("disabled",!0)};const g=/^[a-zA-Z0-9_-]+(\.[A-Za-z0-9_-]+)*@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/,h=(0,o.$dqsa)("input.slide-input",e),w=(0,o.$dqs)(".slide-done",e);A=(0,o.debounce)((function(){if(""!==h[1].value){const t=(0,o.$dqs)(".input-tip",e);g.test(h[1].value)?t&&(0,o.$dqs)(".input-tip",e).remove():t||h[1].insertAdjacentHTML("afterend",`
\n ${s.A.lang.email_error}\n
`)}C()}),300),h.forEach((t=>{t.oninput=A,t.onblur=function(){C()}}));const m=(0,o.$dqs)("#tt-protection-checkbox",e);m&&(m.onchange=function(){C()});(0,o.$dqs)(".discount-copy",e).onclick=function(){(0,o.copyToClipboard)((0,o.$dqs)(".discount-code",e).textContent,(()=>{(0,o.setToast)(s.A.copyText||s.A.lang.copy_succ)}))},e.addEventListener("click",(t=>{const i=t.target,r=i.classList;if(r.contains("next-slide"))r.contains("slide-next")&&u&&(w.textContent=s.A.lang.separate_review_form.uploading_video_tip),r.contains("slide-finish")?($(),d=0,(0,o.$dqsa)(".slide-discount",e).forEach((t=>t.style.display="none")),(0,o.$dqs)(".write-review-slide.active").classList.remove("active"),(0,o.$dqs)('.write-review-slide[index="0"]').classList.add("active"),(0,o.$dqs)(".write-review-container").style.left=0):r.contains("slide-done")?(i.innerHTML="",(0,o.setLoading)(i),function(){const t={},e=s.A.slide,i="shop"===e.dataset.reviewType;s.A.ip&&(t.ip=s.A.ip,t.author_country=s.A.loc);const r=(0,o.$dqs)(".slide-name",e),a=(0,o.$dqs)(".slide-email",e),d=(0,o.$dqs)(".slide-content",e);t.author=r.value,t.author_email=a.value,t.content=d.value,s.A.isLinkReqRev&&"undefined"==typeof isEmailWrite&&(t.source="store_link");const c=(0,o.$dqs)("#tt-protection-checkbox",e);c&&c.checked&&(t.agree_privacy=1);const p=(0,l.uq)();p.length&&(t.attributes_info={attributes:p,attribute_collection_id:s.A.attributeConfig.attribute_collection_id});n.zG.uploadReview(t,s.A.uploadType,s.A.mediaUrl,i).then((t=>{if(t[0]){let e="";e=-2===t[0].code?t[0].error:s.A.lang.error_tip,(0,o.setToast)(e)}else!function(t,e,i,n,r){const a=s.A.slide,l=s.A.lang.separate_review_form,d=t[1]?t[1].discount_code:"";if(d){const t=l.discount_setting;(0,o.$dqs)(".write-review-slide[data-last-slide] .slide-title",a).textContent=t.title,(0,o.$dqs)(".write-review-slide[data-last-slide] .slide-desc",a).textContent=t.subtitle,(0,o.$dqs)(".slide-discount",a).style.display="flex",(0,o.$dqs)(".discount-code",a).textContent=d}x(),(0,o.$dqsa)("[data-content-slide] .slide-next,.slide-done",a).forEach((t=>t.setAttribute("disabled",!0))),(0,o.$dqs)(".upload-file-tip",a).innerHTML="",e.value=i.value=n.value="",r&&(r.checked=!1);s.A.mediaUrl=[],s.A.isLinkReqRev&&(window.history.replaceState({},"",location.href.replace("?req=review","")),s.A.isLinkReqRev=!1)}(t,r,a,d,c);(0,o.$dqs)(".slide-done",e).innerHTML=s.A.lang.separate_review_form.done}))}()):x();else if(r.contains("back-slide")){const t=(0,o.$dqs)(`.write-review-slide[index="${d}"]`);R(t,t.previousElementSibling),d--,(0,o.$dqs)(".write-review-container").style.left=(parseInt(t.getAttribute("index"))-1)*-p+"px"}}))}(t.text_color),y(),s.A.isLinkReqRev){document.body.classList.add("trustoo-open"),(0,o.$dqs)("#trustoo-mask").style.display="flex";const t=(0,o.$dqs)(".trustoo-write-review");t.style.display="block",t.parentNode.style.display="block"}}function f(t=!1){const e=s.A.lang.separate_review_form;let i="";if(s.A.attributeConfig){const n=s.A.attributeConfig.attributes,o=t?"data-normal-product":"data-select-product";n.forEach(((t,s)=>{let n="";"multiple_choice"===t.type&&(n=``),i+=`
\n\t\t\t${n}\n\t\t\t \n \n
`}))}return i}function _(){n.zG.getAttribute().then((t=>{t[1]&&(s.A.attributeConfig=t[1],(0,o.$dqs)("[data-reviewer-slide]",s.A.slide).insertAdjacentHTML("beforebegin",f()),y(),b())}))}function b(){let t=0;"normal"!==s.A.slide.dataset.reviewType&&(0,o.$dqsa)(".write-review-slide",s.A.slide).forEach((e=>{"normalProduct"in e.dataset?e.setAttribute("index",-1):(e.setAttribute("index",t),t++)}))}function y(){const t="product"===s.A.slide.dataset.reviewType?"data-select-product":"data-normal-product";(0,o.$dqsa)(`.write-review-slide[${t}][data-attribute]`,s.A.slide).forEach(((t,e)=>{(0,l.M6)(t,s.A.attributeConfig.attributes[e],((t,e)=>{e||x()}))}))}function C(){const t=s.A.slide,e=(0,o.$dqsa)("input.slide-input",t),i=(0,o.$dqs)(".slide-done",t),n=(0,o.$dqs)("#tt-protection-checkbox",t),r=(0,o.$dqs)(".input-tip",t);let a=!0;n&&(a=n.checked),""===e[0].value||""===e[1].value||!a||u||r?i.setAttribute("disabled",!0):i.removeAttribute("disabled")}function $(){(0,o.$dqs)("#trustoo-mask").style.display="none";const t=s.A.slide;t.style.display="none",t.parentNode.style.display="none",s.A.writeTo.productId="";const e=(0,o.$dqs)("#trustoo-mask>.trustoo-power");if(e&&(e.style.display="none"),document.body.classList.remove("trustoo-open"),window.removeEventListener("hashchange",r.FP),-1!==window.location.hash.indexOf("tt-write-reviews-open")&&window.history.replaceState({},document.title,window.location.href.replace("#tt-write-reviews-open","")),(0,l.ps)(),"normal"!==t.dataset.reviewType){let e=0;(0,o.$dqsa)(".write-review-slide",t).forEach((t=>{t.setAttribute("index",e),"selectProduct"in t.dataset?t.remove():e++}))}delete t.dataset.reviewType}function x(){const t=(0,o.$dqs)(`.write-review-slide[index="${d}"]`);R(t,(0,o.$dqs)(`.write-review-slide[index="${d+1}"]`)),d++,(0,o.$dqs)(".write-review-container").style.left=(parseInt(t.getAttribute("index"))+1)*-p+"px"}function R(t,e){t.classList.remove("active"),e.classList.add("active")}function q(t){return 6===w?`
${a.A.heartStroke}
`.repeat(t)+`
${a.A.heartStroke}
`.repeat(5-t):(0,o.getTotalStarString)(t,!1)}},72:t=>{var e=[];function i(t){for(var i=-1,s=0;s{i.d(e,{B:()=>A,m:()=>g});var s=i(957),n=i(357),o=i(986),r=i(571),a=i(405),l=i(607),d=i(500);let c=!1,p=!1,u=0,v=0;async function g(){let t=null;if("undefined"==typeof vstar_qa_settings||r.A.isSettingUpdate){const e=await s.nj.getSetting();null===e[0]&&(t=e[1])}else t=vstar_qa_settings;if(t){if(1!==t.is_active)return;(0,a.aQ)(3,1),u=t.page_size,p=t.is_show_helpful;let e=[];const i=t.color.split(",");["title-color","title-line-color","line-color","question-color","answer-color","reply-bg-color"].forEach(((t,s)=>{e.push(`--${t}:${i[s]};`)})),r.A.globalStyle.textContent+=`\n\t\t.tt-tabs-list{\n\t\t\t${e.slice(0,2).join("")}\n\t\t}\n\t\t.tt-qa-list{\n\t\t\t${e.slice(2).join("")}\n\t\t\t\t--author-font-size:${t.author_font_size}px;\n\t\t\t\t--content-font-size:${t.content_font_size}px;\n\t\t}\n\t\t`,v=t.review_date_format,r.A.pageInfo.QA={curPage:1},A()}}async function A(){c||(0,o.$dqs)("#vstar-reviews #reviews-body,#vstar-noreviews").insertAdjacentHTML("beforeend",'
');const t=(0,o.$dqs)(".tt-qa-list",r.A.reviewsDom),e=r.A.reviewsDom,i=r.A.userSetting.review_pagination_type,a=1===i;a&&(0,l.ne)(t,r.A.reviewsDom,!0);const g=await s.nj.getList({limit:u});if(g[1]){if(!c){c=!0,(0,o.$dqs)(".tt-qa-list",r.A.reviewsDom).addEventListener("click",(function(t){let e=t.target;"path"===e.tagName&&(e=e.closest("svg"));let i=e.classList;(i.contains("tt-helpful")||i.contains("tt-unhelpful"))&&(0,l.nG)(e,i)}));const t=g[1].page.total_page;r.A.pageInfo.QA.total=t,a&&(0,d.IV)(),e.setAttribute("qa-page-count",t)}(0,d.RR)(i,r.A.reviewsDom)}const A=g[1].list;let w="";a?(0,l.ne)(t,r.A.reviewsDom,!1):2===i&&(w=t.innerHTML),A.length?A.forEach((t=>{let e="";if(t.qa_reply_data){let i="";if(1===p){const e="tt_qa_"+r.A.shop_id;let s=(0,o.gsLocal)("get",e),a="",l="";if(s){s=JSON.parse(s);const e=s.find((e=>e.id==t.id));e&&(1===e.likeType?a="active":2===e.likeType&&(l="active"))}i=`
${r.A.lang.question_and_answer.helpful}\n\t\t\t\t\t${n.A.helpful(a)}${t.qa_reply_data.likes_qa}\n\t\t\t\t\t${n.A.unhelpful(l)}${t.qa_reply_data.dislike_qa}
`}e=`
\n\t\t\t\t
\n\t\t\t\t\t${r.A.lang.shop_name.replace("{{shop_name}}",r.A.userSetting.store_name)} \n\t\t\t\t\t${h(v,t.qa_reply_data.create_time)}\n\t\t\t\t
\n\t\t\t\t
${t.qa_reply_data.answer}
\n\t\t\t\t
\n\t\t\t\t\t${i}\n\t\t\t\t
\n\t\t\t
`}w+=`\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t${t.questioner}\n\t\t\t\t\t\t\t${h(v,t.create_time)}\n\t\t\t\t\t\t
\n\t\t\t\t\t
${t.question}
\n\t\t\t\t\t
\n\t\t\t\t\t${e}\n\t\t\t\t
\n\t\t\t\t`})):w=`
${n.A.qa(r.A.userSetting.font_color)}
${r.A.lang.no_questions}
`,t.innerHTML=w}function h(t,e){return 5===t?(0,l.PK)(e):(0,l.i$)(e,t)}},113:t=>{t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},134:(t,e,i)=>{i.d(e,{A:()=>a});var s=i(957),n=i(986),o=i(571);const r=function(){const t={};switch(o.A.shop_id){case 55363502159:o.A.isHomePage&&(t.customCollTarSel=".h1.product__title,.card__heading.h5>.full-unstyled-link");break;case 64402030811:o.A.isHomePage&&(t.customCollTarSel='.glide-wrapper.glider-slide [data-product-type="title"]');break;case 59471560866:t.homeStarDelay=2e3,o.A.isHomePage&&(t.customCollTarSel=".prod-thumb-title-color>a")}return t},a={get_move_review_info:{},custom_carousel_info:{},custom_style_info:{},star_insert_adaptation_info:{},user_needs_solutions_info:{},fixedLayout:0,bigRatingDigits:2,isOpenRecStars:!0,isShowRevVerified:!0,isPopupProdReviews:!1,customRatingText:"",customHeadRatingText:"",showRelatedPros:!1,reviewConstructor:null,setLinkMedia:!1,isAssociatedProdFullName:!1,setUserNeed(){const t=this,{shop_id:e}=Review;switch(e){case 55420682445:o.A.isProPage&&document.body.addEventListener("click",(function(t){t.target.classList.contains("reviews-text")&&"P"===t.target.tagName&&(0,n.$dqs)(".breadcrumb_pr_wrap").scrollIntoView({behavior:"smooth",block:"start"})}));break;case 26046955594:case 17400017:{location.href.includes("/pages/puffy-mattress-reviews")&&window.shopifyObj&&(t.isPageReview=!0,o.A.isProPage=!1,o.A.productId=void 0,window.shopifyObj.productId=null),t.isOpenRecStars=!1,o.A.copyText="Coupon copied successfully";const i=document.createElement("script");i.src="https://cdn.vstar.app/static/module/user_need/extension-script/expand-submission.js?"+o.A.constructTime,document.head.append(i);let s=localStorage.getItem("trustoo_uv");if(s||(s=o.A.shop_id+"_"+(new Date).getTime()),o.A.isProPage){let l=null,d=null;const c=document.createElement("script");c.src="https://embed.cloudflarestream.com/embed/sdk.latest.js",c.async=!0,c.onload=()=>{d&&(l=Stream(d))},document.head.appendChild(c),document.addEventListener("onTTDetailEmbed",(()=>{if(TTRevDetail.revDetail.addEventListener("click",(t=>{const e=t.target;(e.closest(".tt-video-player")||(e.tagName=e.nextElementSibling))&&a("CLICK_MEDIA",void 0,{review_id:TTRevDetail.reviewId,interaction_type:"expand"})})),d=document.querySelector("#trustoo-review-detail .tt-detail-frame"),"undefined"!=typeof Stream&&(l=Stream(d)),d){const t=TTRevDetail.closeTTDetail;TTRevDetail.closeTTDetail=e=>{"block"===d.style.display&&l&&(a("CLICK_MEDIA",void 0,{review_id:TTRevDetail.reviewId,view_duration:l.currentTime,interaction_type:"close_popup",tt_client_id:s}),l=Stream(d)),t(e)}}}))}function a(t,e,i,s){try{fetch("https://api.trustoo.io/api/v1/reviews/collect_event",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:s,shop_id:o.A.shop_id,event_type:t,event_source:"STOREFRONT",expand_content:e,media_interaction:i})})}catch(t){}}window.TrustooColl=a;break}}Object.assign(t,r())},setPageReview(t){let e=window.location.href,i=e.indexOf("pages/")+6,s=e.substring(i);const r=(0,n.$dqs)(".pagefly-review-widget-sealapp,.custom-vstar-review-widget,#vstar-all-reviews");if(r&&"vstar-all-reviews"===r.id&&(o.A.isRevPage=!0),o.A.allRev=r,[49048256661,62366974136,23928713].includes(t)||r||"reviews"===s){(["clienti-soddisfatti","shop-reviews","review-page","producto-mini","avis-menviking","customer-reviews"].includes(s)||"reviews"===s||r&&"vstar-all-reviews"===r.id||r&&("custom-vstar-review-widget"===r.className||"pagefly-review-widget-sealapp"===r.className)&&!o.A.isProPage)&&(this.isPageReview=!0)}},async getUserNeedData(){const{pageType:t,themeId:e}=o.A,i=this;if(o.A.isHomePage||o.A.isProPage||o.A.otherPageColl||o.A.isCollPage||i.isPageReview){let n,o;if("undefined"!=typeof vstar_custom_info?(n=vstar_custom_info,o=null):[o,n]=await s.zG.getUserNeed(),null===o)for(let s in n){const o=n[s].list,r=o.length;if("star_insert_adaptation_info"===s){const t=o.filter((t=>(!t.theme_id||t.theme_id===e)&&t.product_detail_star)),s=o.filter((t=>(!t.theme_id||t.theme_id===e)&&t.product_list_star));if(t.length){const e=t.at(-1);i.customProTarSel=e.product_detail_star,i.detailRatingPosition=e.detail_position}if(s.length){const t=s.at(-1);i.customCollTarSel=t.product_list_star,i.listRatingPosition=t.list_position}}else if(0!==r)for(let n=0;n{i.d(e,{Cf:()=>q,Do:()=>S,PT:()=>A,_x:()=>w,yE:()=>h});var s=i(571),n=i(957),o=i(986),r=i(657),a=i(357),l=i(743),d=i(651);let c=null,p=null,u=null,v=0;const g=5,A=(0,o.debounce)(R,500);async function h(t){let e="",i="";const{lang:n,productImageUrl:l,productName:d,isNoUploadImg:v}=s.A,h=s.A.lang.all_in_one_from,w=n.question_and_answer;let f="";"undefined"!=typeof Review&&["ar","he"].includes(Review.lang)&&(f=" trustoo-rtl"),s.A.isMobile&&(s.A.globalStyle.textContent+="#trustoo-allinone>.tt-write-content {\n\t\t\tpadding-bottom: 100px !important;\n\t}"),s.A.globalStyle.textContent+=`\n\t#trustoo-allinone,#success-window,#tt-product-selector{\n\t\t--button-bg-color: ${t.review_button_background_color};\n\t\t--button-text-color: ${t.review_button_text_color};\n\t\t--button-radius: ${t.button_radius}px;\n\t\t--text-color: ${t.text_color};\n\t\t--light-text-color: ${(0,o.hexToRgba)(t.text_color,.4)};\n\t\t--text-color-alpha-70: ${(0,o.hexToRgba)(t.text_color,.7)};\n\t\t--discount-code-color:${t.discount_text_color};\n\t\t--discount-copy-color:${t.discount_copy_color};\n\t}\n #trustoo-allinone .form-submit[disabled]{background-color:${(0,o.hexToRgba)(t.review_button_background_color,.4)} !important}\n\t\t.trustoo-write-review,#success-window,#tt-product-selector{\n\t\t\t--write-bg:${t.popup_bg_color};\n\t\t\tbackground: ${t.popup_bg_color};\n\t\t\tborder-radius: ${t.popup_radius}px;\n\t\t\tcolor:${t.text_color}\n\t\t}\n\t\t#trustoo-allinone.trustoo-write-review .vstar-star{\n\t\t\t--star-color: ${t.star_color};\n\t\t}\n\t\t.trustoo-widget .window-discount,.trustoo-widget .slide-discount{\n\t\t\tbackground:${t.discount_bg_color};\n\t\t\tborder-radius: ${t.discount_card_radius}px;\n\t\t}\n `;const C=function(t,e){let i,s,n=`\n
\n\t\t
${e.name}
\n \n
\n
`;return i=1===t.require_email?"require":"",s=1===t.show_email?"":"hidden",n+=``,i=1===t.require_phone?"require":"",s=1===t.show_phone?"":"hidden",n+=`
\n\t
${e.phone}
\n \n
`,n}(t,n);e='
\n
';const q=t.discount_setting;if(1==q.discount_for_photo_reviews&&q.discount_value&&(1===q.discount_for_reviews_form||2===q.discount_for_reviews_form&&"undefined"!=typeof isEmailWrite&&isEmailWrite)){const t=s.A.lang.all_in_one_from.discount_setting;for(let e in t)t[e]=t[e].replace("{{Discount_amount}}",q.discount_value);let e="";1===q.discount_incentive_conditions?e=t.tip_3:2===q.discount_incentive_conditions&&(e=t.tip_1),i=`
${e}
`}let T="";T=6===t.rating_icon_type?`
${a.A.heartStroke}
`.repeat(5):(0,o.getTotalStarString)(0);const k=`\n
\n
\n
\n ${n.all_in_one_from.write_reviews}\n
`;let E="";E=`
`;let L=`
\n\t
${s.A.lang.you_rating}
\n\t
\n\t${T} \n\t
\n\n
`,P="",I="";1===t.write_review_form&&(I=1===t.enabled_add_video?` \n
${n.all_in_one_from.or}
\n
\n \n +\n ${n.all_in_one_from.add_video}\n 0/1\n
\n `:"",P=`
\n\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t+\n\t\t\t\t\t\t${n.add_photo}\n\t\t\t\t\t\t0/5\n\t\t\t\t
\n\t\t\t\t${I}\n\t\t\t
`);const M=1===t.show_title?`
\n\t
${n.all_in_one_from.title}
\n \n
`:"",D=1===t.require_feedback?"require":"",O=1===t.show_feedback?"":"hidden",B=``;let H="";if(1===t.show_privacy_policy){let e="";const i=h.privacy_policy,s=h.terms,n=h.consent_text.replace("{{privacy_policy}}",`${i}`).replace("{{terms}}",`${s}`);1===t.show_checkbox&&(e=''),H=`
\n\t\t\t${e}\n\t\t
`}let N=`
\n
${k+`
${E}
`+L+`
\n\t\t${M}\n\t\t${B}\n\t\t${P}\n\t\t${C}\n\t\t${s.A.attributeConfig?'
':""}\n\t\t${i}\n\t\t${H}\n\t\t
${w.publish_title}
\n \n
`}
`;if((0,o.$dqs)("#trustoo-mask").insertAdjacentHTML("beforeEnd",N),u=(0,o.$dqs)("#trustoo-allinone"),1===s.A.writeForm&&y(u),c=(0,o.$dqs)(".tt-image-uploader",u),1===t.show_feedback&&((0,o.$dqs)("textarea",u).style.fontFamily=window.getComputedStyle((0,o.$dqs)("input",u)).fontFamily),d){let t=(0,o.$dqs)(".product-right");d.length>100?t.innerHTML=d.substring(0,100)+"...":t.innerHTML=d}if(function(t){t.addEventListener("touchmove",(t=>{t.stopPropagation()}),!1),(0,o.$dqs)(".window-close",t).onclick=function(){$(),s.A.isMobile&&window.history.replaceState({},document.title,window.location.href.replace("#tt-write-reviews-open","")),S()};const e=(0,o.$dqs)("#tt-protection-checkbox",t);e&&(e.onchange=function(){R()});s.A.productImageUrl&&(0,o.imgLoad)(s.A.productImageUrl).then((e=>{const i=e.width,s=e.height,n=(0,o.$dqs)(".product-image",t);n.style.backgroundSize=i>=s?"auto 100%":"100% auto"}));let i=(0,o.$dqsa)(".star-item",t);x(s.A.ratingVal);for(let t=1;t<=i.length;t++)i[t-1].index=t,s.A.isMobile?i[t-1].onclick=function(){s.A.ratingVal=this.index,x(this.index),R()}:(i[t-1].onmouseover=function(){x(this.index)},i[t-1].onclick=function(){s.A.ratingVal=this.index,R()});s.A.isMobile||((0,o.$dqs)(".tt-write-rating .vstar-star",t).onmouseleave=function(){x(0)});let n=(0,o.$dqsa)(".user-input",t);const r=s.A.lang;if(s.A.isMobile){let e=(0,o.getMobileSystem)();"ios"===e&&(t.style.paddingBottom="70px");let i=window.getComputedStyle(t).getPropertyValue("height"),s=function(){"android"==e&&((0,o.$dqs)("#trustoo-allinone").style.overflow="hidden");let s=setInterval((()=>{window.getComputedStyle(t).getPropertyValue("height")!=i&&("android"==e&&((0,o.$dqs)("#trustoo-allinone").style.overflow="scroll",(0,o.$dqs)("#trustoo-allinone").scrollTop=230),clearInterval(s))}),200)};(0,o.$dqsa)("#trustoo-allinone .user-input").forEach((t=>t.addEventListener("click",s))),(0,o.$dqsa)("#trustoo-allinone .user-input").forEach((t=>t.addEventListener("focus",s)))}const a=(0,o.$dqs)(".upload-area",t);a&&(a.onclick=e=>{if(["tt-delete_image","hover-image","image-delete tt-mobile_delete_image"].includes(e.target.className)){const i=e.target.closest(".uploaded-item");let n=i.dataset.name,r=s.A.mediaUrl.findIndex((t=>t.name==n));s.A.mediaUrl.splice(r,1),i.remove(),"image"===i.dataset.type?(s.A.imgUploadedCount===g&&_(1),s.A.imgUploadedCount--):"video"===i.dataset.type&&_(3),(0,o.$dqs)(".images-num",t).innerHTML=`${s.A.imgUploadedCount}/5`}});n.forEach((t=>{t.onblur=function(){let t=this.parentNode.nextElementSibling;""==this.value&&this.classList.contains("require")&&(t.innerHTML=`
${r.required}\n
`,t.classList.add("display"),this.classList.add("error-border"))},t.addEventListener("input",(function(){const t=this.parentNode.nextElementSibling;if(t.innerHTML="",t.classList.remove("display"),this.classList.remove("error-border"),this.parentNode.classList.contains("email-area")){!/^[a-zA-Z0-9_-]+(\.[A-Za-z0-9_-]+)*@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(this.value)&&this.value?(t.innerHTML=`
${r.email_error}\n
`,t.classList.add("display"),this.classList.add("error-border")):this.value||(t.innerHTML="",t.classList.remove("display"),this.classList.remove("error-border"))}else this.classList.contains("big-input")&&function(){let t=(0,o.$dqs)(".big-input").value.length;(0,o.$dqs)("#trustoo-allinone .feedback-count>span").textContent=t+"/"+s.A.newRevCharLimit}();A()}))})),c&&((0,o.$dqs)("input",c).onchange=function(){m(this.files,"image").then((()=>this.value="")).catch((()=>{}))});p=(0,o.$dqs)(".tt-video-uploader .upload-input",t),p&&(p.onchange=function(){const t=this.files[0],e=this.getAttribute("accept").split(",").map((t=>t.slice(1))),i=t.name.split(".").pop();if(!e.includes(i.toLowerCase()))return(0,o.setToast)(s.A.lang.error_tip),!1;if(parseInt(t.size/1048576)>=200)return(0,o.setToast)("The file cannot exceed 200MB"),!1;_(4),m(this.files,"video").then((()=>this.value=""))});(0,o.$dqs)(".form-submit",t).onclick=function(){this.setAttribute("disabled",!0),this.innerHTML=`${r.submitting}`;let t=12;s.A.isMobile&&(t=20),(0,o.setLoading)(this,t),this.setAttribute("disabled",!0),b()}}(u),s.A.isLinkReqRev){if("function"==typeof r.nZ){if((0,r.nZ)())return}document.body.classList.add("trustoo-open"),(0,o.$dqs)("#trustoo-mask").style.display="flex",(0,o.$dqs)(".trustoo-write-review").style.display="block"}}function w(t){const e=l.A.write,{allInOne:i,image:r,content:a,prodName:d,title:c,contentLabel:p,submit:u}=e,v=i.dataset.reviewType,g=s.A.lang;let A=g.all_in_one_from.write_reviews,h=s.A.productImageUrl,w=s.A.productName;"reviews"===t?(p.textContent=g.all_in_one_from.review,u.textContent=g.submit,"product"===v&&s.A.writeTo.productId?(h=s.A.writeTo.prodImageUrl,w=s.A.writeTo.productName,n.zG.getAttribute(s.A.writeTo.productId).then((t=>{t[1]&&t[1].attributes.length>0&&(s.A.attributeConfig=t[1],(0,o.$dqs)(".error-tip.phone-tip",i).insertAdjacentHTML("afterend",'
'),y(i))}))):"shop"===v&&(A=s.A.lang.store_review.write_btn_text)):"QA"===t&&(A=g.question_and_answer.ask_a_question,a.placeholder=g.question_and_answer.desc_placeholder,p.textContent=g.question_and_answer.question,u.textContent=g.question_and_answer.submit_question,i.setAttribute("write-qa",!0)),w&&w.length>100&&(w=w.substring(0,100)+"..."),d.textContent=w,r.style.backgroundImage=`url(${h})`,c.textContent=A,document.body.classList.add("trustoo-open"),i.style.display="flex",l.A.mask.style.display="flex"}async function m(t,e){const{mediaUrl:i}=s.A;let r=!1,l=(0,o.$dqsa)(".uploaded-item[data-type=image]").length,d=(0,o.$dqs)(".tt-uploader"),c=t.length,p="";if("image"===e&&!Object.keys(s.A.uploadImgInfo).length){const t=await n.zG.getPolicyToken();s.A.uploadImgInfo=t[1]}t.length+l>=5&&"image"===e&&(c=5-l,_(2));for(let l=0;l{n.zG.uploadImg(t).then((t=>{let e=t[1].name;null===t[0]?((0,o.$dqs)(`.uploaded-item[data-name="${e}"]>.loader`).remove(),0===(0,o.$dqsa)(".uploaded-item>.loader").length&&R(),i.push({name:e,url:"https://img.trustoo.io/"+t[1].key,resource_type:1})):(s.A.imgUploadedCount===g&&_(1),s.A.imgUploadedCount--,(0,o.$dqs)(`.uploaded-item[data-name="${e}"]`).remove(),(0,o.$dqs)(".images-num").innerHTML=`${s.A.imgUploadedCount}/5`,(0,o.setToast)("Failed to upload image"))}))})),v=1):"video"===e&&(v=2,n.zG.getUploadVideoUrl().then((t=>{const{upload_url:e,domain:i}=t[1],r=t[1].video_service_uid;n.zG.uploadVideo(e,A).then((()=>{const t=i+"/"+r,e=t+"/thumbnails/thumbnail.jpg";s.A.mediaUrl.push({url:t+"/iframe",resource_type:2});const n=(0,o.$dqs)(".uploaded-item[data-type=video]",u),l=new Image;l.onload=()=>{n.insertAdjacentHTML("afterbegin",a.A.video)},l.src=e,n.style.backgroundImage=`url(${e})`,T(n,e,(()=>{n.classList.remove("uploading"),(0,o.$dqs)(".loader",n).remove(),R()}))})).catch((()=>{f()}))})).catch((()=>{f()})));let h=document.createElement("div");if(h.className="uploaded-item",h.setAttribute("data-type",e),"image"===e?(p&&h.setAttribute("data-name",p),(0,o.$dqs)(".tt-image-uploader .images-num").innerHTML=`${s.A.imgUploadedCount}/5`,T(h,c)):"video"===e&&h.classList.add("uploading"),h.innerHTML='
\n
\n
\n ',d.before(h),(0,o.setLoading)(h,24),r||(r=!0,R()),s.A.isMobile){let t=document.createElement("div");t.className="image-delete tt-mobile_delete_image",h.appendChild(t)}}}function f(){(0,o.$dqs)(".uploaded-item[data-type=video]",u).remove(),_(3),(0,o.setToast)(s.A.lang.error_tip),p.value=""}function _(t){switch(t){case 1:c.style.display="flex";break;case 2:c.style.display="none";break;case 3:(0,o.$dqsa)(".tt-video-uploader,.upload-or",u).forEach((t=>t.style.display="flex"));break;case 4:(0,o.$dqsa)(".tt-video-uploader,.upload-or",u).forEach((t=>t.style.display="none"))}}function b(){if(s.A.isSendLock)return void(0,o.setToast)("Please comment again after 15 seconds");let t=0,e="";const i="shop"===u.dataset.reviewType;t=u.getAttribute("write-qa")?2:1,1===t?e=".inline:not([hidden]) .user-input":2===t&&(e='.user-input:not([input-type="author_phone"],[input-type="title"])');let r=null;const a={};var l=Array.from((0,o.$dqsa)(e));if(1===t){r=n.zG.uploadReview;const t=(0,o.$dqs)("#tt-protection-checkbox",u);t&&t.checked&&(a.agree_privacy=1),l.forEach((t=>{const e=t.getAttribute("input-type");t.value&&(a[e]=t.value)})),s.A.isLinkReqRev&&"undefined"==typeof isEmailWrite&&(a.source="store_link"),s.A.ip&&(a.ip=s.A.ip,a.author_country=s.A.loc);const e=(0,d.uq)();e.length&&(a.attributes_info={attributes:e,attribute_collection_id:s.A.attributeConfig.attribute_collection_id})}else if(2===t){r=n.nj.addQA;const t=["question","questioner","questioner_email"];l.forEach(((e,i)=>{a[t[i]]=e.value})),a.questioner_country=s.A.loc,(0,o.$dqs)("#tt-qa-unpublish").checked&&(a.is_publish=3)}r(a,v,s.A.mediaUrl,i).then((e=>{if(null===e[0]){const i=e[1],n=s.A.lang;C(),$(),document.body.classList.add("trustoo-open"),(0,o.$dqs)("#trustoo-allinone").style.display="none";const r=(0,o.$dqs)("#success-window");r.style.display="block";const a=(0,o.$dqs)(".window-title",r),l=(0,o.$dqs)(".window-content",r);if(1===t?(a.textContent=n.success_message,l.textContent=n.submitted_successfully):2===t&&(a.textContent=n.question_and_answer.thanks,l.textContent=n.question_and_answer.submitted),i&&i.discount_code&&1===t){const t=s.A.lang.all_in_one_from.discount_setting;(0,o.$dqs)(".window-discount",r).style.display="flex",a.textContent=t.title,a.style.marginTop="0",(0,o.$dqs)(".window-content",r).textContent=t.subtitle,(0,o.$dqs)(".discount-code",r).textContent=i.discount_code}s.A.isLinkReqRev&&(window.history.replaceState({},"",location.href.replace("?req=review","")),s.A.isLinkReqRev=!1),s.A.isSendLock=!0,setTimeout((()=>s.A.isSendLock=!1),1500)}else{C();let t="";t=-2===e[0].code?e[0].error:s.A.lang.error_tip,(0,o.setToast)(t,"1%")}})).catch((()=>{C(),(0,o.setToast)(`${s.A.lang.error_tip}`,"1%")}))}function y(t){if(s.A.attributeConfig){const e=s.A.attributeConfig.attributes,i=(0,o.$dqs)("#tt-attr-wrapper",t);"product"===t.dataset.reviewType?l.A.write.selectedProdAttr=i:l.A.write.normalProdAttr=i,e.forEach((t=>{(0,d.M6)(i,t)}))}}function C(){const{lang:t}=s.A;let e=(0,o.$dqs)(".form-submit");e.innerHTML=`${t.submit}`,e.removeAttribute("disabled")}function $(){Object.assign(s.A,{imgUploadedCount:0,uploadedIndex:0,mediaUrl:[]}),u.removeAttribute("write-review"),u.removeAttribute("write-qa"),(0,o.$dqsa)(".user-input",u).forEach((t=>t.value="")),(0,o.$dqsa)(".error-tip",u).forEach((t=>t.innerHTML=""));let t=(0,o.$dqsa)(".error-border",u);t.length&&t.forEach((t=>t.classList.remove("error-border"))),1===s.A.writeForm&&((0,o.$dqsa)(".uploaded-item",u).forEach((t=>t.remove())),(0,o.$dqs)(".tt-image-uploader .images-num",u).innerText="0/5",2===v&&((0,o.$dqs)(".tt-video-uploader .images-num",u).innerText="0/1"),(0,o.$dqsa)(".tt-uploader,.upload-or",u).forEach((t=>t.style.display="flex")));const e=(0,o.$dqs)(".feedback-count>span",u);e&&(e.textContent="0/"+s.A.newRevCharLimit);(0,o.$dqs)(".form-submit",u).setAttribute("disabled",!0),s.A.ratingVal=0,x(0);const i=(0,o.$dqs)("#tt-protection-checkbox",u);i&&(i.checked=!1)}function x(t){let e=(0,o.$dqsa)("#trustoo-allinone .star-item"),i=t||s.A.ratingVal;for(let t=0;t{t.value||"none"===t.parentNode.style.display||(d=!1)}));let c=0===(0,o.$dqsa)(".uploaded-item>.loader",t).length;d&&c&&(1===e&&l||2===e)&&0==(0,o.$dqsa)(".input-tip",t).length&&(1!==e||0!==s.A.ratingVal)?r.removeAttribute("disabled"):r.setAttribute("disabled",!0)}function q(){const{lang:t}=s.A;let e=`\n
\n ${t.success_message}\n
`;(0,o.imgLoad)("https://cdn.vstar.app/static/images/Vector.png");let i="",n=`
${t.submitted_successfully}
`,r=`
`;i=``;let a=`
${'
'+e+n+i+r}
`;(0,o.$dqs)("#trustoo-mask").insertAdjacentHTML("beforeend",a);const l=(0,o.$dqs)("#success-window");(0,o.$dqs)("#success-window .window-close").onclick=S,(0,o.$dqs)(".window-button button",l).onclick=S,(0,o.$dqs)(".discount-copy",l).onclick=function(){(0,o.copyToClipboard)((0,o.$dqs)(".discount-code",l).textContent,(()=>{(0,o.setToast)(s.A.copyText||s.A.lang.copy_succ)}))}}function S(){const t=(0,o.$dqs)("#success-window");(0,o.$dqsa)(".window-discount",t).forEach((t=>t.style.display="none")),(0,o.$dqs)(".window-title",t).style.cssText="",(0,o.$dqs)("#trustoo-mask").style.display="none";const e=(0,o.$dqs)("#trustoo-allinone");e.style.display="none",delete e.dataset.reviewType,t.style.display="none",document.body.classList.remove("trustoo-open"),(0,d.ps)(),s.A.writeTo.productId="",window.removeEventListener("hashchange",r.FP),l.A.write.selectedProdAttr&&l.A.write.selectedProdAttr.remove()}function T(t,e,i){(0,o.imgLoad)(e).then((s=>{i&&i(),s.width>=s.height?t.style.backgroundSize="100% auto":t.style.backgroundSize="auto 100%",t.style.backgroundImage=`url(${e})`})).catch((()=>{i&&(i(),t.style.backgroundImage="url(../../images/video_default.png)")}))}},163:(t,e,i)=>{i.d(e,{FS:()=>c,dn:()=>u,xc:()=>p});var s=i(743),n=i(986),o=i(571);let r,a=0,l=0;r=o.A.isMobile?18:16;let d=!1;function c(t,e){const{isWdoRevOpen:i}=o.A;let a=i?o.A.wdoRev:o.A.reviews;const l="shopReviews"===o.A.showType?a.shopReviewsHighs:a.columnHighs,d=s.A[o.A.reviewsKey].curBody,c=(0,n.$dqs)(`[no="${e}"]`,d);var p=parseInt(c.style.top),u=c.offsetHeight+p+r;const v=t+"column's hight updates,hight is "+u;Review.checkGridHighMsg.push(v),u>l[t-1]&&(l[t-1]=u);let g=(0,n.$dqsa)(`.column${t}`,d);g.forEach(((i,s)=>{parseInt(i.getAttribute("no"))>e&&(i.style.top=u+"px",u=u+i.offsetHeight+r),s===g.length-1&&(l[t-1]=u)}));let A=30;o.A.isMobile&&(A=0);var h=Math.max.apply(null,l);d.style.height=h+A+"px"}function p(t=[],e,i=!1){const{isWdoRevOpen:a}=o.A,p=o.A.isWdoRevOpen?o.A.wdoRev:o.A.reviews,h="shopReviews"===o.A.showType?p.shopReviewsHighs:p.columnHighs,w=a?o.A.wdoRevBody:o.A.reviewsBody,m=s.A[o.A.reviewsKey].curBody;if(!a&&"none"===w.offsetParent)return;if(l=e,i)for(let t=0;t{const e=(0,n.$dqs)(".resource-item",t);if(null!==e){const t=e.getAttribute("proportion");e.style.width=f+"px",(0,n.$dqs)("img",e).width=f,e.style.height=f/t+"px"}})),g(m,t),d=t.length<=h.length&&o.A.isFirstPageRender,function(t,e=!1){const i={highMsg:[]};let s=o.A.isWdoRevOpen?o.A.wdoRev:o.A.reviews;const a="shopReviews"===o.A.showType?s.preShopReviewsHighs:s.preColHighs,p=a.length;if(i.loadedStyleCheck=e,0===p){if(e)return;u()}else for(let e=0;e{t.getAttribute("no")>l&&o.push(t)})),0===o.length)continue;n=t+o[0].offsetHeight+r;for(let t=1;t=280&&t<501?s=2:t>=501&&t<920?s=3:t>=920&&t<1150?s=4:t>=1150&&t<1420?s=5:t>=1420&&(s=6);o.A.isMobile||(2===s||3===s?((0,n.$dqsa)(".reviews-date",e).forEach((t=>t.style.cssText="position: static;")),(0,n.$dqsa)(".grid-mobile",e).forEach((t=>t.style.cssText="margin-top: 10px;"))):s>0&&((0,n.$dqsa)(".reviews-date",e).forEach((t=>t.style.cssText="")),(0,n.$dqsa)(".grid-mobile",e).forEach((t=>t.style.cssText=""))));return i.cardWid=(t-(12*(s-1)+r))/s,s}(a,t),d="shopReviews"===o.A.showType?s.shopReviewsHighs:s.columnHighs;d.length=0;for(let t=0;tt));"shopReviews"===o.A.showType?s.preShopReviewsHighs=l:s.preColHighs=l;for(var d=0;dt===i)),n[c]=n[c]+t.offsetHeight+r,t.className=`grid-review column${c+1}`,t.dataset.column=c+1,t.style.left=c*(s.cardWid+12)+a+"px",t.style.top=i+"px",o.A.minHeight=i}var p=Math.max.apply(null,n);let u="";u=o.A.isMobile?`${p}px`:`${p+30}px`,t.style.height=u}function A(t,e){t.forEach((t=>{t.style.width=e+"px";const i=(0,n.$dqs)("img",t);i&&(i.width=e,i.style.display="block")}))}o.A.arrangeGrid=u},220:(t,e,i)=>{i.d(e,{my:()=>c,qM:()=>d});var s=i(357),n=i(986),o=i(571),r=i(638),a=i(657);let l=null;function d(){if(o.A.isActWdoRev){const t="",e=o.A.userSetting.sidetab_setting,i=`#vstar-tab{ background-color:${e.sidetab_background_color}; color:${e.sidetab_font_color} } `;o.A.globalStyle.insertAdjacentHTML("beforeend",i);let s=`
${o.A.tabText||e.sidetab_button_text}
`;!(0,n.$dqs)("#vstar-tab")&&document.body.insertAdjacentHTML("beforeend",s),(0,n.$dqs)("#vstar-tab").onclick=p}}function c(){(0,n.$dqs)(".window-close",o.A.wdoRev.node).onclick=function(){u()}}async function p(){if(l)o.A.showType=o.A.wdoRevDom.getAttribute("show-type");else{const t=``;document.body.insertAdjacentHTML("beforeend",t),l=(0,n.$dqs)(".window-review-mask"),l.onclick=function(t){(0,n.$dqs)("#vstar-window-review").contains(t.target)||u()},o.A.showType="reviews",(0,n.setWriteReview)()}if(o.A.isWdoRevOpen=!0,o.A.reviewsKey="popup",document.body.classList.add("trustoo-open"),l.style.display="block",o.A.isProPage&&(0,n.processRecordedData)("reviews_click"),!o.A.isWdoRevExist){o.A.wdoRev.node=(0,n.$dqs)("#vstar-window-review");let t={};t.tarNode=o.A.wdoRev.node,t.position="afterbegin",-1===o.A.allRatingData.total_reviews&&await(0,r.requestAllRating)(),o.A.allRatingData.total_reviews>0?(0,a.Gs)(t):(0,a.WC)(),(0,r.insertReviewDetail)()}}function u(){o.A.isWdoRevOpen=!1,l=(0,n.$dqs)(".window-review-mask"),l.style.display="none",document.body.classList.remove("trustoo-open"),o.A.reviewsKey="normal",o.A.reviewsDom&&(o.A.showType=o.A.reviewsDom.getAttribute("show-type"))}document.addEventListener("onTTshowReviewsClick",p)},314:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i="",s=void 0!==e[5];return e[4]&&(i+="@supports (".concat(e[4],") {")),e[2]&&(i+="@media ".concat(e[2]," {")),s&&(i+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),i+=t(e),s&&(i+="}"),e[2]&&(i+="}"),e[4]&&(i+="}"),i})).join("")},e.i=function(t,i,s,n,o){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(s)for(var a=0;a0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),i&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=i):c[2]=i),n&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=n):c[4]="".concat(n)),e.push(c))}},e}},354:t=>{t.exports=function(t){var e=t[1],i=t[3];if(!i)return e;if("function"==typeof btoa){var s=btoa(unescape(encodeURIComponent(JSON.stringify(i)))),n="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),o="/*# ".concat(n," */");return[e].concat([o]).join("\n")}return[e].join("\n")}},357:(t,e,i)=>{i.d(e,{A:()=>s});const s={verified:'\n \n',close:t=>`\n \n \n `,heartStroke:'\n\t\n\t\n\t',star:'\n \n \n ',store:(t="#666666")=>`\n \n \n `,hook:()=>'\n \n ',prePage:t=>``,nextPage:t=>``,helpful:t=>`\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t`,unhelpful:t=>`\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t`,sort:(t="#202123")=>`\n\t\t\n\t`,multiPhoto:()=>'\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t',qa:(t="#000")=>`\n\n`,loading:(t="#000")=>`\n\t\t\n\t`,over:(t="#000")=>`\n\n`,cw:'\n\t\n\t\n\t\n\t',video:'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n'}},381:(t,e,i)=>{i.d(e,{D:()=>f});var s=i(957),n=i(357),o=i(986),r=i(571),a=i(638),l=i(134);const d=1,c='
\n\n
\n';function p(t){const e=l.A.bsTextCarouselCount||6,i=[s.zG.getProRevList("commented-at-descending",5,d,e,r.A.buyersShowType,!1,null,!0),new Promise((t=>{const e=(0,o.$dqs)('script[src*="swiper@11/swiper-bundle.min.js"]');if(e)"undefined"!=typeof Swiper?t():e.addEventListener("load",(()=>{t()}));else{const e=document.createElement("link");e.rel="stylesheet",e.href="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css",document.head.appendChild(e);const i=document.createElement("script");i.setAttribute("defer",!0),i.src="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js",document.head.appendChild(i),i.onload=()=>t()}}))];Promise.all(i).then((e=>{const i=e[0];if(i[0])throw 11;t.insertAdjacentHTML("beforeend",'');const s=(0,o.$dqs)("#tt-bs-carousel",t),n=i[1].list;if(0===n.length)return;const r=n.length>1,a=r?c:"",d=n.reduce(((t,e)=>t+`\n
\n
\n
\n ${e.author}\n
\n
\n ${(0,o.getTotalStarString)(e.star)}\n
\n
\n
\n ${e.content}\n
\n
\n `),"");s.insertAdjacentHTML("afterbegin",`${a}
\n\t\t\t
\n ${d}
${a}`),function(t,e){const i={delay:l.A.bsCarouselSpeed||3e3,pauseOnMouseEnter:!0};new Swiper(t,{loop:!0,speed:300,spaceBetween:200,slidesPerView:1,autoplay:i});const s=t.swiper;e&&(t.previousElementSibling.onclick=()=>{s.slidePrev()},t.nextElementSibling.onclick=()=>{s.slideNext()})}((0,o.$dqs)(".tt-swiper-container",s),r)}))}let u=0,v=0,g=null;const A=1,h=1,w=2,m=3;async function f(t=null){let e=null,i=null,l="afterend";t||(0,o.$dqsa)("#trustoo-buyers-show-widget").forEach((t=>{t.offsetParent||t.remove()}));const d=(0,o.$dqs)("#trustoo-buyers-show-widget");if(!t)if("undefined"==typeof vstar_buyers_show_settings||r.A.isSettingUpdate){e=(await s.zG.getBuyerShowsSettings())[1]}else e=vstar_buyers_show_settings;if(!(e&&1===e.is_activated||d||t))return;if(i=e,!t)if(r.A.bsInsertSelector)g=(0,o.$dqs)(r.A.bsInsertSelector);else if(d)g=d,l="afterbegin";else if(null!==(0,o.$dqs)("product-form.product-form")||[1499,1567,1356,1363,1368,1434,887,1500,1431,1841,1891].includes(r.A.theme_store_id))g=(0,o.$dqs)("product-form.product-form").parentNode;else{let t="";switch(r.A.theme_store_id){case 829:t=".product__form-wrapper";break;case 775:case 796:case 578:t="form.product-form";break;case 730:t="form.product-single__form";break;case 679:t="form.addToCartForm";break;case 380:t="form.product-form--wide";break;default:t="warehouse"===Review.theme.name?"form.product-form":"Tema-plano-ouro-ldo"===Review.theme.name?".product-form__payment-container":".product-details .shopify-product-form,form[id^=AddToCartForm],form.product-form,product-form.product-form,form[id^=product_form]"}g=t&&(0,o.$dqs)(t)?(0,o.$dqs)(t):(0,o.$dqs)(".product-form")}if(!g&&!t)return void(Review.buyersShowTip="买家秀嵌入失败");const c=document.createElement("style");document.head.appendChild(c),r.A.is=c,t||(v=e.columns_count*e.rows_count,r.A.insHoverColor=e.hover_text_color,r.A.buyersShowType=2===e.reviews_type?1:2);const f=t?r.A.albumSortType:"image-descending";let _="trustoo_show_reviews";t&&(_=r.A.isWdoRevOpen?"trustoo_album_reviews":"trustoo_album_all_reviews");let b="";if((t||[w,h].includes(e.style))&&(b=await async function(t,e){let i=r.A.buyersShowType;"trustoo_album_reviews"===e||"trustoo_album_all_reviews"===e?(u=r.A.albumCount,i=2):"trustoo_show_reviews"===e&&(u=v);const a=await s.zG.getProRevList(t,0,A,u,i,!0),l=a[1];r.A.lastPageSize||(r.A.lastPageSize=l.count%u,r.A.total_page=l.total_page);const d=l.list,c=JSON.parse((0,o.gsSession)("get","tt_detail_reviews"));c[e]?c[e].push(d):c[e]=[d];(0,o.gsSession)("set","tt_detail_reviews",JSON.stringify(c)),1===A&&(r.A.insPageCount=l.total_page);let p="";return d.forEach(((t,e)=>{const i=t.resources[0];if(0===t.resources.length||!i.src&&!i.thumb_src)return;const s=2===i.resource_type?i.thumb_src:i.src,o=A-1+"-"+e,r=2===i.resource_type?`
${n.A.video}
`:"";p+=`
\n
\n\t\t\tbuyer show image\n\t\t\t${r}\n
\n
`})),p}(f,_),""===b)){if(t)return;if(e&&e.style===w)return}let y=null;if(t)y=t;else{const t=(0,o.$dqs)("#tt-bs-area");t&&t.remove();const i=``;g.insertAdjacentHTML(l,i),y=(0,o.$dqs)("#tt-bs-area"),[m,h].includes(e.style)&&p(y)}if(b?(y.insertAdjacentHTML("beforeend",`
${b}
`),r.A.isInsertBS=!0,(0,a.insertReviewDetail)(),(0,o.$dqs)("#tt-bs-list",y).onclick=e=>{const i=e.target.closest(".review-item");if(i){const[e,s]=i.getAttribute("index").split("-"),n=JSON.parse((0,o.gsSession)("get","tt_detail_reviews"))[_];(0,o.processRecordedData)("reviews_click"),TTRevDetail.showTTReviewDetail(r.A,"",n[e][s],t?"trustoo_album_reviews":"trustoo_buyers_show")}},(0,o.$dqsa)(".tt-wrapper>.review-item>img",y).forEach((t=>{t.onerror=()=>{t.closest(".tt-wrapper").remove()}})),t&&!r.A.isMobile&&t.insertAdjacentHTML("beforebegin",'
')):r.A.isNoPost=!0,t)c.textContent+=`\n #vstar-reviews .tt-reviews-album .review-item>img{border-radius:${r.A.userSetting.album_radius}px;}\n `;else{const{card_bg:t,text_color:i,star_color:s,button_bg:n,arrow_color:r}=e,a=1/e.columns_count*100+"%";c.textContent+=`\n \t#tt-bs-area .tt-bs-title{color:${e.title_text_color};font-size:${e.title_font_size}px;text-align:${e.title_align}}\n #tt-bs-area .tt-wrapper{flex-basis:${a};padding:${e.item_padding}px;}\n #tt-bs-area .review-item>img{border-radius:${e.border_radius}px;}\n #tt-bs-area #tt-bs-carousel .tt-bs-card{border-radius:${e.card_radius}px;}\n #tt-bs-area .tt-bs-card{background:${t};color:${i};}#tt-bs-area .tt-bs-text,#tt-bs-area .tt-bs-author{color:${i};}\n #tt-bs-area .vstar-star{--star-color:${s};}#tt-bs-area .tt-bs-button{background:${n};}\n #tt-bs-area .tt-bs-button path{fill:${r};}\n `,(0,o.$dqs)("#tt-bs-area").style.display="block"}}},405:(t,e,i)=>{i.d(e,{aQ:()=>l,is:()=>a,nf:()=>d});var s=i(88),n=i(357),o=i(571),r=i(607);function a(t,e="beforeend",i=5,a,d,c=""){this.pageCount=a,this.callback=()=>{"QA"===o.A.showType?(0,s.B)():(0,r.bC)()};const p=this.callback;this.activeIndex=0,this.pagerCount=i,this.middleIndex=parseInt(i/2);const{userSetting:u,isWdoRevOpen:v}=o.A,g=v?o.A.wdoRevDom:o.A.reviewsDom,A=n.A.prePage(u.font_color),h=n.A.nextPage(u.font_color),w=t.parentNode.classList.contains("trustoo-rtl");for(var m=`
    \n `,f=1;f<=i;f++)m+=`
  • ${f}
  • `;if(m+=`
  • \n ${w?A:h}\n
  • \n
`,t.insertAdjacentHTML(e,m),this.el=g.querySelector(".page-control"),this.pageNumList=this.el.querySelectorAll(".page-control-item"),a<5&&1!==a)for(f=a;f<5;f++)this.pageNumList[f].style.display="none";setTimeout((()=>{1===a&&this.togglePageButton(2)}),0),this.el.onclick=t=>{if(t.target.classList.contains("page-control-item")){this.activeIndex=t.target.dataset.index;let e=parseInt(t.target.textContent);this.pageClick(p,e)}},this.pageClick=function(t,e){let i=this.el.querySelector(".page-control-item.active").textContent;const s=this.pageCount;l(3,e),t?t():this.activeIndex=0,1==i&&1!=e?this.togglePageButton(1,"block"):1!=i&&1==e&&this.togglePageButton(1,"none"),i!=s&&e==s?this.togglePageButton(2,"none"):i==s&&e!=s&&this.togglePageButton(2,"block"),this.setPageNum()};var _=this.el.querySelector(".pre-page"),b=this.el.querySelector(".next-page");this.prePageButton=_,this.nextPageButton=b,this.togglePageButton=function(t,e){1==t?_.style.display=e:2==t&&(b.style.display=e)},this.setPageNum=function(){let t=l();const e=this.pageCount,i=this.pagerCount;this.activeIndex>this.middleIndex&&this.pageNumList[i-1].innerHTML<=e||this.activeIndex1?(t+this.middleIndex>e||t-this.middleIndex<=0?this.el.querySelector(".page-control-item.active").classList.remove("active"):this.activeIndex!=this.middleIndex&&(this.el.querySelector(".page-control-item.active").classList.remove("active"),this.activeIndex=this.middleIndex,this.pageNumList[this.middleIndex].classList.add("active")),this.changePageNum()):(this.el.querySelector(".page-control-item.active").classList.remove("active"),this.pageNumList[this.activeIndex].classList.add("active"))},this.getNextPageReviews=function(){l(1);const t=this.pageCount;let e=l();this.activeIndex++,2==e&&this.togglePageButton(1,"block"),e==t&&this.togglePageButton(2,"none"),p&&p(),this.setPageNum(2)},this.getPrePageReviews=function(){const t=this.pageCount;this.activeIndex--,l(2);let e=l();1==e&&this.togglePageButton(1,"none"),e==t-1&&this.togglePageButton(2,"block"),p&&p(),this.setPageNum(1)},b.onclick=()=>this.getNextPageReviews(),_.onclick=()=>this.getPrePageReviews(),this.changePageNum=function(){const t=this.pageCount,e=this.pagerCount;let i=l();var s=!1,n=i-this.middleIndex,o=i+this.middleIndex;i+this.middleIndex>t?(s=!0,n=t-2*this.middleIndex,e%2==0&&n++,o=t):e%2==0&&o--,n<=0&&(s=!0,o=(n=1)+2*this.middleIndex);for(var r=0,a=n;a<=o;a++)a===i&&s&&(this.pageNumList[r].classList.add("active"),this.activeIndex=r),this.pageNumList[r].innerHTML=a,r++},this.clearPageItems=()=>{o.A.pager.el.querySelectorAll(".page-control-item").forEach((t=>t.remove()))}}function l(t,e){let i=o.A.isWdoRevOpen?o.A.wdoRevDom:o.A.reviewsDom;const s="reviews"===o.A.showType?"reviews-page-no":"qa-page-no",n=(o.A.isWdoRevOpen?o.A.popupPageInfo:o.A.pageInfo)[o.A.showType];let r=n.curPage;return 1===arguments.length?(1===t?r++:2===t&&r--,n.curPage=r,i.setAttribute(s,r)):3===t&&2===arguments.length&&(i.setAttribute(s,e),n.curPage=e),r}function d(){if(1!==o.A.userSetting.review_pagination_type||!o.A.pager)return;const t=o.A.pager.el,e=o.A.pageInfo[o.A.showType];if(!e)return;const{total:i,curPage:s}=e;if(o.A.pager.pageCount=i,i<=1)return void(t.style.display="none");t.style.display="flex",t.setAttribute("type",o.A.showType),function(t){t.querySelectorAll(".page-control-item").forEach((t=>t.remove()))}(t),e.pageNumbers&&e.pageNumbers.length>0?function(t,e){const i=t.querySelector(".next-page");e.forEach(((e,s)=>{const n=document.createElement("li");n.className="page-control-item",n.dataset.index=s,n.dataset.number=e,n.textContent=e,t.insertBefore(n,i)}))}(t,e.pageNumbers):function(t,e){const i=Math.min(e,5),s=t.querySelector(".next-page");for(let e=1;e<=i;e++){const i=document.createElement("li");i.className="page-control-item",i.dataset.index=e-1,i.dataset.number=e,i.textContent=e,t.insertBefore(i,s)}}(t,i);const n=e.activeIndex||0,r=t.querySelector(`.page-control-item[data-index="${n}"]`);r&&(r.classList.add("active"),e.activeIndex=n),o.A.pager.activeIndex=n,o.A.pager.pageNumList=t.querySelectorAll(".page-control-item"),o.A.pager.pagerCount=o.A.pager.pageNumList.length,o.A.pager.middleIndex=parseInt(o.A.pager.pagerCount/2),o.A.pager.prePageButton.style.display=1===s?"none":"flex",o.A.pager.nextPageButton.style.display=s===i?"none":"flex"}},429:(t,e,i)=>{i.d(e,{DF:()=>g,M0:()=>h,WF:()=>A,nq:()=>u});var s=i(957),n=i(571),o=i(134);const{$dqs:r,debounce:a,setObserve:l,$dqsa:d}=i(986),{setInsertTarget:c,starEmbeddedAdaptation:p}=i(638);function u(){const t=n.A.curCollArr;let e=[],i='a[href*="/products/"]';if(-1===t.findIndex((t=>"A"!==t.tagName)))return t;if(-1===t.findIndex((t=>null===r(i,t))))return t.map((t=>r(i,t)));let s=5;d(".product-card .group-block-content div[class*=product_title],.product-card .group-block-content div.text-block.h5").length&&(s=6);let o,a=t[0],l=[];for(let n=0;n{n.A.observer.disconnect(),g();let{collTarget:t}=Review;const e=Array.from(t).map((t=>t.textContent.replace(/\n/g,"").trim())).join();h(),t=Review.collTarget;const i=Array.from(t).map((t=>t.textContent.replace(/\n/g,"").trim())).join(),s=d(".collection-icon-list").length;(0!==s&&s===t.length||0===s&&2===n.A.userSetting.is_show_stars_without_review)&&e===i?g():(Review.observeCount++,c(2),Review.collectionTarget=t)}),400);function g(){const t=document.body;l(t,{childList:!0,subtree:!0},(function(){v()}),n.A)}function A(t){let e="";if(t.length){let i="A",s=[];for(let e=0;ep");break;case 730:t=d(".grid-product__title");break;case 775:t=d(".product-card__name");break;case 766:t=d(".product-item__title");break;case 887:case 1356:case 1363:case 1368:case 1567:t=d(".h5>.full-unstyled-link"),0===t.length&&(t=d(".card-information__text")),l=!1;break;case 829:t=d(".card__name,.spf-product-card__title");break;case 578:t=d(".product__title a");break;case 796:t=d(".product-card__title");break;case 380:var c=d(".grid-link__container .grid__item");t=[],c.forEach((e=>{t.push(e.querySelector(".grid-link__title"))}));break;case 885:if(a=!0,t=d(".product-card__title-wrapper"),i){let t=r(".shopify-section .product");t&&(wrapWid=t.offsetWidth)}break;default:if(Review.theme&&"warehouse"===Review.theme.name){const t=r(".product-item__price-list.price-list");t&&"-15px"===getComputedStyle(t).marginTop&&(n.A.globalStyle.textContent+="div.collection-icon-list.vstar-star {\n margin-bottom: 20px;\n }")}a=!0,t=w()}if(a||0===t.length&&l&&(t=w()),n.A.isCollPage&&0===t.length&&r('a[href*="/products"]')&&await s.zG.sendErrorMsg(2,`集合页评价嵌入失败,店铺地址为:${window.location.href}`).then((e=>{if(e[1]){const i=p(4,e[1].selector);i&&(t=d(i))}})),0!==t.length&&(t=Array.from(t),i)){const e=Review.proTarget;e&&(t=t.filter((t=>t!==e&&!e.contains(t))))}Review.collTarget=t}function w(){let t=[];const{isCollPage:e,isProPage:i,isHomePage:s,hasPyRating:r}=n.A;if(e||i||s||o.A.otherPageColl||r){let e;return o.A.customCollTarSel&&(e=o.A.customCollTarSel,t=d(o.A.customCollTarSel)),0===t.length&&(e=".product-card .group-block-content div[class*=product_title],.product-card .group-block-content div.text-block.h5",t=d(e),Review.collType="new shopify theme"),0===t.length&&(e=".product-details>span.title,.apb_product_list_product_item_title,.grid_title,.collection__grid-item__details,\n .popup_cart_title>a,h3.product-title,body[class*=kalles] h1.product_title>a,a.ga-product_title,h4.title-product,.grid-item .inner-top>.product-bottom>a.product-title,\n .product__grid__title,.pt-title.prod-thumb-title-color,.product-item-meta__title,.product-grid-item__title,.product-item-title",t=d(e),Review.collType="type1"),0===t.length&&(e=".product-bottom>.product-title,.product-details>.product-title,.product-item__details a,.info .title,.product-name>a,\n .collectionBlock__title>a,.product-grid-item>p,.innerer>.title,.grid__product-content>a,.ht-product-title>a,.h5>.full-unstyled-link,\n .product .card-title,.list_prod .title-product,.product.slick-slide .card-title,.product-title-price,.prd-title,.product-info>h3.title14,\n .list-view-item__title-column>a,.gt_product-name>h2,.tt-description>h2.tt-title,.desc>h5,.product-item__title",t=d(e),Review.collType="type2"),0===t.length&&(e=".ftr,.product-grid-desc>h3,.gt_product-name,p.list-product__title,.product--details-container,.product--item-title,.h4.grid-view-item__title,\n .product-grid-item__product-name,h3.card__name.h4,.grid-crop-title,.title-wrap,h3>span.overflowed,.product-grid--title>a,a.gf_product-title,.bls__product-details a,\n a>.indiv-product-title-text,h2.product_name,.sf__pcard-content .max-w-full,h2.product-card__title,.proName>a,a.item__name.pg__sync-url,.spf-product-card__title",t=d(e),Review.collType="type3"),0===t.length&&(e=".grid-product__title,.product-block__title,\n .grid-view-item__title,.product-card__name,.ProductItem__Title,.product-info>a>h2,\n .card-information__text,span.indiv-product-title-text,.card__title:not(.heading),h4.product_name,\n .productitem--title,.grid-link__title,.boost-pfs-filter-product-item-title,.product-collection__title,\n .col_product_text_color,.js-product-details-link,.t4s-product-title,.ws-card__title,.product-thumbnail__info>.product-thumbnail__header",t=d(e),Review.collType="type4"),0===t.length&&(e='.card__heading[id^="title-template"],.lh-product-title',t=d(e),Review.collType="type5"),Review.coll_dqsa="$dqsa(`"+e+"`)",t}}},472:(t,e,i)=>{i.d(e,{A:()=>a});var s=i(354),n=i.n(s),o=i(314),r=i.n(o)()(n());r.push([t.id,'@font-face {\n font-family: "iconfont";\n /* Project id 4017216 */\n src: url("//cdn.vstar.app/static/css/fonts/iconfont.woff2?t=169") format("woff2"), url("//cdn.vstar.app/static/css/fonts/iconfont.woff?t=1681525258204") format("woff"), url("//cdn.vstar.app/static/css/fonts/iconfont.ttf?t=1681525258204") format("truetype");\n}\n.vstar-star.tt-right {\n text-align: right;\n}\n.vstar-star.tt-center {\n text-align: center;\n}\n.vstar-star > * {\n display: inline-block;\n vertical-align: middle;\n}\n.vstar-star .star-item {\n height: auto;\n margin-right: 2px;\n font-size: 0;\n line-height: normal;\n}\n.vstar-star .star-item.nostar .trustoo-rating-icon path {\n fill: var(--nostar-color);\n}\n.vstar-star .star-item.half-star > .item-nostar .trustoo-rating-icon path {\n fill: var(--nostar-color);\n}\n.vstar-star .star-item .trustoo-rating-icon path {\n fill: var(--star-color);\n}\n.vstar-star .star-item.half-star {\n position: relative;\n}\n.vstar-star .item-star {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n overflow: hidden;\n width: 100%;\n height: 100%;\n font-size: 0;\n}\n.vstar-star .item-nostar {\n font-size: 0;\n}\n.vstar-star i.trustoo-icon-star,\n.vstar-star i.trustoo-icon-nostar {\n display: inline;\n}\n#vstar-reviews #reviews-body .trustoo-badge-icon {\n width: 14px;\n height: 14px;\n}\n#vstar-reviews .user-verified .trustoo-badge-icon {\n margin-right: 4px;\n}\n.product-icon-list.vstar-star .star-item,\n.product-icon-list.vstar-star .trustoo-rating-icon {\n width: 20px;\n height: 20px;\n}\n.collection-icon-list .star-item,\n.collection-icon-list .trustoo-rating-icon {\n width: 16px;\n height: 16px;\n}\n#vstar-reviews > #reviews-head .star-item,\n#vstar-reviews > #reviews-head .trustoo-rating-icon {\n width: 20px;\n height: 20px;\n}\n.trustoo-widget #reviews-body .star-item,\n.trustoo-widget #reviews-body .trustoo-rating-icon {\n width: 14px;\n height: 14px;\n}\n.noreviews-nostar .star-item,\n.noreviews-nostar .trustoo-rating-icon {\n width: 20px;\n height: 20px;\n}\n.collection-icon-list {\n margin: 5px 0;\n}\n.collection-icon-list .collection-reviews-num {\n margin: 1px 6px 0 3px;\n font-size: 16px;\n line-height: normal;\n}\n.collection-icon-list .tt-rating-text {\n font-size: 16px;\n line-height: normal;\n}\n#vstar-reviews #reviews-head {\n display: flex;\n}\n#vstar-reviews .head-sort {\n width: 40px;\n height: 40px;\n box-sizing: border-box;\n}\n#vstar-reviews .head-sort .sort-content {\n position: relative;\n width: 100%;\n height: 100%;\n}\n#vstar-reviews #reviews-body {\n position: relative;\n}\n#vstar-reviews .list-review .img-item,\n#vstar-reviews .list-review .resource-item {\n overflow: hidden;\n width: 100px;\n height: 100px;\n}\n#vstar-reviews .grid-review {\n position: absolute;\n display: inline-block;\n padding-bottom: 16px;\n border-radius: 8px;\n animation: recover 1s linear;\n box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.12);\n vertical-align: top;\n}\n#vstar-reviews #reviews-body .reviews-text {\n line-height: 140%;\n}\n#vstar-reviews #reviews-body svg {\n vertical-align: middle;\n}\n#vstar-reviews .grid-review .grid-review-head {\n position: relative;\n padding: 0 16px;\n margin-top: 16px;\n}\n#vstar-reviews .grid-review .user-message {\n margin: 12px 0 12px;\n}\n#vstar-reviews .grid-review .user-name {\n padding: 0;\n margin-right: 6px;\n font-size: 14px;\n font-weight: 700;\n vertical-align: middle;\n}\n#vstar-reviews .grid-review .country-name {\n font-size: 16px;\n vertical-align: middle;\n}\n#vstar-reviews .grid-review .reviews-date {\n font-size: 12px;\n line-height: 22px;\n}\n#vstar-reviews .grid-review .grid-review-body {\n padding: 0 16px;\n}\n#vstar-reviews .grid-review .reviews-text {\n font-size: 14px;\n word-wrap: break-word;\n}\n#vstar-reviews .grid-review .display-text {\n font-size: 14px;\n}\n#vstar-reviews .grid-review .img-item,\n#vstar-reviews .grid-review .resource-item {\n display: block;\n width: 100%;\n border-radius: 8px 8px 0 0;\n}\n#vstar-reviews .grid-review img {\n width: 100%;\n border-radius: 8px 8px 0 0;\n}\n.pagefly-star-rating-sealapp:empty,\n.ecom-star-rating-sealapp:empty,\n.custom-vstar-rating-widget:empty {\n display: block;\n}\n[class^="trustoo-icon-"] {\n /* use !important to prevent issues with browser extensions that change fonts */\n font-family: "iconfont" !important;\n font-size: 14px;\n /* Better Font Rendering =========== */\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n font-style: normal;\n font-variant: normal;\n font-weight: normal;\n line-height: 1;\n text-transform: none;\n}\n.trustoo-icon-helpful:before {\n color: var(--font-color);\n content: "\\e605";\n}\n.trustoo-icon-unhelpful:before {\n color: var(--font-color);\n content: "\\e606";\n}\n.trustoo-icon-star:before {\n color: var(--star-color);\n content: "\\e602";\n}\n.trustoo-icon-nostar:before {\n color: var(--nostar-color);\n content: "\\e602";\n}\n[class^="trustoo-icon-"].rated:before {\n color: var(--star-color);\n}\n[class^="trustoo-icon-"].no-rated:before {\n color: var(--nostar-color);\n}\n.trustoo-icon-skirt:before {\n content: "\\e60b";\n}\n.trustoo-icon-bag:before {\n content: "\\e60f";\n}\n.trustoo-icon-leaf:before {\n content: "\\e610";\n}\n.trustoo-icon-tie:before {\n content: "\\e611";\n}\n.trustoo-icon-cup:before {\n content: "\\e612";\n}\n.trustoo-icon-fire:before {\n content: "\\e60a";\n}\n.trustoo-icon-trophy:before {\n content: "\\e613";\n}\n.trustoo-icon-crown:before {\n content: "\\e614";\n}\n.trustoo-icon-heart:before {\n content: "\\e615";\n}\n.trustoo-icon-diamond:before {\n content: "\\e616";\n}\n.trustoo-icon-shirt:before {\n content: "\\e617";\n}\n.trustoo-icon-surrounded:before {\n content: "\\e609";\n}\n.trustoo-icon-spikes:before {\n content: "\\e618";\n}\n.trustoo-icon-rounded:before {\n content: "\\e608";\n}\n.trustoo-icon-chef:before {\n content: "\\e60d";\n}\n.trustoo-icon-footprint:before {\n content: "\\e60e";\n}\n.trustoo-icon-seedling:before {\n content: "\\e60c";\n}\n.trustoo-icon-helpful:before {\n content: "\\e605";\n}\n.trustoo-icon-unhelpful:before {\n content: "\\e606";\n}\n.trustoo-icon-star:before {\n content: "\\e602";\n}\n',"",{version:3,sources:["webpack://./static/css/trustoo-insert.less"],names:[],mappings:"AACA;EACC,uBAAA;EAAC,uBAAuB;EAExB,gQAAA;AAAD;AAMC;EACC,iBAAA;AAJF;AAOC;EACC,kBAAA;AALF;AAQC;EACC,qBAAA;EACA,sBAAA;AANF;AALA;EAeE,YAAA;EACA,iBAAA;EACA,YAAA;EACA,mBAAA;AAPF;AAUE;EAEE,yBAAA;AATJ;AAYE;EAEE,yBAAA;AAXJ;AAjBA;EAiCG,uBAAA;AAbH;AApBA;EAsCE,kBAAA;AAfF;AAvBA;EA0CE,kBAAA;EACA,MAAA;EACA,QAAA;EACA,SAAA;EACA,OAAA;EACA,gBAAA;EACA,WAAA;EACA,YAAA;EACA,YAAA;AAhBF;AAlCA;EAqDE,YAAA;AAhBF;AArCA;;EA0DE,eAAA;AAjBF;AAoBA;EACC,WAAA;EACA,YAAA;AAlBD;AAoBA;EACC,iBAAA;AAlBD;AAqBA;;EAGE,WAAA;EACA,YAAA;AApBF;AAwBA;;EAGE,WAAA;EACA,YAAA;AAvBF;AA0BA;;EAGE,WAAA;EACA,YAAA;AAzBF;AA6BA;;EAGE,WAAA;EACA,YAAA;AA5BF;AAgCA;;EAGE,WAAA;EACA,YAAA;AA/BF;AAmCA;EACC,aAAA;AAjCD;AAgCA;EAIE,qBAAA;EACA,eAAA;EACA,mBAAA;AAjCF;AA2BA;EASE,eAAA;EACA,mBAAA;AAjCF;AAqCA;EAEE,aAAA;AApCF;AAkCA;EAME,WAAA;EACA,YAAA;EACA,sBAAA;AArCF;AA6BA;EAWG,kBAAA;EACA,WAAA;EACA,YAAA;AArCH;AA2CA;EACC,kBAAA;AAzCD;AA4CA;;EAEC,gBAAA;EACA,YAAA;EACA,aAAA;AA1CD;AA6CA;EACC,kBAAA;EACA,qBAAA;EACA,oBAAA;EACA,kBAAA;EACA,4BAAA;EACA,gDAAA;EACA,mBAAA;AA3CD;AA6CA;EACC,iBAAA;AA3CD;AA6CA;EACC,sBAAA;AA3CD;AA6CA;EAEE,kBAAA;EACA,eAAA;EACA,gBAAA;AA5CF;AAwCA;EAQE,mBAAA;AA7CF;AAqCA;EAYE,UAAA;EACA,iBAAA;EACA,eAAA;EACA,gBAAA;EACA,sBAAA;AA9CF;AA8BA;EAoBE,eAAA;EACA,sBAAA;AA/CF;AA0BA;EAyBE,eAAA;EACA,iBAAA;AAhDF;AAsBA;EA8BE,eAAA;AAjDF;AAmBA;EAkCE,eAAA;EACA,qBAAA;AAlDF;AAeA;EAuCE,eAAA;AAnDF;AAuDA;;EAGE,cAAA;EACA,WAAA;EACA,0BAAA;AAtDF;AAiDA;EASE,WAAA;EACA,0BAAA;AAvDF;AA2DA;;;EAGC,cAAA;AAzDD;AA4DA;EA1DE,+EAA+E;EA4DhF,kCAAA;EACA,eAAA;EA1DC,sCAAsC;EA4DvC,mCAAA;EACA,kCAAA;EACA,kBAAA;EACA,oBAAA;EACA,mBAAA;EACA,cAAA;EACA,oBAAA;AA1DD;AA6DA;EACC,wBAAA;EACA,gBAAA;AA3DD;AA8DA;EACC,wBAAA;EACA,gBAAA;AA5DD;AA+DA;EACC,wBAAA;EACA,gBAAA;AA7DD;AAgEA;EACC,0BAAA;EACA,gBAAA;AA9DD;AAgEA;EACC,wBAAA;AA9DD;AAgEA;EACC,0BAAA;AA9DD;AAgEA;EACC,gBAAA;AA9DD;AAiEA;EACC,gBAAA;AA/DD;AAkEA;EACC,gBAAA;AAhED;AAmEA;EACC,gBAAA;AAjED;AAoEA;EACC,gBAAA;AAlED;AAqEA;EACC,gBAAA;AAnED;AAsEA;EACC,gBAAA;AApED;AAuEA;EACC,gBAAA;AArED;AAwEA;EACC,gBAAA;AAtED;AAyEA;EACC,gBAAA;AAvED;AA0EA;EACC,gBAAA;AAxED;AA2EA;EACC,gBAAA;AAzED;AA4EA;EACC,gBAAA;AA1ED;AA6EA;EACC,gBAAA;AA3ED;AA8EA;EACC,gBAAA;AA5ED;AA+EA;EACC,gBAAA;AA7ED;AAgFA;EACC,gBAAA;AA9ED;AAiFA;EACC,gBAAA;AA/ED;AAkFA;EACC,gBAAA;AAhFD;AAmFA;EACC,gBAAA;AAjFD",sourcesContent:['// out: false\n@font-face {\n\tfont-family: "iconfont";\n\t/* Project id 4017216 */\n\tsrc: url("//cdn.vstar.app/static/css/fonts/iconfont.woff2?t=169") format("woff2"),\n\t\turl("//cdn.vstar.app/static/css/fonts/iconfont.woff?t=1681525258204") format("woff"),\n\t\turl("//cdn.vstar.app/static/css/fonts/iconfont.ttf?t=1681525258204") format("truetype");\n}\n\n.vstar-star {\n\t&.tt-right {\n\t\ttext-align: right;\n\t}\n\n\t&.tt-center {\n\t\ttext-align: center;\n\t}\n\n\t& > * {\n\t\tdisplay: inline-block;\n\t\tvertical-align: middle;\n\t}\n\n\t.star-item {\n\t\theight: auto;\n\t\tmargin-right: 2px;\n\t\tfont-size: 0;\n\t\tline-height: normal;\n\t}\n\t.star-item {\n\t\t&.nostar {\n\t\t\t.trustoo-rating-icon path {\n\t\t\t\tfill: var(--nostar-color);\n\t\t\t}\n\t\t}\n\t\t&.half-star {\n\t\t\t> .item-nostar .trustoo-rating-icon path {\n\t\t\t\tfill: var(--nostar-color);\n\t\t\t}\n\t\t}\n\n\t\t.trustoo-rating-icon path {\n\t\t\tfill: var(--star-color);\n\t\t}\n\t}\n\n\t.star-item.half-star {\n\t\tposition: relative;\n\t}\n\n\t.item-star {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\toverflow: hidden;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tfont-size: 0;\n\t}\n\t.item-nostar {\n\t\tfont-size: 0;\n\t}\n\n\ti.trustoo-icon-star,\n\ti.trustoo-icon-nostar {\n\t\tdisplay: inline;\n\t}\n}\n#vstar-reviews #reviews-body .trustoo-badge-icon {\n\twidth: 14px;\n\theight: 14px;\n}\n#vstar-reviews .user-verified .trustoo-badge-icon {\n\tmargin-right: 4px;\n}\n\n.product-icon-list.vstar-star {\n\t.star-item,\n\t.trustoo-rating-icon {\n\t\twidth: 20px;\n\t\theight: 20px;\n\t}\n}\n\n.collection-icon-list {\n\t.star-item,\n\t.trustoo-rating-icon {\n\t\twidth: 16px;\n\t\theight: 16px;\n\t}\n}\n#vstar-reviews > #reviews-head {\n\t.star-item,\n\t.trustoo-rating-icon {\n\t\twidth: 20px;\n\t\theight: 20px;\n\t}\n}\n\n.trustoo-widget #reviews-body {\n\t.star-item,\n\t.trustoo-rating-icon {\n\t\twidth: 14px;\n\t\theight: 14px;\n\t}\n}\n\n.noreviews-nostar {\n\t.star-item,\n\t.trustoo-rating-icon {\n\t\twidth: 20px;\n\t\theight: 20px;\n\t}\n}\n\n.collection-icon-list {\n\tmargin: 5px 0;\n\n\t.collection-reviews-num {\n\t\tmargin: 1px 6px 0 3px;\n\t\tfont-size: 16px;\n\t\tline-height: normal;\n\t}\n\t.tt-rating-text {\n\t\tfont-size: 16px;\n\t\tline-height: normal;\n\t}\n}\n\n#vstar-reviews {\n\t#reviews-head {\n\t\tdisplay: flex;\n\t}\n\n\t.head-sort {\n\t\twidth: 40px;\n\t\theight: 40px;\n\t\tbox-sizing: border-box;\n\n\t\t.sort-content {\n\t\t\tposition: relative;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t}\n\t}\n}\n\n// Mark 瀑布流样式\n#vstar-reviews #reviews-body {\n\tposition: relative;\n}\n\n#vstar-reviews .list-review .img-item,\n#vstar-reviews .list-review .resource-item {\n\toverflow: hidden;\n\twidth: 100px;\n\theight: 100px;\n}\n\n#vstar-reviews .grid-review {\n\tposition: absolute;\n\tdisplay: inline-block;\n\tpadding-bottom: 16px;\n\tborder-radius: 8px;\n\tanimation: recover 1s linear;\n\tbox-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.12);\n\tvertical-align: top;\n}\n#vstar-reviews #reviews-body .reviews-text {\n\tline-height: 140%;\n}\n#vstar-reviews #reviews-body svg {\n\tvertical-align: middle;\n}\n#vstar-reviews .grid-review {\n\t.grid-review-head {\n\t\tposition: relative;\n\t\tpadding: 0 16px;\n\t\tmargin-top: 16px;\n\t}\n\n\t.user-message {\n\t\tmargin: 12px 0 12px;\n\t}\n\n\t.user-name {\n\t\tpadding: 0;\n\t\tmargin-right: 6px;\n\t\tfont-size: 14px;\n\t\tfont-weight: 700;\n\t\tvertical-align: middle;\n\t}\n\n\t.country-name {\n\t\tfont-size: 16px;\n\t\tvertical-align: middle;\n\t}\n\n\t.reviews-date {\n\t\tfont-size: 12px;\n\t\tline-height: 22px;\n\t}\n\n\t.grid-review-body {\n\t\tpadding: 0 16px;\n\t}\n\n\t.reviews-text {\n\t\tfont-size: 14px;\n\t\tword-wrap: break-word;\n\t}\n\n\t.display-text {\n\t\tfont-size: 14px;\n\t}\n}\n\n#vstar-reviews .grid-review {\n\t.img-item,\n\t.resource-item {\n\t\tdisplay: block;\n\t\twidth: 100%;\n\t\tborder-radius: 8px 8px 0 0;\n\t}\n\n\timg {\n\t\twidth: 100%;\n\t\tborder-radius: 8px 8px 0 0;\n\t}\n}\n\n.pagefly-star-rating-sealapp:empty,\n.ecom-star-rating-sealapp:empty,\n.custom-vstar-rating-widget:empty {\n\tdisplay: block;\n}\n\n[class^="trustoo-icon-"] {\n\t/* use !important to prevent issues with browser extensions that change fonts */\n\tfont-family: "iconfont" !important;\n\tfont-size: 14px;\n\t/* Better Font Rendering =========== */\n\t-webkit-font-smoothing: antialiased;\n\t-moz-osx-font-smoothing: grayscale;\n\tfont-style: normal;\n\tfont-variant: normal;\n\tfont-weight: normal;\n\tline-height: 1;\n\ttext-transform: none;\n}\n\n.trustoo-icon-helpful:before {\n\tcolor: var(--font-color);\n\tcontent: "\\e605";\n}\n\n.trustoo-icon-unhelpful:before {\n\tcolor: var(--font-color);\n\tcontent: "\\e606";\n}\n\n.trustoo-icon-star:before {\n\tcolor: var(--star-color);\n\tcontent: "\\e602";\n}\n\n.trustoo-icon-nostar:before {\n\tcolor: var(--nostar-color);\n\tcontent: "\\e602";\n}\n[class^="trustoo-icon-"].rated:before {\n\tcolor: var(--star-color);\n}\n[class^="trustoo-icon-"].no-rated:before {\n\tcolor: var(--nostar-color);\n}\n.trustoo-icon-skirt:before {\n\tcontent: "\\e60b";\n}\n\n.trustoo-icon-bag:before {\n\tcontent: "\\e60f";\n}\n\n.trustoo-icon-leaf:before {\n\tcontent: "\\e610";\n}\n\n.trustoo-icon-tie:before {\n\tcontent: "\\e611";\n}\n\n.trustoo-icon-cup:before {\n\tcontent: "\\e612";\n}\n\n.trustoo-icon-fire:before {\n\tcontent: "\\e60a";\n}\n\n.trustoo-icon-trophy:before {\n\tcontent: "\\e613";\n}\n\n.trustoo-icon-crown:before {\n\tcontent: "\\e614";\n}\n\n.trustoo-icon-heart:before {\n\tcontent: "\\e615";\n}\n\n.trustoo-icon-diamond:before {\n\tcontent: "\\e616";\n}\n\n.trustoo-icon-shirt:before {\n\tcontent: "\\e617";\n}\n\n.trustoo-icon-surrounded:before {\n\tcontent: "\\e609";\n}\n\n.trustoo-icon-spikes:before {\n\tcontent: "\\e618";\n}\n\n.trustoo-icon-rounded:before {\n\tcontent: "\\e608";\n}\n\n.trustoo-icon-chef:before {\n\tcontent: "\\e60d";\n}\n\n.trustoo-icon-footprint:before {\n\tcontent: "\\e60e";\n}\n\n.trustoo-icon-seedling:before {\n\tcontent: "\\e60c";\n}\n\n.trustoo-icon-helpful:before {\n\tcontent: "\\e605";\n}\n\n.trustoo-icon-unhelpful:before {\n\tcontent: "\\e606";\n}\n\n.trustoo-icon-star:before {\n\tcontent: "\\e602";\n}\n'],sourceRoot:""}]);const a=r},500:(t,e,i)=>{i.d(e,{IV:()=>c,RR:()=>l});var s=i(571),n=i(986),o=i(405),r=i(607),a=i(88);function l(t,e,i,r){const a=(0,n.$dqs)(".loader",e);a&&"block"===a.style.display&&(a.style.display="none"),s.A.allRevLoadLock=!1,s.A.isRevPage||s.A.isWdoRevOpen||(1===t?(s.A.isFirstPageRender||(s.A.isList?(0,n.scrollTo)(e):(0,n.scrollTo)(e,"auto")),r&&(0,o.nf)()):d())}function d(){const t=s.A.pageInfo[s.A.showType].total,e=s.A.pageInfo[s.A.showType].curPage,i=(0,n.$dqs)(".more-review-btn",s.A.reviewsDom);i&&(i.style.display=e');const e=(0,n.$dqs)("#reviews-footer",s.A.reviewsDom);if(1===l)s.A.pager=new o.is(e,"beforeend",5,c,r.bC,"reviews");else if(2===l){const i=`\n\t\t\t`;e.insertAdjacentHTML("beforeend",i),s.A.pager={el:(0,n.$dqs)(".more-review-btn",e)},s.A.pager.el.onclick=function(t){t.target.style.display="none",(0,n.$dqs)(".loader",t.target.parentNode).style.display="block",(0,o.aQ)(1),"QA"===s.A.showType?(0,a.B)():(0,r.bC)()}}}1===l?(0,o.nf)():2===l&&d()}},540:t=>{t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},571:(t,e,i)=>{i.d(e,{A:()=>s});const s={source:"reviews",staticBaseUrl:"",wrapWid:0,isNullRev:!1,proTarget:null,collTarget:[],ratingIconSvg:"",badgeIconSvg:"",themeStyle:"",ip:"",isFirstExecute:!1,isCollPage:!1,isProPage:!1,isHomePage:!1,isCartPage:!1,productId:"",isSettingUpdate:!1,isProRatingUpdate:!1,isReviewsUpdate:!1,isWebPSupported:!0,revIdBase:"vstar-",isOverwriteOldScripts:!1,isRecordPV:!1,isRecordCart:!1,cartWatcher:null,RevIntersection:null,keySettings:{is_activate_product_rating:2,is_activate_collection_rating:2,is_activate_home_rating:2,is_activate_home_reviews:2,is_activate_reviews:2,sidetab_is_enabled:2,is_review_snippets_active:2,review_sort_by:"image-descending",rating_icon_type:1,verified_icon_type:1,language:"en",is_translate_review:2,auto_switch_language:2,reviews_per_page_number:15,is_show_empty_review:1,is_hide_ratings:2,show_attribute:2},isCollOpen:!1,isProOpen:!1,isRevOpen:!1,isFirstPageRender:!0,buyersShowType:2,isInsertBS:!1,isMixReview:!1,page:0,isWdoRevFirstPageRendered:!1,reviewsList:[],pageRecord:[],reviewsBody:null,reviewsDom:null,revReqParam:"",productHandle:"",userSetting:{},showType:"reviews",layoutClass:"",layoutReviewCount:0,reviewsWidth:0,reviewsEllipsis:"count",reviewsEllipsisRow:4,imgUploadedCount:0,uploadedIndex:0,gridCardWidth:0,wdoGridCardWidth:0,listDisIndex:0,listNodeCount:0,viewer:null,origImg:[],thumbImg:[],likeRevLock:!1,lang:{},column:0,minHeight:0,reviews:{columnHighs:[],shopReviewsHighs:[],preColHighs:[],preShopReviewsHighs:[],cardWid:0,cardCount:0,ratingFilter:0},bsInsertSelector:null,albumCount:8,albumSortType:"commented-at-descending",isInsertRev:!1,isCssLoaded:!1,globalStyle:null,reqErr:null,pageInfo:{reviews:{total:0,curPage:1,activeIndex:0,pageNumbers:[],previousDisplay:"",nextDisplay:""}},popupPageInfo:{reviews:{total:0,curPage:1,activeIndex:0,pageNumbers:[],previousDisplay:"",nextDisplay:""}},isProHasHalfStar:!1,pageCount:0,ratingData:{},allRatingData:{total_reviews:-1},attributeStatistics:null,reviewsData:null,searchACount:6,collTarInx:0,isOtherTheme:!1,isCollFinished:!1,observer:null,isSetObserver:!1,iObserver:null,curCollArr:[],isHomeRatingOpen:!1,allRevLoadLock:!1,mediaUrl:[],isSendLock:!1,ratingVal:0,uploadImgInfo:{},uploadType:1,newRevCharLimit:2e3,isLoginWrite:!1,copyText:"",writePopupEmbedded:!1,writeTo:{type:"normal",productId:"",prodImageUrl:"",productName:""},attributeConfig:null,attributeInstances:[],wdoRev:{columnHighs:[],shopReviewsHighs:[],preColHighs:[],preShopReviewsHighs:[],cardWid:0,cardCount:0,ratingFilter:0},isActWdoRev:!1,isWdoRevOpen:!1,reviewsKey:"normal",isWdoRevExist:!1,wdoRevDom:!1,wdoRevBody:null,isLinkReqRev:!1,writeForm:0,writeRestriction:1,hasPyRating:!1,showRelatedPros:!1,canInsertPagination:!1,revDetailInfo:{page:0,no:0,imageIndex:0},isQAInserted:!1,qsPageNum:0}},607:(t,e,i)=>{i.d(e,{PK:()=>_,bC:()=>v,fn:()=>m,i$:()=>h,nG:()=>w,ne:()=>f});var s=i(571),n=i(957),o=i(986),r=i(163),a=i(405),l=i(134),d=i(357),c=i(500),p=i(743),u=i(651);async function v(t,e){s.A.couldPreLoading=!1,s.A.imgCount=0,s.A.loadedImgCount=0,s.A.thumbImg=[];let i,r,l=[];const{isMixReview:d,isWdoRevOpen:c,isList:u,userSetting:v,isRevPage:A}=s.A;let h=(0,a.aQ)();const w=v.review_pagination_type;r=c?s.A.wdoRevDom:s.A.reviewsDom;const m=c?s.A.wdoRevBody:s.A.reviewsBody,_=s.A.isWdoRevOpen?s.A.wdoRev:s.A.reviews,b="shopReviews"===s.A.showType||"popupShopReviews"===s.A.showType;let y="";const C=p.A[s.A.reviewsKey];y=b?s.A.isWdoRevOpen?"trustoo_popup_shop_reviews":"trustoo_shop_reviews":c?"trustoo_all_reviews":"trustoo_reviews";const $=t||e;$?(l=[],(0,o.gsSession)("set",y,[])):l=(0,o.gsSession)("get",y);let x=null;x=b?(0,o.$dqs)(".tt-shop-reviews",m):(0,o.$dqs)(".tt-review-list",m),(!A&&!c&&(1===w||$)||$&&(d||c))&&(x.style.height="auto",f(x,r,!0),_.cardCount=0,s.A.isMobile&&c&&(0,o.scrollTo)(r),s.A.isFirstPageRender||(s.A.isList?(0,o.scrollTo)(r):(0,o.scrollTo)(r,"auto")));if(1===w&&l[h-1])g(l[h-1]);else{const t=r.getAttribute("review_sort_by");if("undefined"==typeof vstar_product_reviews||s.A.isReviewsUpdate||1!==h||c||$||d||b||1===v.auto_switch_language){i=(await n.zG.getProRevList(t,_.ratingFilter))[1]}else i=vstar_product_reviews;const a=i.page.total_page,p=s.A.isWdoRevOpen?s.A.popupPageInfo:s.A.pageInfo,u=i.page.count;p[s.A.showType]={total:a,curPage:i.page.cur_page,count:u},b&&(C.shopTab&&(C.shopTab.textContent=u),s.A.userSetting.store_reviews_count=u),r.setAttribute("review-page-count",a),s.A.isWebPSupported||i.list.forEach((t=>{0!==t.resources.length&&t.resources.forEach((t=>{t.src=t.src.replace("trustoo_big","q_90"),t.thumb_src=t.thumb_src.replace("trustoo_small","w_220")}))}));const A=i.list;l[h-1]=A,(0,o.gsSession)("set",y,l),$&&1===w&&s.A.pager&&s.A.pager.pageClick(null,1),g(A,$,e)}r.dataset.isRender||(!function(){if(1===s.A.userSetting.is_show_empty_review||"reviews"!==s.A.showType)return;const t=s.A.isWdoRevOpen?s.A.wdoRevDom:s.A.reviewsDom,e=s.A.isWdoRevOpen?s.A.popupPageInfo:s.A.pageInfo,i=s.A.isWdoRevOpen||!s.A.productId?s.A.allRatingData:s.A.ratingData,n=s.A.lang.total_review,r=s.A.lang.review_with_content,a=s.A.lang.no_content_review;let l=`${n.replace("{{review_number}}",i.total_reviews)} | `;const d=`${a}`;0===e[s.A.showType].count?l+=d:l+=`${r.replace("{{content_review_number}}",e.reviews.count)}`;(0,o.$dqs)(".tt-reviews-sort,#reviews-body",t).insertAdjacentHTML("beforebegin",`
\n\t\t${l}\n\t
`)}(),r.dataset.isRender=1)}function g(t,e,i){const{userSetting:n,isRevPage:p,isWdoRevOpen:v,isGrid:g,isSplit:w,globalStyle:m}=s.A,{isShowRevRatingNum:b,isImgLoadLazy:y}=l.A,C=v?s.A.wdoRev:s.A.reviews,$=v?s.A.wdoRevBody:s.A.reviewsBody,x=$.parentNode,R="shopReviews"===s.A.showType||"popupShopReviews"===s.A.showType;let q=[];const S=n.review_pagination_type,T=(0,a.aQ)();let k=null;k=R?(0,o.$dqs)(".tt-shop-reviews",$):(0,o.$dqs)(".tt-review-list",$),b&&1===(0,a.aQ)()&&(m.innerHTML+="#vstar-reviews .star{display:flex;align-items:center}\n #vstar-reviews .rev-rating-num{font-size:15px;margin-left:8px}");let E="";y&&(E='loading="lazy"');let L="";g&&(L='style="visibility:hidden"');const P=C.cardCount;let I=C.cardCount,M="";w&&(M=" split");let D=!1;if(s.A.isGrid&&(D=t.some((t=>t.resources.some((t=>!t.width||!t.height)))),D&&function(t,e,i){t.dataset.hasMissingImgSize=1,1===i&&(t.style.opacity=0,e.insertAdjacentHTML("beforeend",'
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t
'))}(k,$,T)),t.forEach(((t,e)=>{let i="";i=`no="${++I}"`,Object.assign(t,{imgAttr:E,cardCount:I,noText:i,styleText:L});const n=document.createElement("div");if(n.className=s.A.layoutClass+"review"+M,n.innerHTML=function(t,e,i){const{isMobile:n,layoutClass:r,userSetting:a,origImg:c,thumbImg:p,isGrid:v,isList:g,isSplit:A,lang:w}=s.A,{isShowRevVerified:m,isAddRevVrfy:f,isShowRevRatingNum:b}=l.A,{noText:y,imgAttr:C}=t;let $="",x="",R="",q="",S="",T="",k="",E="",L="",P="",I="",M="",D="",O="";const B=1===s.A.userSetting.customer_avatar,H=`
${(0,o.getTotalStarString)(t.star)}${S}
`;let N="";1===e&&(N='loading="lazy"');if(t.resources.forEach(((t,n)=>{let o=2===t.resource_type?`
\n ${d.A.video}\n
`:"",r="";if(1===t.resource_type?r=t.src:2===t.resource_type&&(r=t.thumb_src),v){const a=(t.width/t.height).toFixed(2);if(0!=n)return;{let l="";""!==t.average_hue&&(l=`background-color:${t.average_hue}`),P+=`
\n ${n}\n ${o}\n
`,s.A.imgCount++,p.push(t.thumb_src)}c.push(t.src)}else if(g){I+=function(t,e,i,n,o){const{origImg:r,thumbImg:a}=s.A;let l="";return l+=`
${n}\n ${o}\n
`,s.A.imgCount++,a.push(t.thumb_src),r.push(t.src),l}(t,`${C} data-page=${e} data-review-index=${i}`,y,n,o)}})),0!==t.resources.length){let e="";t.resources.length>1&&(e=`
${d.A.multiPhoto()}
`),v?P=`${e}
${P}
`:g&&(I=`
${I}
`)}b&&(S=t.star);const W=s.A.badgeIconSvg,j=`${w.verified_purchase}`,F=a.is_show_verified_badge;let z="";f&&(t.verified_badge=1);if(m&&1===t.verified_badge)if(1===F){const t=B?"":W;T=`
\n ${t}${j}
\n `}else 2===F||3!==F||B||(z=W);let U="";const G=5;U=a.review_date_format_type===G?_(t.commented_at):h(t.commented_at,a.review_date_format_type);const V=U?`${U}`:"";v&&n&&(q=V);if(B){const e=[1,3].includes(a.is_show_verified_badge)&&1===t.verified_badge?W:"";O=`
${(t.author.trim()?t.author.split(" ").reduce(((t,e)=>t+e.charAt(0)),""):"A").slice(0,2)}${e}
`}var Z="";const Q=``,J=` ${t.author_country}`,K=a.is_show_country_flag;1==K?Z=Q+J:3==K?Z=Q:4==K&&(Z=J);n&&v?x=Z:R=Z;if(l.A.isNoEllipsisReviews)M=t.content;else{const e=t.content;let i=e.length;M=e,v?i=n?100:200:g&&(i=n?300:500),e.length>i&&"count"===s.A.reviewsEllipsis&&(M=function(t,e,i){const n=i-s.A.lang.show_full_review.length-2;let o=e?`data-card-no="${e}"`:"";return`${t.substr(0,n)}...${s.A.lang.show_full_review}`}(e,t.cardCount,i))}1===s.A.userSetting.item_type&&t.item_type&&(k=`
\n\t\t\t

\n\t\t\t\t${w.item_type}\n\t\t\t

\n\t\t\t

${t.item_type}

\n\t\t
`);const Y=s.A.userSetting.store_avatar_src;if(""!==t.reply_content){E=`
\n
\n\t\t\t\t\t\t${Y?`
`:""}\n\t\t\t\t\t\t
${s.A.lang.shop_name.replace("{{shop_name}}",s.A.userSetting.store_name)}
\n\t\t\t\t\t
\n
${t.reply_content}
\n
`}if(1===s.A.userSetting.is_show_helpful){const e="tt_review_"+s.A.shop_id;let i=(0,o.gsLocal)("get",e),n="",r="";if(i){i=JSON.parse(i);const e=i.find((e=>e.id===t.id));e&&(1===e.likeType?n="active":2===e.likeType&&(r="active"))}D=`
${w.helpful}\n\t\t${d.A.helpful(n)}${t.likes_count}\n\t\t${d.A.unhelpful(r)}${t.dislike_count}
`}if(t.corresponding_product){const e=t.corresponding_product;let i=e.product_name;i.length>50&&!l.A.isAssociatedProdFullName&&(i=i.substr(0,50)+"..."),L=`\n \n
\n
${i}
\n
\n `}let X="",tt="",et="",it="";A?(X=H,et=V):(tt=H,it=V);const st=t.title&&1==a.is_show_review_title?`
${t.title}
`:"";if(l.A.reviewConstructor)return l.A.reviewConstructor(t,{gridImg:P,listImg:I,avatar:O,starTag:H,cntHtml:M,dateHtml:V,user_country:Z,noText:y,reviewTitle:st});const[nt,ot]=function(t){if(s.A.isGrid||!t||0===t.length||1!==s.A.userSetting.show_attribute)return["",""];const e=1,i=2,n={[e]:"rounded",[i]:"square"};let o="",r="";const a=[],l=[];t.forEach((t=>{t.type.includes("range")?a.push(t):l.push(t)})),a.forEach((t=>{o+=(0,u.Tl)({type:"centered_range"===t.type?"centered":"range",title:t.title,labels:t.options,value:t.range_value,style:n[s.A.userSetting.attributes_style]})})),o&&(o=`
${o}
`);return l.forEach((t=>{r+=`
\n\t\t\t\t\t

\n\t\t\t\t\t\t${t.title}:\n\t\t\t\t\t

\n\t\t\t\t\t

${t.options.join(",")}

\n\t\t\t\t
`})),[o,r]}(t.review_attribute);let rt="";(k||ot)&&(rt=`
\n\t${k} ${ot}
`);const at=s.A.isSplit?rt:"";let lt="";s.A.isList&&!s.A.isSplit?lt=rt:s.A.isGrid&&(lt=k);return`\n ${P} \n
\n
\n ${tt}${it}\n
\n
${q+x}
\n
\n\t\t\t\t\t\t${O}\n\t\t\t\t\t\t
\n ${t.author} \n ${z}\n ${R} \n ${T} \n ${$}\n\t\t\t\t\t\t\t
\n
\n\t\t\t\t\t\t${et}\n\t\t\t\t\t\t${at}\n
\n
\n\t\t\t\t\t${X}\n\t\t\t\t\t${st}\n\t\t\t\t\t

\n\t\t\t\t\t\t\t${M}\n\t\t\t\t\t

\n ${I}\n\t\t\t\t\t${lt}\n ${nt}\n\t\t\t\t\t${E}\n\t\t\t\t\t${D}\n ${L}\n
\n `}(t,T,e),n.dataset.index=e,n.dataset.page=T,D&&(n.dataset.new=!0),k.appendChild(n),n.setAttribute("no",I),n.setAttribute("review-id",t.id),q.push(n),"row"===s.A.reviewsEllipsis&&!l.A.isNoEllipsisReviews){!async function(t,e,i){const n=1.4*parseFloat(s.A.userSetting.font_size);var o=Math.round(s.A.reviewsEllipsisRow*n);await new Promise((t=>{setTimeout((()=>t()),200)}));var r=e;t.innerHTML=r;var a=r.length;let l="";if(t.offsetHeight<=o);else{for(var d,c=0,p=a;t.offsetHeight>o;)d=(c+p)/2,t.innerHTML=r.substring(0,d),t.offsetHeight<=o?(t.innerHTML=r.substring(0,p),c=d):p=d-1;l=r.substring(0,p-s.A.lang.show_full_review.length-10),t.innerHTML=l}if(l){let n=`...${s.A.lang.show_full_review}`;t.insertAdjacentHTML("beforeend",n)}}((0,o.$dqs)(".reviews-text",n),t.content,I)}})),C.cardCount=I,q.forEach((t=>{let e=[];e=(0,o.$dqsa)(".resource-item>img",t),0!==e.length&&(s.A.isGrid&&s.A.gridShowImgCount++,e.forEach((t=>{D&&t.removeAttribute("loading"),t.onload=function(){t.getAttribute("loaded")||(t.setAttribute("loaded",!0),A("success",this))},t.onerror=function(){if(!t.getAttribute("loaded")){t.setAttribute("loaded",!0);let e=null;const i=t.closest(".resource-list");if(s.A.isGrid){e=t.closest("[data-column]").dataset.column;const s=(0,o.$dqs)(".multi-photo-wrapper",i.parentNode);0==t.getAttribute("alt")&&(i.remove(),s&&s.remove())}else s.A.isList&&(t.parentNode.remove(),0===i.children.length&&i.remove());A("fail",this,e)}},t.src=t.getAttribute("data-original")})))})),1===T&&(v||p))g&&(0,r.xc)(q,P,e);else if(g){let t=!1;v||p||(t=1===S||e),(0,r.xc)(q,P,t)}(0,c.RR)(S,x,T,i),f(k,x,!1)}function A(t,e,i){const n=e.getAttribute("no"),a=e.getAttribute("index");if("fail"===t&&(s.A.isGrid?"0"===e.dataset.index&&(e.src="https://cdn.vstar.app/static/images/default.png",e.setAttribute("data-original","https://cdn.vstar.app/static/images/default.png"),e.parentNode.style.height=e.parentNode.style.width,(0,r.FS)(i,n),Review.loadedPhoto.push(n),e.style.display="block"):s.A.isList),s.A.isGrid&&"0"===a&&(s.A.gridLoadedShowImg++,s.A.gridLoadedShowImg===s.A.gridShowImgCount)){const t=p.A[s.A.reviewsKey].curBody;(0,o.$dqsa)("[new-grid-img]",t).forEach((t=>{t.removeAttribute("style"),t.removeAttribute("new-grid-img")})),(0,o.$dqsa)("[data-new]",t).forEach((t=>{t.removeAttribute("data-new")})),(0,r.dn)()}}function h(t,e){const i=t.split(" ")[0];let s=[];-1!==i.indexOf("/")?s=i.split("/"):-1!==i.indexOf("-")&&(s=i.split("-"));let n="";return 1===e?n=s[1]+"/"+s[2]+"/"+s[0]:2===e?n=s[2]+"/"+s[1]+"/"+s[0]:3===e&&(n=i),n}function w(t,e){if(s.A.likeRevLock)return;let i="",r=null;"QA"===s.A.showType?(i="qa",r=n.nj.likeOrDislikeQA):(i="review",r=n.zG.likeOrDislikeReview),s.A.likeRevLock=!0;let a=2,l=1;e.contains("tt-helpful")?l=1:e.contains("tt-unhelpful")&&(l=2);const d=t.closest(`[${i}-id]`).getAttribute(`${i}-id`),c=e.contains("active"),p=t.parentNode,u=(0,o.$dqs)(".tt-helpful-count",p),v=(0,o.$dqs)(".tt-unhelpful-count",p),g="tt_"+i+"_"+s.A.shop_id;let A=(0,o.gsLocal)("get",g);A=A?JSON.parse(A):[];const h=A.findIndex((t=>t.id===d)),w=t.nextElementSibling;a=c?2:1,c||-1!==h&&(a=3),r(l,a,d).then((e=>{if(e[0])return void(s.A.likeRevLock=!1);const i=(0,o.$dqs)(".active",p);i&&i.classList.remove("active"),c?(t.classList.remove("active"),-1!==h&&A.splice(h,1),w.textContent=parseInt(w.textContent)-1):(-1!==h&&A.splice(h,1),t.classList.add("active"),w.textContent=parseInt(w.textContent)+1),3===a&&(1===l?v.textContent=parseInt(v.textContent)-1:2===l&&(u.textContent=parseInt(u.textContent)-1)),(0,o.gsLocal)("set",g,JSON.stringify(A)),setTimeout((()=>{s.A.likeRevLock=!1}),300)}))}function m(t){if(t.parentNode.querySelector(".remain-text").removeAttribute("hidden"),t.style.display="none",s.A.isGrid){const e=t.closest("[data-column]").dataset.column,i=parseInt(t.dataset.cardNo);(0,r.FS)(e,i)}}function f(t,e,i){const s=(0,o.$dqs)("#tt-reviews-loading[data-common]",e);i?(e.dataset.loading="1",s?s.style.display="block":e.insertAdjacentHTML("beforeend",'
\n\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t
'),t.innerHTML=""):(delete e.dataset.loading,s&&(s.style.display="none"))}function _(t){const e=new Date(t+"Z").getTime(),i=(new Date).getTime(),n=Math.floor((i-e)/1e3),o=3600,r=86400,a=2592e3,l=31536e3,d=s.A.lang.time_ago;let c="",p="just";return n<60?p="just":n{i.r(e),i.d(e,{getHomeProTitle:()=>_,getTotalRating:()=>g,getTotalStarString:()=>f,insertCarousel:()=>m,insertReviewControl:()=>A,insertReviewDetail:()=>w,requestAllRating:()=>h,setInsertTarget:()=>u,setWriteReview:()=>o.setWriteReview,starEmbeddedAdaptation:()=>b});var s=i(957),n=i(657),o=i(986),r=i(429),a=i(778),l=i(571),d=i(134),c=i(877),p=i(743);async function u(t){let e,i;if(1==t){if(!(0,o.$dqs)("#seal-star-rating-widget")){if(await(0,a.rU)(),!Review.proTarget)return;let t="";t=l.A.userSetting.detail_rating_color?l.A.userSetting.detail_rating_color:window.getComputedStyle(Review.proTarget).color,l.A.globalStyle.textContent+=`\n\t\t\t.product-icon-list>.tt-rating-text{\n color: ${t} !important;\n }`,v()}}else if(2==t){if(0===Review.collTarget.length)return;l.A.curCollArr=Review.collTarget.filter((t=>{if(!t.getAttribute("is-vstar-inserted"))return!0})),l.A.curCollArr.length>50?(l.A.isCollFinished=!1,l.A.curCollArr=l.A.curCollArr.slice(0,50)):l.A.isCollFinished=!0;if(l.A.curCollArr.every((t=>t.getAttribute("product-id")||t.dataset.productId)))i=l.A.curCollArr.map((t=>t.getAttribute("product-id")||t.getAttribute("data-product-id"))).join(",");else{let t=(0,r.nq)();e=(0,r.WF)(t)}}if(1!==t&&(e||i)){let[t,n]=await s.zG.getCollRating(e,i);null===t&&async function(t){const e=l.A.curCollArr,{userSetting:i,isProPage:s,hasPyRating:n,hasEcomRt:a}=l.A,c=e.length;if(c){if(0===(0,o.$dqsa)(".collection-icon-list").length){let t="";t=l.A.userSetting.list_rating_color?l.A.userSetting.list_rating_color:window.getComputedStyle(e[0]).color,l.A.globalStyle.textContent+=`\n\t\t\t.collection-icon-list>.tt-rating-text{\n\t\t\t\tcolor:${t}\n\t\t\t}\n\t\t\t`}let v=0,g="afterEnd";n||a?g="afterbegin":d.A.listRatingPosition&&(g=d.A.listRatingPosition),55363502159===l.A.shop_id&&t.forEach((t=>t.total_reviews+=100));for(var p=0;p${o.slice(0,r)}`),e=`
${o.slice(r+8)}
`,i=f(s.rating,!0)):e=`
${o}
`}const o=`style="margin-top: ${l.A.userSetting.list_rating_top}px;margin-bottom: ${l.A.userSetting.list_rating_bottom}px;"`;r.style.margin=0;const a=`
\n\t\t\t\t${t}${i}${e}
`;r.insertAdjacentHTML(g,a)}}if(document.dispatchEvent(new CustomEvent("onTTListRatingEmbed",{detail:{v:l.A},bubbles:!0,cancelable:!0})),(n||a)&&s){const t=shopifyObj.productId,e=(0,o.$dqsa)(`.custom-vstar-rating-widget[product-id="${t}"],.custom-vstar-rating-widget[data-product-id="${t}"]`);0!==e.length&&l.A.reviewsDom&&e.forEach((t=>{t.style.cursor="pointer",t.onclick=()=>(0,o.scrollTo)(l.A.reviewsDom)}))}s&&!n||(l.A.isCollFinished?setTimeout((()=>{(0,r.DF)()}),1e3):u(2))}}(n)}}function v(){let{proTarget:t}=Review;const{ratingData:e,userSetting:i,lang:s}=l.A,n=(0,o.$dqs)(".product-icon-list.vstar-star",t.parentNode);if(n&&n.remove(),2===i.is_show_stars_without_review&&0==e.rating);else{let i="afterEnd",n="",r=window.getComputedStyle(t).textAlign;1==t.dataset.trustooRatingBlock?i="afterbegin":d.A.detailRatingPosition&&(i=d.A.detailRatingPosition);const c=window.getComputedStyle(t.parentNode);"flex"===c.display&&"column"!==c.flexDirection&&"wrap"!==c.flexWrap&&(t=t.parentNode),"center"===r?n="tt-center":"right"===r&&(n="tt-right"),d.A.customRatingText&&(s.product_pages_reviews=d.A.customRatingText);const p=e.total_reviews;let u=s.product_pages_reviews.replace(/{{review_number}}/g,p).replace(/{{review_rating}}/g,e.rating).trim();const v=u.indexOf("{{star}}");let g="",A="",h="";-1!==v?(0!==v&&(g=`
${u.slice(0,v)}
`),A=`
${u.slice(v+8)}
`,h=f(e.rating,!0)):A=`
${u}
`;const w=`
\n\t\t\t${g}${h}${A}
`;t.insertAdjacentHTML(i,w),"afterend"===i&&(t.style.marginBottom=0);let m=(0,o.$dqs)(".product-icon-list");m.onclick=function(t){const{reviewsDom:e}=l.A;(0,o.processRecordedData)("reviews_click"),t.target.classList.contains("product-icon-list")||((0,a.bl)(),e&&(0,o.scrollTo)(e))};const _=new CustomEvent("onTTDetailRatingEmbed",{detail:{v:l.A,node:m},bubbles:!0,cancelable:!0});document.dispatchEvent(_)}}async function g(t={}){let e=l.A.ratingData;const{isProRatingOpen:i,isHomeRatingOpen:a,isHomePage:p,isProPage:g}=l.A,{proTarget:h}=Review,w=(0,o.$dqs)("#seal-star-rating-widget");if(l.A.productId&&0===Object.keys(l.A.ratingData).length){let t;"undefined"!=typeof vstar_product_rating&&vstar_product_rating.hasOwnProperty("rating")&&!l.A.isProRatingUpdate?l.A.ratingData=e=vstar_product_rating:([t,e]=await s.zG.getProductRating(),null===t&&e&&(l.A.ratingData=e))}l.A.ratingData&&l.A.ratingData.rating&&(l.A.ratingData.rating=parseFloat(l.A.ratingData.rating).toFixed(d.A.bigRatingDigits-1)),(i||a||l.A.hasPyRating||l.A.hasEcomRt)&&(g&&setTimeout((()=>{(0,o.$dqs)('a[href*="/products/"],.product-recommendations')&&l.A.isOpenRecStars&&((0,r.M0)(),0!==Review.collTarget.length&&u(2),setTimeout((()=>{(0,r.DF)()}),1e3))}),1e3),w||(p?h&&v():u(1))),await A(e,t),l.A.isProPage&&((0,o.gsSession)("set","tt_pv_product_id",null),(0,o.gsSession)("set","tt_cart_product_id",null),async function(){l.A.cartWatcher=new c.N,l.A.cartWatcher.changeCount=0,window.addEventListener("cart_changed",(t=>{if(l.A.cartWatcher.changeCount++,l.A.isRecordPV&&l.A.cartWatcher.changeCount>1){const e=t.detail.token.split("?key=")[0];(0,o.processRecordedData)("add_to_cart",e,!0)}})),await l.A.cartWatcher.init(),l.A.reviewsDom&&!l.A.isNullRev&&(0,n.E7)()}())}async function A(t,e){const{isNoNullReview:i}=l.A,s=new CustomEvent("onTrustooReviewsEmbed",{detail:{reviews:l.A.reviewsDom},bubbles:!0,cancelable:!0});let r=!1;if(((0,o.$dqs)("#seal-review-widget")||p.A.customReviewsBlock)&&(r=!0),l.A.isRevOpen||r){let r=!1;l.A.isMixReview&&l.A.isHomePage&&await h();const a=l.A.isMixReview?l.A.allRatingData:t;if(a&&a.total_reviews>0)l.A.isInsertRev=!0,w(),r=!0,(0,n.Gs)(e);else{if(i||2===l.A.userSetting.review_empty_status_display)return Review.hasReviews=!1,void document.dispatchEvent(s);r=!0,(0,n.WC)(e.tarNode),"undefined"!=typeof trustooAfterExecute&&trustooAfterExecute(l.A,d.A)}window.TrustooReviews.reviews.hasReviews=r,(0,o.setWriteReview)()}else l.A.isFirstPageRender&&"undefined"!=typeof trustooAfterExecute&&trustooAfterExecute(l.A,d.A);const a=Boolean(l.A.reviewsDom);window.TrustooReviews.carousel.canWriteReview&&!a?(0,o.setWriteReview)():window.TrustooReviews.reviews.hasReviews=Boolean(l.A.reviewsDom),Review.hasReviews=a,document.dispatchEvent(s)}async function h(){const t=(await s.zG.getRating())[1];l.A.allRatingData=t}function w(){"undefined"!=typeof TTRevDetail&&(d.A.isPageReview||l.A.isInsertRev||l.A.isInsertBS||l.A.isWdoRevOpen)&&TTRevDetail.insertTTReviewDetail(l.A)}function m(t,e="beforebegin"){if(!t)return;if((0,o.$dqs)("#trustoo-card-carousel-widget"))return;const i=document.createElement("script");i.src=`https://${l.A.staticBaseUrl}/static/dist/js/swiper-reviews.min.js`;const s=document.createElement("link");s.rel="stylesheet",s.href=`https://${l.A.staticBaseUrl}/static/css/swiper-reviews.min.css`,document.head.appendChild(i),document.head.appendChild(s),t.insertAdjacentHTML(e,'')}function f(t,e=!1){const{isProPage:i}=l.A,s=l.A.ratingIconSvg;let n="";s||(n=" pending");const o=`
${s}
`,r=`
${s}
`;parseInt(t)||(t=0);for(var a="",d=Math.floor(t),c=0;c\n\t\t
${s}
\n
\n ${s}\n
\n `}for(c=0;c<5-d;c++)a+=r;return a}function _(t){return encodeURIComponent(t)}function b(t,e){for(let i=0;i{i.d(e,{M6:()=>a,Tl:()=>d,ps:()=>l,uq:()=>r});var s=i(571);class n{constructor(t){this.init(t)}init(t){const{title:e,type:i,isMiddle:s,id:n,labels:o,targetNode:r,onChange:a}=t;this.id=n,this.type=i,this.labels=o,this.title=e,this.onChange=a,this.isMiddle=s;let l=0;s&&(l=3),r.insertAdjacentHTML("beforeend",`
\n
${e}
\n
\n ${Array.from({length:5},((t,e)=>e+1)).reduce(((t,e,i)=>t+`
${e}
`),"")}\n ${s?'\n \n ':""}\n
\n
\n ${o.map((t=>`${t}`)).join("")}\n
\n
`),this.container=document.querySelector(`.tt-range[data-id="${n}"]:not([data-handled])`),this.container.dataset.handled="true",this.bindEvents()}bindEvents(){this.container.querySelectorAll(".tt-range-option").forEach((t=>{t.addEventListener("click",(t=>{this.selectOption(t.target)}))}))}selectOption(t){t.classList.contains("tt-selected")?this.reset():(this.container.querySelectorAll(".tt-range-option").forEach((t=>{t.classList.remove("tt-selected")})),t.classList.add("tt-selected"),this.selectedValue=t.dataset.value,"centered_range"===this.type&&this.moveSvgToSelected(t),this.onChange&&this.onChange(this.selectedValue))}moveSvgToSelected(t){const e=this.container.querySelector(".tt-range-check"),i=this.container.getBoundingClientRect(),s=t.getBoundingClientRect(),n=s.left-i.left+s.width/2-10;e.style.left=n+"px",e.classList.add("tt-visible")}getValue(){return this.selectedValue?[this.selectedValue]:[]}setValue(t){const e=this.container.querySelector(`[data-value="${t}"]`);e&&this.selectOption(e)}reset(){if(this.container.querySelectorAll(".tt-range-option").forEach((t=>{t.classList.remove("tt-selected")})),this.isMiddle){this.container.querySelector(".tt-range-check").classList.remove("tt-visible")}this.selectedValue=null}}class o{constructor(t){this.selectedValues=[],this.init(t)}init(t){const{title:e,id:i,labels:n,type:o,targetNode:r,options:a,multiple:l,onChange:d}=t;this.multiple=l,this.id=i,this.type=o,this.title=e,this.labels=n,this.onChange=d;const c=s.A.lang.separate_review_form,p=s.A.lang.all_in_one_from;let u="",v="";const g=l?"select_all":"choose_one";1===s.A.writeForm?v=` (${p[g]})`:2===s.A.writeForm&&(u=`
${c[g]}
`);let A=`
\n\t\t\t${a.reduce(((t,e)=>t+`
${e}
`),"")}\n\t\t\t
`;2===s.A.writeForm&&o.includes("choice")&&(A=`
${A}
`),r.insertAdjacentHTML("beforeend",`
\n\t\t\t
${e}${v}
\n\t\t\t${u}\n\t\t\t${A}\n
`),this.container=document.querySelector(`.tt-choice[data-id="${i}"]:not([data-handled])`),this.container.dataset.handled="true",this.bindEvents()}bindEvents(){this.container.querySelectorAll(".tt-choice-option").forEach((t=>{t.addEventListener("click",(t=>{this.toggleOption(t.target)}))}))}toggleOption(t){const e=t.dataset.value,i=t.classList.contains("tt-selected");this.multiple?i?(t.classList.remove("tt-selected"),this.selectedValues=this.selectedValues.filter((t=>t!==e))):(t.classList.add("tt-selected"),this.selectedValues.push(e)):i?(t.classList.remove("tt-selected"),this.selectedValues=[]):(this.container.querySelectorAll(".tt-choice-option").forEach((t=>{t.classList.remove("tt-selected")})),t.classList.add("tt-selected"),this.selectedValues=[e]),this.onChange&&this.onChange(this.selectedValues,this.multiple)}setMultiple(t){if(this.multiple=t,!t&&this.selectedValues.length>1){const t=this.selectedValues[0];this.reset(),this.setValue([t])}}getValue(){return[...this.selectedValues]}setValue(t){this.reset(),t.forEach((t=>{const e=this.container.querySelector(`[data-value="${t}"]`);e&&(e.classList.add("tt-selected"),this.selectedValues.includes(t)||this.selectedValues.push(t))}))}reset(){this.container.querySelectorAll(".tt-choice-option").forEach((t=>{t.classList.remove("tt-selected")})),this.selectedValues=[]}}function r(){const t=[];return s.A.attributeInstances.forEach((e=>{const{id:i,type:s,title:n}=e,o={id:i,type:s,title:n},r=e.getValue();let a=e.labels;s.includes("choice")?a=r:s.includes("range")&&(o.range_value=r[0]),r.length>0&&t.push({...o,options:a})})),t}function a(t,e,i){const{title:r,type:a,id:l,options:d}=e;if(a.includes("choice")){const e=new o({title:r,multiple:"multiple_choice"===a,id:l,targetNode:t,options:d,type:a,onChange:i});s.A.attributeInstances.push(e)}else if(a.includes("range")){const e=new n({labels:d,isMiddle:"centered_range"===a,title:r,id:l,targetNode:t,type:a,onChange:i});s.A.attributeInstances.push(e)}}function l(){s.A.attributeInstances.forEach((t=>{t.reset()}))}function d(t={}){const{type:e="range",value:i=3,segments:s=4,title:n="",labels:o=[],size:r="normal",style:a="rounded"}=t;let{min:l,max:d}=t;l||(l=1,e.includes("centered")&&(l=-2)),d||(d=5,e.includes("centered")&&(d=2));const c=(i-l)/(d-l);let p=100*c+"%";return"rounded"===a&&(0===c?p=`calc(${p} + 1px)`:1===c&&(p=`calc(${p} - 1px)`)),`\n\t\t\t\t\t
\n\t\t\t\t\t\t\t${n?`
${n}
`:""}\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
e?`background: linear-gradient(to right, var(--attr-bg-color) 0%, var(--attr-bg-color) ${e}%, var(--attr-color) ${e}%, var(--attr-color) ${t}%, var(--attr-bg-color) ${t}%, var(--attr-bg-color) 100%)`:t\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t${Array.from({length:s},((t,e)=>`
`)).join("")}\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t${"centered"===e?'
':""}\n\t\t\t\t\t\t\t\t\t\t\t${"centered"===e&&"rounded"===a?'
':""}\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t${function(){const t=o.length>0?o:"centered"===e?[l.toString(),"Perfect",d.toString()]:[l.toString(),d.toString()];return`
${t.map((t=>`
${t}
`)).join("")}
`}()}\n\t\t\t\t\t
\n\t\t\t`}},657:(t,e,i)=>{i.d(e,{nZ:()=>I,WC:()=>T,Gs:()=>x,FP:()=>D,iB:()=>P,E7:()=>H,Al:()=>B});var s=i(571),n=i(986),o=i(163),r=i(405),a=i(134),l=i(220),d=i(778),c=i(607),p=i(381),u=i(743),v=i(651);function g(){const{lang:t,userSetting:e,revHeadType:i}=s.A,o=s.A.isWdoRevOpen?s.A.wdoRev:s.A.reviews,a=s.A.isMixReview||s.A.isWdoRevOpen?s.A.allRatingData:s.A.ratingData,l=s.A.isWdoRevOpen?s.A.wdoRevDom:s.A.reviewsDom,d=(0,n.$dqs)("#reviews-head",l),g=s.A.isMobile?"":'
';let A="",h="";if(!a||a.total_reviews<=0)return;var w="";1===s.A.userSetting.is_qa_active&&s.A.productId&&!s.A.isWdoRevOpen||1===s.A.userSetting.is_active_store_review||(w=`
\n\t\t
\n\t\t\t\t\n\t\t\t\n\t\t
\n\t\t${B().html}\n\t\t
`);var m=(0,n.getTotalStarString)(a.rating,!0);let f=a.total_reviews,_="",b="";if(2!==e.is_show_review_button||s.A.isMixReview){let e=t.write_reviews;(s.A.isMixReview||s.A.isWdoRevOpen)&&"shop"===s.A.writeTo.type&&(e=t.store_review.write_btn_text),_=``}1!==s.A.userSetting.is_qa_active||s.A.isWdoRevOpen||s.A.isMixReview||(b=``);let y="",C="",$="",x=`${`

\n ${a.rating}\n

`}\n\t
\n\t\t\t${m} \n\t
`;if(1===i?($=`

${t.customer_reviews}

`,y=`${g}
\n
\n 5 ${t.star}\n
\n
\n 4 ${t.star}\n
\n
\n 3 ${t.star}\n
\n
\n 2 ${t.star}\n
\n
\n 1 ${t.star}\n
\n
`):2===i&&(A="review-head-type2",s.A.isMobile||(x=`
${x}
`)),C+=`\n
\n\t\t\t\t${x}\n

${1===e.is_show_review_number?f:""} ${t.reviews}

\n
\n `,C=`
\n ${C}\n
`,h=`\n\t${$}\n\t
\n\t\t
\n\t\t${C+y}\n\t\t${1===s.A.userSetting.is_show_album&&1===i?'
':""}\n\t\t
\n\t\t\n\t\t
\n\t\t\t\t${_+b+w}\n\t\t
\n\t
\n${function(){const t=1,e=2,i={[t]:"rounded",[e]:"square"};let n="",o="";s.A.attributeStatistics&&1!==s.A.userSetting.is_hide_ratings&&!s.A.isWdoRevOpen&&(s.A.attributeStatistics.forEach((t=>{o+=(0,v.Tl)({type:"centered_range"===t.type?"centered":"range",title:t.title,labels:t.options,value:t.value,style:i[s.A.userSetting.attributes_style]})})),n=`
${o}
`);return n}()}\n\t`,d&&(d.className+=A,d.innerHTML+=h,u.A[s.A.reviewsKey].writeBtn=(0,n.$dqs)(".tt-write-reviews",d),2!==i)){const t=(0,n.$dqsa)(".star-range",d),i=(0,n.$dqsa)(".star-num",d),l=1===e.is_show_review_number;t.forEach(((t,p)=>{const u=5-p,v=a["total_star"+u];let g="0";v&&(g=(v/a.total_reviews*100).toFixed(1)+"%"),i[p].textContent=l?v:g,t.setAttribute("index",u),t.style.cssText=`background:linear-gradient(to right, ${e.star_color} 0%, ${e.star_color} ${g},${e.nostar_color} ${g}, ${e.nostar_color})`,v>0&&1===s.A.userSetting.rating_filter&&(t.onclick=function(){if("reviews"!==s.A.showType)return;const e=t.getAttribute("index");e===o.ratingFilter?o.ratingFilter=0:o.ratingFilter=e,(0,r.aQ)(3,1),(0,c.bC)(!1,!0)},t.parentNode.onmouseover=function(){(0,n.$dqs)(".head-center",d).classList.add("tt-hover"),this.classList.add("active")},t.parentNode.onmouseout=function(){(0,n.$dqs)(".head-center",d).classList.remove("tt-hover"),this.classList.remove("active")})})),1===s.A.userSetting.is_show_album&&(0,p.D)((0,n.$dqs)(".tt-reviews-album",d))}}var A=i(88),h=i(357),w=i(154),m=i(45),f=i(500),_=i(957);let b=null;const y=[];class C{constructor(){this.wrapper=document.getElementById("tt-product-selector"),this.container=document.getElementById("tt-product-list"),this.loadingEl=document.getElementById("tt-loading"),this.searchInput=document.querySelector("#tt-product-search>.tt-search"),this.allProducts=[...y],this.displayedProducts=[...y],this.page=1,this.productCount=0,this.perPage=5,this.totalPage=0,this.isLoading=!1,this.hasMoreItems=!0,this.searchTerm="",this.observer=null}generateMoreProducts(){this.allProducts=[...this.allProducts]}init(){this.renderProducts(),this.setupScrollListener(),this.setupSearchListener(),this.setupCloseListener()}setupScrollListener(){this.observer=new IntersectionObserver((t=>{t.forEach((t=>{t.isIntersecting&&!this.isLoading&&this.hasMoreItems&&this.loadMoreProducts()}))}),{root:null,rootMargin:"100px",threshold:0}),this.observer.observe(this.loadingEl)}setupCloseListener(){(0,n.$dqs)(".tt-window-close",this.wrapper).onclick=()=>{this.closeSelector()}}closeSelector(){this.wrapper.style.display="none",this.wrapper.parentNode.style.display="none",document.body.classList.remove("trustoo-open")}setupSearchListener(){this.searchInput.addEventListener("input",(0,n.debounce)((async t=>{this.searchTerm=t.target.value.toLowerCase().trim(),this.resetList(),await this.renderProducts(!0),this.observer.observe(this.loadingEl)}),400))}resetList(){this.observer&&this.observer.disconnect(),this.container.innerHTML="",this.page=1,this.hasMoreItems=!0}filterProducts(){this.searchTerm?this.displayedProducts=this.allProducts.filter((t=>t.title.toLowerCase().includes(this.searchTerm))):this.displayedProducts=[...this.allProducts]}getCurrentPageProducts(){return _.zG.getProducts(this.page,this.searchTerm)}async renderProducts(){const t=await this.getCurrentPageProducts();if(this.isLoading=!1,t[0])return;const e=t[1];this.searchTerm||1!==this.page||(this.productCount=e.page.count);const{cur_page:i,total_page:s}=e.page,n=e.list;if(this.totalPage=s,0===n.length&&1===this.page)return 0!==this.productCount&&this.renderEmptyState(),void this.hideLoading();n.forEach(((t,e)=>{const i=this.createProductElement(t,e);this.container.appendChild(i)})),i>=s?(this.hasMoreItems=!1,this.hideLoading()):this.showLoading()}createProductElement(t){const e=document.createElement("div");e.className="tt-product-item",e.dataset.id=t.id,e.dataset.id=t.id;const i=document.createElement("img");i.className="tt-product-image",i.src=t.image_src,i.alt=t.title,i.loading="lazy";const n=document.createElement("div");n.className="tt-product-details";const o=document.createElement("div");return o.className="tt-product-title",o.textContent=t.title,n.appendChild(o),e.appendChild(i),e.appendChild(n),e.addEventListener("click",(()=>{this.handleProductClick(t);const e=u.A.write.container;1===s.A.writeForm?(0,w._x)("reviews"):2===s.A.writeForm&&((0,m.Rh)(),e.parentNode.style.display="block"),e.style.display="block",this.wrapper.style.display="none"})),e}renderEmptyState(){const t=document.createElement("div");t.className="tt-empty",t.textContent=s.A.lang.search_not_prod,this.container.appendChild(t)}loadMoreProducts(){!this.isLoading&&this.hasMoreItems&&(this.isLoading=!0,this.showLoading(),this.page++,this.renderProducts())}handleProductClick(t){s.A.writeTo.productId=t.id,s.A.writeTo.productName=t.title,s.A.writeTo.prodImageUrl=t.image_src}showLoading(){this.loadingEl.style.display="flex"}hideLoading(){this.loadingEl.style.display="none"}}const $=function(){if(b)b.wrapper.style.display="block";else{let t=s.A.lang.all_in_one_from;const e=2;s.A.writeForm===e&&(t=s.A.lang.separate_review_form);(0,n.$dqs)("#trustoo-mask").insertAdjacentHTML("beforeend",`
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
${t.select_product_title}
\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t
`),b=new C,b.init()}};async function x(t={}){const{revIdBase:e,isWdoRevOpen:i}=s.A;let o,d;const p=function(){var t="";const{revIdBase:e,isWdoRevOpen:i}=s.A,{nextRevDesc:n}=a.A;let o="",r="",l="";["ar","he"].includes(Review.lang)&&(l=" trustoo-rtl");s.A.isWdoRevOpen||(l+=" pending");t=`
\n
`;let d="";n&&(d=`
${n}
`);var c='
\n
';const p=i?"":"not-wdo-rev",u=s.A.isMixReview?"all-reviews":"",v=s.A.productId?`data-product-id="${s.A.productId}"`:"",g=`
\n
\n ${t+c+d}
\n
`;return g}();if(k(p,t.tarNode,t.position),t.tarNode&&i){let i=(0,n.$dqs)(`#${e}reviews`,t.tarNode),r=(0,n.$dqs)("#reviews-body",t.tarNode);o=i,d=r,Object.assign(s.A,{wdoRevDom:i,wdoRevBody:r})}else o=(0,n.$dqs)(`#${e}reviews`),d=(0,n.$dqs)("#reviews-body"),Object.assign(s.A,{reviewsDom:o,reviewsBody:d});o.setAttribute("review_sort_by",s.A.userSetting.review_sort_by);const u=1===s.A.userSetting.layout?"list":"gird";o.setAttribute("layout",u),i||s.A.reviewsDom&&N();let v=parseInt(window.getComputedStyle(o).width);s.A.isGrid&&(s.A.reviewsWidth=v),(0,r.aQ)(3,1);const A=i?"trustoo_all_reviews":"trustoo_reviews";i&&(0,n.gsSession)("set",A,[]),S(o,d),L(o),await(0,c.bC)(),g(),s.A.pageInfo.current=i?"popupReviews":"reviews",(0,f.IV)();const h=(0,n.$dqs)(".head-sort:first-child",o);h&&h.parentNode.setAttribute("only-sort",!0),E(o),q(),i?(0,l.my)():O(),s.A.isFirstPageRender&&(!function(){const t=(0,n.$dqs)("#trustoo-block-style");t&&(t.media="all");s.A.firstPageShow=!0,s.A.isWdoRevOpen&&(s.A.isWdoRevFirstPageRendered=!0),!s.A.isShowRevClick&&s.A.reviewsDom&&(s.A.isGrid&&s.A.layoutReviewCount>15?setTimeout((()=>{s.A.reviewsDom.classList.remove("pending")}),100):s.A.reviewsDom.classList.remove("pending"));"undefined"!=typeof trustooAfterExecute&&trustooAfterExecute(s.A,a.A)}(),s.A.isFirstPageRender=!1)}function R(){const{isMixReview:t,isWdoRevOpen:e}=s.A,i=e?s.A.wdoRevDom:s.A.reviewsDom,o=(0,n.$dqs)(".head-button.tt-write-reviews,.noreviews-button.tt-write-reviews",i);if(o&&o.addEventListener("click",(()=>{P(s.A.productId&&!s.A.isWdoRevOpen?"normal":s.A.writeTo.type)})),1===s.A.userSetting.is_qa_active&&!e&&!t){(0,n.$dqs)(".head-button.tt-write-qa,.noreviews-button.tt-write-qa",i).addEventListener("click",(function(){M(),(0,w._x)("QA")}))}(0,n.$dqsa)(".tt-tab",i).forEach((t=>{t.onclick=function(){const o=s.A.userSetting.review_pagination_type,r=u.A[s.A.reviewsKey];s.A.pager&&!e&&(s.A.pager.el.style.display="none"),1!==o||e||s.A.isRevPage||function(){const t=(s.A.isWdoRevOpen?s.A.popupPageInfo:s.A.pageInfo)[s.A.showType];if(t&&s.A.pager){const e=s.A.pager.el.querySelectorAll(".page-control-item");t.pageNumbers=Array.from(e).map((t=>t.textContent)),t.activeIndex=s.A.pager.activeIndex}}(),(0,n.$dqs)(".tt-tab.active",i).classList.remove("active"),t.classList.add("active");const a=t.getAttribute("index");let l="reviews";if(s.A.showType="reviews","0"===a)r.curBody=r.normalReviews,(0,f.IV)();else if("1"===a){const t=(0,n.$dqs)(".tt-qa-list",i);s.A.showType="QA",l="QA",t?(0,f.IV)():(s.A.pageInfo.QA={curPage:1,count:0},(0,A.m)())}else if("2"===a){const t=s.A.isWdoRevOpen?s.A.popupPageInfo:s.A.pageInfo;s.A.showType="shopReviews",l="shopReviews";const o=r.shopReviews;if(o)(0,f.IV)(),r.curBody=o;else{const o=e?s.A.wdoRevBody:s.A.reviewsBody;if(0===s.A.userSetting.store_reviews_count)t.shopReviews={total:0},(0,f.IV)(),o.insertAdjacentHTML("beforeend",`
\n\t\t\t\t\t\t\t\t
${(0,n.getTotalStarString)(0,20)}
\n\t\t\t\t\t\t\t\t
${s.A.lang.no_reviews}
`);else{o.insertAdjacentHTML("beforeend",'
');const e=s.A.isWdoRevOpen?"trustoo_popup_shop_reviews":"trustoo_shop_reviews";if((0,n.gsSession)("set",e,[]),0!==s.A.userSetting.store_reviews_count){const e=(s.A.popupPageInfo.shopReviews||s.A.pageInfo.shopReviews)?.total||0;t.shopReviews={curPage:1,total:e,count:0},(0,c.bC)().then((()=>{(0,f.IV)()}))}}i.dataset.shopReviewsCount=s.A.userSetting.store_reviews_count,r.shopReviews=(0,n.$dqs)(".tt-shop-reviews",i),r.curBody=r.shopReviews}}i.setAttribute("show-type",l)}})),i.addEventListener("click",(t=>{"tt-no-context-reviews"===t.target.id&&P(s.A.productId&&!s.A.isWdoRevOpen?"normal":s.A.writeTo.type)}))}function q(){const{isWdoRevOpen:t,hasPyRating:e}=s.A,i=t?s.A.wdoRevBody:s.A.reviewsBody;(0,n.$dqs)("#reviews-head .head-sort,.tt-reviews-sort")&&function(){const t=s.A.isWdoRevOpen?s.A.wdoRevDom:s.A.reviewsDom,e=(0,n.$dqs)(".head-sort,.tt-reviews-sort",t),i=(0,n.$dqs)(".sort-popup",t),o=(0,n.$dqs)(".sort-active",t);window.addEventListener("click",(function(t){e.contains(t.target)||(i.style.display="none")})),(0,n.$dqsa)(".sort-item",t).forEach((t=>t.onclick=function(){const t=s.A.isWdoRevOpen?s.A.wdoRevDom:s.A.reviewsDom;if(!this.classList.contains("active")){(0,n.$dqs)(".sort-item.active",t).classList.remove("active"),this.classList.add("active"),o.style.top=this.offsetTop+3+"px";const e=this.getAttribute("sort-value");t.setAttribute("review_sort_by",e),1!==s.A.userSetting.review_pagination_type||s.A.isWdoRevOpen||(s.A.reviewsList=[],s.A.pageRecord=[]),i.style.display="none";const a=(0,n.$dqs)(".tt-sort-content>span",t);a&&(a.textContent=this.textContent),(0,r.aQ)(3,1),t.setAttribute("reviews-page-no",1),(0,c.bC)(!0)}})),(0,n.$dqs)(".sort-icon,.tt-sort-content",t).onclick=function(){let t=i.style.display;i.style.display="block"===t?"none":"block"}}(),i.addEventListener("click",(function(t){let e=t.target;"path"===e.tagName&&(e=e.closest("svg"));let i=e.classList;i.contains("resource-item")&&(e=(0,n.$dqs)("img",e));const o=t.target.closest(".resource-item");if(o){const t=(0,n.$dqs)("img",o);let e=parseInt(t.getAttribute("no"));const i=parseInt(t.getAttribute("index"));let a;s.A.isGrid&&s.A.isMobile&&(s.A.globalStyle.textContent+="#trustoo-review-detail .review-row-one .reviews-date {display: none;}"),a=1!==s.A.userSetting.review_pagination_type||s.A.isWdoRevOpen||s.A.isMixReview&&!s.A.isHomePage&&!s.A.isCollPage?parseInt(t.dataset.page):(0,r.aQ)(),e=t.dataset.reviewIndex,s.A.revDetailInfo.page=a,s.A.revDetailInfo.no=e,s.A.revDetailInfo.imageIndex=i;let l="trustoo_reviews";s.A.isWdoRevOpen?l="shopReviews"===s.A.showType?"trustoo_popup_shop_reviews":"trustoo_all_reviews":"shopReviews"===s.A.showType&&(l="trustoo_shop_reviews");const d=(0,n.gsSession)("get",l)[a-1][e];TTRevDetail.showTTReviewDetail(s.A,"",d,l)}else i.contains("display-text")?(0,c.fn)(e):(i.contains("tt-helpful")||i.contains("tt-unhelpful"))&&(0,c.nG)(e,i)})),e&&(0,d.B4)(),s.A.iObserver||(s.A.iObserver=new IntersectionObserver((t=>{for(const e of t)if(e.isIntersecting){if(!s.A.allRevLoadLock&&(s.A.isRevPage||s.A.isWdoRevOpen)){const t=e.target.parentNode,i=(s.A.isWdoRevOpen?s.A.popupPageInfo:s.A.pageInfo)[s.A.showType].total;(0,r.aQ)()\n\t\t\t${s.A.lang.reviews.charAt(0).toUpperCase()+s.A.lang.reviews.slice(1)}\n\t\t\t\t(${a})\n\t\t\t${r?`${s.A.lang.store_review.tab_name}(${s.A.userSetting.store_reviews_count})`:""}\n\t\t\t${o?`${s.A.lang.question_and_answer.title}(${s.A.ratingData.total_qa_count})`:""}\n\t\t`;const t=B();n=`
\n\t\t\t\t\t
${t.text}${h.A.sort(s.A.userSetting.font_color)}
\n\t\t\t\t\t${t.html}\n\t\t\t\t
`}i&&(t.dataset.tabs="1",e.insertAdjacentHTML("beforebegin",i+n)),o&&t.classList.add("qa")}function T(t){const{lang:e}=s.A;s.A.isNullRev=!0,s.A.firstPageShow=!0;let i="";["ar","he"].includes(Review.lang)&&(i=" trustoo-rtl");let o="",r="";if(2!==s.A.userSetting.is_show_review_button||s.A.isMixReview){let t=e.write_reviews;(s.A.isMixReview||s.A.isWdoRevOpen)&&"shop"===s.A.writeTo.type&&(t=e.store_review.write_btn_text),o=``}1!==s.A.userSetting.is_qa_active||s.A.isWdoRevOpen||s.A.isMixReview||(r=``);const a=(0,n.getTotalStarString)(0);k(`
\n\t\t\t
\n\t\t\t\t
${e.customer_reviews}
\n\t\t\t\t
${o}${r}
\n\t\t\t
\n
\n
\n
\n ${a}\n
\n
\n

${e.no_reviews}

\n
\n
\n
`,t);let d=null;const c=s.A.isWdoRevOpen?"wdoRevBody":"reviewsBody",p=s.A.isWdoRevOpen?"wdoRevDom":"reviewsDom";s.A.isWdoRevOpen?((0,l.my)(),d=(0,n.$dqs)("#vstar-window-review #vstar-noreviews")):d=(0,n.$dqs)("#vstar-noreviews");const v=(0,n.$dqs)("#reviews-body",d),g=(0,n.$dqs)(".noreviews-center",d);s.A[p]=d,s.A[c]=v,d.setAttribute("review_sort_by",s.A.userSetting.review_sort_by),S(d,g),L(d),u.A[s.A.reviewsKey].writeBtn=(0,n.$dqs)(".tt-write-reviews",d),(0,f.IV)(),E(d),q(),N()}function k(t,e,i="beforebegin"){let r=s.A.isWdoRevOpen?"#vstar-window-review #reviews-wrapper,#vstar-window-review #noreviews-wrapper":"#reviews-wrapper,#noreviews-wrapper";(0,n.$dqsa)(r).forEach((t=>t.remove()));let l=!1;const{isWdoRevOpen:d,isWdoRevExist:c}=s.A;let p;const v=Array.from((0,n.$dqsa)("#seal-review-widget")).find((t=>t.parentNode.offsetParent)),g=(0,n.$dqs)(".pagefly-review-widget-sealapp"),A=u.A.customReviewsBlock;if(d&&!c)s.A.isWdoRevExist=!0,p=(0,n.$dqs)("#vstar-window-review"),i="afterbegin";else if(g)p=g,i="beforeEnd";else if(A)p=A,null===A.parentNode.offsetParent&&(l=!0),i="beforeEnd";else if(v)v.parentNode.parentNode.style.padding=0,p=v,i="beforeEnd";else{let t=null,o=a.A.get_move_review_info;Object.keys(o).length?(61244833988===s.A.shop_id&&130299592900===s.A.themeId&&s.A.isMobile&&(o.selector+=">.sf__accordion-content"),t=(0,n.$dqs)(o.selector),i=o.position,l=1===o.is_tab_review):e&&(t=e);let r=(0,n.$dqs)("#shopify-section-footer"),d=(0,n.$dqs)("main"),c=(0,n.$dqs)("footer"),u=(0,n.$dqs)('.shopify-section[id$="__main"],#shopify-section-product-template');const v=(0,n.$dqs)("#tt-carousels-wrapper");t?p=t:v?(i="afterend",p=v):u?(i="afterend",p=u):d?d.contains(c)?p=c:(i="afterend",p=d):r?p=r:c&&(p=c)}p&&(p.insertAdjacentHTML(i,t),!d&&(s.A.revTar=p),s.A.revTarWid=parseInt(window.getComputedStyle(p).width),l&&!s.A.isNullRev&&function(){const t=(0,n.$dqs)("#vstar-reviews");if(t&&ResizeObserver){const e=new ResizeObserver((t=>{for(let i of t){const{width:t,height:n}=i.contentRect;t&&n&&(O(),s.A.isGrid&&((0,o.dn)(),e.disconnect()))}}));e.observe(t)}}())}function E(t){R(),s.A.isMobile||window.addEventListener("resize",(function(){s.A.isGrid&&W(),j()})),s.A.isWdoRevOpen||O(),(s.A.isWdoRevOpen||s.A.isRevPage)&&t.insertAdjacentHTML("beforeend",'')}function L(t){const e=u.A[s.A.reviewsKey];e.normalReviews=(0,n.$dqs)(".tt-review-list",t),e.curBody=e.normalReviews,e.reviewsTab=(0,n.$dqs)(".tt-number[data-product-reviews]",t),e.shopTab=(0,n.$dqs)(".tt-number[data-shop-reviews]",t)}function P(t){const e=u.A.write.container;e.dataset.reviewType=t;I()||(document.body.classList.add("trustoo-open"),M(),u.A.mask.style.display="flex","product"===t?$():(1===s.A.writeForm?(0,w._x)("reviews"):2===s.A.writeForm&&((0,m.nn)(),e.parentNode.style.display="block"),e.style.display="block"),e.setAttribute("write-review",!0))}function I(){const t=u.A.write.container;if("undefined"!=typeof tt_customer){const e=(0,n.$dqs)('[input-type="author"],.slide-name',t),i=(0,n.$dqs)('[input-type="author_email"],.slide-email',t);if(3===s.A.writeRestriction&&tt_customer.orderCount<=0)return(0,n.setToast)("Please purchase the product first"),!0;e&&i&&(e.value=tt_customer.name,i.value=tt_customer.email,1===s.A.writeForm?(0,w.PT)():2===s.A.writeForm&&(0,m.yS)())}else if(1!==s.A.writeRestriction)return location.href=location.origin+"/account/login",!0;return!1}function M(){if(s.A.isMobile){let t=window.location.hash;t.includes("tt-write-reviews-open")||(window.location.hash=t?t+"&tt-write-reviews-open":"tt-write-reviews-open"),window.addEventListener("hashchange",D)}}function D(){-1===window.location.hash.indexOf("tt-write-reviews-open")&&(1===s.A.writeForm?(0,w.Do)():2===s.A.writeForm&&(0,m.oD)(),window.removeEventListener("hashchange",D))}function O(){const t=s.A.reviewsDom;s.A.revTarWid=parseInt(getComputedStyle(s.A.revTar).width);let e="block";if(s.A.revTarWid<1e3?s.A.reviewsDom.style.padding="0 20px":s.A.reviewsDom.style.padding="",s.A.revTarWid<=738&&!s.A.isMobile){if(s.A.isNullRev){(0,n.$dqs)("#tt-first-row",t).style.cssText="display: flex;flex-direction: column;align-items: center;gap: 20px;"}else if(1!==s.A.userSetting.is_hide_ratings){const i=(0,n.$dqs)(".tt-head-left",t),s=(0,n.$dqs)(".tt-head-right",t),o=(0,n.$dqs)(".tt-head-content",t),r=(0,n.$dqs)(".tt-head-title",t);i.style.cssText="flex-direction: column;gap: 32px;",o.style.cssText="justify-content: center;",r.style.cssText="margin: 0 auto;",s.style.cssText="padding-bottom: 10px;",e="none"}s.A.reviewsDom.style.padding="0 8px"}else{const e=[];if(s.A.isNullRev){const i=(0,n.$dqs)("#tt-first-row",t);e.push(i)}else{const i=(0,n.$dqs)(".tt-head-left",t),s=(0,n.$dqs)(".tt-head-right",t),o=(0,n.$dqs)(".tt-head-content",t),r=(0,n.$dqs)(".tt-head-title",t);e.push(i,s,o,r)}e.forEach((t=>{t&&(t.style.cssText="")}))}s.A.isNullRev||(0,n.$dqsa)(".tt-dividing",t).forEach((t=>{t.style.display=e}))}function B(){const t=s.A.lang;let e="",i="",n="";const o=["comprehensive-descending","image-descending","commented-at-descending","rating-descending","rating-ascending"],r=[4,0,1,2,3],a=o.indexOf(s.A.userSetting.review_sort_by);o.forEach(((s,o)=>{i="",o===a&&(i="active",n=t.sort_by_options[r[o]]),e+=`
  • ${t.sort_by_options[r[o]]}
  • `}));const l=35*a+54+"px";return{text:n,html:`
    \n\t
      \n\t\t
    • ${t.sort_by}
    • \n\t\t${e}\n\t
    \n\t
    ${h.A.hook()}\n\t
    \n
    `}}function H(){!s.A.RevIntersection&&s.A.isProPage&&(s.A.RevIntersection=new IntersectionObserver((t=>{for(const e of t)e.isIntersecting&&((0,n.processRecordedData)("reviews_view"),s.A.RevIntersection.disconnect())}),{})),s.A.RevIntersection.observe(s.A.reviewsDom)}function N(){let t=Review.theme.theme_store_id,e="";if(s.A.isProPage){switch(t){case 887:case 1567:case 1356:case 1363:case 1368:case 1431:case 1434:case 1500:case 1499:case 796:case 775:case 829:e="page-width";break;case 730:case 679:case 380:e="wrapper";break;case 578:e="site-wrapper";break;default:if("warehouse"===Review.theme.name){s.A.reviewsDom.parentNode.classList.add("container");(0,n.$dqs)(".card--collapsed.card--sticky.card")&&(s.A.reviewsDom.classList.add("card"),s.A.globalStyle.textContent+="#vstar-reviews.card{border:none !important}")}else s.A.isMobile||(s.A.globalStyle.textContent+="#vstar-reviews{max-width:1200px;}")}if(""!=e){const t=(0,n.$dqs)("."+e);if(s.A.isNullRev&&t){const e=getComputedStyle(t).paddingRight;s.A.globalStyle.textContent+=`#vstar-noreviews button.noreviews-button {right:${e}}`}s.A.reviewsDom.classList.add(e)}}}const W=(0,n.debounce)((()=>{s.A.isRevOpen&&!s.A.isNullRev&&(0,o.dn)()}),200),j=(0,n.debounce)((async()=>{s.A.isWdoRevOpen||O()}),100)},659:t=>{var e={};t.exports=function(t,i){var s=function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}e[t]=i}return e[t]}(t);if(!s)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");s.appendChild(i)}},743:(t,e,i)=>{i.d(e,{A:()=>s});const s={normal:{curBody:null,normalReviews:null,shopReviews:null},popup:{curBody:null,normalReviews:null,shopReviews:null},write:{container:null,allInOne:null,image:null,prodName:null,title:null,contentLabel:null,submit:null,attributeWrapper:null,normalProdAttr:null,selectedProdAttr:null},customReviewsBlock:null,mask:null}},778:(t,e,i)=>{i.d(e,{B4:()=>c,bl:()=>d,rU:()=>l});var s=i(571),n=i(957),o=i(986),r=i(134),a=i(638);async function l(){const{isProPage:t,isHomePage:e}=s.A,{customProTarSel:i}=r.A;let l;l=function(){let t={},e=Review.theme.theme_store_id;var i=".product-single__title",s=".product__title>h1",n='.grid-item>h1.h2[itemprop="name"]',o='.grid__item>h1.h2[itemprop="name"]';let r,a=[i,s,n,o,".product-details .text-block>h1"].join(",");switch(e){case 730:case 578:case 775:case 796:case 380:r=i;break;case 887:case 829:case 1356:case 1363:case 1368:r=s;break;case 679:r=n;break;case 766:r=o;break;default:t.isAll=!0,r=a}t.main=r,t.mainAll=a;var l=".product__title .product__title--template",d=".ProductMeta__Title",c=".product_title,h1.product__title",p=".tt-product-single-info .tt-title",u=".product-block-list__item .product-meta__title",v=".product-meta>.product-meta__title",g=".product-title",A=".gt_atom-cZGCOCvfkBpcRgQ_productTitle",h=".pr_title",w=".prd-block_title",m=".product-detail__title",f=".productInfo h1",_=".product_name",b=".product-name",y=".product-description-header",C=".layout-column-half-right>.title",$=".product-page-info__title>h1",x="h1.gt_heading",R="#popup_cart_title",q=".apb_product_detail_information_title",S=".product-area__details__title",T=".product-info>h3.title30",k=".gt_product-content>h2",E=".prod__title",L=".productInfo>h2",P=".product__section-title>h1",I=".page-header h1.title",M=".title-detail",D=".title>h1",O=".title-row>h1.title",B="h2.product-page--heading",H=".section-header__title.product-titre",N=".block.type-title",W="h2.product-details-product-title",j="h1.product-info__title",F=".product-detail-part>h2[itemprop='name']",z="h2.single_product__title",U="#product-description h1.h2",G="h1.product-item-caption-title.-product-page",V="h1.product-title",Z="h2[data-attribute='productTitle']",Q=".productView-title",J="h1.product__section-title",K="h1.product-single__title-text",Y='h1[itemprop="name"]',X=".proBoxInfo>h1",tt=".product-header",et="h1.title-primary",it="[data-product-description-container]>h2.h1",st=".col-md-12>.title-sale",nt=".shg-product-title-component",ot=".t4s-product__title",rt=".bls__product-title";let at=[];at.push(l,d,c,p,u,g,A,h,w,f,_,y,C,$,x,R,q,S,T,k,m,E,v,L,b,P);let lt=[I,M,D,O,B,H,N,W,j,F,z,U,G,V,Z,Q].join(","),dt=[J,K,Y,X,tt,et,it,st,nt,ot,rt].join(","),ct=at.join(",");return t.other1=lt,t.other2=ct,t.other3=dt,t}();let d,c=[],p=!1;const u=(0,o.$dqsa)(".custom-vstar-rating-widget,.pagefly-star-rating-sealapp,.ecom-star-rating-sealapp");0!==u.length&&(c=u,p=!0),i&&!p&&(d=(0,o.$dqs)(i),d&&(p=!0,Review.proType="custom",Review.proSel=i,Review.proTarget=d),e&&d)||(p||(c=(0,o.$dqsa)(l.main),0!==c.length||l.isAll||(c=(0,o.$dqsa)(l.mainAll)),0!==c.length&&(p=!0),Review.proType="main",Review.proSel=l.main),p||(c=(0,o.$dqsa)(l.other1),Review.proType="other1",Review.proSel="`"+l.other1+"`",0===c.length&&(c=(0,o.$dqsa)(l.other2),Review.proType="other2",Review.proSel="`"+l.other2+"`"),0===c.length&&(c=(0,o.$dqsa)(l.other3),Review.proType="other3",Review.proSel="`"+l.other3+"`")),d=Array.from(c).find((t=>null!==t.offsetParent)),d?(u.length&&(d.dataset.trustooRatingBlock=1),Review.proTarget=d,s.A.globalStyle.textContent+=`#vstar-reviews .tt-head-title,#vstar-noreviews .noreviews-title{font-family:${getComputedStyle(d).fontFamily}}`):t&&await n.zG.sendErrorMsg(3,`产品页评价嵌入失败,店铺地址为:${window.location.href}`).then((t=>{if(t[1]){const e=(0,a.starEmbeddedAdaptation)(5,t[1].selector);e&&(Review.proSel=e,d=(0,o.$dqs)(e))}})))}function d(){const t=s.A.shop_id;if(1===r.A.get_move_review_info.is_tab_review&&!s.A.isWdoRevOpen)if(61646700724===t&&129829568692===s.A.themeId){activeCls="t4s-active";let t=(0,o.$dqs)(`.panel.sp-tab.${activeCls},.t4s-tab-wrapper>.t4s-tab-content.${activeCls}`);t?t.classList.remove(activeCls):t=(0,o.$dqs)(".t4s-tab-wrapper:nth-child(2)>.t4s-tab-content");const e=(0,o.$dqs)("#tab_pr_reivew,.t4s-tab-wrapper:nth-child(4)>.t4s-tab-content");e.classList.add(activeCls),s.A.isMobile?((0,o.$dqs)(".sp-tab-content",t).style.display="none",(0,o.$dqs)("#tab_pr_reivew .sp-tab-content").style.cssText=""):((0,o.$dqs)(".tab_title_block.active,.t4s-d-inline-flex>a.t4s-active").classList.remove(activeCls),(0,o.$dqsa)(".tab_title_block,.t4s-tab-wrapper")[1].classList.add(activeCls),t.style.display="none",e.style.display="block")}else if(67745513752===t&&137959506200===s.A.themeId){const t=(0,o.$dqs)('[data-id="1670265256519"] .module'),e=(0,o.$dqs)("[data-control].opend",t);null!==e&&(e.classList.remove("opend"),e.nextElementSibling.style.display="none");const i=(0,o.$dqs)('[data-control][data-index="5"]',t);null!==i&&(i&&i.classList.add("opend"),i.nextElementSibling.style.display="block")}else if(69381783840===t&&144923328800===s.A.themeId){const t=(0,o.$dqsa)(".product-simple-tab .tab-pane"),e=(0,o.$dqsa)(".nav-item .nav-link");t[0].className="tab-pane",t[2].className="tab-pane active show",e[0].className="nav-link",e[1].className="nav-link active show"}}function c(){if(s.A.isProPage){const t=(0,o.$dqs)(`.pagefly-star-rating-sealapp[product-id="${s.A.productId}"]`);t&&(t.style.cursor="pointer",t.onclick=function(){s.A.reviewsDom&&(0,o.scrollTo)(s.A.reviewsDom)})}}},825:t=>{t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(i){!function(t,e,i){var s="";i.supports&&(s+="@supports (".concat(i.supports,") {")),i.media&&(s+="@media ".concat(i.media," {"));var n=void 0!==i.layer;n&&(s+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),s+=i.css,n&&(s+="}"),i.media&&(s+="}"),i.supports&&(s+="}");var o=i.sourceMap;o&&"undefined"!=typeof btoa&&(s+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleTagTransform(s,t,e.options)}(e,t,i)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},868:t=>{t.exports=function(t,e){Object.keys(e).forEach((function(i){t.setAttribute(i,e[i])}))}},877:(t,e,i)=>{i.d(e,{N:()=>s});class s{init(){return this.emitCartChanges().then((()=>{this.observeCartChanges()}))}async fetchCart(){return(await fetch("/cart.js")).json()}storeCartToken(t){try{sessionStorage.setItem("ttCartToken",t)}catch(t){}}storedCartToken(){return sessionStorage.getItem("ttCartToken")||""}async emitCartChanges(){const t=await this.fetchCart(),e=new CustomEvent("cart_changed",{detail:{token:t.token}});window.dispatchEvent(e),this.storeCartToken(t.token)}observeCartChanges(){new PerformanceObserver((t=>{t.getEntries().forEach((t=>{const e=["xmlhttprequest","fetch"].includes(t.initiatorType),i=/\/cart\//.test(t.name);e&&i&&this.emitCartChanges()}))})).observe({entryTypes:["resource"]})}}},957:(t,e,i)=>{i.d(e,{nj:()=>d,zG:()=>l});var s=i(571),n=i(134),o=i(405),r=i(986);function a(t,e,i,n=!1,o=!1,r=!1){return new Promise(((a,l)=>{!function(t,e={},i="GET",n,o=!1,r,a,l){let d=new XMLHttpRequest;var c=`https://${Review.baseUrl}/api/v1/`;let p="";p=o||a?t:r?s.A.uploadImgInfo.host:c+t;let u="";"object"!=typeof e||r||(u=Object.keys(e).reduce(((t,i)=>t+"&"+i+"="+e[i]),"")),"POST"==i?u=u&&!r?u.slice(1):e:"GET"==i&&u&&(u=u.replace("&","?"),p+=u),d.open(i,p,!0),u&&"POST"==i?d.send(u):d.send(),d.onreadystatechange=()=>{if(4==d.readyState){let t=d.responseText;200==d.status||203==d.status?n&&n(t):l&&l({responseText:t,statusText:d.statusText})}}}(t,e,i,a,n,o,r,l)})).then((t=>{if(o?t={name:e.get("name"),key:e.get("key")}:n||(t=JSON.parse(t)),!n&&!o){const e=t.code;if(-1===e)throw t;if(-2===e)throw t;t=t.data}return[null,t]})).catch((t=>{let i=[{error:t.message,params:e,code:t.code}];return o&&i.push({name:e.get("name")}),i}))}const l={getUserSetting:()=>a("users/get_reviews_settings",{shop_id:Review.shop_id}),getInstallStatus(){const t={shop_id:Review.shop_id};return s.A.productId&&(t.product_id=s.A.productId),"undefined"==typeof vstar_review_settings&&(t.no_metafield=1),a("reviews/get_shop_install_status",t)},getSvg:t=>a("https://cdn.vstar.app/static/images/svg/customer/"+t+".svg?55555",{},"GET",!0),getIcons:()=>a("https://cdn.vstar.app/static/customer/icons.json",{},"GET",!0),getUserNeed:()=>a("reviews/get_custom_info",{shop_id:Review.shop_id}),getLang:()=>a("reviews/get_customer_self_define_lang",{shop_id:Review.shop_id,lang:Review.lang}),getProductRating(t){let e={shop_id:Review.shop_id},i=s.A.productId;return i?e.product_id=i:t&&(e.product_handle=t),a("reviews/get_product_rating",e)},getRating(t){const e={shop_id:Review.shop_id},i=s.A.productId;return i&&!s.A.isWdoRevOpen?e.product_id=i:e.is_all_product=1,t&&(e.product_handle=t),a("reviews/get_rating",e)},getCollRating(t,e){let i={shop_id:Review.shop_id};return t?i.product_handle=t:i.product_id=e,a("reviews/get_products_rating",i)},getProRevList(t,e,i,r,l,d,c,p){i||0===i||(i=(0,o.aQ)()),r||(r=s.A.layoutReviewCount);let u=r;!s.A.isWdoRevOpen&&!s.A.isRevPage||l||(u=15);let v={shop_id:Review.shop_id,limit:u};i&&(v.page=i);const{is_translate_review:g,auto_switch_language:A,is_show_empty_review:h}=s.A.keySettings;void 0!==p?v.no_empty=p?1:2:1!==h&&(v.no_empty=1);const w="shopReviews"===s.A.showType||"popupShopReviews"===s.A.showType;return w?(v.is_store_review=1,v.no_empty=2):s.A.isWdoRevOpen?(v.scene=2,n.A.isPopupProdReviews&&s.A.productId?v.product_id=s.A.productId:v.is_show_all=1):s.A.isMixReview?(v.scene=1,v.is_show_all=1):v.product_id=s.A.productId,e&&!w&&(v.rating_filter=e),l?v.is_buyers_show=l:s.A.allRevLoadLock=!0,(d||n.A.isResourceReviews)&&(v.has_resource=1,v.no_empty=2),c&&(v.review_id=c),v.sort_by=t,1!==g&&1!==A||(v.lang=Review.lang),v.t=s.A.revReqParam,a("reviews/get_product_reviews",v)},getProductInfo(t){let e={shop_id:Review.shop_id};return t?e.product_title=t:e.product_id=s.A.productId,a("products/get_shopify_product_info",e)},getProducts(t,e=""){let i=!0,o=location.origin+"/apps/trustoo/api/v1/reviews/get_product_list";(location.origin.includes("http://localhost")||n.A.useOriginalRequest)&&(i=!1,o="reviews/get_product_list");const r={shop_id:s.A.shop_id,page:t};return e&&(r.title=e),a(o,r,"GET",!1,!1,i)},recordInfo:t=>a(location.origin+"/apps/trustoo/api/v1/reviews/collect",t,"GET",!0),getOnlyOneProduct:()=>a("products/get_product_only_one",{shop_id:Review.shop_id}),getWriteRevSetting:()=>a("reviews/get_write_review_setting",{shop_id:Review.shop_id}),getAttribute:()=>a("reviews/get_product_attribute_collections",{shop_id:Review.shop_id,product_id:s.A.writeTo.productId||s.A.productId}),getAttributeStatistics:()=>a("review/get_attribute_statistics",{shop_id:Review.shop_id,product_id:s.A.productId}),getPolicyToken:()=>a("review/get_policy_token",{shop_id:Review.shop_id}),uploadImg(t){const e=s.A.uploadImgInfo;let i=(0,r.get_suffix)(t.name),n=new FormData;return n.append("name",t.name),n.append("key",e.dir+i),n.append("policy",e.policy),n.append("OSSAccessKeyId",e.accessid),n.append("success_action_status","200"),n.append("callback",e.callback),n.append("signature",e.signature),n.append("file",t),72898347282===s.A.shop_id&&(n=n.fd),a("",n,"POST",!1,!0)},getUploadVideoUrl:()=>a("reviews/get_upload_url",{shop_id:Review.shop_id}),uploadVideo(t,e){let i=new FormData;return i.append("file",e),a(t,i,"POST",!0)},uploadReview(t,e,i,o){const{shop_id:r}=s.A,l=s.A.ratingVal;let d=!0,c=location.origin+"/apps/trustoo/api/v1/reviews/add_review_via_shopify";(location.origin.includes("http://localhost")||n.A.useOriginalRequest)&&(d=!1,c="reviews/add"),t.resources=i.map((({url:t,resource_type:e})=>({url:t,resource_type:e})));const p=o?void 0:s.A.writeTo.productId||s.A.productId||void 0;return Object.assign(t,{product_id:p,shop_id:r,rating:l}),a(c,JSON.stringify(t),"POST",!1,!1,d)},getInsList(){const{shop_id:t,insPageSize:e,insCurPage:i}=s.A;return a("reviews/get_instagram_fee_list",{shop_id:t,limit:e,cur_page:i})},getInsSetting(){const{shop_id:t}=s.A;return a("reviews/get_instagram_setting",{shop_id:t})},likeOrDislikeReview(t,e,i){let n="";1===t?n="reviews/like_review":2===t&&(n="reviews/dislike_review");const{shop_id:o}=s.A;return a(n,JSON.stringify({shop_id:o,review_id:i,type:e}),"POST")},getBuyerShowsSettings(){const{shop_id:t}=s.A;return a("reviews/get_buyers_show_settings",{shop_id:t})},sendErrorMsg(t,e){let i={shop_id:Review.shop_id,theme_id:s.A.themeId,type:t,content:e};return a("reviews/warning_feedback",JSON.stringify(i),"POST")}},d={getSetting:()=>a("reviews/get_qa_settings",{shop_id:Review.shop_id}),getList:t=>(Object.assign(t,{shop_id:Review.shop_id,product_id:s.A.productId,page:(0,o.aQ)(),lang:Review.lang}),a("reviews/get_qa_list",t)),addQA:t=>(t.shop_id=Review.shop_id,t.product_id=s.A.productId,a("reviews/add_qa",JSON.stringify(t),"POST")),likeOrDislikeQA(t,e,i){let n="";1===t?n="reviews/like_qa":2===t&&(n="reviews/dislike_qa");const{shop_id:o}=s.A;return a(n,JSON.stringify({shop_id:o,qa_id:i,type:e}),"POST")}};s.A.getRevList=l.getProRevList},986:(t,e,i)=>{i.r(e),i.d(e,{$dqs:()=>$,$dqsa:()=>x,compressImage:()=>h,copyToClipboard:()=>R,dealImage:()=>A,debounce:()=>S,getMobileSystem:()=>C,getObjectURL:()=>_,getTimeStamp:()=>p,getTotalStarString:()=>d,getWindowWidth:()=>w,get_suffix:()=>I,gsLocal:()=>L,gsSession:()=>E,hexToRgba:()=>u,imgLoad:()=>f,imgLoadLimit:()=>m,isMobile:()=>q,isWebPSupported:()=>M,processRecordedData:()=>c,returnCitySN:()=>P,scrollTo:()=>y,setCopy:()=>T,setDelay:()=>k,setLoading:()=>g,setObserve:()=>b,setToast:()=>v,setWriteReview:()=>l});var s=i(154),n=i(45),o=i(957),r=i(743),a=i(571);async function l(){let t=1;const e=r.A.write;if(!a.A.writePopupEmbedded){a.A.writePopupEmbedded=!0;const i=[];"undefined"==typeof vstar_write_review_settings||a.A.isSettingUpdate?i.push(o.zG.getWriteRevSetting()):i.push([null,vstar_write_review_settings]),a.A.productId?i.push(o.zG.getAttribute()):i.push(Promise.resolve([null,a.A.lang]));let l=!1;0===Object.keys(a.A.lang).length?(l=!0,i.push(o.zG.getLang())):i.push(Promise.resolve([null,a.A.lang]));const[d,c,p]=await Promise.all(i);if(d[0])return;const u=d[1];a.A.productId&&(a.A.attributeConfig=c[1]);let v=p[1];l&&(v=JSON.parse(p[1].lang_json)),a.A.lang=v;const g=u.write_review_form;t=g,a.A.writeRestriction=u.leave_review_method,a.A.writeForm=g,1===g?((0,s.yE)(u),(0,s.Cf)(u)):2===g&&(0,n.P9)(u),1===a.A.userSetting.is_qa_active&&1!==t&&((0,s.yE)(u),(0,s.Cf)(u));const A=$(".trustoo-write-review");if(e.container=A,1===g||1===a.A.userSetting.is_qa_active){const t=$("#trustoo-allinone");e.allInOne=t,e.image=$(".product-image",t),e.prodName=$(".product-right",t),e.title=$(".head-title",t),e.contentLabel=$(".feedback-area>.tt-input-title",t),e.content=$(".big-input",t),e.submit=$(".form-submit",t)}if(1===u.show_review_btn){a.A.writeTo.type=u.write_review_type;const t=r.A[a.A.reviewsKey].writeBtn;"shop"===u.write_review_type&&a.A.isMixReview&&t&&(t.textContent=a.A.lang.store_review.write_btn_text),a.A.globalStyle.textContent+=".trustoo-widget .tt-write-reviews {display: block !important;}"}return d}}function d(t,e=!1){const{isProPage:i}=a.A,s=a.A.ratingIconSvg;let n="";s||(n=" pending");const o=`
    ${s}
    `,r=`
    ${s}
    `;parseInt(t)||(t=0);for(var l="",d=Math.floor(t),c=0;c\n\t\t
    ${s}
    \n
    \n ${s}\n
    \n `}for(c=0;c<5-d;c++)l+=r;return l}function c(t,e="",i){if(a.A.isProPage&&a.A.ratingData&&0==a.A.ratingData.rating)return;let s="",n=0;if(localStorage.getItem("trustoo_uv")?s=localStorage.getItem("trustoo_uv"):(s=a.A.shop_id+"_"+(new Date).getTime(),localStorage.setItem("trustoo_uv",s),n=1),a.A.isProPage&&(E("set","tt_pv_product_id",a.A.productId),E("set","tt_cart_product_id",a.A.productId)),!a.A.isRecordPV||i&&!a.A.isRecordCart){a.A.isRecordPV=!0;const r={client_id:s,event_category:t};if(["reviews_click","reviews_view"].includes(t)&&(r.unique_visitor=n),a.A.productId&&(r.product_id=a.A.productId),e)r.cart_token=e,a.A.isRecordCart=!0;else if(a.A.cartWatcher){const t=a.A.cartWatcher.storedCartToken().split("?key=")[0];r.cart_token=t}o.zG.recordInfo(r).then((()=>{i&&E("set","tt_cart_product_id",null)}))}}function p(){return(new Date).getTime()}function u(t,e){return 2==e&&(e=1),"rgba("+parseInt("0x"+t.slice(1,3))+","+parseInt("0x"+t.slice(3,5))+","+parseInt("0x"+t.slice(5,7))+","+e+")"}function v(t,e="10%",i="50%"){var s=document.createElement("div");s.className="tt-toast",s.style.cssText=`left:${i};top:${e}`,s.innerHTML=t,document.body.appendChild(s),setTimeout((()=>{document.querySelector(".tt-toast").remove()}),1500)}function g(t,e=20){var i=document.createElement("div");i.className="loader",i.style.cssText=`display: inline-block;width:${e}px;height:${e}px`,t.appendChild(i)}function A(t,e,i){let s=new Image;s.src=t,s.onload=function(){let t=document.createElement("canvas"),n=t.getContext("2d"),o=s.width,r=s.height,a="";ol||r>d)&&(o/r>1?(c=l,p=Math.round(l*(r/o))):(p=d,c=Math.round(d*(o/r)))),t.width=c,t.height=p,n.drawImage(s,0,0,c,p),a=t.toDataURL("image/jpg",.8),e.style.backgroundImage=`url(${a})`,i(a)}}async function h(t){return new Promise(((e,i)=>{const s=new Image;s.onload=()=>{try{const n=document.createElement("canvas"),o=n.getContext("2d"),r=2e3;let{width:a,height:l}=s;if(a<2e3&&l<2e3)return void e(t);a>l?a>r&&(l=l*r/a,a=r):l>r&&(a=a*r/l,l=r),n.width=a,n.height=l,"image/jpeg"===t.type&&(o.fillStyle="white",o.fillRect(0,0,a,l)),o.drawImage(s,0,0,a,l),n.toBlob((s=>{if(!s)return void i(new Error("图片压缩失败"));const n=new File([s],t.name,{type:t.type,lastModified:Date.now()});e(n)}),t.type)}catch(t){i(t)}},s.onerror=i,s.src=URL.createObjectURL(t)}))}function w(){return window.innerWidth}function m(t,e){const i=[...t];if(i.length<=e){const t=i.map((t=>{var e=f(t);return e.id=t,e}));return Promise.all(t)}const s=i.splice(0,e).map((t=>{var e=f(t);return e.url=t,e}));i.reduce(((t,e)=>t.then((()=>Promise.race(s))).then((t=>{let i=s.findIndex((e=>e.url==t));s.splice(i,1);var n=f(e);n.url=e,s.push(n)}))),Promise.resolve()).then((()=>Promise.all(s)))}function f(t){return new Promise(((e,i)=>{var s=new Image;s.url=t,s.onerror=()=>{i()},s.onload=()=>{e(s)},s.src=t}))}function _(t){var e=null;return null!=window.createObjectURL?e=window.createObjectURL(t):null!=window.URL?e=window.URL.createObjectURL(t):null!=window.webkitURL&&(e=window.webkitURL.createObjectURL(t)),e}function b(t,e,i,s){s.observer=new MutationObserver(i),s.observer.observe(t,e)}function y(t,e="smooth"){t.scrollIntoView({behavior:e,block:"start"})}function C(){var t=navigator.userAgent,e=t.indexOf("Android")>-1||t.indexOf("Adr")>-1,i=!!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);return e?"android":i?"ios":void 0}function $(t,e){let i;return i=e?e.querySelector(t):document.querySelector(t),i}function x(t,e){let i;return i=e?e.querySelectorAll(t):document.querySelectorAll(t),i}function R(t,e){navigator.clipboard.writeText(t).then((()=>{e()}))}function q(){let t=navigator.userAgent,e=/(?:Android)/.test(t),i=/(?:Firefox)/.test(t),s=/(?:iPad|PlayBook)/.test(t)||e&&!/(?:Mobile)/.test(t)||i&&/(?:Tablet)/.test(t),n=/(?:iPhone)/.test(t)&&!s;return e||n}function S(t,e){var i=null;return function(...s){i&&clearTimeout(i),i=setTimeout((()=>{t(...s)}),e)}}function T(t){var e=document.createRange();window.getSelection().removeAllRanges(),e.selectNode(t),window.getSelection().addRange(e),document.execCommand("copy")&&v("Copy successfully"),window.getSelection().removeAllRanges()}function k(t){return new Promise((e=>{setTimeout((()=>{e()}),t)}))}function E(t,e,i){if("set"!==t)return JSON.parse(sessionStorage.getItem(e));try{sessionStorage.setItem(e,JSON.stringify(i))}catch(t){}}function L(t,e,i){if("set"!==t)return JSON.parse(localStorage.getItem(e));localStorage.setItem(e,JSON.stringify(i))}function P(t){fetch("https://www.cloudflare.com/cdn-cgi/trace").then((t=>t.text())).then((e=>{e=e.split("\n"),t.ip=e[2].split("=")[1],t.loc=e[9].split("=")[1]}))}function I(t){let e=t.lastIndexOf("."),i="";return-1!=e&&(i=t.substring(e)),function(t){t=t||32;for(var e="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678",i=e.length,s="",n=0;n{const e=new Image;e.onload=function(){t(1===e.width)},e.onerror=function(){t(!1)},e.src="data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoBAAEAAwA0JaQAA3AA/vuUAAA="}))}}},e={};function i(s){var n=e[s];if(void 0!==n)return n.exports;var o=e[s]={id:s,exports:{}};return t[s](o,o.exports,i),o.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var s=i(986),n=i(571),o=i(957),r=i(429),a=i(638),l=i(657),d=i(134),c=i(778),p=i(220),u=i(72),v=i.n(u),g=i(825),A=i.n(g),h=i(659),w=i.n(h),m=i(868),f=i.n(m),_=i(540),b=i.n(_),y=i(113),C=i.n(y),$=i(472),x={attributes:{id:"trustoo-insert-css"}};x.styleTagTransform=C(),x.setAttributes=f(),x.insert=w().bind(null,"head"),x.domAPI=A(),x.insertStyleElement=b();v()($.A,x);$.A&&$.A.locals&&$.A.locals;var R=i(381),q=i(877),S=i(743),T=i(651);async function k(){let t,e;const{isActWdoRev:i,globalStyle:l,isHomePage:u,isProPage:v,isCartPage:g,isCollPage:A,hasPyRating:h,hasEcomRt:w}=n.A,{pageType:m,isMobile:f}=Review;await d.A.getUserNeedData();const{isCollReview:_,isCollStartDelay:b,isPageReview:y,reviewsPageCount:C,homeStarDelay:$}=d.A;await async function(){const t=[],e=(new Date).getTime();0===Object.keys(n.A.userSetting).length?t.push(o.zG.getUserSetting()):t.push(Promise.resolve([null,null]));const{is_activate_home_reviews:i,is_activate_reviews:r,is_activate_collection_rating:a,language:l,auto_switch_language:c,reviews_per_page_number:p,review_sort_by:u,is_hide_ratings:v,show_attribute:g}=n.A.keySettings,A=(0,s.$dqs)("#seal-review-widget"),h=A||S.A.customReviewsBlock,w=h||n.A.isProPage&&1===r||n.A.isHomePage&&1===i||d.A.isPageReview||n.A.isActWdoRev||d.A.isCollReview;w||1===a&&(n.A.isCollPage||d.A.otherPageColl)?t.push(async function(t,e){let i=!0;if(1===t){const t=Shopify.locale;Review.lang=t,t!==e&&(i=!1)}else Review.lang=e;return"undefined"==typeof vstar_lang_json||!i||n.A.isSettingUpdate?o.zG.getLang():new Promise((t=>{t(vstar_lang_json)}))}(c,l)):t.push(Promise.resolve([null,null]));n.A.layoutReviewCount=p;let m=Promise.resolve([null,null]);n.A.productId||n.A.isHomePage||(n.A.isMixReview=!0);n.A.isProPage?m=n.A.reviewsData?Promise.resolve([null,n.A.reviewsData]):1!==r&&!A||!(n.A.ratingData.total_reviews>0)&&n.A.ratingData.total_reviews?Promise.resolve([null,null]):o.zG.getProRevList(u):n.A.isHomePage?m=Promise.resolve([null,null]):w&&(m=o.zG.getProRevList(u));t.push(m),n.A.productId?0===Object.keys(n.A.ratingData).length?t.push(o.zG.getRating()):t.push(Promise.resolve([null,null])):d.A.isPageReview||d.A.isCollReview||h?t.push(o.zG.getRating()):t.push(Promise.resolve([null,null]));n.A.productId&&1===g&&1!==v?t.push(o.zG.getAttributeStatistics()):t.push(Promise.resolve([null,null]));const f=new Promise(((t,e)=>{const i=(0,s.$dqs)("link[href*='trustoo-reviews.min.css']");if(i)t(i);else{const i=window.TrustooReviews.reviews.trustooCSSLink||"https://cdn.vstar.app/static/dist/css/trustoo-reviews.min.css",s=document.createElement("link");s.rel="stylesheet",s.href=i,d.A.setLinkMedia&&(s.media="print"),document.head.appendChild(s),s.onload=()=>{t(s),s.media="all"},s.onerror=()=>{e(new Error("CSS link not found"))}}}));t.push(f),await Promise.all(t).then((t=>{const[i,o,r,a,l]=t;if(window.TrustooReviews.reviews.requestTime=(new Date).getTime()-e,i[1]&&(n.A.userSetting=i[1]),r[1]){const t=r[1];n.A.pageInfo[n.A.showType]={total:t.page.total_page,curPage:t.page.cur_page,count:t.page.count},(0,s.gsSession)("set","trustoo_reviews",[t.list])}if(a&&a[1]&&(n.A.productId?n.A.ratingData=a[1]:n.A.allRatingData=a[1]),o&&o[1]){let t=null;t=o[1].lang_json?JSON.parse(o[1].lang_json):o[1],t.show_full_review&&(n.A.ellipsisText=t.show_full_review),Object.assign(n.A,{lang:t})}else"undefined"!=typeof vstar_lang_json&&(n.A.lang=vstar_lang_json);l&&l[1]&&(n.A.attributeStatistics=l[1])}))}();const x=n.A.userSetting;Review.is_install=x.is_install,Review.is_product_open=x.is_activate_product_rating,Review.is_reviews_open=x.is_activate_reviews,Review.is_collection_open=x.is_activate_collection_rating,Review.is_activate_home_rating=x.is_activate_home_rating,Review.is_show_stars_without_review=x.is_show_stars_without_review,n.A.userSetting=x,n.A.revHeadType=1===x.is_hide_ratings?2:1;const T=(0,s.$dqs)("#trustoo-mask");T?S.A.mask=T:(document.body.insertAdjacentHTML("beforeend",''),S.A.mask=(0,s.$dqs)("#trustoo-mask"));const k=x,L="collection"!=m||_||i||y;if(L){let i=!1,o=!1,r=!1;const a=d.A.fixedLayout||x.layout;1==a||3==a?(t="list-",i=!0,3==a&&(r=!0)):2==a&&(t="grid-",o=!0,n.A.gridLoadedShowImg=0,n.A.gridShowImgCount=0),e=k.reviews_per_page_number,C&&(e=C),(0,s.returnCitySN)(n.A),Object.assign(n.A,{layoutClass:t,layoutReviewCount:e,globalStyle:l,isGrid:o,isList:i,isSplit:r})}window.TrustooReviews.reviews.hasReviews=!1,function(t,e){let i=`.vstar-star{--star-color:${n.A.userSetting.star_color};\n\t--nostar-color:${n.A.userSetting.nostar_color};}`;if(e){const e=t.font_color;let o=t.box_bg_color;const r=n.A.theme_store_id;1356!==r&&1567!==r||"#FFFFFF"===o&&(o="#FFFFFF00");let a=t.border_radius+"px";const l="Dark"===t.card_shadow?"1px 1px 6px rgba(0, 0, 0, 0.1)":"0px 0px 3px rgba(0, 0, 0, 0.2)";if(i+=`\n #reviews-wrapper,#noreviews-wrapper\n \t{\n background-color: ${o};\n --font-color: ${e};\n --font-color-o4: ${(0,s.hexToRgba)(e,.4)};\n --font-color-o7: ${(0,s.hexToRgba)(e,.7)};\n --font-color-o8: ${(0,s.hexToRgba)(e,.8)};\n\t\t\t\t\t--font-size:${t.font_size}px;\n --bg-color:${o};\n --badge-text-color:${t.badge_text_color};\n --badge-color:${t.verified_badge_color};\n --card-color:${t.card_bg_color};\n --box-bg-color:${o};\n --button-radius:${a};\n --button-color:${t.button_color};\n --button-bd-color:${t.button_bg_color};\n --button-border-color:${t.button_border_color};\n\t\t\t\t\t--line-color:${t.dividing_line_color};\n\t\t\t\t\t--reply-bg-color:${t.reply_bg_color};\n\t\t\t\t\t--avatar-text-color:${t.avatar_text_color};\n\t\t\t\t\t--avatar-bg-color:${t.avatar_bg_color};\n\t\t\t\t\t--attr-bg-color:${t.attributes_bg_color};\n\t\t\t\t\t--attr-color:${t.attributes_color};\n }\n\t\t\t\t.trustoo-widget{--sprites-image-url:url(https://${n.A.staticBaseUrl}/static/images/sprites/trustoo_sprites.png?${n.A.constructTime});}\n #vstar-window-review,#vstar-window-review #reviews-wrapper,\n #vstar-window-review #vstar-reviews{background-color: ${o.slice(0,7)};}\n #vstar-reviews.pending>* {\n opacity: 0 !important;\n }\n\t\t\t\t.trustoo-widget #reviews-body .grid-review{\n\t\t\t\t\tbox-shadow: ${l};\n\t\t\t\t}\n\t\t\t\t.trustoo-widget #reviews-body .reviews-text{\n\t\t\t\t\tfont-size:${t.font_size}px;\n\t\t\t\t}\n\t\t\t\t.product-icon-list i{\n\t\t\t\t\tfont-size:20px\n\t\t\t\t}\n #trustoo-allinone i,\n .write-review-container i{font-size:16px}\n #reviews-head i{font-size:20px}\n\t\t\t\t${t.font?`.trustoo-widget *,.vstar-star .tt-rating-text,#vstar-tab{font-family: ${t.font}}`:""}\n\t\t\t\t${n.A.userSetting.reviews_css_code}\n `,t.qa_colors){const e=t.qa_colors.split(",");i+=`.trustoo-widget{--tab-title-color:${e[0]};\n\t\t\t\t\t--tab-title-line-color:${e[1]};\n\t\t\t\t\t--question-color:${e[3]};\n\t\t\t\t\t--question-color-o8: ${(0,s.hexToRgba)(e[3],.8)};\n\t\t\t\t}`}n.A.isGrid?i+=`.grid-review{background-color: ${t.card_bg_color}}\n .trustoo-widget #reviews-body{margin-top:16px !important}`:i+=`.trustoo-widget .resource-item{border-radius: ${t.photo_radius}px}`}i+=n.A.userSetting.rating_css_code,void 0!==d.A.custom_style_info.css_style_code&&(i+=d.A.custom_style_info.css_style_code);d.A.vstarCustomSty&&(i+=d.A.vstarCustomSty);n.A.globalStyle.insertAdjacentHTML("beforeend",i)}(x,L);const P=h||w;if(v)n.A.isProRatingOpen=1===x.is_activate_product_rating||P,1==x.layout?((1==x.is_transparent||f)&&(x.is_transparent=0),k.card_bg_color=(0,s.hexToRgba)(x.card_bg_color,x.is_transparent)):k.card_bg_color=x.card_bg_color,(0,R.D)(),-1!==location.search.indexOf("req=review")&&(n.A.isLinkReqRev=!0),1===x.is_activate_reviews&&(n.A.isRevOpen=!0),await(0,a.getTotalRating)();else if(A||d.A.otherPageColl){2!==x.is_activate_collection_rating&&(b&&await(0,s.setDelay)(2e3),await(0,r.M0)(),0===Review.collTarget.length?n.A.isSetObserver&&(0,r.DF)():(0,a.setInsertTarget)(2)),(1===k.is_activate_reviews&&_||S.A.customReviewsBlock)&&E()}else if(u){let t,e,i="",l=[],{productId:p,productImageUrl:u,productName:v}=n.A,g=!1;if(n.A.isHomeRatingOpen=1===x.is_activate_home_rating||P,(1===x.is_activate_home_reviews||S.A.customReviewsBlock)&&(n.A.isRevOpen=!0,n.A.isHomeReview=g=!0,!n.A.productId)){let[e,s]=await o.zG.getOnlyOneProduct();t=s,null===e&&t&&(p=t.product_id,v=t.product_title,u=t.image_src,i=t.product_handle)}if(1===x.is_activate_home_rating||g){if(d.A.notExecuteHomeFeatureProd||(await(0,c.rU)(),e=Review.proTarget),1===x.is_activate_home_rating){$&&await(0,s.setDelay)($),await(0,r.M0)(),l=Review.collTarget;let t=l.length;1===t?l[0]===e?l.pop():(0,a.setInsertTarget)(2):0!==t?((l.includes(e)||l[0].contains(e))&&(Review.proTarget=e=null),(0,a.setInsertTarget)(2)):n.A.isSetObserver&&(0,r.DF)()}if(!p&&e&&(v=Review.proTarget.textContent.replace(/\n/g,"").trim(),v)){let[t,e]=await o.zG.getProductInfo(encodeURIComponent(v));null===t&&e&&(p=e.product_id,u=e.image_src,i=e.product_handle)}g&&(t||p||(n.A.isMixReview=!0)),d.A.isHomeAllReviews&&(n.A.isMixReview=!0),Review.productId=p,Object.assign(n.A,{productId:p,productName:v,productImageUrl:u,productHandle:i}),(p||n.A.isMixReview)&&await(0,a.getTotalRating)()}}else if(g){if((0,s.gsSession)("get","tt_cart_product_id")){n.A.cartWatcher=new q.N,await n.A.cartWatcher.init();const t=n.A.cartWatcher.storedCartToken().split("?key=")[0];(0,s.processRecordedData)("add_to_cart",t,!0)}S.A.customReviewsBlock&&E()}else if(y){let t={};n.A.allRev&&(t.tarNode=n.A.allRev,t.position="afterbegin"),n.A.isInsertRev=!0,E()}!P||n.A.isProPage||n.A.isHomePage&&1===x.is_activate_home_rating||n.A.isCollPage&&1===x.is_activate_collection_rating||(0,a.setInsertTarget)(2),window.TrustooReviews.carousel.canWriteReview&&(0,s.setWriteReview)(),(0,p.qM)()}function E(){n.A.isMixReview=!0;let t=n.A.allRatingData;n.A.productId&&(n.A.isMixReview=!1,t=n.A.ratingData),t.total_reviews>0?(0,l.Gs)({}):(0,l.WC)(),(0,s.setWriteReview)()}window.TrustooReviews||(window.TrustooReviews={reviews:{},carousel:{}}),window.TrustooReviews.reviews.handleWriteReview=l.iB,window.TrustooReviews.reviews.setWriteReview=s.setWriteReview,window.TrustooReviews.reviews.createRangeDisplayHTML=T.Tl;var L=i(357);window.TrustooReviews||(window.TrustooReviews={reviews:{},carousel:{}});!async function(){if(window.isTrustooReviewsExecuted)return;window.isTrustooReviewsExecuted=!0;let t,e="";if(window.Review={},Review.observeCount=0,n.A.productId=shopifyObj.productId,n.A.env="production",n.A.staticBaseUrl="cdn.vstar.app",n.A.isMobile=Review.isMobile=(0,s.isMobile)(),Review.constructTime="2025-07-11 15:49:52",n.A.constructTime=new Date("2025-07-11 15:49:52").getTime()/1e3,Review.theme={},"undefined"!=typeof Shopify&&(Review.shop=Shopify.shop,Object.assign(Review.theme,Shopify.theme)),(0,s.$dqs)("body.warehouse--v1")&&(Review.theme.name="warehouse"),n.A.baseUrl=Review.baseUrl="api.trustoo.io",n.A.isWebPSupported=await(0,s.isWebPSupported)(),Review.collTarget=[],Review.loadedPhoto=[],Review.checkGridHighMsg=[],Review.checkGridMsg=[],window.ShopifyAnalytics)t=window.ShopifyAnalytics&&ShopifyAnalytics.lib&&ShopifyAnalytics.lib.config&&ShopifyAnalytics.lib.config.Trekkie.defaultAttributes.shopId,t||(t=shopifyObj.shop_id),Review.shop_id=n.A.shop_id=t,"undefined"!=typeof Shopify&&Shopify.theme&&(n.A.theme_store_id=Shopify.theme.theme_store_id,n.A.themeId=Shopify.theme.id),e=window.ShopifyAnalytics&&window.ShopifyAnalytics.meta.page.pageType;else{if(!document.querySelector("#seal_shop_id"))return;"undefined"!=typeof tt_page_type&&(e=tt_page_type);const t=JSON.parse(document.querySelector("#seal_shop_id").textContent);if(Review.shop_id=n.A.shop_id=t,"product"===e){const t=JSON.parse(document.querySelector("#tt_product").textContent);Review.productId=n.A.productId=t.id,n.A.productName=t.title,n.A.productImageUrl=t.image_url}}Review.pageType=e,n.A.pageType=e,n.A.isHomePage="index"===e||"home"===e,n.A.isCollPage="collection"===e,n.A.isProPage="product"===e,n.A.isCartPage="cart"===e;const i=await o.zG.getInstallStatus(),r=i[1];if(null!==i[0]||-1===r.code)return;if(n.A.isProRatingUpdate=1===r.product_rating_updating,n.A.isSettingUpdate=1===r.shop_setting_updating,n.A.isReviewsUpdate=1===r.product_review_updating,n.A.isReviewsUpdate?n.A.revReqParam=(new Date).getTime():n.A.revReqParam=r.product_review_updating,(0,s.gsSession)("set","instagram_is_install",r.instagram_is_install),(0,s.gsSession)("set","trustoo_reviews",[]),1!==r.review_is_install)return;const l="undefined"!=typeof vstar_review_settings&&vstar_review_settings;l&&!n.A.isSettingUpdate?(n.A.userSetting=l,Object.keys(n.A.keySettings).forEach((t=>{n.A.keySettings[t]=l[t]})),n.A.isActWdoRev=1===l.sidetab_setting.sidetab_is_enabled):r.widgets_setting&&(n.A.isActWdoRev=1===r.widgets_setting.sidetab_is_enabled,n.A.keySettings=r.widgets_setting),n.A.isProPage&&("undefined"!=typeof vstar_product_rating&&vstar_product_rating.hasOwnProperty("rating")&&!n.A.isProRatingUpdate?n.A.ratingData=vstar_product_rating:r.rating&&(n.A.ratingData=r.rating),"undefined"==typeof vstar_product_reviews||n.A.isReviewsUpdate||0===Object.keys(n.A.userSetting).length||1===n.A.userSetting.auto_switch_language||(n.A.reviewsData=vstar_product_reviews)),d.A.setPageReview(t);const c=(0,s.$dqsa)(".pagefly-star-rating-sealapp"),p=(0,s.$dqsa)(".ecom-star-rating-sealapp"),u=(0,s.$dqsa)(".custom-vstar-rating-widget");if(0!==c.length?(n.A.hasPyRating=!0,Review.collTarget=Array.from(c)):0!==p.length&&(n.A.hasEcomRt=!0,Review.collTarget=Array.from(p)),0!==u.length&&(n.A.hasPyRating=!0,Review.collTarget=Array.from(u)),"undefined"!=typeof trustooBeforeExecute&&trustooBeforeExecute(n.A,d.A),n.A.isProPage||n.A.isCollPage||n.A.isHomePage||n.A.isCartPage||Shopify.designMode||d.A.isPageReview||n.A.isActWdoRev||d.A.otherPageColl||n.A.hasPyRating||n.A.hasEcomRt){const t=(0,s.gsSession)("get","vstarTimestamp");if(t)n.A.timestamp=t;else{n.A.isFirstExecute=!0;const t=(new Date).getTime();(0,s.gsSession)("set","vstarTimestamp",t),n.A.timestamp=t}const e={trustoo_reviews:[],trustoo_show_reviews:[],trustoo_all_reviews:[],trustoo_shop_reviews:[],trustoo_popup_shop_reviews:[],trustoo_album_reviews:[]};(0,s.gsSession)("set","tt_detail_reviews",JSON.stringify(e)),function(){const t=n.A.keySettings.rating_icon_type||1,e=n.A.keySettings.verified_icon_type||1,i=(0,s.gsSession)("get","ttRatingIcons");let r={};i&&(r=JSON.parse(i),n.A.ratingIconSvg=r["star"+t],n.A.badgeIconSvg=r["badge"+e]);1===t&&(n.A.ratingIconSvg=L.A.star);1===e&&(n.A.badgeIconSvg=L.A.verified);n.A.ratingIconSvg&&n.A.badgeIconSvg||o.zG.getIcons().then((i=>{const o=["star","rounded","spikes","surrounded","fire","heart","diamond","crown","trophy","shirt","skirt","bag","tie","cup","leaf","seedling","footprint","chef"][t-1];if(i[0])n.A.ratingIconSvg=L.A.star,n.A.badgeIconSvg=L.A.verified;else{const t=JSON.parse(i[1]);n.A.ratingIconSvg=t[o],n.A.badgeIconSvg=t["badge"+e]}(0,s.$dqsa)(".vstar-star .pending").forEach((t=>{t.innerHTML=n.A.ratingIconSvg,t.classList.remove("pending")})),(0,s.$dqsa)("#vstar-reviews .user-verified.pending").forEach((t=>{t.insertAdjacentHTML("afterbegin",n.A.badgeIconSvg),t.classList.remove("pending")})),r["star"+t]=n.A.ratingIconSvg,r["badge"+e]=n.A.badgeIconSvg,(0,s.gsSession)("set","ttRatingIcons",JSON.stringify(r))}))}();let i=document.createElement("style");i.id="trustoo-css",document.head.appendChild(i),n.A.globalStyle=i,d.A.setUserNeed(),Object.assign(n.A,d.A);const r=async function(){const t=(0,s.$dqs)(".pagefly-review-widget-sealapp,.custom-vstar-review-widget");if(t){const e=t.dataset.productId;if(e){const i=t.dataset.productTitle,s=`//${location.host}/cdn/shop/`+t.dataset.productImage;Object.assign(n.A,{productId:e,productName:i,productImageUrl:s})}S.A.customReviewsBlock=t}if(n.A.isProPage){let t=shopifyObj.productId,e=shopifyObj.productImage[0],i=shopifyObj.productName;Review.productId=t,Object.assign(n.A,{productId:t,productImageUrl:e,productName:i});const s=location.href.indexOf("/products/");-1!==s&&(n.A.productHandle=location.href.substring(s+10))}(0,s.imgLoadLimit)(["//cdn.vstar.app/static/images/default.png","//cdn.vstar.app/static/images/video_default.png",`//${n.A.staticBaseUrl}/static/images/sprites/trustoo_sprites.png?${n.A.constructTime}`,"//rtestweb.sealapps.com/static/images/player.png"],3),k(),function(){let t=Review.baseUrl;"production"===n.A.env&&(t="cdn.vstar.app");var e=document.createElement("link");e.rel="stylesheet",e.href=`https://${t}/static/css/index.css`;var i=document.createElement("link");i.rel="stylesheet",i.href=`https://${t}/static/css/trustoo-sprite.min.css`,document.head.appendChild(e),document.head.appendChild(i)}(),function(){let t=[];if(!(0,s.$dqs)(".tt-review-detail-js")){let e=`https://${n.A.staticBaseUrl}/static/js/tt-review-detail.js?`+n.A.constructTime;"local"===n.A.env&&(e=`../../js/tt-review-detail.js?${(new Date).getTime()}`),t.push(e)}t.forEach((t=>{let e=document.createElement("script");e.src=t,e.setAttribute("defer",!0),-1!==t.indexOf("tt-review-detail")&&(e.className="tt-review-detail-js",e.onload=function(){(0,a.insertReviewDetail)()}),document.head.appendChild(e)}))}()};d.A.executeDelay&&await(0,s.setDelay)(d.A.executeDelay),r()}}()})(); //# sourceMappingURL=seal-review.min.js.map