{"version":3,"file":"FC_ProductPriceCompare.BmLylA09.mjs","names":["useState","get","useMemo","isCurrencySymbolSameAsCode","getLocaleFromCountry","p","currentCurrencyCode","useState","useCallback","p","get","useMemo","isCurrencySymbolSameAsCode","getLocaleFromCountry","currentCurrencyCode","useState","useCallback","p","useMemo","get","useRef","currentCurrencyCode","amount"],"sources":["https:/framerusercontent.com/modules/DfiHm7rgZZvl0dxRShLF/ytQrhfAVRO0z6YGuv8tH/FC_ProductPriceDiscount.js","https:/framerusercontent.com/modules/N07JJZfuMtyHijtiRRgH/w7Q6FgTwQHOMCVAAnumg/FC_ProductPrice.js","https:/framerusercontent.com/modules/ZipJAXrtSkBsdbTSry5q/KCNDDioMjkqBn9yvxlVd/FC_ProductPriceCompare.js"],"sourcesContent":["/*\n * Framer Commerce\n * Confidential and Proprietary - All Rights Reserved\n * Unauthorized use, reproduction, distribution, or disclosure of this\n * source code or any related information is strictly prohibited.\n *\n * This software is the exclusive property of Framer Commerce (\"Company\").\n * It is considered highly confidential and proprietary information.\n *\n * Any use, copying, modification, distribution, or sharing of this software,\n * in whole or in part, without the express written permission of the Company\n * is strictly prohibited and may result in legal action.\n *\n * DISCLAIMER: This software does not provide any express or\n * implied warranties, including, but not limited to, the implied warranties\n * of merchantability and fitness for a particular purpose. In no event shall\n * Framer Commerce be liable for any direct, indirect, incidental, special,\n * exemplary, or consequential damages (including, but not limited to, procurement\n * of substitute goods or services; loss of use, data, or profits; or business\n * interruption) however caused and on any theory of liability, whether in\n * contract, strict liability, or tort (including negligence or otherwise)\n * arising in any way out of the use of this software, even if advised of\n * the possibility of such damage.\n *\n * Any unauthorized possession, use, copying, distribution, or dissemination\n * of this software will be considered a breach of confidentiality and may\n * result in legal action.\n *\n * For inquiries, contact:\n * Framer Commerce\n * Email: hello@framercommerce.com\n *\n * © 2025 Butter Supply Inc. All Rights Reserved.\n */import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useMemo,useState}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{get}from\"lodash-es\";import{useIsBrowser}from\"https://framerusercontent.com/modules/ncBs5KPMI9I5GEta13fn/zGXDjuZapa1SGy6D8P5e/IsBrowser.js\";import{currencyMaps}from\"https://framerusercontent.com/modules/k9s4cejdkBGDjmzudhzM/18cq93eooqM4YmdbL7E2/currencyMaps.js\";import{knownCurrenciesWithCodeAsSymbol}from\"https://framerusercontent.com/modules/k9s4cejdkBGDjmzudhzM/18cq93eooqM4YmdbL7E2/currencyMaps.js\";import{getLocaleFromCountry}from\"https://framerusercontent.com/modules/vC6fzbfO83MgBPIhn5zl/DUlbmWuOELzEUenVmv3G/locales.js\";// Helper function to check if a currency's symbol is the same as its code\nconst isCurrencySymbolSameAsCode=currencyCode=>{// For some currencies like CHF, the browser might use the code as the symbol\nif(!currencyCode)return false;if(knownCurrenciesWithCodeAsSymbol.includes(currencyCode)){return true;}try{const formatted=new Intl.NumberFormat(undefined,{style:\"currency\",currency:currencyCode,currencyDisplay:\"narrowSymbol\"}).format(0);// Remove digits, decimal points, and common formatting characters\nconst cleanFormatted=formatted.replace(/[0-9.,\\s]/g,\"\");// Check if what remains is the currency code\nreturn cleanFormatted===currencyCode;}catch(e){return false;}};/**\n * @framerDisableUnlink\n */export default function FC_ProductPriceDiscount(props){const{shopifyProductID,discountType,format:{showCurrency,showSymbol,showDecimals,currencyCode}={},textFormat,previewPrice,previewComparePrice,discountPrefix=\"Up to\"}=props;const[product,setProduct]=useState();const[activeVariant,setActiveVariant]=useState();const[selectedCurrency,setSelectedCurrency]=useState(()=>{// Initialize with the currency code from the product or default to \"USD\"\nreturn get(product,\"priceRange.minVariantPrice.currencyCode\")||\"USD\";});const[selectedCountryCode,setSelectedCountryCode]=useState(\"\");const[selectedCountry,setSelectedCountry]=useState(\"\");const[partialSelections,setPartialSelections]=useState({});const[variantSelectorAction,setVariantSelectorAction]=useState(\"\");const isBrowser=useIsBrowser();const showMockValues=useMemo(()=>typeof RenderTarget!==\"undefined\"&&(RenderTarget.current()===RenderTarget.canvas||isBrowser&&window.location.origin.endsWith(\"framercanvas.com\")),[isBrowser]);useEffect(()=>{if(product){setSelectedCurrency(get(product,\"priceRange.minVariantPrice.currencyCode\")||\"USD\");}},[product]);// Initialize currency from localStorage on page load\nuseEffect(()=>{if(!isBrowser)return;const storedCurrency=localStorage.getItem(\"selectedCurrency\");const storedCountryCode=localStorage.getItem(\"selectedCountryCode\");const storedCountry=localStorage.getItem(\"selectedCountry\");setSelectedCurrency(storedCurrency||\"USD\");setSelectedCountryCode(storedCountryCode||\"US\");setSelectedCountry(storedCountry||\"United States\");},[isBrowser]);useEffect(()=>{if(!isBrowser)return;const handleVariantChange=e=>{try{if(e.detail){// Check for purchase action flag - if this is a purchase action, don't update variant state\nif(e.detail.isPurchaseAction||e.detail.onClickAction===\"purchase\"){//console.log(\"Purchase action detected, returning\", e.detail?.isPurchaseAction)\nreturn;}const expectedProductId=`gid://shopify/Product/${shopifyProductID}`;if(!e.detail.productId||e.detail.productId!==expectedProductId){return;}}//console.log(\"variantSelectorAction\", e.detail.onClickAction)\nsetVariantSelectorAction(e.detail.onClickAction);// Get products from shopXtools storage\nconst products=window.shopXtools?.products||[];const _matchingProduct=products.find(({node:_product})=>_product.id===`gid://shopify/Product/${shopifyProductID}`);if(_matchingProduct){setProduct(_matchingProduct.node);// Find the matching variant in the current product data\nconst matchingVariant=_matchingProduct.node?.variants?.edges?.find(({node})=>node.selectedOptions.every(option=>e.detail.selectedOptions.find(detailOption=>detailOption.name===option.name&&detailOption.value===option.value)));if(matchingVariant){if(e.detail.onClickAction===\"purchase\"){setActiveVariant(null);//console.log(\"setting partialSelections for purchase action\", e.detail.selectedOptions[0])\nsetPartialSelections({[e.detail.selectedOptions[0].name]:e.detail.selectedOptions[0].value});}else if(e.detail?.isCompleteVariant===false){// Partial: keep range behavior\nsetActiveVariant(null);if(Array.isArray(e.detail.selectedOptions)){const partial={};e.detail.selectedOptions.forEach(opt=>{if(opt?.name)partial[opt.name]=opt.value;});setPartialSelections(partial);}}else{setActiveVariant(matchingVariant.node);setPartialSelections({});}}else{if(e.detail?.isCompleteVariant){setActiveVariant(e.detail);if(e.detail.onClickAction!==\"purchase\"){setPartialSelections({});}}}}}catch(error){// Fallback to using the event detail directly\nif(e.detail?.isCompleteVariant){setActiveVariant(e.detail);if(e.detail.onClickAction!==\"purchase\"){setPartialSelections({});}}else{setActiveVariant(null);if(Array.isArray(e.detail?.selectedOptions)){const partial={};e.detail.selectedOptions.forEach(opt=>{if(opt?.name)partial[opt.name]=opt.value;});setPartialSelections(partial);}}}};const handleProductsReady=e=>{if(Array.isArray(e.detail.products)){const _matchingProduct=e.detail.products.find(({node:_product})=>_product.id===`gid://shopify/Product/${shopifyProductID}`);setProduct(_matchingProduct?_matchingProduct.node:null);// If there's only one variant, set it as active\nif(_matchingProduct?.node?.variants?.edges?.length===1){const variant=_matchingProduct.node.variants.edges[0].node;setActiveVariant(variant);}// setActiveVariant(\n//     _matchingProduct.node?.variants?.edges[0].node\n// )\n}};// Add event listener for variant option selections\nconst handleVariantOptionSelected=e=>{//console.log(\"variant_option_selected\", e.detail)\nif(e.detail?.isPurchaseAction){//console.log(\"Purchase action is true, returning\", e.detail?.isPurchaseAction)\nreturn;}// Check if this event is for our product\nconst eventProductId=e.detail?.productId;const expectedProductId=`gid://shopify/Product/${shopifyProductID}`;if(eventProductId&&eventProductId!==expectedProductId){//console.log(\"Event not for this product\", eventProductId, expectedProductId)\nreturn;}if(e.detail?.optionName&&e.detail?.value){// Merge with existing partial selections instead of replacing\nsetPartialSelections(prev=>({...prev,[e.detail.optionName]:e.detail.value}));//console.log(\"setting partialSelections from individual option\", e.detail.optionName, e.detail.value)\n}};// Initial product load function\nconst loadProduct=async()=>{try{// Get products from shopXtools storage\nconst products=window.shopXtools?.products||[];const _matchingProduct=products.find(({node:_product})=>_product.id===`gid://shopify/Product/${shopifyProductID}`);if(_matchingProduct){setProduct(_matchingProduct.node);if(_matchingProduct.node?.variants?.edges?.length===1){setActiveVariant(_matchingProduct.node.variants.edges[0].node);}// setActiveVariant(\n//     _matchingProduct.node?.variants?.edges[0].node\n// )\n}}catch(error){// Error handling\n}};// Call loadProduct on mount\nloadProduct();// Initial check for existing products\nif(window[\"shopXtools\"]?.products){if(Array.isArray(window[\"shopXtools\"].products)){const _matchingProduct=window[\"shopXtools\"].products.find(({node:_product})=>_product.id===`gid://shopify/Product/${shopifyProductID}`);setProduct(_matchingProduct?_matchingProduct.node:null);// If there's only one variant, set it as active\nif(_matchingProduct?.node?.variants?.edges?.length===1){setActiveVariant(_matchingProduct.node.variants.edges[0].node);}// setActiveVariant(\n//     _matchingProduct?.node?.variants?.edges[0]?.node\n// )\n}}// Add event listeners\ndocument.addEventListener(\"data__products-ready\",handleProductsReady);document.addEventListener(\"product__active-variant__changed\",handleVariantChange);document.addEventListener(\"variant_option_selected\",handleVariantOptionSelected);document.addEventListener(\"__variant_option_selected\",handleVariantOptionSelected);// Cleanup\nreturn()=>{document.removeEventListener(\"data__products-ready\",handleProductsReady);document.removeEventListener(\"product__active-variant__changed\",handleVariantChange);document.removeEventListener(\"variant_option_selected\",handleVariantOptionSelected);document.removeEventListener(\"__variant_option_selected\",handleVariantOptionSelected);};},[isBrowser,shopifyProductID,selectedCurrency]);useEffect(()=>{if(!isBrowser)return;const handleCurrencyChange=event=>{const{currency,countryCode,country}=event.detail;setSelectedCurrency(currency);setSelectedCountryCode(countryCode);setSelectedCountry(country);try{// Get products from shopXtools storage\nconst products=window.shopXtools?.products||[];const _matchingProduct=products.find(({node:_product})=>_product.id===`gid://shopify/Product/${shopifyProductID}`);if(_matchingProduct){setProduct(_matchingProduct.node);// Preserve active variant selection if possible\nif(activeVariant){const matchingVariant=_matchingProduct.node?.variants?.edges?.find(({node})=>node.selectedOptions.every(option=>activeVariant.selectedOptions.find(activeOption=>activeOption.name===option.name&&activeOption.value===option.value)));if(matchingVariant){setActiveVariant(matchingVariant.node);}}}}catch(error){// Error handling\n}};window.addEventListener(\"currency_changed\",handleCurrencyChange);return()=>{window.removeEventListener(\"currency_changed\",handleCurrencyChange);};},[isBrowser,shopifyProductID,activeVariant,product]);const currencyConfig=useMemo(()=>{const config=typeof window!==\"undefined\"?{position:window?.__FcCurrencyConfigs?.currencyPosition||\"Before\",showCode:window?.__FcCurrencyConfigs?.currencyPosition!==\"Hide\",symbol:currencyMaps[selectedCurrency]||\"$\"}:{position:\"Before\",showCode:false,symbol:\"$\"};return config;},[selectedCurrency]);// Common function to format price based on options\nconst formatPriceWithOptions=(numericPrice,currCode)=>{const symbolSameAsCode=isCurrencySymbolSameAsCode(currCode);// Get locale from selected country code\nconst locale=getLocaleFromCountry(selectedCountryCode);// Log browser user agent for debugging iOS-specific issues\n// if (isBrowser) {\n//     console.log(\"[FC_ProductPriceDiscount] Format debug:\", {\n//         userAgent: navigator.userAgent,\n//         isCurrencySymbolSameAsCode: symbolSameAsCode,\n//         currencyCode: currCode,\n//         selectedCountryCode,\n//         locale,\n//         showSymbol,\n//         showCurrency,\n//         showDecimals,\n//     })\n// }\n// Determine if we should show decimals based on the setting\nconst shouldShowDecimals=()=>{if(showDecimals===\"Always show\")return true;if(showDecimals===\"Never show\")return false;if(showDecimals===\"Hide when .00\"){// Check if the decimal part is zero\nreturn numericPrice%1!==0;}return true// Default fallback for boolean value\n;};const decimalDigits=shouldShowDecimals()?2:0;// If showing neither symbol nor code, just format the number\nif(!showSymbol&&!showCurrency){return new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);}// Special case for USD to prevent \"US$\" display in Safari iOS\nif(currCode===\"USD\"&&showSymbol){// Check if running on iOS device\nconst isIOS=isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream;// Format USD manually to avoid the iOS \"US$\" prefix\nif(isIOS){const number=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);if(!showCurrency){return`$${number}`// Just \"$50\" format\n;}else{return`$${number} USD`// \"$50 USD\" format\n;}}else{// For non-iOS devices, continue with normal formatting but use\n// a more controlled approach to ensure consistency\nif(!showCurrency){return new Intl.NumberFormat(locale,{style:\"currency\",currency:\"USD\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits,currencyDisplay:\"narrowSymbol\"}).format(numericPrice);}else{const withSymbol=new Intl.NumberFormat(locale,{style:\"currency\",currency:\"USD\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits,currencyDisplay:\"narrowSymbol\"}).format(numericPrice);return`${withSymbol} USD`;}}}// For currencies where symbol is same as code (like CHF)\nif(symbolSameAsCode){// If showing currency code, always use code-first format and ignore symbol\nif(showCurrency&&!showSymbol){const number=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);const output=`${currCode} ${number}`;return output;}if(showSymbol&&!showCurrency){const number=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);const output=`${currCode} ${number}`;return output;}if(showCurrency&&showSymbol){const number=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);return`${currCode} ${number}`;}}// For currencies with distinct symbols (like USD with $)\n// If showing only the code (no symbol)\nif(!showSymbol&&showCurrency){const number=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);// For normal currencies, show code after the number\nreturn`${number} ${currCode}`;}// If showing only the symbol (no code)\nif(showSymbol&&!showCurrency){return new Intl.NumberFormat(locale,{style:\"currency\",currency:currCode,minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits,currencyDisplay:\"narrowSymbol\"}).format(numericPrice);}// If showing both symbol and code\nconst withSymbol=new Intl.NumberFormat(locale,{style:\"currency\",currency:currCode,minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits,currencyDisplay:\"narrowSymbol\"}).format(numericPrice);return`${withSymbol} ${currCode}`;};// Helper function to format discount text using textFormat\nconst formatDiscountText=discountValue=>{if(!textFormat)return discountValue;// Replace {{discount}} placeholder with the actual discount value\nreturn textFormat.replace(/\\{\\{discount\\}\\}/g,discountValue);};const text=useMemo(()=>{if(!isBrowser)return\"\";// Helper: compute min/max for price and compareAt from product variants\nconst computeRange=(p,path)=>{if(!p)return{min:null,max:null};const minStr=get(p,`${path}.minVariantPrice.amount`);const maxStr=get(p,`${path}.maxVariantPrice.amount`);let minVal=minStr?parseFloat(minStr):null;let maxVal=maxStr?parseFloat(maxStr):null;if(minVal===null||isNaN(minVal)||maxVal===null||isNaN(maxVal)){const edges=p?.variants?.edges||[];for(let i=0;i<edges.length;i++){const v=edges[i]?.node;if(!v)continue;const amtStr=get(v,path.includes(\"compareAt\")?\"compareAtPrice.amount\":\"price.amount\");const amt=amtStr?parseFloat(amtStr):NaN;if(!isNaN(amt)&&amt>0){if(minVal===null||amt<minVal)minVal=amt;if(maxVal===null||amt>maxVal)maxVal=amt;}}}return{min:typeof minVal===\"number\"&&!isNaN(minVal)?minVal:null,max:typeof maxVal===\"number\"&&!isNaN(maxVal)?maxVal:null};};// console.log('[Discount] Debug:', {\n//     activeVariant,\n//     partialSelections,\n//     variantSelectorAction,\n//     product,\n//     discountType\n// })\n// For canvas view, handle the display options directly\nif(typeof RenderTarget!==\"undefined\"&&(RenderTarget.current()===RenderTarget.canvas||showMockValues)){// Parse previewPrice as range format (e.g., \"200.00-250.00\")\nlet minPrice;let maxPrice;if(previewPrice){const priceRange=previewPrice.split(\"-\");if(priceRange.length===2){minPrice=priceRange[0].trim();maxPrice=priceRange[1].trim();}else{// If no range format, use the single price for both min and max\nminPrice=previewPrice;maxPrice=previewPrice;}}// Parse previewComparePrice as range format (e.g., \"200.00-300.00\")\nlet minComparePrice;let maxComparePrice;if(previewComparePrice){const comparePriceRange=previewComparePrice.split(\"-\");if(comparePriceRange.length===2){minComparePrice=comparePriceRange[0].trim();maxComparePrice=comparePriceRange[1].trim();}else{// If no range format, use the single price for both min and max\nminComparePrice=previewComparePrice;maxComparePrice=previewComparePrice;}}const numericMinPrice=parseFloat(minPrice);const numericMaxComparePrice=parseFloat(maxComparePrice);if(!numericMinPrice||!numericMaxComparePrice||numericMinPrice>=numericMaxComparePrice){return\"\";}// Calculate maximum discount: max compare price - min price\nconst maxDiscountAmount=numericMaxComparePrice-numericMinPrice;if(maxDiscountAmount<=0){return\"\";}if(discountType===\"Percentage\"){const discount=maxDiscountAmount/numericMaxComparePrice*100;const discountText=`${discountPrefix} ${Math.round(discount)}%`;return formatDiscountText(discountText);}else{const currentCurrencyCode=currencyCode||\"USD\";const formattedAmount=formatPriceWithOptions(maxDiscountAmount,currentCurrencyCode);const discountText=`${discountPrefix} ${formattedAmount}`;return formatDiscountText(discountText);}}// For live view, get the discount from active variant\nconst activeVariantPrice=activeVariant&&get(activeVariant,\"price.amount\");const activeVariantComparePrice=activeVariant&&get(activeVariant,\"compareAtPrice.amount\");// Only return early if we have no data at all\nif(!activeVariantPrice&&!activeVariantComparePrice&&!activeVariant&&!product?.variants?.edges?.length)return\"\";const currentCurrencyCode=selectedCurrency||currencyCode||\"USD\";// If we have an active variant with both prices, calculate discount\nif(activeVariantPrice&&activeVariantComparePrice){const price=parseFloat(activeVariantPrice);const comparePrice=parseFloat(activeVariantComparePrice);if(price>0&&comparePrice>0&&comparePrice>price){if(discountType===\"Percentage\"){const discount=(comparePrice-price)/comparePrice*100;const discountText=`${Math.round(discount)}%`;return formatDiscountText(discountText);}else{const amount=comparePrice-price;const discountText=formatPriceWithOptions(amount,currentCurrencyCode);return formatDiscountText(discountText);}}return\"\";}// Handle partial selections (when user selects only some variant options)\nconst hasPartialSelections=Object.keys(partialSelections).length>0;const hasCompleteVariant=activeVariant&&activeVariant.selectedOptions?.length>0;const hasVariantEdges=Array.isArray(product?.variants?.edges)&&product.variants.edges.length>0;if(hasPartialSelections&&!hasCompleteVariant&&hasVariantEdges){// console.log(\"Handle hasPartialSelections\")\n// Filter variants that match the partial selections\nconst matchingVariants=(product?.variants?.edges||[]).filter(({node:variant})=>{return variant.selectedOptions.every(option=>{// If this option is in our partial selections, it must match\nif(partialSelections[option.name]){return partialSelections[option.name]===option.value;}// If not in partial selections, any value is fine\nreturn true;});});// console.log(\"matchingVariants\", matchingVariants)\n// if (matchingVariants.length > 0) {\n//     // Get all prices and compare prices for matching variants\n//     const variantData = matchingVariants\n//         .map(({ node: variant }) => ({\n//             price: parseFloat(get(variant, 'price.amount') || \"0\"),\n//             compareAtPrice: parseFloat(get(variant, 'compareAtPrice.amount') || \"0\")\n//         }))\n//         .filter(data => data.price > 0 && data.compareAtPrice > 0 && data.compareAtPrice > data.price)\n//     //console.log(\"variantData\", variantData)\n//     const prices = matchingVariants\n//         .map(({ node: variant }) => parseFloat(variant.price?.amount || \"0\"))\n//         .filter(price => price > 0)\n//     if (variantData.length > 0 && prices.length > 0) {\n//         const minPrice = Math.min(...prices)\n//         const maxPrice = Math.max(...prices)\n//         const discounts = variantData.map(data => {\n//             if (discountType === \"Percentage\") {\n//                 return ((data.compareAtPrice - data.price) / data.compareAtPrice) * 100\n//             } else {\n//                 return data.compareAtPrice - data.price\n//             }\n//         })\n//         //console.log(\"discounts\", discounts)\n//         const maxDiscount = Math.max(...discounts)\n//         if (discountType === \"Percentage\") {\n//             if (Math.abs(minPrice - maxPrice) < 0.01) {\n//                 const discountText = `${Math.round(maxDiscount)}%`\n//                 return formatDiscountText(discountText)\n//             }\n//             const discountText = `${discountPrefix} ${Math.round(maxDiscount)}%`\n//             return formatDiscountText(discountText)\n//         } else {\n//             if (Math.abs(minPrice - maxPrice) < 0.01) {\n//                 const formattedAmount = formatPriceWithOptions(maxDiscount, currentCurrencyCode)\n//                 return formatDiscountText(`${formattedAmount}`)\n//             }\n//             const formattedAmount = formatPriceWithOptions(maxDiscount, currentCurrencyCode)\n//             const discountText = `${discountPrefix} ${formattedAmount}`\n//             return formatDiscountText(discountText)\n//         }\n//     }\n// }\nif(matchingVariants.length>0){const variantData=matchingVariants.map(({node:variant})=>{const price=parseFloat(get(variant,\"price.amount\")||\"0\");const compareAtPrice=parseFloat(get(variant,\"compareAtPrice.amount\")||\"0\");const isDiscounted=compareAtPrice>price&&compareAtPrice>0;return{price,compareAtPrice,discount:isDiscounted?discountType===\"Percentage\"?(compareAtPrice-price)/compareAtPrice*100:compareAtPrice-price:0,isDiscounted};}).filter(data=>data.price>0);const prices=variantData.map(v=>v.price);const discounts=variantData.map(v=>v.discount);const hasAnyDiscount=discounts.some(d=>d>0);if(!hasAnyDiscount)return\"\";const maxDiscount=Math.max(...discounts);const minDiscount=Math.min(...discounts);const currentCurrencyCode=selectedCurrency||currencyCode||\"USD\";// ✅ ✅ ✅ CHECK IF DISCOUNTS VARY (even if prices are the same)\nconst showUpToPrefix=minDiscount!==maxDiscount;if(discountType===\"Percentage\"){const rounded=Math.round(maxDiscount);const discountText=showUpToPrefix?`${discountPrefix} ${rounded}%`:`${rounded}%`;return formatDiscountText(discountText);}else{const formattedAmount=formatPriceWithOptions(maxDiscount,currentCurrencyCode);const discountText=showUpToPrefix?`${discountPrefix} ${formattedAmount}`:`${formattedAmount}`;return formatDiscountText(discountText);}}}// Handle product-level discount (no active variant, no partial selections) with fallbacks\n// Prefer product ranges; fall back to computed ranges when missing\nif(!activeVariant&&!hasPartialSelections&&hasVariantEdges){const currentCurrencyCode=selectedCurrency||currencyCode||\"USD\";const{min:priceMin,max:priceMax}=computeRange(product,\"priceRange\");const{min:compMin,max:compMax}=computeRange(product,\"compareAtPriceRange\");if(priceMin&&priceMax&&compMin&&compMax){// Use maximum possible discount across ranges\nconst maxDiscountAmount=Math.max(compMax-priceMin,compMin-priceMax);if(maxDiscountAmount>0){if(discountType===\"Percentage\"){const denom=Math.max(compMax,compMin);const pct=denom>0?Math.round(maxDiscountAmount/denom*100):0;const discountText=pct>0?priceMin===priceMax&&compMin===compMax?`${pct}%`:`${discountPrefix} ${pct}%`:\"\";return formatDiscountText(discountText);}else{const formatted=formatPriceWithOptions(maxDiscountAmount,currentCurrencyCode);const discountText=priceMin===priceMax&&compMin===compMax?`${formatted}`:`${discountPrefix} ${formatted}`;return formatDiscountText(discountText);}}}const variantData=(product?.variants?.edges||[]).map(({node:variant})=>{const price=parseFloat(get(variant,\"price.amount\")||\"0\");const compareAtPrice=parseFloat(get(variant,\"compareAtPrice.amount\")||\"0\");const isDiscounted=compareAtPrice>price&&compareAtPrice>0;return{price,compareAtPrice,discount:isDiscounted?discountType===\"Percentage\"?(compareAtPrice-price)/compareAtPrice*100:compareAtPrice-price:0,isDiscounted};}).filter(data=>data.price>0);if(!variantData.length)return\"\";const prices=variantData.map(v=>v.price);const discounts=variantData.map(v=>v.discount);const hasAnyDiscount=discounts.some(d=>d>0);if(!hasAnyDiscount)return\"\";const maxDiscount=Math.max(...discounts);const minDiscount=Math.min(...discounts);const showUpToPrefix=minDiscount!==maxDiscount;if(discountType===\"Percentage\"){const rounded=Math.round(maxDiscount);const discountText=showUpToPrefix?`${discountPrefix} ${rounded}%`:`${rounded}%`;return formatDiscountText(discountText);}else{const formatted=formatPriceWithOptions(maxDiscount,currentCurrencyCode);const discountText=showUpToPrefix?`${discountPrefix} ${formatted}`:`${formatted}`;return formatDiscountText(discountText);}}return\"\";},[isBrowser,showMockValues,activeVariant,product,partialSelections,variantSelectorAction,discountType,previewPrice,previewComparePrice,selectedCurrency,selectedCountryCode,currencyCode,showCurrency,showSymbol,showDecimals,discountPrefix,textFormat]);// Return empty div during SSR\nif(!isBrowser){return /*#__PURE__*/_jsx(\"div\",{style:{display:\"none\"}});}// Hide component if there's no discount text\nif(!text)return null;return /*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",width:\"100%\",height:\"100%\",backgroundColor:props.backgroundColor,padding:props.paddingPerSide?`${props.paddingTop}px ${props.paddingRight}px ${props.paddingBottom}px ${props.paddingLeft}px`:props.padding,borderRadius:props.radiusPerCorner?`${props.radiusTopLeft}px ${props.radiusTopRight}px ${props.radiusBottomRight}px ${props.radiusBottomLeft}px`:props.borderRadius,boxSizing:\"border-box\",alignItems:\"center\",justifyContent:\"center\"},children:/*#__PURE__*/_jsx(\"p\",{style:{...props.font,color:props.textColor,margin:0,padding:0,whiteSpace:\"nowrap\"},children:text})});}FC_ProductPriceDiscount.defaultProps={shopifyProductID:\"\",backgroundColor:\"transparent\",padding:8,borderRadius:0,font:undefined,textColor:\"#000\",discountPrefix:\"Up to\",textFormat:\"{{discount}} OFF\",discountType:\"Percentage\",previewPrice:\"50\",previewComparePrice:\"75\",format:{showCurrency:true,showSymbol:true,currencyCode:\"USD\",showDecimals:\"Always show\"}};addPropertyControls(FC_ProductPriceDiscount,{shopifyProductID:{type:ControlType.String,title:\"Product ID\",description:\"Connect to CMS (required).\"},previewPrice:{type:ControlType.String,title:\"Price\",defaultValue:\"50\",description:\"Connect to CMS (canvas preview only).\"},previewComparePrice:{type:ControlType.String,title:\"Compare Price\",defaultValue:\"75\",description:\"Connect to CMS (canvas preview only).\"},discountType:{type:ControlType.Enum,title:\"Type\",options:[\"Percentage\",\"Amount\"],optionTitles:[\"%\",\"Amount\"],defaultValue:\"Percentage\",displaySegmentedControl:true},format:{type:ControlType.Object,title:\"Format\",controls:{showSymbol:{type:ControlType.Boolean,title:\"Symbol\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\",description:\"$, \\xa3, €, etc.\"},showCurrency:{type:ControlType.Boolean,title:\"Code\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\",description:\"USD, EUR, CHF, etc.\"},showDecimals:{type:ControlType.Enum,title:\"Decimals\",defaultValue:\"Always show\",options:[\"Always show\",\"Never show\",\"Hide when .00\"],optionTitles:[\"Always show\",\"Never show\",\"Hide when .00\"],displaySegmentedControl:true,segmentedControlDirection:\"vertical\"},currencyCode:{type:ControlType.Enum,title:\"Preview\",defaultValue:\"USD\",options:[\"USD\",\"EUR\",\"GBP\",\"CHF\",\"JPY\",\"CAD\",\"AUD\",\"CNY\",\"HKD\",\"NZD\",\"SEK\",\"KRW\",\"SGD\",\"NOK\",\"MXN\",\"INR\",\"RUB\",\"ZAR\",\"TRY\",\"BRL\",\"TWD\",\"DKK\",\"PLN\",\"THB\",\"IDR\",\"HUF\",\"CZK\",\"ILS\",\"CLP\",\"PHP\",\"AED\",\"COP\",\"SAR\",\"MYR\",\"RON\"],description:\"Currency on your site is automatic, this is only shown in canvas preview.\"}},hidden:props=>props.discountType!==\"Amount\"},textFormat:{type:ControlType.String,title:\"Text Format\",defaultValue:\"{{discount}} OFF\",description:\"Use {{discount}} to display the discount value\"},discountPrefix:{type:ControlType.String,title:\"Varying Prefix\",description:\"When a product has multiple discount values and a variant has not been selected.\",defaultValue:\"Up to\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\"},textColor:{type:ControlType.Color,title:\"Color\",defaultValue:\"#000\"},backgroundColor:{type:ControlType.Color,title:\"BG\"},padding:{type:ControlType.FusedNumber,title:\"Padding\",defaultValue:8,toggleKey:\"paddingPerSide\",toggleTitles:[\"All\",\"Sides\"],valueKeys:[\"paddingTop\",\"paddingRight\",\"paddingBottom\",\"paddingLeft\"],valueLabels:[\"T\",\"R\",\"B\",\"L\"],min:0},borderRadius:{type:ControlType.FusedNumber,title:\"Radius\",defaultValue:0,toggleKey:\"radiusPerCorner\",toggleTitles:[\"All\",\"Corners\"],valueKeys:[\"radiusTopLeft\",\"radiusTopRight\",\"radiusBottomRight\",\"radiusBottomLeft\"],valueLabels:[\"TL\",\"TR\",\"BR\",\"BL\"],min:0,max:100,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FC_ProductPriceDiscount\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FC_ProductPriceDiscount.map","/*\n * Framer Commerce\n * Confidential and Proprietary - All Rights Reserved\n * Unauthorized use, reproduction, distribution, or disclosure of this\n * source code or any related information is strictly prohibited.\n *\n * This software is the exclusive property of Framer Commerce (\"Company\").\n * It is considered highly confidential and proprietary information.\n *\n * Any use, copying, modification, distribution, or sharing of this software,\n * in whole or in part, without the express written permission of the Company\n * is strictly prohibited and may result in legal action.\n *\n * DISCLAIMER: This software does not provide any express or\n * implied warranties, including, but not limited to, the implied warranties\n * of merchantability and fitness for a particular purpose. In no event shall\n * Framer Commerce be liable for any direct, indirect, incidental, special,\n * exemplary, or consequential damages (including, but not limited to, procurement\n * of substitute goods or services; loss of use, data, or profits; or business\n * interruption) however caused and on any theory of liability, whether in\n * contract, strict liability, or tort (including negligence or otherwise)\n * arising in any way out of the use of this software, even if advised of\n * the possibility of such damage.\n *\n * Any unauthorized possession, use, copying, distribution, or dissemination\n * of this software will be considered a breach of confidentiality and may\n * result in legal action.\n *\n * For inquiries, contact:\n * Framer Commerce\n * Email: hello@framercommerce.com\n *\n * © 2025 Butter Supply Inc. All Rights Reserved.\n */import{jsx as _jsx}from\"react/jsx-runtime\";import{useCallback,useEffect,useMemo,useState}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{get}from\"lodash-es\";import{useIsBrowser}from\"https://framerusercontent.com/modules/ncBs5KPMI9I5GEta13fn/zGXDjuZapa1SGy6D8P5e/IsBrowser.js\";import{knownCurrenciesWithCodeAsSymbol}from\"https://framerusercontent.com/modules/k9s4cejdkBGDjmzudhzM/18cq93eooqM4YmdbL7E2/currencyMaps.js\";import{getLocaleFromCountry}from\"https://framerusercontent.com/modules/vC6fzbfO83MgBPIhn5zl/DUlbmWuOELzEUenVmv3G/locales.js\";// Helper function to check if a currency's symbol is the same as its code\nconst isCurrencySymbolSameAsCode=currencyCode=>{// For some currencies like CHF, the browser might use the code as the symbol\nif(!currencyCode)return false;if(knownCurrenciesWithCodeAsSymbol.includes(currencyCode)){return true;}try{const formatted=new Intl.NumberFormat(undefined,{style:\"currency\",currency:currencyCode,currencyDisplay:\"narrowSymbol\"}).format(0);// Remove digits, decimal points, and common formatting characters\nconst cleanFormatted=formatted.replace(/[0-9.,\\s]/g,\"\");// Check if what remains is the currency code\nreturn cleanFormatted===currencyCode;}catch(e){return false;}};/**\n * @framerDisableUnlink\n */export default function FC_ProductPrice(props){const{shopifyProductID,canvasPrice,format:{showCurrency,showSymbol,showDecimals,currencyCode}={},fromText=\"from\"}=props;const isBrowser=useIsBrowser();const[product,setProduct]=useState();const[activeVariant,setActiveVariant]=useState();const[subscriptionPrice,setSubscriptionPrice]=useState(null);const[selectedCurrency,setSelectedCurrency]=useState(\"\");const[selectedCountryCode,setSelectedCountryCode]=useState(\"\");const[selectedCountry,setSelectedCountry]=useState(\"\");const[isLoadingPrice,setIsLoadingPrice]=useState(false);const[partialSelections,setPartialSelections]=useState({});const[variantSelectorAction,setVariantSelectorAction]=useState(\"\");// PERFORMANCE OPTIMIZATION: Progressive loading state\n// - Show prices immediately for fast perceived performance\n// - Compute ranges in background using requestIdleCallback\n// - Cache computed ranges to avoid recalculation\nconst[isRangeComputed,setIsRangeComputed]=useState(false);const[computedPriceRange,setComputedPriceRange]=useState({min:null,max:null});// Compute product price range from variants when product.priceRange is missing/partial\nconst getProductPriceRange=useCallback((p,useCompareAt=false)=>{if(!p)return{min:null,max:null};// Prefer product-level range when available\nconst rangePath=useCompareAt?\"compareAtPriceRange\":\"priceRange\";const minFromProduct=get(p,`${rangePath}.minVariantPrice.amount`);const maxFromProduct=get(p,`${rangePath}.maxVariantPrice.amount`);let minVal=minFromProduct?parseFloat(minFromProduct):null;let maxVal=maxFromProduct?parseFloat(maxFromProduct):null;if(minVal===null||isNaN(minVal)||maxVal===null||isNaN(maxVal)){// OPTIMIZED: Use reduce for better performance on large variant lists\nconst edges=p?.variants?.edges||[];if(edges.length>0){const{min,max}=edges.reduce((acc,{node:v})=>{if(!v)return acc;const fieldPath=useCompareAt?\"compareAtPrice.amount\":\"price.amount\";const amtStr=get(v,fieldPath);const amt=amtStr?parseFloat(amtStr):NaN;if(!isNaN(amt)&&amt>0){if(acc.min===null||amt<acc.min)acc.min=amt;if(acc.max===null||amt>acc.max)acc.max=amt;}return acc;},{min:null,max:null});minVal=min;maxVal=max;}}return{min:typeof minVal===\"number\"&&!isNaN(minVal)?minVal:null,max:typeof maxVal===\"number\"&&!isNaN(maxVal)?maxVal:null};},[selectedCurrency]);// Progressive range computation - compute in background after initial render\nuseEffect(()=>{if(!product||isRangeComputed)return;// Use requestIdleCallback for non-blocking computation\nconst computeRange=()=>{const range=getProductPriceRange(product,false);setComputedPriceRange(range);setIsRangeComputed(true);};// Delay computation to prioritize initial render\nif(\"requestIdleCallback\"in window){requestIdleCallback(computeRange,{timeout:200});}else{// Fallback for browsers without requestIdleCallback\nsetTimeout(computeRange,100);}},[product,isRangeComputed,getProductPriceRange]);// Reset range computation when product changes\nuseEffect(()=>{if(product){setIsRangeComputed(false);setComputedPriceRange({min:null,max:null});}},[product]);// Initialize currency and country code on page load\nuseEffect(()=>{if(!isBrowser)return;const storedCurrency=localStorage.getItem(\"selectedCurrency\");const storedCountryCode=localStorage.getItem(\"selectedCountryCode\");const storedCountry=localStorage.getItem(\"selectedCountry\");setSelectedCurrency(storedCurrency||\"USD\");setSelectedCountryCode(storedCountryCode||\"US\");setSelectedCountry(storedCountry||\"United States\");},[isBrowser]);// Handle variant changes\nconst handleVariantChange=useCallback(async e=>{// Check for purchase action flag - if this is a purchase action, don't update variant state\nif(e.detail?.isPurchaseAction){//console.log(\"Purchase action detected, returning\", e.detail?.isPurchaseAction)\nreturn;}if(!e.detail||e.detail.productId!==`gid://shopify/Product/${shopifyProductID}`){return;}// console.log(\"variantSelectorAction\", e.detail.onClickAction)\nsetVariantSelectorAction(e.detail.onClickAction);//console.log(\"handleVariantChange\", e.detail)\nsetIsLoadingPrice(true);try{// Get products from shopXtools storage\nconst products=window.shopXtools?.products||[];const _matchingProduct=products.find(({node:_product})=>_product.id===`gid://shopify/Product/${shopifyProductID}`);if(_matchingProduct){setProduct(_matchingProduct.node);// Find the matching variant in the current product data\nconst matchingVariant=_matchingProduct.node?.variants?.edges?.find(({node})=>node.selectedOptions.every(option=>e.detail.selectedOptions.find(detailOption=>detailOption.name===option.name&&detailOption.value===option.value)));if(matchingVariant){if(e.detail.onClickAction===\"purchase\"){setActiveVariant(null);setPartialSelections({[e.detail.selectedOptions[0].name]:e.detail.selectedOptions[0].value});}else if(e.detail?.isCompleteVariant===false){// Partial selection: keep partial range behavior\nsetActiveVariant(null);if(Array.isArray(e.detail.selectedOptions)){const partial={};e.detail.selectedOptions.forEach(opt=>{if(opt?.name)partial[opt.name]=opt.value;});setPartialSelections(partial);}}else{setActiveVariant(matchingVariant.node);setPartialSelections({});}}}}catch(error){// Fallback\nif(e.detail?.isCompleteVariant){setActiveVariant(e.detail);if(e.detail.onClickAction!==\"purchase\"){setPartialSelections({});}}else{setActiveVariant(null);if(Array.isArray(e.detail?.selectedOptions)){const partial={};e.detail.selectedOptions.forEach(opt=>{if(opt?.name)partial[opt.name]=opt.value;});setPartialSelections(partial);}}}finally{setIsLoadingPrice(false);}},[shopifyProductID]);// Handle currency changes\nconst handleCurrencyChange=useCallback(event=>{setIsLoadingPrice(true);const{currency,countryCode,country}=event.detail;setSelectedCurrency(currency);setSelectedCountryCode(countryCode);setSelectedCountry(country);try{// Get products from shopXtools storage\nconst products=window.shopXtools?.products||[];const _matchingProduct=products.find(({node:_product})=>_product.id===`gid://shopify/Product/${shopifyProductID}`);if(_matchingProduct){setProduct(_matchingProduct.node);// Preserve active variant selection if possible\nif(activeVariant){const matchingVariant=_matchingProduct.node.variants?.edges.find(({node})=>node.selectedOptions.every(option=>activeVariant.selectedOptions.find(activeOption=>activeOption.name===option.name&&activeOption.value===option.value)));if(matchingVariant){setActiveVariant(matchingVariant.node);}}}}catch(error){// Error handling\n}finally{setIsLoadingPrice(false);}},[shopifyProductID,activeVariant]);// Listen for currency changes\nuseEffect(()=>{if(!isBrowser)return;window.addEventListener(\"currency_changed\",handleCurrencyChange);return()=>{window.removeEventListener(\"currency_changed\",handleCurrencyChange);};},[isBrowser,handleCurrencyChange]);// Initial product load\nuseEffect(()=>{if(!isBrowser)return;const handleProductsReady=async e=>{if(Array.isArray(e.detail.products)){setIsLoadingPrice(true);const _matchingProduct=e.detail.products.find(({node:_product})=>_product.id===`gid://shopify/Product/${shopifyProductID}`);if(_matchingProduct){setProduct(_matchingProduct.node);if(_matchingProduct.node?.variants?.edges?.length===1){setActiveVariant(_matchingProduct.node.variants.edges[0].node);}}setIsLoadingPrice(false);}};const loadProduct=async()=>{try{setIsLoadingPrice(true);// Get products from shopXtools storage\nconst products=window.shopXtools?.products||[];const _matchingProduct=products.find(({node:_product})=>_product.id===`gid://shopify/Product/${shopifyProductID}`);if(_matchingProduct){setProduct(_matchingProduct.node);if(_matchingProduct.node?.variants?.edges?.length===1){setActiveVariant(_matchingProduct.node.variants.edges[0].node);}}}catch(error){// Error handling\n}finally{setIsLoadingPrice(false);}};loadProduct();// Add event listeners\ndocument.addEventListener(\"product__active-variant__changed\",handleVariantChange);document.addEventListener(\"data__products-ready\",handleProductsReady);// Cleanup\nreturn()=>{document.removeEventListener(\"product__active-variant__changed\",handleVariantChange);document.removeEventListener(\"data__products-ready\",handleProductsReady);};},[isBrowser,shopifyProductID,selectedCurrency,selectedCountryCode]);// Add subscription price listener\nuseEffect(()=>{if(!isBrowser)return;const handleSubscriptionPriceUpdate=e=>{if(e.detail?.productId===shopifyProductID&&e.detail?.price){//console.log(\"selling plan event\", e.detail)\nsetSubscriptionPrice(e.detail.price);}else{setSubscriptionPrice(null);}};const handleVariantOptionSelected=e=>{//console.log(\"variant_option_selected\", e.detail)\nif(e.detail?.isPurchaseAction){// console.log(\n//     \"Purchase action is true, returning\",\n//     e.detail?.isPurchaseAction\n// )\nreturn;}// Check if this event is for our product\nconst eventProductId=e.detail?.productId;const expectedProductId=`gid://shopify/Product/${shopifyProductID}`;if(eventProductId&&eventProductId!==expectedProductId){//console.log(\"Event not for this product\", eventProductId, expectedProductId)\nreturn;}setIsLoadingPrice(true);if(e.detail?.optionName&&e.detail?.value){setPartialSelections({[e.detail.optionName]:e.detail.value});//console.log(\"setting partialSelections from individual option\", e.detail.optionName, e.detail.value)\n}setIsLoadingPrice(false);};document.addEventListener(\"subscription__price-update\",handleSubscriptionPriceUpdate);document.addEventListener(\"variant_option_selected\",handleVariantOptionSelected);document.addEventListener(\"__variant_option_selected\",handleVariantOptionSelected);return()=>{document.removeEventListener(\"subscription__price-update\",handleSubscriptionPriceUpdate);document.removeEventListener(\"variant_option_selected\",handleVariantOptionSelected);document.removeEventListener(\"__variant_option_selected\",handleVariantOptionSelected);};},[isBrowser,shopifyProductID]);// Get currency formatting options at component level\nconst _currencyCode=useMemo(()=>{const variantCurrency=get(activeVariant,\"price.currencyCode\");const productCurrency=get(product,\"priceRange.minVariantPrice.currencyCode\");return variantCurrency||productCurrency||\"USD\";},[activeVariant,product]);const showMockValues=useMemo(()=>RenderTarget.current()===RenderTarget.canvas||isBrowser&&window.location.origin.endsWith(\"framercanvas.com\"),[isBrowser]);// Common function to format price based on options\nconst formatPriceWithOptions=(numericPrice,currCode)=>{const symbolSameAsCode=isCurrencySymbolSameAsCode(currCode);// Get locale from selected country code\nconst locale=getLocaleFromCountry(selectedCountryCode);// Log browser user agent for debugging iOS-specific issues\n// if (isBrowser) {\n//     console.log(\"[FC_ProductPrice] Format debug:\", {\n//         userAgent: navigator.userAgent,\n//         isCurrencySymbolSameAsCode: symbolSameAsCode,\n//         currencyCode: currCode,\n//         selectedCountryCode,\n//         locale,\n//         showSymbol,\n//         showCurrency,\n//         showDecimals,\n//     })\n// }\n// Determine if we should show decimals based on the setting\nconst shouldShowDecimals=()=>{if(showDecimals===\"Always show\")return true;if(showDecimals===\"Never show\")return false;if(showDecimals===\"Hide when .00\"){// Check if the decimal part is zero\nreturn numericPrice%1!==0;}return true// Default fallback\n;};const decimalDigits=shouldShowDecimals()?2:0;// If showing neither symbol nor code, just format the number\nif(!showSymbol&&!showCurrency){const formattedNumber=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);return formattedNumber;}// Special case for USD to prevent \"US$\" display in Safari iOS\nif(currCode===\"USD\"&&showSymbol){// Check if running on iOS device\nconst isIOS=isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream;// Format USD manually to avoid the iOS \"US$\" prefix\nif(isIOS){const number=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);let result;if(!showCurrency){result=`$${number}`// Just \"$50\" format\n;}else{result=`$${number} USD`// \"$50 USD\" format\n;}return result;}else{// For non-iOS devices, continue with normal formatting but use\n// a more controlled approach to ensure consistency\nlet result;if(!showCurrency){result=new Intl.NumberFormat(locale,{style:\"currency\",currency:\"USD\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits,currencyDisplay:\"narrowSymbol\"}).format(numericPrice);}else{const withSymbol=new Intl.NumberFormat(locale,{style:\"currency\",currency:\"USD\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits,currencyDisplay:\"narrowSymbol\"}).format(numericPrice);result=`${withSymbol} USD`;}return result;}}// For currencies where symbol is same as code (like CHF)\nif(symbolSameAsCode){// If showing currency code, always use code-first format and ignore symbol\nif(showCurrency&&!showSymbol){const number=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);const output=`${currCode} ${number}`;return output;}if(showSymbol&&!showCurrency){const number=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);const output=`${currCode} ${number}`;return output;}if(showCurrency&&showSymbol){const number=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);const result=`${currCode} ${number}`;return result;}}// For currencies with distinct symbols (like USD with $)\n// If showing only the code (no symbol)\nif(!showSymbol&&showCurrency){const number=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);// For normal currencies, show code after the number\nconst result=`${number} ${currCode}`;return result;}// If showing only the symbol (no code)\nif(showSymbol&&!showCurrency){const result=new Intl.NumberFormat(locale,{style:\"currency\",currency:currCode,minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits,currencyDisplay:\"narrowSymbol\"}).format(numericPrice);return result;}// If showing both symbol and code\nconst withSymbol=new Intl.NumberFormat(locale,{style:\"currency\",currency:currCode,minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits,currencyDisplay:\"narrowSymbol\"}).format(numericPrice);const result=`${withSymbol} ${currCode}`;return result;};const text=useMemo(()=>{if(!isBrowser)return\"\";// For canvas view, handle the display options directly\nif(typeof RenderTarget!==\"undefined\"&&(RenderTarget.current()===RenderTarget.canvas||showMockValues)){// Parse canvasPrice as range format (e.g., \"200.00-250.00\")\nlet minPrice;let maxPrice;if(canvasPrice){const priceRange=canvasPrice.split(\"-\");if(priceRange.length===2){minPrice=priceRange[0].trim();maxPrice=priceRange[1].trim();}else{// If no range format, use the single price for both min and max\nminPrice=canvasPrice;maxPrice=canvasPrice;}}const numericPrice=parseFloat(minPrice);const numericMaxPrice=parseFloat(maxPrice);const currentCurrencyCode=currencyCode||\"USD\";const formattedPrice=formatPriceWithOptions(numericPrice,currentCurrencyCode);// Handle displayPrice logic for canvas preview\nif(props.displayPrice===\"minimum price\"){// If min and max are the same, just show one price (no \"from\" prefix)\nif(Math.abs(numericPrice-numericMaxPrice)<.01){return formattedPrice;}return`${fromText} ${formattedPrice}`;}if(props.displayPrice===\"range\"){const formattedMaxPrice=formatPriceWithOptions(numericMaxPrice,currentCurrencyCode);// If min and max are the same, just show one price\nif(Math.abs(numericPrice-numericMaxPrice)<.01){return formattedPrice;}return`${formattedPrice} - ${formattedMaxPrice}`;}return formattedPrice;}// For live view, use the selected currency or preview currency\nconst amount=subscriptionPrice||activeVariant&&get(activeVariant,\"price.amount\");if(!amount&&!activeVariant&&!product?.priceRange){return\"\";}const currentCurrencyCode=selectedCurrency||currencyCode||\"USD\";// Use cached range if available, otherwise compute on-demand\nconst range=computedPriceRange.min!==null?computedPriceRange:getProductPriceRange(product,false);const{min:computedMin,max:computedMax}=range;// FAST PATH: If we have an amount (subscription or active variant), format it immediately\nif(amount){const numericPrice=parseFloat(amount);if(isNaN(numericPrice))return\"\";const formattedPrice=formatPriceWithOptions(numericPrice,currentCurrencyCode);return formattedPrice;}// FAST PATH: Single variant products - show price immediately\nif(product?.variants?.edges?.length===1&&!activeVariant){const variant=product.variants.edges[0].node;if(variant?.price?.amount){const numericPrice=parseFloat(variant.price.amount);if(!isNaN(numericPrice)){return formatPriceWithOptions(numericPrice,currentCurrencyCode);}}}// Handle partial selections (when user selects only some variant options)\nconst hasPartialSelections=Object.keys(partialSelections).length>0;const hasCompleteVariant=activeVariant&&activeVariant.selectedOptions?.length>0;//console.log(\"hasPartialSelections\", hasPartialSelections)\n//console.log(\"hasCompleteVariant\", hasCompleteVariant)\n//console.log(\"product\", product)\n//console.log(\"partialSelections\", partialSelections)\nif(hasPartialSelections&&!hasCompleteVariant&&product?.variants?.edges?.length&&variantSelectorAction!==\"purchase\"){// Filter variants that match the partial selections\nconst matchingVariants=product.variants.edges.filter(({node:variant})=>{return variant.selectedOptions.every(option=>{// If this option is in our partial selections, it must match\nif(partialSelections[option.name]){return partialSelections[option.name]===option.value;}// If not in partial selections, any value is fine\nreturn true;});});// console.log(\"matchingVariants\", matchingVariants)\nif(matchingVariants.length>0){//console.log(\"matchingVariants\", matchingVariants)\n// Calculate min and max prices for matching variants\nconst prices=matchingVariants.map(({node:variant})=>parseFloat(variant.price?.amount||\"0\")).filter(price=>price>0);if(prices.length>0){const minPrice=Math.min(...prices);const maxPrice=Math.max(...prices);const formattedMinPrice=formatPriceWithOptions(minPrice,currentCurrencyCode);if(props.displayPrice===\"range\"){// If min and max are the same, just show one price\nif(Math.abs(minPrice-maxPrice)<.01){return formattedMinPrice;}const formattedMaxPrice=formatPriceWithOptions(maxPrice,currentCurrencyCode);return`${formattedMinPrice} - ${formattedMaxPrice}`;}if(props.displayPrice===\"minimum price\"){// If min and max are the same, just show one price (no \"from\" prefix)\nif(Math.abs(minPrice-maxPrice)<.01){return formattedMinPrice;}return`${fromText} ${formattedMinPrice}`;}}}}// Handle price range display logic for complete product (no active variant)\nif(!activeVariant&&product?.priceRange||variantSelectorAction===\"purchase\"&&product?.priceRange){// PROGRESSIVE ENHANCEMENT: Show min price immediately, enhance with range when computed\nif(computedMin){const formattedMinPrice=formatPriceWithOptions(computedMin,currentCurrencyCode);// If we have both min and max, show range\nif(computedMax&&Math.abs(computedMin-computedMax)>.01){if(props.displayPrice===\"range\"){const formattedMaxPrice=formatPriceWithOptions(computedMax,currentCurrencyCode);return`${formattedMinPrice} - ${formattedMaxPrice}`;}if(props.displayPrice===\"minimum price\"){// If min and max are the same, just show one price (no \"from\" prefix)\nif(Math.abs(computedMin-computedMax)<.01){return formattedMinPrice;}return`${fromText} ${formattedMinPrice}`;}}// Single price or fallback\nif(props.displayPrice===\"range\"){return formattedMinPrice;}// If min and max are the same, just show one price (no \"from\" prefix)\nif(computedMax&&Math.abs(computedMin-computedMax)<.01){return formattedMinPrice;}return`${fromText} ${formattedMinPrice}`;}// FALLBACK: Use product-level range if available\nconst productMinPrice=get(product,\"priceRange.minVariantPrice.amount\");const productMaxPrice=get(product,\"priceRange.maxVariantPrice.amount\");if(productMinPrice){const numericMinPrice=parseFloat(productMinPrice);if(!isNaN(numericMinPrice)&&numericMinPrice>0){const formattedMinPrice=formatPriceWithOptions(numericMinPrice,currentCurrencyCode);if(props.displayPrice===\"range\"){if(productMaxPrice){const numericMaxPrice=parseFloat(productMaxPrice);if(!isNaN(numericMaxPrice)&&numericMaxPrice>0&&Math.abs(numericMinPrice-numericMaxPrice)>.01){const formattedMaxPrice=formatPriceWithOptions(numericMaxPrice,currentCurrencyCode);return`${formattedMinPrice} - ${formattedMaxPrice}`;}}return formattedMinPrice;}// If min and max are the same, just show one price (no \"from\" prefix)\nif(productMaxPrice){const numericMaxPrice=parseFloat(productMaxPrice);if(!isNaN(numericMaxPrice)&&Math.abs(numericMinPrice-numericMaxPrice)<.01){return formattedMinPrice;}}return`${fromText} ${formattedMinPrice}`;}}}// Absolute last fallback: try active variant again or show nothing\nreturn\"\";},[isBrowser,showMockValues,activeVariant,product,canvasPrice,showCurrency,showSymbol,currencyCode,showDecimals,selectedCurrency,selectedCountryCode,subscriptionPrice,props.displayPrice,partialSelections,variantSelectorAction,fromText,getProductPriceRange]);const compareAtPrice=useMemo(()=>{// For partial selections (variant groups), check if any matching variants have compareAtPrice\nif(Object.keys(partialSelections).length>0&&product?.variants?.edges?.length){const matchingVariants=product.variants.edges.filter(({node:variant})=>{return variant.selectedOptions.every(option=>{if(partialSelections[option.name]){return partialSelections[option.name]===option.value;}return true;});});// Check if ALL matching variants have a valid compareAtPrice\nconst allMatchingVariantsHaveComparePrice=matchingVariants.every(({node:variant})=>{const compareAmount=get(variant,\"compareAtPrice.amount\");return compareAmount&&parseFloat(compareAmount)>0;});// If not all matching variants have compareAtPrice, return empty string\nif(!allMatchingVariantsHaveComparePrice){return\"\";}// If all matching variants have compareAtPrice, use the minimum for consistency\nconst comparePrices=matchingVariants.map(({node:variant})=>parseFloat(get(variant,\"compareAtPrice.amount\")||\"0\")).filter(price=>price>0);if(comparePrices.length>0){const minComparePrice=Math.min(...comparePrices);const currentCurrencyCode=selectedCurrency||currencyCode||\"USD\";return formatPriceWithOptions(minComparePrice,currentCurrencyCode);}}// For active variant, use its compareAtPrice\nif(activeVariant){const amount=get(activeVariant,\"compareAtPrice.amount\");if(!amount)return\"\";const numericPrice=parseFloat(amount);if(isNaN(numericPrice)||numericPrice<=0)return\"\";const currentCurrencyCode=selectedCurrency||currencyCode||\"USD\";return formatPriceWithOptions(numericPrice,currentCurrencyCode);}// For product level (no variant selected), check if ALL variants have compareAtPrice\nif(product?.variants?.edges?.length){const allVariantsHaveComparePrice=product.variants.edges.every(({node:variant})=>{const compareAmount=get(variant,\"compareAtPrice.amount\");return compareAmount&&parseFloat(compareAmount)>0;});// If not all variants have compareAtPrice, don't show sale styling\nif(!allVariantsHaveComparePrice){return\"\";}// If all variants have compareAtPrice, use the product-level compareAtPriceRange\nconst amount=get(product,\"compareAtPriceRange.minVariantPrice.amount\");if(!amount)return\"\";const numericPrice=parseFloat(amount);if(isNaN(numericPrice)||numericPrice<=0)return\"\";const currentCurrencyCode=selectedCurrency||currencyCode||\"USD\";return formatPriceWithOptions(numericPrice,currentCurrencyCode);}return\"\";},[activeVariant,product,partialSelections,currencyCode,showCurrency,showSymbol,showDecimals,selectedCurrency,selectedCountryCode,showMockValues,props.format]);const numericValue=useMemo(()=>parseFloat(compareAtPrice.replace(/[^\\d.-]/g,\"\")),[compareAtPrice]);const hasValidCompareAtPrice=!isNaN(numericValue)&&numericValue>0;const shouldDisplay=useMemo(()=>{if(showMockValues)return true;if(!text)return false;const value=parseFloat(text.replace(/[^\\d.-]/g,\"\"));return!isNaN(value)&&value>0;},[text,showMockValues]);const computedStyles=useMemo(()=>{const baseStyles={margin:0,padding:0,lineHeight:1,whiteSpace:\"nowrap\",display:\"inline-block\",width:\"auto\"};const priceStyles=hasValidCompareAtPrice?props.saleFont:props.regularFont;const priceColor=hasValidCompareAtPrice?props.saleColor:props.regularColor;return{...baseStyles,...priceStyles,color:priceColor};},[hasValidCompareAtPrice,props.saleFont,props.regularFont,props.saleColor,props.regularColor]);// console.log(\"Text\", text)\n// // Price calculation logging\n// useEffect(() => {\n//     console.log(\"[FC_ProductPrice] Price State Update:\", {\n//         activeVariant,\n//         product,\n//         selectedCurrency,\n//         subscriptionPrice,\n//     })\n// }, [activeVariant, product, selectedCurrency, subscriptionPrice])\n// useEffect(() => {\n//     console.log(\"Active variant updated:\", activeVariant);\n// }, [activeVariant]);\n// Return placeholder during SSR\nif(!isBrowser||isLoadingPrice){return /*#__PURE__*/_jsx(\"div\",{style:{display:\"none\"}});}// Progressive enhancement: Show loading state only when we have no data at all\nconst shouldShowLoading=!product&&!activeVariant&&!subscriptionPrice&&!showMockValues;if(shouldShowLoading){return /*#__PURE__*/_jsx(\"div\",{style:{display:\"none\"}});}// Show progressive loading indicator when computing ranges\nconst isComputingRange=product&&!isRangeComputed&&product.variants?.edges?.length>1;return /*#__PURE__*/_jsx(\"div\",{style:{display:\"inline-block\",maxWidth:\"100%\",width:\"auto\",whiteSpace:\"nowrap\",overflow:\"visible\",transform:\"none\",transition:\"none\",animation:\"none\",willChange:\"auto\"},children:/*#__PURE__*/_jsx(\"p\",{style:{...computedStyles,transform:\"none\",transition:\"none\",animation:\"none\",willChange:\"auto\"},children:text})});}FC_ProductPrice.defaultProps={shopifyProductID:\"\",canvasPrice:\"50.00\",fromText:\"from\",format:{showCurrency:true,showSymbol:true,currencyCode:\"USD\",showDecimals:\"Always show\"}};addPropertyControls(FC_ProductPrice,{shopifyProductID:{type:ControlType.String,title:\"Product ID\",description:\"Connect to CMS (required).\"},canvasPrice:{type:ControlType.String,title:\"Price\",defaultValue:\"50.00\",description:\"Connect to CMS (for canvas preview only).\"},displayPrice:{type:ControlType.Enum,title:\"Varying Prices\",options:[\"minimum price\",\"range\"],optionTitles:[\"Minimum Price\",\"Range\"],defaultValue:\"minimum price\",displaySegmentedControl:true,segmentedControlDirection:\"vertical\",description:\"When a product has multiple prices and a variant has not been selected.\"},fromText:{type:ControlType.String,title:\"Prefix\",placeholder:\"from\",defaultValue:\"from\",hidden:props=>props.displayPrice!==\"minimum price\"},format:{type:ControlType.Object,title:\"Format\",controls:{showSymbol:{type:ControlType.Boolean,title:\"Symbol\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\",description:\"$, \\xa3, €, etc.\"},showCurrency:{type:ControlType.Boolean,title:\"Code\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\",description:\"USD, EUR, CHF, etc.\"},showDecimals:{type:ControlType.Enum,title:\"Decimals\",defaultValue:\"Always show\",options:[\"Always show\",\"Never show\",\"Hide when .00\"],optionTitles:[\"Always show\",\"Never show\",\"Hide when .00\"],displaySegmentedControl:true,segmentedControlDirection:\"vertical\"},currencyCode:{type:ControlType.Enum,title:\"Preview\",defaultValue:\"USD\",options:[\"USD\",\"EUR\",\"GBP\",\"CHF\",\"JPY\",\"CAD\",\"AUD\",\"CNY\",\"HKD\",\"NZD\",\"SEK\",\"KRW\",\"SGD\",\"NOK\",\"MXN\",\"INR\",\"RUB\",\"ZAR\",\"TRY\",\"BRL\",\"TWD\",\"DKK\",\"PLN\",\"THB\",\"IDR\",\"HUF\",\"CZK\",\"ILS\",\"CLP\",\"PHP\",\"AED\",\"COP\",\"SAR\",\"MYR\",\"RON\"],description:\"Currency is for canvas preview only.\"}}},/** Font and Color Controls */regularFont:{type:ControlType.Font,title:\"Regular\",controls:\"extended\"},regularColor:{type:ControlType.Color,title:\"↳ Color\",defaultValue:\"#000\"},saleFont:{type:ControlType.Font,title:\"Sale\",controls:\"extended\"},saleColor:{type:ControlType.Color,title:\"↳ Color\",defaultValue:\"#FF0000\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FC_ProductPrice\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FC_ProductPrice.map","/*\n * Framer Commerce\n * Confidential and Proprietary - All Rights Reserved\n * Unauthorized use, reproduction, distribution, or disclosure of this\n * source code or any related information is strictly prohibited.\n *\n * This software is the exclusive property of Framer Commerce (\"Company\").\n * It is considered highly confidential and proprietary information.\n *\n * Any use, copying, modification, distribution, or sharing of this software,\n * in whole or in part, without the express written permission of the Company\n * is strictly prohibited and may result in legal action.\n *\n * DISCLAIMER: This software does not provide any express or\n * implied warranties, including, but not limited to, the implied warranties\n * of merchantability and fitness for a particular purpose. In no event shall\n * Framer Commerce be liable for any direct, indirect, incidental, special,\n * exemplary, or consequential damages (including, but not limited to, procurement\n * of substitute goods or services; loss of use, data, or profits; or business\n * interruption) however caused and on any theory of liability, whether in\n * contract, strict liability, or tort (including negligence or otherwise)\n * arising in any way out of the use of this software, even if advised of\n * the possibility of such damage.\n *\n * Any unauthorized possession, use, copying, distribution, or dissemination\n * of this software will be considered a breach of confidentiality and may\n * result in legal action.\n *\n * For inquiries, contact:\n * Framer Commerce\n * Email: hello@framercommerce.com\n *\n * © 2025 Butter Supply Inc. All Rights Reserved.\n */import{jsx as _jsx}from\"react/jsx-runtime\";import{useCallback,useEffect,useMemo,useRef,useState}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{get}from\"lodash-es\";import{useIsBrowser}from\"https://framerusercontent.com/modules/ncBs5KPMI9I5GEta13fn/zGXDjuZapa1SGy6D8P5e/IsBrowser.js\";import{knownCurrenciesWithCodeAsSymbol}from\"https://framerusercontent.com/modules/k9s4cejdkBGDjmzudhzM/18cq93eooqM4YmdbL7E2/currencyMaps.js\";// Helper function to map country code to appropriate locale\nconst getLocaleFromCountry=countryCode=>{// Default fallback locale\nif(!countryCode)return undefined;// Common country code to locale mappings\nconst countryToLocale={// North America\nUS:\"en-US\",CA:\"en-CA\",QC:\"fr-CA\",// Europe\nGB:\"en-GB\",FR:\"fr-FR\",DE:\"de-DE\",IT:\"it-IT\",ES:\"es-ES\",PT:\"pt-PT\",NL:\"nl-NL\",BE:\"fr-BE\",LU:\"fr-LU\",CH:\"de-CH\",AT:\"de-AT\",SE:\"sv-SE\",NO:\"nb-NO\",DK:\"da-DK\",FI:\"fi-FI\",PL:\"pl-PL\",CZ:\"cs-CZ\",HU:\"hu-HU\",RU:\"ru-RU\",// Asia Pacific\nCN:\"zh-CN\",JP:\"ja-JP\",KR:\"ko-KR\",IN:\"en-IN\",AU:\"en-AU\",NZ:\"en-NZ\",// Latin America\nMX:\"es-MX\",BR:\"pt-BR\",AR:\"es-AR\",CL:\"es-CL\",CO:\"es-CO\",PE:\"es-PE\",// Middle East & Africa\nAE:\"ar-AE\",SA:\"ar-SA\",ZA:\"en-ZA\",IL:\"he-IL\"};return countryToLocale[countryCode]||undefined;};// Helper function to check if a currency's symbol is the same as its code\nconst isCurrencySymbolSameAsCode=currencyCode=>{// For some currencies like CHF, the browser might use the code as the symbol\nif(!currencyCode)return false;if(knownCurrenciesWithCodeAsSymbol.includes(currencyCode)){return true;}try{const formatted=new Intl.NumberFormat(undefined,{style:\"currency\",currency:currencyCode,currencyDisplay:\"narrowSymbol\"}).format(0);// Remove digits, decimal points, and common formatting characters\nconst cleanFormatted=formatted.replace(/[0-9.,\\s]/g,\"\");// Check if what remains is the currency code\nreturn cleanFormatted===currencyCode;}catch(e){return false;}};/**\n * @framerDisableUnlink\n */export default function FC_ProductPriceCompare(props){const{shopifyProductID,canvasPrice,format:{showCurrency,showSymbol,showDecimals,currencyCode}={},strikethrough,strikethroughColor,strikethroughSize,font,color,compareAtPrefix=\"\"}=props;const[product,setProduct]=useState();const[activeVariant,setActiveVariant]=useState();const[selectedCurrency,setSelectedCurrency]=useState(\"\");const[selectedCountryCode,setSelectedCountryCode]=useState(\"\");const[selectedCountry,setSelectedCountry]=useState(\"\");const[partialSelections,setPartialSelections]=useState({});const[variantSelectorAction,setVariantSelectorAction]=useState(\"\");const isBrowser=useIsBrowser();const normalizeProduct=useCallback(p=>{if(!p)return p;const edges=p?.variants?.edges;if(!Array.isArray(edges)){return{...p,variants:{...p.variants||{},edges:Array.isArray(edges)?edges:[]}};}return p;},[]);// Initialize currency from localStorage on page load\nuseEffect(()=>{if(!isBrowser)return;const storedCurrency=localStorage.getItem(\"selectedCurrency\");const storedCountryCode=localStorage.getItem(\"selectedCountryCode\");const storedCountry=localStorage.getItem(\"selectedCountry\");setSelectedCurrency(storedCurrency||\"USD\");setSelectedCountryCode(storedCountryCode||\"US\");setSelectedCountry(storedCountry||\"United States\");},[isBrowser]);const _currencyCode=useMemo(()=>{const variantCurrency=get(activeVariant,\"price.currencyCode\");const productCurrency=get(product,\"priceRange.minVariantPrice.currencyCode\");return variantCurrency||productCurrency||\"USD\";},[activeVariant,product]);const showMockValues=useMemo(()=>typeof RenderTarget!==\"undefined\"&&(RenderTarget.current()===RenderTarget.canvas||isBrowser&&window.location.origin.endsWith(\"framercanvas.com\")),[isBrowser]);// Cached compareAt range per product/currency\nconst compareRangeCache=useRef(new Map);const getProductCompareRange=useCallback(p=>{if(!p)return{min:null,max:null};const currency=_currencyCode||selectedCurrency||\"USD\";const cacheKey=`${p.id||\"no-id\"}-${currency}-compare`;if(compareRangeCache.current.has(cacheKey)){return compareRangeCache.current.get(cacheKey);}const minFromProduct=get(p,\"compareAtPriceRange.minVariantPrice.amount\");const maxFromProduct=get(p,\"compareAtPriceRange.maxVariantPrice.amount\");let minVal=minFromProduct?parseFloat(minFromProduct):null;let maxVal=maxFromProduct?parseFloat(maxFromProduct):null;if(minVal===null||isNaN(minVal)||maxVal===null||isNaN(maxVal)){const edges=p?.variants?.edges||[];for(let i=0;i<(Array.isArray(edges)?edges.length:0);i++){const v=edges[i]?.node;if(!v)continue;const amtStr=get(v,\"compareAtPrice.amount\");const amt=amtStr?parseFloat(amtStr):NaN;if(!isNaN(amt)&&amt>0){if(minVal===null||amt<minVal)minVal=amt;if(maxVal===null||amt>maxVal)maxVal=amt;}}}const value={min:typeof minVal===\"number\"&&!isNaN(minVal)?minVal:null,max:typeof maxVal===\"number\"&&!isNaN(maxVal)?maxVal:null};compareRangeCache.current.set(cacheKey,value);return value;},[_currencyCode,selectedCurrency]);const productCompareRange=useMemo(()=>getProductCompareRange(product),[product,getProductCompareRange]);// Common function to format price based on options\nconst formatPriceWithOptions=(numericPrice,currCode)=>{const symbolSameAsCode=isCurrencySymbolSameAsCode(currCode);// Get locale from selected country code\nconst locale=getLocaleFromCountry(selectedCountryCode);// Determine if we should show decimals based on the setting\nconst shouldShowDecimals=()=>{if(showDecimals===\"Always show\")return true;if(showDecimals===\"Never show\")return false;if(showDecimals===\"Hide when .00\"){// Check if the decimal part is zero\nreturn numericPrice%1!==0;}return true// Default fallback for boolean value\n;};const decimalDigits=shouldShowDecimals()?2:0;// If showing neither symbol nor code, just format the number\nif(!showSymbol&&!showCurrency){return new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);}// Special case for USD to prevent \"US$\" display in Safari iOS\nif(currCode===\"USD\"&&showSymbol){// Check if running on iOS device\nconst isIOS=isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!(\"MSStream\"in window);// Format USD manually to avoid the iOS \"US$\" prefix\nif(isIOS){const number=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);if(!showCurrency){return`$${number}`// Just \"$50\" format\n;}else{return`$${number} USD`// \"$50 USD\" format\n;}}else{// For non-iOS devices, continue with normal formatting but use\n// a more controlled approach to ensure consistency\nif(!showCurrency){return new Intl.NumberFormat(locale,{style:\"currency\",currency:\"USD\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits,currencyDisplay:\"narrowSymbol\"}).format(numericPrice);}else{const withSymbol=new Intl.NumberFormat(locale,{style:\"currency\",currency:\"USD\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits,currencyDisplay:\"narrowSymbol\"}).format(numericPrice);return`${withSymbol} USD`;}}}// For currencies where symbol is same as code (like CHF)\nif(symbolSameAsCode){// If showing currency code, always use code-first format and ignore symbol\nif(showCurrency&&!showSymbol){const number=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);const output=`${currCode} ${number}`;return output;}if(showSymbol&&!showCurrency){const number=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);const output=`${currCode} ${number}`;return output;}if(showCurrency&&showSymbol){const number=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);return`${currCode} ${number}`;}}// For currencies with distinct symbols (like USD with $)\n// If showing only the code (no symbol)\nif(!showSymbol&&showCurrency){const number=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);// For normal currencies, show code after the number\nreturn`${number} ${currCode}`;}// If showing only the symbol (no code)\nif(showSymbol&&!showCurrency){return new Intl.NumberFormat(locale,{style:\"currency\",currency:currCode,minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits,currencyDisplay:\"narrowSymbol\"}).format(numericPrice);}// If showing both symbol and code\nconst withSymbol=new Intl.NumberFormat(locale,{style:\"currency\",currency:currCode,minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits,currencyDisplay:\"narrowSymbol\"}).format(numericPrice);return`${withSymbol} ${currCode}`;};const text=useMemo(()=>{if(!isBrowser)return\"\";// console.log('[ComparePrice] Debug:', {\n//     activeVariant,\n//     compareAtPrice: activeVariant ? get(activeVariant, 'compareAtPrice.amount') : null,\n//     product,\n//     productComparePrice: get(product, 'compareAtPriceRange.minVariantPrice.amount'),\n//     partialSelections,\n//     variantSelectorAction,\n//     // showMockValues,\n//     // selectedCurrency\n// })\n// For canvas view, handle the display options directly\nif(typeof RenderTarget!==\"undefined\"&&(RenderTarget.current()===RenderTarget.canvas||showMockValues)){// Parse canvasPrice as range format (e.g., \"200.00-250.00\")\nlet minPrice;let maxPrice;if(canvasPrice){const priceRange=canvasPrice.split(\"-\");if(Array.isArray(priceRange)&&priceRange.length===2){minPrice=priceRange[0].trim();maxPrice=priceRange[1].trim();}else{// If no range format, use the single price for both min and max\nminPrice=canvasPrice;maxPrice=canvasPrice;}}const numericMinPrice=parseFloat(minPrice);const numericMaxPrice=parseFloat(maxPrice);const currentCurrencyCode=currencyCode||\"USD\";// Apply same logic as product (no active variant) case\n// If min and max are the same, show one price\nif(numericMinPrice===numericMaxPrice&&numericMinPrice>0&&numericMaxPrice>0){const formattedPrice=formatPriceWithOptions(numericMinPrice,currentCurrencyCode);return compareAtPrefix?`${compareAtPrefix} ${formattedPrice}`:formattedPrice;}else{return\"\";}}// For live view, get the compare at price\nconst amount=activeVariant&&get(activeVariant,\"compareAtPrice.amount\");const{min:compMin,max:compMax}=productCompareRange;if(!amount&&!activeVariant&&!product?.compareAtPriceRange&&!(compMin&&compMax))return\"\";const currentCurrencyCode=selectedCurrency||currencyCode||\"USD\";// If we have an amount, format it\nif(amount){const numericPrice=parseFloat(amount);if(isNaN(numericPrice))return\"\";const formattedPrice=formatPriceWithOptions(numericPrice,currentCurrencyCode);return compareAtPrefix?`${compareAtPrefix} ${formattedPrice}`:formattedPrice;}// Handle partial selections (when user selects only some variant options)\nconst hasPartialSelections=Object.keys(partialSelections||{}).length>0;const hasCompleteVariant=activeVariant&&Array.isArray(activeVariant.selectedOptions)&&activeVariant.selectedOptions.length>0;// console.log(\"hasPartialSelections\", hasPartialSelections)\n// console.log(\"hasCompleteVariant\", hasCompleteVariant)\n// console.log(\"product\", product)\n// console.log(\"partialSelections\", partialSelections)\nif(hasCompleteVariant&&variantSelectorAction===\"purchase\"&&product?.variants?.edges?.length){return\"\";}const hasVariantEdges=Array.isArray(product?.variants?.edges)&&(product?.variants?.edges?.length||0)>0;if(hasPartialSelections&&!hasCompleteVariant&&hasVariantEdges){// Filter variants that match the partial selections\nconst matchingVariants=(product?.variants?.edges||[]).filter(({node:variant})=>{return variant.selectedOptions.every(option=>{// If this option is in our partial selections, it must match\nif(partialSelections[option.name]){return partialSelections[option.name]===option.value;}// If not in partial selections, any value is fine\nreturn true;});});if(Array.isArray(matchingVariants)&&matchingVariants.length>0){//console.log(\"matchingVariants\", matchingVariants)\n// Get all compare at prices for matching variants\nconst compareAtPrices=matchingVariants.map(({node:variant})=>get(variant,\"compareAtPrice.amount\")).filter(amount=>amount&&amount!==\"0\"&&amount!==\"0.00\");// If no compare at prices found, return empty\nif(!Array.isArray(compareAtPrices)||compareAtPrices.length===0){//console.log(\"[ComparePrice] (partial selections) no compare at prices found, return empty\")\nreturn\"\";}// Check if all matching variants have compare at prices\nconst allVariantsHaveComparePrice=matchingVariants.every(({node:variant})=>{const comparePrice=get(variant,\"compareAtPrice.amount\");return comparePrice&&comparePrice!==\"0\"&&comparePrice!==\"0.00\";});// If not all variants have compare prices, hide the compare price text\nif(!allVariantsHaveComparePrice){//console.log(\"[ComparePrice] not all matching variants have compare prices, hide compare price text\")\nreturn\"\";}// Convert to numeric values\nconst numericComparePrices=compareAtPrices.map(price=>parseFloat(price)).filter(price=>!isNaN(price)&&price>0);if(!Array.isArray(numericComparePrices)||numericComparePrices.length===0){//console.log(\"[ComparePrice] no numeric compare prices found, return empty\")\nreturn\"\";}// Check if all compare prices are the same\nconst minComparePrice=Math.min(...numericComparePrices);const maxComparePrice=Math.max(...numericComparePrices);const allSamePrice=Math.abs(minComparePrice-maxComparePrice)<.01;if(allSamePrice){// All matching variants have the same compare price, display one price\n//console.log(\"[ComparePrice] all matching variants have the same compare price, display one price\", minComparePrice, currentCurrencyCode)\nconst formattedPrice=formatPriceWithOptions(minComparePrice,currentCurrencyCode);return compareAtPrefix?`${compareAtPrefix} ${formattedPrice}`:formattedPrice;}else{// Prices differ, hide compare price text\n//console.log(\"[ComparePrice] matching variant prices differ, hide compare price text\")\nreturn\"\";}}}// Handle product (no active variant) - check all variants\nif(!activeVariant&&!hasPartialSelections&&hasVariantEdges){// First, check if ALL variants have compare prices\nconst allVariantsHaveComparePrice=(product?.variants?.edges||[]).every(({node:variant})=>{const comparePrice=get(variant,\"compareAtPrice.amount\");return comparePrice&&comparePrice!==\"0\"&&comparePrice!==\"0.00\";});// If not all variants have compare prices, hide the compare price text\nif(!allVariantsHaveComparePrice){//console.log(\"[ComparePrice] not all variants have compare prices, hide compare price text\")\nreturn\"\";}// Use product-level compare range with fallback to computed\nconst numericMinPrice=compMin;const numericMaxPrice=compMax;if(numericMinPrice&&numericMaxPrice){if(Math.abs(numericMinPrice-numericMaxPrice)<.01){const formattedPrice=formatPriceWithOptions(numericMinPrice,currentCurrencyCode);return compareAtPrefix?`${compareAtPrefix} ${formattedPrice}`:formattedPrice;}else{return\"\";}}return\"\";}return\"\";},[isBrowser,showMockValues,activeVariant,product,canvasPrice,showCurrency,showSymbol,currencyCode,showDecimals,selectedCurrency,selectedCountryCode,partialSelections,variantSelectorAction,compareAtPrefix,props.format]);const showComparePrice=useMemo(()=>{if(showMockValues){return canvasPrice&&canvasPrice.trim()!==\"\";}return text&&text.trim()!==\"\";},[showMockValues,canvasPrice,text]);// Listen for currency changes\nuseEffect(()=>{if(!isBrowser)return;const handleCurrencyChange=event=>{// console.log('[ComparePrice] Currency changed:', {\n//     newCurrency: event.detail.currency,\n//     newCountryCode: event.detail.countryCode\n// })\nconst{currency,countryCode,country}=event.detail;setSelectedCurrency(currency);setSelectedCountryCode(countryCode);setSelectedCountry(country);try{// Get products from shopXtools storage\nconst products=window.shopXtools?.products||[];const _matchingProduct=products.find(({node:_product})=>_product.id===`gid://shopify/Product/${shopifyProductID}`);if(_matchingProduct){setProduct(normalizeProduct(_matchingProduct.node));// Preserve active variant selection if possible\nif(activeVariant){const edges=_matchingProduct?.node?.variants?.edges||[];const matchingVariant=edges.find(({node})=>{const nodeOpts=Array.isArray(node?.selectedOptions)?node.selectedOptions:[];const activeOpts=Array.isArray(activeVariant?.selectedOptions)?activeVariant.selectedOptions:[];return nodeOpts.every(option=>activeOpts.some(activeOption=>activeOption?.name===option?.name&&activeOption?.value===option?.value));});if(matchingVariant){setActiveVariant(matchingVariant.node);}}}}catch(error){// Error handling\n}};window.addEventListener(\"currency_changed\",handleCurrencyChange);return()=>{window.removeEventListener(\"currency_changed\",handleCurrencyChange);};},[isBrowser,shopifyProductID,activeVariant,selectedCurrency,selectedCountryCode]);useEffect(()=>{if(!isBrowser)return;const handleVariantChange=e=>{// console.log(\"[ComparePrice] Variant changed:\", {\n//     detail: e.detail,\n//     expectedProductId: `gid://shopify/Product/${shopifyProductID}`,\n// })\n// Check for purchase action flag - if this is a purchase action, don't update variant state\nif(e.detail?.isPurchaseAction||e.detail?.onClickAction===\"purchase\"){// console.log(\n//     \"Purchase action detected, returning\",\n//     e.detail?.isPurchaseAction\n// )\nreturn;}try{const expectedProductId=`gid://shopify/Product/${shopifyProductID}`;if(e.detail){if(!e.detail.productId||e.detail.productId!==expectedProductId){return;}}if(e.detail.productId!==expectedProductId){setVariantSelectorAction(e.detail.onClickAction);//console.log(\"variantSelectorAction\", e.detail.onClickAction)\n}// If selection is partial, do not set activeVariant; preserve partial range behavior\nif(e.detail?.isCompleteVariant===false){setActiveVariant(null);if(Array.isArray(e.detail.selectedOptions)){const partial={};e.detail.selectedOptions.forEach(opt=>{if(opt?.name)partial[opt.name]=opt.value;});setPartialSelections(partial);}return;}// Get products from shopXtools storage\nconst products=window.shopXtools?.products||[];const _matchingProduct=products.find(({node:_product})=>_product.id===`gid://shopify/Product/${shopifyProductID}`);if(_matchingProduct){setProduct(normalizeProduct(_matchingProduct.node));// Find the matching variant in the current product data\nconst edges=_matchingProduct?.node?.variants?.edges||[];const matchingVariant=edges.find(({node})=>{const nodeOpts=Array.isArray(node?.selectedOptions)?node.selectedOptions:[];const activeOpts=Array.isArray(e.detail?.selectedOptions)?e.detail.selectedOptions:[]//Array.isArray(activeVariant?.selectedOptions) ? activeVariant.selectedOptions : []\n;return nodeOpts.every(option=>activeOpts.some(activeOption=>activeOption?.name===option?.name&&activeOption?.value===option?.value));});if(matchingVariant){if(e.detail.onClickAction===\"purchase\"){setActiveVariant(null);//console.log(\"setting partialSelections for purchase action\", e.detail.selectedOptions[0])\nsetPartialSelections({[e.detail.selectedOptions[0].name]:e.detail.selectedOptions[0].value});}else{setActiveVariant(matchingVariant.node);setPartialSelections({});}}else{// If no exact variant match but event was marked complete, fall back to event detail\n// Otherwise partial branches above already handled\nif(e.detail?.isCompleteVariant){setActiveVariant(e.detail);if(e.detail.onClickAction!==\"purchase\"){setPartialSelections({});}}}}}catch(error){// Error handling without console.error\nif(e.detail?.isCompleteVariant){setActiveVariant(e.detail);if(e.detail.onClickAction!==\"purchase\"){setPartialSelections({});}}else{setActiveVariant(null);if(Array.isArray(e.detail?.selectedOptions)){const partial={};e.detail.selectedOptions.forEach(opt=>{if(opt?.name)partial[opt.name]=opt.value;});setPartialSelections(partial);}}}};const handleProductsReady=e=>{if(Array.isArray(e.detail.products)){const _matchingProduct=e.detail.products.find(({node:_product})=>_product.id===`gid://shopify/Product/${shopifyProductID}`);setProduct(_matchingProduct?normalizeProduct(_matchingProduct.node):null);// If there's only one variant, set it as active\nif(Array.isArray(_matchingProduct?.node?.variants?.edges)&&(_matchingProduct?.node?.variants?.edges?.length||0)===1){setActiveVariant(_matchingProduct.node.variants.edges[0].node);}}};// Add event listener for variant option selections\nconst handleVariantOptionSelected=e=>{//console.log(\"variant_option_selected\", e.detail)\nif(e.detail?.isPurchaseAction){// console.log(\n//     \"Purchase action is true, returning\",\n//     e.detail?.isPurchaseAction\n// )\nreturn;}// Check if this event is for our product\nconst eventProductId=e.detail?.productId;const expectedProductId=`gid://shopify/Product/${shopifyProductID}`;if(eventProductId&&eventProductId!==expectedProductId){//console.log(\"Event not for this product\", eventProductId, expectedProductId)\nreturn;}if(e.detail?.optionName&&e.detail?.value){setPartialSelections({[e.detail.optionName]:e.detail.value});//console.log(\"setting partialSelections from individual option\", e.detail.optionName, e.detail.value)\n}};// Initial product load function\nconst loadProduct=async()=>{try{// Get products from shopXtools storage\nconst products=window.shopXtools?.products||[];const _matchingProduct=products.find(({node:_product})=>_product.id===`gid://shopify/Product/${shopifyProductID}`);if(_matchingProduct){setProduct(normalizeProduct(_matchingProduct.node));if(Array.isArray(_matchingProduct.node?.variants?.edges)&&(_matchingProduct?.node?.variants?.edges?.length||0)===1){setActiveVariant(_matchingProduct.node.variants.edges[0].node);}// setActiveVariant(\n//     _matchingProduct.node?.variants?.edges[0].node\n// )\n}}catch(error){// Error handling without console.error\n}};// Call loadProduct on mount\nloadProduct();// Initial check for existing products\nif(window[\"shopXtools\"]?.products){const products=window[\"shopXtools\"].products;if(Array.isArray(products)&&products.length>0){const _matchingProduct=products.find(({node:_product})=>_product?.id===`gid://shopify/Product/${shopifyProductID}`);if(_matchingProduct?.node){setProduct(normalizeProduct(_matchingProduct.node));if(Array.isArray(_matchingProduct.node?.variants?.edges)&&(_matchingProduct?.node?.variants?.edges?.length||0)===1){setActiveVariant(_matchingProduct.node.variants.edges[0].node);}// setActiveVariant(\n//     _matchingProduct.node?.variants?.edges[0].node\n// )\n}else{setProduct(null);}}}// Add event listeners\ndocument.addEventListener(\"data__products-ready\",handleProductsReady);document.addEventListener(\"product__active-variant__changed\",handleVariantChange);document.addEventListener(\"variant_option_selected\",handleVariantOptionSelected);document.addEventListener(\"__variant_option_selected\",handleVariantOptionSelected);// Cleanup\nreturn()=>{document.removeEventListener(\"data__products-ready\",handleProductsReady);document.removeEventListener(\"product__active-variant__changed\",handleVariantChange);document.removeEventListener(\"variant_option_selected\",handleVariantOptionSelected);document.removeEventListener(\"__variant_option_selected\",handleVariantOptionSelected);};},[isBrowser,shopifyProductID,selectedCurrency]);// Return empty div during SSR\nif(!isBrowser){return /*#__PURE__*/_jsx(\"div\",{style:{display:\"none\"}});}// console.log('[ComparePrice] Final render state:', {\n//     showComparePrice,\n//     text,\n//     showMockValues\n// })\n// Always show in canvas view, otherwise only show if there's a compare price\nif(!showComparePrice){return null;}return /*#__PURE__*/_jsx(\"div\",{style:{display:\"inline-block\",maxWidth:\"100%\",width:\"auto\",whiteSpace:\"nowrap\",overflow:\"visible\",transform:\"none\",transition:\"none\",animation:\"none\",willChange:\"auto\"},children:/*#__PURE__*/_jsx(\"p\",{style:{...font,color:color,margin:0,padding:0,lineHeight:1,textDecoration:strikethrough?\"line-through\":\"none\",textDecorationColor:strikethroughColor,textDecorationThickness:strikethrough?`${strikethroughSize}px`:undefined,whiteSpace:\"nowrap\",display:\"inline-block\",width:\"auto\",transform:\"none\",transition:\"none\",animation:\"none\",willChange:\"auto\"},children:text})});}FC_ProductPriceCompare.defaultProps={shopifyProductID:\"\",strikethrough:true,strikethroughColor:\"#000000\",strikethroughSize:1,canvasPrice:\"75.00\",compareAtPrefix:\"\",format:{showCurrency:true,showSymbol:true,currencyCode:\"USD\",showDecimals:\"Always show\"}};addPropertyControls(FC_ProductPriceCompare,{shopifyProductID:{type:ControlType.String,title:\"Product ID\",description:\"Connect to CMS (required).\"},canvasPrice:{type:ControlType.String,title:\"Compare Price\",description:\"Connect to CMS (for canvas preview only).\",defaultValue:\"75.00\"},compareAtPrefix:{type:ControlType.String,title:\"Prefix\",placeholder:\"was\",defaultValue:\"\"},format:{type:ControlType.Object,title:\"Format\",controls:{showSymbol:{type:ControlType.Boolean,title:\"Symbol\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\",description:\"$, \\xa3, €, etc.\"},showCurrency:{type:ControlType.Boolean,title:\"Code\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\",description:\"USD, EUR, CHF, etc.\"},showDecimals:{type:ControlType.Enum,title:\"Decimals\",defaultValue:\"Always show\",options:[\"Always show\",\"Never show\",\"Hide when .00\"],optionTitles:[\"Always show\",\"Never show\",\"Hide when .00\"],displaySegmentedControl:true,segmentedControlDirection:\"vertical\"},currencyCode:{type:ControlType.Enum,title:\"Preview\",defaultValue:\"USD\",options:[\"USD\",\"EUR\",\"GBP\",\"CHF\",\"JPY\",\"CAD\",\"AUD\",\"CNY\",\"HKD\",\"NZD\",\"SEK\",\"KRW\",\"SGD\",\"NOK\",\"MXN\",\"INR\",\"RUB\",\"ZAR\",\"TRY\",\"BRL\",\"TWD\",\"DKK\",\"PLN\",\"THB\",\"IDR\",\"HUF\",\"CZK\",\"ILS\",\"CLP\",\"PHP\",\"AED\",\"COP\",\"SAR\",\"MYR\",\"RON\"],description:\"Currency on your site is automatic, this is only shown in canvas preview.\"}}},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\"},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#000\"},strikethrough:{type:ControlType.Boolean,title:\"Strike\",defaultValue:true},strikethroughSize:{type:ControlType.Number,title:\"↳ Size\",defaultValue:1,min:0,max:8,step:.1,hidden:props=>!props.strikethrough},strikethroughColor:{type:ControlType.Color,title:\"↳ Color\",defaultValue:\"#000000\",hidden:props=>!props.strikethrough}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FC_ProductPriceCompare\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FC_ProductPriceCompare.map"],"mappings":"wUAuCG,SAAwB,EAAwB,EAAM,CAAC,GAAK,CAAC,mBAAiB,eAAa,OAAO,CAAC,eAAa,aAAW,eAAa,gBAAc,EAAE,CAAC,aAAW,eAAa,sBAAoB,iBAAe,SAAS,EAAW,CAAC,EAAQ,GAAYA,GAAU,CAAM,CAAC,EAAc,GAAkBA,GAAU,CAAM,CAAC,EAAiB,GAAqBA,MACjWC,EAAI,EAAQ,0CAA0C,EAAE,MAAQ,CAAM,CAAC,EAAoB,GAAwBD,EAAS,GAAG,CAAM,CAAC,EAAgB,GAAoBA,EAAS,GAAG,CAAM,CAAC,EAAkB,GAAsBA,EAAS,EAAE,CAAC,CAAM,CAAC,EAAsB,GAA0BA,EAAS,GAAG,CAAO,EAAU,GAAc,CAAO,EAAeE,MAAmB,IAAe,SAAc,EAAa,SAAS,GAAG,EAAa,QAAQ,GAAW,EAAO,SAAS,OAAO,SAAS,mBAAmB,EAAE,CAAC,EAAU,CAAC,CAAC,MAAc,CAAI,GAAS,EAAoBD,EAAI,EAAQ,0CAA0C,EAAE,MAAM,EAAI,CAAC,EAAQ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