import{ay as e}from"./6ec9a0fa.rdcQt2v8.js";function n(e,n,o){const t=e.targetMerchandiseLines?.[0]?.stableId;return t&&n?.stableIdToShopId.get(t)||o}function o({line:o,method:t,localShopId:i,marketDrivenShippingEnabled:r,remoteShopsConfigMap:a,remoteMerchandiseDetails:p}){const d=e(t);if(!d)return;const h=n(o,p,i);return function({lineShopId:n,localShopId:o,marketDrivenShippingEnabled:t,remoteShopsConfigMap:i,method:r}){if(n===o)return t;const a=i?.get(n);return a?a.marketDrivenShippingEnabled:!!r&&Boolean(e(r))}({lineShopId:h,localShopId:i,marketDrivenShippingEnabled:r,remoteShopsConfigMap:a,method:t})?`${h}:${d}`:void 0}export{n,o as t};