PageSourceSearch

https://www.gianttiger.com/cdn/shop/t/832/assets/AlgoliaRecommendations.CLLk3eHz.chunk.min.js

js gianttiger.com collected 2026-09-25 02:38:37 UTC 28,693 bytes, 5 lines download raw bytes

1var ie=Object.defineProperty;var ce=(t,e,r)=>e in t?ie(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var S=(t,e,r)=>ce(t,typeof e!="symbol"?e+"":e,r);import{u as ue,v as de,w as le,x as me,y as te,F as he,b as M,n as pe,m as fe}from"./vue.B2nMKU9x.chunk.min.js";import{o as ge}from"./onFirstIntersect.CG2sRT4b.chunk.min.js";import{b as ye}from"./ProductTile.BtgDe2Do.chunk.min.js";const Pe=[["products",[]],["performed",!1],["products_count",({products:t})=>t.length]];function Te(t){let e;const r=`algolia-client-js-${t.key}`;function s(){return e===void 0&&(e=t.localStorage||window.localStorage),e}function i(){return JSON.parse(s().getItem(r)||"{}")}function d(n){s().setItem(r,JSON.stringify(n))}function u(){return new Promise(n=>setTimeout(n,0))}function o(){const n=t.timeToLive?t.timeToLive*1e3:null,a=i(),c=new Date().getTime();let l=!1;return{namespace:Object.fromEntries(Object.entries(a).filter(([,m])=>!m||m.timestamp===void 0||n&&m.timestamp+n<c?(l=!0,!1):!0)),changed:l}}return{get(n,a,c={miss:()=>Promise.resolve()}){return u().then(()=>{const{namespace:l,changed:h}=o(),m=l[JSON.stringify(n)];return h&&d(l),m?m.value:a().then(f=>c.miss(f).then(()=>f))})},set(n,a){return u().then(()=>{const c=i();return c[JSON.stringify(n)]={timestamp:new Date().getTime(),value:a},s().setItem(r,JSON.stringify(c)),a})},delete(n){return u().then(()=>{const a=i();delete a[JSON.stringify(n)],s().setItem(r,JSON.stringify(a))})},clear(){return Promise.resolve().then(()=>{s().removeItem(r)})}}}function Re(){return{get(t,e,r={miss:()=>Promise.resolve()}){return e().then(i=>Promise.all([i,r.miss(i)])).then(([i])=>i)},set(t,e){return Promise.resolve(e)},delete(t){return Promise.resolve()},clear(){return Promise.resolve()}}}function N(t){const e=[...t.caches],r=e.shift();return r===void 0?Re():{get(s,i,d={miss:()=>Promise.resolve()}){return r.get(s,i,d).catch(()=>N({caches:e}).get(s,i,d))},set(s,i){return r.set(s,i).catch(()=>N({caches:e}).set(s,i))},delete(s){return r.delete(s).catch(()=>N({caches:e}).delete(s))},clear(){return r.clear().catch(()=>N({caches:e}).clear())}}}function U(t={serializable:!0}){let e={};return{get(r,s,i={miss:()=>Promise.resolve()}){const d=JSON.stringify(r);if(d in e)return Promise.resolve(t.serializable?JSON.parse(e[d]):e[d]);const u=s();return u.then(o=>i.miss(o)).then(()=>u)},set(r,s){return e[JSON.stringify(r)]=t.serializable?JSON.stringify(s):s,Promise.resolve(s)},delete(r){return delete e[JSON.stringify(r)],Promise.resolve()},clear(){return e={},Promise.resolve()}}}function _e(t){const e={value:`Algolia for JavaScript (${t})`,add(r){const s=`; ${r.segment}${r.version!==void 0?` (${r.version})`:""}`;return e.value.indexOf(s)===-1&&(e.value=`${e.value}${s}`),e}};return e}function ve(t,e,r="WithinHeaders"){const s={"x-algolia-api-key":e,"x-algolia-application-id":t};return{headers(){return r==="WithinHeaders"?s:{}},queryParameters(){return r==="WithinQueryParameters"?s:{}}}}function Ie({algoliaAgents:t,client:e,version:r}){const s=_e(r).add({segment:e,version:r});return t.forEach(i=>s.add(i)),s}function qe(){return{debug(t,e){return Promise.resolve()},info(t,e){return Promise.resolve()},error(t,e){return Promise.resolve()}}}var be=10*1024*1024;async function*we(t){const e=t.getReader();try{for(;;){const{done:r,value:s}=await e.read();if(r)return;yield s}}finally{e.releaseLock()}}function Se(t){return Symbol.asyncIterator in t?t:we(t)}async function*Ee(t){const e=new TextDecoder("utf-8"),r=[];let s=0,i=!1,d=!0;for await(const o of Se(t)){const n=e.decode(o,{stream:!0});let a=0;for(i&&(i=!1,n.length>0&&n[0]===`
2`&&(a=1));a<n.length;){const c=n.indexOf("\r",a),l=n.indexOf(`
3`,a);if(c===-1&&l===-1){const I=n.slice(a);if(r.push(I),s+=I.length,s>be)throw new Error("SSE line buffer exceeded 10MB");break}let h,m;c!==-1&&(l===-1||c<l)?(h=c,c+1<n.length?m=n[c+1]===`
4`?2:1:(i=!0,m=1)):(h=l,m=1);const f=n.slice(a,h);r.push(f);let T=r.length===1?r[0]:r.join("");r.length=0,s=0,d&&(T.startsWith("\uFEFF")&&(T=T.slice(1)),d=!1),yield T,a=h+m}}const u=e.decode();if(u&&r.push(u),r.length>0){let o=r.join("");d&&o.startsWith("\uFEFF")&&(o=o.slice(1)),yield o}}var xe=class{constructor(){S(this,"data",[]);S(this,"eventType","");S(this,"lastEventId",null);S(this,"retry",null)}decode(t){if(t==="")return this.dispatch();if(t[0]===":")return null;const e=t.indexOf(":");let r,s;
4switch(e===-1?(r=t,s=""):(r=t.slice(0,e),s=t.slice(e+1),s[0]===" "&&(s=s.slice(1))),r){case"data":this.data.push(s);break;case"event":this.eventType=s;break;case"id":s.includes("\0")||(this.lastEventId=s);break;case"retry":/^[0-9]+$/.test(s)&&(this.retry=parseInt(s,10));break}return null}dispatch(){const t=this.eventType;if(this.eventType="",this.data.length===0)return null;const e={data:this.data.join(`
5`),event:t,id:this.lastEventId,retry:this.retry};return this.data=[],e}};async function*Ae(t){const e=new xe;for await(const r of Ee(t)){const s=e.decode(r);s!==null&&(yield s)}}var Ce=750,V=120*1e3;function Q(t,e="up"){const r=Date.now();function s(){return e==="up"||Date.now()-r>V}function i(){return e==="timed out"&&Date.now()-r<=V}return{...t,status:e,lastUpdate:r,isUp:s,isTimedOut:i}}var re=class extends Error{constructor(e,r){super(e);S(this,"name","AlgoliaError");r&&(this.name=r)}},se=class extends re{constructor(e,r,s){super(e,s);S(this,"stackTrace");this.stackTrace=r}},X=class extends se{constructor(t){super("Unreachable hosts - your application id may be incorrect. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support",t,"RetryError")}},F=class extends se{constructor(e,r,s,i="ApiError"){super(e,s,i);S(this,"status");this.status=r}},He=class extends re{constructor(e,r){super(e,"DeserializationError");S(this,"response");this.response=r}},Ne=class extends F{constructor(e,r,s,i){super(e,r,i,"DetailedApiError");S(this,"error");this.error=s}};function We(t){const e=t;for(let r=t.length-1;r>0;r--){const s=Math.floor(Math.random()*(r+1)),i=t[r];e[r]=t[s],e[s]=i}return e}function K(t,e,r){const s=ke(r);let i=`${t.protocol}://${t.url}${t.port?`:${t.port}`:""}/${e.charAt(0)==="/"?e.substring(1):e}`;return s.length&&(i+=`?${s}`),i}function ke(t){return Object.keys(t).filter(e=>t[e]!==void 0).sort().map(e=>`${e}=${encodeURIComponent(Object.prototype.toString.call(t[e])==="[object Array]"?t[e].join(","):t[e]).replace(/\+/g,"%20")}`).join("&")}function Y(t,e){if(t.method==="GET"||t.data===void 0&&e.data===void 0)return;const r=Array.isArray(t.data)?t.data:{...t.data,...e.data};return JSON.stringify(r)}function Z(t,e,r){const s={Accept:"application/json",...t,...e,...r},i={};return Object.keys(s).forEach(d=>{const u=s[d];i[d.toLowerCase()]=u}),i}function oe(t){if(!(t.status===204||t.content.length===0))try{return JSON.parse(t.content)}catch(e){throw new He(e.message,t)}}function Oe(t){return{status:t.status,headers:t.headers,content:t.content,data:oe(t)}}function $e({content:t,status:e},r){try{const s=JSON.parse(t);return"error"in s?new Ne(s.message,e,s.error,r):new F(s.message,e,r)}catch{}return new F(t,e,r)}function De({isTimedOut:t,status:e}){return!t&&~~e===0}function je({isTimedOut:t,status:e}){return t||De({isTimedOut:t,status:e})||~~(e/100)!==2&&~~(e/100)!==4}function Ue({status:t}){return~~(t/100)===2}function Fe(t){return t.map(e=>ne(e))}function ne(t){const e=t.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...t,request:{...t.request,headers:{...t.request.headers,...e}}}}function ze({hosts:t,hostsCache:e,baseHeaders:r,logger:s,baseQueryParameters:i,algoliaAgent:d,timeouts:u,requester:o,requestsCache:n,responsesCache:a,compress:c,compression:l}){async function h(g){const y=await Promise.all(g.map(P=>e.get(P,()=>Promise.resolve(Q(P))))),b=y.filter(P=>P.isUp()),_=y.filter(P=>P.isTimedOut()),w=[...b,..._];return{hosts:w.length>0?w:g,getTimeout(P,E){return(_.length===0&&P===0?1:_.length+3+P)*E}}}async function m(g,y,b){const _=[],w=Y(g,y),R=Z(r,g.headers,y.headers),P=l==="gzip"&&w!==void 0&&w.length>Ce&&(g.method==="POST"||g.method==="PUT");P&&c===void 0&&s.info("Compression is disabled because no compress method is available.");const E=P&&c!==void 0,O=E?await c(w):w;E&&(R["content-encoding"]="gzip");const W=g.method==="GET"?{...g.data,...y.data}:{},x={...i,...g.queryParameters,...W};if(d.value&&(x["x-algolia-agent"]=d.value),y&&y.queryParameters)for(const v of Object.keys(y.queryParameters))!y.queryParameters[v]||Object.prototype.toString.call(y.queryParameters[v])==="[object Object]"?x[v]=y.queryParameters[v]:x[v]=y.queryParameters[v].toString();let C=0;const k=async(v,$)=>{const H=v.pop();if(H===void 0)throw new X(Fe(_));const D={...u,...y.timeouts},G={data:O,headers:R,method:g.method,url:K(H,g.path,x),connectTimeout:$(C,D.connect),responseTimeout:$(C,b?D.read:D.write)},J=j=>{const B={request:G,response:j,host:H,triesLeft:v.length};return _.push(B),B},A=await o.send(G);if(je(A)){const j=J(A);return A.isTimedOut&&C++,s.info("Retryable failure",ne(j)),await e.set(H,Q(H,A.isTimedOut?"timed out":"down")),k(v,$)}if(Ue(A))return A;throw J(A),$e(A,_)},q=t.filter(v=>v.accept==="readWrite"||(b?v.accept==="read":v.accept==="write")),L=await h(q);return k([...L.hosts].reverse(),L.getTimeout)}function f(g,y={}){const b=()=>m(g,y,_).then(P=>oe(P)),_=g.useReadTransporter||g.method==="GET";if((y.cacheable||g.cacheable)!==!0)return b();const R={request:g,requestOptions:y,transporter:{queryParameters:i,headers:r}};return a.get(R,()=>n.get(R,()=>n.set(R,b()).then(P=>Promise.all([n.delete(R),P]),P=>Promise.all([n.delete(R),Promise.reject(P)])).then(([P,E])=>E)),{miss:P=>a.set(R,P)})}function T(g,y={}){const b=g.useReadTransporter||g.method==="GET";return m(g,y,b).then(_=>Oe(_))}async function*I(g,y={}){if(!o.sendStream)throw new Error("This requester does not support streaming");const b=Y(g,y),_=Z(r,g.headers,y.headers);_.accept="text/event-stream";const w=g.method==="GET"?{...g.data,...y.data}:{},R={...i,...g.queryParameters,...w};if(d.value&&(R["x-algolia-agent"]=d.value),y&&y.queryParameters)for(const q of Ob
vendor: 9,841 bytes, line 5
5ject.keys(y.queryParameters))!y.queryParameters[q]||Object.prototype.toString.call(y.queryParameters[q])==="[object Object]"?R[q]=y.queryParameters[q]:R[q]=y.queryParameters[q].toString();const P=g.useReadTransporter||g.method==="GET",E=t.filter(q=>q.accept==="readWrite"||(P?q.accept==="read":q.accept==="write")),W=(await h(E)).hosts[0];if(!W)throw new X([]);const x={...u,...y.timeouts},C={data:b,headers:_,method:g.method,url:K(W,g.path,R),connectTimeout:x.connect,responseTimeout:P?x.read:x.write},k=await o.sendStream(C);yield*Ae(k)}return{hostsCache:e,requester:o,timeouts:u,logger:s,algoliaAgent:d,baseHeaders:r,baseQueryParameters:i,hosts:t,request:f,requestWithHttpInfo:T,requestStream:I,requestsCache:n,responsesCache:a}}function p(t,e,r){if(r==null||typeof r=="string"&&r.length===0)throw new Error(`Parameter \`${t}\` is required when calling \`${e}\`.`)}function Le(t){let e={};for(let r of t.trim().split(/[\r\n]+/)){let s=r.indexOf(": ");s>0&&(e[r.slice(0,s).toLowerCase()]=r.slice(s+2))}return e}function Ge(){function t(e){return new Promise(r=>{let s=new XMLHttpRequest;s.open(e.method,e.url,!0),Object.keys(e.headers).forEach(o=>s.setRequestHeader(o,e.headers[o]));let i=(o,n)=>setTimeout(()=>{s.abort(),r({status:0,content:n,isTimedOut:!0})},o),d=i(e.connectTimeout,"Connection timeout"),u;s.onreadystatechange=()=>{s.readyState>s.OPENED&&u===void 0&&(clearTimeout(d),u=i(e.responseTimeout,"Socket timeout"))},s.onerror=()=>{s.status===0&&(clearTimeout(d),clearTimeout(u),r({content:s.responseText||"Network request failed",status:s.status,isTimedOut:!1}))},s.onload=()=>{clearTimeout(d),clearTimeout(u),r({content:s.responseText,headers:Le(s.getAllResponseHeaders()),status:s.status,isTimedOut:!1})},s.send(e.data)})}return{send:t}}var ae="5.56.0";function Je(t){return[{url:`${t}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${t}.algolia.net`,accept:"write",protocol:"https"}].concat(We([{url:`${t}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${t}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${t}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))}function Be({appId:t,apiKey:e,authMode:r,algoliaAgents:s,...i}){const d=ve(t,e,r),u=ze({hosts:Je(t),...i,algoliaAgent:Ie({algoliaAgents:s,client:"Recommend",version:ae}),baseHeaders:{"content-type":"text/plain",...d.headers(),...i.baseHeaders},baseQueryParameters:{...d.queryParameters(),...i.baseQueryParameters}});return{transporter:u,appId:t,apiKey:e,clearCache(){return Promise.all([u.requestsCache.clear(),u.responsesCache.clear()]).then(()=>{})},get _ua(){return u.algoliaAgent.value},addAlgoliaAgent(o,n){u.algoliaAgent.add({segment:o,version:n})},setClientApiKey({apiKey:o}){!r||r==="WithinHeaders"?u.baseHeaders["x-algolia-api-key"]=o:u.baseQueryParameters["x-algolia-api-key"]=o},batchRecommendRules({indexName:o,model:n,recommendRule:a},c){p("indexName","batchRecommendRules",o),p("model","batchRecommendRules",n);const f={method:"POST",path:"/1/indexes/{indexName}/{model}/recommend/rules/batch".replace("{indexName}",encodeURIComponent(o)).replace("{model}",encodeURIComponent(n)),queryParameters:{},headers:{},data:a||{}};return u.request(f,c)},batchRecommendRulesWithHTTPInfo({indexName:o,model:n,recommendRule:a},c){p("indexName","batchRecommendRulesWithHTTPInfo",o),p("model","batchRecommendRulesWithHTTPInfo",n);const f={method:"POST",path:"/1/indexes/{indexName}/{model}/recommend/rules/batch".replace("{indexName}",encodeURIComponent(o)).replace("{model}",encodeURIComponent(n)),queryParameters:{},headers:{},data:a||{}};return u.requestWithHttpInfo(f,c)},customDelete({path:o,parameters:n},a){p("path","customDelete",o);const m={method:"DELETE",path:"/{path}".replace("{path}",o),queryParameters:n||{},headers:{}};return u.request(m,a)},customDeleteWithHTTPInfo({path:o,parameters:n},a){p("path","customDeleteWithHTTPInfo",o);const m={method:"DELETE",path:"/{path}".replace("{path}",o),queryParameters:n||{},headers:{}};return u.requestWithHttpInfo(m,a)},customGet({path:o,parameters:n},a){p("path","customGet",o);const m={method:"GET",path:"/{path}".replace("{path}",o),queryParameters:n||{},headers:{}};return u.request(m,a)},customGetWithHTTPInfo({path:o,parameters:n},a){p("path","customGetWithHTTPInfo",o);const m={method:"GET",path:"/{path}".replace("{path}",o),queryParameters:n||{},headers:{}};return u.requestWithHttpInfo(m,a)},customPost({path:o,parameters:n,body:a},c){p("path","customPost",o);const f={method:"POST",path:"/{path}".replace("{path}",o),queryParameters:n||{},headers:{},data:a||{}};return u.request(f,c)},customPostWithHTTPInfo({path:o,parameters:n,body:a},c){p("path","customPostWithHTTPInfo",o);const f={method:"POST",path:"/{path}".replace("{path}",o),queryParameters:n||{},headers:{},data:a||{}};return u.requestWithHttpInfo(f,c)},customPut({path:o,parameters:n,body:a},c){p("path","customPut",o);const f={method:"PUT",path:"/{path}".replace("{path}",o),queryParameters:n||{},headers:{},data:a||{}};return u.request(f,c)},customPutWithHTTPInfo({path:o,parameters:n,body:a},c){p("path","customPutWithHTTPInfo",o);const f={method:"PUT",path:"/{path}".replace("{path}",o),queryParameters:n||{},headers:{},data:a||{}};return u.requestWithHttpInfo(f,c)},deleteRecommendRule({indexName:o,model:n,objectID:a},c){p("indexName","deleteRecommendRule",o),p("model","deleteRecommendRule",n),p("objectID","deleteRecommendRule",a);const f={method:"DELETE",path:"/1/indexes/{indexName}/{model}/recommend/rules/{objectID}".replace("{indexName}",encodeURIComponent(o)).replace("{model}",encodeURIComponent(n)).replace("{objectID}",encodeURIComponent(a)),queryParameters:{},headers:{}};return u.request(f,c)},deleteRecommendRuleWithHTTPInfo({indexName:o,model:n,objectID:a},c){p("indexName","deleteRecommendRuleWithHTTPInfo",o),p("model","deleteRecommendRuleWithHTTPInfo",n),p("objectID","deleteRecommendRuleWithHTTPInfo",a);const f={method:"DELETE",path:"/1/indexes/{indexName}/{model}/recommend/rules/{objectID}".replace("{indexName}",encodeURIComponent(o)).replace("{model}",encodeURIComponent(n)).replace("{objectID}",encodeURIComponent(a)),queryParameters:{},headers:{}};return u.requestWithHttpInfo(f,c)},getRecommendRule({indexName:o,model:n,objectID:a},c){p("indexName","getRecommendRule",o),p("model","getRecommendRule",n),p("objectID","getRecommendRule",a);const f={method:"GET",path:"/1/indexes/{indexName}/{model}/recommend/rules/{objectID}".replace("{indexName}",encodeURIComponent(o)).replace("{model}",encodeURIComponent(n)).replace("{objectID}",encodeURIComponent(a)),queryParameters:{},headers:{}};return u.request(f,c)},getRecommendRuleWithHTTPInfo({indexName:o,model:n,objectID:a},c){p("indexName","getRecommendRuleWithHTTPInfo",o),p("model","getRecommendRuleWithHTTPInfo",n),p("objectID","getRecommendRuleWithHTTPInfo",a);const f={method:"GET",path:"/1/indexes/{indexName}/{model}/recommend/rules/{objectID}".replace("{indexName}",encodeURIComponent(o)).replace("{model}",encodeURIComponent(n)).replace("{objectID}",encodeURIComponent(a)),queryParameters:{},headers:{}};return u.requestWithHttpInfo(f,c)},getRecommendStatus({indexName:o,model:n,taskID:a},c){p("indexName","getRecommendStatus",o),p("model","getRecommendStatus",n),p("taskID","getRecommendStatus",a);const f={method:"GET",path:"/1/indexes/{indexName}/{model}/task/{taskID}".replace("{indexName}",encodeURIComponent(o)).replace("{model}",encodeURIComponent(n)).replace("{taskID}",encodeURIComponent(a)),queryParameters:{},headers:{}};return u.request(f,c)},getRecommendStatusWithHTTPInfo({indexName:o,model:n,taskID:a},c){p("indexName","getRecommendStatusWithHTTPInfo",o),p("model","getRecommendStatusWithHTTPInfo",n),p("taskID","getRecommendStatusWithHTTPInfo",a);const f={method:"GET",path:"/1/indexes/{indexName}/{model}/task/{taskID}".replace("{indexName}",encodeURIComponent(o)).replace("{model}",encodeURIComponent(n)).replace("{taskID}",encodeURIComponent(a)),queryParameters:{},headers:{}};return u.requestWithHttpInfo(f,c)},getRecommendations(o,n){o&&Array.isArray(o)&&(o={requests:o}),p("getRecommendationsParams","getRecommendations",o),p("getRecommendationsParams.requests","getRecommendations",o.requests);const h={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:o,useReadTransporter:!0,cacheable:!0};return u.request(h,n)},getRecommendationsWithHTTPInfo(o,n){o&&Array.isArray(o)&&(o={requests:o}),p("getRecommendationsParams","getRecommendationsWithHTTPInfo",o),p("getRecommendationsParams.requests","getRecommendationsWithHTTPInfo",o.requests);const h={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:o,useReadTransporter:!0,cacheable:!0};return u.requestWithHttpInfo(h,n)},searchRecommendRules({indexName:o,model:n,searchRecommendRulesParams:a},c){p("indexName","searchRecommendRules",o),p("model","searchRecommendRules",n);const f={method:"POST",path:"/1/indexes/{indexName}/{model}/recommend/rules/search".replace("{indexName}",encodeURIComponent(o)).replace("{model}",encodeURIComponent(n)),queryParameters:{},headers:{},data:a||{},useReadTransporter:!0,cacheable:!0};return u.request(f,c)},searchRecommendRulesWithHTTPInfo({indexName:o,model:n,searchRecommendRulesParams:a},c){p("indexName","searchRecommendRulesWithHTTPInfo",o),p("model","searchRecommendRulesWithHTTPInfo",n);const f={method:"POST",path:"/1/indexes/{indexName}/{model}/recommend/rules/search".replace("{indexName}",encodeURIComponent(o)).replace("{model}",encodeURIComponent(n)),queryParameters:{},headers:{},data:a||{},useReadTransporter:!0,cacheable:!0};return u.requestWithHttpInfo(f,c)}}}function Me(t,e,r){if(!t||typeof t!="string")throw new Error("`appId` is missing.");if(!e||typeof e!="string")throw new Error("`apiKey` is missing.");const{compression:s,...i}={};return Be({appId:t,apiKey:e,timeouts:{connect:1e3,read:2e3,write:3e4}
5,logger:qe(),requester:Ge(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:U(),requestsCache:U({serializable:!1}),hostsCache:N({caches:[Te({key:`${ae}-${t}`}),U()]}),...i})}const{config:Ve={}}=window.algoliaShopify||{},{shop:{domain:ee}}=window.theme;let z="shopify_";ee==="gianttigercanada-dev.myshopify.com"?z="dev_shopify_":ee==="gt-new-checkout.myshopify.com"&&(z="checkout_shopify_");const{app_id:Qe,search_api_key:Xe}=Ve,Ke=Me(Qe,Xe),Ye=t=>{const{objectID:e,limit:r,type:s,store:i,threshold:d,facetName:u,facetValue:o,availability:n,price:a}=t;let c=[],l=`named_tags.shippable:true OR named_tags.mms_province_code:${i.province}`;s==="bought-together"&&n?(n!=null&&n.online&&c.push("meta.info.store_inventory.online >= 1"),n!=null&&n.bopis&&c.push(`meta.info.store_inventory.${i.location_id} >= 1`)):s==="trending-items"&&n?(n!=null&&n.online&&c.push("meta.info.store_inventory.online >= 1"),l="named_tags.shippable:true"):c=[["meta.info.store_inventory.online >= 1",`meta.info.store_inventory.${i.location_id} >= 1`]];const h={indexName:`${z}products`,maxRecommendations:r,threshold:d,model:s,queryParameters:{distinct:!0,filters:l,numericFilters:a?[c,a]:c}};return s!=="trending-items"?h.objectID=e:(h.facetName=u,h.facetValue=o),Ke.getRecommendations({requests:[h]})},{shop:{locale:Ze}}=window.theme,et=t=>{let e={};switch(Ze){case"fr":{const{body_html_safe:r,meta:{french:{description:s,title:i,variant_title:d,unit_of_measure:u}={}}={},variant_title:o,title:n}=t;e={body_html_safe:s||r,title:i||n,variant_title:d||o,unit_of_measure:u};break}}return{...t,...e}},tt=t=>{const{body_safe_html:e,collections:r=[],collection_ids:s=[],meta:{info:i={},avalara:d={}},named_tags:u={},option_names:o,product_image:n,product_type:a,tags:c,...l}=t,h=r.map((T,I)=>({id:s[I],handle:T})),m=n?[te.create({src:n})]:[];Object.entries(u).forEach(([T,I])=>{c.push(...Array.isArray(I)?I.map(g=>`${T}:${g}`):[`${T}:${I}`])});const f=i.colour_swatches?JSON.parse(i.colour_swatches):{};return{...l,collections:h,compare_at_price:void 0,description:e,images:m,media:m,options:o.map((T,I)=>({name:T,position:I+1,values:[],colour_swatches:f,type:T.toLowerCase()==="colour"||T.toLowerCase()==="couleur"?"colour":T.toLowerCase()})),price:void 0,published_date:i.published_at,tags:c,tax_code:d.taxcode||"",type:a,variants:[]}},rt=t=>{const{compare_at_price:e,id:r,image:s,objectID:i,price:d,variant_title:u,meta:{info:o={}},...n}=t;return{...n,amount_per_unit:o.amount_per_unit||"",compare_at_price:Math.round(e*100),display_amount_per_unit:o.display_amount_per_unit===!0||o.display_amount_per_unit==="true",featured_image:s?te.create({src:s}):null,id:Number(i),options:void 0,pack_size:o.pack_size?parseInt(o.pack_size,10):1,price:Math.round(d*100),product_id:r,inventory:o.store_inventory||{},has_regional_pricing:o.regional_pricing===!0||o.regional_pricing==="true",regional_pricing:o.regional_prices||{},title:u}},st=t=>{const e=me(t.map(({id:s})=>s)),r={};return t.map(et).forEach(s=>{const{id:i,options:d,option_names:u,named_tags:o,tags:n}=s;i in r||(r[i]=tt(s)),r[i].variants.push(rt(s)),Object.entries(o).forEach(([a,c])=>{Array.isArray(c)?c.forEach(l=>n.push(`${a}:${l}`)):n.push(`${a}:${c}`)}),u.forEach((a,c)=>{r[i].options[c].values.indexOf(d[a])===-1&&r[i].options[c].values.push(d[a])})}),e.map(s=>r[s])},ot=t=>t.map(e=>ue.create({...e,variants:e.variants.map(r=>de.create(le(r)))})),nt=async({productId:t,limit:e,facetName:r,facetValue:s,store:i,threshold:d,type:u,availability:o,price:n,isBoughtTogether:a})=>{const c={objectID:t,facetName:r,facetValue:s,limit:e,store:i,threshold:d,type:u,availability:o,price:n},{results:[{hits:l}]=[{hits:[]}]}=await Ye(c);return{products:ot(st(l)),performed:!0}},{routes:{productRecommendationsUrl:gt}}=window.theme,at=new he(Pe,[nt]),it={props:{variantId:{type:Number},limit:{type:Number,default:12},model:{type:String,required:!0},listId:{type:String,required:!0},isBoughtTogether:{type:Boolean,default:!1},title:{type:String,default:""},recOverrides:{type:[Object,null],default:null},lineItems:{type:Array,default:null},threshold:{type:Number,default:0},isFreeShipping:{type:Boolean,default:!1}
5,remainingAmount:{type:Number,default:0},itemCount:{type:Number,default:0},isQuickAdd:{type:Boolean,default:!1}},provide(){return{isQuickAdd:this.isQuickAdd}},data(){return{customer:M.getCustomer(),currentStore:M.fetchCurrentStore(),loaded:!1,products:[],sliderOptions:{spaceBetween:16,navigation:!0,breakpoints:{250:{slidesPerView:1.75,slidesPerGroup:1},600:{slidesPerView:this.isBoughtTogether?2.5:2.75,slidesPerGroup:2},900:{slidesPerView:this.isBoughtTogether?2.15:2.75,slidesPerGroup:2},1200:{slidesPerView:3.75,...this.isBoughtTogether&&{slidesPerView:3},...this.isFreeShipping&&{slidesPerView:2.5},slidesPerGroup:this.isFreeShipping?2:3,spaceBetween:24}},pagination:{type:"bar",position:"below",color:"#eeeeee"}},recOptions:{}}},watch:{"currentStore.store_id":{handler:"updateRecommendations"}},created(){this.recOverrides?this.recOptions=this.recOverrides:this.recOptions={productId:this.variantId?`${this.variantId}`:"",type:this.model,limit:Math.min(this.limit,12),threshold:this.threshold},this.recOptions.store=this.currentStore},computed:{recommendationsTitle(){if(this.title)return this.title;if(this.lineItems)return this.$t("products.recommendations.cart_products");switch(this.model){case"related-products":return this.$t("products.recommendations.related_products");case"bought-together":return this.$t("products.recommendations.bought_together");default:return this.$t("products.recommendations.trending_products_hp")}},filteredProducts(){return this.lineItems&&this.products?this.products.filter((t,e,r)=>r&&t?e===r.findIndex(s=>(s==null?void 0:s.id)===t.id):null):this.isFreeShipping?this.products.sort((t,e)=>t.price-e.price):this.products}},methods:{async loadRecommendations(t){t&&(this.recOptions.productId=`${t}`),this.variantAvailability&&(this.recOptions.availability=this.variantAvailability),this.isFreeShipping&&(this.recOptions.price=`price < ${this.remainingAmount+10}`,this.recOptions.availability={online:!0});const{performed:e,products:r}=await at.load({},this.recOptions);this.loaded=e,this.lineItems?(this.lineItems.forEach(s=>{const i=r.find(d=>s.product_id===d.id);i&&r.splice(r.indexOf(i),1)}),this.products=this.products.concat(r)):this.products.length?this.products=this.products.concat(r):this.products=r,this.isBoughtTogether&&(this.products.unshift(this.product),this.itemsToAdd=this.products)},updateRecommendations(t,e){t!==e&&(this.products=[],this.lineItems?this.lineItems.forEach(({variant_id:r})=>{this.loadRecommendations(r)}):this.useAkeneo?this.loadAkeneoProducts():this.loadRecommendations(this.variantId))}}},ct={components:{Carousel:fe,ProductTile:ye},mixins:[it],watch:{itemCount:{handler(t,e){setTimeout(()=>{this.updateRecommendations(t,e)},500)}}},mounted(){ge(this.$el,this.intersectionOptions).then(()=>{this.lineItems?this.lineItems.forEach(({variant_id:t})=>{this.loadRecommendations(t)}):this.loadRecommendations()})}};var ut=function(){var e=this,r=e._self._c;return r("div",{staticClass:"recommendations"},[e.filteredProducts&&e.filteredProducts.length?r("div",{staticClass:"recommendations__wrapper",class:{section:!e.isFreeShipping}},[r("h2",{staticClass:"recommendations__title heading-lg",domProps:{innerHTML:e._s(e.recommendationsTitle)}}),e._v(" "),r("div",{staticClass:"carousel--products"},[r("analytics-decorator",{scopedSlots:e._u([{key:"default",fn:function({trackLink:s,track:i}){return[e.filteredProducts.length>1?r("carousel",{attrs:{"slide-count":e.filteredProducts.length,"slider-id":"recommendations","slider-options":e.sliderOptions,"skip-aria-link":e.$t("accessibility.carousel.skip_carousel_recommendations")}},[r("template",{slot:"carousel-slides"},e._l(e.filteredProducts,function(d,u){return r("product-tile",{key:`${d.id}-${u}`,staticClass:"swiper-slide",attrs:{product:d,"algolia-list-id":e.listId,count:u,"is-bought-together":e.model==="bought-together","is-free-shipping":e.isFreeShipping,"selected-variant":d.selected_or_first_available_variant},on:{"quick-added":function(o){return i("Product Added",o)},"product-clicked":function(o){return s("Product Clicked",o)}}})}),1)],2):r("product-tile",{key:e.filteredProducts[0].id,staticClass:"swiper-slide",attrs:{product:e.filteredProducts[0],"algolia-list-id":e.listId,count:0,"is-bought-together":e.model==="bought-together","selected-variant":e.filteredProducts[0].selected_or_first_available_variant},on:{"quick-added":function(d){return i("Product Added",d)},"product-clicked":function(d){return s("Product Clicked",d)}}})]}}],null,!1,1345865003)}
5)],1)]):e._e()])},dt=[],lt=pe(ct,ut,dt,!1,null,"ad3aaee5");const yt=lt.exports;export{yt as A,it as R};

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.