PageSourceSearch

https://geebeauty.com/cdn/shop/t/60/assets/chunked-productRecommendations.js?v=52907660871986021461790619000

js geebeauty.com collected 2026-10-04 23:17:38 UTC 4,139 bytes, 55 lines download raw bytes

1import{L as b,F as y,b as l,a as f}from"./chunked-lazycomponentLoader.js";var g=Object.defineProperty,R=Object.getOwnPropertyDescriptor,a=(h,e,s,t)=>{for(var r=t>1?void 0:t?R(e,s):e,p=h.length-1,d;p>=0;p--)(d=h[p])&&(r=(t?d(e,s,r):d(r))||r);return t&&r&&g(e,s,r),r},i;const c=(i=class extends b{onInit(){this.fetch()}async fetch(){var w,v;const e=((v=(w=window.Shopify)==null?void 0:w.routes)==null?void 0:v.root)||"/",s=`${i.idPrefix}${i.idIncrementer++}`,t={recentlyViewed:"",recommendations:""},r=`
2      <div class="carousel__arrows carousel__arrows--right">
3        <button class="carousel__arrow carousel__arrow--prev swiper-button-prev" aria-label="Previous slide">
4          <svg class="icon icon-chevron-left" aria-hidden="true">
5            <use href="#icon-chevron-left"></use>
6          </svg>
7        </button>
8        <button class="carousel__arrow carousel__arrow--next swiper-button-next" aria-label="Next slide">
9          <svg class="icon icon-chevron-right" aria-hidden="true">
10            <use href="#icon-chevron-right"></use>
11          </svg>
12        </button>
13      </div>`,p=(o,n)=>{const u={pagination:{el:`#tab__${s}_${n} .swiper-pagination`},navigation:{nextEl:`#tab__${s}_${n} .swiper-button-next`,prevEl:`#tab__${s}_${n} .swiper-button-prev`},slidesPerView:"auto"};return`
14        <div class="carousel">
15          <div class="swiper carousel__slider" carousel="${JSON.stringify(u).replace(/"/g,"&quot;")}">
16            <div class="swiper-wrapper">
17              ${Array.from(o).map(m=>`<div class="swiper-slide">${m.outerHTML}</div>`).join("")}
18            </div>
19          </div>
20          ${r}
21        </div>
22      `},d=[];if(this.showRecommendations&&d.push(async()=>{const o=`${e.endsWith("/")?e:`${e}/`}recommendations/products?product_id=${this.productId}&intent=${this.recommendationType}&limit=10&section_id=product-recommendations`,n=await y.get(o),m=new DOMParser().parseFromString(n,"text/html").querySelectorAll(".shopify-section > *");t.recommendations=m.length?p(m,0):""}),this.showRecentlyViewed&&d.push(async()=>{try{const o=JSON.parse(window.localStorage.getItem("recentlyViewed")||"[]").filter(n=>n!==this.productHandle);if(o&&o.length){const n=`${e.endsWith("/")?e:`${e}/`}index/index/${o.join(",")}/?view=_product-cards`,u=await y.get(n),_=new DOMParser().parseFromString(u,"text/html").querySelectorAll(".productCard");t.recentlyViewed=_.length?p(_,1):""}}catch(o){console.error("Error fetching recently viewed products:",o)}}),!this.showRecommendations&&!this.showRecentlyViewed)return;await Promise.all(d.map(o=>o()));const $=`
23      <div class="tabs tabs--styled" id="tabs__${s}}">
24        ${t.recommendations?`
25          <div
26            class="tab"
27            data-title="${this.titleRecommendations}"
28            id="tab__${s}_0"
29            hidden
30          >
31            <div class="tab__title">
32              ${this.titleRecommendations}
33            </div>
34            <div class="tab__content">
35              ${t.recommendations}
36            </div>
37          </div>
38          `:""}
39         ${t.recentlyViewed?`
40          <div
41            class="tab"
42            data-title="${this.titleRecently}"
43            id="tab__${s}_1"
44            hidden
45          >
46            <div class="tab__title">
47              ${this.titleRecently}
48            </div>
49            <div class="tab__content">
50              ${t.recentlyViewed}
51            </div>
52          </div>
53          `:""}
54      </div>
55    `;this.element.innerHTML=$,this.element.classList.add("productRecommendations--loaded")}},i.selector=".productRecommendations",i.idIncrementer=0,i.idPrefix="product-recommendations-",i);a([l("product-id")],c.prototype,"productId",2);a([l("product-handle")],c.prototype,"productHandle",2);a([l("recommendation-type")],c.prototype,"recommendationType",2);a([l("=show-recommendations")],c.prototype,"showRecommendations",2);a([l("=show-recently-viewed")],c.prototype,"showRecentlyViewed",2);a([l("title-recently")],c.prototype,"titleRecently",2);a([l("title-recommendations")],c.prototype,"titleRecommendations",2);a([f],c.prototype,"fetch",1);let P=c;export{P as ProductRecommendations};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.