{"version":3,"file":"FC_ProductVariantState.C1MsvgNB.mjs","names":["useState","React.useMemo","useRef","useCallback","React","useState","useRef","useCallback","useRef","React.useCallback","useState","useCallback","__esmMin","z","pe","e","init_npm_react_18_3_1","window","ce","init_jsx_runtime","ne","c","_e","de","init_ssg_sandbox_shims","useAnimation","motion","addPropertyControls","RenderTarget","ControlType","init_framer_DKgW_P28","appendLanguageToUrl","init_IsBrowser","useIsBrowser","init_lodash","init_locales","get","useOnEnter","useOnExit","defaultEvents","init_default_utils_js__0_45","init_mutations_v2","updateCartAttributes","getProductMetafields","updateCartCurrency","cartQuery","createCartMutation","addToCartMutation","init_utmParams","getUTMParameters","getSCARefParameters","appendAllTrackingParamsToUrl","trackFacebookPixelViewContent","trackFacebookPixelAddToCart","trackFacebookPixelInitiateCheckout","init_Fb_pixel","FC_ProductVariants","props","behaviorConfigs","product","setProduct","shouldValidate","setShouldValidate","selectedOptions","setSelectedOptions","combinations","setCombinations","getIncludedOptionNames","filterVariants","allNames","prod","o","filters","titles","name","filteredOptions","opt","isBrowser","isCanvas","autoSelectRef","instanceIdRef","appliedFromStorageRef","isInitializingRef","prevActionRef","action","prevAutoSelectFirstRef","autoSelectFirst","initialScrollPreventedRef","selectedCurrency","setSelectedCurrency","focusedOptionIndex","setFocusedOptionIndex","focusedValueIndex","setFocusedValueIndex","containerRef","colorHexMap","setColorHexMap","shopifyProductID","swatchColors","swatchImages","setSwatchImages","colorTitles","setColorTitles","cfg","standardColorMap","defaultColors","color","normalizedName","hex","colors","error","updateUrlWithVariant","productPage","variantId","numericId","url","variantIdFromUrl","matchingVariant","node","urlOptions","option","allOptionsSelected","optName","key","saveVariantToSessionStorage","__isPurchaseMode","activeVariantEvent","isCurrentPageProductPage","products","urlHandle","checkAndCleanupUrl","clearSessionStorage","i","stripVariantFromUrl","searchParams","newUrl","isValidProductPage","hasVariantParam","getVariantStorageKey","group","savedVariantKey","variantData","legacyKey","loadVariantFromSessionStorage","namespacedKey","savedData","prefix","latest","value","parsed","ts","savedVariantData","timestamp","applyVariantFromSessionStorage","hasUrlVariant","savedVariant","productOptionNames","filteredSelectedOptions","prev","allOptions","options","missingInGroup","mergedSelectedOptions","chosenSource","filled","optionName","event","communicationEvent","isCompleteEffective","source","restoreVariantFromUrl","matchingProduct","matchingProductId","matchingVariantId","productPageRef","productRef","restoreVariantFromUrlRef","handlePopState","hasVariantInUrl","isUrlProductPage","timer","isAppliedFromSessionStorage","styleEl","productGid","timeoutId","autoSelectEvent","variants","parsedVariants","parseOptionsAndVariants","mockProduct","productId","availableForSale","variant","optIndex","index","selectOutOfStock","\"shopXtools\"","_matchingProduct","_product","handleProductsReady","images","retryTimer","prefixLegacy","prefixScoped","k","handleImageVariantSelected","imageOptionNames","s","targetOpt","dispatchOptionSelectedEvent","handleImageNumberSelected","mapping","match","IMAGE_MAPPING_REGEX","imageNumber","allSelectedOptions","switchedToUpdateActive","enabledAutoSelect","firstAvailableVariant","variantKey","initialOptions","parsedVariant","isPartial","optionsList","scopeTitles","fallbackPicked","partial","baseSelections","nextValue","trial","v","fallbackSelected","picked","matching","oldSelectionsRef","handleCurrencyChange","currency","newProduct","savedSelections","validSelections","newOptions","selectedValue","values","activeVariant","getProductVariant","syncEvent","previousUrl","setPreviousUrl","parseVariantImageIds","variantIdsString","imageMarkers","imageRegex","imageMatch","marker","nextMarker","startPos","endPos","segment","variantRegex","variantMatch","orderFieldError","setOrderFieldError","newSelectedOptions","purchaseActiveVariant","getLineItem","merchandiseId","lineItem","productSpecificKey","stored","data","attributes","\"attributes\"","storedAttributes","parsedAttrs","configKey","config","parsedConfig","attrKeyList","hasError","attrKey","savedValue","email","localPart","domain","lines","countryCode","existingCartId","addResult","item_id","item_name","price","activeProduct","triggerCart","createResult","buyResult","checkoutUrl","handlePurchaseCompleted","optionValue","optionToReset","rememberedOptions","handleVisualSync","eventVariantRef","eventVariantFreshRef","handleVariant","variantToShow","matchingImageNumber","tapEvent","newHash","element","headerOffset","offsetPosition","allCombinations","accumulator","handleCommunication","incomingOptions","isPurchaseAction","newSelection","title","merged","renderVariantDropdown","VariantDropdown","renderVariantButtons","valid","maxCols","gapX","minWidth","filteredValues","isActive","isAvailableForSale","filtered","combination","comb","canSelect","isLastItem","applyEdgeToEdge","isHorizontal","borderUnselected","borderSelected","borderDisabled","borderHovered","getBorderStyle","borderConfig","toggleTitles","isMixed","top","borderStyle","borderColor","right","bottom","left","borderWidth","marginStyle","firstAvailable","availableButtons","radiogroup","nextIndex","currentIndex","prevIndex","button","hoveredBorder","leaveBorder","renderColorSwatches","style","isLast","invalidMsg","swatches","colorName","hexColor","getStateBorder","getStateBackground","border","background","renderImageSwatches","useCustomStyles","swatchConfig","imageUrl","img","renderVariantImages","variantImageIdMap","variantImageUrl","variantEdge","imageProp","shouldHideVariants","showSingleVariants","availableVariants","availableValues","variantColorTitles","variantImageTitles","variantImagesTitles","useColorSwatches","useImageSwatches","useVariantImages","opts","parseOptions","optionsString","OPTION_GROUP_REGEX","titleWithValues","id","valuesStr","parseVariants","variantsString","variantGroups","combinationPart","combinedString","parts","init_FC_ProductVariants_v1","act","isHovered","setIsHovered","isFocused","setIsFocused","dropdownConfigs","unselectedText","unselected","currentValue","isUnselected","totalCount","hover","selected","radius","font","select","icon","imageTrigger","imageControls","sanitizeChildrenRecursively","sanitizedProps","init_cloning","initializeStore","originalPushState","originalReplaceState","init_initialize","FC_ProductPurchaseButton","setActiveVariant","isInStock","setIsInStock","needsVariantSelection","setNeedsVariantSelection","isLoading","setIsLoading","hasInitialized","setHasInitialized","setCountryCode","planSelected","setPlanSelected","cartExistingData","setCartExistingData","errorMessage","setErrorMessage","productQuantity","setProductQuantity","viewContentFired","setAutoSelectFirst","isVariantManuallySelected","setIsVariantManuallySelected","maxQuantityReached","setMaxQuantityReached","orderMax","setOrderMax","handleAutoSelectFlag","calculateTotalInventory","productData","total","isVariantAvailable","savedCartId","handleSubscriptionChange","handleQuantityChange","updateData","handleSingleVariantProduct","productNode","handleProductData","currentProductId","incomingProductId","fetchOrderMax","shopifyProductVariantId","edge","hasMultipleVariants","anyVariantAvailable","productsReadyHandler","variantChangeHandler","productOptions","selectedArray","selectedNames","isCompleteFromNames","isComplete","getCurrentCartQuantity","validateOrderField","isValid","handleOrderFieldChange","isInputRequired","setIsInputRequired","checkInputRequirement","required","\"sellingPlanId\"","productHandle","metafieldsResponse","max","liveCart","liveEdges","productVariantIds","handleAddToCart","currentCartQuantity","inputElement","currentInputValue","attrValue","BuyNowATC","cartData","cleanShopifyId","item_variant","payload","openCart","variables","finalCheckoutUrl","cartId","isDesignOrPreview","content","available","maxQuantity","OutOfStock","SelectVariant","canAddToCart","handleClick","currentQuantity","shouldBeAtMax","currentInCart","remainingAllowed","handleCartUpdate","orderMaxRemainingAllowed","variantQnt","handleResize","storedId","found","viewItemTrackedRef","pageViewTrackedRef","item_brand","item_category","defaultVariant","focused","canvasContent","LoadingState","hasAnyState","isPreview","sanitizedCanvasContent","sanitizedLoadingState","sanitizedContent","init_FC_ProductPurchaseButton","gid","DotWave","circles","animProps","animation","transition","circle","Material","IOS","arrayRotate","arr","n","lineOpacities","lineKeyframes","getIndicator","indicator","Indicators","handleTimeout","callback","duration","Loading","controls","animDuration","fadeOut","animDelay","currentIndicator","handlers","onFadeOut","hasDuration","resetOpacity","onTimeout","cleanup","init_Loading","\"DotWave\"","\"Material\"","\"IOS\"","FC_ProductVariantState","handleVariantSelection","remainingOptions","displayText","textTemplate","init_FC_ProductVariantState"],"sources":["https:/framerusercontent.com/modules/LexXLRVKTdoqiCBn8fDM/YoR4Go3nCgqVN5J7nWRn/FC_ProductVariants_v1.js","https:/framerusercontent.com/modules/Da0ApllLKQHSw8djEYKs/NKlmeTJYy3YIy3O2qsS9/cloning.js","https:/framerusercontent.com/modules/FXrY3V9ZYVL8aziafDQn/HIuMDRrKIIcsJe65kZwo/initialize.js","https:/framerusercontent.com/modules/DfixsupJND2Hhr1xcPbk/bMUAV2iZ5RHDKZF7CmZF/FC_ProductPurchaseButton.js","https:/framerusercontent.com/modules/NQ9LlTfXzHTRhTTi6qMI/5u9VoSaQM7qxLI2scUcH/Loading.js","https:/framerusercontent.com/modules/B12xzzGu5tV27jDrWyaW/dyGmYzzIUDiXU0ubHYzE/FC_ProductVariantState.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 *//*\n * Note: This component is not yet ready for use.\n * It replaces the referenced Framer import and creates the buttons from scratch, which is stable.\n * It also uses CMS data to populate the product data on canvas, which causes critical issues when replacing the code in the existing code component.\n */import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{useCallback,useEffect,useRef,useState}from\"react\";// Internal\nimport{addPropertyControls,ControlType}from\"framer\";// Helper to determine if the component is in a purchase action mode\nconst __isPurchaseMode=act=>act===\"Add to Cart\"||act===\"Buy Now\";import{get}from\"lodash-es\";import{createCartMutation,addToCartMutation}from\"https://framerusercontent.com/modules/yiRfl1JCGhIBUL31WVDk/wupS2XmBAHu1kBQNv9pi/mutations_v2.js\";import{appendAllTrackingParamsToUrl}from\"https://framerusercontent.com/modules/w24ELWa2giT3SFaWpV77/398w6fPyag8B92ojouQr/utmParams.js\";import{appendLanguageToUrl}from\"https://framerusercontent.com/modules/vC6fzbfO83MgBPIhn5zl/DUlbmWuOELzEUenVmv3G/locales.js\";import{trackFacebookPixelAddToCart,trackFacebookPixelInitiateCheckout}from\"https://framerusercontent.com/modules/6Zs9CjkPbKzHjoy8LK08/iqoIwmJw4hztafi4V4IV/Fb_pixel.js\";const VariantDropdown=({opt,filteredValues,isLast,valid,invalidMsg,props,dispatchOptionSelectedEvent,selectedOptions,combinations,index,totalCount})=>{const[isHovered,setIsHovered]=useState(false);const[isFocused,setIsFocused]=useState(false);const{dropdownConfigs}=props;const{font,selected,hover,unselected,radius,padding,icon}=dropdownConfigs;const unselectedText=(unselected.text||\"Select {{variant}}\").replace(\"{{variant}}\",opt.name);const currentValue=selectedOptions[opt.name]||unselectedText;const isUnselected=currentValue===unselectedText;// Edge to edge styling - only apply when gap is 0\nconst isLastItem=index===totalCount-1;const gap=Number(props.containerConfigs.gap);const applyEdgeToEdge=gap===0;const isHorizontal=props.containerConfigs.direction===\"horizontal\";// Calculate margin style for edge-to-edge effect\nconst marginStyle={};if(applyEdgeToEdge&&!isLastItem){if(isHorizontal){// For horizontal layout, use negative right margin\nmarginStyle.marginRight=\"-1px\";}else{// For vertical layout, use negative bottom margin\nmarginStyle.marginBottom=\"-1px\";}}// Determine border style based on state\nconst borderStyle=`${isUnselected?unselected.border.borderWidth:isFocused?hover.border.borderWidth:isHovered?hover.border.borderWidth:selected.border.borderWidth}px solid ${isUnselected?unselected.border.borderColor:isFocused?hover.border.borderColor:isHovered?hover.border.borderColor:selected.border.borderColor}`;return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",position:\"relative\",zIndex:isFocused?1:0,overflow:\"visible\",...isHorizontal&&applyEdgeToEdge&&!isLastItem?{marginRight:\"-1px\"}:{}},className:`variant-dropdown-container ${isHorizontal&&applyEdgeToEdge&&!isLastItem?\"horizontal-edge-to-edge\":\"\"}`,\"data-horizontal\":isHorizontal?\"true\":\"false\",\"data-last\":isLastItem?\"true\":\"false\",\"data-edge-to-edge\":applyEdgeToEdge?\"true\":\"false\",children:/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",gap:\"0px\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",display:props.titleConfigs.visible||props.selectedConfigs.visible?\"flex\":\"none\",justifyContent:props.titleConfigs.font.textAlign===\"center\"?\"center\":props.titleConfigs.font.textAlign===\"right\"?\"flex-end\":\"flex-start\",marginBottom:get(props,\"containerConfigs.gap2\")!==undefined?get(props,\"containerConfigs.gap2\"):get(props,\"titleConfigs.gap\"),overflow:\"visible\"},children:/*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",display:\"flex\",justifyContent:\"flex-start\",alignItems:\"center\",overflow:\"visible\"},children:[props.titleConfigs.visible&&/*#__PURE__*/_jsx(\"p\",{id:`variant-title-${opt.name}`,style:{...get(props,\"titleConfigs.font\"),color:get(props,\"titleConfigs.color\"),whiteSpace:\"nowrap\",overflow:\"visible\",margin:0,textTransform:get(props,\"titleConfigs.textTransform\",\"None\").toLowerCase()},children:(props.titleConfigs.display||\"{{Option}}\").replace(\"{{Option}}\",opt.name)}),props.selectedConfigs.visible&&selectedOptions[opt.name]&&/*#__PURE__*/_jsx(\"p\",{style:{...get(props,\"selectedConfigs.font\"),color:get(props,\"selectedConfigs.color\"),whiteSpace:\"nowrap\",overflow:\"visible\",paddingLeft:props.titleConfigs.visible?`${props.selectedConfigs.gap}px`:0,margin:0,textTransform:get(props,\"selectedConfigs.textTransform\",\"None\").toLowerCase()},children:selectedOptions[opt.name]}),props.selectedConfigs.visible&&props.selectedConfigs.emptyVisible&&!selectedOptions[opt.name]&&/*#__PURE__*/_jsx(\"p\",{style:{...get(props,\"selectedConfigs.font\"),color:get(props,\"selectedConfigs.color\"),whiteSpace:\"nowrap\",overflow:\"visible\",paddingLeft:props.titleConfigs.visible?`${props.selectedConfigs.gap}px`:0,margin:0,textTransform:get(props,\"selectedConfigs.textTransform\",\"None\").toLowerCase()},children:(props.selectedConfigs.emptyText||\"Select {{Option Value}}\").replace(\"{{Option Value}}\",opt.name)})]})}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\"},children:/*#__PURE__*/_jsxs(\"div\",{className:\"dropdown-inner\",style:{position:\"relative\",display:\"flex\",alignItems:\"center\",width:\"100%\",backgroundColor:isUnselected?unselected.background:isFocused?hover.background:isHovered?hover.background:selected.background,borderRadius:radius,border:borderStyle,transition:\"all 0.2s ease-in-out\",outline:isFocused?`2px solid ${hover.border.borderColor}`:\"none\",outlineOffset:\"1px\",...marginStyle},children:[/*#__PURE__*/_jsxs(\"select\",{id:`variant-${opt.name}`,style:{flex:1,padding:padding,backgroundColor:\"transparent\",color:isUnselected?unselected.color:isFocused?hover.color:isHovered?hover.color:selected.color,...font,textTransform:get(props,\"dropdownConfigs.textTransform\",\"None\").toLowerCase(),appearance:\"none\",cursor:\"pointer\",outline:\"none\",border:\"none\",width:\"100%\"},value:currentValue,onChange:e=>{const value=e.target.value;if(value!==unselectedText){dispatchOptionSelectedEvent(opt.name,value);}},onMouseEnter:()=>setIsHovered(true),onMouseLeave:()=>setIsHovered(false),onFocus:()=>setIsFocused(true),onBlur:()=>setIsFocused(false),onKeyDown:e=>{if(e.key===\"Enter\"||e.key===\" \"){e.preventDefault();const select=e.target;const event=new MouseEvent(\"mousedown\",{bubbles:true,cancelable:true,view:window});select.dispatchEvent(event);}else if(e.key===\"ArrowDown\"||e.key===\"ArrowUp\"){// Let the native select handle these keys\n// but still maintain focus state\nsetIsFocused(true);}},\"aria-label\":`Select ${opt.name}`,\"aria-invalid\":!valid,\"aria-required\":\"true\",children:[/*#__PURE__*/_jsx(\"option\",{value:unselectedText,disabled:true,children:unselectedText}),filteredValues.map(v=>{let isAvailableForSale;// If variantGroups is \"all\", meaning there is only one variant selector,\nif(props.behaviorConfigs?.filterVariants?.variantGroups===\"all\"){const filtered=Array.from(Object.entries({...selectedOptions,[opt.name]:v}));isAvailableForSale=combinations.find(combination=>filtered.every(([key,value])=>combination[key]===value)&&combination.availableForSale);}else{// If there are multiple variant selectors\nconst availableValues=Array.from(new Set(combinations.filter(comb=>comb.availableForSale&&// Only include available variants!\n    Object.entries(selectedOptions).filter(([key])=>key!==opt.name).every(([key,value])=>comb[key]===value)).map(comb=>comb[opt.name]).filter(Boolean)));isAvailableForSale=availableValues.includes(v);}return /*#__PURE__*/_jsx(\"option\",{value:v,disabled:!isAvailableForSale,style:{color:!isAvailableForSale?unselected.color:selected.color,backgroundColor:!isAvailableForSale?unselected.background:selected.background},children:v},v);})]}),/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",alignItems:\"center\",justifyContent:\"center\",padding:padding,pointerEvents:\"none\"},children:icon.type===\"custom\"&&icon.customIcon?/*#__PURE__*/_jsx(\"img\",{src:icon.customIcon,width:icon.size,height:icon.size,style:{objectFit:\"contain\"},alt:\"Dropdown icon\"}):/*#__PURE__*/_jsx(\"svg\",{width:icon.size,height:icon.size,viewBox:\"0 0 24 24\",fill:\"none\",stroke:icon.type===\"default\"?icon.color:isUnselected?unselected.color:isFocused?hover.color:isHovered?hover.color:icon.color,strokeWidth:icon.weight,strokeLinecap:\"butt\",strokeLinejoin:\"miter\",children:/*#__PURE__*/_jsx(\"polyline\",{points:\"6 9 12 15 18 9\"})})})]})}),!valid&&/*#__PURE__*/_jsx(\"div\",{role:\"alert\",style:{color:props.ErrorConfigs.errorColor,...props.ErrorConfigs.errorFont,paddingTop:props.ErrorConfigs.errorPaddingTop},children:invalidMsg})]})},opt.name);};/**\n * @framerDisableUnlink\n *\n * FC_ProductVariants is a component that allows users to select product variants.\n *\n * The 'variants' property accepts a string in the following format:\n * [Option Name: Value1,Value2,Value3 • option_id] •• [Value1/Value2 • variant_id][Value1/Value3 • variant_id2] •• product_id\n *\n * Examples:\n * - Single option: [Size: XS,S,M,L,XL • size_id] •• [XS • variant1][S • variant2][M • variant3][L • variant4][XL • variant5]\n * - Multiple options: [Size: XS,S,M,L,XL • size_id][Color: Blue,Black • color_id] •• [XS/Blue • var1][XS/Black • var2][S/Blue • var3]\n * - With product ID: [Size: XS,S,M,L,XL • size_id] •• [XS • variant1][S • variant2] •• product_123456789\n */export default function FC_ProductVariants(props){const{shopifyProductID,images,behaviorConfigs,style,variants}=props;const{showSingleVariants,selectOutOfStock,filterVariants,action,triggerCart,productPage=true}=behaviorConfigs||{};let{autoSelectFirst}=behaviorConfigs||{};const[product,setProduct]=useState(null);const[shouldValidate,setShouldValidate]=useState(false);const[selectedOptions,setSelectedOptions]=useState({});const[combinations,setCombinations]=useState([]);// Compute the option names this instance actually controls, accounting for\n// \"equals\" vs \"doesn't equal\" variantGroups. For \"doesn't equal\" we must\n// use the complement set (all option names excluding variantTitles).\nconst getIncludedOptionNames=(prod=product,filters=filterVariants)=>{const allNames=(get(prod,\"options\",[])||[]).map(o=>o.name);if(!filters||filters.variantGroups===\"all\")return allNames;const titles=filters.variantTitles||[];return filters.variantGroups===\"equals\"?titles:allNames.filter(name=>!titles.includes(name));};// Filter options based on the filterVariants prop (for quick purchase functionality)\nconst filteredOptions=React.useMemo(()=>{if(!filterVariants||filterVariants.variantGroups===\"all\"){return get(product,\"options\")||[];}if(filterVariants.variantGroups===\"equals\"){return(get(product,\"options\")||[]).filter(opt=>filterVariants.variantTitles?.includes(opt.name));}if(filterVariants.variantGroups===\"doesn't equal\"){return(get(product,\"options\")||[]).filter(opt=>!filterVariants.variantTitles?.includes(opt.name));}return get(product,\"options\")||[];},[product,filterVariants]);// Define environment flags without touching `window` on the server to avoid hydration mismatches\nconst isBrowser=typeof window!==\"undefined\";const isCanvas=!isBrowser?true:!window.shopXtools;const autoSelectRef=useRef(false);// Unique per-instance identifier to avoid cross-talk between multiple selectors\nconst instanceIdRef=useRef(Math.random().toString(36).slice(2));// Track whether we already applied variant from session storage to avoid double-processing\nconst appliedFromStorageRef=useRef(false);// Guard to prevent race conditions while initializing auto-select\nconst isInitializingRef=useRef(false);// Track previous config to detect transitions that should clear caches\nconst prevActionRef=useRef(action);const prevAutoSelectFirstRef=useRef(!!autoSelectFirst);// Token to discard stale async work during initialization\nconst initTokenRef=useRef(0);const hasInitializedRef=useRef(false);const initialScrollPreventedRef=useRef(false)// Prevent initial scroll trigger\n;const[selectedCurrency,setSelectedCurrency]=useState();const[focusedOptionIndex,setFocusedOptionIndex]=useState(-1);const[focusedValueIndex,setFocusedValueIndex]=useState(-1);const containerRef=useRef(null);const[colorHexMap,setColorHexMap]=useState(new Map);useEffect(()=>{if(isInitializingRef.current)return;setSelectedOptions({});autoSelectRef.current=false;},[shopifyProductID]);// Reset guards when filter configuration changes so auto-select can re-run\nuseEffect(()=>{if(isInitializingRef.current)return;setSelectedOptions({});autoSelectRef.current=false;},[filterVariants?.variantGroups,(filterVariants?.variantTitles||[]).join(\"|\")]);// When autoSelectFirst is toggled off, clear any preselection in Canvas and Browser\nuseEffect(()=>{if(!autoSelectFirst){autoSelectRef.current=false;setSelectedOptions({});}},[autoSelectFirst]);const swatchColors=props.colors||[];// Use server-safe defaults during first render; hydrate from `window` after mount\nconst[swatchImages,setSwatchImages]=useState(props.swatchImages||[]);const[colorTitles,setColorTitles]=useState(props.colorTitles||[\"Color\"]);const imageTitles=props.imageTitles||[];const variantImageTitles=props.variantImageTitles||[];// After mount, read from window if available and props did not provide values\nuseEffect(()=>{if(!isBrowser)return;const cfg=window.__FcCheckoutConfigs;if(!props.swatchImages&&Array.isArray(cfg?.variantImageValues)){setSwatchImages(cfg.variantImageValues);}if(!props.colorTitles&&Array.isArray(cfg?.variantColorTitles)){setColorTitles(cfg.variantColorTitles);}},[isBrowser,props.swatchImages,props.colorTitles]);// Standard color fallbacks\nconst standardColorMap=new Map([[\"black\",\"#000000\"],[\"white\",\"#FFFFFF\"],[\"red\",\"#FF0000\"],[\"green\",\"#00FF00\"],[\"blue\",\"#0000FF\"],[\"yellow\",\"#FFFF00\"],[\"purple\",\"#800080\"],[\"orange\",\"#FFA500\"],[\"pink\",\"#FFC0CB\"],[\"brown\",\"#A52A2A\"],[\"gray\",\"#808080\"],[\"grey\",\"#808080\"],[\"navy\",\"#000080\"],[\"teal\",\"#008080\"],[\"maroon\",\"#800000\"],[\"olive\",\"#808000\"],[\"lime\",\"#00FF00\"],[\"aqua\",\"#00FFFF\"],[\"silver\",\"#C0C0C0\"],[\"gold\",\"#FFD700\"],[\"beige\",\"#F5F5DC\"],[\"ivory\",\"#FFFFF0\"],[\"lavender\",\"#E6E6FA\"],[\"mint\",\"#F5FFFA\"],[\"coral\",\"#FF7F50\"],[\"indigo\",\"#4B0082\"],[\"violet\",\"#EE82EE\"],[\"magenta\",\"#FF00FF\"],[\"turquoise\",\"#40E0D0\"],[\"plum\",\"#DDA0DD\"],[\"salmon\",\"#FA8072\"],[\"tan\",\"#D2B48C\"],[\"khaki\",\"#F0E68C\"],[\"azure\",\"#F0FFFF\"],[\"bisque\",\"#FFE4C4\"],[\"chocolate\",\"#D2691E\"],[\"crimson\",\"#DC143C\"],[\"fuchsia\",\"#FF00FF\"],[\"honeydew\",\"#F0FFF0\"],[\"linen\",\"#FAF0E6\"],[\"moccasin\",\"#FFE4B5\"],[\"oldlace\",\"#FDF5E6\"],[\"orchid\",\"#DA70D6\"],[\"papayawhip\",\"#FFEFD5\"],[\"peachpuff\",\"#FFDAB9\"],[\"peru\",\"#CD853F\"],[\"rosybrown\",\"#BC8F8F\"],[\"sandybrown\",\"#F4A460\"],[\"seashell\",\"#FFF5EE\"],[\"sienna\",\"#A0522D\"],[\"skyblue\",\"#87CEEB\"],[\"slateblue\",\"#6A5ACD\"],[\"slategray\",\"#708090\"],[\"slategrey\",\"#708090\"],[\"snow\",\"#FFFAFA\"],[\"springgreen\",\"#00FF7F\"],[\"steelblue\",\"#4682B4\"],[\"thistle\",\"#D8BFD8\"],[\"tomato\",\"#FF6347\"],[\"wheat\",\"#F5DEB3\"],[\"whitesmoke\",\"#F5F5F5\"],[\"yellowgreen\",\"#9ACD32\"]]);useEffect(()=>{const defaultColors=new Map;// First, try to use colors from props if they exist\nif(swatchColors&&swatchColors.length>0){swatchColors.forEach(color=>{if(color.name){// Normalize the color name by trimming and converting to lowercase\nconst normalizedName=color.name.trim().toLowerCase();// Only use standard color as fallback if hex is missing\nconst hex=color.hex||standardColorMap.get(normalizedName);if(hex){defaultColors.set(normalizedName,hex);}}});}else if(typeof window!==\"undefined\"&&window.__FcCheckoutConfigs?.variantColorValues){try{const colors=window.__FcCheckoutConfigs.variantColorValues;if(Array.isArray(colors)){colors.forEach(color=>{if(color.name&&color.hex){defaultColors.set(color.name.toLowerCase(),color.hex);}});}}catch(error){console.error(\"Error parsing color data from window.__FcCheckoutConfigs:\",error);}}setColorHexMap(defaultColors);},[swatchColors,swatchImages,product,colorTitles]);////////////////////////////URL WITH VARIANT PARAMETER HANDLING//////////////////////////////////\n// Helper function to update URL with variant ID (for product pages)\nconst updateUrlWithVariant=useCallback(variantId=>{// console.log(\"updateUrlWithVariant called with:\", {\n//     variantId,\n//     productPage,\n//     windowUndefined: typeof window === \"undefined\",\n//     currentUrl: typeof window !== \"undefined\" ? window.location.href : \"N/A\"\n// })\nif(typeof window!==\"undefined\"&&productPage&&variantId){// Extract just the numeric ID from the full Shopify ID\nconst numericId=variantId.replace(\"gid://shopify/ProductVariant/\",\"\");//console.log(\"Extracted numeric ID:\", numericId)\n// Create new URL with variant parameter\nconst url=new URL(window.location.href);//console.log(\"Current URL before update:\", url.toString())\nurl.searchParams.set(\"variant\",numericId);//console.log(\"New URL with variant:\", url.toString())\n// Update URL without triggering page refresh\nwindow.history.replaceState({},\"\",url.toString());//console.log(\"✅ Successfully updated URL with variant:\", numericId)\nif(typeof window!==\"undefined\"&&product&&shopifyProductID){// First, check for variant ID in URL parameters\nconst urlParams=new URLSearchParams(window.location.search);const variantIdFromUrl=urlParams.get(\"variant\");if(variantIdFromUrl){// Find the variant with this ID\nconst matchingVariant=(get(product,\"variants.edges\")||[]).find(({node})=>node.id.endsWith(variantIdFromUrl)||node.id===`gid://shopify/ProductVariant/${variantIdFromUrl}`);if(matchingVariant){const urlOptions={};matchingVariant.node.selectedOptions.forEach(option=>{urlOptions[option.name]=option.value;});setSelectedOptions(urlOptions);//console.log(\"Link: Set variant from URL parameter:\", urlOptions)\n// console.log(\"Link: matchingVariant\", matchingVariant)\nconst allOptions=get(product,\"options\",[]).map(opt=>opt.name);//console.log(\"Link: allOptions\", allOptions)\nconst allOptionsSelected=allOptions.every(optName=>urlOptions[optName]);// console.log(\n//     \"Link: allOptionsSelected\", allOptionsSelected\n// )\nconst key=`fc_active_variant_${shopifyProductID}`;const savedVariant=sessionStorage.getItem(key);if(!savedVariant){saveVariantToSessionStorage(urlOptions,matchingVariant.node.id,false);//console.log(\"Link: saved variant to sessionStorage from url\", urlOptions)\n}if(allOptionsSelected){// Also dispatch a single event for the active variant\nsetTimeout(()=>{if(__isPurchaseMode(action))return;const activeVariantEvent=new CustomEvent(\"product__active-variant__changed\",{detail:{...matchingVariant.node,productId:`gid://shopify/Product/${shopifyProductID}`,isCompleteVariant:allOptionsSelected}});document.dispatchEvent(activeVariantEvent);// console.log(\n//     \"Link: activeVariantEvent\",\n//     activeVariantEvent.detail\n// )\n},100);}return;// Exit early if we found a URL variant\n}}}}else{// console.log(\"❌ Skipping URL update - conditions not met:\", {\n//     hasWindow: typeof window !== \"undefined\",\n//     productPage,\n//     hasVariantId: !!variantId\n// })\n}},[productPage,product,shopifyProductID]);// Helper function to determine if current page is a product page based on URL\nconst isCurrentPageProductPage=useCallback(()=>{if(typeof window===\"undefined\")return false;try{setTimeout(()=>{const products=window.shopXtools?.products;if(!Array.isArray(products)){return false;}const url=new URL(window.location.href);const pathname=url.pathname;const urlHandle=pathname.split(\"/\").filter(Boolean).pop();if(!urlHandle){return false;}return products.some(({node})=>node.handle===urlHandle);},500);}catch(error){console.error(\"Error determining if current page is product page:\",error);return false;}},[]);// Clean up URL when component mounts on non-product page\nuseEffect(()=>{if(typeof window===\"undefined\"||!window.shopXtools?.products)return;checkAndCleanupUrl();},[]);// Function to clear session storage\nconst clearSessionStorage=useCallback(()=>{if(typeof window===\"undefined\")return;// const isPageProductPage = isCurrentPageProductPage()\n//console.log(\"clearSessionStorage - isPageProductPage\", isPageProductPage)\ntry{if(typeof window===\"undefined\")return;try{for(let i=sessionStorage.length-1;i>=0;i--){const key=sessionStorage.key(i);if(key&&key.startsWith(\"fc_active_variant_\")){sessionStorage.removeItem(key);// console.log(\"Cleared variant from sessionStorage\", key);\n}}}catch(error){console.error(\"Error clearing variant from sessionStorage:\",error);}}catch(error){console.error(\"Error clearing variant from sessionStorage:\",error);}},[shopifyProductID,isCurrentPageProductPage]);// Function to strip variant parameter from URL\nconst stripVariantFromUrl=useCallback(()=>{if(typeof window===\"undefined\"||!selectedOptions)return;try{const url=new URL(window.location.href);const searchParams=url.searchParams;// const isPageProductPage = isCurrentPageProductPage()\n// console.log(\"stripVariantFromUrl - isPageProductPage\", isPageProductPage)\n// Remove variant parameter if it exists\nif(searchParams.has(\"variant\")){searchParams.delete(\"variant\");// Update URL without variant parameter using replaceState\nconst newUrl=url.toString();window.history.replaceState({},\"\",newUrl);// console.log(\"Stripped variant parameter from URL:\", newUrl)\n}else{//console.log(\"Skipping stripping variant from URL - not on product page\", isPageProductPage)\n}}catch(error){console.error(\"Error stripping variant from URL:\",error);}},[shopifyProductID,selectedOptions,isCurrentPageProductPage]);// Function to check and clean up URL if not on valid product page\nconst checkAndCleanupUrl=useCallback(()=>{if(typeof window===\"undefined\"||!window.shopXtools?.products)return;const isValidProductPage=isCurrentPageProductPage();// console.log(\n//     \"isValidProductPage in checkAndCleanupUrl\",\n//     isValidProductPage\n// )\nconst hasVariantParam=new URLSearchParams(window.location.search).has(\"variant\");// console.log(\"has valid param in the url\", hasVariantParam)\nif(isValidProductPage===undefined)return;// if (hasVariantParam && isValidProductPage){\n// }\n// If we have a variant parameter but we're not on a valid product page, clean up\nif(hasVariantParam&&!isValidProductPage){// console.log(\"Cleaning up variant URL - not on valid product page\", isValidProductPage)\nclearSessionStorage();stripVariantFromUrl();setSelectedOptions({});}},[isCurrentPageProductPage,clearSessionStorage,stripVariantFromUrl,selectedOptions]);// Build a namespaced storage key based on product and filter configuration\nconst getVariantStorageKey=useCallback(()=>{const group=filterVariants?.variantGroups||\"all\";const titles=(filterVariants?.variantTitles||[]).join(\"|\")||\"all\";return`fc_active_variant_${shopifyProductID}_${group}__${titles}`;},[shopifyProductID,filterVariants?.variantGroups,filterVariants?.variantTitles]);// Function to save variant selection to session storage\nconst saveVariantToSessionStorage=useCallback((selectedOptions,variantId,isPartial=false)=>{if(typeof window===\"undefined\")return;try{const savedVariantKey=getVariantStorageKey();const variantData={selectedOptions,variantId,timestamp:Date.now(),isPartial};// Write to namespaced key (includes filter config)\nsessionStorage.setItem(savedVariantKey,JSON.stringify(variantData));// Also write to legacy product-only key so other instances with different\n// filter configurations can still restore\nconst legacyKey=`fc_active_variant_${shopifyProductID}`;sessionStorage.setItem(legacyKey,JSON.stringify(variantData));//console.log(\"Saved variant to sessionStorage:\", savedVariantKey, variantData)\n}catch(error){console.error(\"Error saving variant to sessionStorage:\",error);}},[getVariantStorageKey]);// Function to load variant from session storage\nconst loadVariantFromSessionStorage=useCallback(()=>{if(typeof window===\"undefined\")return null;try{const namespacedKey=getVariantStorageKey();let savedData=sessionStorage.getItem(namespacedKey);// Back-compat: fall back to legacy product-only key\nif(!savedData){const legacyKey=`fc_active_variant_${shopifyProductID}`;savedData=sessionStorage.getItem(legacyKey);}// As an additional fallback, search for any saved key for this product regardless\n// of filter configuration and pick the most recent\nif(!savedData){const prefix=`fc_active_variant_${shopifyProductID}_`;let latest=null;for(let i=0;i<sessionStorage.length;i++){const key=sessionStorage.key(i);if(key&&key.startsWith(prefix)){try{const value=sessionStorage.getItem(key);if(!value)continue;const parsed=JSON.parse(value);const ts=parsed?.timestamp||0;if(parsed?.selectedOptions&&(!latest||ts>latest.timestamp)){latest={data:parsed,timestamp:ts};}}catch(_){// ignore malformed entries\n}}}if(latest){savedData=JSON.stringify(latest.data);}}if(savedData){const savedVariantData=JSON.parse(savedData);const timestamp=savedVariantData.timestamp||Date.now();// Only restore if the data is recent (within 24 hours)\nconst isRecent=Date.now()-timestamp<24*60*60*1e3;if(isRecent&&savedVariantData.selectedOptions){// Do not enforce presence of specific option names here; different components\n// may use different filter configurations. We'll filter to product option names\n// later during application.\nreturn savedVariantData;}}}catch(error){console.error(\"Error loading variant from sessionStorage:\",error);}return null;},[shopifyProductID,getVariantStorageKey,filterVariants?.variantGroups,filterVariants?.variantTitles]);// Function to apply variant from session storage to URL (for product pages)\nconst applyVariantFromSessionStorage=useCallback(()=>{if(typeof window===\"undefined\"||!productPage||!product)return;const hasUrlVariant=new URLSearchParams(window.location.search).has(\"variant\");// If the URL already specifies a variant, do NOT apply sessionStorage.\n// The URL must be the source of truth on refresh/navigation.\nif(hasUrlVariant)return false;const savedVariant=loadVariantFromSessionStorage();if(savedVariant?.variantId&&savedVariant?.selectedOptions){// console.log(\"Applying variant from sessionStorage:\", savedVariant)\n// Filter saved options to only those that exist on this product\nconst productOptionNames=(get(product,\"options\",[])||[]).map(opt=>opt.name);const filteredSelectedOptions=Object.fromEntries(Object.entries(savedVariant.selectedOptions).filter(([name])=>productOptionNames.includes(name)));// console.log(\"filteredSelectedOptions\", filteredSelectedOptions)\n// Merge into existing selections so components that auto-selected\n// missing options are not overwritten by storage restore\nsetSelectedOptions(prev=>({...prev||{},...filteredSelectedOptions}));// console.log(\"applyVariantFromSessionStorage - setSelectedOptions\", savedVariant.selectedOptions)\n// Find the matching variant to dispatch events\nconst matchingVariant=(get(product,\"variants.edges\")||[]).find(({node})=>node.id===savedVariant.variantId);if(matchingVariant){// console.log(\"applyVariantFromSessionStorage - matchingVariant\", matchingVariant)\nif(filterVariants?.variantGroups===\"all\"&&autoSelectFirst){const allOptions=get(product,\"options\",[]).map(opt=>opt.name);const options=matchingVariant.node.selectedOptions;const allOptionsSelected=allOptions.every(optName=>options.some(opt=>opt.name===optName&&!!opt.value));if(allOptionsSelected){// console.log(\"updating url with an active variant\", matchingVariant.node)\nupdateUrlWithVariant(matchingVariant.node.id);saveVariantToSessionStorage(matchingVariant.node.selectedOptions,matchingVariant.node.id,false);}}// If this instance has AutoSelectFirst and the group has missing selections,\n// proactively fill them from the matching variant or the first available variant\nconst groupOptionNames=getIncludedOptionNames();const missingInGroup=groupOptionNames.filter(name=>!filteredSelectedOptions[name]);let mergedSelectedOptions={...filteredSelectedOptions};// console.log(\"mergedSelectedOptions\", mergedSelectedOptions)\n// Only backfill missing selections from storage when a URL variant is present.\n// Without a URL variant, keep the restore strictly partial.\nif(hasUrlVariant&&autoSelectFirst&&missingInGroup.length>0){// console.log(\"missingInGroup with autoSelectFirst\", missingInGroup)\nlet chosenSource=matchingVariant.node?.selectedOptions||[];if(!chosenSource.length){const firstAvailable=(get(product,\"variants.edges\",[])||[]).find(({node})=>node.availableForSale);chosenSource=firstAvailable?.node?.selectedOptions||[];}const filled={};chosenSource.forEach(opt=>{if(missingInGroup.includes(opt.name)){filled[opt.name]=opt.value;}});if(Object.keys(filled).length>0){mergedSelectedOptions={...filteredSelectedOptions,...filled};setSelectedOptions(prev=>({...prev||{},...mergedSelectedOptions}));// Dispatch events for newly filled options to sync other components\nsetTimeout(()=>{Object.entries(filled).forEach(([optionName,value])=>{const event=new CustomEvent(\"variant_option_selected\",{detail:{optionName,value,allSelectedOptions:mergedSelectedOptions,isCompleteVariant:false,isPurchaseAction:false,productId:`gid://shopify/Product/${shopifyProductID}`}});document.dispatchEvent(event);});// Dispatch communication event for other variant selectors to coordinate\nif(filterVariants?.variantGroups!==\"all\"){const communicationEvent=new CustomEvent(\"__variant_option_selected\",{detail:{productId:`gid://shopify/Product/${shopifyProductID}`,optionName:Object.keys(filled)[0]||\"\",value:Object.values(filled)[0]||\"\",allSelectedOptions:mergedSelectedOptions,allOptionsSelected:false,isPurchaseAction:false,autoSelectFirst:autoSelectFirst,senderPriority:getIncludedOptionNames()[0]||\"\",instanceId:instanceIdRef.current}});window.dispatchEvent(communicationEvent);}},0);}}const allOptions=get(product,\"options\",[]).map(opt=>opt.name);const allOptionsSelected=allOptions.every(optName=>mergedSelectedOptions[optName]);// console.log(\"allOptionsSelected\", allOptionsSelected)\nsetTimeout(()=>{// Dispatch events for each selected option\nconst isCompleteEffective=hasUrlVariant&&allOptionsSelected;Object.entries(mergedSelectedOptions).forEach(([optionName,value])=>{const event=new CustomEvent(\"variant_option_selected\",{detail:{optionName,value,allSelectedOptions:mergedSelectedOptions,isCompleteVariant:isCompleteEffective,isPurchaseAction:false,productId:`gid://shopify/Product/${shopifyProductID}`}});document.dispatchEvent(event);// console.log(\"isCompleteEffective\", isCompleteEffective)\n});// Dispatch communication event for other variant selectors to coordinate\nif(filterVariants?.variantGroups!==\"all\"){const communicationEvent=new CustomEvent(\"__variant_option_selected\",{detail:{productId:`gid://shopify/Product/${shopifyProductID}`,optionName:Object.keys(mergedSelectedOptions)[0]||\"\",value:Object.values(mergedSelectedOptions)[0]||\"\",allSelectedOptions:mergedSelectedOptions,allOptionsSelected:allOptionsSelected,isPurchaseAction:false,autoSelectFirst:autoSelectFirst,senderPriority:getIncludedOptionNames()[0]||\"\",instanceId:instanceIdRef.current}});window.dispatchEvent(communicationEvent);// console.log(\"communicationEvent\", communicationEvent)\n}},100);// Only treat restore as authoritative when a URL variant is present.\nif(hasUrlVariant&&allOptionsSelected){// console.log(\"applyVariantFromSessionStorage - updateUrlWithVariant\", savedVariant.variantId)\nupdateUrlWithVariant(savedVariant.variantId);}setTimeout(()=>{if(__isPurchaseMode(action))return;if(!hasUrlVariant)return;const activeVariantEvent=new CustomEvent(\"product__active-variant__changed\",{detail:{...matchingVariant.node,productId:`gid://shopify/Product/${shopifyProductID}`,isCompleteVariant:allOptionsSelected}});document.dispatchEvent(activeVariantEvent);// console.log(\"Applied variant from sessionStorage - dispatched event:\", activeVariantEvent.detail)\n},100);}else if(autoSelectFirst){// console.log(\"applyVariantFromSessionStorage - autoSelectFirst\")\n// No matching variant in this product, but we have partial selections\n// If this component's group has missing selections, fill them from first available variant\nconst productOptionNames=(get(product,\"options\",[])||[]).map(opt=>opt.name);const groupOptionNames=getIncludedOptionNames();const missingInGroup=groupOptionNames.filter(name=>!filteredSelectedOptions[name]);if(missingInGroup.length>0){const firstAvailable=(get(product,\"variants.edges\",[])||[]).find(({node})=>node.availableForSale);const source=firstAvailable?.node?.selectedOptions||[];const filled={};source.forEach(opt=>{if(missingInGroup.includes(opt.name)){filled[opt.name]=opt.value;}});if(Object.keys(filled).length>0){const mergedSelectedOptions={...filteredSelectedOptions,...filled};setSelectedOptions(prev=>({...prev||{},...mergedSelectedOptions}));setTimeout(()=>{Object.entries(filled).forEach(([optionName,value])=>{const event=new CustomEvent(\"variant_option_selected\",{detail:{optionName,value,allSelectedOptions:mergedSelectedOptions,isCompleteVariant:false,isPurchaseAction:false,productId:`gid://shopify/Product/${shopifyProductID}`}});document.dispatchEvent(event);});// Dispatch communication event for other variant selectors to coordinate\nif(filterVariants?.variantGroups!==\"all\"){const communicationEvent=new CustomEvent(\"__variant_option_selected\",{detail:{productId:`gid://shopify/Product/${shopifyProductID}`,optionName:Object.keys(filled)[0]||\"\",value:Object.values(filled)[0]||\"\",allSelectedOptions:mergedSelectedOptions,allOptionsSelected:false,isPurchaseAction:false,autoSelectFirst:autoSelectFirst,senderPriority:getIncludedOptionNames()[0]||\"\",instanceId:instanceIdRef.current}});window.dispatchEvent(communicationEvent);}},0);}}}return true;}return false;},[productPage,loadVariantFromSessionStorage,updateUrlWithVariant,product,shopifyProductID]);const restoreVariantFromUrl=useCallback(()=>{// console.log(\"restoreVariantFromUrl - restoring variant from URL\")\nconst url=new URL(window.location.href);const pathname=url.pathname;// Extract potential product handle from URL pathname\nconst urlHandle=pathname.split(\"/\").filter(Boolean).pop();// console.log(\"restoreVariantFromUrl - urlHandle\", urlHandle)\nif(window.shopXtools?.products&&Array.isArray(window.shopXtools.products)&&urlHandle){const matchingProduct=window.shopXtools.products.find(({node:product})=>product.handle===urlHandle);const matchingProductId=matchingProduct?.node.id.split(\"gid://shopify/Product/\")[1];// console.log(\"matchingProductId\", matchingProductId)\n// console.log(\n//     \"restoreVariantFromUrl - matchingProduct\",\n//     matchingProduct\n// )\nif(!matchingProduct){// console.log(\n//     \"restoreVariantFromUrl - no matching product found for the shopifyProductID\"\n// )\nreturn;}const urlParams=new URLSearchParams(window.location.search);const variantIdFromUrl=urlParams.get(\"variant\");if(variantIdFromUrl){// Find the variant with this ID\nconst matchingVariant=(get(matchingProduct.node,\"variants.edges\")||[]).find(({node})=>node.id.endsWith(variantIdFromUrl)||node.id===`gid://shopify/ProductVariant/${variantIdFromUrl}`);// console.log(\"restoreVariantFromUrl - matchingVariant\", matchingVariant)\nif(!matchingVariant){// console.log(\n//     \"restoreVariantFromUrl - no matching variant found for the product\"\n// )\nreturn;}if(matchingVariant){// Build selected options from variant\nconst matchingVariantId=matchingVariant.node.id.split(\"gid://shopify/ProductVariant/\")[1];const urlOptions={};matchingVariant.node.selectedOptions.forEach(option=>{urlOptions[option.name]=option.value;});//console.log(\"restoreVariantFromUrl - urlOptions\", urlOptions)\n// Set selected options in state\nsetSelectedOptions(urlOptions);// Optionally, dispatch events here if needed\nconst allOptions=get(matchingProduct,\"options\",[]).map(opt=>opt.name);// console.log(\"Restore URL: allOptions\", allOptions)\nconst allOptionsSelected=allOptions.every(optName=>urlOptions[optName]);// console.log(\n//     \"Restore URL: allOptionsSelected\", allOptionsSelected\n// )\nif(allOptionsSelected){// Save to sessionStorage if not already present\n// saveVariantToSessionStorage(\n//     urlOptions,\n//     matchingVariant.node.id,\n//     false\n// )\nconst savedVariantKey=`fc_active_variant_${matchingProductId}`;if(sessionStorage.getItem(savedVariantKey))return;const variantData={urlOptions,matchingVariantId,timestamp:Date.now(),isPartial:false};sessionStorage.setItem(savedVariantKey,JSON.stringify(variantData));//console.log(\"Saved variant to sessionStorage:\", savedVariantKey, variantData)\n//console.log(\"Restore URL:Saved variant to sessionStorage from URL\", urlOptions)\n// Also dispatch a single event for the active variant\nsetTimeout(()=>{if(__isPurchaseMode(action))return;const activeVariantEvent=new CustomEvent(\"product__active-variant__changed\",{detail:{...matchingVariant.node,productId:`gid://shopify/Product/${shopifyProductID}`,isCompleteVariant:allOptionsSelected}});document.dispatchEvent(activeVariantEvent);// console.log(\n//     \"Restore URL: activeVariantEvent\",\n//     activeVariantEvent.detail\n// )\n},100);}}}}},[product]);// Handle page leave cleanup\n// Refs to access current values in stable handler\nconst productPageRef=useRef(productPage);const productRef=useRef(product);const restoreVariantFromUrlRef=useRef(restoreVariantFromUrl);// Update refs when values change\nuseEffect(()=>{productPageRef.current=productPage;productRef.current=product;restoreVariantFromUrlRef.current=restoreVariantFromUrl;},[productPage,product,restoreVariantFromUrl]);// Comprehensive navigation handler - handles ALL scenarios\nconst handlePopState=useCallback(event=>{const urlParams=new URLSearchParams(window.location.search);const hasVariantInUrl=urlParams.has(\"variant\");const currentPath=window.location.pathname;const urlHandle=currentPath.split(\"/\").filter(Boolean).pop();// Determine if current URL is a product page\nconst isUrlProductPage=window.shopXtools?.products&&Array.isArray(window.shopXtools.products)?window.shopXtools.products.some(({node})=>node.handle===urlHandle):false;// Scenario 1: We're on a product page component AND URL is a product page AND has variant\nif(productPageRef.current&&isUrlProductPage&&hasVariantInUrl){// console.log(\"Scenario 1: We're on a product page component AND URL is a product page AND has variant\")\nevent.stopImmediatePropagation();if(productRef.current){restoreVariantFromUrlRef.current();}return;}// WORKS: Scenario 2: We're on a product page component BUT URL is NOT a product page (forward navigation)\nif(productPageRef.current&&!isUrlProductPage){// console.log(\"Scenario 2: We're on a product page component BUT URL is NOT a product page (forward navigation)\")\nevent.stopImmediatePropagation();window.location.reload();return;}// WORKS: Scenario 3: We're NOT on a product page component BUT URL has variant (back navigation)\nif(!productPageRef.current&&hasVariantInUrl){// console.log(\"Scenario 3: We're NOT on a product page component BUT URL has variant (back navigation)\")\nevent.stopImmediatePropagation();window.location.reload();return;}// WORKS: Scenario 4: We're NOT on a product page component AND URL is a product page but no variant\n// This is navigation TO a product page - let Framer handle it naturally\n// Stop propagation to prevent CatalogDisplay from interfering\nif(!productPageRef.current&&isUrlProductPage&&!hasVariantInUrl){// Normal navigation - stop propagation so CatalogDisplay doesn't interfere\n// console.log(\"Normal navigation - stopping propagation: Scenario 4\")\nevent.stopImmediatePropagation();return;}// Scenario 5: We're on a product page component AND URL is a product page but no variant\n// This could be initial load or variant cleared - let Framer handle\nif(productPageRef.current&&isUrlProductPage&&!hasVariantInUrl){// Normal navigation - do nothing, let Framer handle\n// console.log(\"Normal navigation - do nothing, let Framer handle: Scenario 5\")\nevent.stopImmediatePropagation();return;}},[shopifyProductID]);// Priority navigation handling - takes precedence over global handlers\nuseEffect(()=>{if(typeof window===\"undefined\")return;// Add with capture=true to run before other handlers\nwindow.addEventListener(\"popstate\",handlePopState,true);return()=>{window.removeEventListener(\"popstate\",handlePopState,true);};},[handlePopState,shopifyProductID]);// Apply variant from session storage when component mounts on product page\nuseEffect(()=>{// console.log(\"UseEffect: productPage, product\", productPage, product)\nif(productPage&&!isCanvas&&typeof window!==\"undefined\"&&product){// Small delay to ensure URL is stable and product data is loaded\nconst timer=setTimeout(()=>{const isAppliedFromSessionStorage=applyVariantFromSessionStorage();appliedFromStorageRef.current=!!isAppliedFromSessionStorage;// console.log(\"Applied and saved variant from sessionStorage\", isAppliedFromSessionStorage)\nif(isAppliedFromSessionStorage)return;if(!isAppliedFromSessionStorage){// console.log(\"No variant found in sessionStorage, restoring from URL\")\n// 1. Check for variant in URL\nconst urlParams=new URLSearchParams(window.location.search);const variantIdFromUrl=urlParams.get(\"variant\");if(variantIdFromUrl){// Find the variant with this ID\nconst matchingVariant=(get(product,\"variants.edges\")||[]).find(({node})=>node.id.endsWith(variantIdFromUrl)||node.id===`gid://shopify/ProductVariant/${variantIdFromUrl}`);if(matchingVariant){// Build selected options from variant\nconst urlOptions={};matchingVariant.node.selectedOptions.forEach(option=>{urlOptions[option.name]=option.value;});// Set selected options in state\nsetSelectedOptions(urlOptions);// Optionally, dispatch events here if needed\nconst allOptions=get(product,\"options\",[]).map(opt=>opt.name);// console.log(\"Restore URL: allOptions\", allOptions)\nconst allOptionsSelected=allOptions.every(optName=>urlOptions[optName]);// console.log(\n//     \"Restore URL: allOptionsSelected\", allOptionsSelected\n// )\nif(allOptionsSelected){// Save to sessionStorage if not already present\nsaveVariantToSessionStorage(urlOptions,matchingVariant.node.id,false);//console.log(\"Restore URL:Saved variant to sessionStorage from URL\", urlOptions)\n// Also dispatch a single event for the active variant\nsetTimeout(()=>{const activeVariantEvent=new CustomEvent(\"product__active-variant__changed\",{detail:{...matchingVariant.node,productId:`gid://shopify/Product/${shopifyProductID}`,isCompleteVariant:allOptionsSelected}});document.dispatchEvent(activeVariantEvent);// console.log(\n//     \"Restore URL: activeVariantEvent\",\n//     activeVariantEvent.detail\n// )\n},100);}}}}},100);return()=>clearTimeout(timer);}},[productPage,applyVariantFromSessionStorage,product,shopifyProductID]);// Add global styles for hover effects and accessibility\nuseEffect(()=>{// Create style element if it doesn't exist\nlet styleEl=document.getElementById(\"fc-product-variants-styles\");if(!styleEl){styleEl=document.createElement(\"style\");styleEl.id=\"fc-product-variants-styles\";document.head.appendChild(styleEl);}styleEl.innerHTML=`\n            /* Base z-index for all containers */\n            .variant-button-container, .variant-dropdown-container {\n                z-index: 0;\n                position: relative;\n            }\n            \n            /* Increase z-index on hover */\n            .variant-button-container:hover, .variant-dropdown-container:hover {\n                z-index: 2 !important;\n            }\n            \n            /* Ensure dropdown inner elements inherit hover state */\n            .variant-dropdown-container:hover .dropdown-inner {\n                z-index: 2 !important;\n                position: relative;\n            }\n            \n            /* Ensure dropdown select elements have proper z-index */\n            .dropdown-inner {\n                position: relative;\n                z-index: 0;\n            }\n            \n            /* Force margin-right for horizontal layout */\n            .variant-dropdown-container[data-horizontal=\"true\"]:not([data-last=\"true\"]) {\n                margin-right: -1px !important;\n            }\n            \n            /* Direct class for horizontal edge-to-edge */\n            .horizontal-edge-to-edge {\n                margin-right: -1px !important;\n            }\n            \n            /* Focus styles for accessibility */\n            .variant-button-container button:focus-visible,\n            .dropdown-inner:focus-visible {\n                outline: 2px solid #0078D4 !important;\n                outline-offset: 2px !important;\n            }\n            \n            /* High contrast mode support */\n            @media (forced-colors: active) {\n                .variant-button-container button:focus-visible,\n                .dropdown-inner:focus-visible {\n                    outline: 2px solid CanvasText !important;\n                }\n            }\n\n            /* Swatch styles */\n            .variant-swatch-container {\n                position: relative;\n            }\n            \n            .variant-swatch-container:hover {\n                z-index: 10 !important;\n            }\n            \n            .variant-swatch-container:hover .swatch-tooltip {\n                opacity: 1;\n                visibility: visible;\n            }\n            \n            .variant-swatch-container button:focus-visible {\n                outline: 2px solid #0078D4 !important;\n                outline-offset: 2px !important;\n            }\n            \n            /* High contrast mode support */\n            @media (forced-colors: active) {\n                .variant-swatch-container button:focus-visible {\n                    outline: 2px solid CanvasText !important;\n                }\n            }\n        `;},[]);// Force autoSelectFirst to false if action is purchase\nif(__isPurchaseMode(action)){autoSelectFirst=false;}// Dispatch the autoSelectFirst flag on load (scoped with product GID)\nuseEffect(()=>{if(isCanvas)return;const productGid=`gid://shopify/Product/${shopifyProductID}`;const timeoutId=setTimeout(()=>{const hasUrlVariant=typeof window!==\"undefined\"&&new URLSearchParams(window.location.search).has(\"variant\");// Force autoSelectFirst to false if action is purchase\nif(action===\"Add to Cart\"||action===\"Buy Now\"){const autoSelectEvent=new CustomEvent(\"auto_select_first_flag\",{detail:{autoSelectFirst:false,shopifyProductID:productGid,instanceId:instanceIdRef.current}});document.dispatchEvent(autoSelectEvent);//console.log(\"Purchase: dispatching autoSelectFirst as\", { autoSelectFirst: false })\n}else{// On PDP without a URL variant, always broadcast false to prevent eager full selection\nconst effectiveAuto=productPage&&!hasUrlVariant?false:autoSelectFirst;const autoSelectEvent=new CustomEvent(\"auto_select_first_flag\",{detail:{autoSelectFirst:effectiveAuto,shopifyProductID:productGid,instanceId:instanceIdRef.current}});document.dispatchEvent(autoSelectEvent);// console.log(\"Dispatching autoSelectFirst as\", { autoSelectFirst })\n}},100)// Adjust the delay as needed\n;return()=>clearTimeout(timeoutId)// Cleanup timeout on unmount\n;},[autoSelectFirst,action,isCanvas,shopifyProductID]);useEffect(()=>{// Reset autoSelectRef when product changes\n// autoSelectRef.current = false\n// setSelectedOptions({})\n// Create style element if it doesn't exist\nlet styleEl=document.getElementById(\"fc-product-variants-styles\");if(!styleEl){styleEl=document.createElement(\"style\");styleEl.id=\"fc-product-variants-styles\";document.head.appendChild(styleEl);}styleEl.innerHTML=`\n            /* Base z-index for all containers */\n            .variant-dropdown-container {\n                position: relative;\n                z-index: 1;\n            }\n\n            /* Increase z-index when focused */\n            .variant-dropdown-container:focus-within {\n                z-index: 10;\n            }\n\n            /* Special styling for edge-to-edge layout */\n            .horizontal-edge-to-edge + .horizontal-edge-to-edge .variant-dropdown {\n                border-left: none !important;\n            }\n\n            .fc-dropdown-focus {\n                outline: 2px solid CanvasText !important;\n                outline-offset: 2px !important;\n            }\n\n            .fc-dropdown-list-item:focus {\n                outline: 2px solid CanvasText !important;\n                outline-offset: -2px !important;\n            }\n        `;// If we're in canvas mode and have variants prop, use that data\nif(isCanvas&&variants){const{options,variants:parsedVariants,productId}=parseOptionsAndVariants(variants);// Create mock product with the parsed data (for canvas preview only)\nconst mockProduct={id:productId||\"mock-product\",options:options.map(opt=>({name:opt.name,values:opt.values})),variants:{edges:parsedVariants.map((variant,index)=>{// Check if preview mode is enabled and this is the second variant of any option group\nlet availableForSale=true;if(props.buttonConfigs?.outOfStock?.preview){// For each option, check if this variant has the second value\noptions.forEach((opt,optIndex)=>{if(opt.values.length>1&&variant.combination[optIndex]===opt.values[1]){availableForSale=false;}});}return{node:{id:variant.id.startsWith(\"gid://\")?variant.id:`gid://shopify/ProductVariant/${variant.id}`,availableForSale:availableForSale,quantityAvailable:availableForSale?50:0,selectedOptions:options.map((opt,index)=>({name:opt.name,value:variant.combination[index]})),price:{amount:\"19.99\",currencyCode:\"USD\"}}};})},images:{edges:Array(4).fill(0).map((_,i)=>({node:{id:`image-${i+1}`}}))},priceRange:{minVariantPrice:{amount:\"19.99\",currencyCode:\"USD\"}}};setProduct(mockProduct);return;}// If we're in canvas mode but no variants prop, use default mock data\nif(isCanvas){const mockProduct={id:\"mock-product\",variants:{edges:[// XS variants\n{node:{id:\"mock-variant-1\",availableForSale:selectOutOfStock||true,quantityAvailable:50,selectedOptions:[{name:\"Size\",value:\"XS\"},{name:\"Color\",value:\"Green\"}],price:{amount:\"19.99\",currencyCode:\"USD\"}}},{node:{id:\"mock-variant-2\",availableForSale:selectOutOfStock||!props.buttonConfigs?.outOfStock?.preview,selectedOptions:[{name:\"Size\",value:\"XS\"},{name:\"Color\",value:\"Blue\"}],price:{amount:\"19.99\",currencyCode:\"USD\"}}},{node:{id:\"mock-variant-3\",availableForSale:selectOutOfStock||true,selectedOptions:[{name:\"Size\",value:\"XS\"},{name:\"Color\",value:\"Pink\"}],price:{amount:\"19.99\",currencyCode:\"USD\"}}},{node:{id:\"mock-variant-4\",availableForSale:selectOutOfStock||true,selectedOptions:[{name:\"Size\",value:\"XS\"},{name:\"Color\",value:\"Black\"}],price:{amount:\"19.99\",currencyCode:\"USD\"}}},// S variants (disabled when preview ON - S is 2nd size)\n{node:{id:\"mock-variant-5\",availableForSale:selectOutOfStock||!props.buttonConfigs?.outOfStock?.preview,selectedOptions:[{name:\"Size\",value:\"S\"},{name:\"Color\",value:\"Green\"}],price:{amount:\"19.99\",currencyCode:\"USD\"}}},{node:{id:\"mock-variant-6\",availableForSale:selectOutOfStock||!props.buttonConfigs?.outOfStock?.preview,selectedOptions:[{name:\"Size\",value:\"S\"},{name:\"Color\",value:\"Blue\"}],price:{amount:\"19.99\",currencyCode:\"USD\"}}},{node:{id:\"mock-variant-7\",availableForSale:selectOutOfStock||!props.buttonConfigs?.outOfStock?.preview,selectedOptions:[{name:\"Size\",value:\"S\"},{name:\"Color\",value:\"Pink\"}],price:{amount:\"19.99\",currencyCode:\"USD\"}}},{node:{id:\"mock-variant-8\",availableForSale:selectOutOfStock||!props.buttonConfigs?.outOfStock?.preview,selectedOptions:[{name:\"Size\",value:\"S\"},{name:\"Color\",value:\"Black\"}],price:{amount:\"19.99\",currencyCode:\"USD\"}}},// M variants\n{node:{id:\"mock-variant-9\",availableForSale:selectOutOfStock||true,selectedOptions:[{name:\"Size\",value:\"M\"},{name:\"Color\",value:\"Green\"}],price:{amount:\"19.99\",currencyCode:\"USD\"}}},{node:{id:\"mock-variant-10\",availableForSale:selectOutOfStock||!props.buttonConfigs?.outOfStock?.preview,selectedOptions:[{name:\"Size\",value:\"M\"},{name:\"Color\",value:\"Blue\"}],price:{amount:\"19.99\",currencyCode:\"USD\"}}},{node:{id:\"mock-variant-11\",availableForSale:selectOutOfStock||true,selectedOptions:[{name:\"Size\",value:\"M\"},{name:\"Color\",value:\"Pink\"}],price:{amount:\"19.99\",currencyCode:\"USD\"}}},{node:{id:\"mock-variant-12\",availableForSale:selectOutOfStock||true,selectedOptions:[{name:\"Size\",value:\"M\"},{name:\"Color\",value:\"Black\"}],price:{amount:\"19.99\",currencyCode:\"USD\"}}},// L variants\n{node:{id:\"mock-variant-13\",availableForSale:selectOutOfStock||true,selectedOptions:[{name:\"Size\",value:\"L\"},{name:\"Color\",value:\"Green\"}],price:{amount:\"19.99\",currencyCode:\"USD\"}}},{node:{id:\"mock-variant-14\",availableForSale:selectOutOfStock||!props.buttonConfigs?.outOfStock?.preview,selectedOptions:[{name:\"Size\",value:\"L\"},{name:\"Color\",value:\"Blue\"}],price:{amount:\"19.99\",currencyCode:\"USD\"}}},{node:{id:\"mock-variant-15\",availableForSale:selectOutOfStock||true,selectedOptions:[{name:\"Size\",value:\"L\"},{name:\"Color\",value:\"Pink\"}],price:{amount:\"19.99\",currencyCode:\"USD\"}}},{node:{id:\"mock-variant-16\",availableForSale:selectOutOfStock||true,selectedOptions:[{name:\"Size\",value:\"L\"},{name:\"Color\",value:\"Black\"}],price:{amount:\"19.99\",currencyCode:\"USD\"}}},// XL variants\n{node:{id:\"mock-variant-17\",availableForSale:selectOutOfStock||true,selectedOptions:[{name:\"Size\",value:\"XL\"},{name:\"Color\",value:\"Green\"}],price:{amount:\"19.99\",currencyCode:\"USD\"}}},{node:{id:\"mock-variant-18\",availableForSale:selectOutOfStock||!props.buttonConfigs?.outOfStock?.preview,selectedOptions:[{name:\"Size\",value:\"XL\"},{name:\"Color\",value:\"Blue\"}],price:{amount:\"19.99\",currencyCode:\"USD\"}}},{node:{id:\"mock-variant-19\",availableForSale:selectOutOfStock||true,selectedOptions:[{name:\"Size\",value:\"XL\"},{name:\"Color\",value:\"Pink\"}],price:{amount:\"19.99\",currencyCode:\"USD\"}}},{node:{id:\"mock-variant-20\",availableForSale:selectOutOfStock||true,selectedOptions:[{name:\"Size\",value:\"XL\"},{name:\"Color\",value:\"Black\"}],price:{amount:\"19.99\",currencyCode:\"USD\"}}}]},options:[{name:\"Size\",values:[\"XS\",\"S\",\"M\",\"L\",\"XL\"]},{name:\"Color\",values:[\"Green\",\"Blue\",\"Pink\",\"Black\"]}],images:{edges:Array(4).fill(0).map((_,i)=>({node:{id:`image-${i+1}`}}))},priceRange:{minVariantPrice:{amount:\"19.99\",currencyCode:\"USD\"}}};setProduct(mockProduct);return;}// If we're not in canvas mode, use the standard product data loading\nif(!isCanvas){if(window[\"shopXtools\"]&&Array.isArray(window[\"shopXtools\"].products)){const _matchingProduct=window[\"shopXtools\"].products.find(({node:_product})=>_product.id===`gid://shopify/Product/${shopifyProductID}`);if(_matchingProduct){setProduct(_matchingProduct.node);}}// ALWAYS set up event listener to receive updates (including priority products)\nconst handleProductsReady=e=>{// console.log('Variant Selector received the product', e);\nif(Array.isArray(e.detail.products)){const _matchingProduct=e.detail.products.find(({node:_product})=>_product.id===`gid://shopify/Product/${shopifyProductID}`);if(_matchingProduct){setProduct(_matchingProduct.node);}}};document.addEventListener(\"data__products-ready\",handleProductsReady);return()=>{document.removeEventListener(\"data__products-ready\",handleProductsReady);};}document.addEventListener(\"product__variants__validate\",()=>{setShouldValidate(true);});return()=>{document.removeEventListener(\"product__variants__validate\",()=>setShouldValidate(true));};},[shopifyProductID,variants,images.imageChange,props.variantImageIds,props.buttonConfigs?.outOfStock?.preview]);// Handle URL variants when product data becomes available\nuseEffect(()=>{if(!productPage||!product||isCanvas||__isPurchaseMode(action))return;const urlParams=new URLSearchParams(window.location.search);const variantIdFromUrl=urlParams.get(\"variant\");if(variantIdFromUrl){// Debug logging to help troubleshoot URL variant processing\n// console.log(`[FC_ProductVariants] Processing URL variant: ${variantIdFromUrl}`, {\n//     productId: shopifyProductID,\n//     productOptions: get(product, \"options\", []).map(opt => opt.name),\n//     variantCount: get(product, \"variants.edges\", []).length,\n//     filterConfig: filterVariants\n// })\n// Find the variant with this ID - use exact matching to avoid partial ID conflicts\nconst matchingVariant=get(product,\"variants.edges\",[]).find(({node})=>{// Try exact full ID match first\nif(node.id===`gid://shopify/ProductVariant/${variantIdFromUrl}`){return true;}// Fallback: extract just the numeric ID from the full Shopify ID and compare\nconst nodeIdNumber=node.id.split(\"/\").pop();return nodeIdNumber===variantIdFromUrl;});// Debug logging to help troubleshoot variant matching\nif(!matchingVariant){console.warn(`[FC_ProductVariants] URL variant ${variantIdFromUrl} not found in product variants:`,{urlVariantId:variantIdFromUrl,availableVariantIds:get(product,\"variants.edges\",[]).map(({node})=>({fullId:node.id,numericId:node.id.split(\"/\").pop()})),productId:shopifyProductID});}if(matchingVariant){const urlOptions={};matchingVariant.node.selectedOptions.forEach(option=>{urlOptions[option.name]=option.value;});setSelectedOptions(urlOptions);// Set autoSelectRef if auto-select is enabled\nif(autoSelectFirst){autoSelectRef.current=true;}// Dispatch events for the URL variant\nconst allOptions=get(product,\"options\",[]).map(opt=>opt.name);const allOptionsSelected=allOptions.every(optName=>urlOptions[optName]);setTimeout(()=>{// Dispatch events for each selected option\nObject.entries(urlOptions).forEach(([optionName,value])=>{const event=new CustomEvent(\"variant_option_selected\",{detail:{optionName,value,allSelectedOptions:urlOptions,isCompleteVariant:allOptionsSelected,isPurchaseAction:false,productId:`gid://shopify/Product/${shopifyProductID}`}});document.dispatchEvent(event);});// Dispatch communication event for other variant selectors to coordinate\nif(filterVariants?.variantGroups!==\"all\"){const communicationEvent=new CustomEvent(\"__variant_option_selected\",{detail:{productId:`gid://shopify/Product/${shopifyProductID}`,optionName:Object.keys(urlOptions)[0]||\"\",value:Object.values(urlOptions)[0]||\"\",allSelectedOptions:urlOptions,isPurchaseAction:false,autoSelectFirst:autoSelectFirst,senderPriority:getIncludedOptionNames()[0]||\"\",instanceId:instanceIdRef.current}});window.dispatchEvent(communicationEvent);}// Dispatch active variant event if complete - RESPECT the URL variant even if out of stock\nif(allOptionsSelected){const activeVariantEvent=new CustomEvent(\"product__active-variant__changed\",{detail:{...matchingVariant.node,productId:`gid://shopify/Product/${shopifyProductID}`,isCompleteVariant:allOptionsSelected}});document.dispatchEvent(activeVariantEvent);// console.log(\"active variant event sent\", activeVariantEvent)\n}},100);}}},[product,productPage,shopifyProductID,isCanvas,action,autoSelectFirst,filterVariants?.variantGroups,filterVariants?.variantTitles]);// Retry mechanism for URL variants to handle race conditions\nuseEffect(()=>{if(!productPage||isCanvas||__isPurchaseMode(action))return;const urlParams=new URLSearchParams(window.location.search);const variantIdFromUrl=urlParams.get(\"variant\");if(variantIdFromUrl&&!product){// If we have a URL variant but no product data yet, retry after a delay\nconst retryTimer=setTimeout(()=>{if(window.location.search.includes(`variant=${variantIdFromUrl}`)){// Force a re-render to trigger the URL variant effect again\nwindow.dispatchEvent(new Event(\"resize\"));}},500);return()=>clearTimeout(retryTimer);}},[product,productPage,shopifyProductID,isCanvas,action]);// On PDP without a URL variant, clear only full selections from storage; keep partials so PLP→PDP can persist\nuseEffect(()=>{if(!productPage)return;if(__isPurchaseMode(action))return;if(typeof window===\"undefined\")return;const urlParams=new URLSearchParams(window.location.search);if(!urlParams.get(\"variant\")){try{const prefixLegacy=`fc_active_variant_${shopifyProductID}`;const prefixScoped=`fc_active_variant_${shopifyProductID}_`;for(let i=sessionStorage.length-1;i>=0;i--){const k=sessionStorage.key(i);if(!k)continue;if(k===prefixLegacy||k.startsWith(prefixScoped)){try{const parsed=JSON.parse(sessionStorage.getItem(k)||\"null\");// Remove only if it represents a full selection\nif(parsed&&parsed.isPartial===false){sessionStorage.removeItem(k);}}catch{// If unreadable, remove to be safe\nsessionStorage.removeItem(k);}}}// Do not clear local selection here; allow hybrid restore of partials\n}catch{}}},[productPage,action,shopifyProductID]);// useEffect to listen for variant selection via selected images\nuseEffect(()=>{if(!product)return;// Listen for image variant selection events\nconst handleImageVariantSelected=e=>{if(!e.detail)return;const variantId=e.detail.variant_id;if(!variantId)return;// console.log(\"Mapping variant to image\", e.detail)\n// Find the variant with this ID\nconst variant=(get(product,\"variants.edges\")||[]).find(({node})=>node.id===variantId);if(variant){// console.log(\"variant\", variant)\n// Determine which option this image should control (prefer configured image titles, then color titles, else first option)\nconst imageOptionNames=[...props.variantImageTitles||[],...props.imageTitles||[],...props.colorTitles||[\"Color\",\"Colour\"]].map(s=>String(s).toLowerCase().trim());// console.log(\"imageOptionNames\", imageOptionNames)\nconst targetOpt=(variant.node.selectedOptions||[]).find(opt=>imageOptionNames.includes(String(opt?.name||\"\").toLowerCase().trim()))||(variant.node.selectedOptions||[])[0];// console.log(\"targetOpt\", targetOpt)\nif(targetOpt?.name&&targetOpt?.value){// Use the central selection flow so partial selection is respected\ndispatchOptionSelectedEvent(targetOpt.name,targetOpt.value);}}};document.addEventListener(\"image__variant__selected\",handleImageVariantSelected);const handleImageNumberSelected=e=>{// console.log(\"Mapping image number to variant\", e.detail)\n// Only process image clicks if imageChange is enabled\nif(!images.imageChange||!e.detail?.imageNumber||!props.variantImageIds){// console.log(\n//     \"[Variants] handleImageNumberSelected: no imageChange or imageNumber or variantImageIds\"\n// )\nreturn;}// Parse the variant-to-image mapping\nconst mapping=new Map;let match;while((match=IMAGE_MAPPING_REGEX.exec(props.variantImageIds))!==null){const[,imageNumber,variantId]=match;// Store mapping both ways for easy lookup\nmapping.set(imageNumber,variantId);mapping.set(variantId,imageNumber);}// Reset regex index for next use\nIMAGE_MAPPING_REGEX.lastIndex=0;// Find the variant ID for this image number\nconst variantId=mapping.get(String(e.detail.imageNumber));// console.log(\"variantId\", variantId)\nif(!variantId)return;// Find the variant with this ID\nconst variant=(get(product,\"variants.edges\")||[]).find(({node})=>node.id.endsWith(variantId));// console.log(\"variant\", variant)\nif(variant){// console.log(\"variant\", variant)\n// console.log(\"autoSelectFirst\", autoSelectFirst)\nif(variant.node.selectedOptions){//autoSelectFirst &&\nconst allSelectedOptions={};for(const option of variant.node.selectedOptions||[]){if(option.name&&option.value){allSelectedOptions[option.name]=option.value;}}//Dispatch individual option selected event\nconst communicationEvent=new CustomEvent(\"__variant_option_selected\",{detail:{productId:`gid://shopify/Product/${shopifyProductID}`,// optionName: name,\n// value,\nallSelectedOptions,//allOptionsSelected: allOptionsSelected,\nisPurchaseAction:false,autoSelectFirst:autoSelectFirst,senderPriority:getIncludedOptionNames()[0]||\"\",instanceId:instanceIdRef.current,twoWayGallery:true}});window.dispatchEvent(communicationEvent);// console.log(\n//     \"communicationEvent in two way gallery logic\",\n//     communicationEvent.detail\n// )\n// return\n}// // Determine which option this image should control (prefer configured image titles, then color titles, else first option)\n// const imageOptionNames = [\n//     ...(props.variantImageTitles || []),\n//     ...(props.imageTitles || []),\n//     ...(props.colorTitles || [\"Color\", \"Colour\"]),\n// ].map((s) => String(s).toLowerCase().trim())\n// const targetOpt =\n//     (variant.node.selectedOptions || []).find((opt) =>\n//         imageOptionNames.includes(\n//             String(opt?.name || \"\")\n//                 .toLowerCase()\n//                 .trim()\n//         )\n//     ) || (variant.node.selectedOptions || [])[0]\n// if (targetOpt?.name && targetOpt?.value) {\n//     // console.log(\"targetOpt?.name && targetOpt?.value\", targetOpt?.name, targetOpt?.value)\n//     // Use the central selection flow so partial selection is respected\n//     dispatchOptionSelectedEvent(targetOpt.name, targetOpt.value)\n// }\n}};document.addEventListener(\"image__variant__selected\",handleImageVariantSelected);document.addEventListener(\"image__number__selected\",handleImageNumberSelected);return()=>{document.removeEventListener(\"image__variant__selected\",handleImageVariantSelected);document.removeEventListener(\"image__number__selected\",handleImageNumberSelected);};},[product]);// Canvas-only: when toggling from Purchase to Update Active with Auto Select enabled,\n// clear prior selection and product-scoped cache so auto-select can re-run deterministically\nuseEffect(()=>{if(!isCanvas)return;if(action===\"Update Active\"&&autoSelectFirst){try{const key=`fc_active_variant_${shopifyProductID}`;sessionStorage.removeItem(key);}catch{}setSelectedOptions({});autoSelectRef.current=false;}},[isCanvas,action,autoSelectFirst,shopifyProductID]);// Browser and Canvas: when switching to Update Active or enabling Auto Select 1st,\n// clear product-scoped cache and local selection so auto-select can re-run\nuseEffect(()=>{const switchedToUpdateActive=prevActionRef.current!==\"Update Active\"&&action===\"Update Active\";const enabledAutoSelect=!prevAutoSelectFirstRef.current&&!!autoSelectFirst;if(switchedToUpdateActive||enabledAutoSelect){try{const key=`fc_active_variant_${shopifyProductID}`;sessionStorage.removeItem(key);}catch{}setSelectedOptions({});autoSelectRef.current=false;}prevActionRef.current=action;prevAutoSelectFirstRef.current=!!autoSelectFirst;},[action,autoSelectFirst,shopifyProductID]);// Ref: Reset options when purchase/checkout click is completed\n// const isResettingRef = useRef(false)\nuseEffect(()=>{if(autoSelectFirst&&product&&!autoSelectRef.current&&Object.keys(selectedOptions).length===0){// Skip auto-select if there's already a URL variant - respect user's explicit choice\n// const urlParams = new URLSearchParams(window.location.search)\n// if (urlParams.get(\"variant\") && !isCanvas) {\n//     return\n// }\nconst variants=get(product,\"variants.edges\",[]);// Find first available variant\nconst firstAvailableVariant=variants.find(({node})=>node.availableForSale);const variantKey=`fc_active_variant_${shopifyProductID}`;const savedVariant=isCanvas?null:sessionStorage.getItem(variantKey);// console.log(\"Saved variant to sessionStorage\", savedVariant, variantKey)\nlet initialOptions={};let parsedVariant=null;let isPartial=false;if(!savedVariant&&productPage&&!isCanvas&&product){// console.log(\"No saved variant, parsing url\")\n// console.log(\"product in autoSelectFirst\", product)\nconst urlParams=new URLSearchParams(window.location.search);const variantIdFromUrl=urlParams.get(\"variant\");// console.log(\"variantIdFromUrl\", variantIdFromUrl)\nparsedVariant=get(product,\"variants.edges\",[]).find(({node})=>node.id===`gid://shopify/ProductVariant/${variantIdFromUrl}`);// console.log(\"parsedVariant, no saved\", parsedVariant)\nif(parsedVariant){parsedVariant.node.selectedOptions.forEach(option=>{initialOptions[option.name]=option.value;});setSelectedOptions(initialOptions);// console.log(\"parsedVariant in autoSelectFirst: initialOptions\", initialOptions)\n}autoSelectRef.current=true;const allOptions=get(product,\"options\",[]).map(opt=>opt.name);const allOptionsSelected=allOptions.every(optName=>initialOptions[optName]);// console.log(\n//     \"savedVariant : allOptionsSelected\",\n//     allOptionsSelected\n// )\n// Add a small delay to ensure components are ready\nsetTimeout(()=>{// Dispatch events for each selected option\nObject.entries(initialOptions).forEach(([optionName,value])=>{const event=new CustomEvent(\"variant_option_selected\",{detail:{optionName,value,allSelectedOptions:initialOptions,isCompleteVariant:allOptionsSelected,isPurchaseAction:false,productId:`gid://shopify/Product/${shopifyProductID}`}});document.dispatchEvent(event);// console.log(\n//     \"variant_option_selected event: savedVariant\",\n//     event.detail\n// )\n});if(allOptionsSelected&&!isPartial){// updateUrlWithVariant(fullVariant.node.id)\n// console.log(\"Updating url for autoSelectFirst\")\nsetTimeout(()=>{// Also dispatch a single event for the active variant\nif(action!==\"Add to Cart\"&&action!==\"Buy Now\"){const activeVariantEvent=new CustomEvent(\"product__active-variant__changed\",{detail:{...parsedVariant?.node,productId:`gid://shopify/Product/${shopifyProductID}`,isCompleteVariant:allOptionsSelected}});document.dispatchEvent(activeVariantEvent);// console.log(\n//     \"activeVariantEvent in autoSelectFirst\",\n//     activeVariantEvent.detail\n// )\n}},100);// End of initialization\nisInitializingRef.current=false;}},100);}if(savedVariant&&productPage&&!isCanvas&&!appliedFromStorageRef.current){// console.log(\"Saved variant exists, restoring\")\nconst savedVariantId=JSON.parse(savedVariant).variantId;//console.log(\"savedVariantId\", savedVariantId)\nconst variantId=savedVariantId.split(\"gid://shopify/ProductVariant/\")[1];// console.log(\"variantId\", variantId)\n// console.log(\"product\", product)\nparsedVariant=get(product,\"variants.edges\",[]).find(({node})=>node.id===`gid://shopify/ProductVariant/${variantId}`);// console.log(\"parsedVariant\", parsedVariant)\nisPartial=JSON.parse(savedVariant).isPartial;// console.log(\"isPartial\", isPartial)\ninitialOptions=JSON.parse(savedVariant).selectedOptions;// If this component's group has missing selections, fill them\nconst allOptionNames=(get(product,\"options\",[])||[]).map(opt=>opt.name);const groupOptionNames=getIncludedOptionNames();const missingInGroup=groupOptionNames.filter(name=>!initialOptions[name]);if(missingInGroup.length>0){// Helper to pick the first valid combination by declared option value order\nconst optionsList=get(product,\"options\",[])||[];const scopeTitles=getIncludedOptionNames();const pickFirstByOrder=(baseSelections={})=>{const partial={...baseSelections};for(const opt of optionsList){if(!scopeTitles.includes(opt.name))continue;const nextValue=(opt.values||[]).find(value=>{const trial={...partial,[opt.name]:value};return variants.some(({node})=>{if(!node?.availableForSale)return false;return Object.entries(trial).every(([k,v])=>node.selectedOptions?.some(o=>o.name===k&&o.value===v));});});if(!nextValue)return null;partial[opt.name]=nextValue;}return partial;};const fallbackPicked=pickFirstByOrder({});const fallbackSelected=fallbackPicked?Object.entries(fallbackPicked).map(([name,value])=>({name,value})):[];const sourceOptions=parsedVariant?.node?.selectedOptions||fallbackSelected||[];sourceOptions.forEach(option=>{if(missingInGroup.includes(option.name)){initialOptions[option.name]=option.value;}});}setSelectedOptions(initialOptions);// console.log(\"savedVariant in autoSelectFirst: initialOptions\", initialOptions)\nautoSelectRef.current=true;const allOptions=get(product,\"options\",[]).map(opt=>opt.name);const allOptionsSelected=allOptions.every(optName=>initialOptions[optName]);// console.log(\n//     \"savedVariant : allOptionsSelected\",\n//     allOptionsSelected\n// )\n// Add a small delay to ensure components are ready\nsetTimeout(()=>{// Dispatch events for each selected option\nObject.entries(initialOptions).forEach(([optionName,value])=>{const event=new CustomEvent(\"variant_option_selected\",{detail:{optionName,value,allSelectedOptions:initialOptions,isCompleteVariant:allOptionsSelected,isPurchaseAction:false,productId:`gid://shopify/Product/${shopifyProductID}`}});document.dispatchEvent(event);// console.log(\n//     \"variant_option_selected event: savedVariant\",\n//     event.detail\n// )\n});// Dispatch communication event for other variant selectors\nif(!isCanvas&&filterVariants?.variantGroups!==\"all\"){const communicationEvent=new CustomEvent(\"__variant_option_selected\",{detail:{productId:`gid://shopify/Product/${shopifyProductID}`,optionName:Object.keys(initialOptions)[0],value:Object.values(initialOptions)[0],allSelectedOptions:initialOptions,allOptionsSelected:allOptionsSelected,isPurchaseAction:false,autoSelectFirst:autoSelectFirst,senderPriority:filterVariants?.variantTitles?.[0]||\"\",instanceId:instanceIdRef.current}});window.dispatchEvent(communicationEvent);}if(allOptionsSelected&&!isPartial){// updateUrlWithVariant(fullVariant.node.id)\nsetTimeout(()=>{// Also dispatch a single event for the active variant\nif(action!==\"Add to Cart\"&&action!==\"Buy Now\"){const activeVariantEvent=new CustomEvent(\"product__active-variant__changed\",{detail:{...parsedVariant?.node,productId:`gid://shopify/Product/${shopifyProductID}`,isCompleteVariant:allOptionsSelected}});document.dispatchEvent(activeVariantEvent);// console.log(\n//     \"activeVariantEvent in autoSelectFirst\",\n//     activeVariantEvent.detail\n// )\n}},100);// End of initialization\nisInitializingRef.current=false;}},100);}if(!parsedVariant){//console.log(\"pickFirstByOrder: No saved variant or storage, using autoSelectFirst\", parsedVariant)\n// Prefer declared option order over variant edges order\nconst optionsList=get(product,\"options\",[])||[];const scopeTitles=getIncludedOptionNames();const pickFirstByOrder=(baseSelections={})=>{const partial={...baseSelections};for(const opt of optionsList){if(!scopeTitles.includes(opt.name))continue;const nextValue=(opt.values||[]).find(value=>{const trial={...partial,[opt.name]:value};return variants.some(({node})=>{if(!node?.availableForSale)return false;return Object.entries(trial).every(([k,v])=>node.selectedOptions?.some(o=>o.name===k&&o.value===v));});});if(!nextValue)return null;partial[opt.name]=nextValue;}return partial;};const picked=pickFirstByOrder({});if(picked){initialOptions=picked;}setSelectedOptions(initialOptions);// console.log(\"autoSelectFirst: initialOptions\", initialOptions)\nautoSelectRef.current=true;const allOptions=get(product,\"options\",[]).map(opt=>opt.name);const allOptionsSelected=allOptions.every(optName=>initialOptions[optName]);// console.log(\n//     \"autoSelectFirst: allOptionsSelected\",\n//     allOptionsSelected\n// )\n// Add a small delay to ensure components are ready\nsetTimeout(()=>{// Dispatch events for each selected option\nObject.entries(initialOptions).forEach(([optionName,value])=>{const event=new CustomEvent(\"variant_option_selected\",{detail:{optionName,value,allSelectedOptions:initialOptions,isCompleteVariant:allOptionsSelected,isPurchaseAction:false,productId:`gid://shopify/Product/${shopifyProductID}`}});document.dispatchEvent(event);// console.log(\n//     \"variant_option_selected event: autoSelectFirst\",\n//     event.detail\n// )\n});// Dispatch communication event for other variant selectors\nif(!isCanvas&&filterVariants?.variantGroups!==\"all\"){const communicationEvent=new CustomEvent(\"__variant_option_selected\",{detail:{productId:`gid://shopify/Product/${shopifyProductID}`,optionName:Object.keys(initialOptions)[0],value:Object.values(initialOptions)[0],allSelectedOptions:initialOptions,allOptionsSelected:allOptionsSelected,isPurchaseAction:false,autoSelectFirst:autoSelectFirst,senderPriority:getIncludedOptionNames()[0]||\"\",instanceId:instanceIdRef.current}});window.dispatchEvent(communicationEvent);// console.log(\n//     \"communicationEvent in autoSelectFirst\",\n//     communicationEvent.detail\n// )\n}// console.log(\"isPartial\", isPartial)\nif(allOptionsSelected&&!isPartial){// If we can match a variant for picked options, update URL\nconst matching=variants.find(({node})=>Object.entries(initialOptions).every(([k,v])=>node.selectedOptions?.some(o=>o.name===k&&o.value===v)));// console.log(\"matching\", matching.node)\nif(productPage&&matching?.node?.id){// console.log(\"Updating url for autoSelectFirst\", matching.node)\nupdateUrlWithVariant(matching.node.id);}// setTimeout(() => {\n// Also dispatch a single event for the active variant\nif(action!==\"Add to Cart\"&&action!==\"Buy Now\"){const activeVariantEvent=new CustomEvent(\"product__active-variant__changed\",{detail:{...matching?.node,productId:`gid://shopify/Product/${shopifyProductID}`,isCompleteVariant:allOptionsSelected}});document.dispatchEvent(activeVariantEvent);// console.log(\"active variant event sent\", activeVariantEvent)\n}// End of initialization\nisInitializingRef.current=false;// console.log(\n//     \"activeVariantEvent in autoSelectFirst\",\n//     activeVariantEvent.detail\n// )\n// }, 100)\n}},100);}if(firstAvailableVariant&&!parsedVariant){// console.log(\"No saved variant or storage, using autoSelectFirst\", firstAvailableVariant)\n// If variantGroups is \"all\", set all options\n// Otherwise only set the current group's option\nfirstAvailableVariant.node.selectedOptions.forEach(option=>{if(filterVariants?.variantGroups===\"all\"||// (filterVariants?.variantGroups === \"equals\" &&\nfilterVariants?.variantTitles?.includes(option.name)){initialOptions[option.name]=option.value;}});//console.log(\"autoSelectFirst: firstAvailableVariant\", firstAvailableVariant.node.id)\nsetSelectedOptions(initialOptions);//console.log(\"autoSelectFirst: initialOptions\", initialOptions)\nautoSelectRef.current=true;const allOptions=get(product,\"options\",[]).map(opt=>opt.name);const allOptionsSelected=allOptions.every(optName=>initialOptions[optName]);// console.log(\n//     \"autoSelectFirst: allOptionsSelected\",\n//     allOptionsSelected\n// )\n// Add a small delay to ensure components are ready\nsetTimeout(()=>{// Dispatch events for each selected option\nObject.entries(initialOptions).forEach(([optionName,value])=>{const event=new CustomEvent(\"variant_option_selected\",{detail:{optionName,value,allSelectedOptions:initialOptions,isCompleteVariant:allOptionsSelected,isPurchaseAction:false,productId:`gid://shopify/Product/${shopifyProductID}`}});document.dispatchEvent(event);// console.log(\n//     \"variant_option_selected event: autoSelectFirst\",\n//     event.detail\n// )\n});// Dispatch communication event for other variant selectors\nif(filterVariants?.variantGroups!==\"all\"){const communicationEvent=new CustomEvent(\"__variant_option_selected\",{detail:{productId:`gid://shopify/Product/${shopifyProductID}`,optionName:Object.keys(initialOptions)[0],value:Object.values(initialOptions)[0],allSelectedOptions:initialOptions,allOptionsSelected:allOptionsSelected,isPurchaseAction:false,autoSelectFirst:autoSelectFirst,senderPriority:getIncludedOptionNames()[0]||\"\",instanceId:instanceIdRef.current}});window.dispatchEvent(communicationEvent);// console.log(\n//     \"communicationEvent in autoSelectFirst\",\n//     communicationEvent.detail\n// )\n}if(allOptionsSelected&&!isPartial){if(productPage){// console.log(\"updating Url With Variant\", firstAvailableVariant)\nupdateUrlWithVariant(firstAvailableVariant.node.id);}//console.log(\"Updating url for autoSelectFirst\")\n// setTimeout(() => {\n// Also dispatch a single event for the active variant\nif(action!==\"Add to Cart\"&&action!==\"Buy Now\"){const activeVariantEvent=new CustomEvent(\"product__active-variant__changed\",{detail:{...firstAvailableVariant.node,productId:`gid://shopify/Product/${shopifyProductID}`,isCompleteVariant:allOptionsSelected}});document.dispatchEvent(activeVariantEvent);// console.log(\"active variant event sent\", activeVariantEvent)\n}// End of initialization\nisInitializingRef.current=false;// console.log(\n//     \"activeVariantEvent in autoSelectFirst\",\n//     activeVariantEvent.detail\n// )\n// }, 100)\n}},100);}}},[product,autoSelectFirst,shopifyProductID,filterVariants?.variantGroups,(filterVariants?.variantTitles||[]).join(\"|\"),productPage,isCanvas]);const oldSelectionsRef=useRef({});useEffect(()=>{const handleCurrencyChange=event=>{const{currency}=event.detail;setSelectedCurrency(currency);oldSelectionsRef.current={...selectedOptions}// Save current selections\n;if(window[\"shopXtools\"]&&Array.isArray(window[\"shopXtools\"].products)){const _matchingProduct=window[\"shopXtools\"].products.find(({node:_product})=>_product.id===`gid://shopify/Product/${shopifyProductID}`);if(_matchingProduct){const newProduct=_matchingProduct.node;setProduct(newProduct);}}};window.addEventListener(\"currency_changed\",handleCurrencyChange);return()=>{window.removeEventListener(\"currency_changed\",handleCurrencyChange);};},[shopifyProductID,selectedOptions]);// New effect: restore selections AFTER product updates via currency selection\nuseEffect(()=>{if(!product)return;const savedSelections=oldSelectionsRef.current;if(!savedSelections||Object.keys(savedSelections).length===0)return;const validSelections={};const newOptions=get(product,\"options\",[]);for(const opt of newOptions){const{name,values}=opt;const selectedValue=savedSelections[name];if(selectedValue&&values.includes(selectedValue)){validSelections[name]=selectedValue;}}setSelectedOptions(validSelections);// Only dispatch events if we have valid selections\nif(Object.keys(validSelections).length>0){const activeVariant=getProductVariant(product,validSelections);// Get all available options for this product\nconst allOptions=get(product,\"options\",[]).map(opt=>opt.name);// Check if all options have been selected\nconst allOptionsSelected=allOptions.every(optName=>validSelections[optName]);// Dispatch variant option events for each restored selection\nObject.entries(validSelections).forEach(([optionName,value])=>{const event=new CustomEvent(\"variant_option_selected\",{detail:{optionName,value,allSelectedOptions:validSelections,isCompleteVariant:allOptionsSelected,isPurchaseAction:false}});document.dispatchEvent(event);});// Dispatch active variant event if we have a complete variant\nif(activeVariant&&allOptionsSelected){// Add a small delay to ensure PurchaseButton is ready\nsetTimeout(()=>{if(action!==\"Add to Cart\"&&action!==\"Buy Now\"){const activeVariantEvent=new CustomEvent(\"product__active-variant__changed\",{detail:{...activeVariant,productId:`gid://shopify/Product/${shopifyProductID}`,isCompleteVariant:allOptionsSelected}});document.dispatchEvent(activeVariantEvent);// console.log(\n//     \"activeVariantEvent in currencyChange\",\n//     activeVariantEvent.detail\n// )\n}// Dispatch sync event with fromCurrencyChange flag\nconst syncEvent=new CustomEvent(\"variant__visual__sync\",{detail:{productId:`gid://shopify/Product/${shopifyProductID}`,selectedOptions:validSelections,variantId:activeVariant?.id}});document.dispatchEvent(syncEvent);},50);}}},[product,shopifyProductID]);const activeVariant=getProductVariant(product,selectedOptions);// listening to changes on the activeVariant image\nconst[previousUrl,setPreviousUrl]=useState(\"\");// Parse variant IDs string into a map of variant IDs to image numbers\nconst parseVariantImageIds=variantIdsString=>{if(!variantIdsString)return new Map;const mapping=new Map;// Find all image markers and their positions\nconst imageMarkers=[];const imageRegex=/\\[Image (\\d+) • (\\d+)\\]/g;let imageMatch;while((imageMatch=imageRegex.exec(variantIdsString))!==null){imageMarkers.push({imageNumber:imageMatch[1],position:imageMatch.index,variantId:imageMatch[2],fullMatch:imageMatch[0]});}// Process each image marker and its associated variants\nfor(let i=0;i<imageMarkers.length;i++){const marker=imageMarkers[i];const nextMarker=imageMarkers[i+1];// Map the main variant ID\nmapping.set(marker.variantId,marker.imageNumber);// Find all standalone variant IDs between this marker and the next one\nconst startPos=marker.position+marker.fullMatch.length;const endPos=nextMarker?nextMarker.position:variantIdsString.length;const segment=variantIdsString.substring(startPos,endPos);// Extract and map all standalone variant IDs in this segment\nconst variantRegex=/\\[(\\d+)\\]/g;let variantMatch;while((variantMatch=variantRegex.exec(segment))!==null){mapping.set(variantMatch[1],marker.imageNumber);}}// console.log(\"Parsed variant to image mapping:\", mapping)\nreturn mapping;};const[orderFieldError,setOrderFieldError]=useState(false);// Remove variant-to-image handling from dispatchOptionSelectedEvent\nconst dispatchOptionSelectedEvent=useCallback((optionName,value)=>{const newSelectedOptions={...selectedOptions,[optionName]:value};setSelectedOptions(newSelectedOptions);// console.log(\"newSelectedOptions\", newSelectedOptions)\n// Get all available options for this product\nconst allOptions=get(product,\"options\",[]).map(opt=>opt.name);// Check if all options have been selected\nconst allOptionsSelected=allOptions.every(optName=>newSelectedOptions[optName]);// Dispatch communication event for quick purchase functionality\n// ONLY dispatch this event if it's NOT a purchase action\nif(filterVariants?.variantGroups!==\"all\"&&!__isPurchaseMode(action)){// Dispatch individual option selected event\nconst communicationEvent=new CustomEvent(\"__variant_option_selected\",{detail:{productId:`gid://shopify/Product/${shopifyProductID}`,optionName,value,allSelectedOptions:newSelectedOptions,allOptionsSelected:allOptionsSelected,isPurchaseAction:false,autoSelectFirst:autoSelectFirst,senderPriority:getIncludedOptionNames()[0]||\"\",instanceId:instanceIdRef.current}});window.dispatchEvent(communicationEvent);// console.log(\n//     \"communicationEvent in dispatchOptionSelectedEvent\",\n//     communicationEvent.detail\n// )\n}// Dispatch individual option selected event\nconst event=new CustomEvent(\"variant_option_selected\",{detail:{optionName,value,allSelectedOptions:newSelectedOptions,productId:`gid://shopify/Product/${shopifyProductID}`,isPurchaseAction:action===\"Add to Cart\"||action===\"Buy Now\"}});document.dispatchEvent(event);// console.log(\"variant_option_selected event\", event.detail)\n// If this is a purchase action and all options are selected, handle the quick purchase\nif(__isPurchaseMode(action)){const purchaseActiveVariant=getProductVariant(product,newSelectedOptions);if(purchaseActiveVariant&&window.shopXtools){const getLineItem=()=>{const merchandiseId=purchaseActiveVariant?.id||(shopifyProductID?`gid://shopify/ProductVariant/${shopifyProductID}`:null);if(!merchandiseId){throw new Error(\"No valid product variant selected\");}const lineItem={merchandiseId,quantity:1};try{const productSpecificKey=`fc_cart_attributes_${props.shopifyProductID}`;const stored=sessionStorage.getItem(productSpecificKey);if(!stored)return lineItem;const data=JSON.parse(stored);// Get all attributes instead of just checking for specific ones\nconst attributes=[];// Process all key-value pairs in the stored data\nObject.entries(data).forEach(([key,value])=>{if(value&&String(value).trim()){attributes.push({key,value:String(value).trim()});}});// Only add attributes if we have any\nif(attributes.length>0){lineItem[\"attributes\"]=attributes;}}catch(e){console.error(\"Error adding attributes to cart item:\",e);}return lineItem;};const handlePurchase=async()=>{try{//attributes\nconst productSpecificKey=`fc_cart_attributes_${props.shopifyProductID}`;const storedAttributes=sessionStorage.getItem(productSpecificKey);// console.log(\"[CHECK] Stored attributes:\", storedAttributes)\nconst parsedAttrs=storedAttributes?JSON.parse(storedAttributes):{};// console.log(\"[CHECK] parsed attributes:\", parsedAttrs)\nconst configKey=`fc_input_config_${props.shopifyProductID}`;const config=sessionStorage.getItem(configKey);const parsedConfig=config?JSON.parse(config):{};const attrKeyList=Object.keys(parsedConfig);let hasError=false;for(const attrKey of attrKeyList){const config=parsedConfig[attrKey];const savedValue=parsedAttrs[attrKey]||\"\";// 1. Required check\nif(config.required&&(!savedValue||savedValue.trim()===\"\")){window.dispatchEvent(new CustomEvent(\"inputValidationFailed\",{detail:{productId:props.shopifyProductID,key:attrKey}}));// console.log(\"[CHECK] Required field validation failed:\", {\n//     productId: props.shopifyProductID,\n//     key: attrKey,\n// })\nhasError=true;continue;// No need to check email if required failed\n}// 2. Email validation (only if value is not empty)\nif(config.validateEmail&&savedValue&&savedValue.trim()!==\"\"){const validateEmail=email=>{if(!email||!email.includes(\"@\")||!email.includes(\".\"))return false;if(email.length>254)return false;const[localPart,domain]=email.split(\"@\");if(localPart.length>64)return false;const emailPattern=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;return emailPattern.test(email);};if(!validateEmail(savedValue)){// console.log(\"[CHECK] Email validation failed:\", {\n//     productId: props.shopifyProductID,\n//     key: attrKey,\n//     savedValue,\n//     config,\n// })\nhasError=true;}}}if(hasError){setOrderFieldError(true);return;}const lines=[getLineItem()];const countryCode=localStorage.getItem(\"selectedCountryCode\")||undefined;if(action===\"Add to Cart\"){// Add to cart\nconst existingCartId=localStorage.getItem(\"shopX_cart_id\");// console.log(\"existingCartId\", existingCartId)\nif(!existingCartId){const createResult=await window.shopXtools?.handleCartMutation?.(createCartMutation,{lines,countryCode});if(createResult?.cartCreate?.cart){localStorage.setItem(\"shopX_cart_id\",createResult.cartCreate.cart.id);localStorage.setItem(\"shopXtools.cart\",JSON.stringify(createResult.cartCreate.cart));if(window.shopXtools){window.shopXtools.cart=createResult.cartCreate.cart;}// Dispatch event after updating the cart\nwindow.dispatchEvent(new Event(\"shopXtools-cart-update\"));// Open cart if triggerCart is true\nif(triggerCart){// Notify host site\nwindow.shopXtools?.dispatchEvent?.(\"checkout__changed\",{__triggerCartModal:triggerCart});// Notify Framer components listening on document\ndocument.dispatchEvent(new CustomEvent(\"checkout__changed\",{detail:{__triggerCartModal:triggerCart}}));}// console.log(\n//     \"New cart created, triggering the cart: dispatching checkout__changed\",\n//     onClickAction?.triggerCart\n// )\n}}else{const addResult=await window.shopXtools?.handleCartMutation?.(addToCartMutation,{cartId:existingCartId,lines});// console.log(\"addResult\", addResult)\nif(addResult?.cartLinesAdd?.cart){// console.log(\"addResult.cartLinesAdd.cart\", addResult.cartLinesAdd.cart)\nlocalStorage.setItem(\"shopXtools.cart\",JSON.stringify(addResult.cartLinesAdd.cart));if(window.shopXtools){window.shopXtools.cart=addResult.cartLinesAdd.cart;}// Dispatch event after updating the cart\nwindow.dispatchEvent(new Event(\"shopXtools-cart-update\"));// Google Analytics tracking\nconst currency=purchaseActiveVariant?.price?.currencyCode||\"USD\";const value=parseFloat((parseFloat(purchaseActiveVariant?.price?.amount||\"0\")*1).toFixed(2));const item_id=purchaseActiveVariant?.id;const item_name=purchaseActiveVariant?.selectedOptions?.map(opt=>opt.value).join(\" / \")||\"\";const price=parseFloat(purchaseActiveVariant?.price?.amount||\"0\");const activeProduct=product;// Google Analytics tracking\nif(typeof window.fcTrackGAEvent===\"function\"){// console.log(\"Tracking Add to Cart - google:\", {\n//     currency,\n//     value,\n//     items: [{\n//         item_id,\n//         item_name,\n//         price,\n//         quantity: 1\n//     }]\n// });\nwindow.fcTrackGAEvent(\"add_to_cart\",{currency,value,items:[{item_id,item_name,price,quantity:1}]});}// Meta Pixel tracking\ntrackFacebookPixelAddToCart({variant:purchaseActiveVariant,product:activeProduct,quantity:1,currency:currency});// Open cart if triggerCart is true\nif(action===\"Add to Cart\"&&triggerCart){// Notify host site\nwindow.shopXtools?.dispatchEvent?.(\"checkout__changed\",{__triggerCartModal:triggerCart});// Notify Framer components listening on document\ndocument.dispatchEvent(new CustomEvent(\"checkout__changed\",{detail:{__triggerCartModal:triggerCart}}));// console.log(\"Adding new item, triggering the cart: dispatching checkout__changed\", triggerCart)\n}clearSessionStorage();stripVariantFromUrl();// console.log(\"sessionStorage cleared and url stripped after quick purchase\")\n}}}else{// Buy Now\nconst buyResult=await window.shopXtools?.handleCartMutation?.(createCartMutation,{lines,countryCode});if(buyResult?.cartCreate?.cart?.checkoutUrl){let checkoutUrl=buyResult.cartCreate.cart.checkoutUrl;// Analytics\nconst currency=purchaseActiveVariant?.price?.currencyCode||\"USD\";const value=parseFloat((parseFloat(purchaseActiveVariant?.price?.amount||\"0\")*1).toFixed(2));const item_id=purchaseActiveVariant?.id;const item_name=purchaseActiveVariant?.selectedOptions?.map(opt=>opt.value).join(\" / \")||\"\";const price=parseFloat(purchaseActiveVariant?.price?.amount||\"0\");// Google Analytics tracking\nif(typeof window.fcTrackGAEvent===\"function\"){// console.log(\"Tracking Initiate Checkout (Buy now) - google:\", {\n//     currency,\n//     value,\n//     item_id,\n//     item_name,\n//     price,\n//     quantity: 1\n// });\nwindow.fcTrackGAEvent(\"begin_checkout\",{currency,value,items:[{item_id,item_name,price,quantity:1}]});}// Meta Pixel tracking\ntrackFacebookPixelInitiateCheckout({variant:purchaseActiveVariant,product:product,quantity:1,currency:currency,useBeacon:true});// Add tracking and language params\ncheckoutUrl=appendAllTrackingParamsToUrl(checkoutUrl);checkoutUrl=appendLanguageToUrl(checkoutUrl);window.location.assign(checkoutUrl);}}}catch(error){console.error(\"Error handling purchase:\",error);window.dispatchEvent(new CustomEvent(\"errorChanged\",{detail:error.message||\"Error processing your request\"}));}};handlePurchase();// Dispatch the event with the purchased variant to use it to remember the matching image for the variant after reset\nwindow.dispatchEvent(new CustomEvent(\"product__purchase__completed\",{detail:{shopifyProductID,activeVariant:purchaseActiveVariant,optionName,value}}));//console.log(\"dispatching product__purchase__completed\")\n}}// Compute current active variant from selections\nconst activeVariant=getProductVariant(product,newSelectedOptions);// console.log(\"activeVariant\", activeVariant)\n// Only dispatch active-variant updates for non-purchase actions\n// if (!__isPurchaseMode(action)) {\n//     if (activeVariant) {\n//         // For partial selections, override selectedOptions in the payload\n//         const partialSelectedArray = Object.entries(\n//             newSelectedOptions\n//         ).map(([name, value]) => ({ name, value }))\n//         const activeVariantEvent = new CustomEvent(\n//             \"product__active-variant__changed\",\n//             {\n//                 detail: {\n//                     ...(activeVariant || {}),\n//                     selectedOptions: allOptionsSelected\n//                         ? activeVariant?.selectedOptions || []\n//                         : partialSelectedArray,\n//                     productId: `gid://shopify/Product/${shopifyProductID}`,\n//                     isCompleteVariant: allOptionsSelected,\n//                     onClickAction: action,\n//                 },\n//             }\n//         )\n//         document.dispatchEvent(activeVariantEvent)\n//         console.log(\"activeVariantEvent in dispatchOptionSelectedEvent\", activeVariantEvent.detail)\n//     }\n// }\n// Always dispatch event for visual sync when it is only one variant selector\nconst syncEvent=new CustomEvent(\"variant__visual__sync\",{detail:{productId:`gid://shopify/Product/${shopifyProductID}`,selectedOptions:newSelectedOptions,variantId:activeVariant?.id}});document.dispatchEvent(syncEvent);// Handle session storage and URL updates based on productPage prop\nif(activeVariant){if(productPage&&allOptionsSelected){// On product page: update URL with variant ID\n// console.log(\"updating Url With Variant\", activeVariant)\nupdateUrlWithVariant(activeVariant.id);saveVariantToSessionStorage(newSelectedOptions,activeVariant.id,!allOptionsSelected);}else{// On listing page: save to session storage\nsaveVariantToSessionStorage(newSelectedOptions,activeVariant.id,!allOptionsSelected);}// BACK UP EVENT: Always dispatch product__active-variant__changed event\n// when we have a complete variant to allow all components receive it with a delay\nif(allOptionsSelected&&!__isPurchaseMode(action)){setTimeout(()=>{const activeVariantEvent=new CustomEvent(\"product__active-variant__changed\",{detail:{...activeVariant,productId:`gid://shopify/Product/${shopifyProductID}`,isCompleteVariant:true,isPurchaseAction:false}});document.dispatchEvent(activeVariantEvent);// console.log(\"activeVariantEvent in dispatchOptionSelectedEvent\", activeVariantEvent.detail)\n},300);}}},[selectedOptions,product,shopifyProductID,autoSelectFirst,autoSelectRef.current,filterVariants?.variantGroups,productPage,updateUrlWithVariant,saveVariantToSessionStorage]);// Reset options when purchase/checkout click is completed\nuseEffect(()=>{const handlePurchaseCompleted=e=>{// console.log(\"handlePurchaseCompleted\", e.detail)\nif(e.detail.shopifyProductID!==shopifyProductID){return;}if(action===\"Add to Cart\"||action===\"Buy Now\"&&filterVariants?.variantTitles?.length){const activeVariant=e.detail.activeVariant;// isResettingRef.current = true\nconst optionName=e.detail.optionName;const optionValue=e.detail.value;const optionToReset={[optionName]:optionValue};//console.log(\"optionToReset\", optionToReset)\nconst newOptions=(activeVariant?.selectedOptions||[]).filter(opt=>!(opt.name in optionToReset));//console.log(\"newOptions\", newOptions)\nconst rememberedOptions={};for(const opt of newOptions){rememberedOptions[opt.name]=opt.value;}setSelectedOptions(rememberedOptions);// isResettingRef.current = false\n// console.log(\n//     \"options to remember in handlePurchaseCompleted\",\n//     rememberedOptions\n// )\n//autoSelectRef.current = false;\n// Dispatch communication event after reset\nsetTimeout(()=>{if(activeVariant){// Send the last complete variant to use it to remember the matching image for the variant after reset\ndocument.dispatchEvent(new CustomEvent(\"last_selected_variant\",{detail:{activeVariant,shopifyProductID}}));// console.log(\n//     \"last_selected_variant dispatching\",\n//     activeVariant\n// )\n}const communicationEvent=new CustomEvent(\"__variant_option_selected\",{detail:{productId:`gid://shopify/Product/${shopifyProductID}`,value:null,allSelectedOptions:rememberedOptions,allOptionsSelected:false,isPurchaseAction:true,autoSelectFirst:false}});window.dispatchEvent(communicationEvent);// console.log(\n//     \"Dispatched reset communication event:\",\n//     communicationEvent.detail\n// )\n},200);}};window.addEventListener(\"product__purchase__completed\",handlePurchaseCompleted);return()=>window.removeEventListener(\"product__purchase__completed\",handlePurchaseCompleted);},[product,action,filterVariants?.variantTitles,shopifyProductID,selectedOptions]);// Add a new effect to listen for sync events between the two identical variant selectors\nuseEffect(()=>{if(isCanvas)return;const handleVisualSync=e=>{// Only sync if it's for the same product, not from a currency change, and if variantGroups is \"all\", meaning there is only one variant selector\nif(e.detail.productId===`gid://shopify/Product/${shopifyProductID}`&&filterVariants?.variantGroups===\"all\"){// Only update when a valid selectedOptions payload is provided\nif(e.detail&&typeof e.detail.selectedOptions===\"object\"&&e.detail.selectedOptions!==null){setSelectedOptions(e.detail.selectedOptions);}//console.log(\"handleVisualSync\", e.detail)\n}};document.addEventListener(\"variant__visual__sync\",handleVisualSync);return()=>{document.removeEventListener(\"variant__visual__sync\",handleVisualSync);};},[shopifyProductID,isCanvas])//props.behaviorConfigs.action\n;// Ref: Last purchased variant to use it after options reset for image mapping\nconst eventVariantRef=useRef(null);const eventVariantFreshRef=useRef(false);// An effect to listen for the last purchased variant to use it after options reset for image mapping\nuseEffect(()=>{const handleVariant=e=>{// console.log(\n//     \"shopifyProductID, e.detail.shopifyProductID\",\n//     shopifyProductID,\n//     e.detail.shopifyProductID\n// )\nif(shopifyProductID===e.detail.shopifyProductID){//console.log(\"handleVariant\", e.detail)\neventVariantRef.current=e.detail.activeVariant;eventVariantFreshRef.current=true;}};document.addEventListener(\"last_selected_variant\",handleVariant);return()=>{document.removeEventListener(\"last_selected_variant\",handleVariant);};},[shopifyProductID]);// Consolidate all variant-to-image handling here\nuseEffect(()=>{// console.log(\"[Image mapping:] useEffect running\", { activeVariant, selectedOptions });\nlet variantToShow;// If the quick purchase was triggered, use the last purchased variant to show the matching image\n// or the active variant if it is simply a selection change\nif(eventVariantFreshRef.current&&eventVariantRef.current){variantToShow=eventVariantRef.current;// console.log(\n//     \"Image mapping: eventVariantRef.current\",\n//     eventVariantRef.current\n// )\n// console.log(\n//     \"Image mapping: eventVariantFreshRef.current\",\n//     eventVariantFreshRef.current\n// )\n}else{variantToShow=activeVariant;// console.log(\"Image mapping: activeVariant\", activeVariant)\n}// console.log(\"Image mapping: variantToShow\", variantToShow)\nif(variantToShow){const variantId=variantToShow?.id.split(\"/\").pop();if(props.variantImageIds){const variantMapping=parseVariantImageIds(props.variantImageIds);// console.log(\"Image mapping: variantMapping\", variantMapping)\nconst matchingImageNumber=variantMapping.get(variantId);// console.log(\n//     \"Image mapping: matchingImageNumber\",\n//     matchingImageNumber\n// )\n// Only dispatch events if we have a matching image number\nif(matchingImageNumber){// Use a single setTimeout to handle all events\nconst timeoutId=setTimeout(()=>{// Only dispatch variant__image__match if imageTrigger is not None\nif(images.imageTrigger!==\"None\"){const tapEvent=new CustomEvent(\"variant__image__match\",{detail:{imageNumber:parseInt(matchingImageNumber),shopifyProductID:`gid://shopify/Product/${shopifyProductID}`}});document.dispatchEvent(tapEvent);// console.log(\n//     \"Image mapping: variant__image__match dispatching\",\n//     tapEvent.detail\n// )\n}// Only handle Scroll Sections if that's the specific trigger type\nif(images.imageTrigger===\"Scroll Sections\"){// Prevent initial scroll trigger if auto-select first is enabled\n// and this is the first time we're triggering\nif(autoSelectFirst&&!initialScrollPreventedRef.current){initialScrollPreventedRef.current=true;return;// Skip the scroll trigger on first auto-select\n}const newHash=`#image-${matchingImageNumber}`;if(window.location.hash!==newHash){history.replaceState(null,\"\",newHash);const element=document.getElementById(`image-${matchingImageNumber}`);if(element){const headerOffset=images.offsetY||0;const elementPosition=element.getBoundingClientRect().top;const offsetPosition=elementPosition+window.pageYOffset-headerOffset;window.scrollTo({top:offsetPosition,behavior:\"smooth\"});}}}},0);// Reset the event variant ref to null to allow the next quick purchase\n// to use the active variant and not the last purchased variant\neventVariantFreshRef.current=false;eventVariantRef.current=null;// console.log(\"eventVariantFreshRef.current is false\")\n// console.log(\"eventVariantRef.current is null\")\n// Cleanup timeout on unmount or before next effect\nreturn()=>clearTimeout(timeoutId);}}}},[activeVariant,images.imageTrigger,images.offsetY,props.variantImageIds,selectedOptions]);let variantsTest=get(product,\"variants.edges\");useEffect(()=>{const allCombinations=(get(product,\"variants.edges\")||[]).map(({node:variant})=>({id:variant.id,availableForSale:variant.availableForSale,// Adds key / value pairs for each variant (ie. \"color\": \"Black\" and \"size\": 'M').\n    ...variant.selectedOptions.reduce((accumulator,option)=>({...accumulator,[option.name]:option.value}),{})}));//console.log(\"all Combinations\", allCombinations)\nsetCombinations(allCombinations);},[product]);// An effect to listen for the communication event between the variant selectors (for the quick purchase functionality and else)\nuseEffect(()=>{const handleCommunication=e=>{// console.log(\"handleCommunication e\", e.detail)\n// Ignore cross-instance sync while initializing auto-select to prevent races\nif(isInitializingRef.current)return;const productGid=`gid://shopify/Product/${shopifyProductID}`;const incomingOptions=e.detail.allSelectedOptions;if(e.detail.productId===productGid&&filterVariants?.variantGroups!==\"all\"&&e.detail.instanceId!==instanceIdRef.current&&!e.detail.twoWayGallery){// Always process events for image updates, but control state changes based on purchase action\nconst isPurchaseAction=e.detail.isPurchaseAction;const senderPriority=e.detail.senderPriority||0;const currentPriority=getIncludedOptionNames()[0]||\"\";// console.log(\"Priority check:\", {\n//     senderPriority,\n//     currentPriority,\n//     incomingOptions,\n// })\n// If the sender is a higher-priority selector (e.g., Color), reset lower-priority options\nif(senderPriority===currentPriority){// Keep only the options relevant to this selector and above\n// For example, if this is the Color selector, keep only Color\nconst newSelection={};const included=getIncludedOptionNames();included.forEach(title=>{if(incomingOptions[title]){newSelection[title]=incomingOptions[title];}});// Always update local state for image updates, even for purchase actions\nsetSelectedOptions(newSelection);// console.log(\n//     \"selectedOptions in handleCommunication (replaced)\",\n//     newSelection\n// )\nreturn;}else{// If the event is for a lower-priority option (e.g., Size), merge it with the current selection.\n// Always update local state for image updates, even for purchase actions\n// setSelectedOptions((prev) => ({\n//     ...prev,\n//     ...incomingOptions,\n// }))\n// console.log(\n//     \"selectedOptions in handleCommunication (merged)\",\n//     { prev: selectedOptions, incoming: incomingOptions }\n// )\n// Get the merged options for variant matching (always process for image updates)\nconst merged={...selectedOptions,...incomingOptions};setSelectedOptions(merged);const matchingVariant=getProductVariant(product,merged);// console.log(\"matchingVariant\", matchingVariant)\n// console.log(\"merged\", merged)\nconst allOptions=get(product,\"options\",[]).map(opt=>opt.name);const allOptionsSelected=allOptions.every(optName=>merged[optName]);// console.log(\"allOptionsSelected\", allOptionsSelected)\nif(allOptionsSelected&&matchingVariant){if(productPage&&!isPurchaseAction){// console.log(\"updating Url With Variant\", matchingVariant)\nupdateUrlWithVariant(matchingVariant.id);}// Always dispatch variant change event for image updates, even for purchase actions\nconst activeVariantEvent=new CustomEvent(\"product__active-variant__changed\",{detail:{...matchingVariant,productId:`gid://shopify/Product/${shopifyProductID}`,isCompleteVariant:true,isPurchaseAction:false}});document.dispatchEvent(activeVariantEvent);// console.log(\"active variant event sent\", activeVariantEvent)\n}}}else if(e.detail.productId===productGid&&e.detail.twoWayGallery){// console.log(\"Handling gallery\")\nconst merged={...selectedOptions,...incomingOptions};setSelectedOptions(merged);const matchingVariant=getProductVariant(product,merged);// console.log(\"matchingVariant\", matchingVariant)\n// console.log(\"merged\", merged)\nconst allOptions=get(product,\"options\",[]).map(opt=>opt.name);const allOptionsSelected=allOptions.every(optName=>merged[optName]);// console.log(\"allOptionsSelected\", allOptionsSelected)\nif(allOptionsSelected&&matchingVariant){if(productPage){// console.log(\"updating Url With Variant\", matchingVariant)\nupdateUrlWithVariant(matchingVariant.id);}// Always dispatch variant change event for image updates, even for purchase actions\nconst activeVariantEvent=new CustomEvent(\"product__active-variant__changed\",{detail:{...matchingVariant,productId:`gid://shopify/Product/${shopifyProductID}`,isCompleteVariant:true,isPurchaseAction:false}});document.dispatchEvent(activeVariantEvent);// console.log(\"active variant event sent\", activeVariantEvent)\n}}};window.addEventListener(\"__variant_option_selected\",handleCommunication);return()=>{window.removeEventListener(\"__variant_option_selected\",handleCommunication);};},[shopifyProductID,combinations,autoSelectFirst,action,product,selectedOptions,filterVariants?.variantTitles,productPage]);const renderVariantDropdown=(opt,filteredValues,isLast,valid,invalidMsg,props,dispatchOptionSelectedEvent,selectedOptions,combinations,index,totalCount)=>{return /*#__PURE__*/_jsx(VariantDropdown,{opt:opt,filteredValues:filteredValues,isLast:isLast,valid:valid,invalidMsg:invalidMsg,props:props,dispatchOptionSelectedEvent:dispatchOptionSelectedEvent,selectedOptions:selectedOptions,combinations:combinations,index:index,totalCount:totalCount});};const renderVariantButtons=(opt,filteredValues,isLast,valid,invalidMsg)=>{return /*#__PURE__*/_jsxs(\"div\",{role:\"radiogroup\",\"aria-label\":`Select ${opt.name}`,\"aria-required\":!valid,\"aria-invalid\":!valid,children:[/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",display:props.titleConfigs.visible||props.selectedConfigs.visible?\"flex\":\"none\",justifyContent:props.titleConfigs.font.textAlign===\"center\"?\"center\":props.titleConfigs.font.textAlign===\"right\"?\"flex-end\":\"flex-start\",marginBottom:get(props,\"containerConfigs.gap2\")!==undefined?get(props,\"containerConfigs.gap2\"):get(props,\"titleConfigs.gap\"),overflow:\"visible\"},children:/*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",display:\"flex\",justifyContent:\"flex-start\",alignItems:\"center\",overflow:\"visible\"},children:[props.titleConfigs.visible&&/*#__PURE__*/_jsx(\"p\",{id:`variant-title-${opt.name}`,style:{...get(props,\"titleConfigs.font\"),color:get(props,\"titleConfigs.color\"),whiteSpace:\"nowrap\",overflow:\"visible\",margin:0,textTransform:get(props,\"titleConfigs.textTransform\",\"None\").toLowerCase()},children:(props.titleConfigs.display||\"{{Option}}\").replace(\"{{Option}}\",opt.name)}),props.selectedConfigs.visible&&selectedOptions[opt.name]&&/*#__PURE__*/_jsx(\"p\",{style:{...get(props,\"selectedConfigs.font\"),color:get(props,\"selectedConfigs.color\"),whiteSpace:\"nowrap\",overflow:\"visible\",paddingLeft:props.titleConfigs.visible?`${props.selectedConfigs.gap}px`:0,margin:0,textTransform:get(props,\"selectedConfigs.textTransform\",\"None\").toLowerCase()},children:selectedOptions[opt.name]}),props.selectedConfigs.visible&&props.selectedConfigs.emptyVisible&&!selectedOptions[opt.name]&&/*#__PURE__*/_jsx(\"p\",{style:{...get(props,\"selectedConfigs.font\"),color:get(props,\"selectedConfigs.color\"),whiteSpace:\"nowrap\",overflow:\"visible\",paddingLeft:props.titleConfigs.visible?`${props.selectedConfigs.gap}px`:0,margin:0,textTransform:get(props,\"selectedConfigs.textTransform\",\"None\").toLowerCase()},children:(props.selectedConfigs.emptyText||\"Select {{Option Value}}\").replace(\"{{Option Value}}\",opt.name)})]})}),/*#__PURE__*/_jsxs(\"div\",{style:{display:props.buttonConfigs.layout===\"grid\"?\"grid\":\"flex\",flexDirection:props.buttonConfigs.layout===\"grid\"?undefined:props.buttonConfigs.direction===\"horizontal\"?\"row\":\"column\",flexWrap:props.buttonConfigs.layout===\"grid\"?undefined:props.buttonConfigs.direction===\"horizontal\"?\"wrap\":\"nowrap\",gridTemplateColumns:props.buttonConfigs.layout===\"grid\"?props.buttonConfigs.columns===\"auto\"?(()=>{const maxCols=props.buttonConfigs.maxColumns||4;const gapX=props.buttonConfigs.gap||8;const minWidth=props.buttonConfigs.gridWidth||100;if(maxCols<=1)return\"1fr\";return`repeat(auto-fit, minmax(max(${minWidth}px, calc((100% - ${maxCols-1} * ${gapX}px) / ${maxCols})), 1fr))`;})():filteredValues.length<=1?\"1fr\":`repeat(${props.buttonConfigs.columnCount||3}, 1fr)`:undefined,gap:props.buttonConfigs.layout===\"grid\"?`${props.buttonConfigs.gapY||8}px ${props.buttonConfigs.gap||8}px`:`${props.buttonConfigs.gapY||8}px ${props.buttonConfigs.gap||8}px`,width:\"100%\",maxWidth:undefined,alignItems:props.buttonConfigs.layout===\"grid\"?undefined:props.buttonConfigs.direction===\"vertical\"&&props.buttonConfigs.width?\"stretch\":\"flex-start\"},children:[filteredValues.map((v,i)=>{const isActive=selectedOptions[opt.name]===v;// console.log(\"isActive (button)\", isActive, selectedOptions[opt.name], v)\nlet isAvailableForSale;if(filterVariants?.variantGroups===\"all\"){const filtered=Array.from(Object.entries({...selectedOptions,[opt.name]:v}));isAvailableForSale=combinations.find(combination=>filtered.every(([key,value])=>combination[key]===value)&&combination.availableForSale);// console.log(\"isAvailableForSale\", isAvailableForSale)\n}else{// Handle both update and purchase actions; honor all other current selections\nconst availableValues=Array.from(new Set(combinations.filter(comb=>{if(!comb.availableForSale)return false;const otherSelected=Object.entries(selectedOptions).filter(([key])=>key!==opt.name);return otherSelected.every(([key,value])=>comb[key]===value);}).map(comb=>comb[opt.name]).filter(Boolean)));isAvailableForSale=availableValues.includes(v);// console.log(\"isAvailableForSale\", isAvailableForSale)\n}const canSelect=isAvailableForSale||selectOutOfStock&&!isAvailableForSale;//console.log(\"canSelect\", canSelect)\n// Edge to edge styling - only apply when gap is 0\nconst isLastItem=i===filteredValues.length-1;const gap=Number(props.buttonConfigs.gap);const applyEdgeToEdge=gap===0;const isHorizontal=props.buttonConfigs.direction===\"horizontal\";// Get borders without modification\nconst borderUnselected=get(props,\"buttonConfigs.unselected.border\");const borderSelected=get(props,\"buttonConfigs.selected.border\");const borderDisabled=get(props,\"buttonConfigs.outOfStock.border\");const borderHovered=get(props,\"buttonConfigs.hovered.border\");// Helper to get border style string for each config\nfunction getBorderStyle(borderConfig){if(!borderConfig){// console.log('getBorderStyle: borderConfig is undefined/null');\nreturn undefined;}const{borderWidth,borderStyle,borderColor,isMixed,toggleTitles,top,right,bottom,left}=borderConfig;const isIndividual=toggleTitles===\"Individual\"||isMixed;if(isIndividual){// Use only per-side keys for this state\nreturn{borderTop:`${top??0}px ${borderStyle??\"solid\"} ${borderColor??\"#000\"}`,borderRight:`${right??0}px ${borderStyle??\"solid\"} ${borderColor??\"#000\"}`,borderBottom:`${bottom??0}px ${borderStyle??\"solid\"} ${borderColor??\"#000\"}`,borderLeft:`${left??0}px ${borderStyle??\"solid\"} ${borderColor??\"#000\"}`};}else{// All sides\nconst width=borderWidth?.all??borderWidth??0;return{border:`${width}px ${borderStyle??\"solid\"} ${borderColor??\"#000\"}`};}}// Calculate margin style for edge-to-edge effect\nconst marginStyle={};if(applyEdgeToEdge&&!isLastItem){if(isHorizontal){// For horizontal layout, use negative right margin only\nmarginStyle.marginRight=\"-1px\";}else{// For vertical layout, use negative bottom margin\nmarginStyle.marginBottom=\"-1px\";}}return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:props.buttonConfigs.layout===\"grid\"?\"100%\":\"auto\"},className:\"variant-button-container\",children:/*#__PURE__*/_jsxs(\"button\",{role:\"radio\",\"aria-checked\":isActive,\"aria-label\":`${opt.name} ${v}`,tabIndex:canSelect?0:-1,onKeyDown:e=>{if(e.key===\"Enter\"||e.key===\" \"){e.preventDefault();if(canSelect){dispatchOptionSelectedEvent(opt.name,v);}}else if(e.key===\"Home\"){e.preventDefault();// Navigate to first available button in this radiogroup\nconst radiogroup=e.target.closest('[role=\"radiogroup\"]');const firstAvailable=radiogroup?.querySelector('[role=\"radio\"]:not([aria-disabled=\"true\"])');if(firstAvailable)firstAvailable.focus();}else if(e.key===\"End\"){e.preventDefault();// Navigate to last available button in this radiogroup\nconst radiogroup=e.target.closest('[role=\"radiogroup\"]');const availableButtons=radiogroup?.querySelectorAll('[role=\"radio\"]:not([aria-disabled=\"true\"])');if(availableButtons?.length){availableButtons[availableButtons.length-1].focus();}}else if(e.key===\"ArrowRight\"||e.key===\"ArrowDown\"&&props.buttonConfigs.direction===\"vertical\"){e.preventDefault();// Find next available button, wrapping to beginning if needed\nconst radiogroup=e.target.closest('[role=\"radiogroup\"]');const availableButtons=Array.from(radiogroup?.querySelectorAll('[role=\"radio\"]:not([aria-disabled=\"true\"])')||[]);const currentIndex=availableButtons.indexOf(e.target);const nextIndex=(currentIndex+1)%availableButtons.length;if(availableButtons[nextIndex]){availableButtons[nextIndex].focus();}}else if(e.key===\"ArrowLeft\"||e.key===\"ArrowUp\"&&props.buttonConfigs.direction===\"vertical\"){e.preventDefault();// Find previous available button, wrapping to end if needed\nconst radiogroup=e.target.closest('[role=\"radiogroup\"]');const availableButtons=Array.from(radiogroup?.querySelectorAll('[role=\"radio\"]:not([aria-disabled=\"true\"])')||[]);const currentIndex=availableButtons.indexOf(e.target);const prevIndex=currentIndex===0?availableButtons.length-1:currentIndex-1;if(availableButtons[prevIndex]){availableButtons[prevIndex].focus();}}},style:{padding:get(props,\"buttonConfigs.padding\"),width:props.buttonConfigs.layout===\"grid\"?\"100%\":props.buttonConfigs.direction===\"vertical\"&&props.buttonConfigs.width?\"100%\":\"auto\",height:get(props,\"buttonConfigs.height\")===\"Fixed\"?`${get(props,\"buttonConfigs.fixedHeight\")}px`:\"Fit\",...marginStyle,borderRadius:get(props,\"buttonConfigs.radius\"),backgroundColor:isActive&&!isAvailableForSale?get(props,\"buttonConfigs.selected.background\"):!isAvailableForSale?get(props,\"buttonConfigs.outOfStock.background\"):isActive?get(props,\"buttonConfigs.selected.background\"):get(props,\"buttonConfigs.unselected.background\"),...isActive&&!isAvailableForSale?getBorderStyle(borderSelected):!isAvailableForSale?getBorderStyle(borderDisabled):isActive?getBorderStyle(borderSelected):getBorderStyle(borderUnselected),color:isActive&&!isAvailableForSale?get(props,\"buttonConfigs.selected.color\"):!isAvailableForSale?get(props,\"buttonConfigs.outOfStock.color\"):isActive?get(props,\"buttonConfigs.selected.color\"):get(props,\"buttonConfigs.unselected.color\"),fontFamily:isActive&&!isAvailableForSale?get(props,\"buttonConfigs.selected.font.fontFamily\"):!isAvailableForSale?get(props,\"buttonConfigs.outOfStock.font.fontFamily\"):isActive?get(props,\"buttonConfigs.selected.font.fontFamily\"):get(props,\"buttonConfigs.unselected.font.fontFamily\"),fontSize:isActive&&!isAvailableForSale?get(props,\"buttonConfigs.selected.font.fontSize\"):!isAvailableForSale?get(props,\"buttonConfigs.outOfStock.font.fontSize\"):isActive?get(props,\"buttonConfigs.selected.font.fontSize\"):get(props,\"buttonConfigs.unselected.font.fontSize\"),fontWeight:isActive&&!isAvailableForSale?get(props,\"buttonConfigs.selected.font.fontWeight\"):!isAvailableForSale?get(props,\"buttonConfigs.outOfStock.font.fontWeight\"):isActive?get(props,\"buttonConfigs.selected.font.fontWeight\"):get(props,\"buttonConfigs.unselected.font.fontWeight\"),textTransform:isActive&&!isAvailableForSale?get(props,\"buttonConfigs.selected.textTransform\"):!isAvailableForSale?get(props,\"buttonConfigs.outOfStock.textTransform\"):isActive?get(props,\"buttonConfigs.selected.textTransform\"):get(props,\"buttonConfigs.unselected.textTransform\"),textAlign:isActive&&!isAvailableForSale?get(props,\"buttonConfigs.selected.font.textAlign\"):!isAvailableForSale?get(props,\"buttonConfigs.outOfStock.font.textAlign\"):isActive?get(props,\"buttonConfigs.selected.font.textAlign\"):get(props,\"buttonConfigs.unselected.font.textAlign\"),cursor:canSelect?\"pointer\":\"not-allowed\",overflow:\"hidden\",position:\"relative\"},onClick:canSelect?()=>dispatchOptionSelectedEvent(opt.name,v):undefined,onMouseEnter:e=>{if(canSelect){const button=e.currentTarget;button.style.backgroundColor=get(props,\"buttonConfigs.hovered.background\");const hoveredBorder=getBorderStyle(borderHovered);if(hoveredBorder.border!==undefined){button.style.border=hoveredBorder.border;}else{button.style.borderTop=hoveredBorder.borderTop;button.style.borderRight=hoveredBorder.borderRight;button.style.borderBottom=hoveredBorder.borderBottom;button.style.borderLeft=hoveredBorder.borderLeft;}button.style.color=get(props,\"buttonConfigs.hovered.color\");}},onMouseLeave:e=>{const button=e.currentTarget;// Always clear all border styles before applying new ones\nbutton.style.border=\"\";button.style.borderTop=\"\";button.style.borderRight=\"\";button.style.borderBottom=\"\";button.style.borderLeft=\"\";if(isActive){button.style.backgroundColor=get(props,\"buttonConfigs.selected.background\");const leaveBorder=getBorderStyle(borderSelected);if(leaveBorder&&leaveBorder.border!==undefined){button.style.border=leaveBorder.border??\"\";}else if(leaveBorder){button.style.borderTop=leaveBorder.borderTop??\"\";button.style.borderRight=leaveBorder.borderRight??\"\";button.style.borderBottom=leaveBorder.borderBottom??\"\";button.style.borderLeft=leaveBorder.borderLeft??\"\";}button.style.color=get(props,\"buttonConfigs.selected.color\");}else if(!isAvailableForSale){button.style.backgroundColor=get(props,\"buttonConfigs.outOfStock.background\");const leaveBorder=getBorderStyle(borderDisabled);if(leaveBorder&&leaveBorder.border!==undefined){button.style.border=leaveBorder.border??\"\";}else if(leaveBorder){button.style.borderTop=leaveBorder.borderTop??\"\";button.style.borderRight=leaveBorder.borderRight??\"\";button.style.borderBottom=leaveBorder.borderBottom??\"\";button.style.borderLeft=leaveBorder.borderLeft??\"\";}button.style.color=get(props,\"buttonConfigs.outOfStock.color\");}else{button.style.backgroundColor=get(props,\"buttonConfigs.unselected.background\");const leaveBorder=getBorderStyle(borderUnselected);if(leaveBorder&&leaveBorder.border!==undefined){button.style.border=leaveBorder.border??\"\";}else if(leaveBorder){button.style.borderTop=leaveBorder.borderTop??\"\";button.style.borderRight=leaveBorder.borderRight??\"\";button.style.borderBottom=leaveBorder.borderBottom??\"\";button.style.borderLeft=leaveBorder.borderLeft??\"\";}button.style.color=get(props,\"buttonConfigs.unselected.color\");}},children:[/*#__PURE__*/_jsxs(\"span\",{style:{position:\"relative\",display:\"inline-block\"},children:[v,isActive&&!isAvailableForSale&&get(props,\"buttonConfigs.outOfStock.strike.line\")&&get(props,\"buttonConfigs.outOfStock.strike.size\")===\"text\"&&/*#__PURE__*/_jsx(\"span\",{style:{position:\"absolute\",top:\"50%\",left:\"0%\",width:\"100%\",height:\"1px\",backgroundColor:get(props,\"buttonConfigs.outOfStock.strike.color\"),transform:`translateY(-50%)`,transformOrigin:\"center\",pointerEvents:!canSelect?\"none\":\"auto\"}}),!isActive&&!isAvailableForSale&&get(props,\"buttonConfigs.outOfStock.strike.line\")&&get(props,\"buttonConfigs.outOfStock.strike.size\")===\"text\"&&/*#__PURE__*/_jsx(\"span\",{style:{position:\"absolute\",top:\"50%\",left:\"0%\",width:\"100%\",height:\"1px\",backgroundColor:get(props,\"buttonConfigs.outOfStock.strike.color\"),transform:`translateY(-50%)`,transformOrigin:\"center\",pointerEvents:\"none\"}})]}),isActive&&!isAvailableForSale&&get(props,\"buttonConfigs.outOfStock.strike.line\")&&get(props,\"buttonConfigs.outOfStock.strike.size\")===\"container\"&&/*#__PURE__*/_jsx(\"svg\",{style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",pointerEvents:!canSelect?\"none\":\"auto\"},preserveAspectRatio:\"none\",viewBox:\"0 0 100 100\",children:/*#__PURE__*/_jsx(\"line\",{x1:get(props,\"buttonConfigs.outOfStock.strike.direction\")===\"horizontal\"?\"0\":get(props,\"buttonConfigs.outOfStock.strike.direction\")===\"diagonal-up\"?\"0\":\"0\",y1:get(props,\"buttonConfigs.outOfStock.strike.direction\")===\"horizontal\"?\"50\":get(props,\"buttonConfigs.outOfStock.strike.direction\")===\"diagonal-up\"?\"100\":\"0\",x2:get(props,\"buttonConfigs.outOfStock.strike.direction\")===\"horizontal\"?\"100\":\"100\",y2:get(props,\"buttonConfigs.outOfStock.strike.direction\")===\"horizontal\"?\"50\":get(props,\"buttonConfigs.outOfStock.strike.direction\")===\"diagonal-up\"?\"0\":\"100\",stroke:get(props,\"buttonConfigs.outOfStock.strike.color\"),strokeWidth:\"1\",vectorEffect:\"non-scaling-stroke\"})}),!isActive&&!isAvailableForSale&&get(props,\"buttonConfigs.outOfStock.strike.line\")&&get(props,\"buttonConfigs.outOfStock.strike.size\")===\"container\"&&/*#__PURE__*/_jsx(\"svg\",{style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",pointerEvents:\"none\"},preserveAspectRatio:\"none\",viewBox:\"0 0 100 100\",children:/*#__PURE__*/_jsx(\"line\",{x1:get(props,\"buttonConfigs.outOfStock.strike.direction\")===\"horizontal\"?\"0\":get(props,\"buttonConfigs.outOfStock.strike.direction\")===\"diagonal-up\"?\"0\":\"0\",y1:get(props,\"buttonConfigs.outOfStock.strike.direction\")===\"horizontal\"?\"50\":get(props,\"buttonConfigs.outOfStock.strike.direction\")===\"diagonal-up\"?\"100\":\"0\",x2:get(props,\"buttonConfigs.outOfStock.strike.direction\")===\"horizontal\"?\"100\":\"100\",y2:get(props,\"buttonConfigs.outOfStock.strike.direction\")===\"horizontal\"?\"50\":get(props,\"buttonConfigs.outOfStock.strike.direction\")===\"diagonal-up\"?\"0\":\"100\",stroke:get(props,\"buttonConfigs.outOfStock.strike.color\"),strokeWidth:\"1\",vectorEffect:\"non-scaling-stroke\"})})]})},v);}),!valid&&/*#__PURE__*/_jsx(\"div\",{role:\"alert\",style:{color:\"#FF0000\",fontSize:\"14px\",paddingTop:\"8px\"},children:`\"${opt.name}\" missing`})]})]},opt.name);};// Render color swatches for color variants\n// This creates circular color swatches for the Color/Colour options\n// It will map color names to hex codes using the window.__FcCheckoutConfigs.colors array\n// or fall back to a set of common color codes\nconst renderColorSwatches=(opt,filteredValues,isLast,valid,invalidMsg)=>{// Check if this option should use color swatches by comparing with colorTitles\nconst isSwatchOption=colorTitles.some(title=>title.toLowerCase().trim()===opt.name.toLowerCase().trim());// If this isn't a swatch-enabled option or swatches are disabled, use appropriate renderer\nif(!isSwatchOption||!props.swatches?.colorEnabled){// Use dropdown or buttons\nif(style===\"Dropdown\"){return renderVariantDropdown(opt,filteredValues,isLast,valid,invalidMsg,props,dispatchOptionSelectedEvent,selectedOptions,combinations,get(product,\"options\")?.findIndex(o=>o.name===opt.name)||0,get(product,\"options\")?.length||0);}else{return renderVariantButtons(opt,filteredValues,isLast,valid,invalidMsg);}}const{swatches}=props;return /*#__PURE__*/_jsxs(\"div\",{role:\"radiogroup\",\"aria-label\":`Select ${opt.name}`,\"aria-required\":!valid,\"aria-invalid\":!valid,children:[/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",display:props.titleConfigs.visible||props.selectedConfigs.visible?\"flex\":\"none\",justifyContent:props.titleConfigs.font.textAlign===\"center\"?\"center\":props.titleConfigs.font.textAlign===\"right\"?\"flex-end\":\"flex-start\",marginBottom:get(props,\"containerConfigs.gap2\")!==undefined?get(props,\"containerConfigs.gap2\"):get(props,\"titleConfigs.gap\"),overflow:\"visible\"},children:/*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",display:\"flex\",justifyContent:\"flex-start\",alignItems:\"center\",overflow:\"visible\"},children:[props.titleConfigs.visible&&/*#__PURE__*/_jsx(\"p\",{id:`variant-title-${opt.name}`,style:{...get(props,\"titleConfigs.font\"),color:get(props,\"titleConfigs.color\"),whiteSpace:\"nowrap\",overflow:\"visible\",margin:0,textTransform:get(props,\"titleConfigs.textTransform\",\"None\").toLowerCase()},children:(props.titleConfigs.display||\"{{Option}}\").replace(\"{{Option}}\",opt.name)}),props.selectedConfigs.visible&&selectedOptions[opt.name]&&/*#__PURE__*/_jsx(\"p\",{style:{...get(props,\"selectedConfigs.font\"),color:get(props,\"selectedConfigs.color\"),whiteSpace:\"nowrap\",overflow:\"visible\",paddingLeft:props.titleConfigs.visible?`${props.selectedConfigs.gap}px`:0,margin:0,textTransform:get(props,\"selectedConfigs.textTransform\",\"None\").toLowerCase()},children:selectedOptions[opt.name]}),props.selectedConfigs.visible&&props.selectedConfigs.emptyVisible&&!selectedOptions[opt.name]&&/*#__PURE__*/_jsx(\"p\",{style:{...get(props,\"selectedConfigs.font\"),color:get(props,\"selectedConfigs.color\"),whiteSpace:\"nowrap\",overflow:\"visible\",paddingLeft:props.titleConfigs.visible?`${props.selectedConfigs.gap}px`:0,margin:0,textTransform:get(props,\"selectedConfigs.textTransform\",\"None\").toLowerCase()},children:(props.selectedConfigs.emptyText||\"Select {{Option Value}}\").replace(\"{{Option Value}}\",opt.name)})]})}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"row\",flexWrap:\"wrap\",gap:swatches.gap,width:\"100%\"},children:[filteredValues.map((v,i)=>{const isActive=selectedOptions[opt.name]===v;//console.log(\"isActive\", isActive, selectedOptions[opt.name], v)\nlet isAvailableForSale;if(filterVariants?.variantGroups===\"all\"){const filtered=Array.from(Object.entries({...selectedOptions,[opt.name]:v}));isAvailableForSale=combinations.find(combination=>filtered.every(([key,value])=>combination[key]===value)&&combination.availableForSale);}else{const availableValues=Array.from(new Set(combinations.filter(comb=>// Only filter by other selected options, not the current one\n    comb.availableForSale&&// Only include available variants!\n    Object.entries(selectedOptions).filter(([key])=>key!==opt.name).every(([key,value])=>comb[key]===value)).map(comb=>comb[opt.name]).filter(Boolean)));isAvailableForSale=availableValues.includes(v);}const canSelect=isAvailableForSale||selectOutOfStock&&!isAvailableForSale;//console.log(\"canSelect\", canSelect)\n// Get the hex color for this color name\nconst colorName=v.toLowerCase();const hexColor=colorHexMap.get(colorName)||\"#CCCCCC\";// Get the current state's border style\nconst getStateBorder=()=>{if(isActive&&!isAvailableForSale){return swatches.selected.border;}if(!isAvailableForSale){return swatches.outOfStock.border;}if(isActive){return swatches.selected.border;}return swatches.unselected.border;};const getStateBackground=()=>{if(isActive&&!isAvailableForSale){return swatches.selected.background;}if(!isAvailableForSale){return swatches.outOfStock.background;}if(isActive){return swatches.selected.background;}return swatches.unselected.background;};const border=getStateBorder();const background=getStateBackground();return /*#__PURE__*/_jsxs(\"div\",{className:\"variant-swatch-container\",style:{position:\"relative\"},children:[/*#__PURE__*/_jsx(\"button\",{role:\"radio\",\"aria-checked\":isActive,\"aria-label\":`${opt.name} ${v}${!isAvailableForSale?\" (Out of Stock)\":\"\"}`,title:v,disabled:!isAvailableForSale&&!selectOutOfStock,onClick:()=>{if(isAvailableForSale||selectOutOfStock){dispatchOptionSelectedEvent(opt.name,v);}},tabIndex:isAvailableForSale||selectOutOfStock?0:-1,onKeyDown:e=>{if(e.key===\"Enter\"||e.key===\" \"){e.preventDefault();if(canSelect){dispatchOptionSelectedEvent(opt.name,v);}}else if(e.key===\"Home\"){e.preventDefault();const radiogroup=e.target.closest('[role=\"radiogroup\"]');const firstAvailable=radiogroup?.querySelector('[role=\"radio\"]:not([disabled])');if(firstAvailable)firstAvailable.focus();}else if(e.key===\"End\"){e.preventDefault();const radiogroup=e.target.closest('[role=\"radiogroup\"]');const availableButtons=radiogroup?.querySelectorAll('[role=\"radio\"]:not([disabled])');if(availableButtons?.length){availableButtons[availableButtons.length-1].focus();}}else if(e.key===\"ArrowRight\"||e.key===\"ArrowDown\"){e.preventDefault();const radiogroup=e.target.closest('[role=\"radiogroup\"]');const availableButtons=Array.from(radiogroup?.querySelectorAll('[role=\"radio\"]:not([disabled])')||[]);const currentIndex=availableButtons.indexOf(e.target);const nextIndex=(currentIndex+1)%availableButtons.length;if(availableButtons[nextIndex]){availableButtons[nextIndex].focus();}}else if(e.key===\"ArrowLeft\"||e.key===\"ArrowUp\"){e.preventDefault();const radiogroup=e.target.closest('[role=\"radiogroup\"]');const availableButtons=Array.from(radiogroup?.querySelectorAll('[role=\"radio\"]:not([disabled])')||[]);const currentIndex=availableButtons.indexOf(e.target);const prevIndex=currentIndex===0?availableButtons.length-1:currentIndex-1;if(availableButtons[prevIndex]){availableButtons[prevIndex].focus();}}},onMouseEnter:e=>{if(canSelect){const button=e.currentTarget;const{borderWidth,borderStyle}=swatches.hovered.border;button.style.border=`${borderWidth}px ${borderStyle} ${swatches.hovered.border.borderColor}`;button.style.background=swatches.hovered.background;}},onMouseLeave:e=>{const button=e.currentTarget;const border=getStateBorder();const background=getStateBackground();button.style.border=`${border.borderWidth}px ${border.borderStyle} ${border.borderColor}`;button.style.background=background;},style:{width:swatches.width,height:swatches.height,borderRadius:swatches.radius,border:`${border.borderWidth}px ${border.borderStyle} ${border.borderColor}`,padding:swatches.padding,cursor:isAvailableForSale||selectOutOfStock?\"pointer\":\"not-allowed\",background:background,position:\"relative\"},children:/*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",height:\"100%\",borderRadius:swatches.radius,backgroundColor:hexColor,opacity:!isAvailableForSale?swatches.outOfStock.opacity:1,position:\"relative\",overflow:\"hidden\"},children:[isActive&&!isAvailableForSale&&get(props,\"swatches.outOfStock.strike.line\")&&/*#__PURE__*/_jsx(\"svg\",{style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",pointerEvents:!canSelect?\"none\":\"auto\"},viewBox:\"0 0 100 100\",preserveAspectRatio:\"none\",children:/*#__PURE__*/_jsx(\"line\",{x1:get(props,\"swatches.outOfStock.strike.direction\")===\"horizontal\"?0:get(props,\"swatches.outOfStock.strike.direction\")===\"diagonal-up\"?0:0,y1:get(props,\"swatches.outOfStock.strike.direction\")===\"horizontal\"?50:get(props,\"swatches.outOfStock.strike.direction\")===\"diagonal-up\"?100:0,x2:100,y2:get(props,\"swatches.outOfStock.strike.direction\")===\"horizontal\"?50:get(props,\"swatches.outOfStock.strike.direction\")===\"diagonal-up\"?0:get(props,\"swatches.outOfStock.strike.direction\")===\"diagonal-down\"?100:100,stroke:get(props,\"swatches.outOfStock.strike.color\"),strokeWidth:\"1\",vectorEffect:\"non-scaling-stroke\"})}),!isActive&&!isAvailableForSale&&get(props,\"swatches.outOfStock.strike.line\")&&/*#__PURE__*/_jsx(\"svg\",{style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",pointerEvents:\"none\"},viewBox:\"0 0 100 100\",preserveAspectRatio:\"none\",children:/*#__PURE__*/_jsx(\"line\",{x1:get(props,\"swatches.outOfStock.strike.direction\")===\"horizontal\"?0:get(props,\"swatches.outOfStock.strike.direction\")===\"diagonal-up\"?0:0,y1:get(props,\"swatches.outOfStock.strike.direction\")===\"horizontal\"?50:get(props,\"swatches.outOfStock.strike.direction\")===\"diagonal-up\"?100:0,x2:100,y2:get(props,\"swatches.outOfStock.strike.direction\")===\"horizontal\"?50:get(props,\"swatches.outOfStock.strike.direction\")===\"diagonal-up\"?0:get(props,\"swatches.outOfStock.strike.direction\")===\"diagonal-down\"?100:100,stroke:get(props,\"swatches.outOfStock.strike.color\"),strokeWidth:\"1\",vectorEffect:\"non-scaling-stroke\"})})]})}),/*#__PURE__*/_jsx(\"div\",{className:\"swatch-tooltip\",style:{position:\"absolute\",top:\"100%\",left:\"50%\",transform:\"translateX(-50%)\",backgroundColor:\"rgba(0, 0, 0, 0.8)\",color:\"#FFFFFF\",padding:\"4px 8px\",borderRadius:\"4px\",fontSize:\"12px\",marginTop:\"4px\",whiteSpace:\"nowrap\",opacity:0,visibility:\"hidden\",transition:\"opacity 0.2s ease-in-out, visibility 0.2s ease-in-out\",zIndex:10},children:v})]},v);}),!valid&&/*#__PURE__*/_jsx(\"div\",{role:\"alert\",style:{color:\"#FF0000\",fontSize:\"14px\",paddingTop:\"8px\"},children:`\"${opt.name}\" missing`})]})]},opt.name);};// Render image swatches for image variants\nconst renderImageSwatches=(opt,filteredValues,isLast,valid,invalidMsg)=>{// Get image titles from props\nconst variantImageTitles=props.imageTitles||[\"Pattern\"];// If this isn't a swatch-enabled option or swatches are disabled, use regular buttons\nconst isSwatchOption=variantImageTitles.some(title=>title.toLowerCase().trim()===opt.name.toLowerCase().trim());if(!isSwatchOption||!props.imageSwatches?.image){return renderVariantButtons(opt,filteredValues,isLast,valid,invalidMsg);}// Get the appropriate style config based on whether we're inheriting or customizing\nconst useCustomStyles=props.imageSwatches.imageStyles===\"customize\";const swatchConfig={gap:useCustomStyles?props.imageSwatches.imageGap:props.swatches?.gap??8,height:useCustomStyles?props.imageSwatches.imageHeight:props.swatches?.height??40,width:useCustomStyles?props.imageSwatches.imageWidth:props.swatches?.width??40,radius:useCustomStyles?props.imageSwatches.imageRadius:props.swatches?.radius??\"50%\",padding:useCustomStyles?props.imageSwatches.imagePadding:props.swatches?.padding??2,unselected:useCustomStyles?props.imageSwatches.imageUnselected:props.swatches?.unselected??{border:{borderWidth:2,borderStyle:\"solid\",borderColor:\"#FFFFFF\"},background:\"#FFFFFF00\"},hovered:useCustomStyles?props.imageSwatches.imageHovered:props.swatches?.hovered??{border:{borderWidth:2,borderStyle:\"solid\",borderColor:\"#CCCCCC\"},background:\"#FFFFFF00\"},selected:useCustomStyles?props.imageSwatches.imageSelected:props.swatches?.selected??{border:{borderWidth:2,borderStyle:\"solid\",borderColor:\"#000000\"},background:\"#FFFFFF00\"},outOfStock:useCustomStyles?props.imageSwatches.imageOutOfStock:props.swatches?.outOfStock??{border:{borderWidth:2,borderStyle:\"solid\",borderColor:\"#FFFFFF\"},opacity:.5,background:\"#FFFFFF00\",strike:{line:false,color:\"rgba(0, 0, 0, 0.16)\",direction:\"diagonal-down\"}}};return /*#__PURE__*/_jsxs(\"div\",{role:\"radiogroup\",\"aria-label\":`Select ${opt.name}`,\"aria-required\":!valid,\"aria-invalid\":!valid,children:[/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",display:props.titleConfigs.visible||props.selectedConfigs.visible?\"flex\":\"none\",justifyContent:props.titleConfigs.font.textAlign===\"center\"?\"center\":props.titleConfigs.font.textAlign===\"right\"?\"flex-end\":\"flex-start\",marginBottom:get(props,\"containerConfigs.gap2\")!==undefined?get(props,\"containerConfigs.gap2\"):get(props,\"titleConfigs.gap\"),overflow:\"visible\"},children:/*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",display:\"flex\",justifyContent:\"flex-start\",alignItems:\"center\",overflow:\"visible\"},children:[props.titleConfigs.visible&&/*#__PURE__*/_jsx(\"p\",{id:`variant-title-${opt.name}`,style:{...get(props,\"titleConfigs.font\"),color:get(props,\"titleConfigs.color\"),whiteSpace:\"nowrap\",overflow:\"visible\",margin:0,textTransform:get(props,\"titleConfigs.textTransform\",\"None\").toLowerCase()},children:(props.titleConfigs.display||\"{{Option}}\").replace(\"{{Option}}\",opt.name)}),props.selectedConfigs.visible&&selectedOptions[opt.name]&&/*#__PURE__*/_jsx(\"p\",{style:{...get(props,\"selectedConfigs.font\"),color:get(props,\"selectedConfigs.color\"),whiteSpace:\"nowrap\",overflow:\"visible\",paddingLeft:props.titleConfigs.visible?`${props.selectedConfigs.gap}px`:0,margin:0,textTransform:get(props,\"selectedConfigs.textTransform\",\"None\").toLowerCase()},children:selectedOptions[opt.name]}),props.selectedConfigs.visible&&props.selectedConfigs.emptyVisible&&!selectedOptions[opt.name]&&/*#__PURE__*/_jsx(\"p\",{style:{...get(props,\"selectedConfigs.font\"),color:get(props,\"selectedConfigs.color\"),whiteSpace:\"nowrap\",overflow:\"visible\",paddingLeft:props.titleConfigs.visible?`${props.selectedConfigs.gap}px`:0,margin:0,textTransform:get(props,\"selectedConfigs.textTransform\",\"None\").toLowerCase()},children:(props.selectedConfigs.emptyText||\"Select {{Option Value}}\").replace(\"{{Option Value}}\",opt.name)})]})}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"row\",flexWrap:\"wrap\",gap:swatchConfig.gap,width:\"100%\"},children:[filteredValues.map((v,i)=>{const isActive=selectedOptions[opt.name]===v;const filtered=Array.from(Object.entries({...selectedOptions,[opt.name]:v}));const isAvailableForSale=combinations.find(combination=>filtered.every(([key,value])=>combination[key]===value)&&combination.availableForSale);const canSelect=isAvailableForSale||selectOutOfStock&&!isAvailableForSale;// Get the image URL for this variant name from swatch store\nconst imageValue=swatchImages.find(img=>img.name.toLowerCase()===v.toLowerCase());const imageUrl=imageValue?.url||\"\";// Get the current state's border style\nconst getStateBorder=()=>{if(isActive&&!isAvailableForSale){return swatchConfig.selected.border;}if(!isAvailableForSale){return swatchConfig.outOfStock.border;}if(isActive){return swatchConfig.selected.border;}return swatchConfig.unselected.border;};const getStateBackground=()=>{if(isActive&&!isAvailableForSale){return swatchConfig.selected.background;}if(!isAvailableForSale){return swatchConfig.outOfStock.background;}if(isActive){return swatchConfig.selected.background;}return swatchConfig.unselected.background;};const border=getStateBorder();const background=getStateBackground();return /*#__PURE__*/_jsxs(\"div\",{className:\"variant-swatch-container\",style:{position:\"relative\"},children:[/*#__PURE__*/_jsx(\"button\",{role:\"radio\",\"aria-checked\":isActive,\"aria-label\":`${opt.name} ${v}${!isAvailableForSale?\" (Out of Stock)\":\"\"}`,title:v,disabled:!isAvailableForSale&&!selectOutOfStock,onClick:()=>{if(isAvailableForSale||selectOutOfStock){dispatchOptionSelectedEvent(opt.name,v);}},tabIndex:isAvailableForSale||selectOutOfStock?0:-1,onMouseEnter:e=>{if(isAvailableForSale||selectOutOfStock){const button=e.currentTarget;const{borderWidth,borderStyle}=swatchConfig.hovered.border;button.style.border=`${borderWidth}px ${borderStyle} ${swatchConfig.hovered.border.borderColor}`;button.style.background=swatchConfig.hovered.background;}},onMouseLeave:e=>{const button=e.currentTarget;const border=getStateBorder();const background=getStateBackground();button.style.border=`${border.borderWidth}px ${border.borderStyle} ${border.borderColor}`;button.style.background=background;},style:{width:swatchConfig.width,height:swatchConfig.height,borderRadius:swatchConfig.radius,border:`${border.borderWidth}px ${border.borderStyle} ${border.borderColor}`,padding:swatchConfig.padding,cursor:isAvailableForSale||selectOutOfStock?\"pointer\":\"not-allowed\",background:background,position:\"relative\"},children:/*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",height:\"100%\",borderRadius:swatchConfig.radius,backgroundImage:`url(${imageUrl})`,backgroundSize:\"cover\",backgroundPosition:\"center\",opacity:!isAvailableForSale?swatchConfig.outOfStock.opacity:1,position:\"relative\",overflow:\"hidden\"},children:[!isActive&&!isAvailableForSale&&swatchConfig.outOfStock.strike?.line&&/*#__PURE__*/_jsx(\"svg\",{style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",pointerEvents:\"none\"},viewBox:\"0 0 100 100\",preserveAspectRatio:\"none\",children:/*#__PURE__*/_jsx(\"line\",{x1:swatchConfig.outOfStock.strike?.direction===\"horizontal\"?0:swatchConfig.outOfStock.strike?.direction===\"diagonal-up\"?0:0,y1:swatchConfig.outOfStock.strike?.direction===\"horizontal\"?50:swatchConfig.outOfStock.strike?.direction===\"diagonal-up\"?100:0,x2:100,y2:swatchConfig.outOfStock.strike?.direction===\"horizontal\"?50:swatchConfig.outOfStock.strike?.direction===\"diagonal-up\"?0:100,stroke:swatchConfig.outOfStock.strike?.color,strokeWidth:\"1\",vectorEffect:\"non-scaling-stroke\"})}),isActive&&!isAvailableForSale&&swatchConfig.outOfStock.strike?.line&&/*#__PURE__*/_jsx(\"svg\",{style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",pointerEvents:!canSelect?\"none\":\"auto\"},viewBox:\"0 0 100 100\",preserveAspectRatio:\"none\",children:/*#__PURE__*/_jsx(\"line\",{x1:swatchConfig.outOfStock.strike?.direction===\"horizontal\"?0:swatchConfig.outOfStock.strike?.direction===\"diagonal-up\"?0:0,y1:swatchConfig.outOfStock.strike?.direction===\"horizontal\"?50:swatchConfig.outOfStock.strike?.direction===\"diagonal-up\"?100:0,x2:100,y2:swatchConfig.outOfStock.strike?.direction===\"horizontal\"?50:swatchConfig.outOfStock.strike?.direction===\"diagonal-up\"?0:100,stroke:swatchConfig.outOfStock.strike?.color,strokeWidth:\"1\",vectorEffect:\"non-scaling-stroke\"})})]})}),/*#__PURE__*/_jsx(\"div\",{className:\"swatch-tooltip\",style:{position:\"absolute\",top:\"100%\",left:\"50%\",transform:\"translateX(-50%)\",backgroundColor:\"rgba(0, 0, 0, 0.8)\",color:\"#FFFFFF\",padding:\"4px 8px\",borderRadius:\"4px\",fontSize:\"12px\",marginTop:\"4px\",whiteSpace:\"nowrap\",opacity:0,visibility:\"hidden\",transition:\"opacity 0.2s ease-in-out, visibility 0.2s ease-in-out\",zIndex:10},children:v})]},v);}),!valid&&/*#__PURE__*/_jsx(\"div\",{role:\"alert\",style:{color:\"#FF0000\",fontSize:\"14px\",paddingTop:\"8px\"},children:`\"${opt.name}\" missing`})]})]},opt.name);};const renderVariantImages=(opt,filteredValues,isLast,valid,invalidMsg)=>{// Use props.variantImageTitles to determine when to show the Variant Images UI\nconst variantImageTitles=props.variantImageTitles||[\"Amount\"];// If this isn't a swatch-enabled option or swatches are disabled, use regular buttons\nconst isSwatchOption=variantImageTitles.some(title=>title.toLowerCase().trim()===opt.name.toLowerCase().trim());// console.log(\"isSwatchOption for\", opt.name, \":\", isSwatchOption, props.variantImages?.image)\nif(!isSwatchOption||!props.variantImages?.image){return renderVariantButtons(opt,filteredValues,isLast,valid,invalidMsg);}// Parse variantImageIds mapping if present\nlet variantImageIdMap=new Map;if(props.variantImageIds){// Use the same parsing function as the main component\nvariantImageIdMap=parseVariantImageIds(props.variantImageIds);}// Helper to get image URL from product images by image number\nconst getImageUrlByNumber=imageNumber=>{if(!imageNumber||!product?.images?.edges)return\"\";const idx=parseInt(imageNumber,10)-1;return product.images.edges[idx]?.node?.url||\"\";};// Get the appropriate style config based on whether we're inheriting or customizing\nlet swatchConfig;if(props.variantImages.imageStyles===\"customize\"){swatchConfig={gap:props.variantImages.imageGap,height:props.variantImages.imageHeight,width:props.variantImages.imageWidth,radius:props.variantImages.imageRadius,padding:props.variantImages.imagePadding,unselected:props.variantImages.imageUnselected,hovered:props.variantImages.imageHovered,selected:props.variantImages.imageSelected,imageOutOfStock:props.variantImages.imageOutOfStock};}else if(props.variantImages.imageStyles===\"inherit\"){if(props.imageSwatches?.image&&props.imageSwatches?.imageStyles){swatchConfig={gap:props.imageSwatches.imageGap,height:props.imageSwatches.imageHeight,width:props.imageSwatches.imageWidth,radius:props.imageSwatches.imageRadius,padding:props.imageSwatches.imagePadding,unselected:props.imageSwatches.imageUnselected,hovered:props.imageSwatches.imageHovered,selected:props.imageSwatches.imageSelected,imageOutOfStock:props.imageSwatches.imageOutOfStock};}else if(props.swatches){swatchConfig={gap:props.swatches.gap??8,height:props.swatches.height??40,width:props.swatches.width??40,radius:props.swatches.radius??\"50%\",padding:props.swatches.padding??2,unselected:props.swatches.unselected??{border:{borderWidth:2,borderStyle:\"solid\",borderColor:\"#FFFFFF\"},background:\"#FFFFFF00\"},hovered:props.swatches.hovered??{border:{borderWidth:2,borderStyle:\"solid\",borderColor:\"#CCCCCC\"},background:\"#FFFFFF00\"},selected:props.swatches.selected??{border:{borderWidth:2,borderStyle:\"solid\",borderColor:\"#000000\"},background:\"#FFFFFF00\"},imageOutOfStock:props.swatches.outOfStock??{border:{borderWidth:2,borderStyle:\"solid\",borderColor:\"#FFFFFF\"},opacity:.5,background:\"#FFFFFF00\",strike:{line:false,color:\"rgba(0, 0, 0, 0.16)\",direction:\"diagonal-down\"}}};}else{// fallback to default\nswatchConfig={gap:8,height:40,width:40,radius:\"50%\",padding:2,unselected:{border:{borderWidth:2,borderStyle:\"solid\",borderColor:\"#FFFFFF\"},background:\"#FFFFFF00\"},hovered:{border:{borderWidth:2,borderStyle:\"solid\",borderColor:\"#CCCCCC\"},background:\"#FFFFFF00\"},selected:{border:{borderWidth:2,borderStyle:\"solid\",borderColor:\"#000000\"},background:\"#FFFFFF00\"},imageOutOfStock:{border:{borderWidth:2,borderStyle:\"solid\",borderColor:\"#FFFFFF\"},opacity:.5,background:\"#FFFFFF00\",strike:{line:false,color:\"rgba(0, 0, 0, 0.16)\",direction:\"diagonal-down\"}}};}}else{// fallback to default\nswatchConfig={gap:8,height:40,width:40,radius:\"50%\",padding:2,unselected:{border:{borderWidth:2,borderStyle:\"solid\",borderColor:\"#FFFFFF\"},background:\"#FFFFFF00\"},hovered:{border:{borderWidth:2,borderStyle:\"solid\",borderColor:\"#CCCCCC\"},background:\"#FFFFFF00\"},selected:{border:{borderWidth:2,borderStyle:\"solid\",borderColor:\"#000000\"},background:\"#FFFFFF00\"},imageOutOfStock:{border:{borderWidth:2,borderStyle:\"solid\",borderColor:\"#FFFFFF\"},opacity:.5,background:\"#FFFFFF00\",strike:{line:false,color:\"rgba(0, 0, 0, 0.16)\",direction:\"diagonal-down\"}}};}return /*#__PURE__*/_jsxs(\"div\",{role:\"radiogroup\",\"aria-label\":`Select ${opt.name}`,\"aria-required\":!valid,\"aria-invalid\":!valid,children:[/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",display:props.titleConfigs.visible||props.selectedConfigs.visible?\"flex\":\"none\",justifyContent:props.titleConfigs.font.textAlign===\"center\"?\"center\":props.titleConfigs.font.textAlign===\"right\"?\"flex-end\":\"flex-start\",marginBottom:get(props,\"containerConfigs.gap2\")!==undefined?get(props,\"containerConfigs.gap2\"):get(props,\"titleConfigs.gap\"),overflow:\"visible\"},children:/*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",display:\"flex\",justifyContent:\"flex-start\",alignItems:\"center\",overflow:\"visible\"},children:[props.titleConfigs.visible&&/*#__PURE__*/_jsx(\"p\",{id:`variant-title-${opt.name}`,style:{...get(props,\"titleConfigs.font\"),color:get(props,\"titleConfigs.color\"),whiteSpace:\"nowrap\",overflow:\"visible\",margin:0,textTransform:get(props,\"titleConfigs.textTransform\",\"None\").toLowerCase()},children:(props.titleConfigs.display||\"{{Option}}\").replace(\"{{Option}}\",opt.name)}),props.selectedConfigs.visible&&selectedOptions[opt.name]&&/*#__PURE__*/_jsx(\"p\",{style:{...get(props,\"selectedConfigs.font\"),color:get(props,\"selectedConfigs.color\"),whiteSpace:\"nowrap\",overflow:\"visible\",paddingLeft:props.titleConfigs.visible?`${props.selectedConfigs.gap}px`:0,margin:0,textTransform:get(props,\"selectedConfigs.textTransform\",\"None\").toLowerCase()},children:selectedOptions[opt.name]}),props.selectedConfigs.visible&&props.selectedConfigs.emptyVisible&&!selectedOptions[opt.name]&&/*#__PURE__*/_jsx(\"p\",{style:{...get(props,\"selectedConfigs.font\"),color:get(props,\"selectedConfigs.color\"),whiteSpace:\"nowrap\",overflow:\"visible\",paddingLeft:props.titleConfigs.visible?`${props.selectedConfigs.gap}px`:0,margin:0,textTransform:get(props,\"selectedConfigs.textTransform\",\"None\").toLowerCase()},children:(props.selectedConfigs.emptyText||\"Select {{Option Value}}\").replace(\"{{Option Value}}\",opt.name)})]})}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"row\",flexWrap:\"wrap\",gap:swatchConfig.gap,width:\"100%\"},children:[filteredValues.map((v,i)=>{const isActive=selectedOptions[opt.name]===v;const filtered=Array.from(Object.entries({...selectedOptions,[opt.name]:v}));const isAvailableForSale=combinations.find(combination=>filtered.every(([key,value])=>combination[key]===value)&&combination.availableForSale);const canSelect=isAvailableForSale||selectOutOfStock&&!isAvailableForSale;// Get the variant for this value\nconst variant=combinations.find(combination=>filtered.every(([key,value])=>combination[key]===value));const variantId=variant?.id?.split(\"/\").pop();// Try to get the image from the variant's image.url\nlet variantImageUrl;let variantEdge=undefined;if(variantId&&product?.variants?.edges){variantEdge=product.variants.edges.find(({node})=>node.id.split(\"/\").pop()===variantId);}// Use mapping to get the image number for this variant, and use the corresponding image prop\nlet imageNumber=undefined;if(variantId&&variantImageIdMap.size>0){// console.log(\"variantId:\", variantId)\nimageNumber=variantImageIdMap.get(variantId);// console.log(\"imageNumber:\", imageNumber)\nif(imageNumber){const imageProp=props[`image${imageNumber}`];// console.log(\"imageProp:\", imageProp)\nif(imageProp){variantImageUrl=imageProp;// console.log(\"variantImageUrl (mapping):\", variantImageUrl)\n}}}// console.log(\"variantEdge\", variantEdge)\n// console.log(\"variantImageUrl\", variantImageUrl)\n// Fallback: use variant image.url if no mapping or prop found\nif(!variantImageUrl&&variantEdge&&variantEdge.node?.image?.url){variantImageUrl=variantEdge.node.image.url;// console.log(\"variantImageUrl (fallback):\", variantImageUrl)\n}// LOGGING for debugging\n// console.log(\"[VariantImages Debug]\", {\n//     value: v,\n//     selectedOptions,\n//     filtered,\n//     variant,\n//     variantId,\n//     variantEdge,\n//     variantImageUrlFromVariant:\n//         variantEdge && variantEdge.node\n//             ? variantEdge.node.image?.url\n//             : undefined,\n//     mappedImageNumber: imageNumber,\n//     mappedImageUrl: variantImageUrl,\n//     finalImageUrl: variantImageUrl,\n//     productImages: product?.images?.edges,\n//     variantImageIdMap: Array.from(\n//         variantImageIdMap.entries()\n//     ),\n// })\n// Get the current state's border style\n// const getStateBorder = () => {\n//     if (!canSelect) {\n//         return swatchConfig.imageOutOfStock.border\n//     }\n//     if (isActive) {\n//         return swatchConfig.selected.border\n//     }\n//     return swatchConfig.unselected.border\n// }\n// const border = getStateBorder()\n// Get the current state's border style\nconst getStateBorder=()=>{if(isActive&&!isAvailableForSale){return swatchConfig.selected.border;}if(!isAvailableForSale){return swatchConfig.imageOutOfStock.border;}if(isActive){return swatchConfig.selected.border;}return swatchConfig.unselected.border;};const getStateBackground=()=>{if(isActive&&!isAvailableForSale){return swatchConfig.selected.background;}if(!isAvailableForSale){return swatchConfig.imageOutOfStock.background;}if(isActive){return swatchConfig.selected.background;}return swatchConfig.unselected.background;};const border=getStateBorder();const background=getStateBackground();return /*#__PURE__*/_jsxs(\"div\",{className:\"variant-swatch-container\",style:{position:\"relative\"},children:[/*#__PURE__*/_jsx(\"button\",{role:\"radio\",\"aria-checked\":isActive,\"aria-label\":`${opt.name} ${v}${!canSelect?\" (Out of Stock)\":\"\"}`,title:v,disabled:!canSelect,onClick:()=>{if(canSelect){dispatchOptionSelectedEvent(opt.name,v);}},tabIndex:canSelect?0:-1,onMouseEnter:e=>{if(canSelect){const button=e.currentTarget;const{borderWidth,borderStyle}=swatchConfig.hovered.border;button.style.border=`${borderWidth}px ${borderStyle} ${swatchConfig.hovered.border.borderColor}`;button.style.background=swatchConfig.hovered.background;}},onMouseLeave:e=>{const button=e.currentTarget;const border=getStateBorder();const background=getStateBackground();button.style.border=`${border.borderWidth}px ${border.borderStyle} ${border.borderColor}`;button.style.background=background;},style:{width:swatchConfig.width,height:swatchConfig.height,borderRadius:swatchConfig.radius,border:`${border.borderWidth}px ${border.borderStyle} ${border.borderColor}`,padding:swatchConfig.padding,cursor:canSelect?\"pointer\":\"not-allowed\",// background: \"none\",\nbackground:background,position:\"relative\"},children:/*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",height:\"100%\",borderRadius:swatchConfig.radius,backgroundImage:variantImageUrl?`url(${variantImageUrl})`:undefined,backgroundSize:\"cover\",backgroundPosition:\"center\",opacity:!isAvailableForSale?swatchConfig.imageOutOfStock.opacity:1,backgroundColor:!variantImageUrl?\"#F0F0F0\":undefined,position:\"relative\",overflow:\"hidden\"},children:[!isActive&&!isAvailableForSale&&/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",background:swatchConfig.imageOutOfStock?.background||\"FFFFFF80\",opacity:swatchConfig.imageOutOfStock.opacity,borderRadius:swatchConfig.radius,pointerEvents:\"none\",zIndex:1}}),isActive&&!isAvailableForSale&&swatchConfig.imageOutOfStock.strike?.line&&/*#__PURE__*/_jsx(\"svg\",{style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",pointerEvents:!canSelect?\"none\":\"auto\"},viewBox:\"0 0 100 100\",preserveAspectRatio:\"none\",children:/*#__PURE__*/_jsx(\"line\",{x1:swatchConfig.imageOutOfStock.strike?.direction===\"horizontal\"?0:swatchConfig.imageOutOfStock.strike?.direction===\"diagonal-up\"?0:0,y1:swatchConfig.imageOutOfStock.strike?.direction===\"horizontal\"?50:swatchConfig.imageOutOfStock.strike?.direction===\"diagonal-up\"?100:0,x2:100,y2:swatchConfig.imageOutOfStock.strike?.direction===\"horizontal\"?50:swatchConfig.imageOutOfStock.strike?.direction===\"diagonal-up\"?0:100,stroke:swatchConfig.imageOutOfStock.strike?.color,strokeWidth:\"1\",vectorEffect:\"non-scaling-stroke\"})}),!isActive&&!isAvailableForSale&&swatchConfig.imageOutOfStock.strike?.line&&/*#__PURE__*/_jsx(\"svg\",{style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",pointerEvents:\"none\"},viewBox:\"0 0 100 100\",preserveAspectRatio:\"none\",children:/*#__PURE__*/_jsx(\"line\",{x1:swatchConfig.imageOutOfStock.strike?.direction===\"horizontal\"?0:swatchConfig.imageOutOfStock.strike?.direction===\"diagonal-up\"?0:0,y1:swatchConfig.imageOutOfStock.strike?.direction===\"horizontal\"?50:swatchConfig.imageOutOfStock.strike?.direction===\"diagonal-up\"?100:0,x2:100,y2:swatchConfig.imageOutOfStock.strike?.direction===\"horizontal\"?50:swatchConfig.imageOutOfStock.strike?.direction===\"diagonal-up\"?0:100,stroke:swatchConfig.imageOutOfStock.strike?.color,strokeWidth:\"1\",vectorEffect:\"non-scaling-stroke\"})})]})}),/*#__PURE__*/_jsx(\"div\",{className:\"swatch-tooltip\",style:{position:\"absolute\",top:\"100%\",left:\"50%\",transform:\"translateX(-50%)\",backgroundColor:\"rgba(0, 0, 0, 0.8)\",color:\"#FFFFFF\",padding:\"4px 8px\",borderRadius:\"4px\",fontSize:\"12px\",marginTop:\"4px\",whiteSpace:\"nowrap\",opacity:0,visibility:\"hidden\",transition:\"opacity 0.2s ease-in-out, visibility 0.2s ease-in-out\",zIndex:10},children:v})]},v);}),!valid&&/*#__PURE__*/_jsx(\"div\",{role:\"alert\",style:{color:\"#FF0000\",fontSize:\"14px\",paddingTop:\"8px\"},children:`\"${opt.name}\" missing`})]})]},opt.name);};const productHasOptions=product=>{return product&&Array.isArray(get(product,\"options\"))&&get(product,\"options\",[]).length>0&&!(get(product,\"options\",[]).length===1&&get(product,\"options.0.name\")===\"Title\"&&get(product,\"options.0.values.0\")===\"Default Title\");};// Check if we should hide variants\nconst shouldHideVariants=!Array.isArray(get(product,\"variants.edges\"))||!showSingleVariants&&(get(product,\"variants.edges\")||[]).length<=1||!productHasOptions(product)||isCanvas&&variants===\"None\";// If product is set to \"404\", show nothing\nif(product===\"404\"||shouldHideVariants){return null;}// Remove the getConfig function since we're not using FcCheckoutConfigs anymore\nconst getConfig=(key,fallback)=>{return fallback;};return /*#__PURE__*/_jsx(\"div\",{ref:containerRef,className:\"fc-product-variants-container\",style:{padding:props.containerConfigs.padding,display:\"flex\",flexDirection:props.containerConfigs.direction===\"horizontal\"?\"row\":\"column\",flexWrap:props.containerConfigs.direction===\"horizontal\"?\"wrap\":\"nowrap\",gap:props.containerConfigs.gap,width:\"100%\",background:props.containerConfigs.background,borderRadius:props.containerConfigs.radius},role:\"region\",\"aria-label\":\"Product Variants\",children:filteredOptions.map((opt,i)=>{//console.log(\"filteredOptions\", filteredOptions)\nconst isLast=i===(get(product,\"options\")||[{}]).length-1;const valid=!shouldValidate||!!selectedOptions[opt.name];//console.log(\"valid\", valid)\nconst invalidMsg=`\"${opt.name}\" missing`;// Filter values based on available variants when filtering is applied\nlet filteredValues=opt.values;if(filterVariants?.variantGroups!==\"all\"&&filterVariants?.variantTitles){// Get all variants that match the current filter\nconst availableVariants=get(product,\"variants.edges\",[]).filter(({node})=>{return node.selectedOptions.some(option=>filterVariants.variantTitles?.includes(option.name));});// Get all unique values for this option from the filtered variants\nconst availableValues=new Set;availableVariants.forEach(({node})=>{const option=node.selectedOptions.find(o=>o.name===opt.name);if(option){availableValues.add(option.value);}});// Filter the option values to only show available ones\nfilteredValues=opt.values.filter(value=>availableValues.has(value));}//console.log(\"filteredValues\", filteredValues)\n// Get the list of variant titles that should use swatches from config\nconst variantColorTitles=props.colorTitles||[\"Color\",\"Colour\"];const variantImageTitles=props.imageTitles||[];const variantImagesTitles=props.variantImageTitles||[];const useColorSwatches=variantColorTitles.some(title=>title.toLowerCase().trim()===opt.name.toLowerCase().trim())&&props.swatches?.colorEnabled===true;const useImageSwatches=variantImageTitles.some(title=>title.toLowerCase().trim()===opt.name.toLowerCase().trim())&&props.imageSwatches?.image===true;const useVariantImages=variantImagesTitles.some(title=>title.toLowerCase().trim()===opt.name.toLowerCase().trim())&&props.variantImages?.image===true;return /*#__PURE__*/_jsx(\"div\",{style:{flex:style===\"Dropdown\"&&props.containerConfigs.direction===\"horizontal\"?\"1 1 0\"// For dropdowns in horizontal layout: grow and shrink equally, 0 basis to fill space\n:style===\"Dropdown\"?\"1 1 auto\"// For dropdowns in vertical layout: grow and shrink\n:props.containerConfigs.direction===\"horizontal\"?\"0 0 auto\"// For buttons in horizontal layout: don't grow or shrink\n:\"1 1 auto\",minWidth:style===\"Dropdown\"?\"88px\":\"auto\",maxWidth:\"none\",width:style===\"Dropdown\"?\"100%\"// For dropdowns: always fill width\n:props.containerConfigs.direction===\"horizontal\"?\"auto\"// For buttons in horizontal layout: natural width\n:\"100%\",// Apply negative margin for edge-to-edge effect\n...style===\"Dropdown\"&&props.containerConfigs.direction===\"horizontal\"&&props.containerConfigs.gap===0&&!isLast?{marginRight:\"-1px\"}:{}},children:(()=>{if(useColorSwatches){return renderColorSwatches(opt,filteredValues,isLast,valid,invalidMsg);}else if(useImageSwatches){return renderImageSwatches(opt,filteredValues,isLast,valid,invalidMsg);}else if(useVariantImages){return renderVariantImages(opt,filteredValues,isLast,valid,invalidMsg);}else if(style===\"Dropdown\"){return renderVariantDropdown(opt,filteredValues,isLast,valid,invalidMsg,props,dispatchOptionSelectedEvent,selectedOptions,combinations,get(product,\"options\")?.findIndex(o=>o.name===opt.name)||0,get(product,\"options\")?.length||0);}else{return renderVariantButtons(opt,filteredValues,isLast,valid,invalidMsg);}})()},opt.name);})});}function getProductVariant(product,opts){if(!product||!product.variants||!product.variants.edges.length)return null;if(opts==null||typeof opts!==\"object\")return null;const variant=product.variants.edges.find(({node:variant})=>{return Object.entries(opts).every(([key,value])=>{return variant.selectedOptions.find(option=>{return option.name===key&&option.value===value;});});});if(!variant){return null;}return variant.node;}// Helper functions for parsing variants data (for Canvas view only)\n// Pre-compile regex patterns for better performance\nconst OPTION_GROUP_REGEX=/\\[(.*?)\\]/g;const IMAGE_MAPPING_REGEX=/\\[Image (\\d+) • (\\d+)\\]/g;/**\n * Parses a string containing option definitions in the format:\n * [Option Name: Value1,Value2,Value3 • option_id]\n *\n * @param {string} optionsString - The options string to parse\n * @returns {Array} An array of option objects with name, values, and id\n */function parseOptions(optionsString){if(!optionsString)return[];const optionGroups=optionsString.match(OPTION_GROUP_REGEX)||[];return optionGroups.map(group=>{const[titleWithValues,id]=group.slice(1,-1).split(\"•\").map(s=>s.trim());const[title,valuesStr]=titleWithValues.split(\":\").map(s=>s.trim());return{name:title,values:valuesStr.split(\",\").map(v=>v.trim()),id:id||\"\"};});}/**\n * Parses a string containing variant definitions in the format:\n * [Value1/Value2 • variant_id]\n *\n * For a single option, the format is:\n * [Value • variant_id]\n *\n * For multiple options, the format is:\n * [Value1/Value2 • variant_id]\n *\n * @param {string} variantsString - The variants string to parse\n * @returns {Array} An array of variant objects with combination, id, and availableForSale\n */function parseVariants(variantsString){if(!variantsString)return[];const variantGroups=variantsString.match(OPTION_GROUP_REGEX)||[];const parsedVariants=[];for(let i=0;i<variantGroups.length;i++){const group=variantGroups[i];const[combinationPart,id]=group.slice(1,-1).split(\"•\").map(s=>s.trim());// Split only on the separator between options, not inside the option value itself like S/M\nconst values=combinationPart.includes(\" / \")?combinationPart.split(\" / \").map(v=>v.trim()):[combinationPart.trim()];parsedVariants.push({combination:values,id:id||\"\",availableForSale:true});}return parsedVariants;}/**\n * Parses a string containing options and variants data in the following format:\n * [Option Name: Value1,Value2,Value3 • option_id] •• [Value1/Value2 • variant_id][Value1/Value3 • variant_id2] •• product_id\n *\n * The string has three parts separated by \"••\":\n * 1. Options section: One or more option definitions in square brackets\n * 2. Variants section: One or more variant definitions in square brackets\n * 3. (Optional) Product ID: Plain string with the product ID\n *\n * @param {string} combinedString - The combined options and variants string\n * @returns {Object} An object containing parsed options, variants, and optionally a product ID\n */function parseOptionsAndVariants(combinedString){if(!combinedString)return{options:[],variants:[],productId:null};// Split into parts: options, variants, and optionally productId\nconst parts=combinedString.split(\"••\").map(s=>s.trim());const optionsString=parts[0];const variantsString=parts.length>1?parts[1]:\"\";const productId=parts.length>2?parts[2]:null;// Parse options\nconst options=parseOptions(optionsString);// Parse variants\nconst variants=parseVariants(variantsString);return{options,variants,productId};}addPropertyControls(FC_ProductVariants,{shopifyProductID:{type:ControlType.String,title:\"Product ID\",description:\"Connect to Product ID from CMS (required)\"},variantImageIds:{type:ControlType.String,title:\"Image IDs\",description:\"Connect to Image Variant IDs from CMS [Learn more](https://framercommerce.com/resources/docs/components/product#gallery)\"},variants:{type:ControlType.String,title:\"Variants\",description:\"Connect to Variants from CMS (required)\"},images:{type:ControlType.Object,title:\"Image Triggers\",controls:{imageTrigger:{type:ControlType.Enum,title:\"Type\",options:[\"None\",\"Gallery\",\"Scroll Sections\"],defaultValue:\"None\",description:\"Trigger image changes elsewhere on the page. [Learn more](https://framercommerce.com/resources/docs/components/product#gallery)\",displaySegmentedControl:true,segmentedControlDirection:\"vertical\"},imageChange:{type:ControlType.Boolean,title:\"Two-Way\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\",description:\"Allow clicking on an image to change the selected variant.\",hidden:({imageTrigger})=>imageTrigger!==\"Gallery\"},offsetY:{type:ControlType.Number,title:\"Offset Y\",description:\"Match your Offset Y to your on-canvas values.\",hidden:({imageTrigger})=>imageTrigger!==\"Scroll Sections\",defaultValue:0,min:0,step:1,displayStepper:true}}},behaviorConfigs:{type:ControlType.Object,title:\"Behavior\",controls:{filterVariants:{type:ControlType.Object,title:\"Filter\",controls:{variantGroups:{type:ControlType.Enum,title:\"Groups\",options:[\"all\",\"equals\",\"doesn't equal\"],optionTitles:[\"All\",\"Equals\",\"Doesn't Equal\"],defaultValue:\"all\",displaySegmentedControl:true,segmentedControlDirection:\"vertical\"},variantTitles:{type:ControlType.Array,title:\"Titles\",control:{type:ControlType.String},defaultValue:[],description:'Show all variants or filter by title (e.g., \"Color\", \"Size\") using multiple components.',hidden:props=>props.variantGroups===\"all\"}}},action:{type:ControlType.Enum,title:\"Action\",options:[\"Update Active\",\"Add to Cart\",\"Buy Now\"],optionTitles:[\"Update Active\",\"Add to Cart\",\"Buy Now\"],defaultValue:\"Update Active\",displaySegmentedControl:true,segmentedControlDirection:\"vertical\",description:\"Only set Add to Cart or Buy Now when this component displays a single variant group.\"},triggerCart:{type:ControlType.Boolean,title:\"Cart\",description:\"Trigger cart after adding item\",defaultValue:true,hidden:props=>props.action!==\"Add to Cart\"},autoSelectFirst:{type:ControlType.Boolean,title:\"Select 1st\",description:\"Auto-select the first available variant(s)\",defaultValue:false,hidden:props=>props.action===\"Add to Cart\"||props.action===\"Buy Now\"},productPage:{type:ControlType.Boolean,title:\"PDP\",description:\"Enable if this component is on a product page\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\"},showSingleVariants:{type:ControlType.Boolean,title:\"Singles\",description:\"Show the variant selector if only one variant\",defaultValue:false},// showSingleGroups: {\n//     type: ControlType.Boolean,\n//     title: \"Groups\",\n//     description: \"Show the variant selector if only one group\",\n//     defaultValue: false,\n// },\nselectOutOfStock:{type:ControlType.Boolean,title:\"Out of Stock\",description:\"Allow selecting out of stock variants\",defaultValue:false,hidden:props=>props.action!==\"Update Active\"}}},containerConfigs:{type:ControlType.Object,title:\"Layout\",controls:{padding:{type:ControlType.Padding,title:\"Padding\",defaultValue:\"8px\"},gap2:{type:ControlType.Number,title:\"Title Gap\",min:0,unit:\"px\"},gap:{type:ControlType.Number,title:\"Group Gap\",min:0,unit:\"px\"},direction:{type:ControlType.Enum,title:\"Direction\",options:[\"horizontal\",\"vertical\"],optionTitles:[\"Horizontal\",\"Vertical\"],optionIcons:[\"direction-horizontal\",\"direction-vertical\"],displaySegmentedControl:true,defaultValue:\"vertical\"},background:{type:ControlType.Color,title:\"BG\",defaultValue:\"rgba(255, 255, 255, 0)\"},radius:{type:ControlType.BorderRadius,title:\"Radius\",defaultValue:\"0px\"}}},titleConfigs:{type:ControlType.Object,title:\"Title\",controls:{visible:{type:ControlType.Boolean,title:\"Title\",enabledTitle:\"Show\",disabledTitle:\"Hide\",defaultValue:true},display:{type:ControlType.String,title:\"Display\",defaultValue:\"{{Option}}\",placeholder:\"{{Option}}\",description:\"Use {{Option}} to dynamically display Color, Size, etc.\",hidden:props=>!props.visible},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",hidden:props=>!props.visible},textTransform:{type:ControlType.Enum,title:\"Transform\",options:[\"None\",\"Uppercase\",\"Lowercase\",\"Capitalize\"],defaultValue:\"None\",hidden:props=>!props.visible},color:{type:ControlType.Color,title:\"Color\",hidden:props=>!props.visible},gap:{type:ControlType.Number,title:\"Gap\",description:\"Space between title and buttons/dropdown\",min:0,unit:\"px\",hidden:props=>!props.visible||true}}},selectedConfigs:{type:ControlType.Object,title:\"Selected Value\",controls:{visible:{type:ControlType.Boolean,title:\"Value\",enabledTitle:\"Show\",disabledTitle:\"Hide\",defaultValue:false},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:8,min:0,unit:\"px\",hidden:props=>!props.visible},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",hidden:props=>!props.visible},textTransform:{type:ControlType.Enum,title:\"Transform\",options:[\"None\",\"Uppercase\",\"Lowercase\",\"Capitalize\"],defaultValue:\"None\",hidden:props=>!props.visible},color:{type:ControlType.Color,title:\"Color\",hidden:props=>!props.visible},emptyVisible:{type:ControlType.Boolean,title:\"Empty\",enabledTitle:\"Show\",disabledTitle:\"Hide\",defaultValue:false,hidden:props=>!props.visible},emptyText:{type:ControlType.String,title:\"Display\",description:\"Use {{Option Value}} to dynamically display Blue, Medium, etc.\",placeholder:\"Select {{Option Value}}\",defaultValue:\"Select {{Option Value}}\",hidden:props=>!props.visible||!props.emptyVisible}}},style:{type:ControlType.Enum,title:\"Style\",options:[\"Buttons\",\"Dropdown\"],optionTitles:[\"Buttons\",\"Dropdown\"],displaySegmentedControl:true,segmentedControlDirection:\"vertical\",defaultValue:\"Buttons\"},buttonConfigs:{type:ControlType.Object,title:\"Buttons\",hidden:props=>props.style!==\"Buttons\",controls:{layout:{type:ControlType.Enum,title:\"Layout\",options:[\"stack\",\"grid\"],optionTitles:[\"Stack\",\"Grid\"],displaySegmentedControl:true,defaultValue:\"stack\"},direction:{type:ControlType.Enum,title:\"Direction\",options:[\"horizontal\",\"vertical\"],optionTitles:[\"Horizontal\",\"Vertical\"],optionIcons:[\"direction-horizontal\",\"direction-vertical\"],displaySegmentedControl:true,defaultValue:\"vertical\",hidden:props=>props.layout===\"grid\"},columns:{type:ControlType.Enum,title:\"Columns\",options:[\"auto\",\"fixed\"],optionTitles:[\"Auto\",\"Fixed\"],displaySegmentedControl:true,defaultValue:\"auto\",hidden:props=>props.layout!==\"grid\"},columnCount:{type:ControlType.Number,title:\"Columns\",defaultValue:3,min:1,step:1,displayStepper:true,hidden:props=>props.layout!==\"grid\"||props.columns===\"auto\"},gridWidth:{type:ControlType.Number,title:\"Min Width\",defaultValue:100,min:1,max:1e3,step:1,hidden:props=>props.layout!==\"grid\"||props.columns===\"fixed\"},maxColumns:{type:ControlType.Number,title:\"Max Col\",defaultValue:4,min:1,step:1,displayStepper:true,hidden:props=>props.layout!==\"grid\"||props.columns===\"fixed\"},gap:{type:ControlType.Number,title:\"Gap X\",min:0},gapY:{type:ControlType.Number,title:\"Gap Y\",defaultValue:8,min:0,step:1},radius:{type:ControlType.BorderRadius,title:\"Radius\",defaultValue:\"4px\"},padding:{type:ControlType.Padding,title:\"Padding\",defaultValue:\"8px\"},width:{type:ControlType.Boolean,title:\"Width\",enabledTitle:\"Fill\",disabledTitle:\"Fit\",defaultValue:false,hidden:props=>props.direction!==\"vertical\"},unselected:{type:ControlType.Object,title:\"Default\",controls:{font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultValue:{fontSize:14,fontFamily:\"Inter\"}},textTransform:{type:ControlType.Enum,title:\"Transform\",options:[\"None\",\"Uppercase\",\"Lowercase\",\"Capitalize\"],defaultValue:\"None\"},color:{type:ControlType.Color,title:\"Text\",defaultValue:\"rgba(0, 0, 0, 1)\"},background:{type:ControlType.Color,title:\"BG\",defaultValue:\"rgba(255, 255, 255, 1)\"},border:{type:ControlType.Object,title:\"Border\",controls:{borderWidth:{type:ControlType.FusedNumber,title:\"Width\",toggleKey:\"isMixed\",toggleTitles:[\"All\",\"Individual\"],valueKeys:[\"top\",\"right\",\"bottom\",\"left\"],valueLabels:[\"T\",\"R\",\"B\",\"L\"],min:0,defaultValue:1},borderStyle:{type:ControlType.Enum,title:\"Style\",options:[\"solid\",\"dashed\",\"dotted\",\"double\"],optionTitles:[\"Solid\",\"Dashed\",\"Dotted\",\"Double\"],defaultValue:\"solid\"},borderColor:{type:ControlType.Color,title:\"Color\",defaultValue:\"rgba(0,0,0,0.08)\"}}}}},hovered:{type:ControlType.Object,title:\"Hover\",controls:{font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultValue:{fontSize:14,fontFamily:\"Inter\"}},textTransform:{type:ControlType.Enum,title:\"Transform\",options:[\"None\",\"Uppercase\",\"Lowercase\",\"Capitalize\"],defaultValue:\"None\"},color:{type:ControlType.Color,title:\"Text\",defaultValue:\"rgba(0, 0, 0, 1)\"},background:{type:ControlType.Color,title:\"BG\",defaultValue:\"rgba(0, 0, 0, 0.03)\"},border:{type:ControlType.Object,title:\"Border\",controls:{borderWidth:{type:ControlType.FusedNumber,title:\"Width\",toggleKey:\"isMixed\",toggleTitles:[\"All\",\"Individual\"],valueKeys:[\"top\",\"right\",\"bottom\",\"left\"],valueLabels:[\"T\",\"R\",\"B\",\"L\"],min:0,defaultValue:1},borderStyle:{type:ControlType.Enum,title:\"Style\",options:[\"solid\",\"dashed\",\"dotted\",\"double\"],optionTitles:[\"Solid\",\"Dashed\",\"Dotted\",\"Double\"],defaultValue:\"solid\"},borderColor:{type:ControlType.Color,title:\"Color\",defaultValue:\"rgba(0, 0, 0, 1)\"}}}}},selected:{type:ControlType.Object,title:\"Selected\",controls:{font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultValue:{fontSize:14,fontWeight:500,fontFamily:\"Inter\"}},textTransform:{type:ControlType.Enum,title:\"Transform\",options:[\"None\",\"Uppercase\",\"Lowercase\",\"Capitalize\"],defaultValue:\"None\"},color:{type:ControlType.Color,title:\"Text\",defaultValue:\"#FFFFFF\"},background:{type:ControlType.Color,title:\"BG\",defaultValue:\"#000000\"},border:{type:ControlType.Object,title:\"Border\",controls:{borderWidth:{type:ControlType.FusedNumber,title:\"Width\",toggleKey:\"isMixed\",toggleTitles:[\"All\",\"Individual\"],valueKeys:[\"top\",\"right\",\"bottom\",\"left\"],valueLabels:[\"T\",\"R\",\"B\",\"L\"],min:0,defaultValue:1},borderStyle:{type:ControlType.Enum,title:\"Style\",options:[\"solid\",\"dashed\",\"dotted\",\"double\"],optionTitles:[\"Solid\",\"Dashed\",\"Dotted\",\"Double\"],defaultValue:\"solid\"},borderColor:{type:ControlType.Color,title:\"Color\",defaultValue:\"#000000\"}}}}},outOfStock:{type:ControlType.Object,title:\"Out Of Stock\",controls:{preview:{type:ControlType.Boolean,title:\"Preview\",enabledTitle:\"On\",disabledTitle:\"Off\",defaultValue:false},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultValue:{fontSize:14,fontWeight:500,fontFamily:\"Inter\"}},color:{type:ControlType.Color,title:\"Text\",defaultValue:\"rgba(0, 0, 0, 0.40)\"},background:{type:ControlType.Color,title:\"BG\",defaultValue:\"rgba(0, 0, 0, 0.08)\"},border:{type:ControlType.Object,title:\"Border\",controls:{borderWidth:{type:ControlType.FusedNumber,title:\"Width\",toggleKey:\"isMixed\",toggleTitles:[\"All\",\"Individual\"],valueKeys:[\"top\",\"right\",\"bottom\",\"left\"],valueLabels:[\"T\",\"R\",\"B\",\"L\"],min:0,defaultValue:1},borderStyle:{type:ControlType.Enum,title:\"Style\",options:[\"solid\",\"dashed\",\"dotted\",\"double\"],optionTitles:[\"Solid\",\"Dashed\",\"Dotted\",\"Double\"],defaultValue:\"solid\"},borderColor:{type:ControlType.Color,title:\"Color\",defaultValue:\"rgba(255, 255, 255, 1)\"}}},textTransform:{type:ControlType.Enum,title:\"Transform\",options:[\"None\",\"Uppercase\",\"Lowercase\",\"Capitalize\"],defaultValue:\"None\"},strike:{type:ControlType.Object,title:\"Strike\",controls:{line:{type:ControlType.Boolean,title:\"Line\",enabledTitle:\"Yes\",disabledTitle:\"No\",defaultValue:false},size:{type:ControlType.Enum,title:\"Size\",options:[\"text\",\"container\"],optionTitles:[\"Text\",\"Container\"],defaultValue:\"container\",displaySegmentedControl:true,segmentedControlDirection:\"vertical\",hidden:props=>!props.line},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"rgba(0, 0, 0, 0.16)\",hidden:props=>!props.line},direction:{type:ControlType.Enum,title:\"Direction\",options:[\"horizontal\",\"diagonal-up\",\"diagonal-down\"],optionTitles:[\"Horizontal\",\"Diagonal Up\",\"Diagonal Down\"],defaultValue:\"diagonal-down\",displaySegmentedControl:true,segmentedControlDirection:\"vertical\",hidden:props=>!props.line||props.size===\"text\"}}}}}}},dropdownConfigs:{type:ControlType.Object,title:\"Dropdown\",hidden:props=>props.style!==\"Dropdown\",controls:{font:{type:ControlType.Font,title:\"Font\",controls:\"extended\"},textTransform:{type:ControlType.Enum,title:\"Transform\",options:[\"None\",\"Uppercase\",\"Lowercase\",\"Capitalize\"],defaultValue:\"None\"},unselected:{type:ControlType.Object,title:\"Unselected\",controls:{text:{type:ControlType.String,title:\"Text\",defaultValue:\"Select {{variant}}\",description:\"Use {{variant}} to insert the variant name\"},color:{type:ControlType.Color,title:\"Text\",defaultValue:\"rgba(0, 0, 0, 0.48)\"},background:{type:ControlType.Color,title:\"BG\",defaultValue:\"rgba(255, 255, 255, 1)\"},border:{type:ControlType.Object,title:\"Border\",controls:{borderWidth:{type:ControlType.FusedNumber,title:\"Width\",toggleKey:\"isMixed\",toggleTitles:[\"All\",\"Individual\"],valueKeys:[\"top\",\"right\",\"bottom\",\"left\"],valueLabels:[\"T\",\"R\",\"B\",\"L\"],min:0,defaultValue:1},borderStyle:{type:ControlType.Enum,title:\"Style\",options:[\"solid\",\"dashed\",\"dotted\",\"double\"],optionTitles:[\"Solid\",\"Dashed\",\"Dotted\",\"Double\"],defaultValue:\"solid\"},borderColor:{type:ControlType.Color,title:\"Color\",defaultValue:\"rgba(0, 0, 0, 0.08)\"}}}}},selected:{type:ControlType.Object,title:\"Selected\",controls:{color:{type:ControlType.Color,title:\"Text\",defaultValue:\"rgba(0, 0, 0, 1)\"},background:{type:ControlType.Color,title:\"BG\",defaultValue:\"rgba(255, 255, 255, 1)\"},border:{type:ControlType.Object,title:\"Border\",controls:{borderWidth:{type:ControlType.FusedNumber,title:\"Width\",toggleKey:\"isMixed\",toggleTitles:[\"All\",\"Individual\"],valueKeys:[\"top\",\"right\",\"bottom\",\"left\"],valueLabels:[\"T\",\"R\",\"B\",\"L\"],min:0,defaultValue:1},borderStyle:{type:ControlType.Enum,title:\"Style\",options:[\"solid\",\"dashed\",\"dotted\",\"double\"],optionTitles:[\"Solid\",\"Dashed\",\"Dotted\",\"Double\"],defaultValue:\"solid\"},borderColor:{type:ControlType.Color,title:\"Color\",defaultValue:\"rgba(0, 0, 0, 0.16)\"}}}}},hover:{type:ControlType.Object,title:\"Hover\",controls:{color:{type:ControlType.Color,title:\"Text\",defaultValue:\"rgba(0, 0, 0, 1)\"},background:{type:ControlType.Color,title:\"BG\",defaultValue:\"rgba(0, 0, 0, 0.04)\"},border:{type:ControlType.Object,title:\"Border\",controls:{borderWidth:{type:ControlType.FusedNumber,title:\"Width\",toggleKey:\"isMixed\",toggleTitles:[\"All\",\"Individual\"],valueKeys:[\"top\",\"right\",\"bottom\",\"left\"],valueLabels:[\"T\",\"R\",\"B\",\"L\"],min:0,defaultValue:1},borderStyle:{type:ControlType.Enum,title:\"Style\",options:[\"solid\",\"dashed\",\"dotted\",\"double\"],optionTitles:[\"Solid\",\"Dashed\",\"Dotted\",\"Double\"],defaultValue:\"solid\"},borderColor:{type:ControlType.Color,title:\"Color\",defaultValue:\"rgba(0, 0, 0, 1)\"}}}}},radius:{type:ControlType.BorderRadius,title:\"Radius\",defaultValue:\"4px\"},padding:{type:ControlType.Padding,title:\"Padding\",defaultValue:\"16px 16px 16px 16px\"},icon:{type:ControlType.Object,title:\"Icon\",controls:{type:{type:ControlType.Enum,title:\"Type\",options:[\"default\",\"custom\"],optionTitles:[\"Default\",\"Custom\"],defaultValue:\"default\",displaySegmentedControl:true},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"rgba(0, 0, 0, 1)\",hidden:props=>props.type===\"custom\"},size:{type:ControlType.Number,title:\"Size\",defaultValue:12,min:8,max:64,step:1},weight:{type:ControlType.Number,title:\"Weight\",defaultValue:2,min:.5,max:4,step:.5,hidden:props=>props.type===\"custom\"},customIcon:{type:ControlType.Image,title:\"Image\",hidden:props=>props.type!==\"custom\"}}}}},swatches:{type:ControlType.Object,title:\"Color Swatches\",controls:{colorEnabled:{type:ControlType.Boolean,title:\"Color\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\",description:\"Show swatches for Color variants. Set hex codes in the plugin. [Learn more](https://framercommerce.com/resources/academy/variant-colors)\"},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:8,min:0,step:4,hidden:props=>!props.colorEnabled},height:{type:ControlType.Number,title:\"Height\",defaultValue:40,min:8,max:80,step:4,displayStepper:true,hidden:props=>!props.colorEnabled},width:{type:ControlType.Number,title:\"Width\",defaultValue:40,min:8,max:80,step:4,displayStepper:true,hidden:props=>!props.colorEnabled},radius:{type:ControlType.BorderRadius,title:\"Radius\",defaultValue:\"50%\",hidden:props=>!props.colorEnabled},padding:{type:ControlType.Padding,title:\"Padding\",defaultValue:\"2px\",hidden:props=>!props.colorEnabled},unselected:{type:ControlType.Object,title:\"Default\",controls:{border:{type:ControlType.Object,title:\"Border\",controls:{borderWidth:{type:ControlType.FusedNumber,title:\"Width\",toggleKey:\"isMixed\",toggleTitles:[\"All\",\"Individual\"],valueKeys:[\"top\",\"right\",\"bottom\",\"left\"],valueLabels:[\"T\",\"R\",\"B\",\"L\"],min:0,defaultValue:1},borderStyle:{type:ControlType.Enum,title:\"Style\",options:[\"solid\",\"dashed\",\"dotted\",\"double\"],optionTitles:[\"Solid\",\"Dashed\",\"Dotted\",\"Double\"],defaultValue:\"solid\"},borderColor:{type:ControlType.Color,title:\"Color\",defaultValue:\"rgba(0, 0, 0, 0)\"}}},background:{type:ControlType.Color,title:\"BG\",defaultValue:\"rgba(255, 255, 255, 0)\"}},hidden:props=>!props.colorEnabled},hovered:{type:ControlType.Object,title:\"Hover\",controls:{border:{type:ControlType.Object,title:\"Border\",controls:{borderWidth:{type:ControlType.FusedNumber,title:\"Width\",toggleKey:\"isMixed\",toggleTitles:[\"All\",\"Individual\"],valueKeys:[\"top\",\"right\",\"bottom\",\"left\"],valueLabels:[\"T\",\"R\",\"B\",\"L\"],min:0,defaultValue:1},borderStyle:{type:ControlType.Enum,title:\"Style\",options:[\"solid\",\"dashed\",\"dotted\",\"double\"],optionTitles:[\"Solid\",\"Dashed\",\"Dotted\",\"Double\"],defaultValue:\"solid\"},borderColor:{type:ControlType.Color,title:\"Color\",defaultValue:\"rgba(0, 0, 0, 0.16)\"}}},background:{type:ControlType.Color,title:\"BG\",defaultValue:\"#FFF\"}},hidden:props=>!props.colorEnabled},selected:{type:ControlType.Object,title:\"Selected\",controls:{border:{type:ControlType.Object,title:\"Border\",controls:{borderWidth:{type:ControlType.FusedNumber,title:\"Width\",toggleKey:\"isMixed\",toggleTitles:[\"All\",\"Individual\"],valueKeys:[\"top\",\"right\",\"bottom\",\"left\"],valueLabels:[\"T\",\"R\",\"B\",\"L\"],min:0,defaultValue:1},borderStyle:{type:ControlType.Enum,title:\"Style\",options:[\"solid\",\"dashed\",\"dotted\",\"double\"],optionTitles:[\"Solid\",\"Dashed\",\"Dotted\",\"Double\"],defaultValue:\"solid\"},borderColor:{type:ControlType.Color,title:\"Color\",defaultValue:\"rgba(0, 0, 0, 1)\"}}},background:{type:ControlType.Color,title:\"BG\",defaultValue:\"rgba(255, 255, 255, 1)\"}},hidden:props=>!props.colorEnabled},outOfStock:{type:ControlType.Object,title:\"Out of Stock\",controls:{border:{type:ControlType.Object,title:\"Border\",controls:{borderWidth:{type:ControlType.FusedNumber,title:\"Width\",toggleKey:\"isMixed\",toggleTitles:[\"All\",\"Individual\"],valueKeys:[\"top\",\"right\",\"bottom\",\"left\"],valueLabels:[\"T\",\"R\",\"B\",\"L\"],min:0,defaultValue:1},borderStyle:{type:ControlType.Enum,title:\"Style\",options:[\"solid\",\"dashed\",\"dotted\",\"double\"],optionTitles:[\"Solid\",\"Dashed\",\"Dotted\",\"Double\"],defaultValue:\"solid\"},borderColor:{type:ControlType.Color,title:\"Color\",defaultValue:\"rgba(0,0,0,0)\"}}},opacity:{type:ControlType.Number,title:\"Opacity\",defaultValue:.5,min:0,max:1,step:.1},background:{type:ControlType.Color,title:\"BG\",defaultValue:\"rgba(255, 255, 255, 0)\"},strike:{type:ControlType.Object,title:\"Strike\",controls:{line:{type:ControlType.Boolean,title:\"Line\",enabledTitle:\"Yes\",disabledTitle:\"No\",defaultValue:false},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"rgba(0, 0, 0, 0.16)\",hidden:props=>!props.line},direction:{type:ControlType.Enum,title:\"Direction\",options:[\"horizontal\",\"diagonal-up\",\"diagonal-down\"],optionTitles:[\"Horizontal\",\"Diagonal Up\",\"Diagonal Down\"],defaultValue:\"diagonal-down\",displaySegmentedControl:true,segmentedControlDirection:\"vertical\",hidden:props=>!props.line}}}},hidden:props=>!props.colorEnabled}}},colorTitles:{type:ControlType.Array,title:\"↳ Color Titles\",control:{type:ControlType.String},defaultValue:[\"Color\"],hidden:props=>!props.swatches?.colorEnabled},colors:{type:ControlType.Array,title:\"↳ Color Values\",control:{type:ControlType.Object,controls:{name:{type:ControlType.String,title:\"Name\"},hex:{type:ControlType.Color,title:\"Color\"}}},defaultValue:[[\"green\",\"#D0EF79\"],[\"blue\",\"#053ECF\"],[\"pink\",\"#CC7BE4\"],[\"black\",\"#333233\"]],hidden:props=>!props.swatches?.colorEnabled},imageSwatches:{type:ControlType.Object,title:\"Image Swatches\",controls:{image:{type:ControlType.Boolean,title:\"Images\",defaultValue:false,enabledTitle:\"On\",disabledTitle:\"Off\",description:\"Show Image swatches for specific variants. [Learn more](https://framercommerce.com/resources/academy/variant-images)\"},imageStyles:{type:ControlType.Enum,title:\"Styles\",options:[\"inherit\",\"customize\"],optionTitles:[\"Inherit from Colors\",\"Customize\"],defaultValue:\"inherit\",displaySegmentedControl:true,segmentedControlDirection:\"vertical\",hidden:props=>!props.image},imageGap:{type:ControlType.Number,title:\"Gap\",defaultValue:8,min:0,step:4,hidden:props=>!props.image||props.imageStyles===\"inherit\"},imageHeight:{type:ControlType.Number,title:\"Height\",defaultValue:40,min:8,max:80,step:4,displayStepper:true,hidden:props=>!props.image||props.imageStyles===\"inherit\"},imageWidth:{type:ControlType.Number,title:\"Width\",defaultValue:40,min:8,max:80,step:4,displayStepper:true,hidden:props=>!props.image||props.imageStyles===\"inherit\"},imageRadius:{type:ControlType.BorderRadius,title:\"Radius\",defaultValue:\"50%\",hidden:props=>!props.image||props.imageStyles===\"inherit\"},imagePadding:{type:ControlType.Padding,title:\"Padding\",defaultValue:\"2px\",hidden:props=>!props.image||props.imageStyles===\"inherit\"},imageUnselected:{type:ControlType.Object,title:\"Default\",controls:{border:{type:ControlType.Object,title:\"Border\",controls:{borderWidth:{type:ControlType.FusedNumber,title:\"Width\",toggleKey:\"isMixed\",toggleTitles:[\"All\",\"Individual\"],valueKeys:[\"top\",\"right\",\"bottom\",\"left\"],valueLabels:[\"T\",\"R\",\"B\",\"L\"],min:0,defaultValue:1},borderStyle:{type:ControlType.Enum,title:\"Style\",options:[\"solid\",\"dashed\",\"dotted\",\"double\"],optionTitles:[\"Solid\",\"Dashed\",\"Dotted\",\"Double\"],defaultValue:\"solid\"},borderColor:{type:ControlType.Color,title:\"Color\",defaultValue:\"#FFFFFF\"}}},background:{type:ControlType.Color,title:\"BG\",defaultValue:\"#FFF\"}},hidden:props=>!props.image||props.imageStyles===\"inherit\"},imageHovered:{type:ControlType.Object,title:\"Hover\",controls:{border:{type:ControlType.Object,title:\"Border\",controls:{borderWidth:{type:ControlType.FusedNumber,title:\"Width\",toggleKey:\"isMixed\",toggleTitles:[\"All\",\"Individual\"],valueKeys:[\"top\",\"right\",\"bottom\",\"left\"],valueLabels:[\"T\",\"R\",\"B\",\"L\"],min:0,defaultValue:1},borderStyle:{type:ControlType.Enum,title:\"Style\",options:[\"solid\",\"dashed\",\"dotted\",\"double\"],optionTitles:[\"Solid\",\"Dashed\",\"Dotted\",\"Double\"],defaultValue:\"solid\"},borderColor:{type:ControlType.Color,title:\"Color\",defaultValue:\"rgba(0, 0, 0, 0.16)\"}}},background:{type:ControlType.Color,title:\"BG\",defaultValue:\"#FFF\"}},hidden:props=>!props.image||props.imageStyles===\"inherit\"},imageSelected:{type:ControlType.Object,title:\"Selected\",controls:{border:{type:ControlType.Object,title:\"Border\",controls:{borderWidth:{type:ControlType.FusedNumber,title:\"Width\",toggleKey:\"isMixed\",toggleTitles:[\"All\",\"Individual\"],valueKeys:[\"top\",\"right\",\"bottom\",\"left\"],valueLabels:[\"T\",\"R\",\"B\",\"L\"],min:0,defaultValue:1},borderStyle:{type:ControlType.Enum,title:\"Style\",options:[\"solid\",\"dashed\",\"dotted\",\"double\"],optionTitles:[\"Solid\",\"Dashed\",\"Dotted\",\"Double\"],defaultValue:\"solid\"},borderColor:{type:ControlType.Color,title:\"Color\",defaultValue:\"#000000\"}}},background:{type:ControlType.Color,title:\"BG\",defaultValue:\"#FFFFFF\"}},hidden:props=>!props.image||props.imageStyles===\"inherit\"},imageOutOfStock:{type:ControlType.Object,title:\"Out of Stock\",controls:{border:{type:ControlType.Object,title:\"Border\",controls:{borderWidth:{type:ControlType.FusedNumber,title:\"Width\",toggleKey:\"isMixed\",toggleTitles:[\"All\",\"Individual\"],valueKeys:[\"top\",\"right\",\"bottom\",\"left\"],valueLabels:[\"T\",\"R\",\"B\",\"L\"],min:0,defaultValue:1},borderStyle:{type:ControlType.Enum,title:\"Style\",options:[\"solid\",\"dashed\",\"dotted\",\"double\"],optionTitles:[\"Solid\",\"Dashed\",\"Dotted\",\"Double\"],defaultValue:\"solid\"},borderColor:{type:ControlType.Color,title:\"Color\",defaultValue:\"rgba(0, 0, 0, 0)\"}}},opacity:{type:ControlType.Number,title:\"Opacity\",defaultValue:.5,min:0,max:1,step:.1},background:{type:ControlType.Color,title:\"BG\",defaultValue:\"rgba(255, 255, 255, 0)\"},strike:{type:ControlType.Object,title:\"Strike\",controls:{line:{type:ControlType.Boolean,title:\"Line\",enabledTitle:\"Yes\",disabledTitle:\"No\",defaultValue:false},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"rgba(0, 0, 0, 0.16)\",hidden:props=>!props.line},direction:{type:ControlType.Enum,title:\"Direction\",options:[\"horizontal\",\"diagonal-up\",\"diagonal-down\"],optionTitles:[\"Horizontal\",\"Diagonal Up\",\"Diagonal Down\"],defaultValue:\"diagonal-down\",displaySegmentedControl:true,segmentedControlDirection:\"vertical\",hidden:props=>!props.line}}}},hidden:props=>!props.image||props.imageStyles===\"inherit\"}}},imageTitles:{type:ControlType.Array,title:\"↳ Image Titles\",control:{type:ControlType.String},defaultValue:[],hidden:props=>!props.imageSwatches?.image},swatchImages:{type:ControlType.Array,title:\"↳ Image Values\",control:{type:ControlType.Object,controls:{name:{type:ControlType.String,title:\"Name\"},url:{type:ControlType.String,title:\"URL\"}}},defaultValue:[],hidden:props=>!props.imageSwatches?.image},variantImages:{type:ControlType.Object,title:\"Variant Images\",controls:{image:{type:ControlType.Boolean,title:\"Images\",defaultValue:false,enabledTitle:\"On\",disabledTitle:\"Off\",description:\"Show variant images for specific variants. Uses the variant's associated image from the product data.\"},imageStyles:{type:ControlType.Enum,title:\"Styles\",options:[\"inherit\",\"customize\"],optionTitles:[\"Inherit from Images\",\"Customize\"],defaultValue:\"inherit\",displaySegmentedControl:true,segmentedControlDirection:\"vertical\",hidden:props=>!props.image},imageGap:{type:ControlType.Number,title:\"Gap\",defaultValue:8,min:0,step:4,hidden:props=>!props.image||props.imageStyles===\"inherit\"},imageHeight:{type:ControlType.Number,title:\"Height\",defaultValue:40,min:8,max:80,step:4,displayStepper:true,hidden:props=>!props.image||props.imageStyles===\"inherit\"},imageWidth:{type:ControlType.Number,title:\"Width\",defaultValue:40,min:8,max:80,step:4,displayStepper:true,hidden:props=>!props.image||props.imageStyles===\"inherit\"},imageRadius:{type:ControlType.BorderRadius,title:\"Radius\",defaultValue:\"50%\",hidden:props=>!props.image||props.imageStyles===\"inherit\"},imagePadding:{type:ControlType.Padding,title:\"Padding\",defaultValue:\"2px\",hidden:props=>!props.image||props.imageStyles===\"inherit\"},imageUnselected:{type:ControlType.Object,title:\"Default\",controls:{border:{type:ControlType.Object,title:\"Border\",controls:{borderWidth:{type:ControlType.FusedNumber,title:\"Width\",toggleKey:\"isMixed\",toggleTitles:[\"All\",\"Individual\"],valueKeys:[\"top\",\"right\",\"bottom\",\"left\"],valueLabels:[\"T\",\"R\",\"B\",\"L\"],min:0,defaultValue:1},borderStyle:{type:ControlType.Enum,title:\"Style\",options:[\"solid\",\"dashed\",\"dotted\",\"double\"],optionTitles:[\"Solid\",\"Dashed\",\"Dotted\",\"Double\"],defaultValue:\"solid\"},borderColor:{type:ControlType.Color,title:\"Color\",defaultValue:\"#FFFFFF\"}}},background:{type:ControlType.Color,title:\"BG\",defaultValue:\"#FFF\"}},hidden:props=>!props.image||props.imageStyles===\"inherit\"},imageHovered:{type:ControlType.Object,title:\"Hover\",controls:{border:{type:ControlType.Object,title:\"Border\",controls:{borderWidth:{type:ControlType.FusedNumber,title:\"Width\",toggleKey:\"isMixed\",toggleTitles:[\"All\",\"Individual\"],valueKeys:[\"top\",\"right\",\"bottom\",\"left\"],valueLabels:[\"T\",\"R\",\"B\",\"L\"],min:0,defaultValue:1},borderStyle:{type:ControlType.Enum,title:\"Style\",options:[\"solid\",\"dashed\",\"dotted\",\"double\"],optionTitles:[\"Solid\",\"Dashed\",\"Dotted\",\"Double\"],defaultValue:\"solid\"},borderColor:{type:ControlType.Color,title:\"Color\",defaultValue:\"rgba(0, 0, 0, 0.16)\"}}},background:{type:ControlType.Color,title:\"BG\",defaultValue:\"#FFF\"}},hidden:props=>!props.image||props.imageStyles===\"inherit\"},imageSelected:{type:ControlType.Object,title:\"Selected\",controls:{border:{type:ControlType.Object,title:\"Border\",controls:{borderWidth:{type:ControlType.FusedNumber,title:\"Width\",toggleKey:\"isMixed\",toggleTitles:[\"All\",\"Individual\"],valueKeys:[\"top\",\"right\",\"bottom\",\"left\"],valueLabels:[\"T\",\"R\",\"B\",\"L\"],min:0,defaultValue:1},borderStyle:{type:ControlType.Enum,title:\"Style\",options:[\"solid\",\"dashed\",\"dotted\",\"double\"],optionTitles:[\"Solid\",\"Dashed\",\"Dotted\",\"Double\"],defaultValue:\"solid\"},borderColor:{type:ControlType.Color,title:\"Color\",defaultValue:\"#000000\"}}},background:{type:ControlType.Color,title:\"BG\",defaultValue:\"#FFFFFF\"}},hidden:props=>!props.image||props.imageStyles===\"inherit\"},imageOutOfStock:{type:ControlType.Object,title:\"Out of Stock\",controls:{border:{type:ControlType.Object,title:\"Border\",controls:{borderWidth:{type:ControlType.FusedNumber,title:\"Width\",toggleKey:\"isMixed\",toggleTitles:[\"All\",\"Individual\"],valueKeys:[\"top\",\"right\",\"bottom\",\"left\"],valueLabels:[\"T\",\"R\",\"B\",\"L\"],min:0,defaultValue:1},borderStyle:{type:ControlType.Enum,title:\"Style\",options:[\"solid\",\"dashed\",\"dotted\",\"double\"],optionTitles:[\"Solid\",\"Dashed\",\"Dotted\",\"Double\"],defaultValue:\"solid\"},borderColor:{type:ControlType.Color,title:\"Color\",defaultValue:\"rgba(0, 0, 0, 0)\"}}},opacity:{type:ControlType.Number,title:\"Opacity\",defaultValue:.5,min:0,max:1,step:.1},background:{type:ControlType.Color,title:\"BG\",defaultValue:\"rgba(255, 255, 255, 0)\"},strike:{type:ControlType.Object,title:\"Strike\",controls:{line:{type:ControlType.Boolean,title:\"Line\",enabledTitle:\"Yes\",disabledTitle:\"No\",defaultValue:false},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"rgba(0, 0, 0, 0.16)\",hidden:props=>!props.line},direction:{type:ControlType.Enum,title:\"Direction\",options:[\"horizontal\",\"diagonal-up\",\"diagonal-down\"],optionTitles:[\"Horizontal\",\"Diagonal Up\",\"Diagonal Down\"],defaultValue:\"diagonal-down\",displaySegmentedControl:true,segmentedControlDirection:\"vertical\",hidden:props=>!props.line}}}},hidden:props=>!props.image||props.imageStyles===\"inherit\"}}},variantImageTitles:{type:ControlType.Array,title:\"↳ Variant Image Titles\",control:{type:ControlType.String},defaultValue:[],hidden:props=>!props.variantImages?.image},// Add up to 100 image props for variant images\n...(()=>{const imageControls={};for(let i=1;i<=100;i++){imageControls[`image${i}`]={type:ControlType.Image,title:`↳ Image ${i}`,hidden:props=>{if(!props.variantImages?.image)return true;if(i===1)return false;// Only show if previous image is set\nreturn!props[`image${i-1}`];}};}return imageControls;})()});FC_ProductVariants.defaultProps={shopifyProductID:\"\",variantImageIds:\"\",variants:\"\",images:{imageTrigger:\"None\",imageChange:true,offsetY:0},behaviorConfigs:{autoSelectFirst:false,showSingleVariants:false,// showSingleGroups: false,\nselectOutOfStock:false,filterVariants:{variantGroups:\"all\",variantTitles:[]},onClickAction:{action:\"update\",purchaseType:\"add to cart\",triggerCart:true}},style:\"Buttons\",buttonConfigs:{gap:8,radius:\"4px\",padding:\"8px\",direction:\"horizontal\",width:false,unselected:{font:{fontSize:14,fontWeight:500,fontFamily:\"Inter\"},color:\"rgba(0, 0, 0, 1)\",background:\"rgba(255, 255, 255, 1)\",border:\"1px solid rgba(0,0,0,0.08)\",textTransform:\"None\"},hovered:{font:{fontSize:14,fontWeight:500,fontFamily:\"Inter\"},color:\"rgba(0, 0, 0, 1)\",background:\"rgba(0, 0, 0, 0.03)\",border:\"1px solid rgba(0, 0, 0, 1)\",textTransform:\"None\"},selected:{font:{fontSize:14,fontWeight:500,fontFamily:\"Inter\"},color:\"rgba(255, 255, 255, 1)\",background:\"rgba(0, 0, 0, 1)\",border:\"1px solid rgba(0, 0, 0, 1)\",textTransform:\"None\"},outOfStock:{font:{fontSize:14,fontWeight:500,fontFamily:\"Inter\"},color:\"rgba(0, 0, 0, 0.40)\",background:\"rgba(0, 0, 0, 0.08)\",border:\"1px solid rgba(255, 255, 255, 1)\",textTransform:\"None\",preview:false,strike:{line:false,size:\"container\",color:\"rgba(0, 0, 0, 0.16)\",direction:\"diagonal-down\"}}},dropdownConfigs:{font:undefined,textTransform:\"None\",unselected:{text:\"Select {{variant}}\",color:\"rgba(0, 0, 0, 0.48)\",background:\"rgba(255, 255, 255, 1)\",border:{borderWidth:1,borderStyle:\"solid\",borderColor:\"rgba(0,0,0,0.08)\"}},selected:{color:\"rgba(0, 0, 0, 1)\",background:\"rgba(255, 255, 255, 1)\",border:{borderWidth:1,borderStyle:\"solid\",borderColor:\"rgba(0,0,0,1)\"}},hover:{color:\"rgba(0, 0, 0, 1)\",background:\"rgba(0, 0, 0, 0.16)\",border:{borderWidth:1,borderStyle:\"solid\",borderColor:\"rgba(0, 0, 0, 1)\"}},radius:\"4px\",padding:\"16px 16px 16px 16px\",icon:{type:\"default\",color:\"rgba(0, 0, 0, 1)\",size:12,weight:2}},containerConfigs:{padding:\"0px\",gap:24,gap2:8,direction:\"vertical\"},titleConfigs:{visible:true,font:undefined,color:\"rgba(0, 0, 0, 1)\",gap:8,display:\"{{Option}}\",textTransform:\"None\"},selectedConfigs:{visible:false,gap:8,font:undefined,color:\"rgba(0, 0, 0, 1)\",emptyVisible:true,emptyText:\"Select {{Option Value}}\",textTransform:\"None\"},swatches:{colorEnabled:true,gap:8,height:40,width:40,radius:\"50%\",padding:2,unselected:{border:{borderWidth:2,borderStyle:\"solid\",borderColor:\"rgba(255, 255, 255, 1)\"},background:\"rgba(255, 255, 255, 0)\"},hovered:{border:{borderWidth:2,borderStyle:\"solid\",borderColor:\"rgba(0,0,0,0.16)\"},background:\"rgba(255, 255, 255, 0)\"},selected:{border:{borderWidth:2,borderStyle:\"solid\",borderColor:\"rgba(0, 0, 0, 1)\"},background:\"rgba(255, 255, 255, 0)\"},outOfStock:{border:{borderWidth:2,borderStyle:\"solid\",borderColor:\"rgba(255, 255, 255, 1)\"},opacity:0,background:\"rgba(255, 255, 255, 0)\",strike:{line:false,color:\"rgba(0, 0, 0, 0.16)\",direction:\"diagonal-down\"}}},imageSwatches:{image:false,imageStyles:\"inherit\",imageGap:8,imageHeight:40,imageWidth:40,imageRadius:\"50%\",imagePadding:2,imageUnselected:{border:{borderWidth:2,borderStyle:\"solid\",borderColor:\"rgba(255, 255, 255, 1)\"},background:\"rgba(255, 255, 255, 0)\"},imageHovered:{border:{borderWidth:2,borderStyle:\"solid\",borderColor:\"rgba(0, 0, 0, 0.20)\"},background:\"rgba(255, 255, 255, 0)\"},imageSelected:{border:{borderWidth:2,borderStyle:\"solid\",borderColor:\"rgba(0, 0, 0, 1)\"},background:\"rgba(255, 255, 255, 0)\"},imageOutOfStock:{border:{borderWidth:2,borderStyle:\"solid\",borderColor:\"rgba(255, 255, 255, 1)\"},opacity:0,background:\"rgba(255, 255, 255, 0)\",strike:{line:false,color:\"rgba(0, 0, 0, 0.16)\",direction:\"diagonal-down\"}}},imageTitles:[],variantImageTitles:[],variantImages:{image:false,imageStyles:\"inherit\",imageGap:8,imageHeight:40,imageWidth:40,imageRadius:\"50%\",imagePadding:2,imageUnselected:{border:{borderWidth:2,borderStyle:\"solid\",borderColor:\"rgba(255, 255, 255, 1)\"},background:\"rgba(255, 255, 255, 0)\"},imageHovered:{border:{borderWidth:2,borderStyle:\"solid\",borderColor:\"rgba(0, 0, 0, 0.20)\"},background:\"rgba(255, 255, 255, 0)\"},imageSelected:{border:{borderWidth:2,borderStyle:\"solid\",borderColor:\"rgba(0, 0, 0, 1)\"},background:\"rgba(255, 255, 255, 0)\"},imageOutOfStock:{border:{borderWidth:2,borderStyle:\"solid\",borderColor:\"rgba(255, 255, 255, 1)\"},opacity:0,background:\"rgba(255, 255, 255, 0)\",strike:{line:false,color:\"rgba(0, 0, 0, 0.16)\",direction:\"diagonal-down\"}}}};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FC_ProductVariants\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"*\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import React from\"react\";// It walks every level of the element tree: each nested container, stack, frame gets rendersWithMotion = false\n// It preserves all other props (styles, events, Framer props)\n// It prevents Framer from rewrapping anything in internal motion components, which stops layout animation flickers, re-renders, and performance loss\nexport function sanitizeChildrenRecursively(node){if(!/*#__PURE__*/React.isValidElement(node))return node;// Clone node with motion props disabled\nconst sanitizedProps={...node.props,rendersWithMotion:false,layoutId:undefined,scopeId:undefined};// If there are nested children, recurse into them\nif(node.props.children){sanitizedProps.children=React.Children.map(node.props.children,sanitizeChildrenRecursively);}return /*#__PURE__*/React.cloneElement(node,sanitizedProps);}\nexport const __FramerMetadata__ = {\"exports\":{\"sanitizeChildrenRecursively\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./cloning.map","/**\n * Initialization utilities for Framer Commerce\n * This file contains functions that should run when the application first loads\n */import{getUTMParameters,getSCARefParameters}from\"https://framerusercontent.com/modules/w24ELWa2giT3SFaWpV77/398w6fPyag8B92ojouQr/utmParams.js\";/**\n * Initialize global functionality for the store\n * This includes capturing UTM parameters, setting up event listeners, etc.\n */export function initializeStore(){// Capture UTM and SCA ref parameters when the page loads\nif(typeof window!==\"undefined\"){// Initialize UTM parameter tracking\ngetUTMParameters();// Initialize SCA ref parameter tracking\ngetSCARefParameters();// Add a listener for history changes to capture tracking parameters\n// when users navigate between pages\ntry{const originalPushState=history.pushState;const originalReplaceState=history.replaceState;history.pushState=function(){originalPushState.apply(this,arguments);getUTMParameters()// Capture UTM parameters after navigation\n;getSCARefParameters()// Capture SCA ref parameters after navigation\n;};history.replaceState=function(){originalReplaceState.apply(this,arguments);getUTMParameters()// Capture UTM parameters after navigation\n;getSCARefParameters()// Capture SCA ref parameters after navigation\n;};// Also listen for popstate events (back/forward navigation)\nwindow.addEventListener(\"popstate\",()=>{getUTMParameters();getSCARefParameters();});}catch(error){console.error(\"Error setting up history listeners:\",error);}}}// Auto-initialize if this module is loaded\ninitializeStore();export default initializeStore;\nexport const __FramerMetadata__ = {\"exports\":{\"initializeStore\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","/*\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,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useState,useRef,useCallback,cloneElement}from\"react\";import{createCartMutation,addToCartMutation,cartQuery,updateCartAttributes,updateCartCurrency,getProductMetafields}from\"https://framerusercontent.com/modules/yiRfl1JCGhIBUL31WVDk/wupS2XmBAHu1kBQNv9pi/mutations_v2.js\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{get}from\"lodash-es\";import{appendAllTrackingParamsToUrl}from\"https://framerusercontent.com/modules/w24ELWa2giT3SFaWpV77/398w6fPyag8B92ojouQr/utmParams.js\";import{appendLanguageToUrl}from\"https://framerusercontent.com/modules/vC6fzbfO83MgBPIhn5zl/DUlbmWuOELzEUenVmv3G/locales.js\";import{useIsBrowser}from\"https://framerusercontent.com/modules/ncBs5KPMI9I5GEta13fn/zGXDjuZapa1SGy6D8P5e/IsBrowser.js\";import{trackFacebookPixelAddToCart,trackFacebookPixelInitiateCheckout,trackFacebookPixelViewContent}from\"https://framerusercontent.com/modules/6Zs9CjkPbKzHjoy8LK08/iqoIwmJw4hztafi4V4IV/Fb_pixel.js\";import{sanitizeChildrenRecursively}from\"https://framerusercontent.com/modules/Da0ApllLKQHSw8djEYKs/NKlmeTJYy3YIy3O2qsS9/cloning.js\";// Import initialization utility to ensure UTM tracking is set up\nimport\"https://framerusercontent.com/modules/FXrY3V9ZYVL8aziafDQn/HIuMDRrKIIcsJe65kZwo/initialize.js\";/**\n * @framerDisableUnlink\n */export default function FC_ProductPurchaseButton(props){const{shopifyProductID,available,OutOfStock,SelectVariant,LoadingState,maxQuantity,shopifyProductVariantId,BuyNowATC,title=\"Add to Cart\",required=false,openCart=true}=props;// State from original component\nconst[product,setProduct]=useState();const[activeVariant,setActiveVariant]=useState();const[isInStock,setIsInStock]=useState(true);const[needsVariantSelection,setNeedsVariantSelection]=useState(false);const[isLoading,setIsLoading]=useState(true);const[hasInitialized,setHasInitialized]=useState(false);const[countryCode,setCountryCode]=useState();const isBrowser=useIsBrowser();// Additional state for cart functionality\nconst[planSelected,setPlanSelected]=useState(\"one-time\");const[cartExistingData,setCartExistingData]=useState();const[errorMessage,setErrorMessage]=useState();const[productQuantity,setProductQuantity]=useState(1);const viewContentFired=useRef(false);const[autoSelectFirst,setAutoSelectFirst]=useState(false);const[isVariantManuallySelected,setIsVariantManuallySelected]=useState(false);const[maxQuantityReached,setMaxQuantityReached]=useState(false);const[orderMax,setOrderMax]=useState(0);// Check if variant is autoselected by default\nuseEffect(()=>{if(!isBrowser)return;//console.log(\"FC_ProductPurchaseButton mounted\")\nconst handleAutoSelectFlag=event=>{// console.log(\n//     \"Auto Select event received as:\",\n//     event.detail.autoSelectFirst\n// )\nif(event.detail.shopifyProductID!==`gid://shopify/Product/${props.shopifyProductID}`){return;}setAutoSelectFirst(event.detail.autoSelectFirst);window.__fc_autoSelectFirst=event.detail.autoSelectFirst;//console.log(\"Auto Select First Flag:\", event.detail.autoSelectFirst)\n};document.addEventListener(\"auto_select_first_flag\",handleAutoSelectFlag);return()=>{document.removeEventListener(\"auto_select_first_flag\",handleAutoSelectFlag);};},[isBrowser]);// Calculate total inventory helper function\nconst calculateTotalInventory=useCallback(productData=>{if(!productData||productData===\"404\")return 0;// If totalInventory is available, use it\nif(typeof productData.totalInventory===\"number\"){return productData.totalInventory;}// Otherwise sum up variant quantities\nreturn get(productData,\"variants.edges\",[]).reduce((total,{node})=>{return total+(node.quantityAvailable||0);},0);},[]);// Helper function to check if variant is available for sale\nconst isVariantAvailable=useCallback(variant=>{if(!variant)return false;// If availableForSale is true, the variant can be sold regardless of quantity\nif(variant.availableForSale)return true;// If availableForSale is false, check quantity\nreturn variant.quantityAvailable>0;},[]);// Error handling\nuseEffect(()=>{if(errorMessage&&isBrowser){const event=new CustomEvent(\"errorChanged\",{detail:errorMessage});window.dispatchEvent(event);}},[errorMessage]);// Load cart from localStorage\nuseEffect(()=>{if(!isBrowser||!window[\"shopXtools\"])return;// Try to load cart ID first\nconst savedCartId=localStorage.getItem(\"shopX_cart_id\");if(savedCartId){// If we have a cart ID, fetch the cart data\nwindow.shopXtools.handleCartMutation(cartQuery,{cartId:savedCartId}).then(data=>{if(data?.cart){setCartExistingData(data.cart);window.shopXtools.cart=data.cart;localStorage.setItem(\"shopXtools.cart\",JSON.stringify(data.cart));}}).catch(error=>{// Clear invalid cart data\nlocalStorage.removeItem(\"shopX_cart_id\");localStorage.removeItem(\"shopXtools.cart\");});}const handleSubscriptionChange=event=>{setPlanSelected(event.detail.subscriptionId);};document.addEventListener(\"subscription__selection-sync\",handleSubscriptionChange);return()=>document.removeEventListener(\"subscription__selection-sync\",handleSubscriptionChange);},[isBrowser]);// Add this at the top level with other event handlers\nconst handleQuantityChange=event=>{// console.log(\"Quantity change event received:\", event.detail)\nsetProductQuantity(event.detail);};useEffect(()=>{if(isBrowser){window.addEventListener(\"FcQuantitySelectorchanges\",handleQuantityChange);// Cleanup\nreturn()=>{window.removeEventListener(\"FcQuantitySelectorchanges\",handleQuantityChange);};}},[isBrowser]);// Separate effect for ViewContent tracking - more reliable\nuseEffect(()=>{if(!isBrowser||!product||viewContentFired.current)return;// Wait for either activeVariant or at least one variant to be available\nconst hasVariantData=activeVariant||product.variants?.edges?.length>0;if(hasVariantData){// console.log('[ViewContent] Firing ViewContent event for product:', product.title);\ntrackFacebookPixelViewContent({variant:activeVariant||product.variants?.edges?.[0]?.node,product:product,currency:activeVariant?.price?.currencyCode||product.variants?.edges?.[0]?.node?.price?.currencyCode||\"USD\"});viewContentFired.current=true;}},[isBrowser,product,activeVariant]);useEffect(()=>{if(!isBrowser)return;const handleCurrencyChange=async event=>{const{countryCode}=event.detail;setCountryCode(countryCode);const existingCartId=localStorage.getItem(\"shopX_cart_id\");if(existingCartId){try{const updateData=await window.shopXtools.handleCartMutation(updateCartCurrency,{cartId:existingCartId,countryCode:countryCode});if(updateData?.cartBuyerIdentityUpdate?.cart){window.shopXtools.cart=updateData.cartBuyerIdentityUpdate.cart;window.dispatchEvent(new Event(\"shopXtools-cart-update\"));}else{window.dispatchEvent(new CustomEvent(\"errorChanged\",{detail:\"Failed to update cart with new country code\"}));}}catch(error){window.dispatchEvent(new CustomEvent(\"errorChanged\",{detail:error.message||\"Failed to update cart currency\"}));}}};window.addEventListener(\"currency_changed\",handleCurrencyChange);return()=>{window.removeEventListener(\"currency_changed\",handleCurrencyChange);};},[isBrowser]);// Load product data and set up event listeners\nuseEffect(()=>{if(!isBrowser)return;const handleSingleVariantProduct=productNode=>{if(!productNode)return false;const variants=get(productNode,\"variants.edges\",[]);if(variants.length===1){const variant=variants[0].node;setActiveVariant(variant);if(!isVariantManuallySelected){window.__fc_activeVariantId=variant.id;}setIsInStock(isVariantAvailable(variant));setNeedsVariantSelection(false);return true;}return false;};const handleProductData=_matchingProduct=>{// Early return if we already have this exact product loaded\nif(product&&product!==\"404\"){const currentProductId=product?.id;const incomingProductId=_matchingProduct?.node?.id;if(currentProductId&&incomingProductId&&currentProductId===incomingProductId){// console.log(\n//   '[handleProductData] Product already loaded, skipping update'\n// );\nreturn;}}// console.log(\n//   '[handleProductData] Processing product update',\n//   product,\n//   _matchingProduct\n// );\nif(_matchingProduct){const productNode=_matchingProduct.node;setProduct(productNode||\"404\");// Fetch order_max if we have a product handle\nif(productNode?.handle){fetchOrderMax(productNode.handle);}// If shopifyProductVariantId is provided, find and set that variant\nif(shopifyProductVariantId&&productNode){const variantId=`gid://shopify/ProductVariant/${shopifyProductVariantId}`;const matchingVariant=get(productNode,\"variants.edges\",[]).find(({node})=>node.id===variantId);if(matchingVariant){setActiveVariant(matchingVariant.node);if(!isVariantManuallySelected){window.__fc_activeVariantId=matchingVariant.node.id;}setIsInStock(isVariantAvailable(matchingVariant.node));setNeedsVariantSelection(false);return;// Exit early as we've found our variant\n}}// Immediately handle single variant products\nif(handleSingleVariantProduct(productNode)){return;// Exit early as we've handled the single variant\n}if(autoSelectFirst&&!isVariantManuallySelected){//console.log(\"Auto-selecting the first variant\");\nconst firstAvailableVariant=productNode.variants.edges.find(edge=>edge.node.availableForSale)?.node;if(firstAvailableVariant){setActiveVariant(firstAvailableVariant);if(!isVariantManuallySelected){window.__fc_activeVariantId=firstAvailableVariant.id;}setIsInStock(isVariantAvailable(firstAvailableVariant));setNeedsVariantSelection(false);return;// Exit early as we've set the active variant\n}}// For multi-variant products without a selected variant\nconst variants=get(productNode,\"variants.edges\",[]);const hasMultipleVariants=variants.length>1;const optionsCount=get(productNode,\"options\",[]).length||0;// Only update needsVariantSelection if we don't have an active variant.\n// This is to prevent the \"Select Variant\" button from showing when the variant is already selected.\nif(!activeVariant){if(!autoSelectFirst&&hasMultipleVariants){setNeedsVariantSelection(true);}else{setNeedsVariantSelection(!shopifyProductVariantId&&hasMultipleVariants);}}// Check if any variant is available\nconst anyVariantAvailable=variants.some(({node})=>isVariantAvailable(node));setIsInStock(anyVariantAvailable);// If nothing is available, do not prompt for variant selection\nif(!anyVariantAvailable){setNeedsVariantSelection(false);}}else{setProduct(\"404\");setIsInStock(false);}};// Check if we already have product data available\nif(window.shopXtools?.products&&Array.isArray(window.shopXtools.products)&&!product){const _matchingProduct=window.shopXtools.products.find(({node})=>node.id===`gid://shopify/Product/${shopifyProductID}`);if(_matchingProduct){// console.log(\n//   '[PURCHASE BUTTON] Found matching product on mount, loading it'\n// );\nhandleProductData(_matchingProduct);}else{// console.log(\n//   '[PURCHASE BUTTON] No matching product found in existing products'\n// );\n}}const productsReadyHandler=()=>{if(window?.shopXtools?.products){const matchingProduct=window.shopXtools.products.find(({node:product})=>product.id===`gid://shopify/Product/${shopifyProductID}`);// console.log(\n//   '[productsReadyHandler] Found matching product:',\n//   !!matchingProduct\n// );\n// Only update if we don't already have this product data loaded\nif(!product||product===\"404\"){// console.log(\n//   '[productsReadyHandler] No product loaded yet, calling handleProductData'\n// );\nhandleProductData(matchingProduct);}}};const variantChangeHandler=e=>{// Only update the variant if no shopifyProductVariantId is provided\n// console.log(\"Variant changed, active variant is\", e.detail)\nif(e.detail.productId!==`gid://shopify/Product/${shopifyProductID}`){return;}if(e.detail){// Normalize completeness: some dispatchers may omit isCompleteVariant.\nconst productOptions=get(product,\"options\",[])||[];const selectedArray=Array.isArray(e.detail.selectedOptions)?e.detail.selectedOptions:[];const selectedNames=new Set(selectedArray.map(o=>o?.name).filter(Boolean));const isCompleteFromNames=productOptions.length>0&&productOptions.every(opt=>selectedNames.has(opt.name));const isComplete=e.detail.isCompleteVariant===true||isCompleteFromNames;// If selection is partial, DO NOT treat it as an active variant for purchasing\nif(!isComplete){setIsVariantManuallySelected(true);setActiveVariant(null);window.__fc_activeVariantId=undefined;setNeedsVariantSelection(true);return;}// Complete selection – safe to treat as active variant\nsetActiveVariant(e.detail);setIsVariantManuallySelected(true);window.__fc_activeVariantId=e.detail.id;setIsInStock(e.detail.quantityAvailable>0);// console.log(\"e.detail.id\", e.detail.id)\n// console.log(\n//     \"window.__fc_activeVariantId\",\n//     window.__fc_activeVariantId\n// )\nconst cartQuantity=getCurrentCartQuantity(e.detail.id);// console.log(\"variantChangeHandler: cartQuantity\", cartQuantity)\n// if there's a cart item, it can reach the stock limit only if variant's quantityAvailable > 0\n// if variant's quantityAvailable = 0, it's out of stock, and we don't show 'limit reached' state\n// if variant's quantityAvailable < 0, continue selling when out of stock is enabled, so limit cannot ever be reached\nif(cartQuantity===e.detail.quantityAvailable&&e.detail.quantityAvailable>0){// console.log(\"variantChangeHandler: max reached\")\nsetMaxQuantityReached(true);}else{setMaxQuantityReached(false);}// When autoSelectFirst is false, we need to make sure all variants are selected\n// before changing the button state\n// Only mark selection as complete when all options are selected\nif(isComplete){setNeedsVariantSelection(false);}else{setNeedsVariantSelection(true);}}};document.addEventListener(\"data__products-ready\",productsReadyHandler);document.addEventListener(\"product__active-variant__changed\",variantChangeHandler);return()=>{document.removeEventListener(\"data__products-ready\",productsReadyHandler);document.removeEventListener(\"product__active-variant__changed\",variantChangeHandler);};},[shopifyProductID,shopifyProductVariantId,activeVariant,isBrowser,calculateTotalInventory,autoSelectFirst,product]);// Update variant selection state when activeVariant changes\nuseEffect(()=>{if(!product||product===\"404\")return;const variants=get(product,\"variants.edges\",[]);const hasMultipleVariants=variants.length>1;const noVariantSelected=!activeVariant&&!shopifyProductVariantId;// console.log('Variant selection state update:', {\n//     hasMultipleVariants,\n//     noVariantSelected,\n//     activeVariant,\n//     shopifyProductVariantId\n// })\nsetNeedsVariantSelection(hasMultipleVariants&&noVariantSelected);},[product,activeVariant,shopifyProductVariantId]);// Cart functionality\n// Add new state for order field validation\nconst[orderFieldError,setOrderFieldError]=useState(false);// Debug logging function\nconst logDebug=(message,data)=>{// Empty function - no logging\n};// Enhanced validation function with logging\nconst validateOrderField=()=>{if(!props.required){logDebug(\"Validation skipped - not required\",{required:props.required});return true;}const productSpecificKey=`fc_cart_attributes_${props.shopifyProductID}`;const storedAttributes=sessionStorage.getItem(productSpecificKey);logDebug(\"Checking stored attributes\",{productSpecificKey,hasStoredAttributes:!!storedAttributes});if(!storedAttributes){return false;}try{const parsedAttrs=JSON.parse(storedAttributes);// Check if any attribute has a non-empty value\nconst hasValidValue=Object.values(parsedAttrs).some(value=>value&&String(value).trim()!==\"\");logDebug(\"Validation result\",{attributes:parsedAttrs,isValid:hasValidValue});return hasValidValue;}catch(error){return false;}};// Effect to initialize validation state\nuseEffect(()=>{if(props.required){const isValid=validateOrderField();logDebug(\"Initial validation\",{isValid,required:props.required});setOrderFieldError(!isValid);}},[props.required,props.shopifyProductID]);// Listen for order field changes with logging\nuseEffect(()=>{if(props.required){const handleOrderFieldChange=event=>{logDebug(\"Order field change event received\",event.detail);const isValid=validateOrderField();setOrderFieldError(!isValid);logDebug(\"Order field validation updated\",{isValid,orderFieldError:!isValid});};window.addEventListener(\"orderFieldChanged\",handleOrderFieldChange);return()=>window.removeEventListener(\"orderFieldChanged\",handleOrderFieldChange);}},[props.required]);const[isInputRequired,setIsInputRequired]=useState(false);// Effect to check if the input field exists and is required\nuseEffect(()=>{const checkInputRequirement=()=>{const configKey=`fc_input_config_${shopifyProductID}`;const config=sessionStorage.getItem(configKey);// Only set as required if the config exists and required is true\nif(config){const{required}=JSON.parse(config);setIsInputRequired(required);}else{// If no config exists, the field isn't on the page\nsetIsInputRequired(false);}};checkInputRequirement();// Listen for config changes\nwindow.addEventListener(\"inputConfigChanged\",checkInputRequirement);return()=>window.removeEventListener(\"inputConfigChanged\",checkInputRequirement);},[shopifyProductID]);const getLineItem=()=>{const merchandiseId=activeVariant?.id||(props.shopifyProductVariantId?`gid://shopify/ProductVariant/${props.shopifyProductVariantId}`:null);if(!merchandiseId){throw new Error(\"No valid product variant selected\");}const lineItem={merchandiseId,quantity:productQuantity};// Add selling plan ID if a subscription is selected\nif(planSelected&&planSelected!==\"one-time\"){lineItem[\"sellingPlanId\"]=planSelected;}try{const productSpecificKey=`fc_cart_attributes_${props.shopifyProductID}`;const stored=sessionStorage.getItem(productSpecificKey);if(!stored)return lineItem;const data=JSON.parse(stored);// Get all attributes instead of just checking for specific ones\nconst attributes=[];// Process all key-value pairs in the stored data\nObject.entries(data).forEach(([key,value])=>{if(value&&String(value).trim()){attributes.push({key,value:String(value).trim()});}});// Only add attributes if we have any\nif(attributes.length>0){lineItem[\"attributes\"]=attributes;}}catch(e){console.error(\"Error adding attributes to cart item:\",e);}return lineItem;};// Fetch order_max from product metafields\nconst fetchOrderMax=useCallback(async productHandle=>{if(!productHandle)return;try{const metafieldsResponse=await window.shopXtools?.handleCartMutation?.(getProductMetafields,{handle:productHandle});const max=parseInt(metafieldsResponse?.product?.metafield_order_max?.value,10);if(!isNaN(max)&&max>0){setOrderMax(max);// console.log(\"Fetched order max\", max)\n}else{setOrderMax(0);}}catch(error){console.warn(\"Could not fetch product metafields for order_max:\",error);setOrderMax(0);}},[]);// Modify the getCurrentCartQuantity function to calculate per-product quantity\nconst getCurrentCartQuantity=useCallback(variantId=>{// if (!cartExistingData?.lines?.edges) {\n//     return 0\n// }\nconst liveCart=window?.shopXtools?.cart;setCartExistingData(liveCart);const liveEdges=liveCart?.lines?.edges;if(!liveEdges)return 0;// If we have a product handle, calculate per-product quantity\nif(product?.handle&&orderMax>0){const productVariantIds=get(product,\"variants.edges\",[]).map(({node})=>node.id);const totalQuantity=liveEdges.reduce((total,{node})=>{if(productVariantIds.includes(node.merchandise.id)){return total+node.quantity;}return total;},0);// console.log(\"getCurrentCartQuantity (per-product):\", totalQuantity)\nreturn totalQuantity;}// Fallback to variant-specific quantity\nconst quantity=liveEdges.reduce((total,{node})=>{if(node.merchandise.id===variantId){return total+node.quantity;}return total;},0);// console.log(\"getCurrentCartQuantity (per-variant):\", quantity)\nreturn quantity;},[product,orderMax]);const handleAddToCart=async()=>{try{if(!isBrowser)return;const variantId=activeVariant?.id||(props.shopifyProductVariantId?`gid://shopify/ProductVariant/${props.shopifyProductVariantId}`:null);const currentCartQuantity=getCurrentCartQuantity(variantId);// console.log(\"currentCartQuantity\", currentCartQuantity)\n// Check order_max from product metafields\nif(orderMax>0){// console.log(\"orderMax > 0\", orderMax)\n// Check if we've already reached the product limit\nif(currentCartQuantity>=orderMax){// console.log(\"currentCartQuantity >= orderMax: Max reached\")\nsetMaxQuantityReached(true);return;}}// Check quantityAvailable when orderMax is 0 or not set\nif(orderMax===0&&activeVariant&&activeVariant.quantityAvailable>0){// console.log(\"orderMax is 0, checking quantityAvailable\")\n// console.log(\"activeVariant.quantityAvailable\", activeVariant.quantityAvailable)\n// Check if we've already reached the available quantity\nif(currentCartQuantity>=activeVariant.quantityAvailable){// console.log(\"currentCartQuantity >= quantityAvailable: Max reached\")\nsetMaxQuantityReached(true);return;}}if(props.required||isInputRequired){const productSpecificKey=`fc_cart_attributes_${props.shopifyProductID}`;const storedAttributes=sessionStorage.getItem(productSpecificKey);const inputElement=document.querySelector(`[data-product-id=\"${props.shopifyProductID}\"]`);const currentInputValue=inputElement?.value||\"\";// Don't check for unsaved input if there's no input element or value\nif(inputElement&&currentInputValue&&storedAttributes){try{// Parse stored attributes\nconst parsedAttrs=JSON.parse(storedAttributes);// Check if the current input value is different from any of the stored attribute values\nconst valueIsSaved=Object.values(parsedAttrs).some(attrValue=>String(attrValue).trim()===currentInputValue.trim());if(!valueIsSaved){window.dispatchEvent(new CustomEvent(\"inputValidationFailed\",{detail:{productId:props.shopifyProductID,message:\"Please save your input before adding to cart\"}}));return;}}catch(e){// If we can't parse stored attributes, we can't validate\nwindow.dispatchEvent(new CustomEvent(\"inputValidationFailed\",{detail:{productId:props.shopifyProductID,message:\"Please fill in all required fields\"}}));return;}}// Now check if there are any stored attributes at all\nif(!storedAttributes){window.dispatchEvent(new CustomEvent(\"inputValidationFailed\",{detail:{productId:props.shopifyProductID,message:\"Please fill in all required fields\"}}));return;}// Finally check if any of the stored attributes has a valid value\ntry{const parsedAttrs=JSON.parse(storedAttributes);const hasValidValue=Object.values(parsedAttrs).some(value=>value&&String(value).trim()!==\"\");if(!hasValidValue){window.dispatchEvent(new CustomEvent(\"inputValidationFailed\",{detail:{productId:props.shopifyProductID,message:\"Please fill in all required fields\"}}));return;}}catch(e){window.dispatchEvent(new CustomEvent(\"inputValidationFailed\",{detail:{productId:props.shopifyProductID,message:\"Please fill in all required fields\"}}));return;}}const lines=[getLineItem()];// console.log(\"handleAddToCart lines:\", lines)\n// Retrieve the selected country code from localStorage\nconst countryCode=localStorage.getItem(\"selectedCountryCode\");let existingCartId=localStorage.getItem(\"shopX_cart_id\");if(!BuyNowATC){if(existingCartId){try{const cartValidation=await window.shopXtools.handleCartMutation(cartQuery,{cartId:existingCartId});if(!cartValidation?.cart){localStorage.removeItem(\"shopX_cart_id\");localStorage.removeItem(\"shopXtools.cart\");existingCartId=null;}}catch(error){localStorage.removeItem(\"shopX_cart_id\");localStorage.removeItem(\"shopXtools.cart\");existingCartId=null;}}if(!existingCartId){try{const cartData=await window.shopXtools.handleCartMutation(createCartMutation,{lines,countryCode:countryCode});if(cartData?.cartCreate?.cart?.id){localStorage.setItem(\"shopX_cart_id\",cartData.cartCreate.cart.id);localStorage.setItem(\"shopXtools.cart\",JSON.stringify(cartData.cartCreate.cart));window.shopXtools.cart=cartData.cartCreate.cart;setCartExistingData(window.shopXtools.cart);// Dispatch event after updating the cart\nwindow.dispatchEvent(new Event(\"shopXtools-cart-update\"));// Analytics\nconst currency=activeVariant?.price?.currencyCode||\"USD\";const value=parseFloat((parseFloat(activeVariant?.price?.amount||\"0\")*productQuantity).toFixed(2));const item_id=cleanShopifyId(activeVariant?.id);const item_name=product?.title||\"\";// const item_variant = activeVariant?.selectedOptions\n//     .map(opt => `${opt.name} ${opt.value}`)\n//     .join(\" / \") || null\nconst item_variant=activeVariant?.selectedOptions?activeVariant.selectedOptions.map(opt=>`${opt.name} ${opt.value}`).join(\" / \")||null:\"\";const price=parseFloat(activeVariant?.price?.amount||\"0\");// Google Analytics tracking (add_to_cart)\nif(item_id&&item_name&&item_variant&&price>0){const payload={currency,value,items:[{item_id,item_name,item_variant,price,item_brand:product?.vendor||null,item_category:product?.productType||null,quantity:productQuantity,// TagHound compatibility\nSKU:item_id,\"Item Name\":item_name}]};// console.log('[FC_ProductPurchaseButton ANALYTICS] About to fire add_to_cart with payload:', payload);\nif(typeof window.fcTrackGAEvent===\"function\"){window.fcTrackGAEvent(\"add_to_cart\",payload);// console.log('[FC_ProductPurchaseButton ANALYTICS] Fired add_to_cart:', payload.items[0]);\n}}else{console.warn(\"❌ Skipping add_to_cart: missing item data\",{item_id,item_name,item_variant,price,value});}// Meta Pixel tracking\ntrackFacebookPixelAddToCart({variant:activeVariant,product:product,quantity:productQuantity,currency:currency});window.shopXtools.dispatchEvent(\"checkout__changed\",{__triggerCartModal:openCart});}else{window.dispatchEvent(new CustomEvent(\"errorChanged\",{detail:\"Failed to add to cart\"}));}}catch(error){window.dispatchEvent(new CustomEvent(\"errorChanged\",{detail:error.message||\"Failed to create new cart\"}));}}else{const cartData=await window.shopXtools.handleCartMutation(addToCartMutation,{cartId:existingCartId,lines});if(cartData?.cartLinesAdd?.cart){localStorage.setItem(\"shopXtools.cart\",JSON.stringify(cartData.cartLinesAdd.cart));window.shopXtools.cart=cartData.cartLinesAdd.cart;// console.log(\"handleAddToCart cart:\", window.shopXtools.cart)\nsetCartExistingData(window.shopXtools.cart);// Dispatch event after updating the cart\nwindow.dispatchEvent(new Event(\"shopXtools-cart-update\"));// Google Analytics tracking\nconst currency=activeVariant?.price?.currencyCode||\"USD\";const value=parseFloat((parseFloat(activeVariant?.price?.amount||\"0\")*productQuantity).toFixed(2));const item_id=cleanShopifyId(activeVariant?.id);const item_name=product?.title||\"\";// const item_variant = activeVariant?.selectedOptions\n//     .map(opt => `${opt.name} ${opt.value}`)\n//     .join(\" / \") || null\nconst item_variant=activeVariant?.selectedOptions?activeVariant.selectedOptions.map(opt=>`${opt.name} ${opt.value}`).join(\" / \")||null:\"\";const price=parseFloat(activeVariant?.price?.amount||\"0\");// Google Analytics tracking (add_to_cart)\nif(item_id&&item_name&&item_variant&&price>0){const payload={currency,value,items:[{item_id,item_name,item_variant,price,item_brand:product?.vendor||null,item_category:product?.productType||null,quantity:productQuantity,// TagHound compatibility\nSKU:item_id,\"Item Name\":item_name}]};// console.log('[FC_ProductPurchaseButton ANALYTICS] About to fire add_to_cart with payload:', payload);\nif(typeof window.fcTrackGAEvent===\"function\"){window.fcTrackGAEvent(\"add_to_cart\",payload);// console.log('[FC_ProductPurchaseButton ANALYTICS] Fired add_to_cart:', payload.items[0]);\n}}else{console.warn(\"❌ Skipping add_to_cart: missing item data\",{item_id,item_name,item_variant,price,value});}// Meta Pixel tracking\ntrackFacebookPixelAddToCart({variant:activeVariant,product:product,quantity:productQuantity,currency:currency});window.shopXtools.dispatchEvent(\"checkout__changed\",{__triggerCartModal:openCart});}else{window.dispatchEvent(new CustomEvent(\"errorChanged\",{detail:\"Failed to add to cart\"}));}}}// Directly proceed to checkout without opening the cart modal\nif(BuyNowATC){//console.log(\"Directly proceeding to checkout without opening the cart modal\")\n// Create the cart and proceed to checkout\nconst variables={lines,countryCode:countryCode};//console.log(\"Sending mutation with variables:\", variables)\nconst result=await window[\"shopXtools\"]?.handleTemporaryCartMutation(createCartMutation,variables);//console.log(\"result:\", result)\nconst checkoutUrl=result.cartCreate.cart.checkoutUrl;if(checkoutUrl){//console.log(\"checkoutUrl:\", checkoutUrl)\nlet finalCheckoutUrl=checkoutUrl;if(finalCheckoutUrl){// Analytics\nconst currency=activeVariant?.price?.currencyCode||\"USD\";const value=parseFloat((parseFloat(activeVariant?.price?.amount||\"0\")*productQuantity).toFixed(2));const item_id=cleanShopifyId(activeVariant?.id);const item_name=product?.title||\"\";// const item_variant = activeVariant?.selectedOptions\n//     .map(opt => `${opt.name} ${opt.value}`)\n//     .join(\" / \") || null\nconst item_variant=activeVariant?.selectedOptions?activeVariant.selectedOptions.map(opt=>`${opt.name} ${opt.value}`).join(\" / \")||null:\"\";const price=parseFloat(activeVariant?.price?.amount||\"0\");// Google Analytics tracking (begin_checkout)\nif(item_id&&item_name&&item_variant&&price>0){const payload={currency,value,items:[{item_id,item_name,item_variant,price,item_brand:product?.vendor||null,item_category:product?.productType||null,quantity:productQuantity,// TagHound compatibility\nSKU:item_id,\"Item Name\":item_name}]};// console.log('[FC_ProductPurchaseButton ANALYTICS] About to fire begin_checkout with payload:', payload);\nif(typeof window.fcTrackGAEvent===\"function\"){window.fcTrackGAEvent(\"begin_checkout\",payload);// console.log('[FC_ProductPurchaseButton ANALYTICS] Fired begin_checkout:', payload.items[0]);\n}}else{console.warn(\"❌ Skipping begin_checkout: missing item data\",{item_id,item_name,item_variant,price,value});}// Meta Pixel tracking\ntrackFacebookPixelInitiateCheckout({variant:activeVariant,product:product,quantity:productQuantity,currency:currency,useBeacon:true});finalCheckoutUrl=appendAllTrackingParamsToUrl(finalCheckoutUrl);finalCheckoutUrl=appendLanguageToUrl(finalCheckoutUrl);window.location.assign(finalCheckoutUrl);}}else{window.dispatchEvent(new CustomEvent(\"errorChanged\",{detail:\"Failed to create cart for checkout\"}));}}if(lines[0].attributes){// const cartId = existingCartId || cartData?.cartCreate?.cart?.id;\nconst cartId=existingCartId//removed check for cartData\n;await window.shopXtools.handleCartMutation(updateCartAttributes,{cartId,attributes:lines[0].attributes});}}catch(error){window.dispatchEvent(new CustomEvent(\"errorChanged\",{detail:error.message||\"Failed to add item to cart\"}));}};// Update loading state when product data is received\nuseEffect(()=>{if(product){setIsLoading(false);}},[product]);// Initialize hasInitialized\nuseEffect(()=>{if(!hasInitialized&&(product||shopifyProductID)){// && (product || shopifyProductID) part ensures the button is rendered in Framer preview\n// Small delay to ensure we have all the necessary data\nconst timer=setTimeout(()=>{setHasInitialized(true);},50);return()=>clearTimeout(timer);}},[product]);// Handle loading state for canvas preview\nconst isDesignOrPreview=RenderTarget.current()===RenderTarget.canvas;let content=null;if(isDesignOrPreview){content=available?.[0]||null// Always show available state in canvas\n;}else if(!hasInitialized){content=null;}else if(maxQuantityReached&&maxQuantity?.[0]){content=maxQuantity?.[0]||null;}else if(!isInStock&&!activeVariant?.availableForSale||activeVariant&&!isVariantAvailable(activeVariant)||product&&!get(product,\"variants.edges\",[]).some(({node})=>isVariantAvailable(node))||props.required&&orderFieldError){// Prioritize Out of Stock over prompting variant selection\ncontent=OutOfStock?.[0]||null;}else if(needsVariantSelection){content=SelectVariant?.[0]||null;}else{content=available?.[0]||null;}// Near the bottom of the component where we create clonedElement\nconst canAddToCart=(isInStock||activeVariant&&activeVariant.availableForSale)&&!needsVariantSelection&&!maxQuantityReached&&(!props.required||!orderFieldError);const handleClick=e=>{if(canAddToCart){handleAddToCart();}};// Single consolidated effect for maxQuantityReached\nuseEffect(()=>{const variantId=activeVariant?.id||(props.shopifyProductVariantId?`gid://shopify/ProductVariant/${props.shopifyProductVariantId}`:null);// Always read from live cart to avoid stale state after updates\nconst currentQuantity=getCurrentCartQuantity(variantId);// console.log(\"currentQuantity\", currentQuantity)\nlet shouldBeAtMax=false;// Check orderMax first (takes precedence)\nif(orderMax>0){shouldBeAtMax=currentQuantity>=orderMax;// console.log(\"orderMax check - shouldBeAtMax:\", shouldBeAtMax)\n}else if(orderMax===0&&activeVariant){if(activeVariant.quantityAvailable>0&&activeVariant.availableForSale){// If no orderMax, check quantityAvailable\nshouldBeAtMax=currentQuantity>=activeVariant.quantityAvailable;// console.log(\"quantityAvailable check - shouldBeAtMax:\", shouldBeAtMax)\n}}if(shouldBeAtMax!==maxQuantityReached){// console.log(\"shouldBeAtMax !== maxQuantityReached\", maxQuantityReached, shouldBeAtMax)\nsetMaxQuantityReached(shouldBeAtMax);}},[orderMax,activeVariant,props.shopifyProductVariantId,maxQuantityReached,getCurrentCartQuantity]);// Add this effect near the other useEffect hooks\nuseEffect(()=>{if(orderMax>0){window.dispatchEvent(new CustomEvent(\"setMaxQuantity\",{detail:{productId:props.shopifyProductID,maxQuantity:orderMax}}));}},[orderMax,props.shopifyProductID]);// Add this effect to handle cart updates\nuseEffect(()=>{const variantId=activeVariant?.id||(props.shopifyProductVariantId?`gid://shopify/ProductVariant/${props.shopifyProductVariantId}`:null);const currentInCart=getCurrentCartQuantity(variantId);if(orderMax>0&&cartExistingData){// Handle orderMax scenario\nconst remainingAllowed=Math.max(0,orderMax-currentInCart);window.dispatchEvent(new CustomEvent(\"setMaxQuantity\",{detail:{productId:props.shopifyProductID,maxQuantity:remainingAllowed}}));// console.log(\"sending setMaxQuantity, orderMAx > 0 (cartExistingData)\", {\n//     detail: {\n//         productId: props.shopifyProductID,\n//         maxQuantity: remainingAllowed,\n//     },\n// })\n}else if(orderMax===0&&activeVariant&&cartExistingData){// console.log(\"cartExistingData, currentInCart\", cartExistingData, currentInCart)\nif(activeVariant.quantityAvailable>0&&activeVariant.availableForSale){// Handle quantityAvailable scenario\nconst remainingAllowed=Math.max(0,activeVariant.quantityAvailable-currentInCart);window.dispatchEvent(new CustomEvent(\"setMaxQuantity\",{detail:{productId:props.shopifyProductID,maxQuantity:remainingAllowed}}));// console.log(\"sending setMaxQuantity,  orderMAx = 0 (cartExistingData)\", {\n//     detail: {\n//         productId: props.shopifyProductID,\n//         maxQuantity: remainingAllowed,\n//     },\n// })\n}}},[cartExistingData,orderMax,activeVariant,props.shopifyProductVariantId,getCurrentCartQuantity,productQuantity]);// Effect to handle general cart updates\nuseEffect(()=>{const handleCartUpdate=()=>{// console.log(\"handleCartUpdate: Cart updated, refreshing purchase button state\")\n// Force recalculation of maxQuantityReached state\nconst variantId=activeVariant?.id||null;const currentQuantity=getCurrentCartQuantity(variantId);if(orderMax>0){const shouldBeAtMax=currentQuantity>=orderMax;setMaxQuantityReached(shouldBeAtMax);// console.log(\"handleCartUpdate: orderMax > 0, shouldBeAtMax:\", shouldBeAtMax)\n}else if(orderMax===0&&activeVariant&&activeVariant.quantityAvailable>0){const shouldBeAtMax=currentQuantity>=activeVariant.quantityAvailable;setMaxQuantityReached(shouldBeAtMax);// console.log(\"handleCartUpdate: orderMax = 0, shouldBeAtMax:\", shouldBeAtMax)\n}else{setMaxQuantityReached(false);// console.log(\"handleCartUpdate: resetting maxQuantityReached to false\")\n}const orderMaxRemainingAllowed=Math.max(0,orderMax-currentQuantity);// console.log(\"handleCartUpdate: orderMaxRemainingAllowed\", orderMaxRemainingAllowed)\nconst variantQnt=activeVariant?.quantityAvailable<=0&&activeVariant?.availableForSale?100:activeVariant?.quantityAvailable;// console.log(\"handleCartUpdate: variantQnt\", variantQnt)\nconst remainingAllowed=Math.max(0,variantQnt-currentQuantity);// console.log(\"handleCartUpdate: remainingAllowed\", remainingAllowed)\nwindow.dispatchEvent(new CustomEvent(\"setMaxQuantity\",{detail:{productId:props.shopifyProductID,maxQuantity:orderMax>0?orderMaxRemainingAllowed:remainingAllowed}}));// console.log(\"handleCartUpdate: sending setMaxQuantity\", {\n//     detail: {\n//         productId: props.shopifyProductID,\n//         maxQuantity: orderMax > 0 ? orderMaxRemainingAllowed : remainingAllowed,\n//     },\n// })\n};window.addEventListener(\"shopXtools-cart-update\",handleCartUpdate);return()=>window.removeEventListener(\"shopXtools-cart-update\",handleCartUpdate);},[activeVariant,orderMax,getCurrentCartQuantity,props.shopifyProductID]);useEffect(()=>{if(!isBrowser)return;const handleResize=()=>{if(typeof window!==\"undefined\"&&window.__fc_autoSelectFirst!==undefined){setAutoSelectFirst(window.__fc_autoSelectFirst);}if(typeof window!==\"undefined\"&&window.__fc_activeVariantId!==undefined){const storedId=window.__fc_activeVariantId;// console.log(\"storedId\", storedId)\nif(storedId){const variants=get(product,\"variants.edges\",[]);const found=variants.find(({node})=>node.id===storedId);// console.log(\"found\", found)\nif(found)setActiveVariant(found.node);// console.log(\"setting activeVariant\", found.node)\n}}if(product){const variants=get(product,\"variants.edges\",[]);const hasMultipleVariants=variants.length>1;// console.log(\"activeVariant\", activeVariant)\nif(autoSelectFirst){setNeedsVariantSelection(false);// console.log(\"handleResize: autoSelectFirst, setting needsVariantSelection to false\");\n}else if(activeVariant){// If a variant is already selected, don't require selection\nsetNeedsVariantSelection(false);// console.log(\"handleResize: activeVariant exists, setting needsVariantSelection to false\");\n}else if(!autoSelectFirst&&hasMultipleVariants){setNeedsVariantSelection(true);// console.log(\"handleResize: !autoSelectFirst && hasMultipleVariants\", autoSelectFirst, hasMultipleVariants);\n}else{setNeedsVariantSelection(!shopifyProductVariantId&&hasMultipleVariants);//console.log(\"handleResize: !shopifyProductVariantId && hasMultipleVariants\", shopifyProductVariantId, hasMultipleVariants);\n}}};window.addEventListener(\"resize\",handleResize);return()=>{window.removeEventListener(\"resize\",handleResize);};},[isBrowser,product,activeVariant,autoSelectFirst,shopifyProductVariantId]);const viewItemTrackedRef=useRef();const pageViewTrackedRef=useRef(false);// Single consolidated analytics effect\nuseEffect(()=>{if(!product)return;// Helper to extract brand and category if available\nconst item_brand=product.vendor||null;const item_category=product.productType||null;// Always fire page_view on initial load\nif(!pageViewTrackedRef.current){const productId=cleanShopifyId(product.id);const productName=product.title;const defaultVariant=get(product,\"variants.edges\",[])[0]?.node;let payload;if(defaultVariant){// Product with variants\npayload={currency:defaultVariant.price?.currencyCode||\"USD\",value:parseFloat(defaultVariant.price?.amount||\"0\"),items:[{item_id:cleanShopifyId(defaultVariant.id),item_name:productName,item_variant:defaultVariant.title,price:parseFloat(defaultVariant.price?.amount||\"0\"),item_brand,item_category,quantity:1,// TagHound compatibility\nSKU:cleanShopifyId(defaultVariant.id),\"Item Name\":productName}]};}else{// Product with no variants\npayload={currency:product.priceRange?.minVariantPrice?.currencyCode||\"USD\",value:parseFloat(product.priceRange?.minVariantPrice?.amount||\"0\"),items:[{item_id:productId,item_name:productName,price:parseFloat(product.priceRange?.minVariantPrice?.amount||\"0\"),item_brand,item_category,quantity:1,// TagHound compatibility\nSKU:productId,\"Item Name\":productName}]};}// We do not fire GA4 page_view manually; GA4 config handles it. Keep only view_item below.\npageViewTrackedRef.current=true;}// Fire view_item when variant is selected\nif(activeVariant&&product?.title){const item_id=cleanShopifyId(activeVariant.id);const item_name=product.title;// console.log(\"activeVariant\", activeVariant)\nconst item_variant=activeVariant?.selectedOptions?activeVariant.selectedOptions.map(opt=>`${opt.name} ${opt.value}`).join(\" / \")||null:\"\";const price=parseFloat(activeVariant.price?.amount||\"0\");const currency=activeVariant.price?.currencyCode||\"USD\";const value=price;// Only fire if all data is present and not already tracked for this variant\nif(item_id&&item_name&&item_variant&&price>0&&viewItemTrackedRef.current!==item_id){const payload={currency,value,items:[{item_id,item_name,item_variant,price,item_brand,item_category,quantity:1,// TagHound compatibility\nSKU:item_id,\"Item Name\":item_name}]};if(payload.items&&payload.items.length>0&&payload.items[0].item_id&&payload.items[0].item_name){window.fcTrackGAEvent&&window.fcTrackGAEvent(\"view_item\",payload);viewItemTrackedRef.current=item_id;}else{// Skipping view_item - invalid payload\n}}}},[product,activeVariant]);useEffect(()=>{// On state transition, blur any currently focused button that is about to be hidden\nconst focused=document.activeElement;if(focused&&focused.closest(\".fc-purchase-button-container\")){focused.blur();}},[content]);// Determine canvas preview content\nlet canvasContent=null;if(isDesignOrPreview){// If \"Available\" (Add to Cart) is connected, it dominates\nif(available?.[0]){canvasContent=available[0];}else if(SelectVariant?.[0]){canvasContent=SelectVariant[0];}else if(OutOfStock?.[0]){canvasContent=OutOfStock[0];}else if(maxQuantity?.[0]){canvasContent=maxQuantity[0];}else if(LoadingState?.[0]){canvasContent=LoadingState[0];}}// Check if we need to show \"Connect Instance\" in canvas\nconst hasAnyState=available?.[0]||SelectVariant?.[0]||OutOfStock?.[0]||maxQuantity?.[0]||LoadingState?.[0];if(isDesignOrPreview&&!hasAnyState){return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",color:\"#666\",fontSize:\"14px\",border:\"1px dashed #ccc\",borderRadius:\"4px\"},children:\"Connect Instance\"});}const href=typeof window!==\"undefined\"?window.location.href:\"\";const isPreview=href.includes(\"framercanvas.com\")// projects in preview always run under the internal domain framercanvas.com\n;// Sanitize content instances before cloning\nconst sanitizedCanvasContent=canvasContent?sanitizeChildrenRecursively(canvasContent):null;const sanitizedLoadingState=LoadingState?.[0]?sanitizeChildrenRecursively(LoadingState[0]):null;const sanitizedContent=content?sanitizeChildrenRecursively(content):null;return /*#__PURE__*/_jsxs(\"div\",{style:{height:\"100%\",position:\"relative\"},role:\"none\",className:\"fc-purchase-button-container\",children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                .fc-purchase-button-container :focus-visible {\n                    outline: ${props.focus.width}px solid ${props.focus.color} !important;\n                    outline-offset: ${props.focus.padding}px !important;\n                    border-radius: ${props.focus.radius}px !important;\n                }\n            `}),isDesignOrPreview?sanitizedCanvasContent&&/*#__PURE__*/cloneElement(sanitizedCanvasContent,{style:{...canvasContent?.props?.style||{},width:\"100%\",height:\"100%\",cursor:\"pointer\",outline:\"none\"},onClick:handleClick,role:\"button\",\"aria-label\":canvasContent===available?.[0]?props.BuyNowATC?\"Buy now\":\"Add to cart\":canvasContent===SelectVariant?.[0]?\"Select variant\":canvasContent===OutOfStock?.[0]?\"Out of stock\":canvasContent===maxQuantity?.[0]?\"Max quantity reached\":\"Loading\"}):isLoading&&!props.skipLoading&&sanitizedLoadingState&&!isPreview?/*#__PURE__*/cloneElement(sanitizedLoadingState,{style:{...LoadingState[0].props?.style||{},width:\"100%\",height:\"100%\",outline:\"none\"},role:\"status\",\"aria-label\":`Loading ${props.BuyNowATC?\"buy now\":\"add to cart\"} button`,\"aria-live\":\"polite\",tabIndex:-1}):sanitizedContent?/*#__PURE__*/cloneElement(sanitizedContent,{style:{...content?.props?.style||{},width:\"100%\",height:\"100%\",cursor:canAddToCart?\"pointer\":\"not-allowed\",outline:\"none\"},onClick:canAddToCart?handleClick:undefined,onKeyDown:canAddToCart?e=>{if(e.key===\"Enter\"||e.key===\" \"){e.preventDefault();handleClick(e);}}:undefined,role:\"button\",\"aria-disabled\":!canAddToCart,\"aria-label\":content===available?.[0]?props.BuyNowATC?\"Buy now\":\"Add to cart\":content===SelectVariant?.[0]?\"Select variant\":content===OutOfStock?.[0]?\"Out of stock\":\"Max quantity reached\",tabIndex:hasInitialized?0:-1}):null]});}addPropertyControls(FC_ProductPurchaseButton,{shopifyProductID:{type:ControlType.String,title:\"Product ID\",description:\"Connect to CMS (required)\"},LoadingState:{type:ControlType.ComponentInstance,title:\"Loading\",hidden:props=>props.skipLoading,description:\"Display when product/variant is determining state to show.\"},available:{type:ControlType.ComponentInstance,title:\"Available\",description:\"Display when product/variant is available (Add to Cart or Buy Now).\"},SelectVariant:{type:ControlType.ComponentInstance,title:\"Select Variant\",description:\"Display when product/variant requires a variant selection.\"},OutOfStock:{type:ControlType.ComponentInstance,title:\"Out of Stock\",description:\"Display when product/variant is out of stock.\"},maxQuantity:{type:ControlType.ComponentInstance,title:\"Limit Reached\",description:\"Display when maximum cart quantity is reached.  \\n\\n –––– \\n\\n Connect each state to button component off-page. \\n\\n If you detatch the button component, you'll need to reconnect the states.\"},BuyNowATC:{title:\"Buy Now\",type:ControlType.Boolean,enabledTitle:\"Yes\",disabledTitle:\"No\",defaultValue:false},skipLoading:{title:\"Loading State\",type:ControlType.Boolean,enabledTitle:\"No\",disabledTitle:\"Yes\",defaultValue:false},openCart:{title:\"Trigger Cart\",description:\"If button is inside the cart, select No to keep the cart open.\",type:ControlType.Boolean,enabledTitle:\"Yes\",disabledTitle:\"No\",defaultValue:true,hidden:props=>props.BuyNowATC},focus:{type:ControlType.Object,title:\"Focus\",controls:{radius:{type:ControlType.Number,title:\"Radius\",defaultValue:0,min:0,max:100,step:1,displayStepper:true},width:{type:ControlType.Number,title:\"Width\",defaultValue:2,min:0,max:20,step:1,displayStepper:true},padding:{type:ControlType.Number,title:\"Padding\",defaultValue:2,min:0,max:20,step:1,displayStepper:true},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#007AFF\"}}},shopifyProductVariantId:{type:ControlType.String,title:\"Variant ID\",description:\"Advanced: Manually set a specific product variant ID (optional).\"}});// Utility to clean Shopify GID to just the numeric ID\nconst cleanShopifyId=gid=>gid?.split(\"/\").pop();\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FC_ProductPurchaseButton\",\"slots\":[],\"annotations\":{\"framerDisableUnlink\":\"\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{useRef,useEffect}from\"react\";import{addPropertyControls,ControlType,useAnimation,motion}from\"framer\";import{defaultEvents,useOnEnter,useOnExit}from\"https://framer.com/m/framer/default-utils.js@^0.45.0\";var Indicators;(function(Indicators){Indicators[\"DotWave\"]=\"Dots\";Indicators[\"Material\"]=\"Material\";Indicators[\"IOS\"]=\"iOS\";})(Indicators||(Indicators={}));const angleInRadians=angleInDegrees=>(angleInDegrees-90)*(Math.PI/180);const polarToCartesian=(centerX,centerY,radius,angleInDegrees)=>{const a=angleInRadians(angleInDegrees);return{x:centerX+radius*Math.cos(a),y:centerY+radius*Math.sin(a)};};const arc=(x,y,radius,startAngle,endAngle)=>{const fullCircle=endAngle-startAngle===360;const start=polarToCartesian(x,y,radius,endAngle-0.01);const end=polarToCartesian(x,y,radius,startAngle);const arcFlag=endAngle-startAngle<=180?\"0\":\"1\";let d=[\"M\",start.x,start.y,\"A\",radius,radius,0,arcFlag,0,end.x,end.y,].join(\" \");if(fullCircle)d+=\"z\";return d;};function Spinner({color}){const length=360;const endPercentage=length/360*100;const strokeWidth=10;const width=100;const height=100;return(/*#__PURE__*/ _jsxs(motion.div,{style:{height:\"85%\",width:\"85%\",position:\"relative\",originX:0.5,originY:0.5},animate:{rotate:360},transition:{loop:Infinity,ease:\"linear\",duration:0.5},children:[/*#__PURE__*/ _jsx(motion.svg,{style:{height:\"100%\",width:\"100%\",top:0,left:0,right:0,bottom:0,position:\"absolute\",WebkitMask:`conic-gradient(rgba(0, 0, 0, 0.0) 0%, rgba(0, 0, 0,1.0) ${endPercentage}%)`},viewBox:\"0 0 100 100\",children:/*#__PURE__*/ _jsx(\"g\",{transform:\"translate(0 0)\",children:/*#__PURE__*/ _jsx(\"path\",{d:arc(width/2,height/2,width/2-strokeWidth/2,0,length),fill:\"none\",stroke:color,strokeWidth:strokeWidth,strokeLinecap:\"round\"})})}),/*#__PURE__*/ _jsx(motion.svg,{style:{height:\"100%\",width:\"100%\",position:\"absolute\"},viewBox:\"0 0 100 100\",children:/*#__PURE__*/ _jsx(\"g\",{transform:\"translate(50 0)\",children:/*#__PURE__*/ _jsx(\"path\",{d:\"M 0 0 C 2.761 0 5 2.239 5 5 C 5 7.761 2.761 10 0 10 C 0 10 0 0 0 0 Z\",fill:color})})})]}));}// <path d=\"M 0 0 C 2.761 0 5 2.239 5 5 C 5 7.761 2.761 10 0 10 C 0 10 0 0 0 0 Z\" fill=\"#CCC\"></path>\n// function Spinner({ color }) {\n//     return (\n//         <svg style={{ height: \"85%\", width: \"85%\" }} viewBox=\"0 0 100 100\">\n//             <motion.g\n//                 transform=\"translate(3 3)\"\n//                 animate={{ rotate: 360 }}\n//                 transition={{ loop: Infinity, ease: \"linear\", duration: 1 }}\n//             >\n//                 {pathStrings.map((data, i) => {\n//                     return <path d={data} fill={color} opacity={i / pathStrings.length} />\n//                 })}\n//             </motion.g>\n//         </svg>\n//     )\n// }\nfunction DotWave({color,animation}){const circles=[0,1,2];const{delay,ease,duration,...animProps}=animation;const transition=animation.type===\"spring\"?animProps:{...animProps,ease,duration};// console.log(animProps)\nreturn(/*#__PURE__*/ _jsx(motion.svg,{style:{height:\"85%\",width:\"85%\"},viewBox:\"0 0 30 30\",variants:{show:{transition:{delayChildren:0.1,staggerChildren:0.12}}},animate:\"show\",children:circles.map(circle=>/*#__PURE__*/ _jsx(motion.circle,{style:{fill:color},variants:{hidden:{y:0},show:{y:[0,0,0,-10,0,0,0]}},transition:{...transition,yoyo:Infinity},r:3,cx:circle*10+5,cy:15},circle))}));}function Material({color,animation}){return(/*#__PURE__*/ _jsx(motion.svg,{style:{height:\"85%\",width:\"85%\",overflow:\"visible\",originX:\"50%\",originY:\"50%\"},animate:{rotate:360},transition:{ease:\"linear\",loop:Infinity,duration:2},viewBox:\"25 25 50 50\",children:/*#__PURE__*/ _jsx(motion.circle,{style:{stroke:color,strokeLinecap:\"round\"},animate:{strokeDasharray:[\"1, 200\",\"89, 200\",\"89, 200\"],strokeDashoffset:[0,-35,-124]},transition:{...animation,loop:Infinity,ease:\"easeInOut\"},cx:\"50\",cy:\"50\",r:\"20\",fill:\"none\",strokeWidth:2,strokeMiterlimit:\"10\"})}));}function IOS({color,animation}){const particles=12;// this was the death of me\nconst arrayRotate=(arr,n)=>arr.slice(n,arr.length).concat(arr.slice(0,n));const lines=[...new Array(particles)].map((l,i)=>0.9/particles*i+0.1).reverse();const lineOpacities=lines.map((l,i)=>arrayRotate(lines,i));return(/*#__PURE__*/ _jsx(motion.svg,{viewBox:\"-15 -15 30 30\",style:{width:\"100%\",height:\"100%\"},children:lineOpacities.map((lineKeyframes,i)=>/*#__PURE__*/ _jsx(motion.g,{initial:{opacity:lineKeyframes[0]},animate:{opacity:lineKeyframes},transition:{...animation,loop:Infinity,repeatDelay:0.0005},children:/*#__PURE__*/ _jsx(\"rect\",{style:{width:7,height:2,fill:color,transform:`rotate(${(particles-i)/particles*360-90}deg)`},x:5,y:-1,rx:1})},i))}));}function getIndicator(indicator,props){switch(indicator){case Indicators.DotWave:return(/*#__PURE__*/ _jsx(DotWave,{...props}));case Indicators.Material:return(/*#__PURE__*/ _jsx(Material,{...props}));case Indicators.IOS:return(/*#__PURE__*/ _jsx(IOS,{...props}));// case Indicators.Spinner:\n//     return <Spinner {...props} />\ndefault:return(/*#__PURE__*/ _jsx(DotWave,{...props}));}}export function handleTimeout(duration,callback){const id=setTimeout(callback,duration*1e3);return()=>clearTimeout(id);}/**\n * Loading\n *\n * @framerIntrinsicWidth 40\n * @framerIntrinsicHeight 40\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */ export function Loading(props){const{duration,onTimeout,fadeOut,hasDuration,indicator,onClick,onMouseDown,onMouseUp,onMouseEnter,onMouseLeave,style}=props;const controls=useAnimation();const animDuration=fadeOut?Math.min(duration,0.35):0;const animDelay=fadeOut?duration-animDuration:duration;const currentIndicator=getIndicator(indicator,props);const handlers=useRef([]);const onFadeOut=React.useCallback(()=>{if(hasDuration)controls.start({opacity:0,transition:{duration:animDuration,ease:\"easeIn\"}});},[hasDuration,animDuration]);const resetOpacity=async()=>{controls.set({opacity:1});};useOnEnter(()=>{resetOpacity();if(hasDuration)handlers.current=[handleTimeout(duration,onTimeout),handleTimeout(animDelay,onFadeOut),];});// Cancel all timers on exit.\nuseOnExit(()=>handlers.current.forEach(cleanup=>cleanup));// Cancel all timers on unmount.\nuseEffect(()=>()=>handlers.current.forEach(cleanup=>cleanup),[]);return(/*#__PURE__*/ _jsx(motion.div,{onClick,onMouseDown,onMouseUp,onMouseEnter,onMouseLeave,animate:controls,style:{position:\"relative\",overflow:\"show\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",...style},children:currentIndicator}));}Loading.defaultProps={height:40,width:40,duration:2,color:\"#888\",animation:{type:\"tween\",ease:\"linear\",duration:1.3},hasDuration:false};// Learn more: https://framer.com/api/property-controls/\naddPropertyControls(Loading,{indicator:{title:\"Indicator\",type:ControlType.Enum,options:Object.keys(Indicators).map(i=>Indicators[i])},color:{type:ControlType.Color,defaultValue:\"#888\"},// transition: { title: \"Animation\", type: ControlType.Transition },\nhasDuration:{title:\"Duration\",type:ControlType.Boolean,defaultValue:Loading.defaultProps.hasDuration,enabledTitle:\"Timeout\",disabledTitle:\"Infinity\"},duration:{title:\"Time\",hidden:({hasDuration})=>!hasDuration,min:0.1,max:10,defaultValue:Loading.defaultProps.duration,type:ControlType.Number,step:0.1},animation:{type:ControlType.Transition},fadeOut:{title:\"Fade Out\",hidden:({hasDuration})=>!hasDuration,type:ControlType.Boolean,enabledTitle:\"Yes\",disabledTitle:\"No\"},onTimeout:{type:ControlType.EventHandler},...defaultEvents});\nexport const __FramerMetadata__ = {\"exports\":{\"handleTimeout\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Loading\":{\"type\":\"reactComponent\",\"name\":\"Loading\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"40\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicHeight\":\"40\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Loading.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{addPropertyControls,ControlType}from\"framer\";import{useEffect,useState,useCallback}from\"react\";import{get}from\"lodash-es\";/**\n * @framerDisableUnlink\n */export default function FC_ProductVariantState(props){const{shopifyProductID,textTemplate}=props;const[product,setProduct]=useState();const[selectedOptions,setSelectedOptions]=useState({});// Move handler outside useEffect for better stability\nconst handleVariantSelection=useCallback(event=>{// Directly set the new selected options\nsetSelectedOptions(prev=>({...prev,[event.detail.optionName]:event.detail.value}));},[]);useEffect(()=>{if(window[\"shopXtools\"]&&Array.isArray(window[\"shopXtools\"].products)){const _matchingProduct=window[\"shopXtools\"].products.find(({node:_product})=>_product.id===`gid://shopify/Product/${shopifyProductID}`);setProduct(_matchingProduct?_matchingProduct.node:\"404\");}else{document.addEventListener(\"data__products-ready\",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:\"404\");}});}document.addEventListener(\"variant_option_selected\",handleVariantSelection);return()=>{document.removeEventListener(\"variant_option_selected\",handleVariantSelection);};},[shopifyProductID,handleVariantSelection]);useEffect(()=>{const handleCurrencyChange=event=>{const{currency}=event.detail;if(window[\"shopXtools\"]&&Array.isArray(window[\"shopXtools\"].products)){const _matchingProduct=window[\"shopXtools\"].products.find(({node:_product})=>_product.id===`gid://shopify/Product/${shopifyProductID}`);if(_matchingProduct){setProduct(_matchingProduct.node);}}};window.addEventListener(\"currency_changed\",handleCurrencyChange);return()=>{window.removeEventListener(\"currency_changed\",handleCurrencyChange);};},[shopifyProductID]);const options=get(product,\"options\",[]);// Get remaining unselected options\nconst remainingOptions=options.filter(opt=>!selectedOptions[opt.name]).map(opt=>opt.name);// In Framer canvas or when shopXtools is not ready, show placeholder\nconst isFramerCanvas=typeof window===\"undefined\"||!window[\"shopXtools\"];const displayText=isFramerCanvas?textTemplate.replace(\"{{variant}}\",\"Size\"):remainingOptions.length===0?\"\":textTemplate.replace(\"{{variant}}\",remainingOptions.join(\", \"));// If no text to display, return empty div\nif(!displayText){return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\"}});}return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},children:/*#__PURE__*/_jsx(\"p\",{style:{...props.font,color:props.color,margin:0,textAlign:\"center\",textTransform:props.textTransform},children:displayText})});}FC_ProductVariantState.defaultProps={shopifyProductID:\"\",textTemplate:\"Select {{variant}}\",textTransform:\"none\",color:\"#000000\"};addPropertyControls(FC_ProductVariantState,{shopifyProductID:{type:ControlType.String,title:\"Product ID\"},textTemplate:{type:ControlType.String,title:\"Format\",description:\"Use {{variant}} to insert the variant name\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\"},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#000000\"},textTransform:{type:ControlType.Enum,title:\"Transform\",options:[\"None\",\"Uppercase\",\"Lowercase\",\"Capitalize\"],defaultValue:\"none\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FC_ProductVariantState\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FC_ProductVariantState.map"],"mappings":"A,0sBA6DG,SAA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