"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[115],{60:(e,r,s)=>{s.d(r,{a:()=>t});const t={container:"bKnb2nke"}},59:(e,r,s)=>{s.d(r,{a:()=>t});const t={reviews:"TpY2McXS",cardReviews:"nuUq8YWl",reviewStars:"bbZRGjDa",star:"_QGknYr3",reviewCount:"ZkmEKtRN",reviewCountText:"NUYrNV6R",reviewCountParenthesized:"eNCwmy_6"}},320:(e,r,s)=>{var t=s(141);(0,s(2).createEntrypoint)("product_hero_reviews",t.b)},141:(e,r,s)=>{s.d(r,{a:()=>w,b:()=>v});var t=s(0),n=s(59),i=s(4),a=s(1),d=s(60);function o({productId:e}){const r=(0,a.useRef)(null),s=()=>{var e;return null===(e=window.okeWidgetApi)||void 0===e?void 0:e.initWidget(r.current)};return(0,a.useEffect)((()=>{var e;return(null===(e=window.okeWidgetApi)||void 0===e?void 0:e.initWidget)?s():document.addEventListener("oke-script-loaded",s),()=>{document.removeEventListener("oke-script-loaded",s)}}),[e]),(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("div",{ref:r,"data-oke-star-rating":!0,"data-oke-reviews-product-id":`shopify-${e}`,class:d.a.container})})}const c="M9 14.118L14.562 17.475L13.086 11.148L18 6.891L11.529 6.342L9 0.375L6.471 6.342L0 6.891L4.914 11.148L3.438 17.475L9 14.118Z";function l({fillRatio:e,gradId:r}){const s=`${Math.round(100*e)}%`;return(0,t.jsxs)("svg",{class:n.a.star,viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[(0,t.jsx)("defs",{children:(0,t.jsxs)("linearGradient",{id:r,children:[(0,t.jsx)("stop",{offset:s,"stop-color":"currentColor"}),(0,t.jsx)("stop",{offset:s,"stop-color":"transparent"})]})}),(0,t.jsx)("path",{d:c,stroke:"currentColor",fill:`url(#${r})`})]})}function u(e,r){const s=Math.round(2*e)/2;return Array.from({length:5},((e,n)=>{const i=Math.max(0,Math.min(1,s-n));return(0,t.jsx)(l,{fillRatio:i,gradId:`${r}-${n}`},`${r}-${n}`)}))}function v({reviewCount:e,reviewRating:r,productHeroReviewsContent:s,reviewsProvider:i,productId:a,reviewsPublicKey:d}){if(a&&"okendo"===i&&d)return(0,t.jsx)(o,{productId:a});const c=`${r.toFixed(1)} stars from ${e} reviews`,l=!!(null==s?void 0:s.dynamic_stars);return(0,t.jsx)("div",{class:n.a.reviews,children:(0,t.jsxs)("a",{class:n.a.reviewCount,href:"#reviews","aria-label":c,children:[(0,t.jsxs)("span",{class:n.a.reviewStars,"aria-hidden":"true",children:[u(r,`bn-hero-stars-${null!=a?a:"d"}`),l&&(0,t.jsxs)(t.Fragment,{children:[" ",r.toFixed(1)]})]})," ",(0,t.jsxs)("span",{class:n.a.reviewCountText,children:[e," Reviews"]})]})})}function w({reviewCount:e,reviewRating:r,productId:s}){return(0,i.d)((e=>e.showStars))&&e&&r?(0,t.jsxs)("div",{class:n.a.cardReviews,children:[(0,t.jsxs)("span",{class:n.a.reviewStars,"aria-hidden":"true",children:[u(r,`bn-card-stars-${null!=s?s:"d"}`)," ",r.toFixed(1)]}),(0,t.jsxs)("span",{class:n.a.reviewCountParenthesized,"aria-hidden":"true",children:["(",e,")"]}),(0,t.jsx)("span",{class:"visually-hidden",children:`${r.toFixed(1)} stars from ${e} reviews`})]}):(0,t.jsx)(t.Fragment,{})}}},e=>{e.O(0,[1,2,3,4,5,6,7],(()=>e(e.s=320))),e.O()}]);