{"version":3,"file":"AvoidLayoutJumping_Prod.91cuJoCD.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/yiRfl1JCGhIBUL31WVDk/wupS2XmBAHu1kBQNv9pi/mutations_v2.js","https:/framerusercontent.com/modules/h8ioHyt4BUxuvVCE1Q10/aTM6mEMGlM19JjX8exDe/AvoidLayoutJumping_Prod.js"],"sourcesContent":["//export const createCartMutationWithAttributes = `\n// mutation createCart($lines: [CartLineInput!]!, $attributes: [AttributeInput!]) {\n//   cartCreate(input: { lines: $lines, attributes: $attributes }) {\n//   mutation createCart($lines: [CartLineInput!]!, $attributes: [AttributeInput!], $countryCode: CountryCode) {\n//     cartCreate(input: { lines: $lines, attributes: $attributes, buyerIdentity: { countryCode: $countryCode } }) {\n//       cart {\n//         buyerIdentity {\n//           countryCode\n//         }\n//         id\n//         checkoutUrl\n//         attributes {\n//           key\n//           value\n//         }\n//         cost {\n//           totalAmount {\n//             amount\n//             currencyCode\n//           }\n//         }\n//         lines(first: 100) {\n//           edges {\n//             node {\n//               id\n//               quantity\n//               cost {\n//                 compareAtAmount {\n//                   amount\n//                   currencyCode\n//                 }\n//                 amount {\n//                   amount\n//                   currencyCode\n//                 }\n//               }\n//               merchandise {\n//                 ... on ProductVariant {\n//                   id\n//                 }\n//               }\n//             }\n//           }\n//         }\n//       }\n//       userErrors {\n//         field\n//         message\n//       }\n//     }\n//   }\n// `\nexport const createCartMutationWithAttributes=`\n  mutation createCart($lines: [CartLineInput!]!, $attributes: [AttributeInput!], $countryCode: CountryCode) {\n    cartCreate(input: { lines: $lines, attributes: $attributes, buyerIdentity: { countryCode: $countryCode } }) {\n      cart {\n        id\n        checkoutUrl\n        buyerIdentity {\n          countryCode\n        }\n        lines(first: 50) {\n          edges {\n            node {\n              id\n              quantity\n              cost {\n                totalAmount {\n                  amount\n                  currencyCode\n                }\n              }\n              merchandise {\n                ... on ProductVariant {\n                  title\n                  product {\n                    title\n                  }\n                  id\n                  quantityAvailable\n                }\n              }\n            }\n          }\n        }\n        cost {\n          subtotalAmount {\n            amount\n            currencyCode\n          }\n          totalAmount {\n            amount\n            currencyCode\n          }\n        }\n      }\n      userErrors {\n        code\n        message\n      }\n    }\n  }\n`;export const createCartMutation=`\n  mutation createCart($lines: [CartLineInput!]!, $countryCode: CountryCode) {\n    cartCreate(input: { lines: $lines, buyerIdentity: { countryCode: $countryCode } }) {\n      cart {\n        id\n        checkoutUrl\n        buyerIdentity {\n          countryCode\n        }\n        attributes {\n          key\n          value\n        }\n        lines(first: 100) {\n          edges {\n            node {\n              id\n              quantity\n              cost {\n                totalAmount {\n                  amount\n                  currencyCode\n                }\n              }\n              merchandise {\n                ... on ProductVariant {\n                  id\n                }\n              }\n            }\n          }\n        }\n        cost {\n          subtotalAmount {\n            amount\n            currencyCode\n          }\n          totalAmount {\n            amount\n            currencyCode\n          }\n        }\n      }\n      userErrors {\n        field\n        message\n      }\n    }\n  }\n`;// export const createCartMutation = `\n//   mutation createCart($lines: [CartLineInput!]!) {\n//     cartCreate(input: lines: $lines}) {\n//       cart {\n//         id\n//         checkoutUrl\n//         attributes {\n//           key\n//           value\n//         }\n//         lines(first: 100) {\n//           edges {\n//             node {\n//               id\n//               quantity\n//               merchandise {\n//                 ... on ProductVariant {\n//                   id\n//                 }\n//               }\n//             }\n//           }\n//         }\n//       }\n//       userErrors {\n//         field\n//         message\n//       }\n//     }\n//   }\n// `\nexport const addToCartMutation=`\n  mutation cartLinesAdd($cartId: ID!, $lines: [CartLineInput!]!) {\n    cartLinesAdd(cartId: $cartId, lines: $lines) {\n      cart {\n        id\n        checkoutUrl\n        buyerIdentity {\n          countryCode\n        }\n        attributes {\n          key\n          value\n        }\n        lines(first: 100) {\n          edges {\n            node {\n              id\n              quantity\n              merchandise {\n                ... on ProductVariant {\n                  id\n                  product {\n                    id\n                    title\n                    metafields(\n                      identifiers: [\n                        { namespace: \"custom\", key: \"order_max\" }\n                      ]\n                    ) {\n                      namespace\n                      key\n                      value\n                    }\n                  }\n                  price {\n                    amount\n                    currencyCode\n                  }\n                  image {\n                    url\n                  }\n                  selectedOptions {\n                    name\n                    value\n                  }\n                }\n              }\n              cost {\n                totalAmount {\n                  amount\n                  currencyCode\n                }\n              }\n            }\n          }\n        }\n        cost {\n          totalAmount {\n            amount\n            currencyCode\n          }\n          subtotalAmount {\n            amount\n            currencyCode\n          }\n        }\n      }\n      userErrors {\n        field\n        message\n      }\n    }\n  }\n`;export const updateCartAttributes=`\n  mutation cartAttributesUpdate($cartId: ID!, $attributes: [AttributeInput!]!) {\n    cartAttributesUpdate(cartId: $cartId, attributes: $attributes) {\n      cart {\n        id\n        attributes {\n          key\n          value\n        }\n      }\n      userErrors {\n        field\n        message\n      }\n    }\n  }\n`;// mutation with the selling plans:\nexport const createCartMutationNoPlans=`\nmutation cartCreate($input: CartInput!, $countryCode: CountryCode) {\n  cartCreate(input: $input, buyerIdentity: { countryCode: $countryCode }) {\n    cart {\n      id\n      checkoutUrl\n      buyerIdentity {\n        countryCode\n      }\n      createdAt\n      note\n      attributes {\n        key\n        value\n      }\n      lines(first: 10) {\n        edges {\n          node {\n            id\n            quantity\n            attributes {\n              key\n              value\n            }\n            merchandise {\n              ... on ProductVariant {\n                id\n                title\n                price {\n                  amount\n                  currencyCode\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n    userErrors {\n      field\n      message\n    }\n  }\n}\n`;export const addToCartMutationNoPlans=`\nmutation cartLinesAdd($cartId: ID!, $lines: [CartLineInput!]!, $attributes: [AttributeInput!]) {\n  cartLinesAdd(cartId: $cartId, lines: $lines) {\n    cart {\n      id\n      checkoutUrl\n      buyerIdentity {\n        countryCode\n      }\n      note\n      attributes {\n        key\n        value\n      }\n      lines(first: 10) {\n        edges {\n          node {\n            id\n            quantity\n            attributes {\n              key\n              value\n            }\n            merchandise {\n              ... on ProductVariant {\n                id\n                title\n                price {\n                  amount\n                  currencyCode\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n    userErrors {\n      field\n      message\n    }\n  }\n  cartAttributesUpdate(cartId: $cartId, attributes: $attributes) {\n    cart {\n      id\n      note\n      attributes {\n        key\n        value\n      }\n    }\n    userErrors {\n      field\n      message\n    }\n  }\n}\n`;/***\n * Cart Product Card V2 Mutations\n */export const updatelineMutation=`\n  mutation cartLinesUpdate($cartId: ID!, $lines: [CartLineUpdateInput!]!) {\n    cartLinesUpdate(cartId: $cartId, lines: $lines) {\n      cart {\n        id\n        buyerIdentity {\n          countryCode\n        }\n        lines(first: 100) {\n          edges {\n            node {\n              id\n              quantity\n              merchandise {\n                ... on ProductVariant {\n                  id\n                  product {\n                    id\n                    handle\n                    title\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n`;export const removeLineMutation=`mutation cartLinesRemove($cartId: ID!, $lineIds: [ID!]!) {\n      cartLinesRemove(cartId: $cartId, lineIds: $lineIds) {\n          cart {\n              id\n              buyerIdentity {\n                countryCode\n              }\n              lines(first: 250) {\n                  edges {\n                      node {\n                          id\n                          quantity\n                          sellingPlanAllocation{ \n                              checkoutChargeAmount{\n                                  amount\n                                  currencyCode\n                                  }\n                          }\n                          cost {\n                              totalAmount {\n                                  amount\n                                  currencyCode\n                              }\n                              subtotalAmount {\n                                  amount\n                                  currencyCode\n                              }\n                          }\n                          merchandise {\n                              ... on ProductVariant {\n                                  id\n                                  title\n                                  product {\n                                      id\n                                      title\n                                  }\n                                  price {\n                                      amount\n                                      currencyCode\n                                  }\n                                  image {\n                                      url\n                                  }\n                                      selectedOptions\n                            {\n                              name\n                              value\n                            }\n                              }\n                          }\n                      }\n                  }\n              }\n          }\n          userErrors {\n              field\n              message\n          }\n      }\n  }`;export const updatelineMutationNoPlans=`mutation cartLinesUpdate($cartId: ID!, $lines: [CartLineUpdateInput!]!) {\n      cartLinesUpdate(cartId: $cartId, lines: $lines) {\n          cart {\n              id\n              buyerIdentity {\n                countryCode\n              }\n              cost {\n                  totalAmount {\n                      amount\n                      currencyCode\n                  }\n                  subtotalAmount {\n                      amount\n                      currencyCode\n                  }\n              }\n              lines(first: 250) {\n                  edges {\n                      node {\n                          id\n                          quantity\n                          cost {\n                              totalAmount {\n                                  amount\n                                  currencyCode\n                              }\n                              subtotalAmount {\n                                  amount\n                                  currencyCode\n                              }\n                          }\n                          merchandise {\n                              ... on ProductVariant {\n                                  id\n                                  title\n                                  product {\n                                      id\n                                      title\n                                  }\n                                  price {\n                                      amount\n                                      currencyCode\n                                  }\n                                  image {\n                                      url\n                                  }\n                                  selectedOptions\n                                  {\n                              name\n                              value\n                            }\n\n                              }\n                          }\n                      }\n                  }\n              }\n          }\n          userErrors {\n              field\n              message\n          }\n      }\n  }`;export const removeLineMutationNoPlans=`mutation cartLinesRemove($cartId: ID!, $lineIds: [ID!]!) {\n      cartLinesRemove(cartId: $cartId, lineIds: $lineIds) {\n          cart {\n              id\n              buyerIdentity {\n                countryCode\n              }\n              lines(first: 250) {\n                  edges {\n                      node {\n                          id\n                          quantity\n                          cost {\n                              totalAmount {\n                                  amount\n                                  currencyCode\n                              }\n                              subtotalAmount {\n                                  amount\n                                  currencyCode\n                              }\n                          }\n                          merchandise {\n                              ... on ProductVariant {\n                                  id\n                                  title\n                                  product {\n                                      id\n                                      title\n                                  }\n                                  price {\n                                      amount\n                                      currencyCode\n                                  }\n                                  image {\n                                      url\n                                  }\n                                      selectedOptions\n                            {\n                              name\n                              value\n                            }\n                              }\n                          }\n                      }\n                  }\n              }\n          }\n          userErrors {\n              field\n              message\n          }\n      }\n  }`;export const getProducts=`\n  query GetProducts($cursor: String) {\n    products(first: 250, after: $cursor) {\n      edges {\n        node {\n          id\n          title\n          vendor\n          handle\n          images(first: 20) {\n            edges {\n              node {\n                url\n                altText\n                width\n                height\n               }\n              }\n          }\n          totalInventory\n          sellingPlanGroups(first: 1) {\n            edges {\n              node {\n                name\n                options {\n                  name\n                  values\n                }\n                sellingPlans(first: 10) {\n                  edges {\n                    node {\n                      id\n                      name\n                      description\n                      recurringDeliveries\n                      priceAdjustments {\n                        orderCount\n                        adjustmentValue {\n                          __typename\n                          ... on SellingPlanPercentagePriceAdjustment {\n                            adjustmentPercentage\n                          }\n                          ... on SellingPlanFixedAmountPriceAdjustment {\n                            adjustmentAmount {\n                              amount\n                              currencyCode\n                            }\n                          }\n                          ... on SellingPlanFixedPriceAdjustment {\n                            price {\n                              amount\n                              currencyCode\n                            }\n                          }\n                        }\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          }\n          options {\n            id\n            name\n            values\n          }\n          compareAtPriceRange {\n            minVariantPrice {\n              amount\n              currencyCode\n            }\n          }\n          priceRange {\n            minVariantPrice {\n              amount\n              currencyCode\n            }\n          }\n          variants(first: 250) {\n            pageInfo {\n              hasNextPage\n              hasPreviousPage\n              endCursor\n            }\n            edges {\n              node {\n                id\n                image {\n                  url\n                  altText\n                  width\n                  height\n                }\n                title\n                sku\n                availableForSale\n                requiresShipping\n                selectedOptions {\n                  name\n                  value\n                }\n                price {\n                  amount\n                  currencyCode\n                }\n                compareAtPrice {\n                  amount\n                  currencyCode\n                }\n              }\n            }\n          }\n        }\n      }\n      pageInfo {\n        hasNextPage\n        endCursor\n      }\n    }\n  }\n`;export const getProductsBackup=`\n  query GetProductsBackup($cursor: String) {\n    products(first: 250, after: $cursor) {\n      edges {\n        node {\n          id\n          title\n          vendor\n          handle\n          totalInventory\n          images(first: 20) {\n            edges {\n              node {\n                url\n                altText\n                width\n                height\n               }\n              }\n          }\n          options {\n            id\n            name\n            values\n          }\n          compareAtPriceRange {\n            minVariantPrice {\n              amount\n              currencyCode\n            }\n          }\n          priceRange {\n            minVariantPrice {\n              amount\n              currencyCode\n            }\n          }\n          variants(first: 250) {\n            pageInfo {\n              hasNextPage\n              hasPreviousPage\n              endCursor\n            }\n            edges {\n              node {\n                id\n                image {\n                  url\n                  altText\n                  width\n                  height\n                }\n                title\n                sku\n                availableForSale\n                requiresShipping\n                selectedOptions {\n                  name\n                  value\n                }\n                price {\n                  amount\n                  currencyCode\n                }\n                compareAtPrice {\n                  amount\n                  currencyCode\n                }\n              }\n            }\n          }\n        }\n      }\n      pageInfo {\n        hasNextPage\n        endCursor\n      }\n    }\n  }\n`;export const getCartQuery=`\n  query GetCart($cartId: ID!) {\n    cart(id: $cartId) {\n      id\n      createdAt\n      updatedAt\n      checkoutUrl\n      buyerIdentity {\n        countryCode\n      }\n      lines(first: 250) {\n        edges {\n          node {\n            id\n            quantity\n            sellingPlanAllocation { \n              checkoutChargeAmount {\n                amount\n                currencyCode\n              }\n              sellingPlan {\n                id\n                name\n                description\n              }\n            }\n            merchandise {\n              ... on ProductVariant {\n                id\n                title\n                image {\n                  url\n                }\n                selectedOptions {\n                  name\n                  value\n                }\n                product {\n                  title\n                  handle\n                }\n                price {\n                  amount\n                  currencyCode\n                }\n                compareAtPrice {\n                  amount\n                  currencyCode\n                }\n              }\n            }\n            attributes {\n              key\n              value\n            }\n            cost {\n              totalAmount {\n                amount\n                currencyCode\n              }\n              subtotalAmount {\n                amount\n                currencyCode\n              }\n            }\n          }\n        }\n      }\n      attributes {\n        key\n        value\n      }\n      cost {\n        totalAmount {\n          amount\n          currencyCode\n        }\n        subtotalAmount {\n          amount\n          currencyCode\n        }\n      }\n    }\n  }\n`;export const getCartQueryNoPlans=`\n  query GetCart($cartId: ID!) {\n    cart(id: $cartId) {\n      id\n      createdAt\n      updatedAt\n      checkoutUrl\n      buyerIdentity {\n        countryCode\n      }\n      lines(first: 250) {\n        edges {\n          node {\n            id\n            quantity\n            merchandise {\n              ... on ProductVariant {\n                id\n                title\n                image {\n                  url\n                }\n                selectedOptions {\n                  name\n                  value\n                }\n                product {\n                  title\n                  handle\n                }\n                price {\n                  amount\n                  currencyCode\n                }\n                compareAtPrice {\n                  amount\n                  currencyCode\n                }\n              }\n            }\n            attributes {\n              key\n              value\n            }\n            cost {\n              totalAmount {\n                amount\n                currencyCode\n              }\n              subtotalAmount {\n                amount\n                currencyCode\n              }\n            }\n          }\n        }\n      }\n      attributes {\n        key\n        value\n      }\n      cost {\n        totalAmount {\n          amount\n          currencyCode\n        }\n        subtotalAmount {\n          amount\n          currencyCode\n        }\n      }\n    }\n  }\n`;export const cartQuery=`\n  query getCart($cartId: ID!) {\n    cart(id: $cartId) {\n      id\n      checkoutUrl\n      buyerIdentity {\n        countryCode\n      }\n      attributes {\n        key\n        value\n      }\n      lines(first: 100) {\n        edges {\n          node {\n            id\n            quantity\n            attributes {\n              key\n              value\n            }\n            merchandise {\n              ... on ProductVariant {\n                id\n                product {\n                  id\n                  title\n                  metafields(\n                    identifiers: [\n                      { namespace: \"custom\", key: \"order_max\" }\n                    ]\n                  ) {\n                    namespace\n                    key\n                    value\n                  }\n                }\n                price {\n                  amount\n                  currencyCode\n                }\n                image {\n                  url\n                }\n                selectedOptions {\n                  name\n                  value\n                }\n              }\n            }\n            sellingPlanAllocation {\n              sellingPlan {\n                id\n                name\n              }\n              checkoutChargeAmount {\n                amount\n                currencyCode\n              }\n            }\n            cost {\n              totalAmount {\n                amount\n                currencyCode\n              }\n            }\n          }\n        }\n      }\n      cost {\n        totalAmount {\n          amount\n          currencyCode\n        }\n        subtotalAmount {\n          amount\n          currencyCode\n        }\n      }\n    }\n  }\n`;export const getProductMetafields=`\n  query getProductMetafields($handle: String!) {\n    product(handle: $handle) {\n      id\n      metafield_order_max: metafield(namespace: \"custom\", key: \"order_max\") {\n        value\n        type\n      }\n    }\n  }\n`;// Get available currencies from the store\nexport const getAvailableCurrencies=`\n  query getAvailableCurrencies {\n    localization {\n      availableCountries {\n        currency {\n          isoCode\n          name\n          symbol\n        }\n        isoCode\n        name\n        unitSystem\n      }\n      country {\n        currency {\n          isoCode\n          name\n          symbol\n        }\n        isoCode\n        name\n      }\n    }\n  }\n`;// Get products by country\nexport const getProductsQueryByCountry=`\n  query GetProductsByCountry ($cursor: String, $countryCode: CountryCode) @inContext(country: $countryCode) {\n    products(first: 250, after: $cursor) {\n      edges {\n        node {\n          id\n          title\n          vendor\n          handle\n          images(first: 20) {\n            edges {\n              node {\n                url\n                altText\n                width\n                height\n              }\n            }\n          }\n          sellingPlanGroups(first: 1) {\n            edges {\n              node {\n                name\n                options {\n                  name\n                  values\n                }\n                sellingPlans(first: 10) {\n                  edges {\n                    node {\n                      id\n                      name\n                      description\n                      recurringDeliveries\n                      priceAdjustments {\n                        orderCount\n                        adjustmentValue {\n                          __typename\n                          ... on SellingPlanPercentagePriceAdjustment {\n                            adjustmentPercentage\n                          }\n                          ... on SellingPlanFixedAmountPriceAdjustment {\n                            adjustmentAmount {\n                              amount\n                              currencyCode\n                            }\n                          }\n                          ... on SellingPlanFixedPriceAdjustment {\n                            price {\n                              amount\n                              currencyCode\n                            }\n                          }\n                        }\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          }\n          options {\n            id\n            name\n            values\n          }\n          compareAtPriceRange {\n            minVariantPrice {\n              amount\n              currencyCode\n            }\n          }\n          priceRange {\n            minVariantPrice {\n              amount\n              currencyCode\n            }\n          }\n          variants(first: 250) {\n            pageInfo {\n              hasNextPage\n              hasPreviousPage\n              endCursor\n            }\n            edges {\n              node {\n                id\n                image {\n                  url\n                  altText\n                  width\n                  height\n                }\n                title\n                sku\n                quantityAvailable\n                availableForSale\n                requiresShipping\n                selectedOptions {\n                  name\n                  value\n                }\n                price {\n                  amount\n                  currencyCode\n                }\n                compareAtPrice {\n                  amount\n                  currencyCode\n                }\n              }\n            }\n          }\n        }\n      }\n      pageInfo {\n        hasNextPage\n        endCursor\n      }\n    }\n  }\n`;export const updateCartCurrency=`\n  mutation updateCartCurrency($cartId: ID!, $countryCode: CountryCode) {\n    cartBuyerIdentityUpdate(cartId: $cartId, buyerIdentity: { countryCode: $countryCode }) {\n      cart {\n        id\n        buyerIdentity {\n          countryCode\n        }\n        cost {\n          totalAmount {\n            amount\n            currencyCode\n          }\n        }\n      }\n    }\n  }\n`;\nexport const __FramerMetadata__ = {\"exports\":{\"updateCartAttributes\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getProducts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getCartQueryNoPlans\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"updatelineMutationNoPlans\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"addToCartMutationNoPlans\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"removeLineMutationNoPlans\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getAvailableCurrencies\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"cartQuery\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getProductsBackup\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getProductMetafields\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"updateCartCurrency\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getCartQuery\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getProductsQueryByCountry\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"addToCartMutation\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"createCartMutationWithAttributes\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"updatelineMutation\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"createCartMutationNoPlans\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"createCartMutation\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"removeLineMutation\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./mutations_v2.map","import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{useEffect,useRef}from\"react\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n *\n * @framerDisableUnlink\n */export default function AvoidLayoutJumping({direction,style}){const isCanvas=RenderTarget.current()===RenderTarget.canvas;const ref=useRef(null);const rafId=useRef();const vertical=direction===\"vertical\"||direction===\"both\";const horizontal=direction===\"horizontal\"||direction===\"both\";useEffect(()=>{if(isCanvas)return;const parent=ref.current?.parentElement?.parentElement;if(!parent)return;const container=parent.parentElement;if(!container)return;const updateSize=()=>{const rect=parent.getBoundingClientRect();if(horizontal){container.style.width=`${rect.width}px`;}if(vertical){container.style.height=`${rect.height}px`;}rafId.current=requestAnimationFrame(updateSize);};// Start the RAF loop\nrafId.current=requestAnimationFrame(updateSize);return()=>{if(rafId.current){cancelAnimationFrame(rafId.current);}if(container){if(horizontal){container.style.width=\"\";}if(vertical){container.style.height=\"\";}}};},[direction]);return /*#__PURE__*/_jsx(\"div\",{ref:ref,style:{...style}});}AvoidLayoutJumping.displayName=\"Layout Jump Preventer\";addPropertyControls(AvoidLayoutJumping,{direction:{type:ControlType.Enum,defaultValue:\"vertical\",options:[\"vertical\",\"horizontal\",\"both\"],optionTitles:[\"Vertical\",\"Horizontal\",\"Both\"],displaySegmentedControl:true,segmentedControlDirection:\"vertical\",// @ts-ignore\noptionIcons:[\"direction-vertical\",\"direction-horizontal\",\"direction-all\"],description:\"More components at [Framer University](https://frameruni.link/cc).\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AvoidLayoutJumping\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"\",\"framerSupportedLayoutWidth\":\"auto\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AvoidLayoutJumping_Prod.map"],"mappings":"0NAsGe,EAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgFrB,EAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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