@dropins/storefront-checkout 3.1.0 → 3.2.0-alpha-20260304151900
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/estimateShippingMethods/graphql/estimateShippingMethods.graphql.d.ts +1 -1
- package/api/fragments.d.ts +1 -1
- package/api/graphql/ShippingMethodFragment.graphql.d.ts +1 -0
- package/api/initialize/initialize.d.ts +1 -0
- package/api.js +2 -2
- package/api.js.map +1 -1
- package/chunks/cjs.js +4 -0
- package/chunks/cjs.js.map +1 -0
- package/chunks/render.js +3 -3
- package/chunks/render.js.map +1 -1
- package/chunks/setShippingAddress.js +13 -28
- package/chunks/setShippingAddress.js.map +1 -1
- package/chunks/synchronizeCheckout.js.map +1 -1
- package/chunks/transform-shipping-estimate.js +1 -1
- package/chunks/transform-shipping-estimate.js.map +1 -1
- package/components/ShippingMethods/ShippingMethods.d.ts +5 -0
- package/containers/PaymentMethods.js +1 -1
- package/containers/PaymentMethods.js.map +1 -1
- package/containers/ShippingMethods/ShippingMethods.d.ts +13 -0
- package/containers/ShippingMethods.js +1 -1
- package/containers/ShippingMethods.js.map +1 -1
- package/data/transforms/transform-shipping-estimate.d.ts +3 -0
- package/fragments.js +31 -10
- package/fragments.js.map +1 -1
- package/lib/utils.js +1 -1
- package/lib/utils.js.map +1 -1
- package/package.json +1 -1
- package/render.js +3 -3
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
* is strictly forbidden unless prior written permission is obtained
|
|
15
15
|
* from Adobe.
|
|
16
16
|
*******************************************************************/
|
|
17
|
-
export declare const estimateShippingMethodsMutation
|
|
17
|
+
export declare const estimateShippingMethodsMutation: string;
|
|
18
18
|
//# sourceMappingURL=estimateShippingMethods.graphql.d.ts.map
|
package/api/fragments.d.ts
CHANGED
|
@@ -20,5 +20,5 @@ export { CUSTOMER_FRAGMENT } from './graphql/CustomerFragment.graphql';
|
|
|
20
20
|
export { NEGOTIABLE_QUOTE_BILLING_ADDRESS_FRAGMENT, NEGOTIABLE_QUOTE_SHIPPING_ADDRESS_FRAGMENT, } from './graphql/NegotiableQuoteAddressFragment.graphql';
|
|
21
21
|
export { NEGOTIABLE_QUOTE_FRAGMENT } from './graphql/NegotiableQuoteFragment.graphql';
|
|
22
22
|
export { AVAILABLE_PAYMENT_METHOD_FRAGMENT, SELECTED_PAYMENT_METHOD_FRAGMENT, } from './graphql/PaymentMethodFragment.graphql';
|
|
23
|
-
export { AVAILABLE_SHIPPING_METHOD_FRAGMENT, SELECTED_SHIPPING_METHOD_FRAGMENT, } from './graphql/ShippingMethodFragment.graphql';
|
|
23
|
+
export { AVAILABLE_SHIPPING_METHOD_FRAGMENT, ESTIMATE_SHIPPING_METHOD_FRAGMENT, SELECTED_SHIPPING_METHOD_FRAGMENT, } from './graphql/ShippingMethodFragment.graphql';
|
|
24
24
|
//# sourceMappingURL=fragments.d.ts.map
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* is strictly forbidden unless prior written permission is obtained
|
|
15
15
|
* from Adobe.
|
|
16
16
|
*******************************************************************/
|
|
17
|
+
export declare const ESTIMATE_SHIPPING_METHOD_FRAGMENT = "\n fragment ESTIMATE_SHIPPING_METHOD_FRAGMENT on AvailableShippingMethod {\n amount {\n currency\n value\n }\n available\n carrier_code\n carrier_title\n error_message\n method_code\n method_title\n price_excl_tax {\n value\n currency\n }\n price_incl_tax {\n value\n currency\n }\n }\n";
|
|
17
18
|
export declare const AVAILABLE_SHIPPING_METHOD_FRAGMENT = "\n fragment AVAILABLE_SHIPPING_METHOD_FRAGMENT on AvailableShippingMethod {\n amount {\n currency\n value\n }\n carrier_code\n carrier_title\n error_message\n method_code\n method_title\n price_excl_tax {\n value\n currency\n }\n price_incl_tax {\n value\n currency\n }\n }\n";
|
|
18
19
|
export declare const SELECTED_SHIPPING_METHOD_FRAGMENT = "\n fragment SELECTED_SHIPPING_METHOD_FRAGMENT on SelectedShippingMethod {\n amount {\n currency\n value\n }\n carrier_code\n carrier_title\n method_code\n method_title\n price_excl_tax {\n value\n currency\n }\n price_incl_tax {\n value\n currency\n }\n }\n";
|
|
19
20
|
//# sourceMappingURL=ShippingMethodFragment.graphql.d.ts.map
|
package/api.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*! Copyright 2026 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
|
-
import{a as
|
|
3
|
+
import{a as G,c as S,g as T,b as k,i as y,d as O,r as F,s as M}from"./chunks/synchronizeCheckout.js";import{e as H,s as N}from"./chunks/setShippingAddress.js";import{d as o}from"./chunks/fetch-graphql.js";import{D as U,S as R,f as q,g as v,e as z,j as D,r as K,a as L,b as j,c as w}from"./chunks/fetch-graphql.js";import"@dropins/tools/lib.js";import"@dropins/tools/event-bus.js";import{A as s}from"./chunks/checkout.js";import{g as I}from"./chunks/getCompanyCredit.js";import{g as V,i as Y,s as J}from"./chunks/setGuestEmailOnCart.js";import{s as X}from"./chunks/setBillingAddress.js";import{s as $}from"./chunks/setPaymentMethod.js";import{s as et,s as ot}from"./chunks/setShippingMethods.js";import"./fragments.js";import"./chunks/transform-shipping-methods.js";import"./chunks/classifiers.js";import"./chunks/transform-shipping-estimate.js";import"./chunks/cjs.js";import"./chunks/values.js";import"./chunks/guards.js";import"@dropins/tools/signals.js";import"@dropins/tools/fetch-graphql.js";const r=e=>e?e.filter(t=>!!t).map(t=>({id:t.agreement_id,name:t.name,mode:s[t.mode],text:t.checkbox_text,content:{value:t.content,html:t.is_html,height:t.content_height??null}})):[],a=`
|
|
4
4
|
query GET_CHECKOUT_AGREEMENTS {
|
|
5
5
|
checkoutAgreements {
|
|
6
6
|
agreement_id
|
|
@@ -12,5 +12,5 @@ import{a as A,c as G,g as S,b as T,i as k,d as y,r as O,s as F}from"./chunks/syn
|
|
|
12
12
|
name
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
`,
|
|
15
|
+
`,_=async()=>await o({defaultValueOnFail:[],options:{method:"GET",cache:"no-cache"},path:"checkoutAgreements",query:a,transformer:r,type:"query"});export{U as DEFAULT_COUNTRY,R as STORE_CONFIG_DEFAULTS,G as authenticateCustomer,S as config,H as estimateShippingMethods,q as fetchGraphQl,T as getCart,_ as getCheckoutAgreements,I as getCompanyCredit,v as getConfig,V as getCustomer,k as getNegotiableQuote,z as getStoreConfig,D as getStoreConfigCache,y as initialize,O as initializeCheckout,Y as isEmailAvailable,K as removeFetchGraphQlHeader,F as resetCheckout,X as setBillingAddress,L as setEndpoint,j as setFetchGraphQlHeader,w as setFetchGraphQlHeaders,J as setGuestEmailOnCart,$ as setPaymentMethod,N as setShippingAddress,et as setShippingMethods,ot as setShippingMethodsOnCart,M as synchronizeCheckout};
|
|
16
16
|
//# sourceMappingURL=api.js.map
|
package/api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sources":["/@dropins/storefront-checkout/src/data/transforms/transform-checkout-agreements.ts","/@dropins/storefront-checkout/src/api/getCheckoutAgreements/graphql/getCheckoutAgreements.graphql.ts","/@dropins/storefront-checkout/src/api/getCheckoutAgreements/getCheckoutAgreements.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport {\n AgreementMode,\n CheckoutAgreement as CheckoutAgreementModel,\n} from '@/checkout/data/models';\nimport { Get_Checkout_AgreementsQuery } from '@/checkout/__generated__/types';\n\ntype CheckoutAgreements = Get_Checkout_AgreementsQuery['checkoutAgreements'];\ntype FilteredAgreement = NonNullable<NonNullable<CheckoutAgreements>[0]>;\n\nexport const transformCheckoutAgreements = (\n data: CheckoutAgreements\n): CheckoutAgreementModel[] => {\n if (!data) return [];\n\n return data\n .filter((agreement): agreement is FilteredAgreement => !!agreement)\n .map((agreement) => ({\n id: agreement.agreement_id,\n name: agreement.name,\n mode: AgreementMode[agreement.mode],\n text: agreement.checkbox_text,\n content: {\n value: agreement.content,\n html: agreement.is_html,\n height: agreement.content_height ?? null,\n },\n }));\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const GET_CHECKOUT_AGREEMENTS = /* GraphQL */ `\n query GET_CHECKOUT_AGREEMENTS {\n checkoutAgreements {\n agreement_id\n checkbox_text\n content\n content_height\n is_html\n mode\n name\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { CheckoutAgreement } from '@/checkout/data/models';\nimport { transformCheckoutAgreements } from '@/checkout/data/transforms';\nimport { dispatchApiCall } from '@/checkout/lib';\nimport { GET_CHECKOUT_AGREEMENTS } from './graphql/getCheckoutAgreements.graphql';\n\nexport const getCheckoutAgreements = async (): Promise<CheckoutAgreement[]> => {\n return await dispatchApiCall({\n defaultValueOnFail: [],\n options: { method: 'GET', cache: 'no-cache' },\n path: 'checkoutAgreements',\n query: GET_CHECKOUT_AGREEMENTS,\n transformer: transformCheckoutAgreements,\n type: 'query',\n });\n};\n"],"names":["transformCheckoutAgreements","data","agreement","AgreementMode","GET_CHECKOUT_AGREEMENTS","getCheckoutAgreements","dispatchApiCall"],"mappings":"
|
|
1
|
+
{"version":3,"file":"api.js","sources":["/@dropins/storefront-checkout/src/data/transforms/transform-checkout-agreements.ts","/@dropins/storefront-checkout/src/api/getCheckoutAgreements/graphql/getCheckoutAgreements.graphql.ts","/@dropins/storefront-checkout/src/api/getCheckoutAgreements/getCheckoutAgreements.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport {\n AgreementMode,\n CheckoutAgreement as CheckoutAgreementModel,\n} from '@/checkout/data/models';\nimport { Get_Checkout_AgreementsQuery } from '@/checkout/__generated__/types';\n\ntype CheckoutAgreements = Get_Checkout_AgreementsQuery['checkoutAgreements'];\ntype FilteredAgreement = NonNullable<NonNullable<CheckoutAgreements>[0]>;\n\nexport const transformCheckoutAgreements = (\n data: CheckoutAgreements\n): CheckoutAgreementModel[] => {\n if (!data) return [];\n\n return data\n .filter((agreement): agreement is FilteredAgreement => !!agreement)\n .map((agreement) => ({\n id: agreement.agreement_id,\n name: agreement.name,\n mode: AgreementMode[agreement.mode],\n text: agreement.checkbox_text,\n content: {\n value: agreement.content,\n html: agreement.is_html,\n height: agreement.content_height ?? null,\n },\n }));\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const GET_CHECKOUT_AGREEMENTS = /* GraphQL */ `\n query GET_CHECKOUT_AGREEMENTS {\n checkoutAgreements {\n agreement_id\n checkbox_text\n content\n content_height\n is_html\n mode\n name\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { CheckoutAgreement } from '@/checkout/data/models';\nimport { transformCheckoutAgreements } from '@/checkout/data/transforms';\nimport { dispatchApiCall } from '@/checkout/lib';\nimport { GET_CHECKOUT_AGREEMENTS } from './graphql/getCheckoutAgreements.graphql';\n\nexport const getCheckoutAgreements = async (): Promise<CheckoutAgreement[]> => {\n return await dispatchApiCall({\n defaultValueOnFail: [],\n options: { method: 'GET', cache: 'no-cache' },\n path: 'checkoutAgreements',\n query: GET_CHECKOUT_AGREEMENTS,\n transformer: transformCheckoutAgreements,\n type: 'query',\n });\n};\n"],"names":["transformCheckoutAgreements","data","agreement","AgreementMode","GET_CHECKOUT_AGREEMENTS","getCheckoutAgreements","dispatchApiCall"],"mappings":"q+BA0Ba,MAAAA,EACXC,GAEKA,EAEEA,EACJ,OAAQC,GAA8C,CAAC,CAACA,CAAS,EACjE,IAAKA,IAAe,CACnB,GAAIA,EAAU,aACd,KAAMA,EAAU,KAChB,KAAMC,EAAcD,EAAU,IAAI,EAClC,KAAMA,EAAU,cAChB,QAAS,CACP,MAAOA,EAAU,QACjB,KAAMA,EAAU,QAChB,OAAQA,EAAU,gBAAkB,IAAA,CACtC,EACA,EAdc,CAAC,ECZRE,EAAwC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,ECKxCC,EAAwB,SAC5B,MAAMC,EAAgB,CAC3B,mBAAoB,CAAC,EACrB,QAAS,CAAE,OAAQ,MAAO,MAAO,UAAW,EAC5C,KAAM,qBACN,MAAOF,EACP,YAAaJ,EACb,KAAM,OAAA,CACP"}
|
package/chunks/cjs.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! Copyright 2026 Adobe
|
|
2
|
+
All Rights Reserved. */
|
|
3
|
+
function b(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var o=function(r){return s(r)&&!y(r)};function s(e){return!!e&&typeof e=="object"}function y(e){var r=Object.prototype.toString.call(e);return r==="[object RegExp]"||r==="[object Date]"||j(e)}var O=typeof Symbol=="function"&&Symbol.for,m=O?Symbol.for("react.element"):60103;function j(e){return e.$$typeof===m}function g(e){return Array.isArray(e)?[]:{}}function u(e,r){return r.clone!==!1&&r.isMergeableObject(e)?a(g(e),e,r):e}function M(e,r,t){return e.concat(r).map(function(c){return u(c,t)})}function p(e,r){if(!r.customMerge)return a;var t=r.customMerge(e);return typeof t=="function"?t:a}function d(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(r){return Object.propertyIsEnumerable.call(e,r)}):[]}function f(e){return Object.keys(e).concat(d(e))}function l(e,r){try{return r in e}catch{return!1}}function A(e,r){return l(e,r)&&!(Object.hasOwnProperty.call(e,r)&&Object.propertyIsEnumerable.call(e,r))}function E(e,r,t){var c={};return t.isMergeableObject(e)&&f(e).forEach(function(n){c[n]=u(e[n],t)}),f(r).forEach(function(n){A(e,n)||(l(e,n)&&t.isMergeableObject(r[n])?c[n]=p(n,t)(e[n],r[n],t):c[n]=u(r[n],t))}),c}function a(e,r,t){t=t||{},t.arrayMerge=t.arrayMerge||M,t.isMergeableObject=t.isMergeableObject||o,t.cloneUnlessOtherwiseSpecified=u;var c=Array.isArray(r),n=Array.isArray(e),i=c===n;return i?c?t.arrayMerge(e,r,t):E(e,r,t):u(r,t)}a.all=function(r,t){if(!Array.isArray(r))throw new Error("first argument should be an array");return r.reduce(function(c,n){return a(c,n,t)},{})};var S=a,h=S;const w=b(h);export{w as d};
|
|
4
|
+
//# sourceMappingURL=cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cjs.js","sources":["../../node_modules/deepmerge/dist/cjs.js"],"sourcesContent":["'use strict';\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n\treturn Object.getOwnPropertySymbols\n\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n\t\t\treturn Object.propertyIsEnumerable.call(target, symbol)\n\t\t})\n\t\t: []\n}\n\nfunction getKeys(target) {\n\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\n}\n\nfunction propertyIsOnObject(object, property) {\n\ttry {\n\t\treturn property in object\n\t} catch(_) {\n\t\treturn false\n\t}\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n\treturn propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tgetKeys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tgetKeys(source).forEach(function(key) {\n\t\tif (propertyIsUnsafe(target, key)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n\t// implementations can use it. The caller may not replace it.\n\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n"],"names":["isMergeableObject","value","isNonNullObject","isSpecial","stringValue","isReactElement","canUseSymbol","REACT_ELEMENT_TYPE","emptyTarget","val","cloneUnlessOtherwiseSpecified","options","deepmerge","defaultArrayMerge","target","source","element","getMergeFunction","key","customMerge","getEnumerableOwnPropertySymbols","symbol","getKeys","propertyIsOnObject","object","property","propertyIsUnsafe","mergeObject","destination","sourceIsArray","targetIsArray","sourceAndTargetTypesMatch","array","prev","next","deepmerge_1","cjs"],"mappings":"oGAEA,IAAIA,EAAoB,SAA2BC,EAAO,CACzD,OAAOC,EAAgBD,CAAK,GACxB,CAACE,EAAUF,CAAK,CACrB,EAEA,SAASC,EAAgBD,EAAO,CAC/B,MAAO,CAAC,CAACA,GAAS,OAAOA,GAAU,QACpC,CAEA,SAASE,EAAUF,EAAO,CACzB,IAAIG,EAAc,OAAO,UAAU,SAAS,KAAKH,CAAK,EAEtD,OAAOG,IAAgB,mBACnBA,IAAgB,iBAChBC,EAAeJ,CAAK,CACzB,CAGA,IAAIK,EAAe,OAAO,QAAW,YAAc,OAAO,IACtDC,EAAqBD,EAAe,OAAO,IAAI,eAAe,EAAI,MAEtE,SAASD,EAAeJ,EAAO,CAC9B,OAAOA,EAAM,WAAaM,CAC3B,CAEA,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
|
-
(function(n,o){try{if(typeof document<"u"){const t=document.createElement("style"),
|
|
4
|
-
.checkout-shipping-methods__title,.checkout-shipping-methods__title h3{color:var(--color-neutral-800);font:var(--type-body-1-default-font);letter-spacing:var(--type-body-1-default-letter-spacing);margin:0 0 var(--spacing-medium) 0}.checkout-shipping-methods__content{position:relative;display:block}.checkout-shipping-methods__method{
|
|
3
|
+
(function(n,o){try{if(typeof document<"u"){const t=document.createElement("style"),i=o.styleId;for(const e in o.attributes)t.setAttribute(e,o.attributes[e]);t.setAttribute("data-dropin",i),t.appendChild(document.createTextNode(n));const a=document.querySelector('style[data-dropin="sdk"]');if(a)a.after(t);else{const e=document.querySelector('link[rel="stylesheet"], style');e?e.before(t):document.head.append(t)}}}catch(t){console.error("dropin-styles (injectCodeFunction)",t)}})(`.checkout__banner{margin-bottom:var(--spacing-xbig)}
|
|
4
|
+
.checkout-shipping-methods__title,.checkout-shipping-methods__title h3{color:var(--color-neutral-800);font:var(--type-body-1-default-font);letter-spacing:var(--type-body-1-default-letter-spacing);margin:0 0 var(--spacing-medium) 0}.checkout-shipping-methods__content{position:relative;display:block}.checkout-shipping-methods__method{width:fit-content;cursor:pointer;font:var(--type-body-2-default-font);letter-spacing:var(--type-body-2-default-letter-spacing)}.checkout-shipping-methods__options>[data-slot^=checkout-shipping-method-item]{margin-bottom:var(--spacing-medium)}.checkout-shipping-methods__options>[data-slot^=checkout-shipping-method-item]:last-child{margin-bottom:0}.dropin-radio-button__label .dropin-price{color:var(--color-neutral-800);font-weight:400}.checkout-shipping-methods__price--original{margin-right:var(--spacing-xxsmall)}.checkout-shipping-methods__price-wrapper{display:flex;gap:var(--spacing-xxsmall);align-items:center}.checkout-shipping-methods__options--busy{opacity:.4;pointer-events:none}.checkout-shipping-methods__spinner{margin:0 auto;position:absolute;z-index:999;left:0;right:0;top:calc(50% - (var(--size) / 2));bottom:0}.checkout-shipping-methods__options--toggleButton{display:grid;grid-template-columns:1fr 1fr;gap:var(--spacing-medium)}.checkout-shipping-methods__options--toggleButton .dropin-toggle-button__content{justify-content:start;display:grid;grid-template-columns:1fr min-content}.checkout-shipping-methods__options--toggleButton .checkout-shipping-methods__method{width:auto}.checkout-shipping-methods__options--toggleButton>[data-slot^=checkout-shipping-method-item]{margin-bottom:0}.checkout-shipping-methods__error{margin-top:var(--spacing-medium)}
|
|
5
5
|
.checkout-place-order{display:grid;padding-bottom:var(--spacing-big)}.checkout-place-order__button{align-self:flex-end;justify-self:flex-end}@media only screen and (min-width: 320px) and (max-width: 768px){.checkout-place-order{background-color:var(--color-neutral-200);padding:var(--spacing-medium) var(--spacing-medium) var(--spacing-big) var(--spacing-medium)}.checkout-place-order__button{align-self:center;justify-self:stretch}}
|
|
6
6
|
.checkout-payment-on-account{margin-bottom:var(--spacing-medium)}.checkout-payment-on-account__form{width:100%}.checkout-payment-on-account__credit{display:flex;justify-content:space-between;align-items:center;padding:var(--spacing-small);margin-bottom:var(--spacing-medium);background-color:var(--color-neutral-100);border:1px solid var(--color-neutral-300);border-radius:4px;font-size:14px;line-height:1.4}.checkout-payment-on-account__credit-label{font-weight:500;color:var(--color-neutral-700)}.checkout-payment-on-account__credit-amount{font-weight:600;color:var(--color-success-600)}.checkout-payment-on-account__exceed-message{margin-top:var(--spacing-medium);margin-bottom:var(--spacing-medium)}.checkout-payment-on-account .dropin-field{margin-bottom:0}
|
|
7
7
|
.checkout-bill-to-shipping-address label{font:var(--type-body-2-default-font);letter-spacing:var(--type-body-2-default-letter-spacing);gap:0}.checkout-bill-to-shipping-address__error{margin-top:var(--spacing-medium)}
|
|
8
8
|
.checkout-address-validation{display:grid;gap:var(--spacing-medium)}.checkout-address-validation__options--busy{opacity:.4;pointer-events:none}.checkout-address-validation__title{margin-bottom:var(--spacing-small)}.checkout-address-validation__subtitle{color:var(--color-neutral-700);font:var(--type-body-2-default-font);letter-spacing:var(--type-body-2-default-letter-spacing)}.checkout-address-validation__options{display:grid;gap:var(--spacing-xbig);grid-template-columns:1fr 1fr}.checkout-address-validation__option{margin:0}.checkout-address-validation__option-title{margin-bottom:var(--spacing-xsmall)}.checkout-estimate-shipping{display:grid;grid-template-columns:1fr 1fr;gap:var(--spacing-xxsmall);align-items:center;color:var(--color-neutral-800)}.checkout-estimate-shipping__label,.checkout-estimate-shipping__price{font:var(--type-body-1-default-font);letter-spacing:var(--type-body-1-default-letter-spacing)}.checkout-estimate-shipping__label--muted{font:var(--type-body-2-default-font);letter-spacing:var(--type-body-2-default-letter-spacing);color:var(--color-neutral-700)}.checkout-estimate-shipping__price--muted{font:var(--type-body-2-default-font);letter-spacing:var(--type-body-2-default-letter-spacing)}.checkout-estimate-shipping__price{text-align:right}.checkout-estimate-shipping__label--bold,.checkout-estimate-shipping__price--bold{font:var(--type-body-1-emphasized-font);letter-spacing:var(--type-body-1-emphasized-letter-spacing)}.checkout-estimate-shipping__caption{font:var(--type-details-caption-2-font);letter-spacing:var(--type-details-caption-2-letter-spacing);color:var(--color-neutral-700)}.cart-order-summary__shipping .dropin-skeleton{grid-template-columns:1fr}.checkout-login-form__heading{display:grid;grid-template-columns:1fr max-content;grid-auto-rows:max-content;margin:0 0 var(--spacing-medium) 0;align-items:center}.checkout-login-form__heading:empty{display:none}.checkout-login-form__content{grid-auto-rows:max-content}.checkout-login-form__content .dropin-field__hint a{font-weight:400}.checkout-login-form__customer-details{display:grid;grid-auto-flow:row;gap:var(--spacing-xxsmall)}.checkout-login-form__customer-name{font:var(--type-body-1-strong-font);letter-spacing:var(--type-body-1-default-letter-spacing)}.checkout-login-form__customer-email{font:var(--type-body-2-default-font);letter-spacing:var(--type-body-2-default-letter-spacing);color:var(--color-neutral-700)}.checkout-login-form__title,.checkout-login-form__title h2{grid-column-start:1;color:var(--color-neutral-800);font:var(--type-headline-2-default-font);letter-spacing:var(--type-headline-2-default-letter-spacing);margin:0}.checkout-login-form__heading-label,.checkout-login-form__sign-in,.checkout-login-form__sign-out{grid-column-start:2;color:var(--color-neutral-800);font:var(--type-body-2-default-font);letter-spacing:var(--type-body-2-default-letter-spacing);justify-self:flex-end}.checkout-login-form__heading-label a,a.checkout-login-form__link{font:var(--type-body-2-strong-font);letter-spacing:var(--type-body-2-strong-letter-spacing);margin-left:var(--spacing-xxsmall)}@media only screen and (min-width: 320px) and (max-width: 768px){.checkout-login-form__heading{grid-template-columns:1fr;grid-template-rows:1fr}.checkout-login-form__heading-label{grid-column-start:1;align-self:flex-start;justify-self:flex-start;margin-top:var(--spacing-medium)}}.checkout-out-of-stock.dropin-card{border-color:var(--color-warning-500)}.checkout-out-of-stock .dropin-card__content{gap:var(--spacing-small);padding:var(--spacing-small)}.checkout-out-of-stock__title{color:var(--color-neutral-900);font:var(--type-body-2-strong-font);letter-spacing:var(--type-body-2-strong-letter-spacing);margin:0;display:flex;gap:var(--spacing-xxsmall);align-items:center;justify-content:left;text-align:center}.checkout-out-of-stock__message{color:var(--color-neutral-800);font:var(--type-body-1-default-font);letter-spacing:var(--type-body-1-default-letter-spacing);margin:0}.checkout-out-of-stock__items{display:grid;grid-template-columns:repeat(5,100px);grid-gap:var(--spacing-small);list-style:none;padding:0;margin:0}.checkout-out-of-stock__item img{width:100%;height:auto}.checkout-out-of-stock__actions{display:flex;gap:var(--spacing-small);justify-content:flex-end}a.checkout-out-of-stock__action{color:var(--color-brand-500);font:var(--type-details-caption-1-font);letter-spacing:var(--type-details-caption-1-letter-spacing)}.checkout-out-of-stock__action{color:var(--color-brand-500);font:var(--type-details-caption-1-font);letter-spacing:var(--type-details-caption-1-letter-spacing);background:none;border:none;padding:0;cursor:pointer}.checkout-out-of-stock__action:hover{--textColor: var(--color-brand-700);text-decoration:solid underline var(--textColor);text-underline-offset:6px}@media only screen and (width >= 320px) and (width <= 768px){.checkout-out-of-stock__items{grid-template-columns:repeat(3,100px)}}.checkout-payment-methods__title,.checkout-payment-methods__title h2{color:var(--color-neutral-800);font:var(--type-headline-2-default-font);letter-spacing:var(--type-headline-2-default-letter-spacing);margin:0 0 var(--spacing-medium) 0}.checkout-payment-methods__wrapper{position:relative;display:grid}.checkout-payment-methods__wrapper--busy{opacity:.4;pointer-events:none}.checkout-payment-methods__methods{display:grid;grid-template-columns:1fr 1fr;gap:var(--spacing-medium)}.checkout-payment-methods__content{font:var(--type-body-2-default-font);letter-spacing:var(--type-body-2-default-letter-spacing);margin-top:var(--spacing-xbig)}.checkout-payment-methods__content>div[data-slot=PaymentMethodSlot]:not(:empty){margin-top:var(--spacing-medium)}.checkout-payment-methods--full-width{grid-template-columns:1fr}.checkout-payment-methods__spinner{margin:0 auto;position:absolute;z-index:999;left:0;right:0;top:calc(50% - (var(--size) / 2));bottom:0}.checkout__content [data-slot=PaymentMethods]:empty{display:none}.checkout-payment-methods__error{margin-top:var(--spacing-medium)}@media only screen and (min-width: 320px) and (max-width: 768px){.checkout-payment-methods__methods{grid-template-columns:1fr}}.checkout-purchase-order{margin-bottom:var(--spacing-medium)}.checkout-purchase-order__form{width:100%}.checkout-purchase-order .dropin-field{margin-bottom:0}.checkout-server-error{position:relative;text-align:center}.checkout-server-error__icon .error-icon{color:var(--color-alert-500)}.checkout-server-error a{font:var(--type-body-2-strong-font);letter-spacing:var(--type-body-2-strong-letter-spacing)}.checkout-terms-and-conditions{display:grid}.checkout-terms-and-conditions__error{font:var(--type-details-caption-2-font);letter-spacing:var(--type-details-caption-2-letter-spacing);color:var(--color-alert-800);text-align:left;margin-top:var(--spacing-xsmall)}.checkout-terms-and-conditions__error:empty{display:none}`,{styleId:"checkout"});
|
|
9
|
-
import{jsx as
|
|
9
|
+
import{jsx as o}from"@dropins/tools/preact-jsx-runtime.js";import{Render as c}from"@dropins/tools/lib.js";import"./fetch-graphql.js";import{events as l}from"@dropins/tools/event-bus.js";import{c as u}from"./synchronizeCheckout.js";import{UIProvider as m}from"@dropins/tools/components.js";import{useState as h,useEffect as g}from"@dropins/tools/preact-hooks.js";import{d as p}from"./cjs.js";const f={AddressValidation:{title:"Verify your address",subtitle:"To ensure accurate delivery, we suggest the changes highlighted below. Please choose which address you would like to use. If neither option is correct, edit your address.",suggestedAddress:"Suggested Address",originalAddress:"Original Address"},BillToShippingAddress:{cartSyncError:"We were unable to save your changes. Please try again later.",title:"Bill to shipping address"},EmptyCart:{button:"Start shopping",title:"Your cart is empty"},EstimateShipping:{estimated:"Estimated Shipping",freeShipping:"Free",label:"Shipping",taxToBeDetermined:"TBD",withoutTaxes:"Excluding taxes",withTaxes:"Including taxes"},LoginForm:{account:"Already have an account?",ariaLabel:"Email",emailExists:{alreadyHaveAccount:"It looks like you already have an account.",forFasterCheckout:"for a faster checkout.",signInButton:"Sign in"},floatingLabel:"Email *",invalidEmailError:"Please enter a valid email address.",missingEmailError:"Enter an email address.",cartSyncError:"We were unable to save your changes. Please try again later.",placeholder:"Enter your email address",signIn:"Sign In",signOut:"Sign Out",switch:"Do you want to switch account?",title:"Contact details"},MergedCartBanner:{items:{many:"{{count}} items from a previous session were added to your cart. Please review your new subtotal.",one:"1 item from a previous session was added to your cart. Please review your new subtotal."}},OutOfStock:{actions:{removeOutOfStock:"Remove out of stock items",reviewCart:"Review cart"},alert:"Out of stock!",lowInventory:{many:"Only {{count}} left!",one:"Last item!"},message:"The following items are out of stock:",title:"Your cart contains items that are out of stock"},PaymentMethods:{cartSyncError:"We were unable to save your changes. Please try again later.",emptyState:"No payment methods available",title:"Payment"},PaymentOnAccount:{referenceNumberLabel:"Custom Reference Number",referenceNumberPlaceholder:"Enter custom reference number",referenceNumberHint:"",availableCreditLabel:"Available Credit",exceedLimitWarning:"The credit limit is {{creditLimit}}. It will be exceeded by {{exceededAmount}} with this order.",exceedLimitWarningPrefix:"The credit limit is",exceedLimitWarningMiddle:". It will be exceeded by",exceedLimitWarningSuffix:"with this order.",exceedLimitError:"Payment On Account cannot be used for this order because your order amount exceeds your credit amount."},PurchaseOrder:{missingReferenceNumberError:"Reference number is required",referenceNumberHint:"",referenceNumberLabel:"Custom Reference Number",referenceNumberPlaceholder:"Enter custom reference number"},PlaceOrder:{button:"Place Order"},ServerError:{button:"Try again",contactSupport:"If you continue to have issues, please contact support.",title:"We were unable to process your order",unexpected:"An unexpected error occurred while processing your order. Please try again later.",permissionDenied:"You do not have permission to complete checkout. Please contact your administrator for assistance."},Quote:{permissionDenied:"You do not have permission to checkout with this quote.",dataError:"We were unable to retrieve the quote data. Please try again later."},ShippingMethods:{cartSyncError:"We were unable to save your changes. Please try again later.",emptyState:"This order can't be shipped to the address provided. Please review the address details you entered and make sure they're correct.",title:"Shipping options"},Summary:{Edit:"Edit",heading:"Your Cart ({count})"},Addresses:{billToNewAddress:"Bill to new address",shippingAddressTitle:"Shipping address",billingAddressTitle:"Billing address"},TermsAndConditions:{error:"Please accept the Terms and Conditions to continue.",label:"I have read, understand, and accept our <a href='https://www.adobe.com/legal/terms.html' target='_blank'>Terms of Use, Terms of Sales, Privacy Policy, and Return Policy</a>."},title:"Checkout"},y={Checkout:f},b={default:y},w=({children:a})=>{var r;const[e,n]=h(),s=(r=u.getConfig())==null?void 0:r.langDefinitions;g(()=>{const t=l.on("locale",i=>{i!==e&&n(i)},{eager:!0});return()=>{t==null||t.off()}},[e]);const d=p(b,s??{});return o(m,{lang:e,langDefinitions:d,children:a})},C=new c(o(w,{}));export{w as P,C as r};
|
|
10
10
|
//# sourceMappingURL=render.js.map
|
package/chunks/render.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.js","sources":["../../node_modules/deepmerge/dist/cjs.js","/@dropins/storefront-checkout/src/render/Provider.tsx","/@dropins/storefront-checkout/src/render/render.tsx"],"sourcesContent":["'use strict';\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n\treturn Object.getOwnPropertySymbols\n\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n\t\t\treturn Object.propertyIsEnumerable.call(target, symbol)\n\t\t})\n\t\t: []\n}\n\nfunction getKeys(target) {\n\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\n}\n\nfunction propertyIsOnObject(object, property) {\n\ttry {\n\t\treturn property in object\n\t} catch(_) {\n\t\treturn false\n\t}\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n\treturn propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tgetKeys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tgetKeys(source).forEach(function(key) {\n\t\tif (propertyIsUnsafe(target, key)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n\t// implementations can use it. The caller may not replace it.\n\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { config } from '@/checkout/api';\nimport { UIProvider } from '@adobe-commerce/elsie/components';\nimport { Lang } from '@adobe-commerce/elsie/i18n';\nimport { deepmerge } from '@adobe-commerce/elsie/lib/deepmerge';\nimport { events } from '@adobe-commerce/event-bus';\nimport { FunctionComponent } from 'preact';\nimport { useEffect, useState } from 'preact/hooks';\n\nimport en_US from '../i18n/en_US.json';\n\n// Langs\nconst langDefinitions = {\n default: en_US,\n};\n\ninterface IntlProviderProps {\n children?: any;\n}\n\nexport const Provider: FunctionComponent<IntlProviderProps> = ({\n children,\n}) => {\n const [locale, setLang] = useState<Lang>();\n\n const userLangDefinitions = config.getConfig()?.langDefinitions;\n\n useEffect(() => {\n const localeEvent = events.on(\n 'locale',\n (payload) => {\n if (payload !== locale) setLang(payload as Lang);\n },\n { eager: true }\n );\n return () => {\n localeEvent?.off();\n };\n }, [locale]);\n\n // Merge language definitions with user language definitions\n const definitions = deepmerge(langDefinitions, userLangDefinitions ?? {});\n\n return (\n <UIProvider lang={locale} langDefinitions={definitions}>\n {children}\n </UIProvider>\n );\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { Render } from '@adobe-commerce/elsie/lib';\nimport { Provider } from './Provider';\nexport { Provider };\nexport const render = new Render(<Provider />);\n"],"names":["isMergeableObject","value","isNonNullObject","isSpecial","stringValue","isReactElement","canUseSymbol","REACT_ELEMENT_TYPE","emptyTarget","val","cloneUnlessOtherwiseSpecified","options","deepmerge","defaultArrayMerge","target","source","element","getMergeFunction","key","customMerge","getEnumerableOwnPropertySymbols","symbol","getKeys","propertyIsOnObject","object","property","propertyIsUnsafe","mergeObject","destination","sourceIsArray","targetIsArray","sourceAndTargetTypesMatch","array","prev","next","deepmerge_1","cjs","langDefinitions","en_US","Provider","children","locale","setLang","useState","userLangDefinitions","_a","config","useEffect","localeEvent","events","payload","definitions","UIProvider","render","Render","jsx"],"mappings":"8cAEA,IAAIA,EAAoB,SAA2BC,EAAO,CACzD,OAAOC,EAAgBD,CAAK,GACxB,CAACE,EAAUF,CAAK,CACrB,EAEA,SAASC,EAAgBD,EAAO,CAC/B,MAAO,CAAC,CAACA,GAAS,OAAOA,GAAU,QACpC,CAEA,SAASE,EAAUF,EAAO,CACzB,IAAIG,EAAc,OAAO,UAAU,SAAS,KAAKH,CAAK,EAEtD,OAAOG,IAAgB,mBACnBA,IAAgB,iBAChBC,EAAeJ,CAAK,CACzB,CAGA,IAAIK,EAAe,OAAO,QAAW,YAAc,OAAO,IACtDC,EAAqBD,EAAe,OAAO,IAAI,eAAe,EAAI,MAEtE,SAASD,EAAeJ,EAAO,CAC9B,OAAOA,EAAM,WAAaM,CAC3B,CAEA,SAASC,EAAYC,EAAK,CACzB,OAAO,MAAM,QAAQA,CAAG,EAAI,CAAA,EAAK,CAAA,CAClC,CAEA,SAASC,EAA8BT,EAAOU,EAAS,CACtD,OAAQA,EAAQ,QAAU,IAASA,EAAQ,kBAAkBV,CAAK,EAC/DW,EAAUJ,EAAYP,CAAK,EAAGA,EAAOU,CAAO,EAC5CV,CACJ,CAEA,SAASY,EAAkBC,EAAQC,EAAQJ,EAAS,CACnD,OAAOG,EAAO,OAAOC,CAAM,EAAE,IAAI,SAASC,EAAS,CAClD,OAAON,EAA8BM,EAASL,CAAO,CACrD,CAAA,CACF,CAEA,SAASM,EAAiBC,EAAKP,EAAS,CACvC,GAAI,CAACA,EAAQ,YACZ,OAAOC,EAER,IAAIO,EAAcR,EAAQ,YAAYO,CAAG,EACzC,OAAO,OAAOC,GAAgB,WAAa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x","/@dropins/storefront-checkout/src/render/render.tsx"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { config } from '@/checkout/api';\nimport { UIProvider } from '@adobe-commerce/elsie/components';\nimport { Lang } from '@adobe-commerce/elsie/i18n';\nimport { deepmerge } from '@adobe-commerce/elsie/lib/deepmerge';\nimport { events } from '@adobe-commerce/event-bus';\nimport { FunctionComponent } from 'preact';\nimport { useEffect, useState } from 'preact/hooks';\n\nimport en_US from '../i18n/en_US.json';\n\n// Langs\nconst langDefinitions = {\n default: en_US,\n};\n\ninterface IntlProviderProps {\n children?: any;\n}\n\nexport const Provider: FunctionComponent<IntlProviderProps> = ({\n children,\n}) => {\n const [locale, setLang] = useState<Lang>();\n\n const userLangDefinitions = config.getConfig()?.langDefinitions;\n\n useEffect(() => {\n const localeEvent = events.on(\n 'locale',\n (payload) => {\n if (payload !== locale) setLang(payload as Lang);\n },\n { eager: true }\n );\n return () => {\n localeEvent?.off();\n };\n }, [locale]);\n\n // Merge language definitions with user language definitions\n const definitions = deepmerge(langDefinitions, userLangDefinitions ?? {});\n\n return (\n <UIProvider lang={locale} langDefinitions={definitions}>\n {children}\n </UIProvider>\n );\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { Render } from '@adobe-commerce/elsie/lib';\nimport { Provider } from './Provider';\nexport { Provider };\nexport const render = new Render(<Provider />);\n"],"names":["langDefinitions","en_US","Provider","children","locale","setLang","useState","userLangDefinitions","_a","config","useEffect","localeEvent","events","payload","definitions","deepmerge","UIProvider","render","Render","jsx"],"mappings":"4vIA4BMA,EAAkB,CACtB,QAASC,CACX,EAMaC,EAAiD,CAAC,CAC7D,SAAAC,CACF,IAAM,OACJ,KAAM,CAACC,EAAQC,CAAO,EAAIC,EAAe,EAEnCC,GAAsBC,EAAAC,EAAO,UAAA,IAAP,YAAAD,EAAoB,gBAEhDE,EAAU,IAAM,CACd,MAAMC,EAAcC,EAAO,GACzB,SACCC,GAAY,CACPA,IAAYT,GAAQC,EAAQQ,CAAe,CACjD,EACA,CAAE,MAAO,EAAK,CAChB,EACA,MAAO,IAAM,CACXF,GAAA,MAAAA,EAAa,KACf,CAAA,EACC,CAACP,CAAM,CAAC,EAGX,MAAMU,EAAcC,EAAUf,EAAiBO,GAAuB,CAAA,CAAE,EAExE,SACGS,EAAW,CAAA,KAAMZ,EAAQ,gBAAiBU,EACxC,SAAAX,EACH,CAEJ,EC5Cac,EAAS,IAAIC,EAAOC,EAACjB,IAAS,CAAE"}
|
|
@@ -1,32 +1,17 @@
|
|
|
1
1
|
/*! Copyright 2026 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
|
-
import{s as o,p as
|
|
3
|
+
import{s as o,p as v,q as D,d as $,Q as N,I as l,t as q}from"./fetch-graphql.js";import{ESTIMATE_SHIPPING_METHOD_FRAGMENT as F,CHECKOUT_DATA_FRAGMENT as Q,NEGOTIABLE_QUOTE_FRAGMENT as w}from"../fragments.js";import"@dropins/tools/lib.js";import{a as H,t as R,b as T}from"./transform-shipping-estimate.js";import{events as C}from"@dropins/tools/event-bus.js";import{g as B}from"./values.js";import{c as b,t as P,e as V}from"./synchronizeCheckout.js";import{e as K,f as L,g as k}from"./guards.js";const x=`
|
|
4
4
|
mutation estimateShippingMethods(
|
|
5
5
|
$cartId: String!
|
|
6
6
|
$address: EstimateAddressInput!
|
|
7
7
|
) {
|
|
8
8
|
estimateShippingMethods(input: { cart_id: $cartId, address: $address }) {
|
|
9
|
-
|
|
10
|
-
carrier_code
|
|
11
|
-
method_title
|
|
12
|
-
method_code
|
|
13
|
-
available
|
|
14
|
-
amount {
|
|
15
|
-
currency
|
|
16
|
-
value
|
|
17
|
-
}
|
|
18
|
-
price_excl_tax {
|
|
19
|
-
currency
|
|
20
|
-
value
|
|
21
|
-
}
|
|
22
|
-
price_incl_tax {
|
|
23
|
-
currency
|
|
24
|
-
value
|
|
25
|
-
}
|
|
26
|
-
error_message
|
|
9
|
+
...ESTIMATE_SHIPPING_METHOD_FRAGMENT
|
|
27
10
|
}
|
|
28
11
|
}
|
|
29
|
-
|
|
12
|
+
|
|
13
|
+
${F}
|
|
14
|
+
`,ps=async s=>{var I,_,S,m;const e=o.cartId,t=((I=s==null?void 0:s.criteria)==null?void 0:I.country_code)??((_=o.config)==null?void 0:_.defaultCountry);if(!e)throw new v;if(!t)throw new D;const{region_id:i,region_name:p,zip:a}=(s==null?void 0:s.criteria)??{},r=i||p?{region_id:typeof i=="string"?parseInt(i,10):i,region_code:p}:void 0,h={country_code:t,...a&&{postcode:a},...r&&{region:{...r.region_id&&{region_id:r.region_id},...r.region_code&&{region_code:r.region_code}}}},A={country_id:t,region:(S=h.region)==null?void 0:S.region_code,region_id:(m=h.region)==null?void 0:m.region_id,postcode:a},y=T(A);return $({options:{variables:{cartId:e,address:h}},path:"estimateShippingMethods",query:x,queueName:N.ShippingEstimate,transformer:H,type:"mutation"}).then(n=>{const{defaults:u,shipping:c}=b.getConfig(),f=c!=null&&c.filterOptions?n.filter(c.filterOptions):n,G=f.length>0,U=T(A);let M=null;if(G){const d=B("selectedShippingMethod");let g=n.find(E=>E.code===(d==null?void 0:d.code)&&E.carrier.code===(d==null?void 0:d.carrier.code));!g&&(u!=null&&u.selectedShippingMethod)&&(g=u.selectedShippingMethod(n)??void 0),g||(g=n[0]),M=R(g)}return C.emit("shipping/estimate",{address:U,availableShippingMethods:n,shippingMethod:M,success:!0}),f}).catch(n=>{throw C.emit("shipping/estimate",{address:y,shippingMethod:null,availableShippingMethods:[],success:!1}),n})},z=`
|
|
30
15
|
mutation setShippingAddressOnCartAndUseAsBilling(
|
|
31
16
|
$cartId: String!
|
|
32
17
|
$shippingAddress: ShippingAddressInput!
|
|
@@ -48,8 +33,8 @@ import{s as o,p as G,q as D,d as T,Q as E,I as l,t as Q}from"./fetch-graphql.js"
|
|
|
48
33
|
}
|
|
49
34
|
}
|
|
50
35
|
|
|
51
|
-
${
|
|
52
|
-
`,
|
|
36
|
+
${Q}
|
|
37
|
+
`,j=`
|
|
53
38
|
mutation setShippingAddressOnCart(
|
|
54
39
|
$cartId: String!
|
|
55
40
|
$shippingAddress: ShippingAddressInput!
|
|
@@ -63,8 +48,8 @@ import{s as o,p as G,q as D,d as T,Q as E,I as l,t as Q}from"./fetch-graphql.js"
|
|
|
63
48
|
}
|
|
64
49
|
}
|
|
65
50
|
|
|
66
|
-
${
|
|
67
|
-
`,
|
|
51
|
+
${Q}
|
|
52
|
+
`,J=`
|
|
68
53
|
mutation setShippingAddressOnQuote(
|
|
69
54
|
$quoteId: ID!
|
|
70
55
|
$shippingAddress: NegotiableQuoteShippingAddressInput!
|
|
@@ -78,8 +63,8 @@ import{s as o,p as G,q as D,d as T,Q as E,I as l,t as Q}from"./fetch-graphql.js"
|
|
|
78
63
|
}
|
|
79
64
|
}
|
|
80
65
|
|
|
81
|
-
${
|
|
82
|
-
`,
|
|
66
|
+
${w}
|
|
67
|
+
`,W=`
|
|
83
68
|
mutation setShippingAddressOnQuoteAndUseAsBilling(
|
|
84
69
|
$quoteId: ID!
|
|
85
70
|
$shippingAddress: NegotiableQuoteShippingAddressInput!
|
|
@@ -104,6 +89,6 @@ import{s as o,p as G,q as D,d as T,Q as E,I as l,t as Q}from"./fetch-graphql.js"
|
|
|
104
89
|
}
|
|
105
90
|
}
|
|
106
91
|
|
|
107
|
-
${
|
|
108
|
-
`,
|
|
92
|
+
${w}
|
|
93
|
+
`,X=({address:s,customerAddressId:e,customerAddressUid:t,pickupLocationCode:i})=>{if(!e&&t)throw new l("customerAddressUid is not supported");if(!e&&!i&&!s)throw new q},Y=({address:s,customerAddressId:e,customerAddressUid:t,pickupLocationCode:i})=>{if(i)throw new l("pickup location is not supported in quotes");if(!t&&e)throw new l("customerAddressId is not supported in quotes");if(!t&&!s)throw new q},Z=s=>{const e=!!o.cartId,t=!!o.quoteId;e?X(s):t&&Y(s)},O=(s,e,t,i,p,a)=>async r=>await $({type:"mutation",query:t,options:{variables:{[e]:s,shippingAddress:p(r)}},path:a,queueName:N.Updates,transformer:i}),as=async s=>{K(),Z(s);const{defaults:e}=b.getConfig(),t=B("isBillToShipping")??(e==null?void 0:e.isBillToShipping);return await(!!o.cartId?O(o.cartId,"cartId",t?z:j,P,L,t?"setBillingAddressOnCart.cart":"setShippingAddressesOnCart.cart"):O(o.quoteId,"quoteId",t?W:J,V,k,t?"setNegotiableQuoteBillingAddress.quote":"setNegotiableQuoteShippingAddress.quote"))(s)};export{ps as e,as as s};
|
|
109
94
|
//# sourceMappingURL=setShippingAddress.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setShippingAddress.js","sources":["/@dropins/storefront-checkout/src/api/estimateShippingMethods/graphql/estimateShippingMethods.graphql.ts","/@dropins/storefront-checkout/src/api/estimateShippingMethods/estimateShippingMethods.ts","/@dropins/storefront-checkout/src/api/setShippingAddress/graphql/setShippingAddressOnCartAndUseAsBillingMutation.graphql.ts","/@dropins/storefront-checkout/src/api/setShippingAddress/graphql/setShippingAddressOnCartMutation.graphql.ts","/@dropins/storefront-checkout/src/api/setShippingAddress/graphql/setShippingAddressOnQuote.graphql.ts","/@dropins/storefront-checkout/src/api/setShippingAddress/graphql/setShippingAddressOnQuoteAndUseAsBillingMutation.graphql.ts","/@dropins/storefront-checkout/src/api/setShippingAddress/setShippingAddress.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const estimateShippingMethodsMutation = /* GraphQL */ `\n mutation estimateShippingMethods(\n $cartId: String!\n $address: EstimateAddressInput!\n ) {\n estimateShippingMethods(input: { cart_id: $cartId, address: $address }) {\n carrier_title\n carrier_code\n method_title\n method_code\n available\n amount {\n currency\n value\n }\n price_excl_tax {\n currency\n value\n }\n price_incl_tax {\n currency\n value\n }\n error_message\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { config } from '@/checkout/api';\nimport { estimateShippingMethodsMutation } from '@/checkout/api/estimateShippingMethods/graphql';\nimport { ShippingMethod } from '@/checkout/data/models';\nimport {\n transformShippingEstimatePartialAddress,\n transformShippingEstimateShippingMethod,\n transformShippingMethods,\n} from '@/checkout/data/transforms';\nimport { dispatchApiCall, getValue, QueueName, state } from '@/checkout/lib';\nimport { MissingCart, MissingCountry } from '@/checkout/lib/errors';\nimport { events } from '@adobe-commerce/event-bus';\n\nexport interface ShippingEstimationCriteria {\n country_code: string;\n region_name?: string;\n region_id?: string | number;\n zip?: string;\n}\n\nexport type EstimateShippingInput = {\n criteria: ShippingEstimationCriteria;\n};\n\nexport const estimateShippingMethods = async (\n input?: EstimateShippingInput\n): Promise<ShippingMethod[] | undefined> => {\n const cartId = state.cartId;\n const countryCode =\n input?.criteria?.country_code ?? state.config?.defaultCountry;\n\n if (!cartId) throw new MissingCart();\n if (!countryCode) throw new MissingCountry();\n\n const { region_id, region_name, zip } = input?.criteria ?? {};\n\n // Process region information\n const region =\n region_id || region_name\n ? {\n region_id:\n typeof region_id === 'string' ? parseInt(region_id, 10) : region_id,\n region_code: region_name,\n }\n : undefined;\n\n // Build address for API call\n const address = {\n country_code: countryCode,\n ...(zip && { postcode: zip }),\n ...(region && {\n region: {\n ...(region.region_id && { region_id: region.region_id }),\n ...(region.region_code && { region_code: region.region_code }),\n },\n }),\n };\n\n // Create address data for transformation\n const estimateShippingAddressData = {\n country_id: countryCode,\n region: address.region?.region_code,\n region_id: address.region?.region_id,\n postcode: zip,\n };\n\n const partialAddress = transformShippingEstimatePartialAddress(\n estimateShippingAddressData\n );\n\n return dispatchApiCall({\n options: { variables: { cartId, address } },\n path: 'estimateShippingMethods',\n query: estimateShippingMethodsMutation,\n queueName: QueueName.ShippingEstimate,\n transformer: transformShippingMethods,\n type: 'mutation',\n })\n .then((estimation) => {\n const { defaults, shipping } = config.getConfig();\n\n const filteredOptions = shipping?.filterOptions\n ? estimation.filter(shipping.filterOptions)\n : estimation;\n\n const hasAvailableOptions = filteredOptions.length > 0;\n const partialAddress = transformShippingEstimatePartialAddress(\n estimateShippingAddressData\n );\n\n let shippingMethod = null;\n\n if (hasAvailableOptions) {\n const userSelection = getValue('selectedShippingMethod');\n\n let selection = estimation.find(\n (method) =>\n method.code === userSelection?.code &&\n method.carrier.code === userSelection?.carrier.code\n );\n\n if (!selection && defaults?.selectedShippingMethod) {\n selection = defaults.selectedShippingMethod(estimation) ?? undefined;\n }\n\n if (!selection) {\n selection = estimation[0];\n }\n\n shippingMethod = transformShippingEstimateShippingMethod(selection);\n }\n\n events.emit('shipping/estimate', {\n address: partialAddress,\n availableShippingMethods: estimation,\n shippingMethod,\n success: true,\n });\n\n return filteredOptions;\n })\n .catch((error) => {\n events.emit('shipping/estimate', {\n address: partialAddress,\n shippingMethod: null,\n availableShippingMethods: [],\n success: false,\n });\n\n throw error;\n });\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { CHECKOUT_DATA_FRAGMENT } from '@/checkout/api/graphql/CheckoutDataFragment.graphql';\n\nexport const setShippingAddressOnCartAndUseAsBillingMutation = /* GraphQL */ `\n mutation setShippingAddressOnCartAndUseAsBilling(\n $cartId: String!\n $shippingAddress: ShippingAddressInput!\n ) {\n setShippingAddressesOnCart(\n input: { cart_id: $cartId, shipping_addresses: [$shippingAddress] }\n ) {\n cart {\n id\n }\n }\n\n setBillingAddressOnCart(\n input: { cart_id: $cartId, billing_address: { same_as_shipping: true } }\n ) {\n cart {\n ...CHECKOUT_DATA_FRAGMENT\n }\n }\n }\n\n ${CHECKOUT_DATA_FRAGMENT}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { CHECKOUT_DATA_FRAGMENT } from '@/checkout/api/graphql/CheckoutDataFragment.graphql';\n\nexport const setShippingAddressOnCartMutation = /* GraphQL */ `\n mutation setShippingAddressOnCart(\n $cartId: String!\n $shippingAddress: ShippingAddressInput!\n ) {\n setShippingAddressesOnCart(\n input: { cart_id: $cartId, shipping_addresses: [$shippingAddress] }\n ) {\n cart {\n ...CHECKOUT_DATA_FRAGMENT\n }\n }\n }\n\n ${CHECKOUT_DATA_FRAGMENT}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { NEGOTIABLE_QUOTE_FRAGMENT } from '@/checkout/api/graphql/NegotiableQuoteFragment.graphql';\n\nexport const setShippingAddressOnQuoteMutation = /* GraphQL */ `\n mutation setShippingAddressOnQuote(\n $quoteId: ID!\n $shippingAddress: NegotiableQuoteShippingAddressInput!\n ) {\n setNegotiableQuoteShippingAddress(\n input: { quote_uid: $quoteId, shipping_addresses: [$shippingAddress] }\n ) {\n quote {\n ...NEGOTIABLE_QUOTE_FRAGMENT\n }\n }\n }\n\n ${NEGOTIABLE_QUOTE_FRAGMENT}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { NEGOTIABLE_QUOTE_FRAGMENT } from '@/checkout/api/graphql/NegotiableQuoteFragment.graphql';\n\nexport const setShippingAddressOnQuoteAndUseAsBillingMutation = /* GraphQL */ `\n mutation setShippingAddressOnQuoteAndUseAsBilling(\n $quoteId: ID!\n $shippingAddress: NegotiableQuoteShippingAddressInput!\n ) {\n setNegotiableQuoteShippingAddress(\n input: { quote_uid: $quoteId, shipping_addresses: [$shippingAddress] }\n ) {\n quote {\n uid\n }\n }\n\n setNegotiableQuoteBillingAddress(\n input: {\n quote_uid: $quoteId\n billing_address: { same_as_shipping: true }\n }\n ) {\n quote {\n ...NEGOTIABLE_QUOTE_FRAGMENT\n }\n }\n }\n\n ${NEGOTIABLE_QUOTE_FRAGMENT}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { config } from '@/checkout/api';\nimport {\n setShippingAddressOnCartAndUseAsBillingMutation,\n setShippingAddressOnCartMutation,\n setShippingAddressOnQuoteAndUseAsBillingMutation,\n setShippingAddressOnQuoteMutation,\n} from '@/checkout/api/setShippingAddress/graphql';\nimport { ShippingAddressInput as ShippingAddressInputModel } from '@/checkout/data/models';\nimport {\n transformCart,\n transformNegotiableQuote,\n transformShippingAddressInputModelToCartInput,\n transformShippingAddressInputModelToQuoteInput,\n} from '@/checkout/data/transforms';\nimport { dispatchApiCall, getValue, QueueName } from '@/checkout/lib';\nimport { InvalidInput, MissingShippingAddress } from '@/checkout/lib/errors';\nimport { ensureHasCartOrQuoteId } from '@/checkout/lib/guards';\nimport { state } from '@/checkout/lib/state';\n\nconst ensureIsValidCartInput = ({\n address,\n customerAddressId,\n customerAddressUid,\n pickupLocationCode,\n}: ShippingAddressInputModel) => {\n if (!customerAddressId && customerAddressUid) {\n throw new InvalidInput('customerAddressUid is not supported');\n }\n\n if (!customerAddressId && !pickupLocationCode && !address) {\n throw new MissingShippingAddress();\n }\n};\n\nconst ensureIsValidQuoteInput = ({\n address,\n customerAddressId,\n customerAddressUid,\n pickupLocationCode,\n}: ShippingAddressInputModel) => {\n if (pickupLocationCode) {\n throw new InvalidInput('pickup location is not supported in quotes');\n }\n\n if (!customerAddressUid && customerAddressId) {\n throw new InvalidInput('customerAddressId is not supported in quotes');\n }\n\n if (!customerAddressUid && !address) {\n throw new MissingShippingAddress();\n }\n};\n\nconst ensureIsValidInput = (input: ShippingAddressInputModel) => {\n const isCart = Boolean(state.cartId);\n const isQuote = Boolean(state.quoteId);\n\n if (isCart) {\n ensureIsValidCartInput(input);\n } else if (isQuote) {\n ensureIsValidQuoteInput(input);\n }\n};\n\nconst createShippingAddressSetter = <TTransformedInput, TTransformedOutput>(\n entityId: string,\n entityKey: string,\n mutation: string,\n transformer: (data: any) => TTransformedOutput,\n transformInput: (input: ShippingAddressInputModel) => TTransformedInput,\n path: string\n) => {\n return async (\n input: ShippingAddressInputModel\n ): Promise<TTransformedOutput> => {\n return await dispatchApiCall({\n type: 'mutation',\n query: mutation,\n options: {\n variables: {\n [entityKey]: entityId,\n shippingAddress: transformInput(input),\n },\n },\n path,\n queueName: QueueName.Updates,\n transformer,\n });\n };\n};\n\nexport const setShippingAddress = async (input: ShippingAddressInputModel) => {\n ensureHasCartOrQuoteId();\n ensureIsValidInput(input);\n\n const { defaults } = config.getConfig();\n\n const isBillToShipping =\n getValue('isBillToShipping') ?? defaults?.isBillToShipping;\n\n const isCart = Boolean(state.cartId);\n\n const setter = isCart\n ? createShippingAddressSetter(\n state.cartId!,\n 'cartId',\n isBillToShipping\n ? setShippingAddressOnCartAndUseAsBillingMutation\n : setShippingAddressOnCartMutation,\n transformCart,\n transformShippingAddressInputModelToCartInput,\n isBillToShipping\n ? 'setBillingAddressOnCart.cart'\n : 'setShippingAddressesOnCart.cart'\n )\n : createShippingAddressSetter(\n state.quoteId!,\n 'quoteId',\n isBillToShipping\n ? setShippingAddressOnQuoteAndUseAsBillingMutation\n : setShippingAddressOnQuoteMutation,\n transformNegotiableQuote,\n transformShippingAddressInputModelToQuoteInput,\n isBillToShipping\n ? 'setNegotiableQuoteBillingAddress.quote'\n : 'setNegotiableQuoteShippingAddress.quote'\n );\n\n return await setter(input);\n};\n"],"names":["estimateShippingMethodsMutation","estimateShippingMethods","input","cartId","state","countryCode","_a","_b","MissingCart","MissingCountry","region_id","region_name","zip","region","address","estimateShippingAddressData","_c","_d","partialAddress","transformShippingEstimatePartialAddress","dispatchApiCall","QueueName","transformShippingMethods","estimation","defaults","shipping","config","filteredOptions","hasAvailableOptions","shippingMethod","userSelection","getValue","selection","method","transformShippingEstimateShippingMethod","events","error","setShippingAddressOnCartAndUseAsBillingMutation","CHECKOUT_DATA_FRAGMENT","setShippingAddressOnCartMutation","setShippingAddressOnQuoteMutation","NEGOTIABLE_QUOTE_FRAGMENT","setShippingAddressOnQuoteAndUseAsBillingMutation","ensureIsValidCartInput","customerAddressId","customerAddressUid","pickupLocationCode","InvalidInput","MissingShippingAddress","ensureIsValidQuoteInput","ensureIsValidInput","isCart","isQuote","createShippingAddressSetter","entityId","entityKey","mutation","transformer","transformInput","path","setShippingAddress","ensureHasCartOrQuoteId","isBillToShipping","transformCart","transformShippingAddressInputModelToCartInput","transformNegotiableQuote","transformShippingAddressInputModelToQuoteInput"],"mappings":"qfAiBa,MAAAA,EAAgD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,ECuBhDC,GAA0B,MACrCC,GAC0C,aAC1C,MAAMC,EAASC,EAAM,OACfC,IACJC,EAAAJ,GAAA,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/storefront-checkout/src/api/estimateShippingMethods/graphql/estimateShippingMethods.graphql.ts","/@dropins/storefront-checkout/src/api/estimateShippingMethods/estimateShippingMethods.ts","/@dropins/storefront-checkout/src/api/setShippingAddress/graphql/setShippingAddressOnCartAndUseAsBillingMutation.graphql.ts","/@dropins/storefront-checkout/src/api/setShippingAddress/graphql/setShippingAddressOnCartMutation.graphql.ts","/@dropins/storefront-checkout/src/api/setShippingAddress/graphql/setShippingAddressOnQuote.graphql.ts","/@dropins/storefront-checkout/src/api/setShippingAddress/graphql/setShippingAddressOnQuoteAndUseAsBillingMutation.graphql.ts","/@dropins/storefront-checkout/src/api/setShippingAddress/setShippingAddress.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { ESTIMATE_SHIPPING_METHOD_FRAGMENT } from '@/checkout/api/graphql/ShippingMethodFragment.graphql';\n\nexport const estimateShippingMethodsMutation = /* GraphQL */ `\n mutation estimateShippingMethods(\n $cartId: String!\n $address: EstimateAddressInput!\n ) {\n estimateShippingMethods(input: { cart_id: $cartId, address: $address }) {\n ...ESTIMATE_SHIPPING_METHOD_FRAGMENT\n }\n }\n\n ${ESTIMATE_SHIPPING_METHOD_FRAGMENT}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { config } from '@/checkout/api';\nimport { estimateShippingMethodsMutation } from '@/checkout/api/estimateShippingMethods/graphql';\nimport { ShippingMethod } from '@/checkout/data/models';\nimport {\n transformEstimateShippingMethods,\n transformShippingEstimatePartialAddress,\n transformShippingEstimateShippingMethod,\n} from '@/checkout/data/transforms';\nimport { dispatchApiCall, getValue, QueueName, state } from '@/checkout/lib';\nimport { MissingCart, MissingCountry } from '@/checkout/lib/errors';\nimport { events } from '@adobe-commerce/event-bus';\n\nexport interface ShippingEstimationCriteria {\n country_code: string;\n region_name?: string;\n region_id?: string | number;\n zip?: string;\n}\n\nexport type EstimateShippingInput = {\n criteria: ShippingEstimationCriteria;\n};\n\nexport const estimateShippingMethods = async (\n input?: EstimateShippingInput\n): Promise<ShippingMethod[] | undefined> => {\n const cartId = state.cartId;\n const countryCode =\n input?.criteria?.country_code ?? state.config?.defaultCountry;\n\n if (!cartId) throw new MissingCart();\n if (!countryCode) throw new MissingCountry();\n\n const { region_id, region_name, zip } = input?.criteria ?? {};\n\n // Process region information\n const region =\n region_id || region_name\n ? {\n region_id:\n typeof region_id === 'string' ? parseInt(region_id, 10) : region_id,\n region_code: region_name,\n }\n : undefined;\n\n // Build address for API call\n const address = {\n country_code: countryCode,\n ...(zip && { postcode: zip }),\n ...(region && {\n region: {\n ...(region.region_id && { region_id: region.region_id }),\n ...(region.region_code && { region_code: region.region_code }),\n },\n }),\n };\n\n // Create address data for transformation\n const estimateShippingAddressData = {\n country_id: countryCode,\n region: address.region?.region_code,\n region_id: address.region?.region_id,\n postcode: zip,\n };\n\n const partialAddress = transformShippingEstimatePartialAddress(\n estimateShippingAddressData\n );\n\n return dispatchApiCall({\n options: { variables: { cartId, address } },\n path: 'estimateShippingMethods',\n query: estimateShippingMethodsMutation,\n queueName: QueueName.ShippingEstimate,\n transformer: transformEstimateShippingMethods,\n type: 'mutation',\n })\n .then((estimation) => {\n const { defaults, shipping } = config.getConfig();\n\n const filteredOptions = shipping?.filterOptions\n ? estimation.filter(shipping.filterOptions)\n : estimation;\n\n const hasAvailableOptions = filteredOptions.length > 0;\n const partialAddress = transformShippingEstimatePartialAddress(\n estimateShippingAddressData\n );\n\n let shippingMethod = null;\n\n if (hasAvailableOptions) {\n const userSelection = getValue('selectedShippingMethod');\n\n let selection = estimation.find(\n (method) =>\n method.code === userSelection?.code &&\n method.carrier.code === userSelection?.carrier.code\n );\n\n if (!selection && defaults?.selectedShippingMethod) {\n selection = defaults.selectedShippingMethod(estimation) ?? undefined;\n }\n\n if (!selection) {\n selection = estimation[0];\n }\n\n shippingMethod = transformShippingEstimateShippingMethod(selection);\n }\n\n events.emit('shipping/estimate', {\n address: partialAddress,\n availableShippingMethods: estimation,\n shippingMethod,\n success: true,\n });\n\n return filteredOptions;\n })\n .catch((error) => {\n events.emit('shipping/estimate', {\n address: partialAddress,\n shippingMethod: null,\n availableShippingMethods: [],\n success: false,\n });\n\n throw error;\n });\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { CHECKOUT_DATA_FRAGMENT } from '@/checkout/api/graphql/CheckoutDataFragment.graphql';\n\nexport const setShippingAddressOnCartAndUseAsBillingMutation = /* GraphQL */ `\n mutation setShippingAddressOnCartAndUseAsBilling(\n $cartId: String!\n $shippingAddress: ShippingAddressInput!\n ) {\n setShippingAddressesOnCart(\n input: { cart_id: $cartId, shipping_addresses: [$shippingAddress] }\n ) {\n cart {\n id\n }\n }\n\n setBillingAddressOnCart(\n input: { cart_id: $cartId, billing_address: { same_as_shipping: true } }\n ) {\n cart {\n ...CHECKOUT_DATA_FRAGMENT\n }\n }\n }\n\n ${CHECKOUT_DATA_FRAGMENT}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { CHECKOUT_DATA_FRAGMENT } from '@/checkout/api/graphql/CheckoutDataFragment.graphql';\n\nexport const setShippingAddressOnCartMutation = /* GraphQL */ `\n mutation setShippingAddressOnCart(\n $cartId: String!\n $shippingAddress: ShippingAddressInput!\n ) {\n setShippingAddressesOnCart(\n input: { cart_id: $cartId, shipping_addresses: [$shippingAddress] }\n ) {\n cart {\n ...CHECKOUT_DATA_FRAGMENT\n }\n }\n }\n\n ${CHECKOUT_DATA_FRAGMENT}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { NEGOTIABLE_QUOTE_FRAGMENT } from '@/checkout/api/graphql/NegotiableQuoteFragment.graphql';\n\nexport const setShippingAddressOnQuoteMutation = /* GraphQL */ `\n mutation setShippingAddressOnQuote(\n $quoteId: ID!\n $shippingAddress: NegotiableQuoteShippingAddressInput!\n ) {\n setNegotiableQuoteShippingAddress(\n input: { quote_uid: $quoteId, shipping_addresses: [$shippingAddress] }\n ) {\n quote {\n ...NEGOTIABLE_QUOTE_FRAGMENT\n }\n }\n }\n\n ${NEGOTIABLE_QUOTE_FRAGMENT}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { NEGOTIABLE_QUOTE_FRAGMENT } from '@/checkout/api/graphql/NegotiableQuoteFragment.graphql';\n\nexport const setShippingAddressOnQuoteAndUseAsBillingMutation = /* GraphQL */ `\n mutation setShippingAddressOnQuoteAndUseAsBilling(\n $quoteId: ID!\n $shippingAddress: NegotiableQuoteShippingAddressInput!\n ) {\n setNegotiableQuoteShippingAddress(\n input: { quote_uid: $quoteId, shipping_addresses: [$shippingAddress] }\n ) {\n quote {\n uid\n }\n }\n\n setNegotiableQuoteBillingAddress(\n input: {\n quote_uid: $quoteId\n billing_address: { same_as_shipping: true }\n }\n ) {\n quote {\n ...NEGOTIABLE_QUOTE_FRAGMENT\n }\n }\n }\n\n ${NEGOTIABLE_QUOTE_FRAGMENT}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { config } from '@/checkout/api';\nimport {\n setShippingAddressOnCartAndUseAsBillingMutation,\n setShippingAddressOnCartMutation,\n setShippingAddressOnQuoteAndUseAsBillingMutation,\n setShippingAddressOnQuoteMutation,\n} from '@/checkout/api/setShippingAddress/graphql';\nimport { ShippingAddressInput as ShippingAddressInputModel } from '@/checkout/data/models';\nimport {\n transformCart,\n transformNegotiableQuote,\n transformShippingAddressInputModelToCartInput,\n transformShippingAddressInputModelToQuoteInput,\n} from '@/checkout/data/transforms';\nimport { dispatchApiCall, getValue, QueueName } from '@/checkout/lib';\nimport { InvalidInput, MissingShippingAddress } from '@/checkout/lib/errors';\nimport { ensureHasCartOrQuoteId } from '@/checkout/lib/guards';\nimport { state } from '@/checkout/lib/state';\n\nconst ensureIsValidCartInput = ({\n address,\n customerAddressId,\n customerAddressUid,\n pickupLocationCode,\n}: ShippingAddressInputModel) => {\n if (!customerAddressId && customerAddressUid) {\n throw new InvalidInput('customerAddressUid is not supported');\n }\n\n if (!customerAddressId && !pickupLocationCode && !address) {\n throw new MissingShippingAddress();\n }\n};\n\nconst ensureIsValidQuoteInput = ({\n address,\n customerAddressId,\n customerAddressUid,\n pickupLocationCode,\n}: ShippingAddressInputModel) => {\n if (pickupLocationCode) {\n throw new InvalidInput('pickup location is not supported in quotes');\n }\n\n if (!customerAddressUid && customerAddressId) {\n throw new InvalidInput('customerAddressId is not supported in quotes');\n }\n\n if (!customerAddressUid && !address) {\n throw new MissingShippingAddress();\n }\n};\n\nconst ensureIsValidInput = (input: ShippingAddressInputModel) => {\n const isCart = Boolean(state.cartId);\n const isQuote = Boolean(state.quoteId);\n\n if (isCart) {\n ensureIsValidCartInput(input);\n } else if (isQuote) {\n ensureIsValidQuoteInput(input);\n }\n};\n\nconst createShippingAddressSetter = <TTransformedInput, TTransformedOutput>(\n entityId: string,\n entityKey: string,\n mutation: string,\n transformer: (data: any) => TTransformedOutput,\n transformInput: (input: ShippingAddressInputModel) => TTransformedInput,\n path: string\n) => {\n return async (\n input: ShippingAddressInputModel\n ): Promise<TTransformedOutput> => {\n return await dispatchApiCall({\n type: 'mutation',\n query: mutation,\n options: {\n variables: {\n [entityKey]: entityId,\n shippingAddress: transformInput(input),\n },\n },\n path,\n queueName: QueueName.Updates,\n transformer,\n });\n };\n};\n\nexport const setShippingAddress = async (input: ShippingAddressInputModel) => {\n ensureHasCartOrQuoteId();\n ensureIsValidInput(input);\n\n const { defaults } = config.getConfig();\n\n const isBillToShipping =\n getValue('isBillToShipping') ?? defaults?.isBillToShipping;\n\n const isCart = Boolean(state.cartId);\n\n const setter = isCart\n ? createShippingAddressSetter(\n state.cartId!,\n 'cartId',\n isBillToShipping\n ? setShippingAddressOnCartAndUseAsBillingMutation\n : setShippingAddressOnCartMutation,\n transformCart,\n transformShippingAddressInputModelToCartInput,\n isBillToShipping\n ? 'setBillingAddressOnCart.cart'\n : 'setShippingAddressesOnCart.cart'\n )\n : createShippingAddressSetter(\n state.quoteId!,\n 'quoteId',\n isBillToShipping\n ? setShippingAddressOnQuoteAndUseAsBillingMutation\n : setShippingAddressOnQuoteMutation,\n transformNegotiableQuote,\n transformShippingAddressInputModelToQuoteInput,\n isBillToShipping\n ? 'setNegotiableQuoteBillingAddress.quote'\n : 'setNegotiableQuoteShippingAddress.quote'\n );\n\n return await setter(input);\n};\n"],"names":["estimateShippingMethodsMutation","ESTIMATE_SHIPPING_METHOD_FRAGMENT","estimateShippingMethods","input","cartId","state","countryCode","_a","_b","MissingCart","MissingCountry","region_id","region_name","zip","region","address","estimateShippingAddressData","_c","_d","partialAddress","transformShippingEstimatePartialAddress","dispatchApiCall","QueueName","transformEstimateShippingMethods","estimation","defaults","shipping","config","filteredOptions","hasAvailableOptions","shippingMethod","userSelection","getValue","selection","method","transformShippingEstimateShippingMethod","events","error","setShippingAddressOnCartAndUseAsBillingMutation","CHECKOUT_DATA_FRAGMENT","setShippingAddressOnCartMutation","setShippingAddressOnQuoteMutation","NEGOTIABLE_QUOTE_FRAGMENT","setShippingAddressOnQuoteAndUseAsBillingMutation","ensureIsValidCartInput","customerAddressId","customerAddressUid","pickupLocationCode","InvalidInput","MissingShippingAddress","ensureIsValidQuoteInput","ensureIsValidInput","isCart","isQuote","createShippingAddressSetter","entityId","entityKey","mutation","transformer","transformInput","path","setShippingAddress","ensureHasCartOrQuoteId","isBillToShipping","transformCart","transformShippingAddressInputModelToCartInput","transformNegotiableQuote","transformShippingAddressInputModelToQuoteInput"],"mappings":"+eAmBa,MAAAA,EAAgD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUzDC,CAAiC;AAAA,ECWxBC,GAA0B,MACrCC,GAC0C,aAC1C,MAAMC,EAASC,EAAM,OACfC,IACJC,EAAAJ,GAAA,YAAAA,EAAO,WAAP,YAAAI,EAAiB,iBAAgBC,EAAAH,EAAM,SAAN,YAAAG,EAAc,gBAEjD,GAAI,CAACJ,EAAc,MAAA,IAAIK,EACvB,GAAI,CAACH,EAAmB,MAAA,IAAII,EAE5B,KAAM,CAAE,UAAAC,EAAW,YAAAC,EAAa,IAAAC,IAAQV,GAAA,YAAAA,EAAO,WAAY,CAAC,EAGtDW,EACJH,GAAaC,EACT,CACA,UACE,OAAOD,GAAc,SAAW,SAASA,EAAW,EAAE,EAAIA,EAC5D,YAAaC,CAAA,EAEb,OAGAG,EAAU,CACd,aAAcT,EACd,GAAIO,GAAO,CAAE,SAAUA,CAAI,EAC3B,GAAIC,GAAU,CACZ,OAAQ,CACN,GAAIA,EAAO,WAAa,CAAE,UAAWA,EAAO,SAAU,EACtD,GAAIA,EAAO,aAAe,CAAE,YAAaA,EAAO,WAAY,CAAA,CAC9D,CAEJ,EAGME,EAA8B,CAClC,WAAYV,EACZ,QAAQW,EAAAF,EAAQ,SAAR,YAAAE,EAAgB,YACxB,WAAWC,EAAAH,EAAQ,SAAR,YAAAG,EAAgB,UAC3B,SAAUL,CACZ,EAEMM,EAAiBC,EACrBJ,CACF,EAEA,OAAOK,EAAgB,CACrB,QAAS,CAAE,UAAW,CAAE,OAAAjB,EAAQ,QAAAW,EAAU,EAC1C,KAAM,0BACN,MAAOf,EACP,UAAWsB,EA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