1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[589],{1101:(e,t,n)=>{let r,o;n.d(t,{Op:()=>N,JZ:()=>O,nz:()=>T});var a=n(64486),i=n.n(a),s=n(76985),c=n(91007),l=n(67186),u=n(2998),d=n(25992),f=n(33863),p=n(73350),y=n(35222),m=n(78051),h=n(63790);async function g(e,t){let n,r=`${e}:${t}`,o=new TextEncoder().encode(r);return n=window.crypto,Array.from(new Uint8Array(await n.subtle.digest("SHA-256",o))).map(e=>e.toString(16).padStart(2,"0")).join("").slice(0,32)}var _=n(10190),v=n(78109),w=n(37811);let S=[],k=null;function b(){if(0===S.length)return;let e=[...S];S=[],k&&(clearTimeout(k),k=null),(0,v.U)({path:_.eXJ,body:{metrics:e},method:"POST"})}var A=function(e){return e.GraphQL="graphql",e.IntegrationMetrics="integration_metrics",e.JourneyRunMetrics="journey_run_metrics",e.LegacyPrometheus="legacy_prometheus",e.BigQuery="bigquery",e.UserActivityLog="user_activity_log",e.LambdaInvocations="lambda_invocations",e.LoyaltyReward="loyalty_reward",e.BillingMetrics="billing_metrics",e.ABTestExposure="ABTestExposure",e.McpUsageEvents="mcp_usage_events",e.JarvisUsageEvents="jarvis_usage_events",e.AnalyticsPipelineMetrics="analytics_pipeline_metrics",e.ComponentAnalyticsEvents="component_analytics_events",e.SmartCarouselABEvents="smart_carousel_ab_events",e}({}),C=n(91476),E=n(37811);function T({hasuraUrl:e,cognitoUserPoolId:t}){r=e,o=t}async function I(){try{return(await C.N.currentSession()).getIdToken().getJwtToken()}catch{return}}async function O(){try{let e=(await C.N.currentSession()).getIdToken().decodePayload();return e["custom:storefrontUserId"]||e.sub}catch{return}}let R=new s.c(e=>(function(e){let t=e.definitions.find(e=>"OperationDefinition"===e.kind);if(!t||!t.name?.value)return e;let n=t.name.value;return t.selectionSet&&t.selectionSet.selections&&t.selectionSet.selections.forEach(e=>{"Field"===e.kind&&function(e,t){if("Field"===t.kind){if(!t.selectionSet||t.selectionSet.selections.find(t=>"Field"===t.kind&&t.alias?.value===`_${e}`))return;let n={kind:h.b.FIELD,name:{kind:h.b.NAME,value:"__typename"},alias:{kind:h.b.NAME,value:`_${e}`},arguments:[],directives:[]};t.selectionSet.selections=[n,...t.selectionSet.selections]}}(n,e)}),e})(e));function N(e){let t=(0,c.$)({uri:r??"https://graphql.skio.com/v1/graphql"}),n=(0,p.o)(async(t,{headers:n})=>{let a=await I();if(a){let t=o??"us-west-2_ky2hNEMAZ";if(!t)throw Error("Cognito user pool id missing");let i={userpoolid:t,region:"us-west-2",authorization:`Bearer ${a}`},s=Math.floor(Date.now()/6e4),c=r??"https://graphql.skio.com/v1/graphql";return{headers:{...e?.useReadReplica&&{"X-Hasura-Read-Replica":"true"},...n,...i,"X-Hasura-From-Skio":"true",...c?.includes("localhost")&&{"X-Hasura-Admin-Secret":"myadminsecretkey"},...e?.dashboard&&{"X-Hasura-Permission-Token":await g(s,t),"X-Hasura-Timestamp":s,"X-Hasura-Site-Id":t}}}}return{headers:{...n,qaV3StackId:e?.qaV3StackId}}}),a=e?.shopifyStorefront!=null&&null!=e.shopifyStorefront.storefrontAccessToken,s=new l.C((e,t)=>e.getContext().useStorefront&&!a?null:t(e)),h=a?(0,c.$)({uri:`https://${e.shopifyStorefront.domain}/api/2024-07/graphql.json`}):null,_=a?(0,p.o)(async(t,{headers:n})=>({headers:{"X-Shopify-Storefront-Access-Token":e?.shopifyStorefront?.storefrontAccessToken,...n}})):null,v=e=>a&&_&&h?l.C.split(e=>e.getContext().useStorefront,(0,u.H)([_,h]),e):e;if(E.env.NEXT_PUBLIC_HASURA_ACTION_URL){let r=(0,c.$)({uri:E.env.NEXT_PUBLIC_HASURA_ACTION_URL}),o=(0,p.o)(async(e,{headers:t})=>({headers:{...t,"X-Hasura-Admin-Secret":"myadminsecretkey"}})),a=e?.link?l.C.from([e.link,s,r]):r,i=e?.link?l.C.from([e.link,s,t]):t,u=l.C.split(e=>!0===e.getContext().isAction,o.concat(a),n.concat(i));return new d.R({link:v(u),cache:new f.D,documentTransform:R})}let C=new y.z({delay:{initial:50},attempts:{max:3}}),T=new l.C((e,t)=>(e.setContext({start:performance.now()}),t(e))),O=new l.C((t,n)=>n(t).map(n=>{let r=performance.now()-t.getContext().start;return(({table:e,metric:t})=>{if(!w.env.JEST_WORKER_ID){if(S.push({table:e,metric:t}),S.length>=50)return b();k||(k=setTimeout(b,5e3))}})({table:A.GraphQL,metric:{operationName:t.operationName,functionName:e?.dashboard?"_dashboard":"_storefront",duration:Math.round(r),responseSize:n.data?JSON.stringify(n.data).length:0,success:!n.errors,siteId:i().get(m.Cn)}}),n})),N=T.concat(O),P=(0,u.H)([n,C,N,...e?.link?[e.link]:[],t]);
1return new d.R({link:a?v(P):(0,u.H)([s,P]),cache:new f.D,documentTransform:R})}},26348:(e,t,n)=>{n.d(t,{R:()=>r});function r(e){return!!e&&"true"===new URLSearchParams(e).get("customerPortalPreview")}},30589:(e,t,n)=>{n.d(t,{c:()=>s,_:()=>c});var r=n(1101),o=n(3555),a=n(26348),i=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let s="storefrontUserId";function c(e){var t,n;let c=(0,o.useQuery)(Object.assign({queryKey:[s],queryFn:(t=()=>{var e,t,n,o;return e=this,t=void 0,n=void 0,o=function*(){try{let e=yield(0,r.JZ)();return null!=e?e:null}catch(e){throw e}},new(n||(n=Promise))(function(r,a){function i(e){try{c(o.next(e))}catch(e){a(e)}}function s(e){try{c(o.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?r(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(i,s)}c((o=o.apply(e,t||[])).next())})},n=()=>Promise.resolve("2bc92fc0-8221-49f2-8da3-f277def86c4c"),()=>(0,a.R)(location.search)?n():t())},e)),{data:l}=c;return Object.assign({storefrontUserId:l},i(c,["data"]))}}}]);
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.