PageSourceSearch

https://www.wigoutlet.com/cdn/shopifycloud/checkout-web/assets/c1/c610ba76.BWPPgq_o.js

js wigoutlet.com collected 2026-10-08 20:53:51 UTC 77,876 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["9f28056f.Bu_ZGSI3.js","4b4bc88f.DcJe9bVW.js","2c1ab0fe.Bf8FS-kA.js","app.C_ntWzAC.js","assets/app.CcGlIMpn.css","assets/wallet-prefilled-guest-return.BJvF0-q4.css","66338e00.CfltWGD3.js","3a2aad00.Cyi5Z-w_.js","f67abd2c.CMIDVCe_.js","164ad2e3.D0nOfU9-.js","d0bb51ec.CL_3Kdjr.js","60a453ce.0K3_0kXS.js","e12db40c.B4InVJ1F.js","9dba8418.CZTcH8_l.js","assets/hydrate.sZExiEG5.css","2210eadb.DF0gIp_2.js","28ac86c0.DdnTF1qO.js","3e6029dd.BwmLr1gv.js","assets/QRCode.BZ_m5G5a.css","30074413.AfOY7Y50.js","assets/Pressable.D9SfDfsb.css","efa0389a.WJQGJ9HI.js","22345fd4.v5I5uNqg.js","assets/Choice.CrYuHUmO.css","9f57d2aa.CTtpuDWX.js","8574876b.DO_JQrVo.js","064f6ac1.CkTWd7ab.js","assets/Popover.Bi1nHaU-.css","assets/DateField.CFFsBmUK.css","598fef4e.DelGI2ri.js","assets/PaymentIcon.gzvCNwz_.css","33d2e4fc.DEszsTzz.js","assets/NumberField.CRpcZnVJ.css","39921a74.Xl1RsruW.js","assets/Switch.BS8yVgoP.css","27f09e31.B-yjr1A_.js","137622f3.kpd4omnd.js","54bf0ebb.DzOlZ5wx.js","assets/Sheet.CpR5hiDV.css","1ed8f5e3.C6sGDuqU.js","assets/floating-layer.DfWUBaTh.css","2fdb3dd3.iDdsTYio.js","47b970b2.Dc6LZ4kt.js","a9fa9fda.ChMkqhXw.js","ca3e798e.Dc6mNaNz.js","assets/PhoneField.uZEuHncj.css","1444e6bd.KejVbUCp.js","29034f35.DiQ6WQWR.js","assets/AnnouncementRuntimeExtensions.DbBB6lBJ.css","e77d135d.Dz0RetrO.js","413b21e2.BIi9ebWL.js"])))=>i.map(i=>d[i]);
2import{A as e,i as t,t as n,g as a,e as s}from"./60a453ce.0K3_0kXS.js";import{iD as i,iE as o,E as r,iF as c,c as l,f3 as d,bn as u,v as p,dr as m,dv as f,b2 as y,r as h,s as g,o as b,iG as v,d3 as C,c5 as A,iH as I,bk as k,b5 as w,bS as S,bT as x,hL as T,ar as D,eZ as P}from"./4b4bc88f.DcJe9bVW.js";import{I as R,k as _,T as E,o as N,h as M,t as O,y as L,r as U,ad as V,an as F,j as G}from"./2c1ab0fe.Bf8FS-kA.js";import{h as $,dp as B,fY as j,fW as H,gY as q,gZ as Y,g_ as J,g$ as z,h0 as W,ef as Q,h1 as K,h2 as X,cf as Z,cg as ee,h3 as te,cr as ne,h4 as ae,gO as se,h5 as ie,h6 as oe,aS as re}from"./164ad2e3.D0nOfU9-.js";import{p as ce,q as le,r as de,s as ue,t as pe,e as me,U as fe,S as ye,a as he,u as ge,I as be,D as ve,v as Ce,O as Ae}from"./66338e00.CfltWGD3.js";import{b as Ie,a as ke,e as we}from"./f67abd2c.CMIDVCe_.js";import{g as Se,b as xe,a as Te}from"./28ac86c0.DdnTF1qO.js";import{g as De,q as Pe,_ as Re}from"./app.C_ntWzAC.js";import{e as _e}from"./e77d135d.Dz0RetrO.js";import{a as Ee,g as Ne}from"./413b21e2.BIi9ebWL.js";import{v as Me}from"./2210eadb.DF0gIp_2.js";const Oe=e=>e??[];function Le(e){const t=e.merchantVisitorConsent();return{allowedProcessing:e.merchantAllowedProcessing(),visitorConsent:{analytics:o(t.analytics),marketing:o(t.marketing),preferences:o(t.preferences),saleOfData:o(t.sale_of_data)},shouldShowBanner:e.shouldShowBanner.value,saleOfDataRegion:e.saleOfDataRegion.value,region:i(e.getRegion.value),metafields:Oe(e.merchantMetafields())}}const Ue={allowedProcessing:{analytics:!1,marketing:!1,preferences:!1,saleOfData:!1},visitorConsent:{analytics:void 0,marketing:void 0,preferences:void 0,saleOfData:void 0},shouldShowBanner:!1,saleOfDataRegion:!1,region:void 0,metafields:[]};function Ve({customerPrivacySignal:t,createSubscribableFromSignal:n,extension:a,storefrontTokens:s,applyChange:i,extensionInstance:o,checkout:l,consentManager:d}){const u=!0===a.capabilities.collectBuyerConsent?.customerPrivacy,p=$(a.approvalScopes,e.CustomerPersonalData);return{applyTrackingConsentChange:async function(e){return i({unknownChange:e,extension:a,extensionInstanceId:o.id,allowChangeAfterJourneyCompletion:!0,allowChangeDuringAcceleratedWallet:!0,handlers:{async changeVisitorConsent({change:e}){if(!u)throw new r("Capability not specified: Please declare this in your config: collect_buyer_consent.customer_privacy = true.");if(!p)throw new r("Personal data approval scope missing");if("shopPay"===l.identity.current.value)throw new r("The Customer Privacy API is not supported in Shop Pay.");const n=function(e=[]){return e.flatMap(({key:e,value:t})=>void 0===t?[]:""===t?[{key:e,value:null}]:[{key:e,value:t}])}(e.metafields),i=n.length>0;if(!i&&void 0===e.analytics&&void 0===e.marketing&&void 0===e.preferences&&void 0===e.saleOfData)return{type:"success"};const o=await s.get(a.appId,a.type,"customerPrivacy"),m=t.peek();return new Promise((a,s)=>{d.setTrackingConsent({analytics:e.analytics,marketing:e.marketing,preferences:e.preferences,saleOfData:e.saleOfData,isExtensionToken:!0,storefrontAccessToken:o??void 0,...i&&{metafields:n}},(...[n,i])=>{if(i)t.value={...m,allowedProcessing:d.merchantAllowedProcessing(),metafields:Oe(d.merchantMetafields()),visitorConsent:{analytics:e.analytics,marketing:e.marketing,preferences:e.preferences,saleOfData:e.saleOfData}},a({type:"success"});else if(n instanceof Error)s(new r(`Failed to set tracking consent: ${n.message}`));else if(n&&"error"in n){const e=function(e,t){const n=null!=t&&t>=400?`Failed to set tracking consent: ${e} (HTTP ${t})`:`Failed to set tracking consent: ${e}`;return 401===t?new ue(n):null!=t&&t>
2=400?new pe(n):e.includes("GraphQL error:")||e.includes("GraphQL response missing consentManagement")?new de(n):"undefined"!=typeof navigator&&c(navigator.userAgent)&&e.includes("The string did not match the expected pattern")?new ce(n):new le(n)}(String(n.error),n.statusCode);s(e)}else s(new le("Received unexpected callback from setTrackingConsent()"))})})}},errorResult:e=>e instanceof r||e instanceof ce||e instanceof le||e instanceof de||e instanceof ue||e instanceof pe?{type:"error",message:e.message}:{type:"error",message:`Failed to set tracking consent: ${e.message}`}})},customerPrivacy:n(R(()=>{const{region:e,...n}=t.value,{countryCode:a,provinceCode:s}=e||{};return{...n,region:a||s?{countryCode:p?a:void 0,provinceCode:p?s:void 0}:void 0}}))}}function Fe(){const{source:e,checkout:t}=l(),n=B();return _(()=>{const a=t.addressManager.shipping.value.applyAddressChangeBlockReason("ui-extension");return function({sourceType:e="checkout",canUpdateDiscountCodes:t,canSelectCustomAddress:n}){const a="draftOrder"===e;return{attributes:{canUpdateAttributes:!0},delivery:{canSelectCustomAddress:n},discounts:{canUpdateDiscountCodes:t},lines:{canAddCartLine:!a,canRemoveCartLine:!a,canUpdateCartLine:!a},metafields:{canSetCartMetafields:!0,canDeleteCartMetafield:!0},notes:{canUpdateNote:!a}}}({sourceType:e.type,canUpdateDiscountCodes:n.value,canSelectCustomAddress:!a.value})})}function Ge(e,t){return`${e} is not supported on this checkout. Consider checking "instructions.${t}" first.`}function $e(e){const t=E(()=>new Map,[]),n=N(t);return M(()=>{Be(t,e)},[e,t]),n}function Be(e,t){for(const n of t)je(e,n.id)}function je(e,t){const n=e.get(t);if(n)return n;let a=()=>{};const s={promise:new Promise(e=>{a=e}),resolve:a};return e.set(t,s),s}function He(e,t,n){e.get(t)===n&&e.delete(t)}function qe(e){const n="local"===e.type?void 0:e.registrationId;return{appId:e.appId,appName:e.appName,extensionId:H(e),extensionRegistrationId:n,extensionName:e.name,extensionVersion:e.version,extensionApiVersion:e.apiVersion,extensionTarget:e.extensionPoint.target,extensionPlacement:e.placementReference,extensionType:e.type,isHighValueExtension:null!=n&&j.has(n),isRemoteDom:!!e.apiVersion&&t(e.apiVersion)}}function Ye(e,t=ze){let n,a=!1;return R(()=>{const s=e();return a?t(n,s)?n:(n=s,s):(a=!0,n=s,s)})}function Je(e,t){if(e===t)return!0;if(!Array.isArray(e)||!Array.isArray(t))return!1;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!ze(e[n],t[n]))return!1;return!0}function ze(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if("object"!=typeof e||"object"!=typeof t)return!1;const n=Object.keys(e),a=Object.keys(t);return n.length===a.length&&n.every(n=>Object.prototype.hasOwnProperty.call(t,n)&&e[n]===t[n])}function We({createSubscribableFromSignal:t,extension:n,negotiated:a,proposed:s,journeyCompletedSignal:i}){if(!$(n.approvalScopes,e.CustomerPersonalData))return{billingAddress:void 0,shippingAddress:void 0};const o=(e,t)=>$(n.approvalScopes,t)?e:void 0;let r;const c=Ye(()=>{const t=t=>{if(void 0===t||function(e){return 0===Object.keys(e).length}(t))return;const{address1:n,address2:a,city:s,company:i,countryCode:r,firstName:c,lastName:l,name:d,phone:u,oneTimeUse:p,zoneCode:m,postalCode:f}=t;return{address1:o(n,e.CustomerAddress),address2:o(a,e.CustomerAddress),city:s,company:i,countryCode:o(r,e.CustomerPersonalData),firstName:o(c,e.CustomerName),lastName:o(l,e.CustomerName),name:o(d,e.CustomerName),phone:o(u,e.CustomerPhone),provinceCode:m,zip:o(f,e.CustomerAddress),oneTimeUse:p}};if(!1===a.fields.isShippingRequired.value)return;if(i.value)return t(a.fields.shippingAddress.peek());const n=t(s.shippingAddress.value),c=s.shippingAddress.value?.countryCode,l=r?.countryCode;return s.shippingAddress.dirtyFields.value.has("countryCode")&&l&&c!==l?r:(r=n,n)});return{billingAddress:t(Ye(()=>{const t=t=>{if(void 0===t)return;const{address1:n,address2:a,city:s,company:i,countryCode:r,firstName:c,lastName:l,name:d,phone:u,zoneCode:p,postalCode:m}=t;return{address1:o(n,e.CustomerAddress),address2:o(a,e.CustomerAddress),city:s,company:i,countryCode:o(r,e.CustomerPersonalData),firstName:o(c,e.CustomerName),lastName:o(l,e.CustomerName),name:o(d,e.CustomerName),phone:o(u,e.CustomerPhone),provinceCode:p,zip:o(m,e.CustomerAddress)}};if(i.value)return t(a.fields.billingAddress.peek());const n=s.billingAddress.value;switch(s.billingAddressOption.value){case"shipping":{const e=a.fields.buyerIdentity.value?.purchasingCompany;if(e)return t(e?.location?.shippingAddress??n);if(c.value){const{oneTimeUse:e,...t}=c.value;return t}return t(n)}case"billing":{const e=a.fields.buyerIdentity.value?.purchasingCompany?.location.billingAddress;return t(e??n)}default:return t(n)}})),shippingAddress:t(c)}}async function Qe(e){try{return await e()}catch(t){if(function(e){return e instanceof me&&"object"==typeof e.cause&&null!==e.cause&&"code"in e.cause&&"INVA
2LID_NEGOTIATION"===e.cause.code}(t))return;throw t}}function Ke({proposed:e,negotiated:t,createSubscribableFromSignal:n,cartInstructionsSignal:a,extension:s,extensionInstance:i,applyChange:o}){return{applyAttributeChange:async function(n){return o({unknownChange:n,extension:s,extensionInstanceId:i.id,handlers:{async updateAttribute({negotiate:n,change:s,markChangeAsNoOp:i}){if(Xe(s),!a.peek().attributes.canUpdateAttributes)throw new r(Ge("applyAttributeChange","attributes"));const o=e.attributes.peek();return function(e,t,n){const a=t=>{const n=t?.find(t=>t.key===e.key);return void 0!==n&&n.value===e.value},s=a(n),i=void 0===t?s:a(t);return s&&i}(s,o,t.fields.customAttributes.peek())?(i(),{type:"success"}):(e.attributes.value=Ze(o,s),await Qe(()=>n({silenceViolations:["all"]})),{type:"success"})},async removeAttribute({negotiate:t,change:n}){if(Xe(n),!a.peek().attributes.canUpdateAttributes)throw new r(Ge("applyAttributeChange","attributes"));const s=e.attributes.peek();if(!s?.find(e=>e.key===n.key))throw new r(`Invalid AttributeChange: no attribute with specified key found: "${n.key}"`);return e.attributes.value=Ze(s,n),await Qe(()=>t({silenceViolations:["all"]})),{type:"success"}}},errorResult:e=>({type:"error",message:`Could not apply attribute changes. Error: ${e.message}`})})},attributes:n((c=()=>(e.attributes.value||t.fields.customAttributes.value?.map(({key:e,value:t})=>({key:e,value:t})))??[],Ye(c,Je)))};var c}function Xe(e){if("string"!=typeof e.key||e.key.length<3||e.key.length>30)throw new r('Invalid AttributeChange: attribute key must be of type "string" and between 3 and 30 characters in length (inclusive)');if("updateAttribute"===e.type&&"string"!=typeof e.value)throw new r('Invalid AttributeChange: attribute value must be of type "string"')}function Ze(e,t){const n=e?[...e]:[],a=n.findIndex(({key:e})=>e===t.key);return"updateAttribute"===t.type&&(a>-1?n[a]={key:t.key,value:t.value}:n.push({key:t.key,value:t.value})),"removeAttribute"===t.type&&n.splice(a,1),n}const et=/^\$app|^app--\d+--/,tt=/^app--\d+--/,nt=/^app--\d+$/,at="$app";function st(e,t){if(e.trim()===at)return`app--${t}`;const n=at+":";return e.trim().startsWith(n)?`app--${t}--${e.slice(5)}`:e}const it="2026-01";function ot({proposed:e,createSubscribableFromSignal:t,extension:a,cartInstructionsSignal:s,applyChange:i,extensionInstance:o,checkout:c}){const{extensibility:l}=c,d="local"===a.type&&n(a.apiVersion).equalTo(it);return{metafields:t(R(()=>{const e="processed"===c.latestReceipt.value?.status?c.latestReceipt.value?.purchaseOrder.metafields:[];return(e&&e.length>0?e:l.ui.metafields.value).map(({key:e,namespace:t,value:n,valueType:a})=>({key:e,namespace:t,value:n,valueType:a}))})),applyMetafieldChange:async t=>i({unknownChange:t,extension:a,extensionInstanceId:o.id,handlers:{async updateMetafield({change:e}){if(!lt(a.apiVersion))throw new r("Change type `updateMetafield` is no longer supported. Use `updateCartMetafield` instead.");d&&console.warn("Change type `updateMetafield` is deprecated and will be removed in a future API version. Use `updateCartMetafield` instead. See https://shopify.dev/docs/api/checkout-ui-extensions/2026-01/apis/metafields#methods-propertydetail-applymetafieldchange for more details."),function(e){const{key:t,namespace:n,value:a,valueType:s}=e;if("string"!=typeof t||t.length<3||t.length>30)throw new r(`Invalid property key: "${t}". It must be between 3 and 30 characters in length (inclusive).`);if("string"!=typeof n)throw new r(`Invalid property namespace: "${n}". It must be a string between 2 and 20 characters (inclusive).`);if(n.length<2||n.length>20)throw new r(`Invalid property namespace: "${n}". It must be between 2 and 20 characters in length (inclusive).`);if(et.test(n))throw new r(`Invalid property namespace: "${n}". App reserved namespaces not supported.`);switch(s){case"integer":if("number"!=typeof a)throw new r(`Invalid property value: "${a}". It must be a number.`);break;case"string":if("string"!=typeof a)throw new r(`Invalid property value: "${a}". It must be a string.`);if(a.length<=0)throw new r(`Invalid property value: "${a}". It must not be empty.`);break;case"json_string":if(!function(e){if("string"!=typeof e)return!1;try{return JSON.parse(e),!0}catch{}return!1}(a))throw new r(`Invalid property value: "${a}". It must be a json_string.`);break;default:throw new r(`Invalid property valueType: "${s}". It must be in one of these values: integer, string, json_string.`)}}(e);const{key:t,namespace:n,value:s,valueType:i}=e,o=l.ui.metafields.value,c=o.findIndex(e=>e.key===t&&e.namespace===n),u=[...o],p=u[c];return p?u[c]={...p,value:s,valueType:i,appId:a.appId}:u.push({key:t,namespace:n,value:s,valueType:i,appId:a.appId}),l.ui.updateMetafields(u),{type:"success"}},async removeMetafield({change:e}){if(!lt(a.apiVersion))throw new r("Change type `removeMetafield` is no longer supported. Use `removeCartMetafield` instead.");d&&console.warn("Change type `removeMetafield` is deprecated and will be removed in a future API version. Use `removeCartMetafield` instead. See https://shopify.dev/docs/api/checkout-ui-extensions/2026-01/apis/metafields#methods-propertydetail-applymetafieldchange for more details.");const{key:t,namespace:n}=e,s=l.ui.metafields.value.filter(e=>e.key!==t||e.namespace!==n);return l.ui.updateMetafields(s),{type:"success"}},async updateCartMetafield({change:t,negotiate:n}){rt(t.type,s.peek().metafields),function(e){const{metafield:t}=e;if(null==t)throw new r(`Invalid property metafield: "${t}". It must be an object.`);const{key:n,namespace:a,value:s,type:i}=t;if("string"!=typeof n||n.length<2||n.length>64)throw new r(`Invalid property key: "${n}". It must be between 2 and 64 characters in length (inclusive).`);if(null!==a&&"string"!=typeof a&&void 0!==a)throw new r(`Invalid property namespace: "${a}". namespace must be null, undefined, or a string between 3 and 255 characters (inclusive).`);if("string"==typeof a&&(a.length<3||a.length>255))throw new r(`Invalid property namespace: "${a}". It must be between 3 and 255 characters in length (inclusive).`);if("string"!=typeof i)throw new r(`Invalid property type: "${i}". It must be a string. Received type: ${typeof i}.`);if("integer"===i){if("number"!=typeof s&&"string"!=typeof s)throw new r(`Invalid property value: "${s}". It must be a number or a string when type is "integer". Received type: ${typeof s}.`)}else if("string"!=typeof s)throw new r(`Invalid property value: "${s}". It must be a string when type ("${i}") is not "integer". Received type: ${typeof s}.`)}(t);const i="string"==typeof t.metafield.value?t.metafield.value:String(t.metafield.value);return e.cartMetafields.value=[...e.cartMetafields.peek(),{update:{key:t.metafield.key,namespace:t.metafield.namespace,value:i,type:t.metafield.type,appId:a.appId}}],ct(await n({fieldsToResolve:["cartMetafields"],silenceViolations:["all"]}),e,t),{type:"success"}},removeCartMetafield:async({change:t,negotiate:n})=>(rt(t.type,s.peek().metafields),function(e){const{key:t,namespace:n}=e;if("string"!=typeof t)throw new r(`Invalid property key: "${t}". It must be a string.`);if(null!=n&&"string"!=typeof n)throw new r(`Invalid property namespace: "${n}". The namespace must be either null, undefined, or a string.`)}(t),e.cartMetafields.value=[...e.cartMetafields.peek(),{delete:{appId:a.appId,key:t.key,namespace:t.namespace}}],ct(await n({fieldsToResolve:["cartMetafields"],silenceViolations:["all"]}),e,t),{type:"success"})},errorResult:e=>({type:"error",message:e.message})})}}function rt(e,{canSetCartMetafields:t,canDeleteCartMetafield:n}){const a=`applyMetafieldChange with type ${e}`;if("updateCartMetafield"===e&&!t)throw new r(Ge(a,"metafields"));if("removeCartMetafield"===e&&!n)throw new r(Ge(a,"metafields"))}function ct(e,t,n){const a=[...t.cartMetafields.peek()],s=e.errors.filter(e=>q.has(e.code));if(0===s.length)return;const i=s.reduce((e,t)=>
2{if("target"in t){const n=function(e){const t=e.match(/\[(\d+)\]$/),n=t?.[1];return void 0!==n?parseInt(n,10):-1}(t.target);n>=0&&!e[n]&&(e[n]=t)}return e},{}),o=a.findIndex((e,t)=>!!i[t]&&("updateCartMetafield"===n.type&&e.update?.key===n.metafield.key&&e.update?.namespace===n.metafield.namespace&&e.update?.value===n.metafield.value||"removeCartMetafield"===n.type&&e.delete?.key===n.key&&e.delete?.namespace===n.namespace)),c=i[o];if(o>-1&&c)throw t.cartMetafields.value=a.slice(0,o),new r(c.nonLocalizedMessage,{cause:{code:c.code}})}function lt(e){return!n(e).laterThan(it)}function dt({webPixels:e,extension:t}){const n=u(t.appId)||"unknown-app",a=u(H(t))||"unknown-extension";return{analytics:{publish:(s,i={})=>e.publishCustomEvent(s,i,{extension:{extensionId:a,appId:n,type:t.type||"unknown-type"}}),visitor:t=>e.visitor(t,{apiClientId:n})}}}const ut={id:"be4fa5a8e92c26d115e34073b486a58fc317388a2eedddb82d02eeccb9573278",type:"query",name:"ExtensionMetafields",source:""},pt=async({withCache:e=!0,coreGraphql:t,extension:n,observability:a,negotiated:s,checkoutProfileId:i,appMetafieldsSignal:o})=>{let r=[];const c=De(s),l=await Pe({withCache:e,coreGraphql:t,resourceIds:c,
2checkoutProfileId:i}),d=l.data?.globalCheckoutUiExtensions??[],u=[...l.data?.checkoutProfile?.activatedExtensions??[],...d].map(({extension:e})=>e),p=u?.find(e=>e.uuid===n.extensionId);let m=p?.metafields??[];if(!p){const a={resourceIds:c};"local"===n.type?a.extensionHandles=[{handle:n.handle,apiKey:n.appApiKey}]:a.extensionIds=[`gid://shopify/UiExtension/${n.extensionId}`];const{data:s}=await t.staticQuery(ut,{variables:a,cache:e});s?.extensionMetafields&&(m=s?.extensionMetafields)}r=function({queryResult:e,metafields:t,observability:n,extension:a}){if(e.error)return n.leaveErrorBreadcrumb("Extensions::GraphQL",{reason:"Failed to fetch extension metafields.",message:String(e.error),extensionId:a.id,extensionVersion:"persisted"===a.type?a.version:void 0}),[];const s=[];for(const i of t){if(!ht(a,i.ownerType)||!yt(a,i))continue;const e=ft(a.apiVersion,i.namespace);s.push({target:gt(i.ownerId,i.ownerType),metafield:{key:i.key,namespace:e,value:i.value,type:i.type.toLowerCase(),valueType:i.valueType.toLowerCase()}})}return s}({extension:n,queryResult:l,metafields:m,observability:a}),o.value={...o.peek(),[n.id]:r}};function mt({coreGraphql:e,extension:t,extensionInstance:n,negotiated:a,observability:s,createSubscribableFromSignal:i,sourceId:o,checkout:r,appMetafieldsSignal:c}){const l=O(()=>{pt({withCache:!0,coreGraphql:e,extension:t,observability:s,negotiated:a,appMetafieldsSignal:c,checkoutProfileId:r.configuration.profileId.value})});n.on("destroy",()=>{l()});const d={type:"extension",extension:t,instanceId:n.id};return(async()=>{_e.markStarted("app-metafields-load",d);try{await pt({withCache:!0,coreGraphql:e,extension:t,observability:s,negotiated:a,appMetafieldsSignal:c,checkoutProfileId:r.configuration.profileId.value})}finally{_e.markFinished("app-metafields-load",d)}})(),{appMetafields:i(R(()=>{const e=c.value[t.id]??[],n=t.extensionPoint.metafields??[],s=a.fields.buyerIdentity.value,i=s?.shopUser?.metafields??[],r=s?.shopUser?.publicId??"",l=i.flatMap(e=>e&&r&&n.some(t=>t.key===e.key&&t.namespace===e.namespace&&(!t.ownerType||"SHOPUSER"===t.ownerType))?[{target:{type:"shopUser",id:r},metafield:{key:e.key,namespace:ft(t.apiVersion,e.namespace??""),value:e.value,type:e.type,valueType:e.valueType.toLowerCase()}}]:[]),d=a.fields.cartMetafields.value,u=p(t.appId);return[...e,...d?d?.flatMap(e=>e&&null!=e.ownerType&&n.some(n=>!(n.key!==e.key||st(n.namespace,u)!==e.namespace||n.ownerType&&n.ownerType!==e.ownerType||e.namespaceAppId&&t.appId!==e.namespaceAppId))?[{target:{type:"cart",id:o},metafield:{key:e.key,namespace:ft(t.apiVersion,e.namespace??""),value:e.value,type:e.type,valueType:e.valueType.toLowerCase()}}]:[]):[],...l]}))}}function ft(e,t){return n(e).laterThan("2025-01")?function(e){return nt.test(e)?at:e.replace(tt,at+":")}(t):t}function yt(e,t){const n=p(e.appId),a=e.extensionPoint.metafields.filter(e=>e.key===t.key&&st(e.namespace,n)===t.namespace);return 0===a.length||a.some(e=>!e.ownerType||e.ownerType===t.ownerType)}function ht(t,n){switch(n){case"ORDER":default:return!1;case"CART":case"PRODUCT":case"PRODUCTVARIANT":case"SHOP":case"SHOPUSER":return!0;case"CUSTOMER":case"COMPANY":case"COMPANYLOCATION":return $(t.approvalScopes,e.CustomerPersonalData)}}function gt(e,t){const n=p(e);switch(t){case"CUSTOMER":return{type:"customer",id:n};case"PRODUCT":return{type:"product",id:n};case"PRODUCTVARIANT":return{type:"variant",id:n};case"SHOP":return{type:"shop",id:n};case"COMPANY":return{type:"company",id:n};case"COMPANYLOCATION":return{type:"companyLocation",id:n};case"CART":return{type:"cart",id:n};case"SHOPUSER":return{type:"shopUser",id:n};default:return(()=>{throw new fe(`Metafield ownerType "${t}" with id "${e}" cannot be resolved`)})()}}function bt({publicCheckoutSessionId:e,createSubscribableFromSignal:t}){return{checkoutToken:t(L(e))}}function vt(e){return{initial:e.current,subscribe(t){U(t);const n=e.subscribe((n=e.current)=>t(n));return[()=>{n(),V(t)},e.current]}}}function Ct({extension:e,extensionInstance:t,createSubscribableFromSignal:n,isCheckoutEditor:a,observability:s}){const i=R(()=>{const t=e.behaviors.value,n=new Set;return t.blockProgress||n.add("blockProgress"),function(e,t){const n=[];return Object.keys(e).forEach(a=>{const s=a;s in e&&("object"!=typeof e[s]&&!t.has(s)&&Boolean(e[s])&&n.push(Y(s)),"object"==typeof e[s]&&Object.entries(e[s]).forEac
2h(([e,t])=>{if(Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t){const t=`${Y(a)}.${Y(e)}`;n.push(t)}}))}),n}(e.capabilities,n)}),o=vt({get current(){return t.rendered},subscribe:e=>{const n=t.on("render",()=>{e(t.rendered)}),a=t.on("remove",()=>{try{e(t.rendered)}catch(n){throw s.leaveErrorBreadcrumb("Error removing rendered subscription on remove event",{isDestroyed:t.isDestroyed,rendered:t.rendered,extensionId:t.id}),n}}),i=t.on("restart",()=>{r()}),o=t.on("destroy",()=>{r()}),r=()=>{n(),a(),i(),o()};return r}});return{scriptUrl:e.scriptUrl,version:"persisted"===e.type?e.version:void 0,apiVersion:e.apiVersion,rendered:o,capabilities:n(i),editor:a?{type:"checkout"}:void 0,target:t.target}}function At({locale:e,currencySignal:t,timezone:n,extension:a,createSubscribableFromSignal:s,negotiated:i}){return{localization:{language:s(L({isoCode:e})),extensionLanguage:s(L({isoCode:a.extensionLocale})),currency:s(t),timezone:s(L(n??(new Intl.DateTimeFormat).resolvedOptions().timeZone)),country:s(R(()=>{const e=i.fields.buyerIdentity.value?.countryCode;if(e)return{isoCode:e}})),market:s(R(()=>{const e=i.fields.buyerIdentity.value?.market;if(!e)return;const{id:t,handle:n}=e;return{id:t,handle:n}}))}}}function It({captureEvent:e,extension:t,locale:n,shop:s,storefrontTokens:i,extensionInstance:o}){const c=t.capabilities.apiAccess;async function l(e,o=!1,d){if(!c)throw new r('permission to access the storefront API must be specified under [capabilities] with flag "api_access = true"; this can be done within your extension\'s configuration. View the docs for more information:\n\nhttps://shopify.dev/docs/api/checkout-ui-extensions/configuration#api-access');const u=await i.get(t.appId,t.type,"fetchWithToken");if(!u)throw new f(`Could not get a storefront token for app ${t.appId} to query ${e}`);try{const r=await fetch(`https://${s.myshopifyDomain}/api/${d?.version??a(t.apiVersion)}/graphql.json`,{method:"POST",headers:{"Content-Type":"application/json","Accept-Language":n,"Shopify-Storefront-Extension-Token":u},body:JSON.stringify({query:e,variables:d?.variables})});return 401===r?.status&&o?(i.cache.delete(i.cacheKey(t.appId,t.type)),l(e,!1,d)):r}catch(p){if("BreadcrumbsPluginFetchError"===p.name&&o)return l(e,!1,d);throw new m(`An error occurred when attempting to fetch the extension api: ${p}`,{cause:p})}}return{query:async(n,a)=>{if(!t.capabilities.apiAccess)throw new r('Extension is not allowed to use the Storefront API; permission to use the Storefront API must be specified under [capabilities] with:"api_access = true; see:\n\nhttps://shopify.dev/docs/api/checkout-ui-extensions/configuration#api-access');const s=performance.now();e("extensionInteraction",{interaction:"storefrontApiQueryStart",extension:t,section:"extension",timestamp:new Date,extensionInstanceId:o.id});try{const r=await l(n,!0,a);if(r&&r.ok){e("extensionInteraction",{interaction:"storefrontApiQuerySuccess",extension:t,section:"extension",timestamp:new Date,duration:performance.now()-s,extensionInstanceId:o.id});try{return await r.json()}catch(i){throw new ye("Failed to parse Storefront API response",{cause:i})}}throw new m(`Failed to query storefront API: status=${r?.status} ${r?.statusText}`.trim())}catch(i){let n="storefrontApiQueryError";throw i instanceof m&&i?.cause instanceof Error&&"BreadcrumbsPluginFetchError"===i.cause?.name?n="storefrontApiQuerySuccess":i instanceof ye&&(n="storefrontResponseParseError"),e("extensionInteraction",{interaction:n,extension:t,section:"extension",timestamp:new Date,duration:performance.now()-s,error:i instanceof Error?i:void 0,extensionInstanceId:o.id}),i}}}}function kt({extension:{configuration:e},createSubscribableFromSignal:t}){return t(e)}function wt(e){return{id:e.id,name:e.name,storefrontUrl:e.storefrontUrl??void 0,myshopifyDomain:e.myshopifyDomain}}function St(e){return{id:e.id,name:e.name,storefrontUrl:e.storefrontUrl?(t=e.storefrontUrl,t.endsWith("/")?t:`${t}/`):void 0,myshopifyDomain:e.myshopifyDomain};var t}function xt({extension:e}){return Dt(`v1-${H(e)}-${e.extensionPoint.target}`)}function Tt({extension:e}){return Dt(`v1-${e.appId}-${e.extensionId}`)}function Dt(e){const t=y.ExtensionStorage,n=t=>`${e}-${t}`,a=()=>b(t)??{};return{async read(e){J("string"==typeof e,'Missing "key" argument. Please pass a key to read from to storage.');const t=n(e),s=a();return Object.keys(s).length&&s[t]||null},async write(e,s){J("string"==typeof e,'Missing "key" argument. Please pass a key to write to to storage.'),J(arguments.length>1,`Missing "data" argument. Please pass a value to write to "${e}" `);const i=n(e),o=a();o[i]=s,g(t,o)},async delete(e){J("string"==typeof e,'Missing "key" argument. Please pass a key to delete from storage.');const s=n(e),i=a();delete i[s],0===Object.keys(i).length?h(t):g(t,i)}}}function Pt(e){return e}const Rt=new Set(["DISCOUNTS_ONLY_EMPTY_TERMS_ACCEPTED","DISCOUNTS_DISCOUNTS_NOT_ALLOWED_FOR_B2B","DISCOUNTS_DISCOUNT_CODE_NOT_HONOURED","DISCOUNTS_CUSTOM_DISCOUNT_NOT_HONOURED","DISCOUNTS_UNSUPPORTED_EXPECTATION","DISCOUNTS_ALLOCATIONS_MISMATCH","DISCOUNTS_ADDITIONAL_REQUESTED_DISCOUNT_CODE_DISCARDED","DISCOUNTS_NOT_FOUND","DISCOUNTS_CURRENTLY_INACTIVE","DISCOUNTS_USAG
2E_LIMIT_REACHED","DISCOUNTS_CUSTOMER_USAGE_LIMIT_REACHED","DISCOUNTS_CUSTOMER_NOT_ELIGIBLE","DISCOUNTS_QUANTITY_NOT_IN_RANGE","DISCOUNTS_PURCHASE_NOT_IN_RANGE","DISCOUNTS_NO_ENTITLED_LINE_ITEMS","DISCOUNTS_NO_ENTITLED_SHIPPING_LINES","DISCOUNTS_INCOMPATIBLE_PURCHASE_TYPE","DISCOUNTS_DISCOUNT_ALREADY_APPLIED","DISCOUNTS_HIGHER_VALUE_DISCOUNT_APPLIED","DISCOUNTS_MAXIMUM_DISCOUNT_CODE_LIMIT_REACHED","DISCOUNTS_INVALID_SIGNATURE","REDUCTION_INVALID_CODE","REDUCTION_INVALID_DISCOUNT_CODE"]);function _t({negotiated:e,proposed:t,extension:n,createSubscribableFromSignal:a,cartInstructionsSignal:s,applyChange:i,extensionInstance:o,currentDiscountCodeAttemptSignal:c}){const l=a(R(()=>{const t=e.fields.discountLines.value?.lines;return t?t.filter(e=>"code"===e.discount.type).map(e=>({code:e.title})):[]})),d=a(R(()=>{const t=e.fields.discountLines.value?.lines;return t?function(e){return e.filter(e=>ke(e)&&"CART"===e.discount.presentationLevel).map(e=>{const{discount:t,amount:n,title:a}=e;return"code"===t.type?{type:"code",code:a,discountedAmount:n}:"automatic"===t.type?{type:"automatic",title:a,discountedAmount:n}:{type:"custom",title:a,discountedAmount:n}})}(t):[]})),u=["non-merchandise"];return{discountCodes:l,discountAllocations:d,async applyDiscountCodeChange(e){return i({unknownChange:e,extension:n,extensionInstanceId:o.id,handlers:{addDiscountCode:async({negotiate:e,change:t})=>(a(),Et(t),Nt(await e({customizeNegotiation:e=>(c.value=t.code,{...e,reduction:{code:t.code}}),silenceViolations:u}),t.code),c.value=null,{type:"success"}),async removeDiscountCode({negotiate:e,change:n}){a(),Et(n);const s=t.discountLines.peek(),i=n.code.toUpperCase(),o=s.find(({discount:e})=>"code"===e.type&&e.title.toUpperCase()===i);if(!o)throw new r(`The discount code "${n.code}" is not allocated to this checkout and cannot be removed.`,{cause:{code:"DISCOUNT_NOT_FOUND"}});return t.discountLines.value=s.filter(({discount:e})=>e.title.toUpperCase()!==o.title.toUpperCase()),Nt(await e({fieldsToResolve:[...z],silenceViolations:u}),n.code),{type:"success"}}},errorResult:e=>({type:"error",message:`Could not apply discount code changes. Error: ${e.message}`})});function a(){if(!s.peek().discounts.canUpdateDiscountCodes)throw new r(Ge("applyDiscountCodeChange","discounts"))}}}}function Et(e){if("string"!=typeof e.code)throw new r('Discount code must be of type "string"')}function Nt(e,t){const n=e.errors.find(e=>{if("RemoveTermViolation"!==e.type||we(e.targetEntity)?.title===t)return Rt.has(e.code)});if(n)throw new r(n.nonLocalizedMessage,{cause:{code:n.code}})}const Mt=new Set(["REDUCTION_INVALID_CODE","PAYMENT_GIFT_CARDS_NOT_ALLOWED_FOR_B2B","PAYMENT_GIFT_CARDS_NOT_ALLOWED_FOR_FIXED_SELLING_PLANS","PAYMENTS_GIFT_CARD_ALREADY_APPLIED","PAYMENTS_GIFT_CARD_BUYING_GIFT_CARD","PAYMENTS_GIFT_CARD_CURRENCY_MISMATCH","PAYMENTS_GIFT_CARD_DISABLED","PAYMENTS_GIFT_CARD_NON_SUFFICIENT_FUNDS","PAYMENTS_GIFT_CARD_NOT_FOUND","REDUCTION_GIFT_CARD_ALREADY_APPLIED","PAYMENTS_SHOP_CASH_GIFT_CARD_NOT_ALLOWED","REDUCTION_INVALID_GIFT_CARD_CODE","PAYMENTS_INSTALLMENTS_GIFT_CARD_NOT_ALLOWED","PAYMENTS_GIFT_CARDS_UNAVAILABLE"]);function Ot({negotiated:e,proposed:t,extension:n,createSubscribableFromSignal:a,shop:s,applyChange:i,extensionInstance:o}){return{appliedGiftCards:a(R(()=>{const t=e.fields.paymentLines.value;return t?t.lines.filter(e=>"giftCard"===e.method.type).map(e=>({lastCharacters:C(e.method),amountUsed:e.cost,balance:e.method.balance})):[]})),applyGiftCardChange:async a=>i({unknownChange:a,extension:n,extensionInstanceId:o.id,handlers:{async addGiftCard({negotiate:t,change:n}
2){Lt(n);const a=e.fields.paymentMethods.peek()?.some(e=>"giftCard"===e.type);if(!a)throw new r("the `applyGiftCardChange` API is disabled");return Vt(await t({customizeNegotiation:e=>({...e,reduction:{code:n.code}})})),{type:"success"}},async removeGiftCard({negotiate:e,change:n}){Lt(n);const a=t.paymentLines.peek(),i=s.hasFlagEnabled(v);let o=a;return i?n.code.split(",").forEach(e=>{o=Ut(o,e)}):o=Ut(o,n.code),t.paymentLines.value=o,Vt(await e({})),{type:"success"}}},errorResult:e=>({type:"error",message:`Could not apply gift card changes. Error: ${e.message}`})})}}function Lt(e){if("string"!=typeof e?.code)throw new r("Gift card code must be a string")}function Ut(e,t){const n=t.replace(/[\s-]/g,"").toLowerCase(),a=e.findIndex(({method:e})=>"giftCard"===e.type&&(4===t.length?C(e).toLowerCase()===n.slice(-4):"code"in e&&e.code.toLowerCase()===n));if(-1===a)return e;const s=[...e];return s.splice(a,1),s}function Vt(e){const t=e.errors.find(e=>Mt.has(e.code));if(t)throw new r(t.nonLocalizedMessage,{cause:{code:t.code}})}function Ft(e){const{lineAllocation:t}=e,n="parentRelationship"in e?e.parentRelationship?.parent?.lineAllocations?.[0]:void 0;return{id:(s=t.stableId,`gid://shopify/CartLine/${s}`),quantity:t.quantity,cost:{totalAmount:t.checkoutPriceAfterDiscounts},merchandise:Gt(e),attributes:e.properties.map(e=>({key:e.name,value:String(e.value)})),discountAllocations:(a=t.allocations,a.filter(e=>Ie(e.discountDetails.discount)&&"LINE"===e.discountDetails.discount.presentationLevel).map(e=>{const{discount:t,title:n}=e.discountDetails;return"code"===t.type?{type:"code",code:n,discountedAmount:e.amount}:"automatic"===t.type?{type:"automatic",title:n,discountedAmount:e.amount}:{type:"custom",title:n,discountedAmount:e.amount}})),lineComponents:e.lineComponents.map(e=>({type:"bundle",id:Bt(e.lineAllocation.stableId),merchandise:Gt(e),quantity:e.lineAllocation.quantity,cost:{totalAmount:e.lineAllocation.checkoutPriceAfterDiscounts},attributes:e.properties.map(e=>({key:e.name,value:String(e.value)}))})),parentRelationship:n?{parent:{id:Bt(n.stableId)}}:null};var a,s}function Gt(e){if(!e.variantId)throw new A("Cannot create cart line API without a variantId. Custom merchandise lines are not yet supported.");return{type:"variant",id:e.variantId.replace("ProductVariantMerchandise","ProductVariant"),title:e.title,subtitle:e.subtitle,image:e.image?{url:e.image.four,altText:e.image.altText}:void 0,selectedOptions:e.options.map(e=>({name:e.name,value:e.value})),product:{id:e.productId,vendor:e.vendor,productType:e.productType},requiresShipping:e.requiresShipping,sellingPlan:e.sellingPlan?{id:e.sellingPlan.id,recurringDeliveries:Boolean(e.sellingPlan.subscriptionDetails)}:void 0,sku:e.sku??void 0}}function $t(e){const{lineAllocation:t,image:n}=e;return{id:(a=t.stableId,`gid://shopify/PresentmentCartLine/${a}`),title:e.title,subtitle:e.subtitle,lines:[Ft(e)],quantity:t.quantity,cost:{totalAmount:t.checkoutPriceAfterDiscounts},image:n?{url:n.four,altText:n.altText}:void 0};var a}function Bt(e){return`gid://shopify/CartLineComponent/${e}`}const jt="merchandiseError:",Ht=function(e){let t,n=!1;function a(){return t??=G(e).catch(e=>{throw t=void 0,e}),t}return{load:a,preload(){n||(n=!0,F(()=>{a().catch(()=>{})}))}}}(()=>Re(()=>import("./9f28056f.Bu_ZGSI3.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50])));function qt({negotiated:e,proposed:t,createSubscribableFromSignal:n,extension:a,stableDetourSignal:s,cartInstructionsSignal:i,cartLineChangeLoadingSignal:o,observability:r,applyChange:c,extensionInstance:l,isCheckoutEditor:u,shop:p,refusedMerchandise:m}){const f=p.hasFlagEnabled(I)?m:void 0;async function y(n,a){o.value=!0;const{mutations:c}=await Ht.load();return c.applyCartLineChange({change:n,negotiated:e,proposed:t,stableDetourSignal:s,cartInstructionsSignal:i,negotiate:a,isCheckoutEditor:u,observability:r,refusedMerchandise:f})}return Ht.preload(),{lines:n((h=()=>{const t=e.fields.merchandiseLines.value,n=e.fields.remoteMerchandiseDetails?.value;return t?t.lines.filter(e=>!k(e.stableId,n)).flatMap(e=>null==e.productId?[]:e.variantId?W(e).map(Ft):(r.error(new A("Cannot create cart line API without a variantId. Custom merchandise lines are not yet supported.")),[])):[]},Ye(h,d))),applyCartLinesChange:async e=>c({unknownChange:e,extension:a,extensionInstanceId:l.id,handlers:{addCartLine:async({negotiate:e,change:t})=>y(t,e),removeCartLine:async({negotiate:e,change:t})=>y(t,e),updateCartLine:async({negotiate:e,change:t})=>y(t,e)},errorResult:e=>e.message.startsWith(jt)?{type:"error",message:e.message}:{type:"error",message:`Could not apply line item changes. Error: ${e.message}`}}).finally(()=>{o.value=!1})};var h}function Yt({proposed:e,negotiated:t,createSubscribableFromSignal:n,extension:a,cartInstructionsSignal:s,applyChange:i,extensionInstance:o}){return{note:n(e.note),applyNoteChange:async n=>i({unknownChange:n,extension:a,extensionInstanceId:o.id,handlers:{async updateNote({negotiate:n,change:a,markChangeAsNoOp:s}){if(c(),"string"!=typeof a.note)throw new r('Invalid NoteChange: note must be of type "string"');if(a.note&&a.note.length>5e3)throw new r("Invalid NoteChange: note must be less than or equal to 5000 characters");return function(e,t,n){const a=e||void 0;return t===a&&(n||void 0)===a}
2(a.note,e.note.peek(),t.fields.note.peek())?(s(),{type:"success"}):(e.note.value=a.note||void 0,await Qe(()=>n({silenceViolations:["all"]})),{type:"success"})},async removeNote({negotiate:n,markChangeAsNoOp:a}){return c(),s=e.note.peek(),i=t.fields.note.peek(),void 0===s&&void 0===(i||void 0)?(a(),{type:"success"}):(e.note.value=void 0,await Qe(()=>n({silenceViolations:["all"]})),{type:"success"});var s,i}},errorResult:e=>({type:"error",message:e.message})})};function c(){if(!s.peek().notes.canUpdateNote)throw new r(Ge("applyNoteChange","notes"))}}function Jt(t){const{extension:n}=t,{applyAttributeChange:a}=Ke(t),{applyCartLinesChange:i}=qt(t),{applyNoteChange:o}=Yt(t),{applyMetafieldChange:r}=ot(t),{applyDiscountCodeChange:c}=_t(t),{applyGiftCardChange:l}=Ot(t),{applyShippingAddressChange:d}=function(t){const{extension:n,extensionInstance:a,applyChange:s}=t;return Ht.preload(),$(n.approvalScopes,e.CustomerPersonalData)?{applyShippingAddressChange:async function(e){return s({unknownChange:e,extension:n,extensionInstanceId:a.id,handlers:{async updateShippingAddress(e){const{mutations:n}=await Ht.load();return n.applyShippingAddressChange(e,t)}},errorResult:e=>({type:"error",errors:e instanceof he?e.cause?.errors??[{message:e.message}]:[{message:e.message}]})})}}:{applyShippingAddressChange:void 0}}(t),{experimentalIsShopAppStyle:u}=function({extension:e,checkout:t}){return{experimentalIsShopAppStyle:Se({allowLocal:!0,extension:e})?"shopPay"===t.identity.current.value:void 0}}(t);switch(n.apiVersion){case"2023-04":return{applyAttributeChange:a,applyCartLinesChange:i,applyNoteChange:o,applyMetafieldChange:r,applyDiscountCodeChange:c,applyGiftCardChange:l};case"2023-07":case"2023-10":case"2024-01":case"2024-04":case"2024-07":case"2024-10":case"2025-01":case"2025-04":case"2025-07":case"unstable":case"2025-10":case"2026-01":case"2026-04":case"2026-07":case"2026-10":case"2027-01":return{applyAttributeChange:a,applyCartLinesChange:i,applyNoteChange:o,applyMetafieldChange:r,applyDiscountCodeChange:c,applyGiftCardChange:l,applyShippingAddressChange:d,experimentalIsShopAppStyle:u};default:s(n.apiVersion)}}function zt(e){const{createSubscribableFromSignal:t}=e,{apiVersion:a}=e.extension;return n(a).equalTo("unstable")?{order:t(L(void 0))}:n(a).laterThan("2025-07")?{}:{order:t(L(void 0))}}function Wt({negotiated:t,createSubscribableFromSignal:n,proposed:a,extension:s}){return $(s.approvalScopes,e.CustomerPersonalData)?{buyerIdentity:{customer:n(R(()=>{const n=t.fields.buyerIdentity.value?.customerProfile;if("CustomerProfile"===n?.__typename||"BusinessCustomerProfile"===n?.__typename){const t=$(s.approvalScopes,e.CustomerEmail),a=$(s.approvalScopes,e.CustomerPhone),i=$(s.approvalScopes,e.CustomerName),o="CustomerProfile"===n?.__typename?n.storeCreditAccounts.map(e=>({...e,balance:e.balance})):[];return{id:n.id,email:t?n.email??void 0:void 0,phone:a?n.phone??void 0:void 0,fullName:i?n.fullName??void 0:void 0,firstName:i?n.firstName??void 0:void 0,lastName:i?n.lastName??void 0:void 0,image:{url:n.imageUrl},acceptsMarketing:n.acceptsEmailMarketing,acceptsEmailMarketing:n.acceptsEmailMarketing,acceptsSmsMarketing:n.acceptsSmsMarketing,storeCreditAccounts:o,ordersCount:n.ordersCount??0}}})),email:n(R(()=>{if(!$(s.approvalScopes,e.CustomerEmail))return;const n=a.email.value,i=t.fields.buyerIdentity.value?.customerProfile?.email,o=t.fields.contactInfo.value?.email;return n||i||o})),phone:n(R(()=>{if(!$(s.approvalScopes,e.CustomerPhone))return;const n=a.phone.value,i=t.fields.buyerIdentity.value?.customerProfile?.phone,o=t.fields.contactInfo.value?.phone;return n||i||o})),purchasingCompany:n(R(()=>{const e=t.fields.buyerIdentity.value?.purchasingCompany;if(e)return{company:{id:e.company.id,name:e.company.name,externalId:e.company?.externalId},location:{id:e.location.id,name:e.location.name,externalId:e.location?.externalId}}}))}}:{buyerIdentity:void 0}}const Qt={behavior:"allow"};function Kt({extension:e,extensionInstance:t,proposal:n,captureEvent:a,journeyCompletedSignal:s,sourceType:i,createSubscribableFromSignal:o,journeyStateSignal:c,pageBeforeDetourSignal:l,negotiated:d,cartPageSignal:u,checkout:p,interceptorRegistrationResolversSignal:m,observability:f,negotiationRateLimiter:y}){let h=0;const g=m.peek(),b=g.get(e.id);return{intercept(s){const o=String(h++);U(s);let c=!1;const l=[],d={interceptorKey:o,extension:e,captureEvent:a,sourceType:i,observability:f,activeRaces:l,extensionInstance:t,suppressMalformedInterceptionErrors:"persisted"===e.type||"global"===e.type},u=function(e,t){return async({requiresRenderToBlock:n})=>{const{interceptorKey:a,extension:s,captureEvent:i,sourceType:o,observability:c,activeRaces:l,extensionInstance:d,suppressMalformedInterceptionErrors:u}=t;if(n&&!d.rendered)return d.markNotBlocking(a),{isBlocking:!1,interceptorRunResponse:Qt};const p=s.capabilities.blockProgress&&s.behaviors.value.blockProgress,m=Xt((async()=>{try{return await e({canBlockProgress:p})}catch(t){return c.error(new ge(`Error in buyer journey interceptor callback: ${t}`,{cause:t}),{metadata:{extension:Q(s),source:{type:o}}}),{behavior:"allow",perform:()=>{}}}})(),{captureEvent:i,extension:s,onTimeout:()=>
2(c.error(new r("buyer journey interceptor callback timed out"),{metadata:{extension:Q(s),source:{type:o}}}),Qt)},d.id);let f;l.push(m);try{f=await m.finished,function(e,t){const n=[];if(Object.entries(t||{}).length||n.push("interceptor result cannot be empty or undefined"),t?.behavior&&["block","allow"].includes(t.behavior)||n.push(`behavior must be either "block" or "allow", received "${t?.behavior}"`),t?.hasOwnProperty("perform")&&"function"!=typeof t?.perform&&n.push("perform must be a function: received type "+typeof t?.perform),"block"===t?.behavior&&"string"!=typeof t.reason&&n.push("reason must be a string: received type "+typeof t?.reason),n.length)throw new be(n.join("; "));"local"!==e.type||e.capabilities.blockProgress||"block"!==t?.behavior||console.warn('CannotBlockProgressWarning: extension is not allowed to block checkout progress; permission to block checkout progress must be specified under [capabilities] with flag "block_progress = true; see:\n\nhttps://shopify.dev/docs/api/checkout-ui-extensions/configuration#block-progress')}(s,f)}catch(y){if(u){const e=y;return console.warn(`${e.name}: ${e.message}`),d.markNotBlocking(a),null}throw y instanceof TypeError&&c.leaveErrorBreadcrumb("BuyerJourneryIntercept: Cannot block progress",{extension:s,interceptorRequest:f}),y}return p&&"block"===f.behavior?(d.markBlocking(a),{isBlocking:!0,interceptorRunResponse:f}):(d.markNotBlocking(a),{isBlocking:!1,interceptorRunResponse:f})}}(s,d),m=async n=>{switch(n){case"registration":return await u({requiresRenderToBlock:!1}),Qt;case"negotiation":{const e=await u({requiresRenderToBlock:!0});if(!e)return Qt;const{perform:t}=e.interceptorRunResponse;return e.isBlocking?{behavior:"allow",errors:e.interceptorRunResponse.errors,perform:t&&Zt(()=>t({behavior:"allow"}),d)}:{behavior:"allow",perform:t&&Zt(()=>t({behavior:"allow"}),d)}}case"progression":case"completion":{const n=await u({requiresRenderToBlock:!0});if(!n)return Qt;const{perform:s}=n.interceptorRunResponse;if(n.isBlocking){if(y.isThrottled(e.id)){if(!c){c=!0;const t=qe(e),{isRemoteDom:n,isHighValueExtension:a}=t;f.log("extension_throttled_buyer_journey_block_attempt","[Extensions::BuyerJourneyIntercept] Throttled extension attempted to block checkout progress",{...t,enforced:!0}),f.counter({name:"extension_throttled_buyer_journey_block_attempt",value:1,attributes:{isRemoteDom:n,isHighValueExtension:a,enforced:!0}})}return t.markNotBlocking(o),{behavior:"allow",errors:n.interceptorRunResponse.errors,perform:s&&Zt(()=>s({behavior:"block"}),d)}}return a("extensionBuyerJourneyBlock",{behavior:"block",reason:n.interceptorRunResponse.reason,extension:e,section:"extension",timestamp:new Date,validationErrors:n.interceptorRunResponse.errors??[]}),f.debug("extensions_buyer_journey_intercepted","[Extensions::BuyerJourneyIntercept] Blocked checkout progress",{...qe(e),errors:n.interceptorRunResponse.errors,reason:n.interceptorRunResponse.reason}),{behavior:"block",reason:w.InvalidExtensionState,errors:n.interceptorRunResponse.errors,perform:s&&Zt(()=>s({behavior:"block"}),d),context:{extension:Q(e)}}}return{behavior:"allow",perform:s&&Zt(()=>s({behavior:"allow"}),d)}}default:return n}},v=n.intercept(({reason:e})=>m(e));!function({interceptorRegistrationResolvers:e,interceptorRegistration:t,extension:n,sourceType:a,observability:s}){if(t)return i=e,o=n.id,void((r=t)&&i.get(o)===r&&r.resolve());var i,o,r;s.error(new ge("Error registering interceptor resolver. No corresponding extension found in interceptorRegistrationResolversSignal."),{metadata:{extension:Q(n),source:{type:a}}})}({interceptorRegistrationResolvers:g,interceptorRegistration:b,extension:e,sourceType:i,observability:f}),m("registration").then(async()=>{if(!p.isCheckoutLayoutForcedToOnePage.value||!p.wallets.isAcceleratedWalletEscalation.value||!t.rendered)return;const e=await u({requiresRenderToBlock:!0});if(!e?.isBlocking)return;const{perform:n}=e.interceptorRunResponse;n&&await Zt(()=>n({behavior:"block"}),d)()}).catch(t=>{f.error(t,{metadata:{extension:Q(e),source:{type:i}}})});const C=t.on("restart",()=>{I()}),A=t.on("destroy",()=>{I()}),I=()=>{t.markNotBlocking(o);for(const e of l)e.abort();v(),C(),A(),V(s)};return I},completed:o(s),steps:o(R(()=>
2{if(s.value)return[{handle:"thank-you",to:"shopify:checkout/thank-you",label:"thank-you",disabled:!1}];const{plan:{greenPath:e}}=c.value,t=l.value,n=d.value,a=u.value,i=e.filter(({skipOverPage:e})=>!e||!e(n)),o=i.findIndex(e=>e.id===t?.id),r=i.map((e,t)=>en({page:e,disabled:o>=0&&t>o}));return a&&r.unshift(en({page:a,disabled:!1})),r})),activeStep:o(R(()=>{if(s.value)return{handle:"thank-you"};const{plan:{greenPath:e}}=c.value,t=l.value;if(!t||!e.some(({id:e})=>e===t.id))return;const n=d.value;return t.skipOverPage?.(n)?void 0:{handle:tn(t).handle}}))}}function Xt(e,t,n){const a={finished:Promise.resolve(),abort:()=>{}},{captureEvent:s,extension:i}=t,o=t.duration??3e4,r=performance.now();let c,l;return a.abort=()=>{clearTimeout(l),c(void 0)},a.finished=Promise.race([new Promise(e=>{c=e,l=setTimeout(()=>{c(t.onTimeout())},o)}),e.finally(()=>{s("extensionInteraction",{interaction:"buyerJourneyInterceptor",extension:i,section:"extension",timestamp:new Date,duration:performance.now()-r,extensionInstanceId:n}),clearTimeout(l)})]),a}function Zt(e,t){const{observability:n,captureEvent:a,extension:s,sourceType:i,activeRaces:o,extensionInstance:c}=t,l=(async()=>{try{return await e()}catch(t){n.error(new r(`${t} (in buyer journey interceptor)`,{cause:t}),{metadata:{extension:Q(s),source:{type:i}}})}})();return async()=>{const e=Xt(l,{captureEvent:a,extension:s,onTimeout:()=>{n.error(new r("perform() in buyer journey interceptor timed out"),{metadata:{extension:Q(s),source:{type:i}}})}},c.id);o.push(e),await e.finished}}function en({page:e,disabled:t}){const{handle:n,route:a}=tn(e),{label:s}=e;return{handle:n,to:a,label:s,disabled:t}}function tn({id:e,route:t}){switch(e){case"information":case"shipping":case"payment":case"review":return{handle:e,route:`shopify:checkout${t}`};case"onePage":case"shopPay":return{handle:"checkout",route:`shopify:checkout${t}`};case"cart":return{handle:"cart",route:"shopify:cart"};default:return{handle:"unknown",route:"#"}}}function nn({cartInstructionsSignal:e,createSubscribableFromSignal:t}){return{instructions:t(e)}}function an({negotiated:e,createSubscribableFromSignal:t}){return{checkoutSettings:t(R(()=>{const t=e.fields.buyerIdentity.value?.customerProfile,n=e.fields.paymentFlexibilityPaymentTermsTemplate.value,a=n?{id:n.id,name:n.translatedName,dueDate:n.dueDate||void 0,dueInDays:n.dueInDays||void 0}:void 0;return{orderSubmission:e.fields.checkoutCompletionTarget.value||"ORDER",shippingAddress:{isEditable:"BusinessCustomerProfile"!==t?.__typename||!t.checkoutExperienceConfiguration||t.checkoutExperienceConfiguration.editableShippingAddress},paymentTermsTemplate:a}}))}}function sn(e,t){return e&&0!==e.length&&t?e.filter(e=>{const{targetMerchandiseLines:n}=e;return!n||0===n.length||!n.some(e=>k(e.stableId,t))}):e}function on({negotiated:e,isOnePageCheckout:t,createSubscribableFromSignal:n}){return{cost:{subtotalAmount:n(e.fields.subtotal),totalShippingAmount:n(R(()=>{const n=e.fields.deliveryNext.value,a=e.fields.remoteMerchandiseDetails.value;if("filled"!==n?.status)return;const s=sn(n.lines,a),i=(o=!t,s.reduce((e,t)=>{if("not_required"===t.status)return e;const{methods:n,selectedDeliveryMethodHandle:a}=t,s=n.find(({handle:e})=>a===e);if(!s)return e;const i=s?.priceBreakdown?.length&&s.priceBreakdown.every(e=>e.excludeFromDeliveryOptionPrice),r=s?.priceBreakdown?.every(e=>!Boolean(e.targetMerchandiseLines[0]?.sellingPlan?.prepaid));return i&&r&&o||e.push({costAfterDiscounts:s.costAfterDiscounts}),e},[]));var o;return 0!==i.length?{amount:i.reduce((e,{costAfterDiscounts:t})=>e+t.amount,0),currencyCode:i[0]?.costAfterDiscounts.currencyCode}:void 0})),totalTaxAmount:n(R(()=>{const t=e.fields.taxes.value;return"available_total"===t?.status?t.totalTax:"available_total_included"===t?.status?t.totalIncludedInTarget:void("unavailable"===t?.status&&console.error(`Taxes are unavailable: ${t.reason}`))})),totalAmount:n(e.fields.runningTotal)}}}class rn{constructor(e,t){this.measureAsync=({functionToMeasure:e})=>Promise.resolve(e()),this.measureSync=({functionToMeasure:e})=>e(),this.observability=t,this.extension=e}static wrapClient(e,t){return t instanceof rn?t:new rn(e,t)}counter(...e){this.observability.counter(...e)}gauge(...e){this.observability.gauge(...e)}histogram(...e){this.observability.histogram(...e)}debug(...e){this.observability.debug(...e)}log(...e){this.observability.log(...e)}addErrorMetadata(...e){this.observability.addErrorMetadata(...e)}leaveErrorBreadcrumb(...e){this.observability.leaveErrorBreadcrumb(...e)}addOnError(...e){this.observability.addOnError(...e)}removeOnError(...e){this.observability.removeOnError(...e)}async exportMetrics(){await this.observability.exportMetrics()}async exportLogs(){await this.observability.exportLogs()}addAttributesForLogs(...e){this.observability.addAttributesForLogs(...e)}enableKeepAlive(){return this.observability.enableKeepAlive()}error(e,t){const n={...t};n.metadata||(n.metadata={}),n.metadata.extension||(n.metadata.extension=Q(this.extension)),this.observability.error(e,n)}leaveBreadcrumb(e,t,n){this.observability.leaveErrorBreadcrumb(e,t,n)}}class cn{constructor(e){this.extension=e}filterMetafieldsByExtensionId(e){return e.filter(e=>{const t=e.namespace.split("--");return"app"===t[0]&&t[1]===p(this.extension.appId)||"app"!==t[0]})}}function ln({line:e,extension:t,observability:n,proposedSelectedDeliveryMethodHandles:a,lines:s}){const i=t?new cn(t):void 0;return K({line:e,extensionContext:i,observability:rn.wrapClient(t,n),proposedSelectedDeliveryMethodHandles:a,lines:s})}function dn({extension:e,negotiated:t,proposed:n,observability:a,createSubscribableFromSignal:s}){return{deliveryGroups:s(R(()=>{const s=t.fields.deliveryNext.value;if(!s)return[];const i=s.status;if("unavailable"===i)return[];const o=n.deliveryLines.value.map(e=>e.fields.deliveryMethodHandle.value),r=t.fields.remoteMerchandiseDetails.value;if("filled"===i||"partial"===i)return sn(s.lines,r).map(n=>ln({line:n,extension:e,observability:a,proposedSelectedDeliveryMethodHandles:o,lines:t.fields.merchandiseLines.value?.lines}));const c=`Unknown delivery status: ${i}`;return a.error(new ve(c),{metadata:{extension:Q(e)}}),[]}))}}function un({createSubscribableFromSignal:t,proposed:n,extension:a,negotiated:s}){return $(a.approvalScopes,e.CustomerPersonalData)?{localizedFields:t(R(()=>{const e=n.localizationExtensions.value;return e?e.map(({fields:e})=>({key:e.key.value,title:e.title.value,value:e.value.value??""})):(s.value.localizationExtensions||[]).map(({key:e,title:t,value:n})=>({key:e,title:t,value:n??""}))}))}:{localizedFields:void 0}}function pn({negotiated:e,proposed:t,createSubscribableFromSignal:n}){return{availablePaymentOptions:n(R(()=>{const n=e.fields.paymentMethods.value,a=t.paymentLines.value,s=e.fields.paymentLines.value,i=e.fields.deferredTotal.value,o="giftCard";if(!n)return[];let r=!1;const c=n?.filter(e=>e.type!==o||(r=!0,!1)).map(e=>({method:e}));if(!c&&!r)return[];const l=S(c),d=x(l,a,n,{negotiatedPaymentLines:s?.lines,deferredTotal:i}),u=d.some(e=>e.method.type===o);return d.map(e=>{const t="name"in e.method?e.method.name:void 0,n="paymentMethodIdentifier"in e.method&&e.method.paymentMethodIdentifier||void 0;return{handle:ee(e.method.type,t,n),type:Z(e.method.type)}}).concat(r&&!u?[{handle:ee(o),type:Z(o)}]:[])})),selectedPaymentOptions:n(R(()=>{const n=t.paymentLines.value,a=e.fields.paymentMethods.value,s=e.fields.paymentLines.value,i=e.fields.deferredTotal.value;if(!a)return[];const o=S(n);return x(o,n,a,{negotiatedPaymentLines:s?.lines,deferredTotal:i}).map(e=>{const t="name"in e.method?e.method.name:void 0,n="paymentMethodIdentifier"in e.method&&e.method.paymentMethodIdentifier||void 0;return{handle:ee(e.method.type,t,n),type:Z(e.method.type)}})}))}}function mn({extension:e,ui:t}){return{ui:{overlay:{close(n){xe(e,n)&&t.overlay.close(n)}}}}}function fn(e){const{shop:t,extension:n,extensionInstance:a}=e;switch(n.apiVersion){case"2023-04":{const s=Ct(e),{attributes:i}=Ke(e),{lines:o}=qt(e),{presentmentLines:r}=function({negotiated:e,createSubscribableFromSignal:t,observability:n}){return{presentmentLines:t(R(()=>{const t=e.fields.merchandiseLines.value;return t?t.lines.flatMap(e=>e.variantId?W(e).map(e=>$t(e)):(n.error(new A("Cannot create cart line API without a variantId. Custom merchandise lines are not yet supported.")),[])):[]}))}}(e),{note:c}=Yt(e),{metafields:l}=ot(e),{discountAllocations:d,discountCodes:u}=_t(e),{appliedGiftCards:p}=Ot(e),{shippingAddress:m}=We(e);return{version:n.apiVersion,extensionPoint:a.target,extension:{...s,apiVersion:s.apiVersion,target:s.target,capabilities:s.capabilities},settings:kt(e),shop:St(t),appliedGiftCards:p,attributes:i,discountAllocations:d,discountCodes:u,lines:o,metafields:l,note:c,presentmentLines:r,shippingAddress:m,buyerJourney:Kt(e),...an(e),...At(e),...Wt(e),...on(e),...pn(e),...dn(e),...mt(e),storage:xt(e),...dt(e),...Te(e),...It(e),...mn(e)}}case"2023-07":{const a=Ct(e),{attributes:s}=Ke(e),{lines:i}=qt(e),{note:o}=Yt(e),{metafields:r}=ot(e),{discountAllocations:c,discountCodes:l}=_t(e),{appliedGiftCards:d}=Ot(e),{shippingAddress:u}=We(e);return{version:n.apiVersion,extensionPoint:n.extensionPoint.target,extension:{...a,apiVersion:a.apiVersion,target:a.target,capabilities:a.capabilities},settings:kt(e),shop:St(t),appliedGiftCards:d,attributes:s,discountAllocations:c,discountCodes:l,lines:i,metafields:r,note:o,shippingAddress:u,buyerJourney:Kt(e),...an(e),...At(e),...Wt(e),...on(e),...pn(e),...dn(e),...mt(e),storage:xt(e),...dt(e),...Te(e),...It(e),...mn(e)}}case"2023-10":{const a=Ct(e),{attributes:s}=Ke(e),{lines:i}=qt(e),{note:o}=Yt(e),{metafields:r}=ot(e),{discountAllocations:c,discountCodes:l}=_t(e),{appliedGiftCards:d}=Ot(e),{shippingAddress:u,billingAddress:p}=We(e);return{version:n.apiVersion,extensionPoint:n.extensionPoint.target,extension:{...a,apiVersion:a.apiVersion,target:a.target,capabilities:a.capabilities},settings:kt(e),shop:St(t),appliedGiftCards:d,attributes:s,discountAllocations:c,discountCodes:l,lines:i,metafields:r,note:o,shippingAddress:u,billingAddress:p,buyerJourney:Kt(e),...an(e),...At(e),...Wt(e),...on(e),...pn(e),...dn(e),...mt(e),storage:Tt(e),...dt(e),...Te(e),...It(e),...mn(e),...bt(e)}}case"2024-01":{const a=Ct(e),{attributes:s}=Ke(e),{lines:i}=qt(e),{note:o}=Yt(e),{metafields:r}=ot(e),{discountAllocations:c,discountCodes:l}=_t(e),{appliedGiftCards:d}=Ot(e),{shippingAddress:u,billingAddress:p}=We(e);return{version:n.apiVersion,extensionPoint:n.extensionPoint.target,extension:{...a,apiVersion:a.apiVersion,target:a.target,capabilities:a.capabilities},settings:kt(e),shop:St(t),appliedGiftCards:d,attributes:s,discountAllocations:c,discountCodes:l,lines:i,metafields:r,note:o,shippingAddress:u,billingAddress:p,buyerJourney:Kt(e),...an(e),...At(e),...Wt(e),...on(e),...pn(e),...dn(e),...mt(e),storage:Tt(e),...dt(e),...Te(e),...It(e),...mn(e),...bt(e)}}case"2024-04":{const a=Ct(e),{attributes:s}=Ke(e),{lines:i}=qt(e),{note:o}=Yt(e),{metafields:r}=ot(e),{discountAllocations:c,discountCodes:l}=_t(e),{appliedGiftCards:d}=Ot(e),{shippingAddress:u,billingAddress:p}=We(e);return{version:n.apiVersion,extensionPoint:n.extensionPoint.target,extension:{...a,apiVersion:a.apiVersion,target:a.target,capabilities:a.capabilities},settings:kt(e),shop:wt(t),appliedGiftCards:d,attributes:s,discountAllocations:c,discountCodes:l,lines:i,metafields:r,note:o,shippingAddress:u,billingAddress:p,buyerJourney:Kt(e),...an(e),...At(e),...Wt(e),...on(e),...pn(e),...dn(e),...mt(e),storage:Tt(e),...dt(e),...Te(e),...It(e),...mn(e),...bt(e),...Ve(e)}}case"2024-07":{const a=Ct(e),{attributes:s}=Ke(e),{lines:i}=qt(e),{note:o}=Yt(e),{metafields:r}=ot(e),{discountAllocations:c,discountCodes:l}=_t(e),{appliedGiftCards:d}=Ot(e),{shippingAddress:u,billingAddress:p}=We(e);return{version:n.apiVersion,extensionPoint:n.extensionPoint.target,extension:{...a,apiVersion:a.apiVersion,target:a.target,capabilities:a.capabilities},settings:kt(e),shop:wt(t),appliedGiftCards:d,attributes:s,discountAllocations:c,discountCodes:l,lines:i,metafields:r,note:o,shippingAddress:u,billingAddress:p,buyerJourney:Kt(e),...an(e),...At(e),...Wt(e),...on(e),...pn(e),...dn(e),...mt(e),storage:Tt(e),...dt(e),...Te(e),...It(e),...mn(e),...bt(e),...Ve(e),...nn(e)}}case"2024-10":{const a=Ct(e),{attributes:s}=Ke(e),{lines:i}=qt(e),{note:o}=Yt(e),{metafields:r}=ot(e),{discountAllocations:c,discountCodes:l}=_t(e),{appliedGiftCards:d}=Ot(e),{shippingAddress:u,billingAddress:p}=We(e);return{version:n.apiVersion,extensionPoint:n.extensionPoint.target,extension:{...a,apiVersion:a.apiVersion,target:a.target},settings:kt(e),shop:wt(t),appliedGiftCards:d,attributes:s,discountAllocations:c,discountCodes:l,lines:i,metafields:r,note:o,shippingAddress:u,billingAddress:p,buyerJourney:Kt(e),...an(e),...At(e),...Wt(e),...on(e),...pn(e),...dn(e),...mt(e),storage:Tt(e),...dt(e),...Te(e),...It(e),...mn(e),...bt(e),...Ve(e),...nn(e)}}case"2025-01":{const a=Ct(e),{attributes:s}=Ke(e),{lines:i}=qt(e),{note:o}=Yt(e),{metafields:r}=ot(e),{discountAllocations:c,discountCodes:l}=_t(e),{appliedGiftCards:d}=Ot(e),{shippingAddress:u,billingAddress:p}=We(e);return{version:n.apiVersion,extensionPoint:n.extensionPoint.target,extension:{...a,apiVersion:a.apiVersion,target:a.target},settings:kt(e),shop:wt(t),appliedGiftCards:d,attributes:s,discountAllocations:c,discountCodes:l,lines:i,metafields:r,note:o,shippingAddress:u,billingAddress:p,buyerJourney:Kt(e),...an(e),...At(e),...Wt(e),...on(e),...pn(e),...dn(e),...mt(e),storage:Tt(e),...dt(e),...Te(e),...It(e),...mn(e),...bt(e),...Ve(e),...nn(e),...un(e)}}case"2025-04":{const a=Ct(e),{attributes:s}=Ke(e),{lines:i}=qt(e),{note:o}=Yt(e),{metafields:r}=ot(e),{discountAllocations:c,discountCodes:l}=_t(e),{appliedGiftCards:d}=Ot(e),{shippingAddress:u,billingAddress:p}=We(e);return{version:n.apiVersion,extensionPoint:n.extensionPoint.target,extension:{...a,apiVersion:a.apiVersion,target:a.target},settings:kt(e),shop:wt(t),appliedGiftCards:d,attributes:s,discountAllocations:c,discountCodes:l,lines:i,metafields:r,note:o,shippingAddress:u,billingAddress:p,buyerJourney:Kt(e),...an(e),...At(e),...Wt(e),...on(e),...pn(e),...dn(e),...mt(e),storage:Tt(e),...dt(e),...Te(e),...It(e),...mn(e),...bt(e),...Ve(e),...nn(e),...un(e)}}case"2025-07":case"unstable":{const a=Ct(e),{attributes:s}=Ke(e),{lines:i}=qt(e),{note:o}=Yt(e),{metafields:r}=ot(e),{discountAllocations:c,discountCodes:l}=_t(e),{appliedGiftCards:d}=Ot(e),{shippingAddress:u,billingAddress:p}=We(e);return{version:n.apiVersion,extensionPoint:n.extensionPoint.target,extension:{...a,apiVersion:a.apiVersion,target:a.target},settings:kt(e),shop:wt(t),appliedGiftCards:d,attributes:s,discountAllocations:c,discountCodes:l,lines:i,metafields:r,note:o,shippingAddress:u,billingAddress:p,buyerJourney:Kt(e),...an(e),...At(e),...Wt(e),...on(e),...pn(e),...dn(e),...mt(e),storage:Tt(e),...dt(e),...Te(e),...It(e),...mn(e),...bt(e),...Ve(e),...nn(e),...un(e)}}case"2025-10":{const a=Ct(e),{attributes:s}=Ke(e),{lines:i}=qt(e),{note:o}=Yt(e),{metafields:r}=ot(e),{discountAllocations:c,discountCodes:l}=_t(e),{appliedGiftCards:d}=Ot(e),{shippingAddress:u,billingAddress:p}=We(e);return{version:n.apiVersion,extensionPoint:n.extensionPoint.target,extension:{...a,apiVersion:a.apiVersion,target:a.target},settings:kt(e),shop:wt(t),appliedGiftCards:d,attributes:s,discountAllocations:c,discountCodes:l,lines:i,metafields:r,note:o,shippingAddress:u,billingAddress:p,buyerJourney:Kt(e),...an(e),...At(e),...Wt(e),...on(e),...pn(e),...dn(e),...mt(e),storage:Tt(e),...dt(e),...Te(e),...It(e),...mn(e),...bt(e),...Ve(e),...nn(e),...un(e)}}case"2026-01":{const a=Ct(e),{attributes:s}=Ke(e),{lines:i}=qt(e),{note:o}=Yt(e),{metafields:r}=ot(e),{discountAllocations:c,discountCodes:l}=_t(e),{appliedGiftCards:d}=Ot(e),{shippingAddress:u,billingAddress:p}=We(e);return{version:n.apiVersion,extensionPoint:n.extensionPoint.target,extension:{...a,apiVersion:a.apiVersion,target:a.target},settings:kt(e),shop:wt(t),appliedGiftCards:d,attributes:s,discountAllocations:c,discountCodes:l,lines:i,metafields:r,note:o,shippingAddress:u,billingAddress:p,buyerJourney:Kt(e),...an(e),...At(e),...Wt(e),...on(e),...pn(e),...dn(e),...mt(e),storage:Tt(e),...dt(e),...Te(e),...It(e),...mn(e),...bt(e),...Ve(e),...nn(e),...un(e)}}case"2026-04":{const a=Ct(e),{attributes:s}=Ke(e),{lines:i}=qt(e),{note:o}=Yt(e),{discountAllocat
2ions:r,discountCodes:c}=_t(e),{appliedGiftCards:l}=Ot(e),{shippingAddress:d,billingAddress:u}=We(e);return{version:n.apiVersion,extensionPoint:n.extensionPoint.target,extension:{...a,apiVersion:a.apiVersion,target:a.target},settings:kt(e),shop:wt(t),appliedGiftCards:l,attributes:s,discountAllocations:r,discountCodes:c,lines:i,note:o,shippingAddress:d,billingAddress:u,buyerJourney:Kt(e),...an(e),...At(e),...Wt(e),...on(e),...pn(e),...dn(e),...mt(e),storage:Tt(e),...dt(e),...Te(e),...It(e),...bt(e),...Ve(e),...nn(e),...un(e)}}case"2026-07":{const a=Ct(e),{attributes:s}=Ke(e),{lines:i}=qt(e),{note:o}=Yt(e),{discountAllocations:r,discountCodes:c}=_t(e),{appliedGiftCards:l}=Ot(e),{shippingAddress:d,billingAddress:u}=We(e);return{version:n.apiVersion,extensionPoint:n.extensionPoint.target,extension:{...a,apiVersion:a.apiVersion,target:a.target},settings:kt(e),shop:wt(t),appliedGiftCards:l,attributes:s,discountAllocations:r,discountCodes:c,lines:i,note:o,shippingAddress:d,billingAddress:u,buyerJourney:Kt(e),...an(e),...At(e),...Wt(e),...on(e),...pn(e),...dn(e),...mt(e),storage:Tt(e),...dt(e),...Te(e),...It(e),...bt(e),...Ve(e),...nn(e),...un(e)}}case"2026-10":{const a=Ct(e),{attributes:s}=Ke(e),{lines:i}=qt(e),{note:o}=Yt(e),{discountAllocations:r,discountCodes:c}=_t(e),{appliedGiftCards:l}=Ot(e),{shippingAddress:d,billingAddress:u}=We(e);return{version:n.apiVersion,extensionPoint:n.extensionPoint.target,extension:{...a,apiVersion:a.apiVersion,target:a.target},settings:kt(e),shop:wt(t),appliedGiftCards:l,attributes:s,discountAllocations:r,discountCodes:c,lines:i,note:o,shippingAddress:d,billingAddress:u,buyerJourney:Kt(e),...an(e),...At(e),...Wt(e),...on(e),...pn(e),...dn(e),...mt(e),storage:Tt(e),...dt(e),...Te(e),...It(e),...bt(e),...Ve(e),...nn(e),...un(e)}}case"2027-01":{const a=Ct(e),{attributes:s}=Ke(e),{lines:i}=qt(e),{note:o}=Yt(e),{discountAllocations:r,discountCodes:c}=_t(e),{appliedGiftCards:l}=Ot(e),{shippingAddress:d,billingAddress:u}=We(e);return{version:n.apiVersion,extensionPoint:n.extensionPoint.target,extension:{...a,apiVersion:a.apiVersion,target:a.target},settings:kt(e),shop:wt(t),appliedGiftCards:l,attributes:s,discountAllocations:r,discountCodes:c,lines:i,note:o,shippingAddress:d,billingAddress:u,buyerJourney:Kt(e),...an(e),...At(e),...Wt(e),...on(e),...pn(e),...dn(e),...mt(e),storage:Tt(e),...dt(e),...Te(e),...It(e),...bt(e),...Ve(e),...nn(e),...un(e)}}default:s(n.apiVersion)}}function yn(e,{stableId:t}){const{extension:n}=e;switch(n.apiVersion){case"2023-04":return{...gn(e,t)};case"2023-07":case"2023-10":case"2024-01":case"2024-04":case"2024-07":case"2024-10":case"2025-01":case"2025-04":case"2025-07":case"unstable":case"2025-10":case"2026-01":case"2026-04":case"2026-07":case"2026-10":case"2027-01":return{...hn(e,t)};default:s(n.apiVersion)}}function hn({createSubscribableFromSignal:e,negotiated:t},n){let a;return{target:e(R(()=>{const e=t.fields.merchandiseLines.value,s=te({stableId:n,merchandiseLines:e?.lines??[]});if(null===s&&!a)throw new Ce("No merchandise item found");return null!==s&&(a=Ft(s)),a}))}}function gn({createSubscribableFromSignal:e,negotiated:t},n){let a;return{target:e(R(()=>{const e=t.fields.merchandiseLines.value,s=ne(n,e?.lines??[]);if(null===s&&!a)throw new Ce("No merchandise item found");if(null!==s){const{parent:e,index:t}=s;a=$t(ae(e,t))}return a}))}}function bn({applyChange:t,extension:n,proposed:a,createSubscribableFromSignal:s,extensionInstance:i,bankIdNumberSignal:o},{paymentMethodIdentifier:c}){const l=$(n.approvalScopes,e.CheckoutExtensionPayments);return{applyPaymentMethodAttributesChange:async function(e){return t({unknownChange:e,extension:n,extensionInstanceId:i.id,handlers:{async updatePaymentMethodAttributes({change:e}){if(!l)throw new r(vn);e.attributes.forEach(e=>{if("string"==typeof e.value&&e.value.length>64)throw new r(`Value length exceeded threshold 64 for key ${e.key}`)});const t=a.paymentLines.peek();return a.paymentLines.value=t.map(t=>"customOnsite"!==t.method.type&&"direct"!==t.method.type||t.method.paymentMethodIdentifier!==c?t:{...t,method:{...t.method,paymentAttributes:JSON.stringify(e.attributes)}}),{type:"success"}}},errorResult:e=>({type:"error",message:e.message})})},paymentMethodAttributes:l?s(R(()=>{const e=a.paymentLines.value.find(({method:e})=>
2{if("direct"===e.type||"customOnsite"===e.type)return e.paymentMethodIdentifier===c&&e.paymentAttributes});if(e){const{paymentAttributes:t}=e.method;if(t)return JSON.parse(t)}})):void 0,bankIdNumber:l?s(o):void 0}}const vn="Access denied: the extension does not have the required approval scopes";function Cn({createSubscribableFromSignal:e,extension:t,negotiated:n,proposal:a},s){let i;const o=s?.handle,r=e(R(()=>{const e=n.fields.deliveryNext.value;if(!e)return i;if("filled"!==e.status)return i;const a=e.lines.filter(e=>"available"===e.status).flatMap(e=>e.methods).find(e=>e.handle===o);if(a){const e=function(e,t){return X(e,new cn(t))}(a,t);i=d(i,e)?i:e}return i}));return{target:r,isTargetSelected:e(R(()=>a.parts.deliveryLines.value.some(({fields:{deliveryMethodHandle:e}})=>o===e.value)))}}function An({createSubscribableFromSignal:e},{isLocationFormVisible:t}){return{isLocationFormVisible:e(L(t))}}function In({createSubscribableFromSignal:e},{isLocationFormVisible:t}){return{isLocationFormVisible:e(L(t))}}function kn({extension:t,negotiated:n,applyChange:a,extensionInstance:s},{paymentMethodIdentifier:i,submitRedeemablePaymentLine:o}){return{applyRedeemableChange:async c=>a({unknownChange:c,extension:t,extensionInstanceId:s.id,handlers:{async redeemableAddChange({negotiate:a,change:s}){if("local"!==t.type&&!$(t.approvalScopes,e.CheckoutExtensionRedeemables))throw new r("Access denied: the extension does not have the required approval scopes");const c=n.fields.availableRedeemables.peek()?.map(e=>({paymentMethod:Ee(e.paymentMethod)}))??[],l={paymentMethod:{type:"redeemable",redemptionSource:"CUSTOM",redemptionContent:{paymentMethodIdentifier:i,maskedIdentifier:(d=s.identifier,d.slice(0,-4).replace(/./g,"•")+d.slice(-4)),redemptionAttributes:s.attributes}}};var d;const u=Ne(l),p=await a({customizeNegotiation:e=>({...e,availableRedeemables:{availableRedeemables:c.concat(u)}}),fieldsToResolve:["availableRedeemables"]}),m="error"===p.status&&p.violations.some(se),f=p.violations.find(se);if(m)throw new r("Could not apply redeemable",{cause:{code:f?.code}});if(o){const e=p.negotiated.availableRedeemables?.find(e=>ie(l.paymentMethod,e.paymentMethod)),t=p.negotiated.paymentDue;if(!e||!t)throw new r("Could not apply redeemable",{cause:{code:f?.code}});const n=await o(e,t),a=n&&("error"===n.status&&n.violations.some(T)||"error"!==n.status&&"success"!==n.status);if(!n||a)throw new r("Could not submit redeemable as a payment line")}return{type:"success"}}},errorResult:e=>({type:"error",message:e.message})})}}function wn({createSubscribableFromSignal:e,extension:t,negotiated:n,proposal:a},{handle:s,isInModal:i}){let o;return{target:e(R(()=>{const e=t?new cn(t):void 0,a=n.fields.deliveryNext.value;if(!a)return o;if("filled"!==a.status)return o;const i=a.lines.filter(e=>"available"===e.status).flatMap(e=>e.methods).find(e=>e.handle===s);if(i){const t=oe(i,e);o=d(o,t)?o:t}return o})),isTargetSelected:e(R(()=>a.parts.deliveryLines.value.some(e=>s===e.fields.deliveryMethodHandle.value))),renderMode:{overlay:i??!1}}}function Sn(e,t){const{extension:{apiVersion:n}}=e;switch(n){case"2023-04":case"2023-07":case"2023-10":return{};case"2024-01":case"2024-04":return function({createSubscribableFromSignal:e,observability:t,extension:n,proposed:a,negotiated:s},{groupType:i}){return{target:e(R(()=>{const e=s.fields.deliveryNext.value;if(!i||"filled"!==e?.status)return;const o=s.fields.remoteMerchandiseDetails.value,r=sn(e.lines.filter(D),o).filter(({type:e})=>re(e)===i),c=a.deliveryLines.value.filter(e=>re(e.fields.type.value)===i).map(e=>e.fields.deliveryMethodHandle.value),l=s.fields.merchandiseLines.value?.lines,[d]=r;return d?ln({line:d,extension:n,observability:t,proposedSelectedDeliveryMethodHandles:c,lines:l}):void 0}))}}(e,t??{});case"2024-07":case"2024-10":case"2025-01":case"2025-04":case"2025-07":case"unstable":case"2025-10":case"2026-01":case"2026-04":case"2026-07":case"2026-10":case"2027-01":return xn(e,t??{});default:s(n)}}function xn({createSubscribableFromSignal:e,observability:t,extension:n,proposed:a,negotiated:s},{includeDeliverySelectionGroups:i,groupType:o}){return{target:e(R(()=>{const e=s.fields.deliveryNext.value;if(!o||"filled"!==e?.status)return;const i=s.fields.remoteMerchandiseDetails.value,r=sn(e.lines.filter(D),i).filter(({type:e})=>re(e)===o),c=a.deliveryLines.value.filter(e=>re(e.fields.type.value)===o).map(e=>e.fields.deliveryMethodHandle.value),l=s.fields.merchandiseLines.value?.lines,d=r.map(e=>ln({line:e,extension:n,observability:t,proposedSelectedDeliveryMethodHandles:c,lines:l}));return d.length>0?{groupType:o,deliveryGroups:d}:void 0})),deliverySelectionGroups:e(R(()=>{const e=a.deliveryMacros.value,t=a.deliveryLines.value.map(e=>e.value).filter(({type:e,deliveryMethodTypes:t})=>"ONE_TIME_PURCHASE"===e&&t.some(e=>"SHIPPING"===e||"LOCAL"===e));if(!i||!e.length||!t.length)return;const n=new Set(t.map(({deliveryMethodHandle:e})=>e).filter(e=>Boolean(e)));return e.map(e=>{const t=Object.values(e.deliveryMethodHandles).filter(e=>Boolean(e));return{handle:e.id,selected:t.length===n.size&&t.every(e=>n.has(e)),title:e.title,associatedDeliveryOptions:t.map(e=>({handle:e})),cost:{amount:e.cost.amount,currencyCode:e.cost.currencyCode},costAfterDiscounts:{amount:e.costAfterDiscounts.amount,currencyCode:e.costAfterDiscounts.currencyCode}}})}))}}const Tn={name:"Checkout::Dynamic::Render",api:e=>({...fn(e),...Jt(e),...zt(e)})},Dn={name:"Checkout::Actions::RenderBefore",api:e=>({...fn(e),...Jt(e)})},Pn={name:"Checkout::CartLineDetails::RenderAfter",api:(e,t)=>({...fn(e),...Jt(e),...yn(e,t),...zt(e)})},Rn={name:"Checkout::CartLineDetails::RenderLineComponents",api:(e,t)=>({...fn(e),...yn(e,t)})},_n={name:"Checkout::CartLines::RenderAfter",api:e=>({...fn(e),...Jt(e),...zt(e)})},En={name:"Checkout::Contact::RenderAfter",api:e=>({...fn(e),...Jt(e)})},Nn={name:"Checkout::CustomerInformation::RenderAfter",api:e=>({...fn(e),...Jt(e),...zt(e)})},Mn={name:"Checkout::DeliveryAddress::RenderBefore",api:e=>({...fn(e),...Jt(e)})},On={name:"purchase.checkout.delivery-address.render-after",api:e=>({...fn(e),...Jt(e)})},Ln={name:"Checkout::GiftCard::Render",api:(e,t)=>({...fn(e),...Jt(e),...kn(e,t)})},Un={name:"Checkout::PaymentMethod::Render",api:(e,t)=>({...fn(e),...Jt(e),...bn(e,t)})},Vn={name:"Checkout::PaymentMethod::HostedFields::RenderAfter",api:(e,t)=>({...fn(e),...Jt(e),...bn(e,t)})},Fn={name:"Checkout::PaymentMethod::RenderRequiredAction",api:e=>({...fn(e),...Jt(e)})},Gn={name:"purchase.checkout.payment-method-list.render-before",api:e=>({...fn(e),...Jt(e)})},$n={name:"purchase.checkout.payment-method-list.render-after",api:e=>({...fn(e),...Jt(e)})},Bn={name:"Checkout::PickupLocations::RenderBefore",api:(e,t)=>({...fn(e),...Jt(e),...An(e,t)})},jn={name:"Checkout::PickupLocations::RenderAfter",api:(e,t)=>({...fn(e),...Jt(e),...An(e,t)})},Hn={name:"Checkout::PickupPoints::RenderBefore",api:(e,t)=>({...fn(e),...Jt(e),...In(e,t)})},qn={name:"Checkout::PickupPoints::RenderAfter",api:(e,t)=>({...fn(e),...Jt(e),...In(e,t)})}
2,Yn={name:"purchase.checkout.pickup-location-option-item.render-after",api:(e,t)=>({...fn(e),...Jt(e),...Cn(e,t)})},Jn={name:"Checkout::Reductions::RenderBefore",api:e=>({...fn(e),...Jt(e)})},zn={name:"Checkout::Reductions::RenderAfter",api:e=>({...fn(e),...Jt(e)})},Wn={name:"Checkout::ShippingMethodDetails::RenderAfter",api:(e,t)=>({...fn(e),...Jt(e),...wn(e,t)})},Qn={name:"Checkout::ShippingMethodDetails::RenderExpanded",api:(e,t)=>({...fn(e),...Jt(e),...wn(e,t)})},Kn={name:"Checkout::ShippingMethods::RenderBefore",api:(e,t)=>({...fn(e),...Jt(e),...Sn(e,t)})},Xn={name:"Checkout::ShippingMethods::RenderAfter",api:(e,t)=>({...fn(e),...Jt(e),...Sn(e,t)})},Zn={name:"purchase.checkout.header.render-after",api:e=>({...fn(e),...Jt(e)})},ea={name:"purchase.checkout.footer.render-after",api:e=>({...fn(e),...Jt(e)})},ta={name:"purchase.checkout.chat.render",api:e=>({...fn(e),...Jt(e)})};function na({extensionInstance:e,announcementEmitter:t}){return"purchase.thank-you.announcement.render"!==e.target||(e.on("destroy",()=>{t.removeAllListeners()}),e.on("restart",()=>{t.removeAllListeners()})),{}}function aa({createSubscribableFromSignal:e,checkout:t,isCheckoutEditor:n,journeyCompletedSignal:a,observability:s}){return{orderConfirmation:e(R(()=>{const e=t.latestReceipt.value,i=!e||"processed"!==e.status;if(i&&n)return{order:{id:P("Order","0")},number:Me().substring(0,10),isFirstOrder:!0};if(i){const t=a.peek()?"No receipt available on thankYou page":"No receipt available";throw e&&s.leaveErrorBreadcrumb("Receipt (OrderConfirmationApi):",{status:e.status,keys:Object.keys(e)}),new Ae(t)}return{order:{id:e.orderIdentity.id},number:e.orderIdentity.buyerIdentifier??void 0,isFirstOrder:e.isFirstOrder??!0}}))}}const sa={name:"Checkout::ThankYou::Dynamic::Render",api:e=>({...fn(e),...aa(e)})},ia={name:"Checkout::ThankYou::CartLineDetails::RenderAfter",api:(e,t)=>({...fn(e),...yn(e,t),...aa(e)})},oa={name:"Checkout::ThankYou::CartLines::RenderAfter",api:e=>({...fn(e),...aa(e)})},ra={name:"Checkout::ThankYou::CustomerInformation::RenderAfter",api:e=>({...fn(e),...aa(e)})},ca={name:"purchase.thank-you.header.render-after",api:e=>({...fn(e),...aa(e)})},la={name:"purchase.thank-you.footer.render-after",api:e=>({...fn(e),...aa(e)})},da={name:"purchase.thank-you.chat.render",api:e=>({...fn(e),...aa(e)})},ua={name:"purchase.thank-you.announcement.render",api:e=>({...fn(e),...aa(e),...na(e)})},pa={[Tn.name]:Tn,[Dn.name]:Dn,[Pn.name]:Pn,[Rn.name]:Rn,[_n.name]:_n,[En.name]:En,[Nn.name]:Nn,[Mn.name]:Mn,[On.name]:On,[Ln.name]:Ln,[Un.name]:Un,[Vn.name]:Vn,[Gn.name]:Gn,[$n.name]:$n,[Bn.name]:Bn,[jn.name]:jn,[Yn.name]:Yn,[Hn.name]:Hn,[qn.name]:qn,[Fn.name]:Fn,[Jn.name]:Jn,[zn.name]:zn,[Wn.name]:Wn,[Kn.name]:Kn,[Xn.name]:Xn,[Qn.name]:Qn,[Zn.name]:Zn,[ea.name]:ea,[ta.name]:ta,[sa.name]:sa,[ia.name]:ia,[oa.name]:oa,[ra.name]:ra,[ca.name]:ca,[la.name]:la,[da.name]:da,[ua.name]:ua},ma=[ta.name,da.name,ua.name],fa=[ta.name,da.name,ua.name];export{ma as D,jt as M,pa as R,fa as a,We as b,Ke as c,ot as d,qe as e,mt as f,Tt as g,wt as h,Ge as i,kt as j,Ct as k,It as l,At as m,bt as n,dt as o,Pt as p,vt as q,je as r,lt as s,He as t,$e as u,Fe as v,Le as w,Be as x,Ue as y};

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.