1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1658,2971],{54353:(e,t,r)=>{r.d(t,{u:()=>n});let n=["https://dashboard.skio.com","https://dashboard-dev.skio.com"]},69277:(e,t,r)=>{r.r(t),r.d(t,{PreviewRuntime:()=>ed});var n=r(77571),i=r(56149),a=r(24163),l=r(338),o=r(3434),u=r(80237),s=r(10190),d=r(78109),c=r(54353),f=r(69668);let p={ok:!0,siteId:"demo-site-12345678-1234-1234-1234-123456789abc",balance:500,creditValue:50,creditValueToRender:"$50.00",currencyCodeToRender:"USD",storeCurrencyCode:"USD",storeCurrencySymbol:"$",creditName:"credits",memberSince:"2024-01-15T10:30:00Z",lastOrderCreatedAt:"2024-06-15T10:30:00Z",shouldRenderCreditBalance:!0,rewardCreditHistories:[],siteToCustomerCurrencyRate:1},y={nextTier:"Gold",currentStats:{totalSpent:250,totalOrders:5,totalStreaks:3,totalProductsInOrders:12},eligibility:{operator:"AND",conditions:[{name:"LTV",value:{comparision:"gte",amount:500}},{name:"ORDER_COUNT",value:{comparision:"gte",count:5}}]}},v="DEMO-REF-ABC123",h={referralCode:v,maxReferralsReached:!1,friendJoinedStats:[{email:"[email protected]",joinedAt:"2024-05-01T10:30:00Z"}]},m={creditsPerCurrencySpent:10,creditSettings:{creditsName:"points",showBalanceInCredits:!0,siteCurrencyToCreditRate:10},siteCurrencyCode:"USD"};class g{constructor(){this.ready=!1,this.settled=!1,this.readyPromise=new Promise((e,t)=>{this.resolveReady=e,this.rejectReady=t}),this.readyPromise.catch(()=>void 0)}getData(){return this.data}getSite(){var e;return null==(e=this.data)?void 0:e.Site}isReady(){return this.ready}whenReady(){return this.readyPromise}injectFixture(e){var t;this.settled||(this.data=e,this.pendingSitedataUpdate&&this.applySitedataUpdate(this.pendingSitedataUpdate),this.pendingCancelFlowUpdate&&this.applyCancelFlowUpdate(this.pendingCancelFlowUpdate),this.pendingSitedataUpdate=void 0,this.pendingCancelFlowUpdate=void 0,this.ready=!0,this.settled=!0,null==(t=this.resolveReady)||t.call(this),this.resolveReady=void 0,this.rejectReady=void 0)}failFixture(e){var t;this.settled||(this.settled=!0,null==(t=this.rejectReady)||t.call(this,e),this.resolveReady=void 0,this.rejectReady=void 0)}applyHostMessage(e){if(e.type===u.T0.sitedataUpdate){if(!this.data){this.pendingSitedataUpdate=e;return}this.applySitedataUpdate(e);return}if(e.type===u.T0.cancelFlowUpdate){if(!this.data){this.pendingCancelFlowUpdate=e;return}this.applyCancelFlowUpdate(e)}}applySitedataUpdate(e){this.data&&(this.data.Site=Object.assign(Object.assign({},this.data.Site),{settings:e.settings,cpv3Settings:e.cpv3Settings}),e.customerPortalExtensions&&(this.data.CustomerPortalExtension=Object.fromEntries(e.customerPortalExtensions.map(e=>[e.id,{...e,__typename:"CustomerPortalExtension"}]))))}applyCancelFlowUpdate(e){this.data&&(this.data.cancelFlowPreviewPayload=e.payload,e.giftProducts&&(this.data.cancelFlowPreviewProducts=Object.assign(Object.assign({},this.data.cancelFlowPreviewProducts),e.giftProducts)))}}class S{constructor(){this.warned=new Set}warnOnce(e,t){}warnMissingFixture({operationName:e,path:t,detail:r}){this.warnOnce(`missing:${e}:${t}`,`"${e}" resolved ${t} from no fixture data${r?` (${r})`:""}. Preview shows a schema-correct null/empty here.`)}warnSimulatedMutation(e){this.warnOnce(`mutation:${e}`,`"${e}" was simulated in-memory only; nothing was written to Hasura.`)}warnUnhandledGateway(e){let t=`gateway:${e}`;this.warned.has(t)||this.warned.add(t)}}var w=r(98272),b=r(40787),P=r(92437),T=r(33321),C=r(589),_=r.n(C);function O(e){return null!=e?e:{}}function A(e){var t,r;let n=O(e.input),i=O(e.pk_columns),a=null!=(r=null!=(t=n.subscriptionId)?t:n.id)?r:i.id;return null==a?null:String(a)}function R(e,t){let r=O(e.Subscription);if(t&&r[t])return r[t];let n=Object.values(r).at(0);return null!=n?n:null}var E=r(39605),D=r.n(E);function x(e,t){var r;if(null==t||"object"!=typeof t)return!0;let n=O(e);for(let[i,a]of Object.entries(O(t))){if("_and"===i){if(!(Array.isArray(a)?a:[a]).every(t=>x(e,t)))return!1;continue}if("_or"===i){let t=Array.isArray(a)?a:[a];if(t.length>0&&!t.some(t=>x(e,t)))return!1;continue}if("_not"===i){if(x(e,a))return!1;continue}if(null==a||"object"!=typeof a||!(i in n))continue;let t=null!=(r=n[i])?r:null,l=O(a);if(!Object.keys(l).some(e=>e.startsWith("_"))){if(Array.isArray(t)){if(!t.some(e=>x(e,a)))return!1}else if(null!==t&&"object"==typeof t&&!x(t,a))return!1;continue}if(!function(e,t){for(let[r,n]of Object.entries(t))switch(r){case"_eq":if(!D()(e,n))return!1;break;
1case"_neq":if(D()(e,n))return!1;break;case"_in":if(!Array.isArray(n)||!n.some(t=>D()(t,e)))return!1;break;case"_nin":if(Array.isArray(n)&&n.some(t=>D()(t,e)))return!1;break;case"_is_null":if(null===e!=!!n)return!1;break;case"_like":case"_ilike":if("string"!=typeof e||"string"!=typeof n||!RegExp(`^${n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/%/g,".*").replace(/_/g,".")}$`,"_ilike"===r?"i":"").test(e))return!1;break;case"_gt":case"_gte":case"_lt":case"_lte":{let t=function(e,t){if("string"==typeof e&&"string"==typeof t)return e<t?-1:+(e>t);let r=Number(e),n=Number(t);return Number.isNaN(r)||Number.isNaN(n)?null:r<n?-1:+(r>n)}(e,n);if(null===t)break;if("_gt"===r&&!(t>0)||"_gte"===r&&!(t>=0)||"_lt"===r&&!(t<0)||"_lte"===r&&!(t<=0))return!1}}return!0}(t,l))return!1}return!0}function L(e,t){let r="number"==typeof t.offset?t.offset:0,n="number"==typeof t.limit?t.limit:void 0;return void 0===n?e.slice(r):e.slice(r,r+n)}let I="2024-01-15T10:30:00Z";function U(e){return e?Object.values(e):[]}function k(e){var t;return null!=(t=U(e).at(0))?t:null}function j(e){var t,r;return null!=(r=null==(t=e.operation.name)?void 0:t.value)?r:"query"}function F(e,t){var r;for(let n of U(e.Product)){let e=(null!=(r=O(n).ProductVariants)?r:[]).find(e=>(null==e?void 0:e.id)===t);if(e)return{variant:e,product:O(n)}}return{variant:null,product:null}}function N(e){for(let t of U(e.Product)){let e=O(t).ProductVariants,r=null==e?void 0:e.at(0);if(r)return r}return null}function M(e,t){return L(U(e.Product).filter(e=>x(e,t.where)),t)}function B(e,t,r){var n;if(!e||null==r)return null;let i=e[t];return null!=(n=null==i?void 0:i[String(r)])?n:null}let V={uuid:()=>"00000000-0000-0000-0000-000000000000",timestamptz:()=>I,timestamp:()=>I,date:()=>"2024-01-15",jsonb:()=>({}),numeric:()=>0,bigint:()=>0,String:()=>"",Int:()=>0,Float:()=>0,Boolean:()=>!1};var q=function(e,t,r,n){return new(r||(r=Promise))(function(i,a){function l(e){try{u(n.next(e))}catch(e){a(e)}}function o(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(l,o)}u((n=n.apply(e,t||[])).next())})};function $(e,t){if(null===e||"object"!=typeof e||Array.isArray(e))return e;let r=Object.assign({},e);for(let e of t)e in r||(r[e]=null);return r}var G=r(67186),Q=r(51058),W=r(46919),z=r(82971);function Y(e){if((e[0]??"").includes("en"))return{machineTranslations:z.TRANSLATED_COPIES[W.VJ],locale:e[0]};for(let t of e)if(z.TRANSLATED_COPIES[t])return{machineTranslations:z.TRANSLATED_COPIES[t],locale:t};return e.includes("en")?{machineTranslations:z.TRANSLATED_COPIES[W.VJ],locale:"en"}:{machineTranslations:{},locale:null}}var H=r(2888),K=function(e,t,r,n){return new(r||(r=Promise))(function(i,a){function l(e){try{u(n.next(e))}catch(e){a(e)}}function o(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(l,o)}u((n=n.apply(e,t||[])).next())})};let X=/\/(?:storefront|storefront-v2|dashboard-v2)-(?:http|rest)\//;function J(e){return new URL(e,"https://preview.skio.com").pathname}function Z(e,t=200){return new Response(JSON.stringify(e),{status:t,headers:{"Content-Type":"application/json"}})}var ee=r(63500),et=r.n(ee),er=r(90109),en=r(14323);let ei="cancelFlowData";var ea=r(6844);function el(e){return e?.aborted?Promise.resolve():new Promise(t=>{let r=setTimeout(t,500);e?.addEventListener("abort",()=>{clearTimeout(r),t()},{once:!0})})}async function eo({request:e,attempts:t=3,wait:r=el,signal:n}){let i;for(let a=1;a<=t;a+=1){let l;if(n?.aborted)throw i??new DOMException("The operation was aborted","AbortError");try{l=await e()}catch(e){if(i=e instanceof Error?e:Error("Preview fixture request failed"),n?.aborted)throw i;if(a<t){await r(n);continue}throw i}if(l&&!(l instanceof Response)&&l.mockData)return l.mockData;throw Error("Preview fixture request returned no mockData")}throw i??Error("Preview fixture request failed")}function eu(){let e=new g,t=new S,n=(0,u.nV)({allowedOrigins:c.u,capabilities:[o.uF]}),i=function(e){let t=null;function n(){return q(this,void 0,void 0,function*(){return t||(t=function(e){return q(this,arguments,void 0,function*({getStore:e,w
1arnings:t=new S}){let n=yield function(){var e,t,n,i;return e=this,t=void 0,n=void 0,i=function*(){let{PREVIEW_SCHEMA_SDL:e}=yield r.e(4653).then(r.bind(r,54653));return e},new(n||(n=Promise))(function(r,a){function l(e){try{u(i.next(e))}catch(e){a(e)}}function o(e){try{u(i.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?r(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(l,o)}u((i=i.apply(e,t||[])).next())})}(),i=(0,w.I)(n),a=function({schema:e,resolvers:t}){var r;let n={};for(let[i,a]of Object.entries(t)){let t=e.getType(i);if(!(0,P.YQ)(t)){n[i]=a;continue}let l=t.getFields();for(let[e,t]of(n[i]={},Object.entries(a))){let a=(0,P.MR)(null==(r=l[e])?void 0:r.type);if(!(0,P.YQ)(a)){n[i][e]=t;continue}let o=Object.entries(a.getFields()).filter(([,e])=>!(0,P.bd)(e.type)&&(0,P.zf)((0,P.MR)(e.type))).map(([e])=>e);n[i][e]=(e,r,n,i)=>{let a=t(e,r,n,i);return Array.isArray(a)?a.map(e=>$(e,o)):$(a,o)}}}return n}({schema:i,resolvers:function({schema:e,resolvers:t}){let r={};for(let[n,i]of Object.entries(t)){let t=e.getType(n);if(!(0,P.YQ)(t))continue;let a=t.getFields(),l={};for(let[e,t]of Object.entries(i))e in a&&(l[e]=t);Object.keys(l).length>0&&(r[n]=l)}return r}({schema:i,resolvers:Object.assign(Object.assign({},function({getStore:e,warnings:t}){function r(r,n,i,a){let l=e();return l?i(l):(t.warnMissingFixture({operationName:j(r),path:n,detail:"no preview store yet"}),a)}function n(r,n,i){let a=e();if(!a)return t.warnMissingFixture({operationName:j(r),path:n,detail:"no preview store yet"}),null;let l=i(a);return null==l&&t.warnMissingFixture({operationName:j(r),path:n}),null!=l?l:null}return{query_root:{SubscriptionByPk:(e,t,n,i)=>r(i,"SubscriptionByPk",e=>{var r;return null!=(r=O(e.Subscription)[String(t.id)])?r:null},null),Subscriptions:(e,t,n,i)=>r(i,"Subscriptions",e=>U(e.Subscription),[]),StorefrontUserByPk:(e,t,n,i)=>r(i,"StorefrontUserByPk",e=>{var r;return null!=(r=O(e.StorefrontUser)[String(t.id)])?r:k(e.StorefrontUser)},null),StorefrontUsers:(e,t,n,i)=>r(i,"StorefrontUsers",e=>U(e.StorefrontUser),[]),CustomerPortalExtensions:(e,t,n,i)=>r(i,"CustomerPortalExtensions",e=>L(U(e.CustomerPortalExtension).filter(e=>x(e,t.where)),t),[]),SiteByPk:(e,t,n,i)=>r(i,"SiteByPk",e=>{var t;return null!=(t=e.Site)?t:null},null),Sites:(e,t,n,i)=>r(i,"Sites",e=>e.Site?[e.Site]:[],[]),Orders:(e,t,n,i)=>r(i,"Orders",e=>{let r=O(t.where);return r.OrderDiscountApplications||r.OrderLineItems?[]:e.Order?[e.Order]:[]},[]),ReferralConfigurations:(e,t,n,i)=>r(i,"ReferralConfigurations",e=>e.ReferralConfiguration?[e.ReferralConfiguration]:[],[]),ProductVariantsCreditRedemptionConfigs:(e,t,n,i)=>r(i,"ProductVariantsCreditRedemptionConfigs",e=>{var t;return null!=(t=e.ProductVariantsCreditRedemptionConfigs)?t:[]},[]),TierLevel:(e,t,n,i)=>r(i,"TierLevel",e=>{var t;return(null!=(t=e.TierGroups)?t:[]).flatMap(e=>e.TierLevels)},[]),Products:(e,t,n,i)=>r(i,"Products",e=>M(e,t),[]),ProductByPk:(e,t,n,i)=>r(i,"ProductByPk",e=>{var r;return null!=(r=O(e.Product)[String(t.id)])?r:null},null),ProductVariantByPk:(e,t,r,i)=>n(i,"ProductVariantByPk",e=>(function(e,t){var r,n,i,a,l,o,u;let s=null==t||null==(r=e.cancelFlowPreviewProducts)?void 0:r[String(t)];return s?{__typename:"ProductVariant",id:t,title:null!=(n=s.variantTitle)?n:"Sample variant",image:null!=(a=null!=(i=s.variantImage)?i:s.productImageSrc)?a:null,Product:{__typename:"Product",title:null!=(l=s.productTitle)?l:"Sample product",imageSrc:null!=(o=s.productImageSrc)?o:null,description:null!=(u=s.productDescription)?u:""}}:F(e,t).variant})(e,t.id)),ProductVariants:(e,t,n,i)=>r(i,"ProductVariants",e=>{var r;let n=O(t.where).id,i=n&&"object"==typeof n&&"_in"in n?null!=(r=n._in)?r:[]:null,a=U(e.Product).flatMap(e=>{var t;return null!=(t=O(e).ProductVariants)?t:[]});return i?a.filter(e=>i.includes(e.id)):a},[])},Subscription:{StorefrontUser:(e,t,r,i)=>n(i,"Subscription.StorefrontUser",t=>{var r;let n=O(e);return null!=(r=O(t.StorefrontUser)[String(n.storefrontUserId)])?r:k(t.StorefrontUser)}),BillingPolicy:t=>B(e(),"BillingPolicy",O(t).billingPolicyId),DeliveryPolicy:t=>B(e(),"DeliveryPolicy",O(t).deliveryPolicyId),PrepaidDeliveryPolicy:t=>{let r=O(t).prepaidDeliveryPolicyId;return r?B(e(),"DeliveryPolicy",r):null},PrepaidGiftRecipient:()=>null,PaymentMethod:()=>{var t;return k(null==(t=e())?void 0:t.PaymentMethod)},ShippingAddress:()=>{var t;return k(null==(t=e())?void 0:t.Address)}
1,SubscriptionLines:()=>{var t;return U(null==(t=e())?void 0:t.SubscriptionLine)},AllSubscriptionLines:()=>{var t;return U(null==(t=e())?void 0:t.SubscriptionLine)},PrepaidSubscriptionLines:()=>[],SurpriseDelightSessions:()=>[],BannerSessions:()=>[],CancelFlowV2Sessions:()=>[],CancelFlowV3Sessions:()=>[],SubscriptionsSegments:()=>[]},SubscriptionLine:{ProductVariant:t=>{let r=e();if(!r)return null;let{variant:n}=F(r,O(t).productVariantId);return null!=n?n:N(r)},OriginalSellingPlan:()=>null,Discounts:()=>[],OrderLineItems:()=>[],Subscription:()=>{var t;return k(null==(t=e())?void 0:t.Subscription)}},ProductVariant:{Product:t=>{let r=e();if(!r)return null;let n=O(t);if(n.Product)return n.Product;let{product:i}=F(r,n.id);return null!=i?i:k(r.Product)},SellingPlanGroupResources:()=>[],ClassicBoxV2:()=>null},Product:{Collection_Products:e=>{var t;return null!=(t=O(e).Collection_Products)?t:[]}},Policy:{Anchors:e=>{var t;return null!=(t=O(e).Anchors)?t:[]}},StorefrontUser:{Site:()=>{var t,r;return null!=(r=null==(t=e())?void 0:t.Site)?r:null},Tags:e=>{var t;return null!=(t=O(e).Tags)?t:[]},Subscriptions:()=>{var t;return U(null==(t=e())?void 0:t.Subscription)},Orders:()=>{var t;let r=null==(t=e())?void 0:t.Order;return r?[r]:[]},CreditDiscounts:()=>[],StorefrontUserTiers:()=>{var t,r,n,i;let a=e(),l=a&&null!=(i=null==(n=null==(r=null==(t=a.TierGroups)?void 0:t.at(0))?void 0:r.TierLevels)?void 0:n.at(0))?i:null;return l?[{__typename:"StorefrontUserTier",joinDate:I,createdAt:I,removedAt:null,tierExpiresAt:null,TierLevel:l}]:[]}},StorefrontUserTier:{TierLevel:e=>{var t;return null!=(t=O(e).TierLevel)?t:null}},PaymentMethod:{StorefrontUser:()=>{var t;return k(null==(t=e())?void 0:t.StorefrontUser)},BillingAddress:()=>null},Order:{OrderLineItems:()=>{var t;let r=null==(t=e())?void 0:t.OrderLineItem;return r?[r]:[]},ShippingLines:()=>[],ShippingAddress:()=>{var t;return k(null==(t=e())?void 0:t.Address)}},OrderLineItem:{ProductVariant:t=>{let r=e();if(!r)return null;let{variant:n}=F(r,O(t).productVariantId);return null!=n?n:N(r)},SubscriptionLine:()=>{var t;return k(null==(t=e())?void 0:t.SubscriptionLine)},TaxLines:()=>[],Discounts:()=>[]},Site:{Products:(t,r)=>{let n=e();return n?M(n,r):[]},TierGroups:()=>{var t,r;return null!=(r=null==(t=e())?void 0:t.TierGroups)?r:[]},Rules:e=>{var t;return null!=(t=O(e).Rules)?t:[]},FeatureFlags:e=>{var t;return null!=(t=O(e).FeatureFlags)?t:[]},Collections:()=>[],Integrations:()=>[]},TierGroup:{TierLevels:e=>{var t;return null!=(t=O(e).TierLevels)?t:[]}},TierLevel:{TierRewards:e=>{var t;return null!=(t=O(e).TierRewards)?t:[]}}}}({getStore:e,warnings:t})),function({schema:e,getStore:t,warnings:r}){let n=e.getMutationType();if(!n)return{};let i={};for(let[e,a]of Object.entries(n.getFields())){let n=(0,P.MR)(a.type);i[e]=(i,a)=>{r.warnSimulatedMutation(e);let l=t();return l&&function({mutationName:e,args:t,store:r}){let n=e=>{let n=R(r,A(t));n&&(n.status=e)};switch(e){case"cancelSubscription":{let e=R(r,A(t));e&&(e.status="CANCELLED",e.cancelledAt="2024-01-15T10:30:00Z");return}case"pauseSubscription":n("PAUSED");return;case"unpauseSubscription":case"reactivateSubscription":n("ACTIVE");return;case"updateNextBillingDate":{let e=R(r,A(t)),n=O(t.input).date;e&&"string"==typeof n&&(e.nextBillingDate=n);return}case"updateSiteSettings":{let e=O(t.input).updatedObj;r.Site&&e&&"object"==typeof e&&(r.Site.settings=_()({},r.Site.settings,e));return}default:return}}({mutationName:e,args:a,store:l}),function(e,t){var r,n,i;if((0,P.YQ)(e)&&"ok"in e.getFields())return{__typename:e.name,ok:!0};if(e.name.endsWith("_mutation_response"))return{__typename:e.name,affected_rows:1,returning:[]};let a=null!=(i=null!=(n=null!=(r=t.input)?r:t.object)?n:t._set)?i:{},l=O(t.pk_columns);return Object.assign(Object.assign({__typename:e.name},l),O(a))}(n,a)}}return{mutation_root:i}}({schema:i,getStore:e,warnings:t}))})});return(0,T.p)({schema:i,resolvers:a,mocks:V})})}({getStore:e.getStore,warnings:e.warnings})),t})}return{warm(){n().catch(()=>{t=null})},execute(e){return q(this,void 0,void 0,function*(){var r;let i;try{i=yield n()}catch(e){return t=null,null}return(0,b.g7)({schema:i,document:e.query,variableValues:null!=(r=e.variables)?r:{},operationName:e.operationName||void 0})})}}}({getStore:()=>e.getData(),warnings:t}),a=function({store:e,executor:t}){return{link:new G.C(r=>new Q.c(n=>{var i,a,l,o;let u=r.operationName||"anonymous",s=!0;return i=this,a=void 0,l=void 0,o=function*(){var i,a,l,o,d,c,f;let p;try{yield e.whenReady()}catch(e){s&&(null==(i=n.error)||i.call(n,e));return}if(!s)return;if(!e.getData()){null==(a=n.error)||a.call(n,Error("Preview fixture is unavailable"));return}try{let e=yield t.execute(r);if(!s)return;if(e){null==(l=n.next)||l.call(n,{data:null!=(o=e.data)?o:void 0,errors:e.errors}),null==(d=n.complete)||d.call(n);return}}catch(e){p=e}!function({operationName:e,error:t}){}({operationName:u,error:p});let y=function(e){let t={};try{let r=e.query.definitions.find(e=>"OperationDefinition"===e.kind);if(null==r?void 0:r.selectionSet)for(let{responseKey:e,fieldName:n}of r.selectionSet.selections.filter(e=>"Field"===e.kind).map(e=>{var t,r;return{responseKey:null!=(r=null==(t=e.alias)?void 0:t.value)?r:e.name.value,fieldName:e.n
1ame.value}}))t[e]=n.endsWith("s")?[]:null}catch(e){}return{data:t,loading:!0,networkStatus:1}}(r);y.loading=!1,null==(c=n.next)||c.call(n,y),null==(f=n.complete)||f.call(n)},new(l||(l=Promise))(function(e,t){function r(e){try{u(o.next(e))}catch(e){t(e)}}function n(e){try{u(o.throw(e))}catch(e){t(e)}}function u(t){var i;t.done?e(t.value):((i=t.value)instanceof l?i:new l(function(e){e(i)})).then(r,n)}u((o=o.apply(i,a||[])).next())}),()=>{s=!1}}))}}({store:e,executor:i});return{bridge:n,executor:i,mockLink:a,store:e,warnings:t}}function es(){let e,t,r=(0,i.c)(2);if(r[0]===Symbol.for("react.memo_cache_sentinel")){t=Symbol.for("react.early_return_sentinel");e:{let r=document.getElementById("skio-root");if(!r){t=null;break e}e=(0,l.createPortal)((0,n.jsx)("div",{role:"alert",className:"flex min-h-screen items-center justify-center p-8 text-center text-text-heading",children:"Preview data failed to load. Reload the preview to try again."}),r)}r[0]=e,r[1]=t}else e=r[0],t=r[1];return t!==Symbol.for("react.early_return_sentinel")?t:e}function ed(e){let t,r,l,o,c,g,w,b,P,T,C,_,O=(0,i.c)(33),{children:A}=e,R=(0,ea.useQueryClient)(),[E]=(0,a.useState)(eu),[D,x]=(0,a.useState)(!1);return O[0]!==E.store||O[1]!==E.warnings?(t=()=>{let e=window.fetch,t=function({store:e,originalFetch:t,warnings:r=new S}){return function(n,i){return K(this,void 0,void 0,function*(){let a=J("string"==typeof n?n:n instanceof URL?n.toString():n.url);if(a===J(s.q8V)||!X.test(a))return t(n,i);yield e.whenReady();let l=function({pathname:e,body:t,store:r}){var n,i,a,l,o,u,d,c,f,g;let S=r.getData(),w=r.getSite();if(e===J(s.Q1B)){let e="string"==typeof t.locale?t.locale:"en-US",{copyTranslations:r,featureTranslations:u,negotiatedLocale:s}=function({copies:e,defaultCopyTranslation:t,copyTranslations:r,userLocales:n,localeAutoDetected:i,enableLocaleAutoDetection:a=!0}){let l=t?.locale??"en-US",o={...function({Copies:e}){return e.reduce((e,{key:t,copy:r})=>(r&&(e[t]=r),e),{})}({Copies:e??[]}),...Y([l]).machineTranslations??{},...t?.copy},u={CANCEL_FLOW_REASON:{},MISCELLANEOUS:{},DYNAMIC_BOX:{},SMART_UPSELL_TAGS:{}};if(!1===i||a){let{machineTranslations:e,locale:t}=Y(n);for(let i of(o={...o,...e},l=t??l,(r??[]).filter(e=>n.includes(e.locale)).sort((e,t)=>e.locale<t.locale?-1:+(e.locale>t.locale))))for(let e of(l=i.locale,o={...o,...i.copy},i.FeatureTranslations??[]))e.featureType===W.y1.CANCEL_FLOW_REASON&&e.cancelFlowReasonId&&(u[W.y1.CANCEL_FLOW_REASON][e.cancelFlowReasonId]=e.featureTranslation),e.featureType===W.y1.MISCELLANEOUS&&(u[W.y1.MISCELLANEOUS]={...u[W.y1.MISCELLANEOUS],...e.featureTranslation}),e.featureType===W.y1.DYNAMIC_BOX&&e.dynamicBoxId&&(u[W.y1.DYNAMIC_BOX][e.dynamicBoxId]=e.featureTranslation),e.featureType===W.y1.SMART_UPSELL_TAGS&&(u[W.y1.SMART_UPSELL_TAGS]={...u[W.y1.SMART_UPSELL_TAGS],...e.featureTranslation})}return{copyTranslations:o,featureTranslations:u,negotiatedLocale:l}}({copies:null==S?void 0:S.Copies,defaultCopyTranslation:null==S?void 0:S.DefaultCopyTranslation,copyTranslations:null==S?void 0:S.CopyTranslations,userLocales:function(e,t){let r=function(e){let t=[];if(e&&(t.push(e),e.includes("-"))){let r=e.split("-").at(0);r&&t.push(r)}return t}(t);return e?.id==="24ec87ff-4401-4506-a863-647844a8916b"&&r.at(0)?.includes("zh")?["zh-TW","zh"]:r}(w,e),localeAutoDetected:"boolean"==typeof t.localeAutoDetected?t.localeAutoDetected:void 0,enableLocaleAutoDetection:null==(i=null==(n=null==w?void 0:w.settings)?void 0:n[H.S.enableLocaleAutoDetection])||i});return{handled:!0,data:{Site:w,Theme:{},Theme2:{},Copies:null!=(a=null==S?void 0:S.Copies)?a:[],copyTranslations:(null==(l=null==w?void 0:w.settings)?void 0:l[H.S.enableInternationalization])?r:void 0,featureTranslations:u,defaultLocale:null==(o=null==S?void 0:S.DefaultCopyTranslation)?void 0:o.locale,negotiatedLocale:s}}}if(e===J(s.OY8))return{handled:!0,data:{ok:!0,cancelFlowMultiStepPayload:null!=(u=null==S?void 0:S.cancelFlowPreviewPayload)?u:null}};if(e===J(s.mxV))return{handled:!0,data:Object.assign(Object.assign({},m),{siteCurrencyCode:null!=(d=null==w?void 0:w.currencyCode)?d:"USD"})};if(e===J(s.oiM)){let e="string"==typeof t.cartCurrencyCode?t.cartCurrencyCode:null!=(c=null==w?void 0:w.currencyCode)?c:"USD";return{handled:!0,data:Object.assign(Object.assign({},p),{currencyCodeToRender:e,storeCurrencyCode:e})}}if(e===J(s.paY))return{handled:!0,data:function(e,t=0){let r=e.flatMap(e=>e.TierLevels);if(0===r.length)return{ok:!0,upcomingTierRewards:[],activeTierRewards:[],creditRe
1wards:[],rewardHistoryAuditLogs:[]};let n=r[t],i=r[t+1],a=n.TierRewards.map(e=>({type:e.rewardData?.type??"FIXED_CREDIT",value:e.rewardData?.rewardConfig??{numCredits:100},name:e.name})),l=i?i.TierRewards.slice(0,2).map((e,t)=>({type:e.rewardData?.type??"FIXED_CREDIT",value:e.rewardData?.rewardConfig??{numCredits:100},name:e.name,ordersRemaining:(t+1)*2})):[],o=n.TierRewards.filter(e=>e.rewardData?.type==="FIXED_CREDIT"||e.rewardData?.type==="CREDIT").slice(0,2).map((e,t)=>({id:`demo-credit-${t+1}`,type:"credits-per-dollar-spent",value:{credits:e.rewardData?.rewardConfig?.numCredits??100},completed:0===t})),u=[{__typename:"AuditLog",id:"demo-audit-tier-change",createdAt:new Date().toISOString(),eventData:{current:{tierId:n.id,tierName:n.name,tierExpiresAt:null,tierEvalOverride:!1,tierExpiryOverride:!1},timestamp:new Date().toISOString()},eventType:"Tier changed"}];return o.length>0&&u.push({__typename:"AuditLog",id:"demo-audit-credit",createdAt:new Date().toISOString(),eventData:{creditId:o[0].id,subTotal:"37.88",timestamp:new Date().toISOString(),orderTotal:"42.78",creditDelta:String(o[0].value.credits),neverExpire:!1,creditApplicationType:"ORDER_REWARD"},eventType:"Loyalty tier reward fixed credit"}),{ok:!0,upcomingTierRewards:l,activeTierRewards:a,creditRewards:o,rewardHistoryAuditLogs:u}}(null!=(f=null==S?void 0:S.TierGroups)?f:[])};if(e===J(s.A6A)){let e=null!=(g=null==S?void 0:S.TierGroups)?g:[];return{handled:!0,data:e.length>0?function(e,t=0){let r,n=e.flatMap(e=>e.TierLevels);if(0===n.length)return y;let i=n[t+1];if(!i)return{nextTier:"",currentStats:{totalSpent:1e3,totalOrders:10,totalStreaks:5,totalProductsInOrders:20}};let a=i.eligibility;return a?.AND?.[0]?.conditions&&(r={operator:"AND",conditions:a.AND[0].conditions}),{nextTier:i.name??"Next Tier",currentStats:{totalSpent:250,totalOrders:5,totalStreaks:3,totalProductsInOrders:12},eligibility:r}}(e):y}}if(e===J(s.jkm))return{handled:!0,data:!1===t.generate?h:{referralCode:v,maxReferralsReached:!1}};if(e===J(s.a75))return{handled:!0,data:{ok:!0,enabledMarketRegions:[]}};if(e===J(s.f5B))return{handled:!0,data:{productIds:[]}};if(e===J(s.ayS)){let e=null==S?void 0:S.Order;return{handled:!0,data:{ok:!0,Orders:(null==e?void 0:e.platformId)?[{platformId:e.platformId,trackingUrls:[],OrderShopifyToken:""}]:[]}}}return{handled:!1}}({pathname:a,body:yield function(e){return K(this,arguments,void 0,function*({input:e,init:t}){let r="string"==typeof(null==t?void 0:t.body)?t.body:"undefined"!=typeof Request&&e instanceof Request?yield e.clone().text():void 0;if(!r)return{};try{let e=JSON.parse(r);return"object"==typeof e&&null!==e?e:{}}catch(e){return{}}})}({input:n,init:i}),store:e});return l.handled?Z(l.data):(r.warnUnhandledGateway(a),Z({ok:!1,error:`Unsupported preview gateway request: ${a}`},501))})}}({store:E.store,originalFetch:e.bind(window),warnings:E.warnings});return window.fetch=t,()=>{window.fetch===t&&(window.fetch=e)}},O[0]=E.store,O[1]=E.warnings,O[2]=t):t=O[2],O[3]!==E?(r=[E],O[3]=E,O[4]=r):r=O[4],(0,a.useLayoutEffect)(t,r),O[5]!==R||O[6]!==E.bridge||O[7]!==E.store?(l=()=>(function({bridge:e,store:t,queryClient:r}){let n=et()(e=>{r.invalidateQueries({queryKey:[en.l]}),r.invalidateQueries({queryKey:["getSiteByDomainOrHostname"]}),e&&r.invalidateQueries({queryKey:[er.e]})},200),i=e.subscribe(e=>{if(t.applyHostMessage(e),e.type===u.T0.sitedataUpdate)return void n(!!e.customerPortalExtensions);e.type===u.T0.cancelFlowUpdate&&(r.setQueriesData({queryKey:[ei]},{ok:!0,cancelFlowMultiStepPayload:e.payload}),r.invalidateQueries({queryKey:[ei]}))});return()=>{i(),n.cancel()}})({bridge:E.bridge,store:E.store,queryClient:R}),O[5]=R,O[6]=E.bridge,O[7]=E.store,O[8]=l):l=O[8],O[9]!==R||O[10]!==E?(o=[R,E],O[9]=R,O[10]=E,O[11]=o):o=O[11],(0,a.useEffect)(l,o),O[12]!==E.executor?(c=()=>{E.executor.warm()},O[12]=E.executor,O[13]=c):c=O[13],O[14]!==E?(g=[E],O[14]=E,O[15]=g):g=O[15],(0,a.useEffect)(c,g),O[16]!==R||O[17]!==E.bridge||O[18]!==E.store?(w=()=>{let e=new AbortController,t=!0;return async function(){let r=new URLSearchParams(window.location.search),n=r.get("hmac"),i=r.get("nonce"),a=r.get("vercelPreviewHostname")??r.get("hostname");try{let r=await eo({request:()=>(0,d.U)({path:s.q8V,excludeJwt:!0,body:{...n&&{hmac:n},...i&&{nonce:i},...a&&{hostname:a}},signal:e.signal}),signal:e.signal});if(!t)return;E.store.injectFixture(r),R.invalidateQueries(),E.bridge.announceReady()}catch(r){if(e.signal.aborted)return;let t=r instanceof Error?r:Error("Preview fixture request failed");E.store.failFixture(t),x(!0)}}(),()=>{t=!1,e.abort()}},O[16]=R,O[17]=E.bridge,O[18]=E.store,O[19]=w):w=O[19],O[20]!==R||O[21]!==E?(b=[R,E],O[20]=R,O[21]=E,O[22]=b):b=O[22],(0,a.useEffect)(w,b),O[23]!==E.bridge?(P=()=>()=>E.bridge.dispose(),O[23]=E.bridge,O[24]=P):P=O[24],O[25]!==E?(T=[E],O[25]=E,O[26]=T):T=O[26],(0,a.useEffect)(P,T),O[27]!==A||O[28]!==D?(C=D?(0,n.jsx)(es,{}):A,O[27]=A,O[28]=D,O[29]=C):C=O[29],O[30]!==E||O[31]!==C?(_=(0,n.jsx)(f.Q,{runtime:E,children:C}),O[30]=E,O[31]=C,O[32]=_):_=O[32],_}},82971:(e,t,r)=>{r.r(t),r.d(t,{TRANSLATED_COPIES:()=>F});var n=r(33627),i=r(98398),a=r(1699),l=r(93854),o=r(70258),u=r(84060),s=r(57825),d=r(1777),c=r(18720),f=r(91161),p=r(50268),y=r(73882),v=r(5903),h=r(54766),m=r(79024),g=r(37856),S=r(98796),w=r(71351),b=r(76781),P=r(42665),T=r(37623),C=r(54026),_=r(16481),O=r(69017),A=r(96928),R=r(74646),E=r(52896),D=r(68539),x=r(99532),L=r(65145),I=r(67787),U=r(73040),k=r(78255),j=r(18003);let F={_base:n.default,bg:i.default,cs:a.default,da:l.default,de:o.default,el:u.default,es:s.default,"es-MX":d.default,fi:c.default,fr:f.default,"fr-CA":p.default,hi:y.default,hr:v.default,hu:h.default,id:m.default,it:g.default,ja:S.default,ko:w.default,lt:b.default,ms:P.default,nl:T.default,no:C.default,pl:_.default,pt:O.default,"pt-PT":A.default,ro:R.default,ru:E.default,sk:D.default,sv:x.default,th:L.default,tr:I.default,vi:U.default,zh:k.default,"zh-TW":j.default}},90109:(e,t,r)=>{r.d(t,{W:()=>o,e:()=>l});var n=r(26999),i=r(3555),a=r(46489);let l="customer-portal-extensions";function o({siteId:e,extensionIds:t,enabled:r}){var o,u;let s=(0,n.m)(),d=[...t].sort(),c=(0,i.useQuery)({queryKey:[l,e,d],staleTime:18e5,queryFn:()=>{var t,r,n,i;return t=this,r=void 0,n=void 0,i=function*(){let t=yield s.query({query:a.Wz,variables:{siteId:null!=e?e:"",extensionIds:d},fetchPolicy:"no-cache"});if(t.error)throw t.error;return t.data}
1,new(n||(n=Promise))(function(e,a){function l(e){try{u(i.next(e))}catch(e){a(e)}}function o(e){try{u(i.throw(e))}catch(e){a(e)}}function u(t){var r;t.done?e(t.value):((r=t.value)instanceof n?r:new n(function(e){e(r)})).then(l,o)}u((i=i.apply(t,r||[])).next())})},enabled:r&&!!e&&d.length>0});return{extensions:null!=(u=null==(o=c.data)?void 0:o.CustomerPortalExtensions)?u:[],isLoading:c.isPending,error:c.error}}}}]);
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.