{"version":3,"file":"Loading.Dy6AIwsR.mjs","names":["useEffect","useMemo","useMemo","useMemo","useState","useCallback","useEffect","useMemo","isCurrencySymbolSameAsCode","getLocaleFromCountry","_jsx","_jsxs","useState","useCallback","useEffect","useMemo","useRef","_jsx","React","useState","useRef","useEffect","useCallback","_jsx","_jsxs","cloneElement","useState","useCallback","useEffect","_jsx","_jsx","useRef","React.useCallback","useEffect","__esmMin","z","init_ssg_sandbox_shims","ne","navigator","_e","de","init_jsx_runtime","pe","c","init_npm_react_18_3_1","e","ce","window","RenderTarget","addPropertyControls","init_framer_BWzg2IRg","useIsInCurrentNavigationTarget","ControlType","motion","useAnimation","init_currencyMaps","init_lodash","useIsBrowser","get","init_locales","init_IsBrowser","init_mutations_v2","init_Fb_pixel","appendLanguageToUrl","trackFacebookPixelViewContent","getUTMParameters","init_utmParams","getProductMetafields","createCartMutation","appendAllTrackingParamsToUrl","cartQuery","trackFacebookPixelAddToCart","addToCartMutation","trackFacebookPixelInitiateCheckout","getSCARefParameters","updateCartAttributes","knownCurrenciesWithCodeAsSymbol","getLocaleFromCountry$1","updateCartCurrency","containerStyles","defaultEvents","init_constants","useOnEnter","onEnter","enabled","useOnSpecificTargetChange","useOnExit","onExit","goal","callback","isInTarget","init_useOnNavigationTargetChange","init_useConstant","init_colorFromToken","init_isMotionValue","init_useUniqueClassName","init_variantUtils","isBrowserSafari","useIsBrowserSafari","init_isBrowser","userAgent","init_useOnChange","init_useAutoMotionValue","init_useFontControls","useRenderTarget","useIsOnCanvas","init_useRenderTarget","init_useControlledState","useRadius","props","borderRadius","isMixedBorderRadius","topLeftRadius","topRightRadius","bottomRightRadius","bottomLeftRadius","borderRadiusControl","init_propUtils","init_OIjZRBmWDcIE2B6qgG1j","FC_ProductPrice","shopifyProductID","canvasPrice","showCurrency","showSymbol","showDecimals","currencyCode","fromText","isBrowser","product","setProduct","activeVariant","setActiveVariant","subscriptionPrice","setSubscriptionPrice","persisted","selectedCurrency","setSelectedCurrency","selectedCountryCode","setSelectedCountryCode","selectedCountry","setSelectedCountry","isLoadingPrice","setIsLoadingPrice","partialSelections","setPartialSelections","variantSelectorAction","setVariantSelectorAction","waitingForVariantSelection","setWaitingForVariantSelection","isRangeComputed","setIsRangeComputed","computedPriceRange","setComputedPriceRange","getProductPriceRange","p","useCompareAt","rangePath","minFromProduct","maxFromProduct","minVal","maxVal","edges","min","max","acc","v","amtStr","amt","computeRange","range","storedCurrency","storedCountryCode","storedCountry","handleVariantChange","_matchingProduct","_product","matchingVariant","node","option","detailOption","partial","opt","handleCurrencyChange","event","currency","countryCode","country","activeOption","handleProductsReady","matchingProduct","loadProduct","error","timeout","handleSubscriptionPriceUpdate","handleVariantOptionSelected","eventProductId","expectedProductId","variantCurrency","productCurrency","showMockValues","formatPriceWithOptions","numericPrice","currCode","symbolSameAsCode","isCurrencySymbolSameAsCode$1","locale","decimalDigits","number","result","text","minPrice","maxPrice","priceRange","numericMaxPrice","currentCurrencyCode","formattedPrice","formattedMaxPrice","amount","computedMin","computedMax","variant","hasPartialSelections","hasCompleteVariant","matchingVariants","prices","price","formattedMinPrice","productMinPrice","productMaxPrice","numericMinPrice","compareAtPrice","compareAmount","comparePrices","minComparePrice","numericValue","hasValidCompareAtPrice","value","computedStyles","baseStyles","priceStyles","priceColor","isComputingRange","init_FC_ProductPrice","[\n\t\t\t\t\t\t\t\"USD\",\n\t\t\t\t\t\t\t\"EUR\",\n\t\t\t\t\t\t\t\"GBP\",\n\t\t\t\t\t\t\t\"CHF\",\n\t\t\t\t\t\t\t\"JPY\",\n\t\t\t\t\t\t\t\"CAD\",\n\t\t\t\t\t\t\t\"AUD\",\n\t\t\t\t\t\t\t\"CNY\",\n\t\t\t\t\t\t\t\"HKD\",\n\t\t\t\t\t\t\t\"NZD\",\n\t\t\t\t\t\t\t\"SEK\",\n\t\t\t\t\t\t\t\"KRW\",\n\t\t\t\t\t\t\t\"SGD\",\n\t\t\t\t\t\t\t\"NOK\",\n\t\t\t\t\t\t\t\"MXN\",\n\t\t\t\t\t\t\t\"INR\",\n\t\t\t\t\t\t\t\"RUB\",\n\t\t\t\t\t\t\t\"ZAR\",\n\t\t\t\t\t\t\t\"TRY\",\n\t\t\t\t\t\t\t\"BRL\",\n\t\t\t\t\t\t\t\"TWD\",\n\t\t\t\t\t\t\t\"DKK\",\n\t\t\t\t\t\t\t\"PLN\",\n\t\t\t\t\t\t\t\"THB\",\n\t\t\t\t\t\t\t\"IDR\",\n\t\t\t\t\t\t\t\"HUF\",\n\t\t\t\t\t\t\t\"CZK\",\n\t\t\t\t\t\t\t\"ILS\",\n\t\t\t\t\t\t\t\"CLP\",\n\t\t\t\t\t\t\t\"PHP\",\n\t\t\t\t\t\t\t\"AED\",\n\t\t\t\t\t\t\t\"COP\",\n\t\t\t\t\t\t\t\"SAR\",\n\t\t\t\t\t\t\t\"MYR\",\n\t\t\t\t\t\t\t\"RON\"\n\t\t\t\t\t\t]","FC_ProductPriceCompare","strikethrough","strikethroughColor","strikethroughSize","font","color","compareAtPrefix","normalizeProduct","_currencyCode","compareRangeCache","getProductCompareRange","cacheKey","i","productCompareRange","isCurrencySymbolSameAsCode","getLocaleFromCountry","compMin","compMax","hasVariantEdges","compareAtPrices","comparePrice","numericComparePrices","maxComparePrice","showComparePrice","nodeOpts","activeOpts","\"shopXtools\"","products","init_FC_ProductPriceCompare","sanitizeChildrenRecursively","sanitizedProps","init_cloning","initializeStore","originalPushState","originalReplaceState","init_initialize","FC_ProductPurchaseButton","available","OutOfStock","SelectVariant","LoadingState","maxQuantity","shopifyProductVariantId","BuyNowATC","title","required","openCart","isInStock","setIsInStock","needsVariantSelection","setNeedsVariantSelection","isLoading","setIsLoading","hasInitialized","setHasInitialized","setCountryCode","planSelected","setPlanSelected","cartExistingData","setCartExistingData","errorMessage","setErrorMessage","productQuantity","setProductQuantity","viewContentFired","autoSelectFirst","setAutoSelectFirst","isVariantManuallySelected","setIsVariantManuallySelected","maxQuantityReached","setMaxQuantityReached","orderMax","setOrderMax","handleAutoSelectFlag","calculateTotalInventory","productData","total","isVariantAvailable","savedCartId","data","handleSubscriptionChange","handleQuantityChange","existingCartId","updateData","handleSingleVariantProduct","productNode","variants","handleProductData","currentProductId","incomingProductId","fetchOrderMax","variantId","firstAvailableVariant","edge","hasMultipleVariants","anyVariantAvailable","productsReadyHandler","variantChangeHandler","productOptions","selectedArray","selectedNames","o","isCompleteFromNames","isComplete","getCurrentCartQuantity","orderFieldError","setOrderFieldError","validateOrderField","productSpecificKey","storedAttributes","parsedAttrs","isValid","handleOrderFieldChange","isInputRequired","setIsInputRequired","checkInputRequirement","configKey","config","getLineItem","merchandiseId","lineItem","\"sellingPlanId\"","stored","attributes","key","\"attributes\"","productHandle","metafieldsResponse","liveCart","liveEdges","productVariantIds","handleAddToCart","currentCartQuantity","inputElement","currentInputValue","attrValue","lines","cartData","item_id","cleanShopifyId","item_name","item_variant","payload","variables","checkoutUrl","finalCheckoutUrl","cartId","timer","isDesignOrPreview","content","canAddToCart","handleClick","currentQuantity","shouldBeAtMax","currentInCart","remainingAllowed","handleCartUpdate","orderMaxRemainingAllowed","variantQnt","handleResize","storedId","found","viewItemTrackedRef","pageViewTrackedRef","item_brand","item_category","defaultVariant","focused","canvasContent","hasAnyState","isPreview","sanitizedCanvasContent","sanitizedLoadingState","sanitizedContent","init_FC_ProductPurchaseButton","gid","FC_ProductVariantState","textTemplate","selectedOptions","setSelectedOptions","handleVariantSelection","prev","remainingOptions","displayText","init_FC_ProductVariantState","init_default_utils_js__0_45","DotWave","animation","circles","delay","ease","duration","animProps","transition","circle","Material","IOS","arrayRotate","arr","n","l","lineOpacities","lineKeyframes","getIndicator","indicator","Indicators","handleTimeout","id","Loading","onTimeout","fadeOut","hasDuration","onClick","onMouseDown","onMouseUp","onMouseEnter","onMouseLeave","style","controls","animDuration","animDelay","currentIndicator","handlers","onFadeOut","resetOpacity","cleanup","init_Loading","\"DotWave\"","\"Material\"","\"IOS\""],"sources":["https:/framerusercontent.com/modules/VTUDdizacRHpwbkOamr7/AykinQJbgwl92LvMGZwu/constants.js","https:/framerusercontent.com/modules/D4TWeLfcxT6Tysr2BlYg/iZjmqdxVx1EOiM3k1FaW/useOnNavigationTargetChange.js","https:/framerusercontent.com/modules/ExNgrA7EJTKUPpH6vIlN/eiOrSJ2Ab5M9jPCvVwUz/useConstant.js","https:/framerusercontent.com/modules/D2Lz5CmnNVPZFFiZXalt/QaCzPbriZBfXWZIIycFI/colorFromToken.js","https:/framerusercontent.com/modules/3mKFSGQqKHV82uOV1eBc/5fbRLvOpxZC0JOXugvwm/isMotionValue.js","https:/framerusercontent.com/modules/xDiQsqBGXzmMsv7AlEVy/uhunpMiNsbXxzjlXsg1y/useUniqueClassName.js","https:/framerusercontent.com/modules/ETACN5BJyFTSo0VVDJfu/NHRqowOiXkF9UwOzczF7/variantUtils.js","https:/framerusercontent.com/modules/eMBrwoqQK7h6mEeGQUH8/GuplvPJVjmxpk9zqOTcb/isBrowser.js","https:/framerusercontent.com/modules/v9AWX2URmiYsHf7GbctE/XxKAZ9KlhWqf5x1JMyyF/useOnChange.js","https:/framerusercontent.com/modules/kNDwabfjDEb3vUxkQlZS/fSIr3AOAYbGlfSPgXpYu/useAutoMotionValue.js","https:/framerusercontent.com/modules/cuQH4dmpDnV8YK1mSgQX/KqRXqunFjE6ufhpc7ZRu/useFontControls.js","https:/framerusercontent.com/modules/afBE9Yx1W6bY5q32qPxe/m3q7puE2tbo1S2C0s0CT/useRenderTarget.js","https:/framerusercontent.com/modules/zGkoP8tPDCkoBzMdt5uq/0zFSjxIYliHxrQQnryFX/useControlledState.js","https:/framerusercontent.com/modules/5SM58HxZHxjjv7aLMOgQ/WXz9i6mVki0bBCrKdqB3/propUtils.js","https:/framerusercontent.com/modules/G4IfyjvwmaeSBpdb4TWu/OIjZRBmWDcIE2B6qgG1j/index.js","https:/framerusercontent.com/modules/N07JJZfuMtyHijtiRRgH/E4KLlxWtRCBXncxm1cnX/FC_ProductPrice.js","https:/framerusercontent.com/modules/ZipJAXrtSkBsdbTSry5q/KCNDDioMjkqBn9yvxlVd/FC_ProductPriceCompare.js","https:/framerusercontent.com/modules/Da0ApllLKQHSw8djEYKs/NKlmeTJYy3YIy3O2qsS9/cloning.js","https:/framerusercontent.com/modules/FXrY3V9ZYVL8aziafDQn/HIuMDRrKIIcsJe65kZwo/initialize.js","https:/framerusercontent.com/modules/DfixsupJND2Hhr1xcPbk/zYiTTDRsHtf2S3Zf8E7G/FC_ProductPurchaseButton.js","https:/framerusercontent.com/modules/B12xzzGu5tV27jDrWyaW/dyGmYzzIUDiXU0ubHYzE/FC_ProductVariantState.js","https:/framer.com/m/framer/default-utils.js@^0.45.0","https:/framerusercontent.com/modules/NQ9LlTfXzHTRhTTi6qMI/5u9VoSaQM7qxLI2scUcH/Loading.js"],"sourcesContent":["import { ControlType } from \"framer\";\nexport const fontStack = `\"Inter\", system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"`;\nexport const containerStyles = {\n    position: \"relative\",\n    width: \"100%\",\n    height: \"100%\",\n    display: \"flex\",\n    justifyContent: \"center\",\n    alignItems: \"center\"\n};\nexport const emptyStateStyle = {\n    ...containerStyles,\n    borderRadius: 6,\n    background: \"rgba(136, 85, 255, 0.3)\",\n    color: \"#85F\",\n    border: \"1px dashed #85F\",\n    flexDirection: \"column\"\n};\nexport const defaultEvents = {\n    onClick: {\n        type: ControlType.EventHandler\n    },\n    onMouseEnter: {\n        type: ControlType.EventHandler\n    },\n    onMouseLeave: {\n        type: ControlType.EventHandler\n    }\n};\nexport const fontSizeOptions = {\n    type: ControlType.Number,\n    title: \"Font Size\",\n    min: 2,\n    max: 200,\n    step: 1,\n    displayStepper: true\n};\nexport const fontControls = {\n    font: {\n        type: ControlType.Boolean,\n        title: \"Font\",\n        defaultValue: false,\n        disabledTitle: \"Default\",\n        enabledTitle: \"Custom\"\n    },\n    fontFamily: {\n        type: ControlType.String,\n        title: \"Family\",\n        placeholder: \"Inter\",\n        hidden: ({ font  })=>!font\n    },\n    fontWeight: {\n        type: ControlType.Enum,\n        title: \"Weight\",\n        options: [\n            100,\n            200,\n            300,\n            400,\n            500,\n            600,\n            700,\n            800,\n            900\n        ],\n        optionTitles: [\n            \"Thin\",\n            \"Extra-light\",\n            \"Light\",\n            \"Regular\",\n            \"Medium\",\n            \"Semi-bold\",\n            \"Bold\",\n            \"Extra-bold\",\n            \"Black\", \n        ],\n        hidden: ({ font  })=>!font\n    }\n};\n// @TODO check if we're missing anything here — there doesn't seem to be a reliable browser API for this\nexport const localeOptions = {\n    af: \"Afrikaans\",\n    sq: \"Albanian\",\n    an: \"Aragonese\",\n    ar: \"Arabic (Standard)\",\n    \"ar-dz\": \"Arabic (Algeria)\",\n    \"ar-bh\": \"Arabic (Bahrain)\",\n    \"ar-eg\": \"Arabic (Egypt)\",\n    \"ar-iq\": \"Arabic (Iraq)\",\n    \"ar-jo\": \"Arabic (Jordan)\",\n    \"ar-kw\": \"Arabic (Kuwait)\",\n    \"ar-lb\": \"Arabic (Lebanon)\",\n    \"ar-ly\": \"Arabic (Libya)\",\n    \"ar-ma\": \"Arabic (Morocco)\",\n    \"ar-om\": \"Arabic (Oman)\",\n    \"ar-qa\": \"Arabic (Qatar)\",\n    \"ar-sa\": \"Arabic (Saudi Arabia)\",\n    \"ar-sy\": \"Arabic (Syria)\",\n    \"ar-tn\": \"Arabic (Tunisia)\",\n    \"ar-ae\": \"Arabic (U.A.E.)\",\n    \"ar-ye\": \"Arabic (Yemen)\",\n    hy: \"Armenian\",\n    as: \"Assamese\",\n    ast: \"Asturian\",\n    az: \"Azerbaijani\",\n    eu: \"Basque\",\n    bg: \"Bulgarian\",\n    be: \"Belarusian\",\n    bn: \"Bengali\",\n    bs: \"Bosnian\",\n    br: \"Breton\",\n    my: \"Burmese\",\n    ca: \"Catalan\",\n    ch: \"Chamorro\",\n    ce: \"Chechen\",\n    zh: \"Chinese\",\n    \"zh-hk\": \"Chinese (Hong Kong)\",\n    \"zh-cn\": \"Chinese (PRC)\",\n    \"zh-sg\": \"Chinese (Singapore)\",\n    \"zh-tw\": \"Chinese (Taiwan)\",\n    cv: \"Chuvash\",\n    co: \"Corsican\",\n    cr: \"Cree\",\n    hr: \"Croatian\",\n    cs: \"Czech\",\n    da: \"Danish\",\n    nl: \"Dutch (Standard)\",\n    \"nl-be\": \"Dutch (Belgian)\",\n    en: \"English\",\n    \"en-au\": \"English (Australia)\",\n    \"en-bz\": \"English (Belize)\",\n    \"en-ca\": \"English (Canada)\",\n    \"en-ie\": \"English (Ireland)\",\n    \"en-jm\": \"English (Jamaica)\",\n    \"en-nz\": \"English (New Zealand)\",\n    \"en-ph\": \"English (Philippines)\",\n    \"en-za\": \"English (South Africa)\",\n    \"en-tt\": \"English (Trinidad & Tobago)\",\n    \"en-gb\": \"English (United Kingdom)\",\n    \"en-us\": \"English (United States)\",\n    \"en-zw\": \"English (Zimbabwe)\",\n    eo: \"Esperanto\",\n    et: \"Estonian\",\n    fo: \"Faeroese\",\n    fa: \"Farsi\",\n    fj: \"Fijian\",\n    fi: \"Finnish\",\n    fr: \"French (Standard)\",\n    \"fr-be\": \"French (Belgium)\",\n    \"fr-ca\": \"French (Canada)\",\n    \"fr-fr\": \"French (France)\",\n    \"fr-lu\": \"French (Luxembourg)\",\n    \"fr-mc\": \"French (Monaco)\",\n    \"fr-ch\": \"French (Switzerland)\",\n    fy: \"Frisian\",\n    fur: \"Friulian\",\n    gd: \"Gaelic (Scots)\",\n    \"gd-ie\": \"Gaelic (Irish)\",\n    gl: \"Galacian\",\n    ka: \"Georgian\",\n    de: \"German (Standard)\",\n    \"de-at\": \"German (Austria)\",\n    \"de-de\": \"German (Germany)\",\n    \"de-li\": \"German (Liechtenstein)\",\n    \"de-lu\": \"German (Luxembourg)\",\n    \"de-ch\": \"German (Switzerland)\",\n    el: \"Greek\",\n    gu: \"Gujurati\",\n    ht: \"Haitian\",\n    he: \"Hebrew\",\n    hi: \"Hindi\",\n    hu: \"Hungarian\",\n    is: \"Icelandic\",\n    id: \"Indonesian\",\n    iu: \"Inuktitut\",\n    ga: \"Irish\",\n    it: \"Italian (Standard)\",\n    \"it-ch\": \"Italian (Switzerland)\",\n    ja: \"Japanese\",\n    kn: \"Kannada\",\n    ks: \"Kashmiri\",\n    kk: \"Kazakh\",\n    km: \"Khmer\",\n    ky: \"Kirghiz\",\n    tlh: \"Klingon\",\n    ko: \"Korean\",\n    \"ko-kp\": \"Korean (North Korea)\",\n    \"ko-kr\": \"Korean (South Korea)\",\n    la: \"Latin\",\n    lv: \"Latvian\",\n    lt: \"Lithuanian\",\n    lb: \"Luxembourgish\",\n    mk: \"FYRO Macedonian\",\n    ms: \"Malay\",\n    ml: \"Malayalam\",\n    mt: \"Maltese\",\n    mi: \"Maori\",\n    mr: \"Marathi\",\n    mo: \"Moldavian\",\n    nv: \"Navajo\",\n    ng: \"Ndonga\",\n    ne: \"Nepali\",\n    no: \"Norwegian\",\n    nb: \"Norwegian (Bokmal)\",\n    nn: \"Norwegian (Nynorsk)\",\n    oc: \"Occitan\",\n    or: \"Oriya\",\n    om: \"Oromo\",\n    \"fa-ir\": \"Persian/Iran\",\n    pl: \"Polish\",\n    pt: \"Portuguese\",\n    \"pt-br\": \"Portuguese (Brazil)\",\n    pa: \"Punjabi\",\n    \"pa-in\": \"Punjabi (India)\",\n    \"pa-pk\": \"Punjabi (Pakistan)\",\n    qu: \"Quechua\",\n    rm: \"Rhaeto-Romanic\",\n    ro: \"Romanian\",\n    \"ro-mo\": \"Romanian (Moldavia)\",\n    ru: \"Russian\",\n    \"ru-mo\": \"Russian (Moldavia)\",\n    sz: \"Sami (Lappish)\",\n    sg: \"Sango\",\n    sa: \"Sanskrit\",\n    sc: \"Sardinian\",\n    sd: \"Sindhi\",\n    si: \"Singhalese\",\n    sr: \"Serbian\",\n    sk: \"Slovak\",\n    sl: \"Slovenian\",\n    so: \"Somani\",\n    sb: \"Sorbian\",\n    es: \"Spanish\",\n    \"es-ar\": \"Spanish (Argentina)\",\n    \"es-bo\": \"Spanish (Bolivia)\",\n    \"es-cl\": \"Spanish (Chile)\",\n    \"es-co\": \"Spanish (Colombia)\",\n    \"es-cr\": \"Spanish (Costa Rica)\",\n    \"es-do\": \"Spanish (Dominican Republic)\",\n    \"es-ec\": \"Spanish (Ecuador)\",\n    \"es-sv\": \"Spanish (El Salvador)\",\n    \"es-gt\": \"Spanish (Guatemala)\",\n    \"es-hn\": \"Spanish (Honduras)\",\n    \"es-mx\": \"Spanish (Mexico)\",\n    \"es-ni\": \"Spanish (Nicaragua)\",\n    \"es-pa\": \"Spanish (Panama)\",\n    \"es-py\": \"Spanish (Paraguay)\",\n    \"es-pe\": \"Spanish (Peru)\",\n    \"es-pr\": \"Spanish (Puerto Rico)\",\n    \"es-es\": \"Spanish (Spain)\",\n    \"es-uy\": \"Spanish (Uruguay)\",\n    \"es-ve\": \"Spanish (Venezuela)\",\n    sx: \"Sutu\",\n    sw: \"Swahili\",\n    sv: \"Swedish\",\n    \"sv-fi\": \"Swedish (Finland)\",\n    \"sv-sv\": \"Swedish (Sweden)\",\n    ta: \"Tamil\",\n    tt: \"Tatar\",\n    te: \"Teluga\",\n    th: \"Thai\",\n    tig: \"Tigre\",\n    ts: \"Tsonga\",\n    tn: \"Tswana\",\n    tr: \"Turkish\",\n    tk: \"Turkmen\",\n    uk: \"Ukrainian\",\n    hsb: \"Upper Sorbian\",\n    ur: \"Urdu\",\n    ve: \"Venda\",\n    vi: \"Vietnamese\",\n    vo: \"Volapuk\",\n    wa: \"Walloon\",\n    cy: \"Welsh\",\n    xh: \"Xhosa\",\n    ji: \"Yiddish\",\n    zu: \"Zulu\"\n};\n\nexport const __FramerMetadata__ = {\"exports\":{\"fontSizeOptions\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fontControls\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"localeOptions\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fontStack\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"emptyStateStyle\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"containerStyles\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"defaultEvents\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./constants.map","import { useIsInCurrentNavigationTarget } from \"framer\";\nimport { useEffect } from \"react\";\nexport function useOnEnter(onEnter, enabled) {\n    return useOnSpecificTargetChange(true, onEnter, enabled);\n}\nexport function useOnExit(onExit, enabled) {\n    return useOnSpecificTargetChange(false, onExit, enabled);\n}\nfunction useOnSpecificTargetChange(goal, callback, enabled = true) {\n    const isInTarget = useIsInCurrentNavigationTarget();\n    useEffect(()=>{\n        if (enabled && isInTarget === goal) callback();\n    }, [\n        isInTarget\n    ]);\n}\n\nexport const __FramerMetadata__ = {\"exports\":{\"useOnEnter\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useOnExit\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./useOnNavigationTargetChange.map","import { useRef } from \"react\";\n/**\n * Creates a constant value over the lifecycle of a component.\n *\n * Even if `useMemo` is provided an empty array as its final argument, it doesn't offer\n * a guarantee that it won't re-run for performance reasons later on. By using `useConstant`\n * you can ensure that initialisers don't execute twice or more.\n */ export function useConstant(init) {\n    const ref = useRef(null);\n    if (ref.current === null) {\n        ref.current = init();\n    }\n    return ref.current;\n}\n\nexport const __FramerMetadata__ = {\"exports\":{\"useConstant\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./useConstant.map","import { Color } from \"framer\";\nexport function colorFromToken(color) {\n    if (color.startsWith(\"var(--token-\")) return \"rgb\" + color.split(\") /*\")[0].split(\", rgb\")[1];\n    return color;\n}\nexport function colorTokentoValue(color) {\n    return Color(colorFromToken(color)).toValue();\n}\n\nexport const __FramerMetadata__ = {\"exports\":{\"colorFromToken\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"colorTokentoValue\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./colorFromToken.map","import { MotionValue } from \"framer\";\nexport const isMotionValue = (v)=>v instanceof MotionValue\n;\n\nexport const __FramerMetadata__ = {\"exports\":{\"isMotionValue\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./isMotionValue.map","import * as React from \"react\";\nconst letters = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\";\nconst l = ()=>letters[Math.floor(Math.random() * letters.length)]\n;\nexport const randomID = ()=>l() + l() + l() + l() + l() + l() + l() + l() + l()\n;\nfunction createUniqueClass(suffix) {\n    return `framer-${suffix}-${randomID()}`;\n}\nexport function useUniqueClassName(suffix, deps) {\n    const [className, setClassName] = React.useState(createUniqueClass(suffix));\n    React.useEffect(()=>{\n        setClassName(createUniqueClass(suffix));\n    }, [\n        suffix,\n        ...deps\n    ]);\n    return className;\n}\n\nexport const __FramerMetadata__ = {\"exports\":{\"useUniqueClassName\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"randomID\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./useUniqueClassName.map","import { ControlType } from \"framer\";\n// I realize this only applies to select right now\n// but we can work on it in here\nexport function getVariantControls(Component, variant, additionalControls = {\n}) {\n    return {\n        [`${variant}TextColor`]: {\n            type: ControlType.Color,\n            title: \"Text Color\",\n            defaultValue: Component.defaultProps[`${variant}TextColor`],\n            hidden: (props)=>props.variant !== variant\n        },\n        [`${variant}IconColor`]: {\n            type: ControlType.Color,\n            title: \"Icon Color\",\n            defaultValue: Component.defaultProps[`${variant}IconColor`],\n            hidden: (props)=>props.variant !== variant\n        },\n        [`${variant}BackgroundColor`]: {\n            type: ControlType.Color,\n            title: \"Bg Color\",\n            defaultValue: Component.defaultProps[`${variant}BackgroundColor`],\n            hidden: (props)=>props.variant !== variant\n        },\n        [`${variant}BorderColor`]: {\n            type: ControlType.Color,\n            title: \"Border Color\",\n            defaultValue: Component.defaultProps[`${variant}BorderColor`],\n            hidden: (props)=>props.variant !== variant\n        },\n        [`${variant}BorderWidth`]: {\n            type: ControlType.Number,\n            title: \" \",\n            min: 0,\n            max: 5,\n            displayStepper: true,\n            defaultValue: Component.defaultProps[`${variant}BorderWidth`],\n            hidden: (props)=>props.variant !== variant\n        },\n        ...additionalControls\n    };\n}\n\nexport const __FramerMetadata__ = {\"exports\":{\"getVariantControls\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./variantUtils.map","import { useMemo } from \"react\";\nexport const isBrowserSafari = ()=>{\n    if (typeof navigator !== `undefined`) {\n        const userAgent = navigator.userAgent.toLowerCase();\n        const isSafari = (userAgent.indexOf(\"safari\") > -1 || userAgent.indexOf(\"framermobile\") > -1 || userAgent.indexOf(\"framerx\") > -1) && userAgent.indexOf(\"chrome\") < 0;\n        return isSafari;\n    } else return false;\n};\nexport const useIsBrowserSafari = ()=>useMemo(()=>isBrowserSafari()\n    , [])\n;\n\nexport const __FramerMetadata__ = {\"exports\":{\"useIsBrowserSafari\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"isBrowserSafari\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./isBrowser.map","import { useEffect } from \"react\";\n//@ts-ignore\nimport { isMotionValue } from \"https://framerusercontent.com/modules/3mKFSGQqKHV82uOV1eBc/5fbRLvOpxZC0JOXugvwm/isMotionValue.js\";\nexport function useOnChange(value, callback) {\n    useEffect(()=>// @ts-ignore this should be detected as a MV :shrug:\n        isMotionValue(value) ? value.onChange(callback) : undefined\n    );\n}\nexport function useMultiOnChange(values, handler) {\n    useEffect(()=>{\n        const subscriptions = values.map((value)=>value.onChange(handler)\n        );\n        return ()=>subscriptions.forEach((unsubscribe)=>unsubscribe()\n            )\n        ;\n    });\n}\n\nexport const __FramerMetadata__ = {\"exports\":{\"Subscriber\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useOnChange\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useMultiOnChange\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./useOnChange.map","import { useCallback, useEffect, useRef } from \"react\";\nimport { motionValue, animate, RenderTarget } from \"framer\";\n// @ts-ignore\nimport { isMotionValue } from \"https://framerusercontent.com/modules/3mKFSGQqKHV82uOV1eBc/5fbRLvOpxZC0JOXugvwm/isMotionValue.js\";\n// @ts-ignore\nimport { useConstant } from \"https://framerusercontent.com/modules/ExNgrA7EJTKUPpH6vIlN/eiOrSJ2Ab5M9jPCvVwUz/useConstant.js\";\nexport function useAutoMotionValue(inputValue, options) {\n    var ref;\n    // Put options on a local ref\n    // Might wanna just memo instead but it works for now\n    const optionsRef = useRef(options);\n    const animation = useRef();\n    const didInitialMount = useRef(false);\n    const isOnCanvas = RenderTarget.current() === RenderTarget.canvas;\n    // in-progress - trying to figure out effect hooks\n    const onChangeDeps = (options === null || options === void 0 ? void 0 : options.onChangeDeps) ? options.onChangeDeps : [];\n    // Memoize the onChange handler\n    const onChange = useCallback(options === null || options === void 0 ? void 0 : options.onChange, [\n        ...onChangeDeps, \n    ]);\n    // Optionally scale the value from props\n    const transformer = useCallback((value)=>((ref = optionsRef.current) === null || ref === void 0 ? void 0 : ref.transform) ? optionsRef.current.transform(value) : value\n    , []);\n    // Create new MotionValue from inputValue\n    const value = useConstant(()=>isMotionValue(inputValue) ? inputValue : motionValue(transformer(inputValue))\n    );\n    // Setting value from prop change\n    useEffect(()=>{\n        if (!isMotionValue(inputValue) && didInitialMount.current) {\n            var ref1, ref2;\n            const newValue = transformer(inputValue);\n            (ref1 = animation.current) === null || ref1 === void 0 ? void 0 : ref1.stop();\n            // Call change callback\n            if (onChange) onChange(newValue, value);\n            // Trigger animation to new value\n            if (((ref2 = optionsRef.current) === null || ref2 === void 0 ? void 0 : ref2.animate) && !isOnCanvas) {\n                var ref3;\n                // @ts-ignore\n                animation.current = animate(value, newValue, (ref3 = optionsRef.current) === null || ref3 === void 0 ? void 0 : ref3.transition);\n            } else {\n                value.set(newValue);\n            }\n        }\n        didInitialMount.current = true;\n    }, [\n        inputValue,\n        ...onChangeDeps\n    ]);\n    return value;\n}\n\nexport const __FramerMetadata__ = {\"exports\":{\"useAutoMotionValue\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}","// @ts-ignore\nimport{fontStore}from\"framer\";import{useEffect}from\"react\";import{fontStack}from\"https://framerusercontent.com/modules/VTUDdizacRHpwbkOamr7/AykinQJbgwl92LvMGZwu/constants.js\";const fontWeights={100:\"Thin\",200:\"Extra-light\",300:\"Light\",400:\"Regular\",500:\"Medium\",600:\"Semi-bold\",700:\"Bold\",800:\"Extra-bold\",900:\"Black\"};export function useFontControls(props){const{fontFamily=\"Inter\",fontSize=16,fontWeight=400,font=false}=props;const fontWeightName=fontWeights[fontWeight];const customFontStack=`\"${fontFamily} ${fontWeightName}\", \"${fontFamily}\", ${fontStack}`;const fontFamilyStyle=fontFamily?{fontSize,fontWeight,fontFamily:customFontStack}:{fontSize,fontWeight};const fetchCustomFonts=async()=>{await fontStore.loadWebFontsFromSelectors([`CUSTOM;${fontFamily}`,`CUSTOM;${fontFamily} ${fontWeightName}`,`GF;${fontFamily}-${fontWeightName.toLowerCase()}`,]).catch(e=>console.error(e));};useEffect(()=>{if(font)fetchCustomFonts();},[font,fontFamily,fontWeight]);return fontFamilyStyle;}\nexport const __FramerMetadata__ = {\"exports\":{\"useFontControls\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./useFontControls.map","import { useMemo } from \"react\";\nimport { RenderTarget } from \"framer\";\nexport function useRenderTarget() {\n    const currentRenderTarget = useMemo(()=>RenderTarget.current()\n    , []);\n    return currentRenderTarget;\n}\nexport function useIsInPreview() {\n    const inPreview = useMemo(()=>RenderTarget.current() === RenderTarget.preview\n    , []);\n    return inPreview;\n}\nexport function useIsOnCanvas() {\n    const onCanvas = useMemo(()=>RenderTarget.current() === RenderTarget.canvas\n    , []);\n    return onCanvas;\n}\n\nexport const __FramerMetadata__ = {\"exports\":{\"useIsInPreview\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useRenderTarget\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useIsOnCanvas\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./useRenderTarget.map","import * as React from \"react\";\nexport function useControlledState(value) {\n    const [controlledValue, setValue] = React.useState(value);\n    React.useEffect(()=>{\n        setValue(value);\n    }, [\n        value\n    ]);\n    return [\n        controlledValue,\n        setValue\n    ];\n}\n\nexport const __FramerMetadata__ = {\"exports\":{\"useControlledState\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./useControlledState.map","import { useMemo } from \"react\";\nimport { ControlType } from \"framer\";\nexport function useRadius(props) {\n    const { borderRadius , isMixedBorderRadius , topLeftRadius , topRightRadius , bottomRightRadius , bottomLeftRadius ,  } = props;\n    const radiusValue = useMemo(()=>isMixedBorderRadius ? `${topLeftRadius}px ${topRightRadius}px ${bottomRightRadius}px ${bottomLeftRadius}px` : `${borderRadius}px`\n    , [\n        borderRadius,\n        isMixedBorderRadius,\n        topLeftRadius,\n        topRightRadius,\n        bottomRightRadius,\n        bottomLeftRadius, \n    ]);\n    return radiusValue;\n}\nexport const borderRadiusControl = {\n    borderRadius: {\n        title: \"Radius\",\n        type: ControlType.FusedNumber,\n        toggleKey: \"isMixedBorderRadius\",\n        toggleTitles: [\n            \"Radius\",\n            \"Radius per corner\"\n        ],\n        valueKeys: [\n            \"topLeftRadius\",\n            \"topRightRadius\",\n            \"bottomRightRadius\",\n            \"bottomLeftRadius\", \n        ],\n        valueLabels: [\n            \"TL\",\n            \"TR\",\n            \"BR\",\n            \"BL\"\n        ],\n        min: 0\n    }\n};\nexport function usePadding(props) {\n    const { padding , paddingPerSide , paddingTop , paddingRight , paddingBottom , paddingLeft ,  } = props;\n    const paddingValue = useMemo(()=>paddingPerSide ? `${paddingTop}px ${paddingRight}px ${paddingBottom}px ${paddingLeft}px` : padding\n    , [\n        padding,\n        paddingPerSide,\n        paddingTop,\n        paddingRight,\n        paddingBottom,\n        paddingLeft, \n    ]);\n    return paddingValue;\n}\nexport const paddingControl = {\n    padding: {\n        type: ControlType.FusedNumber,\n        toggleKey: \"paddingPerSide\",\n        toggleTitles: [\n            \"Padding\",\n            \"Padding per side\"\n        ],\n        valueKeys: [\n            \"paddingTop\",\n            \"paddingRight\",\n            \"paddingBottom\",\n            \"paddingLeft\", \n        ],\n        valueLabels: [\n            \"T\",\n            \"R\",\n            \"B\",\n            \"L\"\n        ],\n        min: 0,\n        title: \"Padding\"\n    }\n};\n\nexport const __FramerMetadata__ = {\"exports\":{\"borderRadiusControl\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useRadius\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"RadiusProps\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"PaddingProps\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"usePadding\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"paddingControl\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./propUtils.map","import{defaultEvents,localeOptions,fontControls,fontSizeOptions,emptyStateStyle,containerStyles,fontStack}from\"https://framerusercontent.com/modules/VTUDdizacRHpwbkOamr7/AykinQJbgwl92LvMGZwu/constants.js\";import{useOnEnter,useOnExit}from\"https://framerusercontent.com/modules/D4TWeLfcxT6Tysr2BlYg/iZjmqdxVx1EOiM3k1FaW/useOnNavigationTargetChange.js\";import{useConstant}from\"https://framerusercontent.com/modules/ExNgrA7EJTKUPpH6vIlN/eiOrSJ2Ab5M9jPCvVwUz/useConstant.js\";import{colorTokentoValue,colorFromToken}from\"https://framerusercontent.com/modules/D2Lz5CmnNVPZFFiZXalt/QaCzPbriZBfXWZIIycFI/colorFromToken.js\";import{isMotionValue}from\"https://framerusercontent.com/modules/3mKFSGQqKHV82uOV1eBc/5fbRLvOpxZC0JOXugvwm/isMotionValue.js\";import{useUniqueClassName,randomID}from\"https://framerusercontent.com/modules/xDiQsqBGXzmMsv7AlEVy/uhunpMiNsbXxzjlXsg1y/useUniqueClassName.js\";import{getVariantControls}from\"https://framerusercontent.com/modules/ETACN5BJyFTSo0VVDJfu/NHRqowOiXkF9UwOzczF7/variantUtils.js\";import{useIsBrowserSafari}from\"https://framerusercontent.com/modules/eMBrwoqQK7h6mEeGQUH8/GuplvPJVjmxpk9zqOTcb/isBrowser.js\";import{useMultiOnChange,useOnChange}from\"https://framerusercontent.com/modules/v9AWX2URmiYsHf7GbctE/XxKAZ9KlhWqf5x1JMyyF/useOnChange.js\";import{mstoMinAndSec,secondsToMinutes}from\"https://framerusercontent.com/modules/4zHZnO5JojN1PrIbu2jm/revv9QCWpkh8lPzi2jje/time.js\";import{useAutoMotionValue}from\"https://framerusercontent.com/modules/kNDwabfjDEb3vUxkQlZS/fSIr3AOAYbGlfSPgXpYu/useAutoMotionValue.js\";import{useFontControls}from\"https://framerusercontent.com/modules/cuQH4dmpDnV8YK1mSgQX/KqRXqunFjE6ufhpc7ZRu/useFontControls.js\";import{useRenderTarget,useIsInPreview,useIsOnCanvas}from\"https://framerusercontent.com/modules/afBE9Yx1W6bY5q32qPxe/m3q7puE2tbo1S2C0s0CT/useRenderTarget.js\";import{useControlledState}from\"https://framerusercontent.com/modules/zGkoP8tPDCkoBzMdt5uq/0zFSjxIYliHxrQQnryFX/useControlledState.js\";import{usePadding,useRadius,paddingControl,borderRadiusControl}from\"https://framerusercontent.com/modules/5SM58HxZHxjjv7aLMOgQ/WXz9i6mVki0bBCrKdqB3/propUtils.js\";import{detectAutoSizingAxis}from\"https://framerusercontent.com/modules/8CkHAZatUz1UR8jNTcfD/HwbnIAZlUmQ2oTpcLkaH/detectAutoSizingAxis.js\";export{useOnEnter,useOnExit,defaultEvents,isMotionValue,colorFromToken,colorTokentoValue,localeOptions,fontControls,fontSizeOptions,emptyStateStyle,containerStyles,fontStack,useUniqueClassName,getVariantControls,useIsBrowserSafari,randomID,useConstant,useMultiOnChange,useOnChange,usePadding,useRadius,paddingControl,borderRadiusControl,mstoMinAndSec,useFontControls,secondsToMinutes,useAutoMotionValue,useRenderTarget,useIsInPreview,useControlledState,detectAutoSizingAxis,useIsOnCanvas,};\nexport const __FramerMetadata__ = {\"exports\":{\"useConstant\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"isMotionValue\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fontControls\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"defaultEvents\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useUniqueClassName\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useMultiOnChange\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useOnChange\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useIsOnCanvas\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useOnExit\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fontSizeOptions\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"colorTokentoValue\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useRadius\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getVariantControls\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"colorFromToken\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"containerStyles\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"usePadding\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fontStack\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useControlledState\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useFontControls\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useAutoMotionValue\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"emptyStateStyle\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useIsInPreview\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useIsBrowserSafari\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"detectAutoSizingAxis\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"borderRadiusControl\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"mstoMinAndSec\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"randomID\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"localeOptions\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useOnEnter\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"secondsToMinutes\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useRenderTarget\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"paddingControl\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}","/*\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{useCallback,useEffect,useMemo,useState}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{get}from\"lodash-es\";import{useIsBrowser}from\"https://framerusercontent.com/modules/ncBs5KPMI9I5GEta13fn/zGXDjuZapa1SGy6D8P5e/IsBrowser.js\";import{knownCurrenciesWithCodeAsSymbol}from\"https://framerusercontent.com/modules/k9s4cejdkBGDjmzudhzM/18cq93eooqM4YmdbL7E2/currencyMaps.js\";import{getLocaleFromCountry}from\"https://framerusercontent.com/modules/vC6fzbfO83MgBPIhn5zl/DUlbmWuOELzEUenVmv3G/locales.js\";// Helper function to check if a currency's symbol is the same as its code\nconst isCurrencySymbolSameAsCode=currencyCode=>{// For some currencies like CHF, the browser might use the code as the symbol\nif(!currencyCode)return false;if(knownCurrenciesWithCodeAsSymbol.includes(currencyCode)){return true;}try{const formatted=new Intl.NumberFormat(undefined,{style:\"currency\",currency:currencyCode,currencyDisplay:\"narrowSymbol\"}).format(0);// Remove digits, decimal points, and common formatting characters\nconst cleanFormatted=formatted.replace(/[0-9.,\\s]/g,\"\");// Check if what remains is the currency code\nreturn cleanFormatted===currencyCode;}catch(e){return false;}};/**\n * @framerDisableUnlink\n */export default function FC_ProductPrice(props){const{shopifyProductID,canvasPrice,format:{showCurrency,showSymbol,showDecimals,currencyCode}={},fromText=\"from\"}=props;const isBrowser=useIsBrowser();const[product,setProduct]=useState();const[activeVariant,setActiveVariant]=useState();const[subscriptionPrice,setSubscriptionPrice]=useState(()=>{if(typeof window!==\"undefined\"){const persisted=window.__fc_activeSubscription?.[shopifyProductID];if(persisted?.price)return persisted.price;}return null;});const[selectedCurrency,setSelectedCurrency]=useState(\"\");const[selectedCountryCode,setSelectedCountryCode]=useState(\"\");const[selectedCountry,setSelectedCountry]=useState(\"\");const[isLoadingPrice,setIsLoadingPrice]=useState(false);const[partialSelections,setPartialSelections]=useState({});const[variantSelectorAction,setVariantSelectorAction]=useState(\"\");const[waitingForVariantSelection,setWaitingForVariantSelection]=useState(false);// PERFORMANCE OPTIMIZATION: Progressive loading state\n// - Show prices immediately for fast perceived performance\n// - Compute ranges in background using requestIdleCallback\n// - Cache computed ranges to avoid recalculation\nconst[isRangeComputed,setIsRangeComputed]=useState(false);const[computedPriceRange,setComputedPriceRange]=useState({min:null,max:null});// Compute product price range from variants when product.priceRange is missing/partial\nconst getProductPriceRange=useCallback((p,useCompareAt=false)=>{if(!p)return{min:null,max:null};// Prefer product-level range when available\nconst rangePath=useCompareAt?\"compareAtPriceRange\":\"priceRange\";const minFromProduct=get(p,`${rangePath}.minVariantPrice.amount`);const maxFromProduct=get(p,`${rangePath}.maxVariantPrice.amount`);let minVal=minFromProduct?parseFloat(minFromProduct):null;let maxVal=maxFromProduct?parseFloat(maxFromProduct):null;if(minVal===null||isNaN(minVal)||maxVal===null||isNaN(maxVal)){// OPTIMIZED: Use reduce for better performance on large variant lists\nconst edges=p?.variants?.edges||[];if(edges.length>0){const{min,max}=edges.reduce((acc,{node:v})=>{if(!v)return acc;const fieldPath=useCompareAt?\"compareAtPrice.amount\":\"price.amount\";const amtStr=get(v,fieldPath);const amt=amtStr?parseFloat(amtStr):NaN;if(!isNaN(amt)&&amt>0){if(acc.min===null||amt<acc.min)acc.min=amt;if(acc.max===null||amt>acc.max)acc.max=amt;}return acc;},{min:null,max:null});minVal=min;maxVal=max;}}return{min:typeof minVal===\"number\"&&!isNaN(minVal)?minVal:null,max:typeof maxVal===\"number\"&&!isNaN(maxVal)?maxVal:null};},[selectedCurrency]);// Progressive range computation - compute in background after initial render\nuseEffect(()=>{if(!product||isRangeComputed)return;// Use requestIdleCallback for non-blocking computation\nconst computeRange=()=>{const range=getProductPriceRange(product,false);setComputedPriceRange(range);setIsRangeComputed(true);};// Delay computation to prioritize initial render\nif(\"requestIdleCallback\"in window){requestIdleCallback(computeRange,{timeout:200});}else{// Fallback for browsers without requestIdleCallback\nsetTimeout(computeRange,100);}},[product,isRangeComputed,getProductPriceRange]);// Reset range computation when product changes\nuseEffect(()=>{if(product){setIsRangeComputed(false);setComputedPriceRange({min:null,max:null});}},[product]);// Initialize currency and country code on page load\nuseEffect(()=>{if(!isBrowser)return;const storedCurrency=localStorage.getItem(\"selectedCurrency\");const storedCountryCode=localStorage.getItem(\"selectedCountryCode\");const storedCountry=localStorage.getItem(\"selectedCountry\");setSelectedCurrency(storedCurrency||\"USD\");setSelectedCountryCode(storedCountryCode||\"US\");setSelectedCountry(storedCountry||\"United States\");},[isBrowser]);// Handle variant changes\nconst handleVariantChange=useCallback(async e=>{// Check for purchase action flag - if this is a purchase action, don't update variant state\nif(e.detail?.isPurchaseAction){//console.log(\"Purchase action detected, returning\", e.detail?.isPurchaseAction)\nreturn;}if(!e.detail||e.detail.productId!==`gid://shopify/Product/${shopifyProductID}`){return;}// console.log(\"variantSelectorAction\", e.detail.onClickAction)\nsetVariantSelectorAction(e.detail.onClickAction);// Clear waiting state when variant changes are received\nsetWaitingForVariantSelection(false);//console.log(\"Price component: Variant change event received, clearing wait state\")\n//console.log(\"handleVariantChange\", e.detail)\nsetIsLoadingPrice(true);try{// Get products from shopXtools storage\nconst products=window.shopXtools?.products||[];const _matchingProduct=products.find(({node:_product})=>_product.id===`gid://shopify/Product/${shopifyProductID}`);if(_matchingProduct){setProduct(_matchingProduct.node);// Find the matching variant in the current product data\nconst matchingVariant=_matchingProduct.node?.variants?.edges?.find(({node})=>node.selectedOptions.every(option=>e.detail.selectedOptions.find(detailOption=>detailOption.name===option.name&&detailOption.value===option.value)));if(matchingVariant){if(e.detail.onClickAction===\"purchase\"){setActiveVariant(null);setPartialSelections({[e.detail.selectedOptions[0].name]:e.detail.selectedOptions[0].value});}else if(e.detail?.isCompleteVariant===false){// Partial selection: keep partial range behavior\nsetActiveVariant(null);if(Array.isArray(e.detail.selectedOptions)){const partial={};e.detail.selectedOptions.forEach(opt=>{if(opt?.name)partial[opt.name]=opt.value;});setPartialSelections(partial);}}else{setActiveVariant(matchingVariant.node);setPartialSelections({});}}}}catch(error){// Fallback\nif(e.detail?.isCompleteVariant){setActiveVariant(e.detail);if(e.detail.onClickAction!==\"purchase\"){setPartialSelections({});}}else{setActiveVariant(null);if(Array.isArray(e.detail?.selectedOptions)){const partial={};e.detail.selectedOptions.forEach(opt=>{if(opt?.name)partial[opt.name]=opt.value;});setPartialSelections(partial);}}}finally{setIsLoadingPrice(false);}},[shopifyProductID]);// Handle currency changes\nconst handleCurrencyChange=useCallback(event=>{setIsLoadingPrice(true);const{currency,countryCode,country}=event.detail;setSelectedCurrency(currency);setSelectedCountryCode(countryCode);setSelectedCountry(country);try{// Get products from shopXtools storage\nconst products=window.shopXtools?.products||[];const _matchingProduct=products.find(({node:_product})=>_product.id===`gid://shopify/Product/${shopifyProductID}`);if(_matchingProduct){setProduct(_matchingProduct.node);// Preserve active variant selection if possible\nif(activeVariant){const matchingVariant=_matchingProduct.node.variants?.edges.find(({node})=>node.selectedOptions.every(option=>activeVariant.selectedOptions.find(activeOption=>activeOption.name===option.name&&activeOption.value===option.value)));if(matchingVariant){setActiveVariant(matchingVariant.node);}}}}catch(error){// Error handling\n}finally{setIsLoadingPrice(false);}},[shopifyProductID,activeVariant]);// Listen for currency changes\nuseEffect(()=>{if(!isBrowser)return;window.addEventListener(\"currency_changed\",handleCurrencyChange);return()=>{window.removeEventListener(\"currency_changed\",handleCurrencyChange);};},[isBrowser,handleCurrencyChange]);// Initial product load\nuseEffect(()=>{if(!isBrowser)return;// Single handler for all product-ready events (both priority and regular)\nconst handleProductsReady=e=>{if(product&&product.id===`gid://shopify/Product/${shopifyProductID}`){return;}if(!Array.isArray(e.detail?.products))return;// console.log('Products ready event received in Price component', e);\nconst matchingProduct=e.detail.products.find(({node:_product})=>_product.id===`gid://shopify/Product/${shopifyProductID}`);if(matchingProduct){setProduct(matchingProduct.node);// console.log('Product loaded:', matchingProduct.node.title);\nif(matchingProduct.node?.variants?.edges?.length===1){setActiveVariant(matchingProduct.node.variants.edges[0].node);}}};// Add event listeners - single handleProductsReady handles both events\ndocument.addEventListener(\"data__products-ready\",handleProductsReady);document.addEventListener(\"product__active-variant__changed\",handleVariantChange);// Cleanup\nreturn()=>{document.removeEventListener(\"data__products-ready\",handleProductsReady);document.removeEventListener(\"product__active-variant__changed\",handleVariantChange);};},[isBrowser,shopifyProductID,selectedCurrency,selectedCountryCode,product]);const loadProduct=async()=>{try{// console.log('Loading product...');\n// Get products from shopXtools storage\nconst products=Array.isArray(window?.shopXtools?.products)?window.shopXtools.products:[];const _matchingProduct=products.find(({node:_product})=>_product.id===`gid://shopify/Product/${shopifyProductID}`);if(_matchingProduct){setProduct(_matchingProduct.node);// console.log(\n//   'Product found after immediate initialization:',\n//   _matchingProduct.node?.title\n// );\nif(_matchingProduct.node?.variants?.edges?.length===1){setActiveVariant(_matchingProduct.node.variants.edges[0].node);}}else{// Product not found - request priority fetch\nif(window?.shopXtools?.getProducts){// console.log('Product not found - request priority fetch...');\nwindow.shopXtools.getProducts(shopifyProductID);}}}catch(error){console.error(\"Error loading product:\",error);}};useEffect(()=>{if(!isBrowser)return;loadProduct();},[isBrowser]);// Wait for variant selection events with timeout\nuseEffect(()=>{if(!isBrowser||!product)return;// Only wait for variant selection if it's a multi-variant product\nconst isMultiVariant=product.variants?.edges?.length>1;if(!isMultiVariant)return;// Set waiting state and start timeout\nsetWaitingForVariantSelection(true);// console.log(\"Price component: Waiting for variant selection events...\")\nconst timeout=setTimeout(()=>{// If no variant selection events received within timeout, assume no variant selector\nsetWaitingForVariantSelection(false);//console.log(\"Price component: No variant selection events received, showing product price\")\n},1e3)// 1 second timeout\n;return()=>{clearTimeout(timeout);};},[isBrowser,product]);// Add subscription price listener\nuseEffect(()=>{if(!isBrowser)return;// Check for persisted subscription state that may have been set\n// before this component mounted (solves timing/race on page refresh)\nconst persisted=window.__fc_activeSubscription?.[shopifyProductID];if(persisted?.price&&!subscriptionPrice){setSubscriptionPrice(persisted.price);}const handleSubscriptionPriceUpdate=e=>{// Ignore events for other products\nif(e.detail?.productId&&e.detail.productId!==shopifyProductID)return;if(e.detail?.price){setSubscriptionPrice(e.detail.price);}else{setSubscriptionPrice(null);}};const handleVariantOptionSelected=e=>{//console.log(\"variant_option_selected\", e.detail)\nif(e.detail?.isPurchaseAction){// console.log(\n//     \"Purchase action is true, returning\",\n//     e.detail?.isPurchaseAction\n// )\nreturn;}// Check if this event is for our product\nconst eventProductId=e.detail?.productId;const expectedProductId=`gid://shopify/Product/${shopifyProductID}`;if(eventProductId&&eventProductId!==expectedProductId){//console.log(\"Event not for this product\", eventProductId, expectedProductId)\nreturn;}// Clear waiting state when variant selection events are received\nsetWaitingForVariantSelection(false);//console.log(\"Price component: Variant selection event received, clearing wait state\")\nsetIsLoadingPrice(true);if(e.detail?.optionName&&e.detail?.value){setPartialSelections({[e.detail.optionName]:e.detail.value});//console.log(\"setting partialSelections from individual option\", e.detail.optionName, e.detail.value)\n}setIsLoadingPrice(false);};document.addEventListener(\"subscription__price-update\",handleSubscriptionPriceUpdate);document.addEventListener(\"variant_option_selected\",handleVariantOptionSelected);document.addEventListener(\"__variant_option_selected\",handleVariantOptionSelected);return()=>{document.removeEventListener(\"subscription__price-update\",handleSubscriptionPriceUpdate);document.removeEventListener(\"variant_option_selected\",handleVariantOptionSelected);document.removeEventListener(\"__variant_option_selected\",handleVariantOptionSelected);};},[isBrowser,shopifyProductID]);// Get currency formatting options at component level\nconst _currencyCode=useMemo(()=>{const variantCurrency=get(activeVariant,\"price.currencyCode\");const productCurrency=get(product,\"priceRange.minVariantPrice.currencyCode\");return variantCurrency||productCurrency||\"USD\";},[activeVariant,product]);const showMockValues=useMemo(()=>RenderTarget.current()===RenderTarget.canvas||isBrowser&&window.location.origin.endsWith(\"framercanvas.com\"),[isBrowser]);// Common function to format price based on options\nconst formatPriceWithOptions=(numericPrice,currCode)=>{const symbolSameAsCode=isCurrencySymbolSameAsCode(currCode);// Get locale from selected country code\nconst locale=getLocaleFromCountry(selectedCountryCode);// Log browser user agent for debugging iOS-specific issues\n// if (isBrowser) {\n//     console.log(\"[FC_ProductPrice] Format debug:\", {\n//         userAgent: navigator.userAgent,\n//         isCurrencySymbolSameAsCode: symbolSameAsCode,\n//         currencyCode: currCode,\n//         selectedCountryCode,\n//         locale,\n//         showSymbol,\n//         showCurrency,\n//         showDecimals,\n//     })\n// }\n// Determine if we should show decimals based on the setting\nconst shouldShowDecimals=()=>{if(showDecimals===\"Always show\")return true;if(showDecimals===\"Never show\")return false;if(showDecimals===\"Hide when .00\"){// Check if the decimal part is zero\nreturn numericPrice%1!==0;}return true// Default fallback\n;};const decimalDigits=shouldShowDecimals()?2:0;// If showing neither symbol nor code, just format the number\nif(!showSymbol&&!showCurrency){const formattedNumber=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);return formattedNumber;}// Special case for USD to prevent \"US$\" display in Safari iOS\nif(currCode===\"USD\"&&showSymbol){// Check if running on iOS device\nconst isIOS=isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream;// Format USD manually to avoid the iOS \"US$\" prefix\nif(isIOS){const number=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);let result;if(!showCurrency){result=`$${number}`// Just \"$50\" format\n;}else{result=`$${number} USD`// \"$50 USD\" format\n;}return result;}else{// For non-iOS devices, continue with normal formatting but use\n// a more controlled approach to ensure consistency\nlet result;if(!showCurrency){result=new Intl.NumberFormat(locale,{style:\"currency\",currency:\"USD\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits,currencyDisplay:\"narrowSymbol\"}).format(numericPrice);}else{const withSymbol=new Intl.NumberFormat(locale,{style:\"currency\",currency:\"USD\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits,currencyDisplay:\"narrowSymbol\"}).format(numericPrice);result=`${withSymbol} USD`;}return result;}}// For currencies where symbol is same as code (like CHF)\nif(symbolSameAsCode){// If showing currency code, always use code-first format and ignore symbol\nif(showCurrency&&!showSymbol){const number=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);const output=`${currCode} ${number}`;return output;}if(showSymbol&&!showCurrency){const number=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);const output=`${currCode} ${number}`;return output;}if(showCurrency&&showSymbol){const number=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);const result=`${currCode} ${number}`;return result;}}// For currencies with distinct symbols (like USD with $)\n// If showing only the code (no symbol)\nif(!showSymbol&&showCurrency){const number=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);// For normal currencies, show code after the number\nconst result=`${number} ${currCode}`;return result;}// If showing only the symbol (no code)\nif(showSymbol&&!showCurrency){const result=new Intl.NumberFormat(locale,{style:\"currency\",currency:currCode,minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits,currencyDisplay:\"narrowSymbol\"}).format(numericPrice);return result;}// If showing both symbol and code\nconst withSymbol=new Intl.NumberFormat(locale,{style:\"currency\",currency:currCode,minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits,currencyDisplay:\"narrowSymbol\"}).format(numericPrice);const result=`${withSymbol} ${currCode}`;return result;};const text=useMemo(()=>{if(!isBrowser)return\"\";// For canvas view, handle the display options directly\nif(typeof RenderTarget!==\"undefined\"&&(RenderTarget.current()===RenderTarget.canvas||showMockValues)){// Parse canvasPrice as range format (e.g., \"200.00-250.00\")\nlet minPrice;let maxPrice;if(canvasPrice){const priceRange=canvasPrice.split(\"-\");if(priceRange.length===2){minPrice=priceRange[0].trim();maxPrice=priceRange[1].trim();}else{// If no range format, use the single price for both min and max\nminPrice=canvasPrice;maxPrice=canvasPrice;}}const numericPrice=parseFloat(minPrice);const numericMaxPrice=parseFloat(maxPrice);const currentCurrencyCode=currencyCode||\"USD\";const formattedPrice=formatPriceWithOptions(numericPrice,currentCurrencyCode);// Handle displayPrice logic for canvas preview\nif(props.displayPrice===\"minimum price\"){// If min and max are the same, just show one price (no \"from\" prefix)\nif(Math.abs(numericPrice-numericMaxPrice)<.01){return formattedPrice;}return`${fromText} ${formattedPrice}`;}if(props.displayPrice===\"range\"){const formattedMaxPrice=formatPriceWithOptions(numericMaxPrice,currentCurrencyCode);// If min and max are the same, just show one price\nif(Math.abs(numericPrice-numericMaxPrice)<.01){return formattedPrice;}return`${formattedPrice} - ${formattedMaxPrice}`;}return formattedPrice;}// For live view, use the selected currency or preview currency\nconst amount=subscriptionPrice||activeVariant&&get(activeVariant,\"price.amount\");if(!amount&&!activeVariant&&!product?.priceRange){return\"\";}const currentCurrencyCode=selectedCurrency||currencyCode||\"USD\";// Use cached range if available, otherwise compute on-demand\nconst range=computedPriceRange.min!==null?computedPriceRange:getProductPriceRange(product,false);const{min:computedMin,max:computedMax}=range;// FAST PATH: If we have an amount (subscription or active variant), format it immediately\nif(amount){const numericPrice=parseFloat(amount);if(isNaN(numericPrice))return\"\";const formattedPrice=formatPriceWithOptions(numericPrice,currentCurrencyCode);return formattedPrice;}// FAST PATH: Single variant products - show price immediately\nif(product?.variants?.edges?.length===1&&!activeVariant){const variant=product.variants.edges[0].node;if(variant?.price?.amount){const numericPrice=parseFloat(variant.price.amount);if(!isNaN(numericPrice)){return formatPriceWithOptions(numericPrice,currentCurrencyCode);}}}// Handle partial selections (when user selects only some variant options)\nconst hasPartialSelections=Object.keys(partialSelections).length>0;const hasCompleteVariant=activeVariant&&activeVariant.selectedOptions?.length>0;//console.log(\"hasPartialSelections\", hasPartialSelections)\n//console.log(\"hasCompleteVariant\", hasCompleteVariant)\n//console.log(\"product\", product)\n//console.log(\"partialSelections\", partialSelections)\nif(hasPartialSelections&&!hasCompleteVariant&&product?.variants?.edges?.length&&variantSelectorAction!==\"purchase\"){// Filter variants that match the partial selections\nconst matchingVariants=product.variants.edges.filter(({node:variant})=>{return variant.selectedOptions.every(option=>{// If this option is in our partial selections, it must match\nif(partialSelections[option.name]){return partialSelections[option.name]===option.value;}// If not in partial selections, any value is fine\nreturn true;});});// console.log(\"matchingVariants\", matchingVariants)\nif(matchingVariants.length>0){//console.log(\"matchingVariants\", matchingVariants)\n// Calculate min and max prices for matching variants\nconst prices=matchingVariants.map(({node:variant})=>parseFloat(variant.price?.amount||\"0\")).filter(price=>price>0);if(prices.length>0){const minPrice=Math.min(...prices);const maxPrice=Math.max(...prices);const formattedMinPrice=formatPriceWithOptions(minPrice,currentCurrencyCode);if(props.displayPrice===\"range\"){// If min and max are the same, just show one price\nif(Math.abs(minPrice-maxPrice)<.01){return formattedMinPrice;}const formattedMaxPrice=formatPriceWithOptions(maxPrice,currentCurrencyCode);return`${formattedMinPrice} - ${formattedMaxPrice}`;}if(props.displayPrice===\"minimum price\"){// If min and max are the same, just show one price (no \"from\" prefix)\nif(Math.abs(minPrice-maxPrice)<.01){return formattedMinPrice;}return`${fromText} ${formattedMinPrice}`;}}}}// Handle price range display logic for complete product (no active variant)\nif(!activeVariant&&product?.priceRange||variantSelectorAction===\"purchase\"&&product?.priceRange){// If we're waiting for variant selection, don't show product price\nif(waitingForVariantSelection){return\"\";}// PROGRESSIVE ENHANCEMENT: Show min price immediately, enhance with range when computed\nif(computedMin){const formattedMinPrice=formatPriceWithOptions(computedMin,currentCurrencyCode);// If we have both min and max, show range\nif(computedMax&&Math.abs(computedMin-computedMax)>.01){if(props.displayPrice===\"range\"){const formattedMaxPrice=formatPriceWithOptions(computedMax,currentCurrencyCode);return`${formattedMinPrice} - ${formattedMaxPrice}`;}if(props.displayPrice===\"minimum price\"){// If min and max are the same, just show one price (no \"from\" prefix)\nif(Math.abs(computedMin-computedMax)<.01){return formattedMinPrice;}return`${fromText} ${formattedMinPrice}`;}}// Single price or fallback\nif(props.displayPrice===\"range\"){return formattedMinPrice;}// If min and max are the same, just show one price (no \"from\" prefix)\nif(computedMax&&Math.abs(computedMin-computedMax)<.01){return formattedMinPrice;}return`${fromText} ${formattedMinPrice}`;}// FALLBACK: Use product-level range if available\nconst productMinPrice=get(product,\"priceRange.minVariantPrice.amount\");const productMaxPrice=get(product,\"priceRange.maxVariantPrice.amount\");if(productMinPrice){const numericMinPrice=parseFloat(productMinPrice);if(!isNaN(numericMinPrice)&&numericMinPrice>0){const formattedMinPrice=formatPriceWithOptions(numericMinPrice,currentCurrencyCode);if(props.displayPrice===\"range\"){if(productMaxPrice){const numericMaxPrice=parseFloat(productMaxPrice);if(!isNaN(numericMaxPrice)&&numericMaxPrice>0&&Math.abs(numericMinPrice-numericMaxPrice)>.01){const formattedMaxPrice=formatPriceWithOptions(numericMaxPrice,currentCurrencyCode);return`${formattedMinPrice} - ${formattedMaxPrice}`;}}return formattedMinPrice;}// If min and max are the same, just show one price (no \"from\" prefix)\nif(productMaxPrice){const numericMaxPrice=parseFloat(productMaxPrice);if(!isNaN(numericMaxPrice)&&Math.abs(numericMinPrice-numericMaxPrice)<.01){return formattedMinPrice;}}return`${fromText} ${formattedMinPrice}`;}}}// Absolute last fallback: try active variant again or show nothing\nreturn\"\";},[isBrowser,showMockValues,activeVariant,product,canvasPrice,showCurrency,showSymbol,currencyCode,showDecimals,selectedCurrency,selectedCountryCode,subscriptionPrice,props.displayPrice,partialSelections,variantSelectorAction,fromText,waitingForVariantSelection,getProductPriceRange]);const compareAtPrice=useMemo(()=>{// For partial selections (variant groups), check if any matching variants have compareAtPrice\nif(Object.keys(partialSelections).length>0&&product?.variants?.edges?.length){const matchingVariants=product.variants.edges.filter(({node:variant})=>{return variant.selectedOptions.every(option=>{if(partialSelections[option.name]){return partialSelections[option.name]===option.value;}return true;});});// Check if ALL matching variants have a valid compareAtPrice\nconst allMatchingVariantsHaveComparePrice=matchingVariants.every(({node:variant})=>{const compareAmount=get(variant,\"compareAtPrice.amount\");return compareAmount&&parseFloat(compareAmount)>0;});// If not all matching variants have compareAtPrice, return empty string\nif(!allMatchingVariantsHaveComparePrice){return\"\";}// If all matching variants have compareAtPrice, use the minimum for consistency\nconst comparePrices=matchingVariants.map(({node:variant})=>parseFloat(get(variant,\"compareAtPrice.amount\")||\"0\")).filter(price=>price>0);if(comparePrices.length>0){const minComparePrice=Math.min(...comparePrices);const currentCurrencyCode=selectedCurrency||currencyCode||\"USD\";return formatPriceWithOptions(minComparePrice,currentCurrencyCode);}}// For active variant, use its compareAtPrice\nif(activeVariant){const amount=get(activeVariant,\"compareAtPrice.amount\");if(!amount)return\"\";const numericPrice=parseFloat(amount);if(isNaN(numericPrice)||numericPrice<=0)return\"\";const currentCurrencyCode=selectedCurrency||currencyCode||\"USD\";return formatPriceWithOptions(numericPrice,currentCurrencyCode);}// For product level (no variant selected), check if ALL variants have compareAtPrice\nif(product?.variants?.edges?.length){const allVariantsHaveComparePrice=product.variants.edges.every(({node:variant})=>{const compareAmount=get(variant,\"compareAtPrice.amount\");return compareAmount&&parseFloat(compareAmount)>0;});// If not all variants have compareAtPrice, don't show sale styling\nif(!allVariantsHaveComparePrice){return\"\";}// If all variants have compareAtPrice, use the product-level compareAtPriceRange\nconst amount=get(product,\"compareAtPriceRange.minVariantPrice.amount\");if(!amount)return\"\";const numericPrice=parseFloat(amount);if(isNaN(numericPrice)||numericPrice<=0)return\"\";const currentCurrencyCode=selectedCurrency||currencyCode||\"USD\";return formatPriceWithOptions(numericPrice,currentCurrencyCode);}return\"\";},[activeVariant,product,partialSelections,currencyCode,showCurrency,showSymbol,showDecimals,selectedCurrency,selectedCountryCode,showMockValues,props.format]);const numericValue=useMemo(()=>parseFloat(compareAtPrice.replace(/[^\\d.-]/g,\"\")),[compareAtPrice]);const hasValidCompareAtPrice=!isNaN(numericValue)&&numericValue>0;const shouldDisplay=useMemo(()=>{if(showMockValues)return true;if(!text)return false;const value=parseFloat(text.replace(/[^\\d.-]/g,\"\"));return!isNaN(value)&&value>0;},[text,showMockValues]);const computedStyles=useMemo(()=>{const baseStyles={margin:0,padding:0,lineHeight:1,whiteSpace:\"nowrap\",display:\"inline-block\",width:\"auto\"};const priceStyles=hasValidCompareAtPrice?props.saleFont:props.regularFont;const priceColor=hasValidCompareAtPrice?props.saleColor:props.regularColor;return{...baseStyles,...priceStyles,color:priceColor};},[hasValidCompareAtPrice,props.saleFont,props.regularFont,props.saleColor,props.regularColor]);// console.log(\"Text\", text)\n// // Price calculation logging\n// useEffect(() => {\n//     console.log(\"[FC_ProductPrice] Price State Update:\", {\n//         activeVariant,\n//         product,\n//         selectedCurrency,\n//         subscriptionPrice,\n//     })\n// }, [activeVariant, product, selectedCurrency, subscriptionPrice])\n// useEffect(() => {\n//     console.log(\"Active variant updated:\", activeVariant);\n// }, [activeVariant]);\n// Return placeholder during SSR\nif(!isBrowser||isLoadingPrice){return /*#__PURE__*/_jsx(\"div\",{style:{display:\"none\"}});}// Progressive enhancement: Show loading state only when we have no data at all\nconst shouldShowLoading=!product&&!activeVariant&&!subscriptionPrice&&!showMockValues;if(shouldShowLoading){return /*#__PURE__*/_jsx(\"div\",{style:{display:\"none\"}});}// Show progressive loading indicator when computing ranges\nconst isComputingRange=product&&!isRangeComputed&&product.variants?.edges?.length>1;return /*#__PURE__*/_jsx(\"div\",{style:{display:\"inline-block\",maxWidth:\"100%\",width:\"auto\",whiteSpace:\"nowrap\",overflow:\"visible\",transform:\"none\",transition:\"none\",animation:\"none\",willChange:\"auto\"},children:/*#__PURE__*/_jsxs(\"p\",{style:{...computedStyles,transform:\"none\",transition:\"none\",animation:\"none\",willChange:\"auto\"},children:[text,isComputingRange&&/*#__PURE__*/_jsx(\"span\",{style:{opacity:.6,fontSize:\"0.8em\",marginLeft:\"4px\"},children:\"...\"})]})});}FC_ProductPrice.defaultProps={shopifyProductID:\"\",canvasPrice:\"50.00\",fromText:\"from\",format:{showCurrency:true,showSymbol:true,currencyCode:\"USD\",showDecimals:\"Always show\"}};addPropertyControls(FC_ProductPrice,{shopifyProductID:{type:ControlType.String,title:\"Product ID\",description:\"Connect to CMS (required).\"},canvasPrice:{type:ControlType.String,title:\"Price\",defaultValue:\"50.00\",description:\"Connect to CMS (for canvas preview only).\"},displayPrice:{type:ControlType.Enum,title:\"Varying Prices\",options:[\"minimum price\",\"range\"],optionTitles:[\"Minimum Price\",\"Range\"],defaultValue:\"minimum price\",displaySegmentedControl:true,segmentedControlDirection:\"vertical\",description:\"When a product has multiple prices and a variant has not been selected.\"},fromText:{type:ControlType.String,title:\"Prefix\",placeholder:\"from\",defaultValue:\"from\",hidden:props=>props.displayPrice!==\"minimum price\"},format:{type:ControlType.Object,title:\"Format\",controls:{showSymbol:{type:ControlType.Boolean,title:\"Symbol\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\",description:\"$, \\xa3, €, etc.\"},showCurrency:{type:ControlType.Boolean,title:\"Code\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\",description:\"USD, EUR, CHF, etc.\"},showDecimals:{type:ControlType.Enum,title:\"Decimals\",defaultValue:\"Always show\",options:[\"Always show\",\"Never show\",\"Hide when .00\"],optionTitles:[\"Always show\",\"Never show\",\"Hide when .00\"],displaySegmentedControl:true,segmentedControlDirection:\"vertical\"},currencyCode:{type:ControlType.Enum,title:\"Preview\",defaultValue:\"USD\",options:[\"USD\",\"EUR\",\"GBP\",\"CHF\",\"JPY\",\"CAD\",\"AUD\",\"CNY\",\"HKD\",\"NZD\",\"SEK\",\"KRW\",\"SGD\",\"NOK\",\"MXN\",\"INR\",\"RUB\",\"ZAR\",\"TRY\",\"BRL\",\"TWD\",\"DKK\",\"PLN\",\"THB\",\"IDR\",\"HUF\",\"CZK\",\"ILS\",\"CLP\",\"PHP\",\"AED\",\"COP\",\"SAR\",\"MYR\",\"RON\"],description:\"Currency is for canvas preview only.\"}}},/** Font and Color Controls */regularFont:{type:ControlType.Font,title:\"Regular\",controls:\"extended\"},regularColor:{type:ControlType.Color,title:\"↳ Color\",defaultValue:\"#000\"},saleFont:{type:ControlType.Font,title:\"Sale\",controls:\"extended\"},saleColor:{type:ControlType.Color,title:\"↳ Color\",defaultValue:\"#FF0000\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FC_ProductPrice\",\"slots\":[],\"annotations\":{\"framerDisableUnlink\":\"\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FC_ProductPrice.map","/*\n * Framer Commerce\n * Confidential and Proprietary - All Rights Reserved\n * Unauthorized use, reproduction, distribution, or disclosure of this\n * source code or any related information is strictly prohibited.\n *\n * This software is the exclusive property of Framer Commerce (\"Company\").\n * It is considered highly confidential and proprietary information.\n *\n * Any use, copying, modification, distribution, or sharing of this software,\n * in whole or in part, without the express written permission of the Company\n * is strictly prohibited and may result in legal action.\n *\n * DISCLAIMER: This software does not provide any express or\n * implied warranties, including, but not limited to, the implied warranties\n * of merchantability and fitness for a particular purpose. In no event shall\n * Framer Commerce be liable for any direct, indirect, incidental, special,\n * exemplary, or consequential damages (including, but not limited to, procurement\n * of substitute goods or services; loss of use, data, or profits; or business\n * interruption) however caused and on any theory of liability, whether in\n * contract, strict liability, or tort (including negligence or otherwise)\n * arising in any way out of the use of this software, even if advised of\n * the possibility of such damage.\n *\n * Any unauthorized possession, use, copying, distribution, or dissemination\n * of this software will be considered a breach of confidentiality and may\n * result in legal action.\n *\n * For inquiries, contact:\n * Framer Commerce\n * Email: hello@framercommerce.com\n *\n * © 2025 Butter Supply Inc. All Rights Reserved.\n */import{jsx as _jsx}from\"react/jsx-runtime\";import{useCallback,useEffect,useMemo,useRef,useState}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{get}from\"lodash-es\";import{useIsBrowser}from\"https://framerusercontent.com/modules/ncBs5KPMI9I5GEta13fn/zGXDjuZapa1SGy6D8P5e/IsBrowser.js\";import{knownCurrenciesWithCodeAsSymbol}from\"https://framerusercontent.com/modules/k9s4cejdkBGDjmzudhzM/18cq93eooqM4YmdbL7E2/currencyMaps.js\";// Helper function to map country code to appropriate locale\nconst getLocaleFromCountry=countryCode=>{// Default fallback locale\nif(!countryCode)return undefined;// Common country code to locale mappings\nconst countryToLocale={// North America\nUS:\"en-US\",CA:\"en-CA\",QC:\"fr-CA\",// Europe\nGB:\"en-GB\",FR:\"fr-FR\",DE:\"de-DE\",IT:\"it-IT\",ES:\"es-ES\",PT:\"pt-PT\",NL:\"nl-NL\",BE:\"fr-BE\",LU:\"fr-LU\",CH:\"de-CH\",AT:\"de-AT\",SE:\"sv-SE\",NO:\"nb-NO\",DK:\"da-DK\",FI:\"fi-FI\",PL:\"pl-PL\",CZ:\"cs-CZ\",HU:\"hu-HU\",RU:\"ru-RU\",// Asia Pacific\nCN:\"zh-CN\",JP:\"ja-JP\",KR:\"ko-KR\",IN:\"en-IN\",AU:\"en-AU\",NZ:\"en-NZ\",// Latin America\nMX:\"es-MX\",BR:\"pt-BR\",AR:\"es-AR\",CL:\"es-CL\",CO:\"es-CO\",PE:\"es-PE\",// Middle East & Africa\nAE:\"ar-AE\",SA:\"ar-SA\",ZA:\"en-ZA\",IL:\"he-IL\"};return countryToLocale[countryCode]||undefined;};// Helper function to check if a currency's symbol is the same as its code\nconst isCurrencySymbolSameAsCode=currencyCode=>{// For some currencies like CHF, the browser might use the code as the symbol\nif(!currencyCode)return false;if(knownCurrenciesWithCodeAsSymbol.includes(currencyCode)){return true;}try{const formatted=new Intl.NumberFormat(undefined,{style:\"currency\",currency:currencyCode,currencyDisplay:\"narrowSymbol\"}).format(0);// Remove digits, decimal points, and common formatting characters\nconst cleanFormatted=formatted.replace(/[0-9.,\\s]/g,\"\");// Check if what remains is the currency code\nreturn cleanFormatted===currencyCode;}catch(e){return false;}};/**\n * @framerDisableUnlink\n */export default function FC_ProductPriceCompare(props){const{shopifyProductID,canvasPrice,format:{showCurrency,showSymbol,showDecimals,currencyCode}={},strikethrough,strikethroughColor,strikethroughSize,font,color,compareAtPrefix=\"\"}=props;const[product,setProduct]=useState();const[activeVariant,setActiveVariant]=useState();const[selectedCurrency,setSelectedCurrency]=useState(\"\");const[selectedCountryCode,setSelectedCountryCode]=useState(\"\");const[selectedCountry,setSelectedCountry]=useState(\"\");const[partialSelections,setPartialSelections]=useState({});const[variantSelectorAction,setVariantSelectorAction]=useState(\"\");const isBrowser=useIsBrowser();const normalizeProduct=useCallback(p=>{if(!p)return p;const edges=p?.variants?.edges;if(!Array.isArray(edges)){return{...p,variants:{...p.variants||{},edges:Array.isArray(edges)?edges:[]}};}return p;},[]);// Initialize currency from localStorage on page load\nuseEffect(()=>{if(!isBrowser)return;const storedCurrency=localStorage.getItem(\"selectedCurrency\");const storedCountryCode=localStorage.getItem(\"selectedCountryCode\");const storedCountry=localStorage.getItem(\"selectedCountry\");setSelectedCurrency(storedCurrency||\"USD\");setSelectedCountryCode(storedCountryCode||\"US\");setSelectedCountry(storedCountry||\"United States\");},[isBrowser]);const _currencyCode=useMemo(()=>{const variantCurrency=get(activeVariant,\"price.currencyCode\");const productCurrency=get(product,\"priceRange.minVariantPrice.currencyCode\");return variantCurrency||productCurrency||\"USD\";},[activeVariant,product]);const showMockValues=useMemo(()=>typeof RenderTarget!==\"undefined\"&&(RenderTarget.current()===RenderTarget.canvas||isBrowser&&window.location.origin.endsWith(\"framercanvas.com\")),[isBrowser]);// Cached compareAt range per product/currency\nconst compareRangeCache=useRef(new Map);const getProductCompareRange=useCallback(p=>{if(!p)return{min:null,max:null};const currency=_currencyCode||selectedCurrency||\"USD\";const cacheKey=`${p.id||\"no-id\"}-${currency}-compare`;if(compareRangeCache.current.has(cacheKey)){return compareRangeCache.current.get(cacheKey);}const minFromProduct=get(p,\"compareAtPriceRange.minVariantPrice.amount\");const maxFromProduct=get(p,\"compareAtPriceRange.maxVariantPrice.amount\");let minVal=minFromProduct?parseFloat(minFromProduct):null;let maxVal=maxFromProduct?parseFloat(maxFromProduct):null;if(minVal===null||isNaN(minVal)||maxVal===null||isNaN(maxVal)){const edges=p?.variants?.edges||[];for(let i=0;i<(Array.isArray(edges)?edges.length:0);i++){const v=edges[i]?.node;if(!v)continue;const amtStr=get(v,\"compareAtPrice.amount\");const amt=amtStr?parseFloat(amtStr):NaN;if(!isNaN(amt)&&amt>0){if(minVal===null||amt<minVal)minVal=amt;if(maxVal===null||amt>maxVal)maxVal=amt;}}}const value={min:typeof minVal===\"number\"&&!isNaN(minVal)?minVal:null,max:typeof maxVal===\"number\"&&!isNaN(maxVal)?maxVal:null};compareRangeCache.current.set(cacheKey,value);return value;},[_currencyCode,selectedCurrency]);const productCompareRange=useMemo(()=>getProductCompareRange(product),[product,getProductCompareRange]);// Common function to format price based on options\nconst formatPriceWithOptions=(numericPrice,currCode)=>{const symbolSameAsCode=isCurrencySymbolSameAsCode(currCode);// Get locale from selected country code\nconst locale=getLocaleFromCountry(selectedCountryCode);// Determine if we should show decimals based on the setting\nconst shouldShowDecimals=()=>{if(showDecimals===\"Always show\")return true;if(showDecimals===\"Never show\")return false;if(showDecimals===\"Hide when .00\"){// Check if the decimal part is zero\nreturn numericPrice%1!==0;}return true// Default fallback for boolean value\n;};const decimalDigits=shouldShowDecimals()?2:0;// If showing neither symbol nor code, just format the number\nif(!showSymbol&&!showCurrency){return new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);}// Special case for USD to prevent \"US$\" display in Safari iOS\nif(currCode===\"USD\"&&showSymbol){// Check if running on iOS device\nconst isIOS=isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!(\"MSStream\"in window);// Format USD manually to avoid the iOS \"US$\" prefix\nif(isIOS){const number=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);if(!showCurrency){return`$${number}`// Just \"$50\" format\n;}else{return`$${number} USD`// \"$50 USD\" format\n;}}else{// For non-iOS devices, continue with normal formatting but use\n// a more controlled approach to ensure consistency\nif(!showCurrency){return new Intl.NumberFormat(locale,{style:\"currency\",currency:\"USD\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits,currencyDisplay:\"narrowSymbol\"}).format(numericPrice);}else{const withSymbol=new Intl.NumberFormat(locale,{style:\"currency\",currency:\"USD\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits,currencyDisplay:\"narrowSymbol\"}).format(numericPrice);return`${withSymbol} USD`;}}}// For currencies where symbol is same as code (like CHF)\nif(symbolSameAsCode){// If showing currency code, always use code-first format and ignore symbol\nif(showCurrency&&!showSymbol){const number=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);const output=`${currCode} ${number}`;return output;}if(showSymbol&&!showCurrency){const number=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);const output=`${currCode} ${number}`;return output;}if(showCurrency&&showSymbol){const number=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);return`${currCode} ${number}`;}}// For currencies with distinct symbols (like USD with $)\n// If showing only the code (no symbol)\nif(!showSymbol&&showCurrency){const number=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);// For normal currencies, show code after the number\nreturn`${number} ${currCode}`;}// If showing only the symbol (no code)\nif(showSymbol&&!showCurrency){return new Intl.NumberFormat(locale,{style:\"currency\",currency:currCode,minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits,currencyDisplay:\"narrowSymbol\"}).format(numericPrice);}// If showing both symbol and code\nconst withSymbol=new Intl.NumberFormat(locale,{style:\"currency\",currency:currCode,minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits,currencyDisplay:\"narrowSymbol\"}).format(numericPrice);return`${withSymbol} ${currCode}`;};const text=useMemo(()=>{if(!isBrowser)return\"\";// console.log('[ComparePrice] Debug:', {\n//     activeVariant,\n//     compareAtPrice: activeVariant ? get(activeVariant, 'compareAtPrice.amount') : null,\n//     product,\n//     productComparePrice: get(product, 'compareAtPriceRange.minVariantPrice.amount'),\n//     partialSelections,\n//     variantSelectorAction,\n//     // showMockValues,\n//     // selectedCurrency\n// })\n// For canvas view, handle the display options directly\nif(typeof RenderTarget!==\"undefined\"&&(RenderTarget.current()===RenderTarget.canvas||showMockValues)){// Parse canvasPrice as range format (e.g., \"200.00-250.00\")\nlet minPrice;let maxPrice;if(canvasPrice){const priceRange=canvasPrice.split(\"-\");if(Array.isArray(priceRange)&&priceRange.length===2){minPrice=priceRange[0].trim();maxPrice=priceRange[1].trim();}else{// If no range format, use the single price for both min and max\nminPrice=canvasPrice;maxPrice=canvasPrice;}}const numericMinPrice=parseFloat(minPrice);const numericMaxPrice=parseFloat(maxPrice);const currentCurrencyCode=currencyCode||\"USD\";// Apply same logic as product (no active variant) case\n// If min and max are the same, show one price\nif(numericMinPrice===numericMaxPrice&&numericMinPrice>0&&numericMaxPrice>0){const formattedPrice=formatPriceWithOptions(numericMinPrice,currentCurrencyCode);return compareAtPrefix?`${compareAtPrefix} ${formattedPrice}`:formattedPrice;}else{return\"\";}}// For live view, get the compare at price\nconst amount=activeVariant&&get(activeVariant,\"compareAtPrice.amount\");const{min:compMin,max:compMax}=productCompareRange;if(!amount&&!activeVariant&&!product?.compareAtPriceRange&&!(compMin&&compMax))return\"\";const currentCurrencyCode=selectedCurrency||currencyCode||\"USD\";// If we have an amount, format it\nif(amount){const numericPrice=parseFloat(amount);if(isNaN(numericPrice))return\"\";const formattedPrice=formatPriceWithOptions(numericPrice,currentCurrencyCode);return compareAtPrefix?`${compareAtPrefix} ${formattedPrice}`:formattedPrice;}// Handle partial selections (when user selects only some variant options)\nconst hasPartialSelections=Object.keys(partialSelections||{}).length>0;const hasCompleteVariant=activeVariant&&Array.isArray(activeVariant.selectedOptions)&&activeVariant.selectedOptions.length>0;// console.log(\"hasPartialSelections\", hasPartialSelections)\n// console.log(\"hasCompleteVariant\", hasCompleteVariant)\n// console.log(\"product\", product)\n// console.log(\"partialSelections\", partialSelections)\nif(hasCompleteVariant&&variantSelectorAction===\"purchase\"&&product?.variants?.edges?.length){return\"\";}const hasVariantEdges=Array.isArray(product?.variants?.edges)&&(product?.variants?.edges?.length||0)>0;if(hasPartialSelections&&!hasCompleteVariant&&hasVariantEdges){// Filter variants that match the partial selections\nconst matchingVariants=(product?.variants?.edges||[]).filter(({node:variant})=>{return variant.selectedOptions.every(option=>{// If this option is in our partial selections, it must match\nif(partialSelections[option.name]){return partialSelections[option.name]===option.value;}// If not in partial selections, any value is fine\nreturn true;});});if(Array.isArray(matchingVariants)&&matchingVariants.length>0){//console.log(\"matchingVariants\", matchingVariants)\n// Get all compare at prices for matching variants\nconst compareAtPrices=matchingVariants.map(({node:variant})=>get(variant,\"compareAtPrice.amount\")).filter(amount=>amount&&amount!==\"0\"&&amount!==\"0.00\");// If no compare at prices found, return empty\nif(!Array.isArray(compareAtPrices)||compareAtPrices.length===0){//console.log(\"[ComparePrice] (partial selections) no compare at prices found, return empty\")\nreturn\"\";}// Check if all matching variants have compare at prices\nconst allVariantsHaveComparePrice=matchingVariants.every(({node:variant})=>{const comparePrice=get(variant,\"compareAtPrice.amount\");return comparePrice&&comparePrice!==\"0\"&&comparePrice!==\"0.00\";});// If not all variants have compare prices, hide the compare price text\nif(!allVariantsHaveComparePrice){//console.log(\"[ComparePrice] not all matching variants have compare prices, hide compare price text\")\nreturn\"\";}// Convert to numeric values\nconst numericComparePrices=compareAtPrices.map(price=>parseFloat(price)).filter(price=>!isNaN(price)&&price>0);if(!Array.isArray(numericComparePrices)||numericComparePrices.length===0){//console.log(\"[ComparePrice] no numeric compare prices found, return empty\")\nreturn\"\";}// Check if all compare prices are the same\nconst minComparePrice=Math.min(...numericComparePrices);const maxComparePrice=Math.max(...numericComparePrices);const allSamePrice=Math.abs(minComparePrice-maxComparePrice)<.01;if(allSamePrice){// All matching variants have the same compare price, display one price\n//console.log(\"[ComparePrice] all matching variants have the same compare price, display one price\", minComparePrice, currentCurrencyCode)\nconst formattedPrice=formatPriceWithOptions(minComparePrice,currentCurrencyCode);return compareAtPrefix?`${compareAtPrefix} ${formattedPrice}`:formattedPrice;}else{// Prices differ, hide compare price text\n//console.log(\"[ComparePrice] matching variant prices differ, hide compare price text\")\nreturn\"\";}}}// Handle product (no active variant) - check all variants\nif(!activeVariant&&!hasPartialSelections&&hasVariantEdges){// First, check if ALL variants have compare prices\nconst allVariantsHaveComparePrice=(product?.variants?.edges||[]).every(({node:variant})=>{const comparePrice=get(variant,\"compareAtPrice.amount\");return comparePrice&&comparePrice!==\"0\"&&comparePrice!==\"0.00\";});// If not all variants have compare prices, hide the compare price text\nif(!allVariantsHaveComparePrice){//console.log(\"[ComparePrice] not all variants have compare prices, hide compare price text\")\nreturn\"\";}// Use product-level compare range with fallback to computed\nconst numericMinPrice=compMin;const numericMaxPrice=compMax;if(numericMinPrice&&numericMaxPrice){if(Math.abs(numericMinPrice-numericMaxPrice)<.01){const formattedPrice=formatPriceWithOptions(numericMinPrice,currentCurrencyCode);return compareAtPrefix?`${compareAtPrefix} ${formattedPrice}`:formattedPrice;}else{return\"\";}}return\"\";}return\"\";},[isBrowser,showMockValues,activeVariant,product,canvasPrice,showCurrency,showSymbol,currencyCode,showDecimals,selectedCurrency,selectedCountryCode,partialSelections,variantSelectorAction,compareAtPrefix,props.format]);const showComparePrice=useMemo(()=>{if(showMockValues){return canvasPrice&&canvasPrice.trim()!==\"\";}return text&&text.trim()!==\"\";},[showMockValues,canvasPrice,text]);// Listen for currency changes\nuseEffect(()=>{if(!isBrowser)return;const handleCurrencyChange=event=>{// console.log('[ComparePrice] Currency changed:', {\n//     newCurrency: event.detail.currency,\n//     newCountryCode: event.detail.countryCode\n// })\nconst{currency,countryCode,country}=event.detail;setSelectedCurrency(currency);setSelectedCountryCode(countryCode);setSelectedCountry(country);try{// Get products from shopXtools storage\nconst products=window.shopXtools?.products||[];const _matchingProduct=products.find(({node:_product})=>_product.id===`gid://shopify/Product/${shopifyProductID}`);if(_matchingProduct){setProduct(normalizeProduct(_matchingProduct.node));// Preserve active variant selection if possible\nif(activeVariant){const edges=_matchingProduct?.node?.variants?.edges||[];const matchingVariant=edges.find(({node})=>{const nodeOpts=Array.isArray(node?.selectedOptions)?node.selectedOptions:[];const activeOpts=Array.isArray(activeVariant?.selectedOptions)?activeVariant.selectedOptions:[];return nodeOpts.every(option=>activeOpts.some(activeOption=>activeOption?.name===option?.name&&activeOption?.value===option?.value));});if(matchingVariant){setActiveVariant(matchingVariant.node);}}}}catch(error){// Error handling\n}};window.addEventListener(\"currency_changed\",handleCurrencyChange);return()=>{window.removeEventListener(\"currency_changed\",handleCurrencyChange);};},[isBrowser,shopifyProductID,activeVariant,selectedCurrency,selectedCountryCode]);useEffect(()=>{if(!isBrowser)return;const handleVariantChange=e=>{// console.log(\"[ComparePrice] Variant changed:\", {\n//     detail: e.detail,\n//     expectedProductId: `gid://shopify/Product/${shopifyProductID}`,\n// })\n// Check for purchase action flag - if this is a purchase action, don't update variant state\nif(e.detail?.isPurchaseAction||e.detail?.onClickAction===\"purchase\"){// console.log(\n//     \"Purchase action detected, returning\",\n//     e.detail?.isPurchaseAction\n// )\nreturn;}try{const expectedProductId=`gid://shopify/Product/${shopifyProductID}`;if(e.detail){if(!e.detail.productId||e.detail.productId!==expectedProductId){return;}}if(e.detail.productId!==expectedProductId){setVariantSelectorAction(e.detail.onClickAction);//console.log(\"variantSelectorAction\", e.detail.onClickAction)\n}// If selection is partial, do not set activeVariant; preserve partial range behavior\nif(e.detail?.isCompleteVariant===false){setActiveVariant(null);if(Array.isArray(e.detail.selectedOptions)){const partial={};e.detail.selectedOptions.forEach(opt=>{if(opt?.name)partial[opt.name]=opt.value;});setPartialSelections(partial);}return;}// Get products from shopXtools storage\nconst products=window.shopXtools?.products||[];const _matchingProduct=products.find(({node:_product})=>_product.id===`gid://shopify/Product/${shopifyProductID}`);if(_matchingProduct){setProduct(normalizeProduct(_matchingProduct.node));// Find the matching variant in the current product data\nconst edges=_matchingProduct?.node?.variants?.edges||[];const matchingVariant=edges.find(({node})=>{const nodeOpts=Array.isArray(node?.selectedOptions)?node.selectedOptions:[];const activeOpts=Array.isArray(e.detail?.selectedOptions)?e.detail.selectedOptions:[]//Array.isArray(activeVariant?.selectedOptions) ? activeVariant.selectedOptions : []\n;return nodeOpts.every(option=>activeOpts.some(activeOption=>activeOption?.name===option?.name&&activeOption?.value===option?.value));});if(matchingVariant){if(e.detail.onClickAction===\"purchase\"){setActiveVariant(null);//console.log(\"setting partialSelections for purchase action\", e.detail.selectedOptions[0])\nsetPartialSelections({[e.detail.selectedOptions[0].name]:e.detail.selectedOptions[0].value});}else{setActiveVariant(matchingVariant.node);setPartialSelections({});}}else{// If no exact variant match but event was marked complete, fall back to event detail\n// Otherwise partial branches above already handled\nif(e.detail?.isCompleteVariant){setActiveVariant(e.detail);if(e.detail.onClickAction!==\"purchase\"){setPartialSelections({});}}}}}catch(error){// Error handling without console.error\nif(e.detail?.isCompleteVariant){setActiveVariant(e.detail);if(e.detail.onClickAction!==\"purchase\"){setPartialSelections({});}}else{setActiveVariant(null);if(Array.isArray(e.detail?.selectedOptions)){const partial={};e.detail.selectedOptions.forEach(opt=>{if(opt?.name)partial[opt.name]=opt.value;});setPartialSelections(partial);}}}};const handleProductsReady=e=>{if(Array.isArray(e.detail.products)){const _matchingProduct=e.detail.products.find(({node:_product})=>_product.id===`gid://shopify/Product/${shopifyProductID}`);setProduct(_matchingProduct?normalizeProduct(_matchingProduct.node):null);// If there's only one variant, set it as active\nif(Array.isArray(_matchingProduct?.node?.variants?.edges)&&(_matchingProduct?.node?.variants?.edges?.length||0)===1){setActiveVariant(_matchingProduct.node.variants.edges[0].node);}}};// Add event listener for variant option selections\nconst handleVariantOptionSelected=e=>{//console.log(\"variant_option_selected\", e.detail)\nif(e.detail?.isPurchaseAction){// console.log(\n//     \"Purchase action is true, returning\",\n//     e.detail?.isPurchaseAction\n// )\nreturn;}// Check if this event is for our product\nconst eventProductId=e.detail?.productId;const expectedProductId=`gid://shopify/Product/${shopifyProductID}`;if(eventProductId&&eventProductId!==expectedProductId){//console.log(\"Event not for this product\", eventProductId, expectedProductId)\nreturn;}if(e.detail?.optionName&&e.detail?.value){setPartialSelections({[e.detail.optionName]:e.detail.value});//console.log(\"setting partialSelections from individual option\", e.detail.optionName, e.detail.value)\n}};// Initial product load function\nconst loadProduct=async()=>{try{// Get products from shopXtools storage\nconst products=window.shopXtools?.products||[];const _matchingProduct=products.find(({node:_product})=>_product.id===`gid://shopify/Product/${shopifyProductID}`);if(_matchingProduct){setProduct(normalizeProduct(_matchingProduct.node));if(Array.isArray(_matchingProduct.node?.variants?.edges)&&(_matchingProduct?.node?.variants?.edges?.length||0)===1){setActiveVariant(_matchingProduct.node.variants.edges[0].node);}// setActiveVariant(\n//     _matchingProduct.node?.variants?.edges[0].node\n// )\n}}catch(error){// Error handling without console.error\n}};// Call loadProduct on mount\nloadProduct();// Initial check for existing products\nif(window[\"shopXtools\"]?.products){const products=window[\"shopXtools\"].products;if(Array.isArray(products)&&products.length>0){const _matchingProduct=products.find(({node:_product})=>_product?.id===`gid://shopify/Product/${shopifyProductID}`);if(_matchingProduct?.node){setProduct(normalizeProduct(_matchingProduct.node));if(Array.isArray(_matchingProduct.node?.variants?.edges)&&(_matchingProduct?.node?.variants?.edges?.length||0)===1){setActiveVariant(_matchingProduct.node.variants.edges[0].node);}// setActiveVariant(\n//     _matchingProduct.node?.variants?.edges[0].node\n// )\n}else{setProduct(null);}}}// Add event listeners\ndocument.addEventListener(\"data__products-ready\",handleProductsReady);document.addEventListener(\"product__active-variant__changed\",handleVariantChange);document.addEventListener(\"variant_option_selected\",handleVariantOptionSelected);document.addEventListener(\"__variant_option_selected\",handleVariantOptionSelected);// Cleanup\nreturn()=>{document.removeEventListener(\"data__products-ready\",handleProductsReady);document.removeEventListener(\"product__active-variant__changed\",handleVariantChange);document.removeEventListener(\"variant_option_selected\",handleVariantOptionSelected);document.removeEventListener(\"__variant_option_selected\",handleVariantOptionSelected);};},[isBrowser,shopifyProductID,selectedCurrency]);// Return empty div during SSR\nif(!isBrowser){return /*#__PURE__*/_jsx(\"div\",{style:{display:\"none\"}});}// console.log('[ComparePrice] Final render state:', {\n//     showComparePrice,\n//     text,\n//     showMockValues\n// })\n// Always show in canvas view, otherwise only show if there's a compare price\nif(!showComparePrice){return null;}return /*#__PURE__*/_jsx(\"div\",{style:{display:\"inline-block\",maxWidth:\"100%\",width:\"auto\",whiteSpace:\"nowrap\",overflow:\"visible\",transform:\"none\",transition:\"none\",animation:\"none\",willChange:\"auto\"},children:/*#__PURE__*/_jsx(\"p\",{style:{...font,color:color,margin:0,padding:0,lineHeight:1,textDecoration:strikethrough?\"line-through\":\"none\",textDecorationColor:strikethroughColor,textDecorationThickness:strikethrough?`${strikethroughSize}px`:undefined,whiteSpace:\"nowrap\",display:\"inline-block\",width:\"auto\",transform:\"none\",transition:\"none\",animation:\"none\",willChange:\"auto\"},children:text})});}FC_ProductPriceCompare.defaultProps={shopifyProductID:\"\",strikethrough:true,strikethroughColor:\"#000000\",strikethroughSize:1,canvasPrice:\"75.00\",compareAtPrefix:\"\",format:{showCurrency:true,showSymbol:true,currencyCode:\"USD\",showDecimals:\"Always show\"}};addPropertyControls(FC_ProductPriceCompare,{shopifyProductID:{type:ControlType.String,title:\"Product ID\",description:\"Connect to CMS (required).\"},canvasPrice:{type:ControlType.String,title:\"Compare Price\",description:\"Connect to CMS (for canvas preview only).\",defaultValue:\"75.00\"},compareAtPrefix:{type:ControlType.String,title:\"Prefix\",placeholder:\"was\",defaultValue:\"\"},format:{type:ControlType.Object,title:\"Format\",controls:{showSymbol:{type:ControlType.Boolean,title:\"Symbol\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\",description:\"$, \\xa3, €, etc.\"},showCurrency:{type:ControlType.Boolean,title:\"Code\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\",description:\"USD, EUR, CHF, etc.\"},showDecimals:{type:ControlType.Enum,title:\"Decimals\",defaultValue:\"Always show\",options:[\"Always show\",\"Never show\",\"Hide when .00\"],optionTitles:[\"Always show\",\"Never show\",\"Hide when .00\"],displaySegmentedControl:true,segmentedControlDirection:\"vertical\"},currencyCode:{type:ControlType.Enum,title:\"Preview\",defaultValue:\"USD\",options:[\"USD\",\"EUR\",\"GBP\",\"CHF\",\"JPY\",\"CAD\",\"AUD\",\"CNY\",\"HKD\",\"NZD\",\"SEK\",\"KRW\",\"SGD\",\"NOK\",\"MXN\",\"INR\",\"RUB\",\"ZAR\",\"TRY\",\"BRL\",\"TWD\",\"DKK\",\"PLN\",\"THB\",\"IDR\",\"HUF\",\"CZK\",\"ILS\",\"CLP\",\"PHP\",\"AED\",\"COP\",\"SAR\",\"MYR\",\"RON\"],description:\"Currency on your site is automatic, this is only shown in canvas preview.\"}}},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\"},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#000\"},strikethrough:{type:ControlType.Boolean,title:\"Strike\",defaultValue:true},strikethroughSize:{type:ControlType.Number,title:\"↳ Size\",defaultValue:1,min:0,max:8,step:.1,hidden:props=>!props.strikethrough},strikethroughColor:{type:ControlType.Color,title:\"↳ Color\",defaultValue:\"#000000\",hidden:props=>!props.strikethrough}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FC_ProductPriceCompare\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FC_ProductPriceCompare.map","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 — read persisted state to\n// avoid flickering to 'one-time' on Framer component-variant remounts\nconst[planSelected,setPlanSelected]=useState(()=>{if(typeof window!==\"undefined\"){const persisted=window.__fc_activeSubscription?.[shopifyProductID];if(persisted?.subscriptionId)return persisted.subscriptionId;}return\"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\");});}// Check for persisted subscription state that may have been set\n// before this component mounted (solves race on page load when\n// default is \"Subscribe\")\nconst persisted=window.__fc_activeSubscription?.[shopifyProductID];if(persisted?.subscriptionId){setPlanSelected(persisted.subscriptionId);}const handleSubscriptionChange=event=>{// Only apply subscription selection for this specific product\nif(event.detail?.productId&&event.detail.productId!==shopifyProductID)return;setPlanSelected(event.detail.subscriptionId);};document.addEventListener(\"subscription__selection-sync\",handleSubscriptionChange);return()=>document.removeEventListener(\"subscription__selection-sync\",handleSubscriptionChange);},[isBrowser,shopifyProductID]);// 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\"}}}\n//# sourceMappingURL=./FC_ProductPurchaseButton.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","/*\n * index (framer/default-utils@0.45.0)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/G4IfyjvwmaeSBpdb4TWu/OIjZRBmWDcIE2B6qgG1j/index.js\"\n","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"],"mappings":"A,8iBAEa+E,EAAkB,CAC3B,SAAU,WACV,MAAO,OACP,OAAQ,OACR,QAAS,OACT,eAAgB,SAChB,WAAY,QAChB,EAGI,CADA,GAAGA,CACW,EAMLC,EAAgB,CACzB,QAAS,CACL,KAAM5B,EAAY,YACtB,EACA,aAAc,CACV,KAAMA,EAAY,YACtB,EACA,aAAc,CACV,KAAMA,EAAY,YACtB,CACJ,EAEUA,EAAY,OASRA,EAAY,QAOZA,EAAY,OAMZA,EAAY,I,OClD1B,SAAgB8B,EAAWC,EAASC,EAAS,CACzC,OAAOC,EAA0B,GAAMF,EAASC,CAAO,CAC3D,CACA,SAAgBE,EAAUC,EAAQH,EAAS,CACvC,OAAOC,EAA0B,GAAOE,EAAQH,CAAO,CAC3D,CACA,SAASC,EAA0BG,EAAMC,EAAUL,EAAU,GAAM,CAC/D,IAAMM,EAAavC,EAA+B,EAClDnD,MAAc,CACNoF,GAAWM,IAAeF,GAAMC,EAAS,CACjD,EAAG,CACCC,CACJ,CAAC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