@anker-in/headless-ui 1.0.19-temp-101406 → 1.0.19-temp-101408
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/biz-components/AccordionCards/index.js.map +2 -2
- package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrap.js +1 -1
- package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrap.js.map +3 -3
- package/dist/cjs/biz-components/CollectionsFilters/component/filtersFun.js.map +1 -1
- package/dist/cjs/biz-components/FooterNavigation/index.js +1 -1
- package/dist/cjs/biz-components/FooterNavigation/index.js.map +3 -3
- package/dist/cjs/biz-components/FooterNavigation/types.d.ts +1 -2
- package/dist/cjs/biz-components/FooterNavigation/types.js +1 -1
- package/dist/cjs/biz-components/FooterNavigation/types.js.map +2 -2
- package/dist/cjs/biz-components/HeaderNavigation/NavProvider.d.ts +5 -6
- package/dist/cjs/biz-components/HeaderNavigation/NavProvider.js +1 -1
- package/dist/cjs/biz-components/HeaderNavigation/NavProvider.js.map +3 -3
- package/dist/cjs/biz-components/HeaderNavigation/icons/index.d.ts +1 -2
- package/dist/cjs/biz-components/HeaderNavigation/icons/index.js +1 -1
- package/dist/cjs/biz-components/HeaderNavigation/icons/index.js.map +3 -3
- package/dist/cjs/biz-components/HeaderNavigation/index.js +1 -1
- package/dist/cjs/biz-components/HeaderNavigation/index.js.map +3 -3
- package/dist/cjs/biz-components/HeaderNavigation/types.d.ts +2 -16
- package/dist/cjs/biz-components/HeaderNavigation/types.js +1 -1
- package/dist/cjs/biz-components/HeaderNavigation/types.js.map +2 -2
- package/dist/cjs/biz-components/HeaderNavigation/withCategory.d.ts +1 -1
- package/dist/cjs/biz-components/HeaderNavigation/withCategory.js +1 -1
- package/dist/cjs/biz-components/HeaderNavigation/withCategory.js.map +3 -3
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +2 -2
- package/dist/cjs/biz-components/ShelfDisplay/index.js +1 -1
- package/dist/cjs/biz-components/ShelfDisplay/index.js.map +3 -3
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.js +1 -1
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.js.map +2 -2
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js +4 -4
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js.map +3 -3
- package/dist/cjs/biz-components/Subscribe/index.d.ts +1 -7
- package/dist/cjs/biz-components/Subscribe/index.js +1 -1
- package/dist/cjs/biz-components/Subscribe/index.js.map +3 -3
- package/dist/cjs/biz-components/Title/index.js +1 -1
- package/dist/cjs/biz-components/Title/index.js.map +2 -2
- package/dist/cjs/biz-components/Title/types.d.ts +1 -3
- package/dist/cjs/biz-components/Title/types.js +1 -1
- package/dist/cjs/biz-components/Title/types.js.map +1 -1
- package/dist/cjs/biz-components/index.d.ts +0 -25
- package/dist/cjs/biz-components/index.js +1 -1
- package/dist/cjs/biz-components/index.js.map +3 -3
- package/dist/cjs/components/button.js +1 -1
- package/dist/cjs/components/button.js.map +2 -2
- package/dist/cjs/components/container.js +1 -1
- package/dist/cjs/components/container.js.map +2 -2
- package/dist/cjs/components/dialog.d.ts +1 -3
- package/dist/cjs/components/dialog.js +1 -1
- package/dist/cjs/components/dialog.js.map +3 -3
- package/dist/cjs/components/index.d.ts +0 -1
- package/dist/cjs/components/index.js +1 -1
- package/dist/cjs/components/index.js.map +3 -3
- package/dist/cjs/helpers/utils.d.ts +0 -1
- package/dist/cjs/helpers/utils.js +1 -1
- package/dist/cjs/helpers/utils.js.map +3 -3
- package/dist/cjs/stories/shelfDisplay.stories.js +1 -644
- package/dist/cjs/stories/shelfDisplay.stories.js.map +2 -2
- package/dist/cjs/stories/tabs.stories.js +1 -1
- package/dist/cjs/stories/tabs.stories.js.map +3 -3
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/biz-components/AccordionCards/index.js.map +2 -2
- package/dist/esm/biz-components/CollectionsFilters/FilterCardWrap.js +1 -1
- package/dist/esm/biz-components/CollectionsFilters/FilterCardWrap.js.map +3 -3
- package/dist/esm/biz-components/CollectionsFilters/component/filtersFun.js.map +1 -1
- package/dist/esm/biz-components/FooterNavigation/index.js +1 -1
- package/dist/esm/biz-components/FooterNavigation/index.js.map +3 -3
- package/dist/esm/biz-components/FooterNavigation/types.d.ts +1 -2
- package/dist/esm/biz-components/FooterNavigation/types.js +1 -1
- package/dist/esm/biz-components/FooterNavigation/types.js.map +2 -2
- package/dist/esm/biz-components/HeaderNavigation/NavProvider.d.ts +5 -6
- package/dist/esm/biz-components/HeaderNavigation/NavProvider.js +1 -1
- package/dist/esm/biz-components/HeaderNavigation/NavProvider.js.map +3 -3
- package/dist/esm/biz-components/HeaderNavigation/icons/index.d.ts +1 -2
- package/dist/esm/biz-components/HeaderNavigation/icons/index.js +1 -1
- package/dist/esm/biz-components/HeaderNavigation/icons/index.js.map +3 -3
- package/dist/esm/biz-components/HeaderNavigation/index.js +1 -1
- package/dist/esm/biz-components/HeaderNavigation/index.js.map +3 -3
- package/dist/esm/biz-components/HeaderNavigation/types.d.ts +2 -16
- package/dist/esm/biz-components/HeaderNavigation/types.js +1 -1
- package/dist/esm/biz-components/HeaderNavigation/types.js.map +2 -2
- package/dist/esm/biz-components/HeaderNavigation/withCategory.d.ts +1 -1
- package/dist/esm/biz-components/HeaderNavigation/withCategory.js +1 -1
- package/dist/esm/biz-components/HeaderNavigation/withCategory.js.map +3 -3
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +2 -2
- package/dist/esm/biz-components/ShelfDisplay/index.js +1 -1
- package/dist/esm/biz-components/ShelfDisplay/index.js.map +3 -3
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplay.js +1 -1
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplay.js.map +2 -2
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js +9 -9
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js.map +3 -3
- package/dist/esm/biz-components/Subscribe/index.d.ts +1 -7
- package/dist/esm/biz-components/Subscribe/index.js +1 -1
- package/dist/esm/biz-components/Subscribe/index.js.map +3 -3
- package/dist/esm/biz-components/Title/index.js +1 -1
- package/dist/esm/biz-components/Title/index.js.map +2 -2
- package/dist/esm/biz-components/Title/types.d.ts +1 -3
- package/dist/esm/biz-components/index.d.ts +0 -25
- package/dist/esm/biz-components/index.js +1 -1
- package/dist/esm/biz-components/index.js.map +3 -3
- package/dist/esm/components/button.js +1 -1
- package/dist/esm/components/button.js.map +2 -2
- package/dist/esm/components/container.js +1 -1
- package/dist/esm/components/container.js.map +2 -2
- package/dist/esm/components/dialog.d.ts +1 -3
- package/dist/esm/components/dialog.js +1 -1
- package/dist/esm/components/dialog.js.map +3 -3
- package/dist/esm/components/index.d.ts +0 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/index.js.map +2 -2
- package/dist/esm/helpers/utils.d.ts +0 -1
- package/dist/esm/helpers/utils.js +1 -1
- package/dist/esm/helpers/utils.js.map +3 -3
- package/dist/esm/stories/shelfDisplay.stories.js +1 -644
- package/dist/esm/stories/shelfDisplay.stories.js.map +2 -2
- package/dist/esm/stories/tabs.stories.js +1 -1
- package/dist/esm/stories/tabs.stories.js.map +3 -3
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/dist/tokens/base.css +1 -1
- package/package.json +1 -1
- package/style.css +0 -4
- package/dist/cjs/biz-components/AplusDesc/index.js +0 -2
- package/dist/cjs/biz-components/AplusDesc/index.js.map +0 -7
- package/dist/cjs/biz-components/DownLoad/index.js +0 -2
- package/dist/cjs/biz-components/DownLoad/index.js.map +0 -7
- package/dist/cjs/biz-components/Features/index.js +0 -2
- package/dist/cjs/biz-components/Features/index.js.map +0 -7
- package/dist/cjs/biz-components/FootCharger/index.js +0 -2
- package/dist/cjs/biz-components/FootCharger/index.js.map +0 -7
- package/dist/cjs/biz-components/GiftBox/index.js +0 -2
- package/dist/cjs/biz-components/GiftBox/index.js.map +0 -7
- package/dist/cjs/biz-components/GraphicMore/index.js +0 -2
- package/dist/cjs/biz-components/GraphicMore/index.js.map +0 -7
- package/dist/cjs/biz-components/HeaderNavigation/icons/Polygon.js +0 -2
- package/dist/cjs/biz-components/HeaderNavigation/icons/Polygon.js.map +0 -7
- package/dist/cjs/biz-components/Listing/ProductProvider.js +0 -2
- package/dist/cjs/biz-components/Listing/ProductProvider.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/types.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/types.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/types.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/types.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGridBox.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGridBox.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/types.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/types.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.js +0 -2
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/types.js +0 -2
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/types.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/const.js +0 -2
- package/dist/cjs/biz-components/Listing/const.js.map +0 -7
- package/dist/cjs/biz-components/Listing/hooks/use-options.js +0 -2
- package/dist/cjs/biz-components/Listing/hooks/use-options.js.map +0 -7
- package/dist/cjs/biz-components/Listing/hooks/use-variant-media.js +0 -2
- package/dist/cjs/biz-components/Listing/hooks/use-variant-media.js.map +0 -7
- package/dist/cjs/biz-components/Listing/hooks/use-variant.js +0 -2
- package/dist/cjs/biz-components/Listing/hooks/use-variant.js.map +0 -7
- package/dist/cjs/biz-components/Listing/hooks/useCopy.js +0 -2
- package/dist/cjs/biz-components/Listing/hooks/useCopy.js.map +0 -7
- package/dist/cjs/biz-components/Listing/index.js +0 -2
- package/dist/cjs/biz-components/Listing/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/types/graphql.js +0 -2
- package/dist/cjs/biz-components/Listing/types/graphql.js.map +0 -7
- package/dist/cjs/biz-components/Listing/types/product.js +0 -2
- package/dist/cjs/biz-components/Listing/types/product.js.map +0 -7
- package/dist/cjs/biz-components/Listing/types/productMetafields.d.js +0 -2
- package/dist/cjs/biz-components/Listing/types/productMetafields.d.js.map +0 -7
- package/dist/cjs/biz-components/Listing/types/type-helper.js +0 -2
- package/dist/cjs/biz-components/Listing/types/type-helper.js.map +0 -7
- package/dist/cjs/biz-components/Listing/types.js +0 -2
- package/dist/cjs/biz-components/Listing/types.js.map +0 -7
- package/dist/cjs/biz-components/Listing/utils/helper.js +0 -2
- package/dist/cjs/biz-components/Listing/utils/helper.js.map +0 -7
- package/dist/cjs/biz-components/Listing/utils/index.js +0 -2
- package/dist/cjs/biz-components/Listing/utils/index.js.map +0 -7
- package/dist/cjs/biz-components/NavigationSearch/index.js +0 -2
- package/dist/cjs/biz-components/NavigationSearch/index.js.map +0 -7
- package/dist/cjs/biz-components/NavigationSearch/types.js +0 -2
- package/dist/cjs/biz-components/NavigationSearch/types.js.map +0 -7
- package/dist/cjs/biz-components/SearchPage/index.js +0 -2
- package/dist/cjs/biz-components/SearchPage/index.js.map +0 -7
- package/dist/cjs/biz-components/SearchPage/types.js +0 -2
- package/dist/cjs/biz-components/SearchPage/types.js.map +0 -7
- package/dist/cjs/biz-components/SelectStore/index.js +0 -2
- package/dist/cjs/biz-components/SelectStore/index.js.map +0 -7
- package/dist/cjs/biz-components/Specs/dropdown.js +0 -3
- package/dist/cjs/biz-components/Specs/dropdown.js.map +0 -7
- package/dist/cjs/biz-components/Specs/index.js +0 -2
- package/dist/cjs/biz-components/Specs/index.js.map +0 -7
- package/dist/cjs/components/loadingDots.js +0 -42
- package/dist/cjs/components/loadingDots.js.map +0 -7
- package/dist/cjs/stories/aplusdesc.stories.js +0 -2
- package/dist/cjs/stories/aplusdesc.stories.js.map +0 -7
- package/dist/cjs/stories/download.stories.js +0 -2
- package/dist/cjs/stories/download.stories.js.map +0 -7
- package/dist/cjs/stories/features.stories.js +0 -2
- package/dist/cjs/stories/features.stories.js.map +0 -7
- package/dist/cjs/stories/footcharger.stories.js +0 -2
- package/dist/cjs/stories/footcharger.stories.js.map +0 -7
- package/dist/cjs/stories/giftbox.stories.js +0 -2
- package/dist/cjs/stories/giftbox.stories.js.map +0 -7
- package/dist/cjs/stories/graphicMore.stories.js +0 -2
- package/dist/cjs/stories/graphicMore.stories.js.map +0 -7
- package/dist/cjs/stories/selectstore.stories.js +0 -2
- package/dist/cjs/stories/selectstore.stories.js.map +0 -7
- package/dist/esm/biz-components/AplusDesc/index.js +0 -2
- package/dist/esm/biz-components/AplusDesc/index.js.map +0 -7
- package/dist/esm/biz-components/DownLoad/index.js +0 -2
- package/dist/esm/biz-components/DownLoad/index.js.map +0 -7
- package/dist/esm/biz-components/Features/index.js +0 -2
- package/dist/esm/biz-components/Features/index.js.map +0 -7
- package/dist/esm/biz-components/FootCharger/index.js +0 -2
- package/dist/esm/biz-components/FootCharger/index.js.map +0 -7
- package/dist/esm/biz-components/GiftBox/index.js +0 -2
- package/dist/esm/biz-components/GiftBox/index.js.map +0 -7
- package/dist/esm/biz-components/GraphicMore/index.js +0 -2
- package/dist/esm/biz-components/GraphicMore/index.js.map +0 -7
- package/dist/esm/biz-components/HeaderNavigation/icons/Polygon.js +0 -2
- package/dist/esm/biz-components/HeaderNavigation/icons/Polygon.js.map +0 -7
- package/dist/esm/biz-components/Listing/ProductProvider.js +0 -2
- package/dist/esm/biz-components/Listing/ProductProvider.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/types.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/types.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/types.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/types.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGridBox.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGridBox.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/types.js +0 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/types.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.js +0 -1
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/PurchaseBar/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/PurchaseBar/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/PurchaseBar/types.js +0 -1
- package/dist/esm/biz-components/Listing/components/PurchaseBar/types.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/const.js +0 -2
- package/dist/esm/biz-components/Listing/const.js.map +0 -7
- package/dist/esm/biz-components/Listing/hooks/use-options.js +0 -2
- package/dist/esm/biz-components/Listing/hooks/use-options.js.map +0 -7
- package/dist/esm/biz-components/Listing/hooks/use-variant-media.js +0 -2
- package/dist/esm/biz-components/Listing/hooks/use-variant-media.js.map +0 -7
- package/dist/esm/biz-components/Listing/hooks/use-variant.js +0 -2
- package/dist/esm/biz-components/Listing/hooks/use-variant.js.map +0 -7
- package/dist/esm/biz-components/Listing/hooks/useCopy.js +0 -2
- package/dist/esm/biz-components/Listing/hooks/useCopy.js.map +0 -7
- package/dist/esm/biz-components/Listing/index.js +0 -2
- package/dist/esm/biz-components/Listing/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/types/graphql.js +0 -2
- package/dist/esm/biz-components/Listing/types/graphql.js.map +0 -7
- package/dist/esm/biz-components/Listing/types/product.js +0 -2
- package/dist/esm/biz-components/Listing/types/product.js.map +0 -7
- package/dist/esm/biz-components/Listing/types/productMetafields.d.js +0 -2
- package/dist/esm/biz-components/Listing/types/productMetafields.d.js.map +0 -7
- package/dist/esm/biz-components/Listing/types/type-helper.js +0 -1
- package/dist/esm/biz-components/Listing/types/type-helper.js.map +0 -7
- package/dist/esm/biz-components/Listing/types.js +0 -1
- package/dist/esm/biz-components/Listing/types.js.map +0 -7
- package/dist/esm/biz-components/Listing/utils/helper.js +0 -2
- package/dist/esm/biz-components/Listing/utils/helper.js.map +0 -7
- package/dist/esm/biz-components/Listing/utils/index.js +0 -2
- package/dist/esm/biz-components/Listing/utils/index.js.map +0 -7
- package/dist/esm/biz-components/NavigationSearch/index.js +0 -2
- package/dist/esm/biz-components/NavigationSearch/index.js.map +0 -7
- package/dist/esm/biz-components/NavigationSearch/types.js +0 -2
- package/dist/esm/biz-components/NavigationSearch/types.js.map +0 -7
- package/dist/esm/biz-components/SearchPage/index.js +0 -2
- package/dist/esm/biz-components/SearchPage/index.js.map +0 -7
- package/dist/esm/biz-components/SearchPage/types.js +0 -2
- package/dist/esm/biz-components/SearchPage/types.js.map +0 -7
- package/dist/esm/biz-components/SelectStore/index.js +0 -2
- package/dist/esm/biz-components/SelectStore/index.js.map +0 -7
- package/dist/esm/biz-components/Specs/dropdown.js +0 -3
- package/dist/esm/biz-components/Specs/dropdown.js.map +0 -7
- package/dist/esm/biz-components/Specs/index.js +0 -2
- package/dist/esm/biz-components/Specs/index.js.map +0 -7
- package/dist/esm/components/loadingDots.js +0 -42
- package/dist/esm/components/loadingDots.js.map +0 -7
- package/dist/esm/stories/aplusdesc.stories.js +0 -2
- package/dist/esm/stories/aplusdesc.stories.js.map +0 -7
- package/dist/esm/stories/download.stories.js +0 -2
- package/dist/esm/stories/download.stories.js.map +0 -7
- package/dist/esm/stories/features.stories.js +0 -2
- package/dist/esm/stories/features.stories.js.map +0 -7
- package/dist/esm/stories/footcharger.stories.js +0 -2
- package/dist/esm/stories/footcharger.stories.js.map +0 -7
- package/dist/esm/stories/giftbox.stories.js +0 -2
- package/dist/esm/stories/giftbox.stories.js.map +0 -7
- package/dist/esm/stories/graphicMore.stories.js +0 -2
- package/dist/esm/stories/graphicMore.stories.js.map +0 -7
- package/dist/esm/stories/selectstore.stories.js +0 -2
- package/dist/esm/stories/selectstore.stories.js.map +0 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/biz-components/HeaderNavigation/icons/index.ts"],
|
|
4
|
-
"sourcesContent": ["import AnkerLogo from './AnkerLogo.js'\nimport LogoLine from './LogoLine.js'\nimport Menu from './Menu.js'\nimport Search from './Search.js'\nimport Cart from './Cart.js'\nimport Close from './Close.js'\nimport User from './User.js'\nimport RightArrow from './RightArrow.js'\nimport LeftArrow from './LeftArrow.js'\nimport DownArrow from './DownArrow.js'\
|
|
5
|
-
"mappings": "AAAA,OAAOA,MAAe,iBACtB,OAAOC,MAAc,gBACrB,OAAOC,MAAU,YACjB,OAAOC,MAAY,cACnB,OAAOC,MAAU,YACjB,OAAOC,MAAW,aAClB,OAAOC,MAAU,YACjB,OAAOC,MAAgB,kBACvB,OAAOC,MAAe,iBACtB,OAAOC,MAAe
|
|
6
|
-
"names": ["AnkerLogo", "LogoLine", "Menu", "Search", "Cart", "Close", "User", "RightArrow", "LeftArrow", "DownArrow"
|
|
4
|
+
"sourcesContent": ["import AnkerLogo from './AnkerLogo.js'\nimport LogoLine from './LogoLine.js'\nimport Menu from './Menu.js'\nimport Search from './Search.js'\nimport Cart from './Cart.js'\nimport Close from './Close.js'\nimport User from './User.js'\nimport RightArrow from './RightArrow.js'\nimport LeftArrow from './LeftArrow.js'\nimport DownArrow from './DownArrow.js'\n\nexport { AnkerLogo, Menu, Search, Cart, Close, User, RightArrow, LeftArrow, DownArrow, LogoLine }\n"],
|
|
5
|
+
"mappings": "AAAA,OAAOA,MAAe,iBACtB,OAAOC,MAAc,gBACrB,OAAOC,MAAU,YACjB,OAAOC,MAAY,cACnB,OAAOC,MAAU,YACjB,OAAOC,MAAW,aAClB,OAAOC,MAAU,YACjB,OAAOC,MAAgB,kBACvB,OAAOC,MAAe,iBACtB,OAAOC,MAAe",
|
|
6
|
+
"names": ["AnkerLogo", "LogoLine", "Menu", "Search", "Cart", "Close", "User", "RightArrow", "LeftArrow", "DownArrow"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{Fragment as te,jsx as e,jsxs as l}from"react/jsx-runtime";import ge,{forwardRef as Y,useCallback as U,useEffect as P,useImperativeHandle as he,useMemo as S,useRef as A,useState as M}from"react";import{Picture as V,Text as g,Button as B,Container as X,Link as F,Heading as le}from"../../components/index.js";import{withLayout as ye}from"../../shared/Styles.js";import{cn as k,atobID as xe}from"../../helpers/utils.js";import Ne,{useNavContext as _}from"./NavProvider.js";import{HeaderNavigationMenu as R,HeaderNavigationBlockType as j,HeaderNavigationActionBlockType as O}from"./types.js";import"react-responsive";import{debounce as ke,throttle as we}from"es-toolkit";import{useGSAP as ne}from"@gsap/react";import{gsap as ae}from"gsap";import{WithSidebar as oe,WithSupports as se,WithMulticol as re,WithGroupCategory as ie}from"./withCategory.js";import{Menu as Ce,Close as ce,User as Se,RightArrow as Me,LeftArrow as De,DownArrow as Z,Polygon as Le}from"./icons/index.js";import Ee from"../NavigationSearch/index.js";const Pe=Y((t,a)=>{const{data:{headerNavigation:n}={},buildProps:s,event:o,profile:m,theme:v="light",searchResult:i,onSearch:d,isSearching:x,keywords:D}=t,L=A(null),[c,p]=M(!1),[u,b]=M(!1),[r,f]=M(!1),[h,w]=M(!1),C=A(null),H=()=>{const N=document?.querySelector("body")?.offsetWidth||0;w(N<=1440)};P(()=>(H(),window.addEventListener("resize",H),()=>{window.removeEventListener("resize",H)}),[]),he(a,()=>C.current),P(()=>{let N=0,G=0;const I=we(z=>{const J=G-z;J>0?(N+=J,N>=300&&(b(!1),N=0)):b(z>300),f(z>30),G=z},200),K=()=>{let z=0;document?.documentElement&&document?.documentElement?.scrollTop?z=document?.documentElement.scrollTop:document?.body&&(z=document?.body.scrollTop),I(z)};return window.addEventListener("scroll",K),()=>window.removeEventListener("scroll",K)},[]),P(()=>{o&&(o.search=()=>p(!0))},[o]),ne(()=>{L?.current&&c&&ae.fromTo(L.current,{height:0},{height:"auto",duration:.3})},[c]),P(()=>{document.documentElement.style.overflow=c?"hidden":"auto"},[c]);const W=S(()=>n?.headerBar?.actions?.find(N=>N?.blockType===O.Search)?.searchBar?.[0]||{},[n]);return e(Ne,{buildProps:s,profile:m,isMobile:h,event:o,payloadData:n,children:e("header",{"data-ui-component-id":"HeaderNavigation",className:"sticky top-0 z-50",ref:C,children:l("div",{className:k(v==="light"?"text-black":"text-white",{"translate-y-[-100%] transition-transform duration-500 ease-in-out":u,"!bg-white transition-all duration-500 ease-in-out":r},{"hover:!text-black":v==="dark","!text-black":r}),onClick:()=>f(!0),children:[!h&&e(ze,{data:n,onNavItemClick:()=>f(!0)}),h&&e(Re,{data:n}),c&&l("div",{className:"absolute z-[60] top-0 left-0 w-full bg-black/70 flex flex-col",style:{height:`calc(100dvh - ${C?.current?.getBoundingClientRect()?.top}px)`},children:[e("div",{ref:L,className:k("overflow-y-auto",{}),children:e(Ee,{data:W,keywords:D,isSearching:x,searchResult:i,onSearch:N=>{d?.(N)},onClose:()=>{d?.(),p(!1)}})}),e("div",{className:"flex-1 bg-transparent",onClick:()=>p(!1)})]})]})})})}),ze=Y((t,a)=>{const{data:n,onNavItemClick:s}=t,{event:o}=_(),[m,v]=M(!1),i=S(()=>ie(n?.categories?.filter(y=>y?.pcShow)),[n]),[d,x]=M(null),[D,L]=M([]),c=A(null),[p,u]=M(!1),b=A(null),r=A(null),f=A(i.map(y=>Array(y?.length||0).fill(null)));P(()=>{i?.length&&L(i?.map((y,E)=>y?.map((T,$)=>({groupIndex:E,index:$,open:!1}))))},[i]);const h=S(()=>{let y=null;for(const E of D){for(const T of E)if(T.open){y=T;break}if(y)break}return y},[D]);P(()=>{document.documentElement.style.overflow=h?.open||p?"hidden":"auto"},[h?.open,p]);const w=(y,E,T)=>{d?.components?.[0]?.blockType===j.Links?d?.components?.[0]?.url&&window.open(d?.components?.[0]?.url):(y.stopPropagation(),s?.(),x(i[E][T]),L($=>$.map(q=>q.map(Q=>Q.groupIndex===E&&Q.index===T?{...Q,open:!Q.open}:{...Q,open:!1}))))},C=()=>{L(y=>y.map(E=>E.map(T=>({...T,open:!1}))))},H=S(()=>{if(d)return d?.components?.[0]?.blockType},[d]),W=oe(He,d),N=re(Te,d),G=se(Be,{categoriesItem:d,currentNavItemRef:f.current?.[h?.groupIndex||0]?.[h?.index||0]}),I=S(()=>{switch(H){case j.Sidebar:return e(W,{});case j.Supports:return e(G,{});case j.Multicol:return e(N,{});default:return null}},[H,d]),K=S(()=>n?.headerBar?.actions?.filter(y=>y?.pcShow),[n]),z=S(()=>K?.find(y=>y?.blockType===O.Profile),[K]),J=U(()=>{u(y=>!y)},[]);return P(()=>{if(c?.current){const y=c.current;return y.addEventListener("click",J),()=>{y.removeEventListener("click",J)}}},[J]),ne(()=>{h?.open&&ae.fromTo(r?.current,{height:0},{height:"auto"})},[h?.open]),l(X,{className:"relative h-[96px]",children:[l("div",{ref:b,onClick:C,className:"flex h-full flex-col justify-end gap-4",children:[l("div",{className:"flex items-center justify-between",children:[e(be,{}),e(fe,{ref:c,actions:K,activeStatus:p})]}),e("div",{className:"flex justify-between",children:i?.map((y,E)=>e("div",{className:"flex gap-3",children:y?.map((T,$)=>e("div",{ref:q=>{f.current[E][$]=q},className:"group cursor-pointer",children:l("div",{className:"relative",children:[l("div",{className:"flex items-center gap-1 pb-4",onClick:q=>w(q,E,$),children:[e(g,{html:T.text,className:"text-sm font-bold leading-[1.4]"}),e(Z,{className:k("opacity-0 size-4 group-hover:opacity-100 transition-opacity duration-500",{"rotate-180":h?.groupIndex===E&&h?.index===$,"opacity-100":m&&h?.groupIndex===E&&h?.index===$})})]}),e("div",{className:k("absolute bottom-0 left-0 h-[2px] w-0 bg-[#1D1D1F] transition-all duration-500",{"w-[calc(100%-20px)]":h?.groupIndex===E&&h?.index===$})})]})},T.id))},`groupCategory-${E}`))})]}),l("div",{className:k("border-t border-b-[#E4E5E6] absolute left-0 top-full z-[999] flex w-full flex-col bg-black/70 overflow-hidden",{hidden:!(h?.open&&d)}),onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),style:{height:`calc(100dvh - ${b?.current?.getBoundingClientRect()?.bottom}px)`},children:[e("div",{ref:r,className:k("relative z-50",{"overflow-hidden":H!==j.Supports}),children:I}),e("div",{className:"flex-1 bg-transparent",onClick:C})]}),p&&l("div",{className:"absolute left-0 z-[999] flex w-full bg-black/70 h-[100dvh] top-full",children:[l("div",{className:"absolute max-w-[272px] bg-white p-4",style:{right:`calc(100% - ${c?.current?.getBoundingClientRect()?.right}px)`,top:`calc(12px - ${c?.current?.getBoundingClientRect()?.top}px)`},children:[e(Le,{className:"absolute -top-2 text-white right-[46px] z-30"}),e(g,{html:z?.benefits_title,className:"text-sm font-bold leading-[1.4]"}),e("div",{className:"mt-2 flex flex-col gap-1",children:z?.benefits?.map(y=>l("div",{className:"flex items-center gap-[6px]",children:[e(V,{source:y.benefitIcon?.url,className:"size-4",alt:y.benefit,width:16,height:16}),e(g,{html:y.benefit,className:"text-sm font-bold leading-[1.4]"})]},y.id))}),l("div",{className:"mt-4 flex items-center gap-2",children:[e(B,{variant:"secondary",size:"lg",onClick:()=>o?.join?.(),children:e(g,{html:z?.primaryButton||"Join Now",className:"font-bold"})}),e(B,{variant:"primary",size:"lg",onClick:()=>o?.login?.(),children:e(g,{html:z?.secondaryButton||"Log In",className:"font-bold"})})]})]}),e("div",{className:"flex-1 bg-transparent",onClick:()=>u(!1)})]})]})}),He=ge.memo(({sidebarCategoriesMetadata:t,seriesMetadata:a})=>{const{buildProps:n}=_(),[s,o]=M([]),[m,v]=M(-1),i=A(null),d=U(()=>{const c=t?.subcategories;if(!c?.length)return;const p=c.findIndex(r=>!!r?.subSubCategories),u=c.findIndex(r=>!r?.subSubCategories),b=c.map((r,f)=>({index:f,open:p===f||u===f}));o(b)},[t]);P(()=>{d()},[d]);const x=S(()=>{const c=t?.subcategories?.[s?.find(u=>u.open)?.index||0],p=a?.find(u=>u?.label?.toLowerCase()===c?.label?.toLowerCase())||{};if(c?.collections){const u=n?.categories?.[c?.collections]||{};return{label:u?.name,isCollection:!0,banner:p?.banner,series:[{products:u?.products}]}}else if(c?.subSubCategories){const u=c?.subSubCategories?.[m],b=a?.find(r=>r?.label?.toLowerCase()===u?.label?.toLowerCase())||{};if(u?.collections){const r=n?.categories?.[u?.collections]||{};return{label:r?.name,isCollection:!0,banner:b?.banner,series:[{products:r?.products}]}}else return b}else return p},[t,s,m,a]),D=U((c,p)=>{if(p?.subSubCategories?.length>0?v(0):v(-1),p?.subSubCategories?.length>0)o(u=>u.map(b=>b.index===c?{...b,open:!0}:{...b,open:!1}));else{const b=t?.subcategories?.findIndex(r=>!!r?.subSubCategories);o(r=>r.map(f=>({...f,open:f.index===c||f.index===b})))}},[t,d]),L=(c,p)=>{o(u=>u.map(b=>b.index===c?{...b,open:!0}:{...b,open:!1})),v(p)};return l(X,{childClassName:"lg-desktop:gap-12 flex bg-white gap-8",children:[l("div",{className:"lg-desktop:basis-[356px] flex basis-[284px] flex-col gap-4 py-4",style:{userSelect:"none"},ref:i,children:[e("div",{className:"desktop:h-[416px] flex flex-col overflow-y-auto",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:t?.subcategories?.map((c,p)=>{const u=Array.isArray(c?.subSubCategories)&&c?.subSubCategories?.length>0;return l("div",{children:[l("div",{className:k("flex cursor-pointer items-center justify-between",{"bg-[#F5F5F7]":!u&&s?.find(b=>b.index===p)?.open}),onClick:()=>{D(p,c)},children:[e(g,{html:c.label,className:"p-4 text-sm font-bold leading-[1.4]"}),u&&e(Z,{className:k("size-4",{"rotate-180":s?.find(b=>b.index===p)?.open})})]}),s?.find(b=>b.index===p)?.open&&e("div",{className:"flex flex-col",children:c.subSubCategories?.map((b,r)=>e(g,{html:b.label,onClick:()=>L(p,r),className:k("cursor-pointer hover:bg-[#F5F5F7] px-6 py-4 text-sm font-bold leading-[1.4] text-[#6D6D6F]",{"bg-[#F5F5F7]":m===r})},`subSubItem-${p}-${r}`))})]},`subcategoryItem-${p}`)})}),t&&e("div",{className:"flex",children:l("div",{className:"flex flex-col gap-4",children:[t?.primary&&e(B,{as:"a",href:t?.primary?.url,variant:"primary",size:"lg",className:"text-sm lg-desktop:text-base",children:t?.primary?.label}),t?.secondary&&e(B,{as:"a",href:t?.secondary?.url,variant:"link",size:"lg",className:"justify-start !p-0 text-sm lg-desktop:text-base",children:t?.secondary?.label})]})})]}),l("div",{className:"flex-1 py-4",children:[Reflect.ownKeys(x).length>0&&l("div",{className:"mb-4 flex items-center justify-between",children:[l("div",{className:"flex items-center gap-2",children:[e(g,{html:x?.label,className:"text-xl lg-desktop:text-2xl font-bold leading-[1.4]"}),x?.primary&&e(B,{as:"a",href:x?.primary?.url,variant:"link",size:"lg",className:"justify-start !p-0 text-sm lg-desktop:text-base font-bold leading-[1.2] no-underline",children:x?.primary?.label})]}),e(F,{href:x?.guide?.url,className:"text-sm lg-desktop:text-base leading-[1.2] text-[#6D6D6F]",children:x?.guide?.label})]}),e("div",{className:"flex flex-col gap-4 overflow-y-auto h-[548px]",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:x?.series?.map((c,p)=>l("div",{children:[c.label&&e(g,{html:c.label,className:"text-sm mb-2 font-bold leading-[1.4] text-[#6D6D6F]"}),l("div",{className:"grid grid-cols-3 gap-4",children:[!!x?.banner&&x?.isCollection&&e(F,{asChild:!x?.banner?.href,href:x?.banner?.href,children:l("div",{className:"relative [&_img]:hover:scale-105 [&_img]:hover:transition-all [&_img]:hover:duration-300",children:[e(V,{source:x?.banner?.imageUrl,className:"h-[114px] laptop:h-[120px]",imgClassName:"object-cover h-full"}),l("div",{className:"absolute bottom-0 left-0 right-0 p-4",children:[e(le,{size:2,html:x?.banner?.title||"Buy in Guide",className:"font-bold text-white"}),e(g,{html:x?.banner?.desc||"20.000mAh",className:"text-sm text-white font-bold"})]})]})}),c.products?.map((u,b)=>e(de,{product:u,isCollection:x?.isCollection},`seriesProductItem-${b}`))]})]},`seriesItem-${p}`))})]})]})}),Te=({multicolMetadata:t})=>{const a=A(null);return e("div",{ref:a,children:e(X,{childClassName:"bg-white",className:"h-full",children:e("div",{className:"flex gap-4 py-4",children:t?.map((n,s)=>e("div",{className:"w-1/4",children:e(ue,{item:n})},`multicolItem-${n?.label}-${s}`))})})})},Be=({supportsMetadata:t,currentNavItemRef:a})=>{const n=A(null),[s,o]=M(null),[m,v]=M(0);P(()=>{if(n?.current){const d=n?.current?.getBoundingClientRect();v(d.height)}},[n]);const i=ke(()=>{if(a){const d=a.getBoundingClientRect();o(d)}},500);return P(()=>(i(),window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}),[i]),P(()=>{if(a){const d=a.getBoundingClientRect();o(d)}},[a]),e("div",{className:"absolute top-0 h-full bg-white transition-all duration-500 overflow-hidden",style:{right:`calc(100% - ${s?.right}px)`,height:m},children:e("div",{ref:n,className:"p-4",children:t?.map(d=>e("div",{className:"py-2",children:e(F,{href:d.url,className:"text-sm font-bold leading-[1.4] no-underline",children:d.label})},d.id))})})},de=({product:t,isCollection:a})=>{const{buildProps:n}=_();let s=a?t:n?.products?.find(i=>i.handle===t.handle);const o=s?.variants?.find(i=>i.sku===t.sku)||s?.variants?.[0],m=S(()=>`/products/${s?.handle}?variant=${xe(o?.id)}`,[s?.handle,o?.id]),v=S(()=>s?.tags?.filter?.(i=>i?.startsWith?.("CLtag"))?.map?.(i=>i?.replace?.("CLtag:",""))?.slice?.(0,2),[s?.tags]);return o?.availableForSale?l("div",{className:"flex shrink-0 items-center gap-4 bg-[#F5F5F7] px-4 py-3 [&_img]:hover:scale-105",children:[e("div",{className:"shrink-0",children:e(V,{source:`${o?.image?.url||t?.images?.[0]?.url}}`,width:90,height:90,className:"size-[96px]",imgClassName:"object-contain h-full"})}),l("div",{className:"relative",children:[Array.isArray(v)&&v?.map(i=>e(g,{as:"p",html:i,className:"text-brand-0 mb-1 inline-block h-[24px] rounded-full border-[1.6px] border-[#00BEFA] px-[6px] text-sm font-bold !leading-[24px]"})),e(F,{href:m,className:"no-underline hover:text-current",children:e(g,{className:"lg-desktop:h-[44px] lg-desktop:text-base line-clamp-2 h-[40px] text-sm font-bold leading-[1.4]",html:s?.title||t?.name})}),t?.desc&&e(g,{as:"p",html:t?.desc,className:"lg-desktop:text-sm line-clamp-1 mt-1 text-xs font-bold leading-[1.4] text-[#6D6D6F]"})]})]}):null},ue=({item:t,allPicture:a})=>l(te,{children:[t?.columns&&l(te,{children:[e(g,{html:t.label,as:"div",className:"my-2 text-sm font-bold leading-[1.4] text-[#6D6D6F]"}),e("div",{className:"mt-2 flex flex-col",children:t.columns?.map(n=>l("div",{className:"py-2 flex items-center gap-1",children:[e(F,{href:n.url,className:"text-sm font-bold leading-[1.4] no-underline",children:n.label}),n?.badge&&e(g,{as:"p",html:n?.badge||"badge",className:"text-sm font-bold !leading-[24px] text-brand-0 h-[24px] rounded-full border-[1.6px] border-[var(--brand-color-0)] px-[6px]"})]},n.label))})]}),t?.imageUrl&&l("div",{className:k("laptop:h-[280px] desktop:h-[224px] lg-desktop:h-[280px] h-[240px] max-w-[358px] tablet:max-w-[346px] laptop:max-w-[440px] desktop:w-full relative overflow-hidden",{"tablet:max-w-none laptop:max-w-none":a}),children:[e(V,{source:t.imageUrl,width:404,height:280,className:"size-full",imgClassName:"object-cover h-full hover:scale-105 transition-all duration-300"}),l(F,{href:t.url,className:"absolute bottom-4 left-4 z-10 flex flex-col justify-end no-underline",children:[e(g,{html:t.title,className:k("lg-desktop:text-2xl text-xl font-bold leading-[1.2] text-white",{"text-black":t?.theme==="dark"})}),e(g,{html:t.subtitle,className:k("text-sm font-bold leading-[1.4] text-white",{"text-black":t?.theme==="dark"})})]})]})]}),Re=Y(({data:t},a)=>{const n=S(()=>ie(t?.categories?.filter(N=>N?.mobileShow)),[t]),{currentMenu:s,setCurrentMenu:o,subSubCategory:m}=_(),[v,i]=M(!1),[d,x]=M(0),[D,L]=M(null),c=A(null);P(()=>{if(c?.current&&v){const N=c?.current?.getBoundingClientRect();x(window?.innerHeight-(N?.bottom||0))}},[v]),ne(()=>{ae.fromTo(c.current,{height:0},{height:d,duration:.3})},[d]),P(()=>{document.documentElement.style.overflow=v?"hidden":"auto"},[v]);const p=S(()=>D?.components?.[0]?.blockType,[D]),u=se(Fe,{categoriesItem:D}),b=oe($e,D),r=re(je,D),f=S(()=>{switch(p){case j.Sidebar:return e(b,{});case j.Supports:return e(u,{});case j.Multicol:return e(r,{});default:return null}},[p,D,u]),h=U(()=>{i(!1),x(0),o&&o(R.Primary)},[i,x,o]),w=S(()=>t?.headerBar?.actions?.filter(N=>N?.mobileShow&&N?.blockType!==O.Profile),[t]),C=S(()=>t?.headerBar?.actions?.find(N=>N?.mobileShow&&N?.blockType===O.Profile)||{},[t]),H=S(()=>{switch(s){case R.Primary:return e(Ie,{actions:w,menuOpen:v,onMenuOpenClose:()=>{i(!1),x(0)},onMenuOpenClick:()=>i(!0)});case R.Secondary:return e(ve,{title:D?.text,onMenuOpenClose:h,onMenuBackClick:()=>o?.(R.Primary)});case R.Third:return e(ve,{title:m?.label,onMenuOpenClose:h,onMenuBackClick:()=>o?.(R.Secondary)});default:return null}},[v,s,o,D,w,m,h]),W=U((N,G)=>{const I=Array.isArray(n)?Array.isArray(n[N])?n[N][G]:{}:{};L(I),I?.components?.[0]?.blockType===j.Links?I?.components?.[0]?.url&&window.open(I?.components?.[0]?.url):o?.(R.Secondary)},[n,o]);return l(X,{className:"relative h-[52px]",children:[H,v&&e("div",{ref:c,className:"absolute left-0 top-full border-t border-[#E5E5E7] z-[999] w-full overflow-y-auto bg-white",style:{height:d},children:s===R.Primary?e(Ae,{categories:n,onPrimaryMenuClick:W,profileAction:C}):f})]})}),Ae=({categories:t,onPrimaryMenuClick:a,profileAction:n})=>l("div",{className:"flex h-full flex-col justify-between",children:[e("div",{className:"tablet:px-8 laptop:px-16 p-4",children:t?.map((s,o)=>l("div",{className:"",children:[s?.map((m,v)=>e(ee,{label:m.text,onClick:()=>a(o,v),icon:m.components?.[0]?.icon},m.id)),e("div",{className:k("my-2 h-px w-full bg-[#E5E5E7]",{hidden:o===t.length-1})})]},`groupCategory-${o}`))}),e(Oe,{profileAction:n})]}),$e=({sidebarCategoriesMetadata:t,seriesMetadata:a})=>{const{currentMenu:n,setCurrentMenu:s,subSubCategory:o,setSubSubCategory:m,setCurrentSeriesMetadata:v,currentSeriesMetadata:i,buildProps:d}=_(),[x,D]=M([]),[L,c]=M([]);P(()=>{t?.subcategories?.length&&D(t?.subcategories?.map((r,f)=>({index:f,open:!1})))},[t]),P(()=>{o?.subSubCategories?.length&&c(o?.subSubCategories?.map((r,f)=>({index:f,open:f===0})))},[o]);const p=U((r,f)=>{s&&s(R.Third),m?.(r);const h=a?.find(w=>f!==void 0?r?.subSubCategories?.[f]?.label?.toLowerCase()===w.label?.toLowerCase():r?.label?.toLowerCase()===w.label?.toLowerCase())||{};if(r?.collections){const w=d?.categories?.[r?.collections]||{};v?.({label:w?.name||r?.label,isCollection:!0,banner:h?.banner,series:[{products:w?.products}]})}else v?.(h)},[a,t,s,m,v]),u=S(()=>a?.find(r=>!!r?.guide)?.guide,[a,t]);return S(()=>{switch(n){case R.Secondary:return l("div",{className:"tablet:px-8 laptop:px-16 flex h-full flex-col justify-between tablet:justify-start tablet:gap-16 p-4",children:[e("div",{children:t?.subcategories?.map((r,f)=>e("div",{children:e(ee,{label:r?.label,active:x.find(h=>h.index===f)?.open,onClick:()=>{p(r)}})},`${r.label}-${f}`))}),l("div",{className:"tablet:items-start flex flex-col items-center gap-4",children:[t?.primary&&e(B,{as:"a",href:t?.primary?.url,variant:"primary",size:"lg",className:"tablet:w-auto w-full text-base",children:t?.primary?.label}),t?.secondary&&e(B,{as:"a",href:t?.secondary?.url,variant:"link",size:"lg",className:"tablet:w-auto tablet:px-0 w-full py-0 text-base",children:t?.secondary?.label})]})]});case R.Third:return l("div",{className:"tablet:px-8 laptop:px-16 p-4",children:[o?.subSubCategories?o?.subSubCategories?.map((r,f)=>{const h=a?.find(C=>C.label.toLowerCase()===r?.label?.toLowerCase())||{};let w={};if(r?.collections){const C=d?.categories?.[r?.collections]||{};w={label:C?.name||r?.label,isCollection:!0,banner:h?.banner,series:[{products:C?.products}]}}else w=h;return l("div",{children:[Reflect.ownKeys(r).length>0&&e(me,{matchSeriesMetadata:w,onSubSubCategoryItemClick:()=>c(C=>C.map((H,W)=>({...H,open:W===f}))),expanded:!!L?.find(C=>C.index===f)?.open}),L?.find(C=>C.index===f)?.open&&l(te,{children:[e(pe,{matchSeriesMetadata:w}),w?.primary&&e("div",{className:"text-center my-4",children:e(B,{as:"a",href:w?.primary?.url,className:"text-base no-underline leading-[1.2]",variant:"secondary",size:"base",children:w?.primary?.label})})]})]},`${r.label}-${f}`)}):l(te,{children:[Reflect.ownKeys(i).length>0&&e(me,{matchSeriesMetadata:i}),e(pe,{matchSeriesMetadata:i}),i?.primary&&e("div",{className:"text-center my-4 ",children:e(B,{as:"a",href:i?.primary?.url,variant:"secondary",size:"base",className:"text-base no-underline leading-[1.2]",children:i?.primary?.label})})]}),u&&e(F,{href:u?.url,children:e("div",{className:"mt-4",children:e(g,{html:u?.label,className:"text-sm font-bold leading-[1.2] text-[#6D6D6F]"})})})]});default:return null}},[n,t,s,a,x,L,m,o,v,i])},me=({matchSeriesMetadata:t,onSubSubCategoryItemClick:a,expanded:n})=>l("div",{className:"tablet:pt-0 py-4 flex items-center justify-between",onClick:a,children:[t?.label&&e(g,{html:t?.label,className:"text-sm font-bold leading-[1.4]"}),a&&e(Z,{className:k("size-5",{"rotate-180":n})})]}),pe=({matchSeriesMetadata:t})=>e("div",{className:"flex flex-col gap-2 laptop:gap-3",children:!!t?.series?.length&&t?.series?.map((a,n)=>l("div",{children:[a.label&&e(g,{html:a.label,className:"text-sm mb-2 font-bold leading-[1.4] text-[#3D3D3F]"}),l("div",{className:"laptop:grid-cols-3 laptop:gap-4 tablet:grid tablet:grid-cols-2 tablet:gap-3 flex flex-col gap-2",children:[!!t?.banner&&t?.isCollection&&e(F,{asChild:!t?.banner?.href,href:t?.banner?.href,children:l("div",{className:"relative [&_img]:hover:scale-105 [&_img]:hover:transition-all [&_img]:hover:duration-300",children:[e(V,{source:t?.banner?.imageUrl,className:"h-[114px] laptop:h-[120px]",imgClassName:"object-cover h-full"}),l("div",{className:"absolute bottom-0 left-0 right-0 p-4",children:[e(le,{size:2,html:t?.banner?.title||"Buy in Guide",className:k("font-bold text-white",{"text-black":t?.banner?.theme==="dark"})}),e(g,{html:t?.banner?.desc||"20.000mAh",className:k("text-sm text-white font-bold",{"text-black":t?.banner?.theme==="dark"})})]})]})}),a.products?.map((s,o)=>e(de,{product:s,isCollection:t?.isCollection},`seriesProductItem-${n}-${o}`))]})]},`seriesItem-${n}`))}),Fe=({supportsMetadata:t})=>e("div",{className:"tablet:px-8 laptop:px-16 p-4",children:t?.map(a=>e(ee,{href:a.url,label:a.label,onClick:()=>{}},a.id))}),je=({multicolMetadata:t})=>{const a=S(()=>!t?.some(n=>!!n.columns),[t]);return e("div",{className:k("tablet:py-4 tablet:px-8 laptop:px-16 flex flex-col gap-4 tablet:gap-6 p-4",{"tablet:grid tablet:grid-cols-2 tablet:gap-3 laptop:gap-4":a}),children:t?.map((n,s)=>e("div",{children:e(ue,{item:n,allPicture:a})},`multicolItem-${n?.label}-${s}`))})},Oe=({profileAction:t})=>{const[a,n]=M(!1),{profile:s,event:o}=_();return l("div",{className:k("tablet:px-8 laptop:px-16 bg-[#F5F5F7] px-4 py-6",{"p-4":a}),children:[l("div",{className:"flex items-center justify-between",onClick:()=>n(!a),children:[l("div",{className:"flex items-center gap-[14px]",children:[e("div",{className:"flex size-[40px] shrink-0 items-center justify-center rounded-full bg-white",children:e(Se,{})}),e(g,{html:s?.nick_name||t?.welcome,className:"text-base font-bold leading-[1.4]"})]}),e(Z,{className:k("size-5 laptop:size-4",{"rotate-180":a})})]}),s?.email&&e("div",{className:"mt-4",children:t?.profiles?.map(m=>e(ee,{label:m?.title,href:m?.url},m.id))}),a&&!s?.email&&l("div",{className:"mt-4",children:[e(g,{html:t?.benefits_title,className:"text-sm font-bold leading-[1.4]"}),e("div",{className:"mt-2 flex flex-col gap-1",children:t?.benefits?.map(m=>l("div",{className:"flex items-center gap-[6px]",children:[e(V,{source:m.benefitIcon?.url,className:"size-4",alt:m.benefit,width:16,height:16}),e(g,{html:m.benefit,className:"text-sm font-bold leading-[1.4]"})]},m.id))})]}),l("div",{className:"mt-4 flex items-center gap-3",children:[e(B,{className:"tablet:flex-none flex-1",variant:"secondary",size:"base",onClick:()=>o?.join?.(),children:e(g,{html:t?.primaryButton||"Join Now",className:"text-sm font-bold leading-[1.4]"})}),e(B,{className:"tablet:flex-none flex-1",variant:"primary",size:"base",onClick:()=>o?.login?.(),children:e(g,{html:t?.secondaryButton||"Log In",className:"text-sm font-bold leading-[1.4]"})})]})]})},Ie=({menuOpen:t,onMenuOpenClose:a,onMenuOpenClick:n,actions:s})=>l("div",{className:"flex h-full items-center justify-between gap-4",children:[e(be,{}),l("div",{className:"desktop:gap-6 flex items-center gap-4",children:[e(fe,{actions:s}),t?e(ce,{className:"size-5",onClick:()=>a()}):e(Ce,{className:"size-5",onClick:()=>n()})]})]}),be=()=>{const{payloadData:t,isMobile:a}=_();return e("div",{className:"[&>svg]:w-full",dangerouslySetInnerHTML:{__html:a?t?.headerBar?.mobileLogo:t?.headerBar?.desktopLogo}})},fe=Y(({actions:t,activeStatus:a=!1},n)=>{const{event:s}=_(),[o,m]=M(null),v=U((i,d)=>{switch(m(d),i?.blockType){case O.Search:s?.search?.();break;case O.Cart:s?.cart?.();break;case O.Profile:s?.profile?.();break;case O.Livestream:s?.livestream?.();break;default:return()=>{}}},[s]);return e("div",{className:"desktop:gap-6 flex items-center gap-4",children:Array.isArray(t)&&t?.map((i,d)=>e("div",{ref:i.blockType===O.Profile?n:null,onClick:()=>v(i,d),children:e(g,{html:i.icon,className:k("cursor-pointer size-5",{"text-brand-0":a&&o===d})})},i.id))})}),ve=({title:t,onMenuOpenClose:a,onMenuBackClick:n})=>l("div",{className:"flex h-full items-center gap-3",children:[e(De,{className:"size-5",onClick:()=>n()}),e(g,{html:t,className:"flex-1 text-center text-base font-bold leading-[1.4]"}),e(ce,{className:"size-5",onClick:()=>a()})]}),ee=({label:t,href:a,onClick:n,active:s,icon:o})=>e("div",{className:"flex cursor-pointer items-center justify-between py-4",onClick:n,children:l(F,{href:a,asChild:!a,className:"flex w-full items-center justify-between no-underline",children:[l("div",{className:"flex items-center gap-4",children:[e(g,{html:t,className:k("text-sm font-bold leading-[1.4]",{underline:o})}),o&&e(g,{html:o})]}),e(Me,{className:k("size-5 laptop:size-4",{"rotate-90":s})})]})});var at=ye(Pe);export{at as default};
|
|
1
|
+
import{Fragment as de,jsx as e,jsxs as l}from"react/jsx-runtime";import{forwardRef as W,useCallback as G,useEffect as C,useImperativeHandle as me,useMemo as h,useRef as $,useState as w}from"react";import{Picture as J,Text as p,Button as S,Container as K,Link as T}from"../../components/index.js";import{withLayout as ue}from"../../shared/Styles.js";import{cn as E,atobID as pe}from"../../helpers/utils.js";import fe,{useNavContext as A}from"./NavProvider.js";import{HeaderNavigationMenu as D,HeaderNavigationBlockType as j,HeaderNavigationActionBlockType as R}from"./types.js";import{useMediaQuery as be}from"react-responsive";import{debounce as ve,throttle as ge}from"es-toolkit";import{useGSAP as Q}from"@gsap/react";import{gsap as V}from"gsap";import{WithSidebar as X,WithSupports as Z,WithMulticol as ee,WithGroupCategory as te}from"./withCategory.js";import{Menu as xe,Close as ae,User as ye,RightArrow as le,LeftArrow as he,DownArrow as ne,LogoLine as Ne}from"./icons/index.js";const ke=W((t,n)=>{const{data:{headerNavigation:a}={},buildProps:i,event:s,profile:o,theme:u="light"}=t,[f,N]=w(!1),[g,r]=w(!1),[c,d]=w(!1),b=$(null),v=be({query:"(max-width: 1440px)"});return C(()=>{N(v)},[v]),me(n,()=>b.current),C(()=>{let H=0,B=0;const I=ge(k=>{const z=B-k;z>0?(H+=z,H>=300&&(r(!1),H=0)):r(k>300),d(k>24),B=k},200),P=()=>{let k=0;document?.documentElement&&document?.documentElement?.scrollTop?k=document?.documentElement.scrollTop:document?.body&&(k=document?.body.scrollTop),I(k)};return window.addEventListener("scroll",P),()=>window.removeEventListener("scroll",P)},[]),e(fe,{buildProps:i,profile:o,isMobile:f,event:s,payloadData:a,children:e("header",{"data-ui-component-id":"HeaderNavigation",className:"sticky top-0 z-50",ref:b,children:l("div",{className:E("border-b border-b-gray-200",u==="light"?"text-black":"text-white",{"translate-y-[-100%] transition-transform duration-500 ease-in-out":g,"!bg-white transition-all duration-500 ease-in-out":c},{"hover:!text-black":u==="dark","!text-black":c}),children:[!f&&e(we,{data:a}),f&&e(Se,{data:a})]})})})}),we=W((t,n)=>{const{data:a}=t,{event:i}=A(),s=h(()=>te(a?.categories),[a]),[o,u]=w(null),[f,N]=w([]),g=$(null),[r,c]=w(!1),d=$(null),b=$(s.map(m=>Array(m?.length||0).fill(null)));C(()=>{s?.length&&N(s?.map((m,y)=>m?.map((M,L)=>({groupIndex:y,index:L,open:!1}))))},[s]);const v=h(()=>{let m=null;for(const y of f){for(const M of y)if(M.open){m=M;break}if(m)break}return m},[f]);C(()=>{},[v]);const H=(m,y,M)=>{m.stopPropagation(),u(s[y][M]),N(L=>L.map(_=>_.map(U=>U.groupIndex===y&&U.index===M?{...U,open:!U.open}:{...U,open:!1})))},B=()=>{N(m=>m.map(y=>y.map(M=>({...M,open:!1}))))},I=h(()=>{if(o)return o?.components?.[0]?.blockType},[o]),P=X(Me,o),k=Z(De,{categoriesItem:o,currentNavItemRef:b.current?.[v?.groupIndex||0]?.[v?.index||0]}),z=ee(Ce,o),Y=h(()=>{switch(I){case j.Sidebar:return e(P,{});case j.Supports:return e(k,{});case j.Multicol:return e(z,{});default:return null}},[I,z,P,k]),F=h(()=>a?.headerBar?.actions?.filter(m=>m?.pcShow),[a]),x=h(()=>F?.find(m=>m?.blockType===R.Profile),[F]),O=G(()=>{c(m=>!m)},[]);return C(()=>{if(g?.current){const m=g.current;return m.addEventListener("click",O),()=>{m.removeEventListener("click",O)}}},[O]),l(K,{childClassName:"bg-white",className:"relative h-[96px]",children:[l("div",{ref:d,onClick:B,className:"flex h-full flex-col justify-end gap-4",children:[l("div",{className:"flex items-center justify-between",children:[e(ie,{}),e(re,{ref:g,actions:F})]}),e("div",{className:"flex justify-between",children:s?.map((m,y)=>e("div",{className:"flex gap-6",children:m?.map((M,L)=>e("div",{ref:_=>{b.current[y][L]=_},className:"hover:text-brand-0 cursor-pointer",children:l("div",{className:"relative",children:[l("div",{className:"flex items-center gap-1 pb-4",onClick:_=>H(_,y,L),children:[e(p,{html:M.text,className:E(" text-sm font-bold leading-[1.4]",{"text-brand-0":v?.groupIndex===y&&v?.index===L})}),e(ne,{className:E({"text-brand-0":v?.groupIndex===y&&v?.index===L})})]}),e("div",{className:E("absolute bottom-0 left-0 h-[2px] w-0 bg-[#1D1D1F] transition-all duration-500",{"w-full":v?.groupIndex===y&&v?.index===L})})]})},M.id))},`groupCategory-${y}`))})]}),v?.open&&o&&l("div",{className:"absolute left-0 top-full z-[999] flex w-full flex-col bg-black/70",style:{height:`calc(100vh - ${d?.current?.getBoundingClientRect()?.bottom}px)`},children:[e("div",{className:"relative z-50",children:Y}),e("div",{className:"flex-1 bg-transparent",onClick:B})]}),r&&l("div",{className:"absolute left-0 z-[999] flex w-full bg-black/70",style:{height:`calc(100vh - ${g?.current?.getBoundingClientRect()?.bottom}px)`,top:`calc(12px + ${g?.current?.getBoundingClientRect()?.top}px)`},children:[l("div",{className:"absolute max-w-[272px] bg-white p-4",style:{right:`calc(100% - ${g?.current?.getBoundingClientRect()?.right}px)`},children:[e(p,{html:x?.benefits_title,className:"text-sm font-bold leading-[1.4]"}),e("div",{className:"mt-3 flex flex-col gap-1",children:x?.benefits?.map(m=>l("div",{className:"flex items-center gap-[6px]",children:[e(J,{source:m.benefitIcon?.url,className:"size-4",alt:m.benefit,width:16,height:16}),e(p,{html:m.benefit,className:"text-sm font-bold leading-[1.4]"})]},m.id))}),l("div",{className:"mt-4 flex items-center gap-2",children:[e(S,{variant:"secondary",size:"sm",onClick:()=>i?.join?.(),children:e(p,{html:x?.primaryButton||"Join Now",className:"text-sm font-bold leading-[1.4]"})}),e(S,{variant:"primary",size:"sm",onClick:()=>i?.login?.(),children:e(p,{html:x?.secondaryButton||"Log In",className:"text-sm font-bold leading-[1.4]"})})]})]}),e("div",{className:"flex-1 bg-transparent",onClick:()=>c(!1)})]})]})}),Me=({sidebarCategoriesMetadata:t,seriesMetadata:n})=>{const[a,i]=w([]),[s,o]=w(0),u=$(null);Q(()=>{V.fromTo(u?.current,{height:0},{height:548})},[]),C(()=>{t?.subcategories?.length&&i(t?.subcategories?.map((r,c)=>({index:c,open:!1})))},[t]);const f=h(()=>n?.find(r=>t?.subcategories?.[a?.find(c=>c.open)?.index||0]?.subSubCategories?.[s]?.label===r.label)||{},[t,a,s,n]),N=r=>{i(c=>c.map(d=>d.index===r?{...d,open:!d.open}:{...d,open:!1}))},g=r=>{o(r)};return l(K,{childClassName:"lg-desktop:gap-12 flex bg-white gap-8",children:[l("div",{className:"lg-desktop:basis-[356px] flex basis-[284px] flex-col gap-4 py-4",style:{userSelect:"none"},children:[e("div",{className:"desktop:max-h-[416px] flex flex-col overflow-y-auto",children:t?.subcategories?.map((r,c)=>l("div",{children:[l("div",{className:"flex cursor-pointer items-center justify-between",onClick:()=>N(c),children:[e(p,{html:r.label,className:"p-4 text-sm font-bold leading-[1.4]"}),e(ne,{className:E({"rotate-180":a.find(d=>d.index===c)?.open})})]}),a.find(d=>d.index===c)?.open&&e("div",{className:"flex flex-col",children:r.subSubCategories?.map((d,b)=>e(p,{html:d.label,onMouseEnter:()=>g(b),className:E("cursor-pointer px-6 py-4 text-sm font-bold leading-[1.4] text-[#6D6D6F] hover:bg-[#F5F5F7]")},`subSubItem-${c}-${b}`))})]},`subcategoryItem-${c}`))}),e("div",{className:"flex",children:l("div",{className:"flex flex-col gap-4",children:[e(S,{variant:"primary",size:"lg",className:"text-base",children:e("a",{href:t?.primary?.url,children:t?.primary?.label})}),e(S,{variant:"link",size:"lg",className:"justify-start py-0 text-base",children:e("a",{href:t?.secondary?.url,children:t?.secondary?.label})})]})})]}),l("div",{className:"flex-1",children:[Reflect.ownKeys(f).length>0&&l("div",{className:"mb-4 flex items-center justify-between",children:[l("div",{className:"flex items-center gap-2",children:[e(p,{html:f?.label,className:"text-2xl font-bold leading-[1.4]"}),e(S,{variant:"link",size:"lg",className:"justify-start p-0 text-base",children:e(T,{href:f?.primary?.url,className:"text-base font-bold leading-[1.2] no-underline",children:f?.primary?.label})})]}),e(T,{href:f?.guide?.url,className:"text-base leading-[1.2] text-[#6D6D6F]",children:f?.guide?.label})]}),e("div",{className:"flex flex-col gap-4 overflow-y-auto",ref:u,children:f?.series?.map((r,c)=>l("div",{children:[e(p,{html:r.label,className:"text-sm font-bold leading-[1.4] text-[#6D6D6F]"}),e("div",{className:"mt-2 grid grid-cols-3 gap-4",children:r.products?.map((d,b)=>e(oe,{product:d},`seriesProductItem-${b}`))})]},`seriesItem-${c}`))})]})]})},Ce=({multicolMetadata:t})=>{const n=$(null);return Q(()=>{V.fromTo(n?.current,{height:0},{height:"auto"})},[]),e("div",{ref:n,children:e(K,{childClassName:"bg-white",className:"h-full",children:e("div",{className:"flex gap-4 py-4",children:t?.map((a,i)=>e("div",{className:"w-1/4",children:e(se,{item:a})},`multicolItem-${a?.label}-${i}`))})})})},De=({supportsMetadata:t,currentNavItemRef:n})=>{const a=$(null),[i,s]=w(null);Q(()=>{V.fromTo(a?.current,{height:0},{height:"auto"})},[]);const o=ve(()=>{if(n){const u=n.getBoundingClientRect();s(u)}},500);return C(()=>(o(),window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o)}),[o]),C(()=>{if(n){const u=n.getBoundingClientRect();s(u)}},[n]),e("div",{className:"absolute top-0 h-full bg-white p-4",ref:a,style:{right:`calc(100% - ${i?.right}px)`},children:e("div",{children:t?.map(u=>e("div",{className:"py-2",children:e(T,{href:u.url,className:"text-sm font-bold leading-[1.4] no-underline",children:u.label})},u.id))})})},oe=({product:t})=>{const{buildProps:n}=A(),a=n?.products?.find(o=>o.handle===t.handle),i=a?.variants?.find(o=>o.sku===t.sku),s=h(()=>`/products/${a?.handle}?variant=${pe(i?.id)}`,[a?.handle,i?.id]);return l("div",{className:"flex shrink-0 items-center gap-4 bg-[#F5F5F7] px-4 py-3 [&_img]:hover:scale-105",children:[e("div",{className:"shrink-0 basis-[96px]",children:e(J,{source:`${i?.image?.url||t?.images?.[0]?.url}}`,width:96,height:96})}),l("div",{className:"relative",children:[t?.badge&&e(p,{as:"p",html:t?.badge,className:"text-brand-0 mb-1 inline-block h-[24px] rounded-full border-[1.6px] border-[#00BEFA] px-[6px] text-sm font-bold !leading-[24px]"}),e(T,{href:s,className:"no-underline",children:e(p,{className:"lg-desktop:h-[44px] lg-desktop:text-base line-clamp-2 h-[40px] text-sm font-bold leading-[1.4]",html:a?.title||t?.name})}),t?.desc&&e(p,{as:"p",html:t?.desc,className:"lg-desktop:text-sm mt-1 text-xs font-bold leading-[1.4] text-[#6D6D6F]"})]})]})},se=({item:t})=>l(de,{children:[t?.columns&&l(de,{children:[e(p,{html:t.label,as:"div",className:"my-2 text-sm font-bold leading-[1.4] text-[#6D6D6F]"}),e("div",{className:"mt-2 flex flex-col",children:t.columns?.map(n=>e("div",{className:"py-2",children:e(T,{href:n.url,className:"text-sm font-bold leading-[1.4] no-underline",children:n.label})},n.label))})]}),t?.imageUrl&&l("div",{className:"laptop:h-[280px] laptop:w-[404px] desktop:w-full desktop:h-auto relative h-[240px] w-[358px]",children:[e(J,{source:t.imageUrl,width:404,height:280}),l(T,{href:t.url,className:"absolute inset-0 z-10 flex flex-col justify-end p-4 no-underline",children:[e(p,{html:t.title,className:"desktop:text-2xl text-xl font-bold leading-[1.2] text-white"}),e(p,{html:t.subtitle,className:"text-sm font-bold leading-[1.4] text-white"})]})]})]}),Se=W(({data:t},n)=>{const a=h(()=>te(t?.categories),[t]),{currentMenu:i,setCurrentMenu:s,thirdNavTitle:o}=A(),[u,f]=w(!1),[N,g]=w(0),[r,c]=w(null),d=$(null);C(()=>{if(d?.current&&u){const x=d?.current?.getBoundingClientRect();g(window?.innerHeight-(x?.bottom||0))}},[u]),Q(()=>{V.fromTo(d.current,{height:0},{height:N,duration:.5})},[N]),C(()=>{document.documentElement.style.overflow=u?"hidden":"auto"},[u]);const b=h(()=>r?.components?.[0]?.blockType,[r]),v=X(Le,r),H=Z(Te,{categoriesItem:r}),B=ee(Ee,r),I=h(()=>{switch(b){case j.Sidebar:return e(v,{});case j.Supports:return e(H,{});case j.Multicol:return e(B,{});default:return null}},[b,v,H,B]),P=G(()=>{f(!1),g(0),s&&s(D.Primary)},[f,g,s]),k=h(()=>t?.headerBar?.actions?.filter(x=>x?.mobileShow&&x?.blockType!==R.Profile),[t]),z=h(()=>t?.headerBar?.actions?.find(x=>x?.mobileShow&&x?.blockType===R.Profile)||{},[t]),Y=h(()=>{switch(i){case D.Primary:return e(Be,{actions:k,menuOpen:u,onMenuOpenClose:()=>{f(!1),g(0)},onMenuOpenClick:()=>f(!0)});case D.Secondary:return e(ce,{title:r?.text,onMenuOpenClose:P,onMenuBackClick:()=>s?.(D.Primary)});case D.Third:return e(ce,{title:o,onMenuOpenClose:P,onMenuBackClick:()=>s?.(D.Secondary)});default:return null}},[u,i,s,r,k,o,P]),F=G((x,O)=>{const m=Array.isArray(a)?Array.isArray(a[x])?a[x][O]:{}:{};c(m),s?.(D.Secondary)},[a,s]);return l(K,{childClassName:"bg-white",className:"relative h-[52px]",children:[Y,u&&e("div",{ref:d,className:"absolute left-0 top-[calc(100%+1px)] z-[999] w-full overflow-y-auto bg-white",style:{height:N},children:i===D.Primary?e(Pe,{categories:a,onPrimaryMenuClick:F,profileAction:z}):I})]})}),Pe=({categories:t,onPrimaryMenuClick:n,profileAction:a})=>l("div",{className:"flex h-full flex-col justify-between",children:[e("div",{className:"tablet:px-8 laptop:px-16 p-4",children:t?.map((i,s)=>l("div",{className:"",children:[i?.map((o,u)=>e(q,{label:o.text,onClick:()=>n(s,u)},o.id)),e("div",{className:E("my-2 h-px w-full bg-[#E5E5E7]",{hidden:s===t.length-1})})]},`groupCategory-${s}`))}),e(He,{profileAction:a})]}),Le=({sidebarCategoriesMetadata:t,seriesMetadata:n})=>{const{currentMenu:a,setCurrentMenu:i,setThirdNavTitle:s,matchSeriesMetadata:o,setMatchSeriesMetadata:u}=A(),[f,N]=w([]);return C(()=>{t?.subcategories?.length&&N(t?.subcategories?.map((r,c)=>({index:c,open:!1})))},[t]),h(()=>{switch(a){case D.Secondary:return l("div",{className:"tablet:px-8 laptop:px-16 flex h-full flex-col justify-between p-4",children:[l("div",{children:[t?.subcategories?.map((r,c)=>l("div",{children:[e(q,{label:r?.label,active:f.find(d=>d.index===c)?.open,onClick:()=>{N(d=>d.map(b=>b.index===c?{...b,open:!b.open}:{...b,open:!1}))}}),f.find(d=>d.index===c)?.open&&r.subSubCategories?.map((d,b)=>e("div",{className:"px-2 py-4",onClick:()=>{i&&i(D.Third),u?.(n?.find(v=>t?.subcategories?.[c]?.subSubCategories?.[b]?.label===v.label)||{}),s&&s(d.label)},children:e(p,{html:d.label,className:"text-sm font-bold leading-[1.4]"})},`${c}-${b}`))]},`${r.label}-${c}`)),e(T,{href:o?.guide?.url,children:e("div",{className:"mt-4",children:e(p,{html:o?.guide?.label,className:"text-sm font-bold leading-[1.2] text-[#6D6D6F]"})})})]}),l("div",{className:"tablet:items-start flex flex-col items-center gap-4",children:[e(S,{variant:"primary",size:"lg",className:"tablet:w-auto w-full text-base",children:e("a",{href:t?.primary?.url,children:t?.primary?.label})}),e(S,{variant:"link",size:"lg",className:"tablet:w-auto tablet:px-0 w-full py-0 text-base",children:e("a",{href:t?.secondary?.url,children:t?.secondary?.label})})]})]});case D.Third:return l("div",{className:"tablet:px-8 laptop:px-16 desktop:px-0 p-4",children:[Reflect.ownKeys(o).length>0&&l("div",{className:"tablet:pt-0 flex items-center gap-3 py-4",children:[e(p,{html:o?.label,className:"text-xl font-bold leading-[1.4]"}),e(S,{variant:"link",size:"lg",className:"p-0",children:e(T,{href:o?.primary?.url,className:"text-base leading-[1.2]",children:o?.primary?.label})})]}),e("div",{className:"flex flex-col gap-6",children:o?.series?.map((r,c)=>l("div",{children:[e(p,{html:r.label,className:"text-sm font-bold leading-[1.4] text-[#3D3D3F]"}),e("div",{className:"laptop:grid-cols-3 laptop:gap-4 tablet:grid tablet:grid-cols-2 tablet:gap-3 mt-2 flex flex-col gap-2",children:r.products?.map((d,b)=>e(oe,{product:d},`seriesProductItem-${c}-${b}`))})]},`seriesItem-${c}`))})]});default:return null}},[a,o,t,s,i,u,n,f])},Te=({supportsMetadata:t})=>e("div",{className:"tablet:px-8 laptop:px-16 p-4",children:t?.map(n=>e(q,{href:n.url,label:n.label,onClick:()=>{}},n.id))}),Ee=({multicolMetadata:t})=>e("div",{className:"tablet:px-8 tablet:p-4 laptop:px-16 flex flex-col gap-4 px-4",children:t?.map((n,a)=>e("div",{children:e(se,{item:n})},`multicolItem-${n?.label}-${a}`))}),He=({profileAction:t})=>{const[n,a]=w(!1),{profile:i,event:s}=A();return l("div",{className:"tablet:px-8 laptop:px-16 bg-[#F5F5F7] px-4 py-6",children:[l("div",{className:"flex items-center justify-between",onClick:()=>a(!n),children:[l("div",{className:"flex items-center gap-[14px]",children:[e("div",{className:"flex size-[40px] items-center justify-center rounded-full bg-white",children:e(ye,{})}),e(p,{html:i?.nick_name||t?.welcome,className:"text-base font-bold leading-[1.4]"})]}),e(le,{className:E({"rotate-90":n})})]}),i?.email&&e("div",{className:"mt-4",children:t?.profiles?.map(o=>e(q,{label:o?.title,href:o?.url},o.id))}),n&&!i?.email&&l("div",{className:"mt-4",children:[e(p,{html:t?.benefits_title,className:"text-sm font-bold leading-[1.4]"}),e("div",{className:"mt-3 flex flex-col gap-1",children:t?.benefits?.map(o=>l("div",{className:"flex items-center gap-[6px]",children:[e(J,{source:o.benefitIcon?.url,className:"size-4",alt:o.benefit,width:16,height:16}),e(p,{html:o.benefit,className:"text-sm font-bold leading-[1.4]"})]},o.id))})]}),l("div",{className:"tablet:mt-4 mt-6 flex items-center gap-3",children:[e(S,{className:"tablet:flex-none flex-1",variant:"secondary",size:"sm",onClick:()=>s?.join?.(),children:e(p,{html:t?.primaryButton||"Join Now",className:"text-sm font-bold leading-[1.4]"})}),e(S,{className:"tablet:flex-none flex-1",variant:"primary",size:"sm",onClick:()=>s?.login?.(),children:e(p,{html:t?.secondaryButton||"Log In",className:"text-sm font-bold leading-[1.4]"})})]})]})},Be=({menuOpen:t,onMenuOpenClose:n,onMenuOpenClick:a,actions:i})=>l("div",{className:"flex h-full items-center justify-between gap-4",children:[e(ie,{}),l("div",{className:"desktop:gap-6 flex items-center gap-4",children:[e(re,{actions:i}),t?e(ae,{onClick:()=>n()}):e(xe,{onClick:()=>a()})]})]}),ie=()=>{const{payloadData:t}=A();return l("div",{className:"desktop:gap-2 flex items-center gap-[6px]",children:[e("div",{dangerouslySetInnerHTML:{__html:t?.headerBar?.logo}}),e(Ne,{}),e(p,{html:t?.headerBar?.slogan,className:"tablet:text-sm text-xs font-bold leading-[1.4]"})]})},re=W(({actions:t},n)=>{const{event:a}=A(),i=G(s=>{switch(s?.blockType){case R.Search:a?.search?.();break;case R.Cart:a?.cart?.();break;case R.Profile:a?.profile?.();break;case R.Livestream:a?.livestream?.();break;default:return()=>{}}},[a]);return e("div",{className:"desktop:gap-6 flex items-center gap-4",children:Array.isArray(t)&&t?.map(s=>e("div",{ref:s.blockType===R.Profile?n:null,onClick:()=>i(s),children:e(p,{html:s.icon,className:"hover:text-brand-0 cursor-pointer"})},s.id))})}),ce=({title:t,onMenuOpenClose:n,onMenuBackClick:a})=>l("div",{className:"flex h-full items-center gap-3",children:[e(he,{onClick:()=>a()}),e(p,{html:t,className:"flex-1 text-center text-base font-bold leading-[1.4]"}),e(ae,{onClick:()=>n()})]}),q=({label:t,href:n,onClick:a,active:i})=>e("div",{className:"flex cursor-pointer items-center justify-between py-4",onClick:a,children:l(T,{href:n,asChild:!n,className:"flex w-full items-center justify-between no-underline",children:[e(p,{html:t,className:"text-sm font-bold leading-[1.4]"}),e(le,{className:E({"rotate-90":i})})]})});var Ke=ue(ke);export{Ke as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/HeaderNavigation/index.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport React, {\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react'\n\nimport { Picture, Text, Button, Container, Link, Heading } from '../../components/index.js'\n\nimport { withLayout } from '../../shared/Styles.js'\n\nimport { cn, atobID } from '../../helpers/utils.js'\n\nimport type {\n MobilePrimaryNavigationData,\n MobileSecondaryNavigationData,\n MobileNavigationProps,\n DesktopNavigationProps,\n HeaderNavigationProps,\n} from './types.js'\nimport NavProvider, { useNavContext } from './NavProvider.js'\n\nimport { HeaderNavigationMenu, HeaderNavigationBlockType, HeaderNavigationActionBlockType } from './types.js'\n\nimport { useMediaQuery } from 'react-responsive'\nimport { debounce, throttle } from 'es-toolkit'\n\nimport { useGSAP } from '@gsap/react'\nimport { gsap } from 'gsap'\nimport type { Product, ProductVariant } from '../../cpn-components/CpnProductCard/types.js'\n\nimport { WithSidebar, WithSupports, WithMulticol, WithGroupCategory } from './withCategory.js'\n\nimport { Menu, Close, User, RightArrow, LeftArrow, DownArrow, Polygon } from './icons/index.js'\n\nimport NavigationSearch from '../NavigationSearch/index.js'\n\nconst HeaderNavigation = forwardRef<HTMLDivElement, HeaderNavigationProps>((props, ref) => {\n const {\n data: { headerNavigation } = {},\n buildProps,\n event,\n profile,\n theme = 'light',\n searchResult,\n onSearch,\n isSearching,\n keywords,\n } = props\n\n const searchRef = useRef<HTMLDivElement>(null)\n const [searchOpen, setSearchOpen] = useState(false)\n const [headerHidden, setHeaderHidden] = useState(false)\n const [changeHeaderBackground, setChangeHeaderBackground] = useState(false)\n const [isMobile, setIsMobile] = useState(false)\n\n const headerRef = useRef<HTMLDivElement>(null)\n\n const resizeWindow = () => {\n const offsetWidth = document?.querySelector('body')?.offsetWidth || 0\n setIsMobile(offsetWidth <= 1440)\n }\n\n useEffect(() => {\n resizeWindow()\n window.addEventListener('resize', resizeWindow)\n return () => {\n window.removeEventListener('resize', resizeWindow)\n }\n }, [])\n\n useImperativeHandle(ref, () => headerRef.current as HTMLDivElement)\n\n useEffect(() => {\n let upwardDistance = 0\n let lastScrollY = 0\n const showDownNav = throttle(latest => {\n const delta = lastScrollY - latest\n if (delta > 0) {\n upwardDistance += delta\n if (upwardDistance >= 300) {\n setHeaderHidden(false)\n upwardDistance = 0\n }\n } else {\n setHeaderHidden(latest > 300)\n }\n setChangeHeaderBackground(latest > 30)\n lastScrollY = latest\n }, 200)\n\n const scrollAnimate = () => {\n let scrollTop = 0\n if (document?.documentElement && document?.documentElement?.scrollTop) {\n scrollTop = document?.documentElement.scrollTop\n } else if (document?.body) {\n scrollTop = document?.body.scrollTop\n }\n showDownNav(scrollTop)\n }\n\n window.addEventListener('scroll', scrollAnimate)\n\n return () => window.removeEventListener('scroll', scrollAnimate)\n }, [])\n\n useEffect(() => {\n if (event) {\n event.search = () => setSearchOpen(true)\n }\n }, [event])\n\n useGSAP(() => {\n if (searchRef?.current && searchOpen) {\n gsap.fromTo(\n searchRef.current,\n {\n height: 0,\n },\n {\n height: 'auto',\n duration: 0.3,\n }\n )\n }\n }, [searchOpen])\n\n useEffect(() => {\n document.documentElement.style.overflow = searchOpen ? 'hidden' : 'auto'\n }, [searchOpen])\n\n const searchPage = useMemo(() => {\n return (\n headerNavigation?.headerBar?.actions?.find(\n (item: any) => item?.blockType === HeaderNavigationActionBlockType.Search\n )?.searchBar?.[0] || {}\n )\n }, [headerNavigation])\n\n return (\n <NavProvider\n buildProps={buildProps}\n profile={profile}\n isMobile={isMobile}\n event={event}\n payloadData={headerNavigation}\n >\n <header data-ui-component-id=\"HeaderNavigation\" className=\"sticky top-0 z-50\" ref={headerRef}>\n <div\n className={cn(\n theme === 'light' ? 'text-black' : 'text-white',\n {\n ['translate-y-[-100%] transition-transform duration-500 ease-in-out']: headerHidden,\n ['!bg-white transition-all duration-500 ease-in-out']: changeHeaderBackground,\n },\n {\n ['hover:!text-black']: theme === 'dark',\n ['!text-black']: changeHeaderBackground,\n }\n )}\n onClick={() => setChangeHeaderBackground(true)}\n >\n {!isMobile && (\n <DesktopNavigation data={headerNavigation} onNavItemClick={() => setChangeHeaderBackground(true)} />\n )}\n {isMobile && <MobileNavigation data={headerNavigation} />}\n {searchOpen && (\n <div\n className=\"absolute z-[60] top-0 left-0 w-full bg-black/70 flex flex-col\"\n style={{ height: `calc(100dvh - ${headerRef?.current?.getBoundingClientRect()?.top}px)` }}\n >\n <div ref={searchRef} className={cn('overflow-y-auto', {})}>\n <NavigationSearch\n data={searchPage}\n keywords={keywords}\n isSearching={isSearching}\n searchResult={searchResult}\n onSearch={(value: string) => {\n onSearch?.(value)\n }}\n onClose={() => {\n onSearch?.()\n setSearchOpen(false)\n }}\n />\n </div>\n <div className=\"flex-1 bg-transparent\" onClick={() => setSearchOpen(false)} />\n </div>\n )}\n </div>\n </header>\n </NavProvider>\n )\n})\n\nconst DesktopNavigation = forwardRef<HTMLDivElement, DesktopNavigationProps>((props, ref) => {\n const { data, onNavItemClick } = props\n const { event } = useNavContext()\n const [downdownHover, setDowndownHover] = useState(false)\n\n const groupCategories = useMemo(() => {\n return WithGroupCategory(data?.categories?.filter((item: any) => item?.pcShow)) as any[][]\n }, [data])\n\n const [categoriesItem, setCategoriesItem] = useState<any>(null)\n const [navStatusArray, setNavStatusArray] = useState<{ index: number; groupIndex: number; open: boolean }[][]>([])\n const profileRef = useRef<HTMLDivElement>(null)\n const [userProfileOpen, setUserProfileOpen] = useState(false)\n const headerRef = useRef<HTMLDivElement>(null)\n const dropdownRef = useRef<HTMLDivElement>(null)\n const navItemRefs = useRef<HTMLDivElement[][]>(\n groupCategories.map((categories: any) => Array(categories?.length || 0).fill(null))\n )\n\n useEffect(() => {\n if (groupCategories?.length) {\n setNavStatusArray(\n groupCategories?.map((groupItem: any, groupIndex: number) => {\n return groupItem?.map((_: any, index: number) => ({ groupIndex, index, open: false }))\n })\n )\n }\n }, [groupCategories])\n\n const currentNavItem = useMemo(() => {\n let currentNavItem: { index: number; groupIndex: number; open: boolean } | null = null\n for (const groupItem of navStatusArray) {\n for (const item of groupItem) {\n if (item.open) {\n currentNavItem = item\n break\n }\n }\n if (currentNavItem) break\n }\n return currentNavItem\n }, [navStatusArray])\n\n useEffect(() => {\n document.documentElement.style.overflow = currentNavItem?.open || userProfileOpen ? 'hidden' : 'auto'\n }, [currentNavItem?.open, userProfileOpen])\n\n const handleNavItemClick = (e: any, groupIndex: number, index: number) => {\n if (categoriesItem?.components?.[0]?.blockType === HeaderNavigationBlockType.Links) {\n // link\u6A21\u5757\u7279\u6B8A\u5904\u7406\n categoriesItem?.components?.[0]?.url && window.open(categoriesItem?.components?.[0]?.url)\n } else {\n e.stopPropagation()\n onNavItemClick?.()\n setCategoriesItem(groupCategories[groupIndex][index])\n setNavStatusArray(prev =>\n prev.map(groupItem =>\n groupItem.map(item =>\n item.groupIndex === groupIndex && item.index === index\n ? { ...item, open: !item.open }\n : { ...item, open: false }\n )\n )\n )\n }\n }\n\n const handleNavMenuClose = () => {\n setNavStatusArray(prev => prev.map(groupItem => groupItem.map(item => ({ ...item, open: false }))))\n }\n\n const currentBlockTypeCategories = useMemo(() => {\n if (categoriesItem) return categoriesItem?.components?.[0]?.blockType\n }, [categoriesItem])\n\n const SidebarDropdownComp = WithSidebar(SidebarDropdown, categoriesItem)\n const MulticolDropdownComp = WithMulticol(MulticolDropdown, categoriesItem)\n const SupportsDropdownComp = WithSupports(SupportsDropdown, {\n categoriesItem,\n currentNavItemRef: navItemRefs.current?.[currentNavItem?.groupIndex || 0]?.[currentNavItem?.index || 0],\n })\n\n const DropdownComp = useMemo(() => {\n switch (currentBlockTypeCategories) {\n case HeaderNavigationBlockType.Sidebar:\n return <SidebarDropdownComp />\n case HeaderNavigationBlockType.Supports:\n return <SupportsDropdownComp />\n case HeaderNavigationBlockType.Multicol:\n return <MulticolDropdownComp />\n default:\n return null\n }\n }, [currentBlockTypeCategories, categoriesItem])\n\n const actions = useMemo(() => {\n return data?.headerBar?.actions?.filter((item: any) => item?.pcShow)\n }, [data])\n\n const profileAction = useMemo(() => {\n return actions?.find((item: any) => item?.blockType === HeaderNavigationActionBlockType.Profile)\n }, [actions])\n\n const handleProfileClick = useCallback(() => {\n setUserProfileOpen(prev => !prev)\n }, [])\n\n useEffect(() => {\n if (profileRef?.current) {\n const profileRefElement = profileRef.current as HTMLDivElement\n profileRefElement.addEventListener('click', handleProfileClick)\n\n return () => {\n profileRefElement.removeEventListener('click', handleProfileClick)\n }\n }\n }, [handleProfileClick])\n\n useGSAP(() => {\n if (currentNavItem?.open) {\n gsap.fromTo(\n dropdownRef?.current,\n {\n height: 0,\n },\n {\n height: 'auto',\n }\n )\n }\n }, [currentNavItem?.open])\n\n return (\n <Container className=\"relative h-[96px]\">\n <div ref={headerRef} onClick={handleNavMenuClose} className=\"flex h-full flex-col justify-end gap-4\">\n <div className=\"flex items-center justify-between\">\n <Logo />\n <Actions ref={profileRef} actions={actions} activeStatus={userProfileOpen} />\n </div>\n <div className=\"flex justify-between\">\n {groupCategories?.map((groupItem: any, groupIndex: number) => {\n return (\n <div key={`groupCategory-${groupIndex}`} className=\"flex gap-3\">\n {groupItem?.map((item: any, index: number) => {\n return (\n <div\n key={item.id}\n ref={(el: HTMLDivElement) => {\n navItemRefs.current[groupIndex][index] = el\n }}\n className=\"group cursor-pointer\"\n >\n <div className=\"relative\">\n <div\n className=\"flex items-center gap-1 pb-4\"\n onClick={e => handleNavItemClick(e, groupIndex, index)}\n >\n <Text html={item.text} className=\"text-sm font-bold leading-[1.4]\" />\n <DownArrow\n className={cn('opacity-0 size-4 group-hover:opacity-100 transition-opacity duration-500', {\n ['rotate-180']:\n currentNavItem?.groupIndex === groupIndex && currentNavItem?.index === index,\n ['opacity-100']:\n downdownHover &&\n currentNavItem?.groupIndex === groupIndex &&\n currentNavItem?.index === index,\n })}\n />\n </div>\n <div\n className={cn(\n 'absolute bottom-0 left-0 h-[2px] w-0 bg-[#1D1D1F] transition-all duration-500',\n {\n 'w-[calc(100%-20px)]':\n currentNavItem?.groupIndex === groupIndex && currentNavItem?.index === index,\n }\n )}\n />\n </div>\n </div>\n )\n })}\n </div>\n )\n })}\n </div>\n </div>\n <div\n className={cn(\n 'border-t border-b-[#E4E5E6] absolute left-0 top-full z-[999] flex w-full flex-col bg-black/70 overflow-hidden',\n {\n hidden: !(currentNavItem?.open && categoriesItem),\n }\n )}\n onMouseEnter={() => setDowndownHover(true)}\n onMouseLeave={() => setDowndownHover(false)}\n style={{ height: `calc(100dvh - ${headerRef?.current?.getBoundingClientRect()?.bottom}px)` }}\n >\n <div\n ref={dropdownRef}\n className={cn('relative z-50', {\n 'overflow-hidden': currentBlockTypeCategories !== HeaderNavigationBlockType.Supports,\n })}\n >\n {DropdownComp}\n </div>\n <div className=\"flex-1 bg-transparent\" onClick={handleNavMenuClose} />\n </div>\n {userProfileOpen && (\n <div\n className=\"absolute left-0 z-[999] flex w-full bg-black/70 h-[100dvh] top-full\"\n // style={{\n // height: `calc(100dvh - ${profileRef?.current?.getBoundingClientRect()?.bottom}px)`,\n // top: `calc(96px)`,\n // }}\n >\n <div\n className=\"absolute max-w-[272px] bg-white p-4\"\n style={{\n right: `calc(100% - ${profileRef?.current?.getBoundingClientRect()?.right}px)`,\n top: `calc(12px - ${profileRef?.current?.getBoundingClientRect()?.top}px)`,\n }}\n >\n <Polygon className=\"absolute -top-2 text-white right-[46px] z-30\" />\n <Text html={profileAction?.benefits_title} className=\"text-sm font-bold leading-[1.4]\" />\n <div className=\"mt-2 flex flex-col gap-1\">\n {profileAction?.benefits?.map((item: any) => (\n <div key={item.id} className=\"flex items-center gap-[6px]\">\n <Picture\n source={item.benefitIcon?.url}\n className=\"size-4\"\n alt={item.benefit}\n width={16}\n height={16}\n />\n <Text html={item.benefit} className=\"text-sm font-bold leading-[1.4]\" />\n </div>\n ))}\n </div>\n <div className=\"mt-4 flex items-center gap-2\">\n <Button variant=\"secondary\" size=\"lg\" onClick={() => event?.join?.()}>\n <Text html={profileAction?.primaryButton || 'Join Now'} className=\"font-bold\" />\n </Button>\n <Button variant=\"primary\" size=\"lg\" onClick={() => event?.login?.()}>\n <Text html={profileAction?.secondaryButton || 'Log In'} className=\"font-bold\" />\n </Button>\n </div>\n </div>\n <div className=\"flex-1 bg-transparent\" onClick={() => setUserProfileOpen(false)} />\n </div>\n )}\n </Container>\n )\n})\n\n/**\n * \u4FA7\u8FB9\u680F\u4E0B\u62C9\n * @param categoriesItem \u5206\u7C7B\u9879\n */\nconst SidebarDropdown = React.memo(\n ({ sidebarCategoriesMetadata, seriesMetadata }: { sidebarCategoriesMetadata: any; seriesMetadata: any }) => {\n const { buildProps } = useNavContext()\n const [expandedSubcategory, setExpandedSubcategory] = useState<{ index: number; open: boolean }[]>([])\n const [activeSubSubcategoryIndex, setActiveSubSubcategoryIndex] = useState(-1)\n const sidebarDropdownRef = useRef<HTMLDivElement>(null)\n\n const initExpandedSubcategory = useCallback(() => {\n const subcategories = sidebarCategoriesMetadata?.subcategories\n if (!subcategories?.length) return\n\n const withSubSubCategoriesIndex = subcategories.findIndex((item: any) => !!item?.subSubCategories)\n const withoutSubSubCategoriesIndex = subcategories.findIndex((item: any) => !item?.subSubCategories)\n\n // \u521B\u5EFA\u5C55\u5F00\u72B6\u6001\u6570\u7EC4\n const expandedStates = subcategories.map((_: any, index: number) => ({\n index,\n open: withSubSubCategoriesIndex === index || withoutSubSubCategoriesIndex === index,\n }))\n\n setExpandedSubcategory(expandedStates)\n }, [sidebarCategoriesMetadata])\n\n useEffect(() => {\n initExpandedSubcategory()\n }, [initExpandedSubcategory])\n\n // \u901A\u8FC7categoriesMetadata\u7684subSubCategories\u7684label\u4E0Eseries\u7684label\u5339\u914D\n const matchSeriesMetadata = useMemo(() => {\n const subCategory =\n sidebarCategoriesMetadata?.subcategories?.[expandedSubcategory?.find(item => item.open)?.index || 0]\n const currentSeriesMetadata =\n seriesMetadata?.find((item: any) => item?.label?.toLowerCase() === subCategory?.label?.toLowerCase()) || {}\n if (subCategory?.collections) {\n const category = buildProps?.categories?.[subCategory?.collections] || {}\n return {\n label: category?.name,\n isCollection: true,\n banner: currentSeriesMetadata?.banner,\n series: [\n {\n products: category?.products,\n },\n ],\n }\n } else {\n if (subCategory?.subSubCategories) {\n const activeSubSubcategory = subCategory?.subSubCategories?.[activeSubSubcategoryIndex]\n const currentActiveSeriesMetadata =\n seriesMetadata?.find(\n (item: any) => item?.label?.toLowerCase() === activeSubSubcategory?.label?.toLowerCase()\n ) || {}\n if (activeSubSubcategory?.collections) {\n const category = buildProps?.categories?.[activeSubSubcategory?.collections] || {}\n return {\n label: category?.name,\n isCollection: true,\n banner: currentActiveSeriesMetadata?.banner,\n series: [\n {\n products: category?.products,\n },\n ],\n }\n } else {\n return currentActiveSeriesMetadata\n }\n } else {\n return currentSeriesMetadata\n }\n }\n }, [sidebarCategoriesMetadata, expandedSubcategory, activeSubSubcategoryIndex, seriesMetadata])\n\n const handleSubcategoryOpen = useCallback(\n (index: number, subcategoryItem: any) => {\n subcategoryItem?.subSubCategories?.length > 0\n ? setActiveSubSubcategoryIndex(0)\n : setActiveSubSubcategoryIndex(-1)\n\n if (subcategoryItem?.subSubCategories?.length > 0) {\n setExpandedSubcategory(prev =>\n prev.map(item => (item.index === index ? { ...item, open: true } : { ...item, open: false }))\n )\n } else {\n const subcategories = sidebarCategoriesMetadata?.subcategories\n const withSubSubCategoriesIndex = subcategories?.findIndex((item: any) => !!item?.subSubCategories)\n setExpandedSubcategory(prev =>\n prev.map(item => {\n return { ...item, open: item.index === index || item.index === withSubSubCategoriesIndex }\n })\n )\n }\n },\n [sidebarCategoriesMetadata, initExpandedSubcategory]\n )\n\n const handleSubSubcategoryOpen = (index: number, subSubindex: number) => {\n setExpandedSubcategory(prev =>\n prev.map(item => (item.index === index ? { ...item, open: true } : { ...item, open: false }))\n )\n setActiveSubSubcategoryIndex(subSubindex)\n }\n\n return (\n <Container childClassName=\"lg-desktop:gap-12 flex bg-white gap-8\">\n <div\n className=\"lg-desktop:basis-[356px] flex basis-[284px] flex-col gap-4 py-4\"\n style={{\n userSelect: 'none',\n }}\n ref={sidebarDropdownRef}\n >\n <div\n className=\"desktop:h-[416px] flex flex-col overflow-y-auto\"\n style={{\n scrollbarWidth: 'none',\n msOverflowStyle: 'none',\n }}\n >\n {sidebarCategoriesMetadata?.subcategories?.map((subItem: any, index: number) => {\n const hasSubSubCategory =\n Array.isArray(subItem?.subSubCategories) && subItem?.subSubCategories?.length > 0\n return (\n <div key={`subcategoryItem-${index}`}>\n <div\n className={cn('flex cursor-pointer items-center justify-between', {\n 'bg-[#F5F5F7]':\n !hasSubSubCategory && expandedSubcategory?.find(item => item.index === index)?.open,\n })}\n onClick={() => {\n handleSubcategoryOpen(index, subItem)\n }}\n >\n <Text html={subItem.label} className=\"p-4 text-sm font-bold leading-[1.4]\" />\n {hasSubSubCategory && (\n <DownArrow\n className={cn('size-4', {\n ['rotate-180']: expandedSubcategory?.find(item => item.index === index)?.open,\n })}\n />\n )}\n </div>\n {expandedSubcategory?.find(item => item.index === index)?.open && (\n <div className=\"flex flex-col\">\n {subItem.subSubCategories?.map((subSubItem: any, subSubindex: number) => (\n <Text\n html={subSubItem.label}\n onClick={() => handleSubSubcategoryOpen(index, subSubindex)}\n key={`subSubItem-${index}-${subSubindex}`}\n className={cn(\n 'cursor-pointer hover:bg-[#F5F5F7] px-6 py-4 text-sm font-bold leading-[1.4] text-[#6D6D6F]',\n {\n 'bg-[#F5F5F7]': activeSubSubcategoryIndex === subSubindex,\n }\n )}\n />\n ))}\n </div>\n )}\n </div>\n )\n })}\n </div>\n {sidebarCategoriesMetadata && (\n <div className=\"flex\">\n <div className=\"flex flex-col gap-4\">\n {sidebarCategoriesMetadata?.primary && (\n <Button\n as=\"a\"\n href={sidebarCategoriesMetadata?.primary?.url}\n variant=\"primary\"\n size=\"lg\"\n className=\"text-sm lg-desktop:text-base\"\n >\n {sidebarCategoriesMetadata?.primary?.label}\n </Button>\n )}\n {sidebarCategoriesMetadata?.secondary && (\n <Button\n as=\"a\"\n href={sidebarCategoriesMetadata?.secondary?.url}\n variant=\"link\"\n size=\"lg\"\n className=\"justify-start !p-0 text-sm lg-desktop:text-base\"\n >\n {sidebarCategoriesMetadata?.secondary?.label}\n </Button>\n )}\n </div>\n </div>\n )}\n </div>\n <div className=\"flex-1 py-4\">\n {Reflect.ownKeys(matchSeriesMetadata).length > 0 && (\n <div className=\"mb-4 flex items-center justify-between\">\n <div className=\"flex items-center gap-2\">\n <Text\n html={matchSeriesMetadata?.label}\n className=\"text-xl lg-desktop:text-2xl font-bold leading-[1.4]\"\n />\n {matchSeriesMetadata?.primary && (\n <Button\n as=\"a\"\n href={matchSeriesMetadata?.primary?.url}\n variant=\"link\"\n size=\"lg\"\n className=\"justify-start !p-0 text-sm lg-desktop:text-base font-bold leading-[1.2] no-underline\"\n >\n {matchSeriesMetadata?.primary?.label}\n </Button>\n )}\n </div>\n <Link\n href={matchSeriesMetadata?.guide?.url}\n className=\"text-sm lg-desktop:text-base leading-[1.2] text-[#6D6D6F]\"\n >\n {matchSeriesMetadata?.guide?.label}\n </Link>\n </div>\n )}\n <div\n className=\"flex flex-col gap-4 overflow-y-auto h-[548px]\"\n style={{\n scrollbarWidth: 'none',\n msOverflowStyle: 'none',\n }}\n >\n {matchSeriesMetadata?.series?.map((seriesItem: any, seriesIndex: number) => (\n <div key={`seriesItem-${seriesIndex}`}>\n {seriesItem.label && (\n <Text html={seriesItem.label} className=\"text-sm mb-2 font-bold leading-[1.4] text-[#6D6D6F]\" />\n )}\n <div className=\"grid grid-cols-3 gap-4\">\n {!!matchSeriesMetadata?.banner && matchSeriesMetadata?.isCollection && (\n <Link asChild={!matchSeriesMetadata?.banner?.href} href={matchSeriesMetadata?.banner?.href}>\n <div className=\"relative [&_img]:hover:scale-105 [&_img]:hover:transition-all [&_img]:hover:duration-300\">\n <Picture\n source={matchSeriesMetadata?.banner?.imageUrl}\n className=\"h-[114px] laptop:h-[120px]\"\n imgClassName=\"object-cover h-full\"\n />\n <div className=\"absolute bottom-0 left-0 right-0 p-4\">\n <Heading\n size={2}\n html={matchSeriesMetadata?.banner?.title || 'Buy in Guide'}\n className=\"font-bold text-white\"\n />\n <Text\n html={matchSeriesMetadata?.banner?.desc || '20.000mAh'}\n className=\"text-sm text-white font-bold\"\n />\n </div>\n </div>\n </Link>\n )}\n {seriesItem.products?.map((product: any, index: number) => (\n <SeriesProductItem\n key={`seriesProductItem-${index}`}\n product={product}\n isCollection={matchSeriesMetadata?.isCollection}\n />\n ))}\n </div>\n </div>\n ))}\n </div>\n </div>\n </Container>\n )\n }\n)\n\n/**\n * \u591A\u5217\u4E0B\u62C9\n * @param categoriesItem \u5206\u7C7B\u9879\n */\nconst MulticolDropdown = ({ multicolMetadata }: { multicolMetadata: any }) => {\n const multicolDropdownRef = useRef<HTMLDivElement>(null)\n\n // useGSAP(() => {\n // gsap.fromTo(\n // multicolDropdownRef?.current,\n // {\n // height: 0,\n // },\n // {\n // height: 'auto',\n // duration: 0.5,\n // }\n // )\n // }, [])\n\n return (\n <div ref={multicolDropdownRef}>\n <Container childClassName=\"bg-white\" className=\"h-full\">\n <div className=\"flex gap-4 py-4\">\n {multicolMetadata?.map((item: any, index: number) => (\n <div key={`multicolItem-${item?.label}-${index}`} className=\"w-1/4\">\n <MulticolItem item={item} />\n </div>\n ))}\n </div>\n </Container>\n </div>\n )\n}\n\n/**\n * supports\u4E0B\u62C9\n * @param categoriesItem \u5206\u7C7B\u9879\n * @param currentNavItemRef \u5F53\u524D\u5BFC\u822A\u9879\n */\nconst SupportsDropdown = ({\n supportsMetadata,\n currentNavItemRef,\n}: {\n supportsMetadata: any\n currentNavItemRef: HTMLDivElement\n}) => {\n const supportsDropdownRef = useRef<HTMLDivElement>(null)\n const [navItemReact, setNavItemReact] = useState<DOMRect | null>(null)\n const [supportsDropdownHeight, setSupportsDropdownHeight] = useState(0)\n\n // useGSAP(() => {\n // gsap.fromTo(\n // supportsDropdownRef?.current,\n // {\n // height: 0,\n // },\n // {\n // height: supportsDropdownHeight,\n // duration: 0.5,\n // }\n // )\n // }, [supportsDropdownHeight])\n\n useEffect(() => {\n if (supportsDropdownRef?.current) {\n const rect = supportsDropdownRef?.current?.getBoundingClientRect()\n setSupportsDropdownHeight(rect.height)\n }\n }, [supportsDropdownRef])\n\n const debouncedHandleResize = debounce(() => {\n if (currentNavItemRef) {\n const rect = currentNavItemRef.getBoundingClientRect()\n setNavItemReact(rect)\n }\n }, 500)\n\n useEffect(() => {\n debouncedHandleResize()\n window.addEventListener('resize', debouncedHandleResize)\n return () => {\n window.removeEventListener('resize', debouncedHandleResize)\n }\n }, [debouncedHandleResize])\n\n useEffect(() => {\n if (currentNavItemRef) {\n const rect = currentNavItemRef.getBoundingClientRect()\n setNavItemReact(rect)\n }\n }, [currentNavItemRef])\n\n return (\n <div\n className=\"absolute top-0 h-full bg-white transition-all duration-500 overflow-hidden\"\n style={{ right: `calc(100% - ${navItemReact?.right}px)`, height: supportsDropdownHeight }}\n >\n <div ref={supportsDropdownRef} className=\"p-4\">\n {supportsMetadata?.map((supportItem: any) => (\n <div key={supportItem.id} className=\"py-2\">\n <Link href={supportItem.url} className=\"text-sm font-bold leading-[1.4] no-underline\">\n {supportItem.label}\n </Link>\n </div>\n ))}\n </div>\n </div>\n )\n}\n\nconst SeriesProductItem = ({ product, isCollection }: { product: any; isCollection?: boolean }) => {\n const { buildProps } = useNavContext()\n let productData = isCollection\n ? product\n : buildProps?.products?.find((item: Product) => item.handle === product.handle)\n const variant =\n productData?.variants?.find((item: ProductVariant) => item.sku === product.sku) || productData?.variants?.[0]\n\n const listingLink = useMemo(() => {\n return `/products/${productData?.handle}?variant=${atobID(variant?.id as string)}`\n }, [productData?.handle, variant?.id])\n\n const tags = useMemo(() => {\n return productData?.tags\n ?.filter?.((item: any) => item?.startsWith?.('CLtag'))\n ?.map?.((item: any) => item?.replace?.('CLtag:', ''))\n ?.slice?.(0, 2)\n }, [productData?.tags])\n\n if (!variant?.availableForSale) return null\n\n return (\n <div className=\"flex shrink-0 items-center gap-4 bg-[#F5F5F7] px-4 py-3 [&_img]:hover:scale-105\">\n <div className=\"shrink-0\">\n <Picture\n source={`${variant?.image?.url || product?.images?.[0]?.url}}`}\n width={90}\n height={90}\n className=\"size-[96px]\"\n imgClassName=\"object-contain h-full\"\n />\n </div>\n <div className=\"relative\">\n {Array.isArray(tags) && tags?.map((tag: string) => (\n <Text\n as=\"p\"\n html={tag}\n className=\"text-brand-0 mb-1 inline-block h-[24px] rounded-full border-[1.6px] border-[#00BEFA] px-[6px] text-sm font-bold !leading-[24px]\"\n />\n ))}\n {/* {product?.badge && (\n <Text\n as=\"p\"\n html={product?.badge}\n className=\"text-brand-0 mb-1 inline-block h-[24px] rounded-full border-[1.6px] border-[#00BEFA] px-[6px] text-sm font-bold !leading-[24px]\"\n />\n )} */}\n <Link href={listingLink} className=\"no-underline hover:text-current\">\n <Text\n className=\"lg-desktop:h-[44px] lg-desktop:text-base line-clamp-2 h-[40px] text-sm font-bold leading-[1.4]\"\n html={productData?.title || product?.name}\n />\n </Link>\n {product?.desc && (\n <Text\n as=\"p\"\n html={product?.desc}\n className=\"lg-desktop:text-sm line-clamp-1 mt-1 text-xs font-bold leading-[1.4] text-[#6D6D6F]\"\n />\n )}\n </div>\n </div>\n )\n}\n\n/**\n * \u591A\u5217\u4E0B\u62C9\u9879\n * @param item \u591A\u5217\u4E0B\u62C9\u9879\n */\nconst MulticolItem = ({ item, allPicture }: { item: any; allPicture?: boolean }) => {\n return (\n <>\n {item?.columns && (\n <>\n <Text html={item.label} as=\"div\" className=\"my-2 text-sm font-bold leading-[1.4] text-[#6D6D6F]\" />\n <div className=\"mt-2 flex flex-col\">\n {item.columns?.map((columnItem: any) => (\n <div key={columnItem.label} className=\"py-2 flex items-center gap-1\">\n <Link href={columnItem.url} className=\"text-sm font-bold leading-[1.4] no-underline\">\n {columnItem.label}\n </Link>\n {columnItem?.badge && (\n <Text\n as=\"p\"\n html={columnItem?.badge || 'badge'}\n className=\"text-sm font-bold !leading-[24px] text-brand-0 h-[24px] rounded-full border-[1.6px] border-[var(--brand-color-0)] px-[6px]\"\n />\n )}\n </div>\n ))}\n </div>\n </>\n )}\n {item?.imageUrl && (\n <div\n className={cn(\n 'laptop:h-[280px] desktop:h-[224px] lg-desktop:h-[280px] h-[240px] max-w-[358px] tablet:max-w-[346px] laptop:max-w-[440px] desktop:w-full relative overflow-hidden',\n {\n ['tablet:max-w-none laptop:max-w-none']: allPicture,\n }\n )}\n >\n <Picture\n source={item.imageUrl}\n width={404}\n height={280}\n className=\"size-full\"\n imgClassName=\"object-cover h-full hover:scale-105 transition-all duration-300\"\n />\n <Link href={item.url} className=\"absolute bottom-4 left-4 z-10 flex flex-col justify-end no-underline\">\n <Text\n html={item.title}\n className={cn('lg-desktop:text-2xl text-xl font-bold leading-[1.2] text-white', {\n 'text-black': item?.theme === 'dark',\n })}\n />\n <Text\n html={item.subtitle}\n className={cn('text-sm font-bold leading-[1.4] text-white', {\n 'text-black': item?.theme === 'dark',\n })}\n />\n </Link>\n </div>\n )}\n </>\n )\n}\n\n/**\n * \u79FB\u52A8\u7AEF\u5BFC\u822A\n * @param menuHeight \u83DC\u5355\u9AD8\u5EA6\n * @param data \u5BFC\u822A\u6570\u636E\n */\nconst MobileNavigation = forwardRef<HTMLDivElement, MobileNavigationProps>(({ data }, ref) => {\n const groupCategories = useMemo(() => {\n return WithGroupCategory(data?.categories?.filter((item: any) => item?.mobileShow))\n }, [data])\n\n const { currentMenu, setCurrentMenu, subSubCategory } = useNavContext()\n const [mobileMenuOpen, setMobileMenuOpen] = useState(false)\n const [menuInnerHeight, setMenuInnerHeight] = useState(0)\n const [categoriesItem, setCategoriesItem] = useState<any>(null)\n\n const mobileMenuRef = useRef<HTMLDivElement>(null)\n\n useEffect(() => {\n if (mobileMenuRef?.current && mobileMenuOpen) {\n const rect = mobileMenuRef?.current?.getBoundingClientRect()\n setMenuInnerHeight(window?.innerHeight - (rect?.bottom || 0))\n }\n }, [mobileMenuOpen])\n\n useGSAP(() => {\n gsap.fromTo(\n mobileMenuRef.current,\n {\n height: 0,\n },\n {\n height: menuInnerHeight,\n duration: 0.3,\n }\n )\n }, [menuInnerHeight])\n\n useEffect(() => {\n document.documentElement.style.overflow = mobileMenuOpen ? 'hidden' : 'auto'\n }, [mobileMenuOpen])\n\n const currentBlockTypeCategories = useMemo(() => {\n return categoriesItem?.components?.[0]?.blockType\n }, [categoriesItem])\n\n const MobileSupportMenuComp = WithSupports(MobileSupportMenu, {\n categoriesItem,\n })\n\n const MobileSidebarMenuComp = WithSidebar(MobileSidebarMenu, categoriesItem)\n const MobileMulticolMenuComp = WithMulticol(MobileMulticolMenu, categoriesItem)\n\n const MobileCategoriesMenuComp = useMemo(() => {\n switch (currentBlockTypeCategories) {\n case HeaderNavigationBlockType.Sidebar:\n return <MobileSidebarMenuComp />\n case HeaderNavigationBlockType.Supports:\n return <MobileSupportMenuComp />\n case HeaderNavigationBlockType.Multicol:\n return <MobileMulticolMenuComp />\n default:\n return null\n }\n }, [currentBlockTypeCategories, categoriesItem, MobileSupportMenuComp])\n\n const handleSecondaryMenuClose = useCallback(() => {\n setMobileMenuOpen(false)\n setMenuInnerHeight(0)\n setCurrentMenu && setCurrentMenu(HeaderNavigationMenu.Primary)\n }, [setMobileMenuOpen, setMenuInnerHeight, setCurrentMenu])\n\n const menuActions = useMemo(() => {\n return data?.headerBar?.actions?.filter(\n (item: any) => item?.mobileShow && item?.blockType !== HeaderNavigationActionBlockType.Profile // \u79FB\u52A8\u7AEF\u4E0D\u663E\u793Aprofile\u6309\u94AE\n )\n }, [data])\n\n const profileAction = useMemo(() => {\n return (\n data?.headerBar?.actions?.find(\n (item: any) => item?.mobileShow && item?.blockType === HeaderNavigationActionBlockType.Profile\n ) || {}\n )\n }, [data])\n\n const MobileCategoriesHeaderComp = useMemo(() => {\n switch (currentMenu) {\n case HeaderNavigationMenu.Primary:\n return (\n <PrimaryHeader\n actions={menuActions}\n menuOpen={mobileMenuOpen}\n onMenuOpenClose={() => {\n setMobileMenuOpen(false)\n setMenuInnerHeight(0)\n }}\n onMenuOpenClick={() => setMobileMenuOpen(true)}\n />\n )\n case HeaderNavigationMenu.Secondary:\n return (\n <SecondaryHeader\n title={categoriesItem?.text}\n onMenuOpenClose={handleSecondaryMenuClose}\n onMenuBackClick={() => setCurrentMenu?.(HeaderNavigationMenu.Primary)}\n />\n )\n case HeaderNavigationMenu.Third:\n return (\n <SecondaryHeader\n title={subSubCategory?.label}\n onMenuOpenClose={handleSecondaryMenuClose}\n onMenuBackClick={() => setCurrentMenu?.(HeaderNavigationMenu.Secondary)}\n />\n )\n default:\n return null\n }\n }, [\n mobileMenuOpen,\n currentMenu,\n setCurrentMenu,\n categoriesItem,\n menuActions,\n subSubCategory,\n handleSecondaryMenuClose,\n ])\n\n const handlePrimaryMenuClick = useCallback(\n (groupIndex: number, index: number) => {\n const categoriesItem = Array.isArray(groupCategories)\n ? Array.isArray(groupCategories[groupIndex])\n ? groupCategories[groupIndex][index]\n : {}\n : {}\n setCategoriesItem(categoriesItem)\n if (categoriesItem?.components?.[0]?.blockType === HeaderNavigationBlockType.Links) {\n // link\u6A21\u5757\u7279\u6B8A\u5904\u7406\n categoriesItem?.components?.[0]?.url && window.open(categoriesItem?.components?.[0]?.url)\n } else {\n setCurrentMenu?.(HeaderNavigationMenu.Secondary)\n }\n },\n [groupCategories, setCurrentMenu]\n )\n\n return (\n <Container className=\"relative h-[52px]\">\n {/* \u79FB\u52A8\u7AEF\u5206\u7C7B\u83DC\u5355 */}\n {MobileCategoriesHeaderComp}\n {mobileMenuOpen && (\n <div\n ref={mobileMenuRef}\n className=\"absolute left-0 top-full border-t border-[#E5E5E7] z-[999] w-full overflow-y-auto bg-white\"\n style={{ height: menuInnerHeight }}\n >\n {currentMenu === HeaderNavigationMenu.Primary ? (\n <MobilePrimaryMenu\n categories={groupCategories}\n onPrimaryMenuClick={handlePrimaryMenuClick}\n profileAction={profileAction}\n />\n ) : (\n MobileCategoriesMenuComp\n )}\n </div>\n )}\n </Container>\n )\n})\n\n/**\n * \u79FB\u52A8\u7AEF\u4E00\u7EA7\u83DC\u5355\n * @param categories \u5206\u7C7B\n * @param onPrimaryMenuClick \u4E00\u7EA7\u83DC\u5355\u70B9\u51FB\n */\nconst MobilePrimaryMenu = ({\n categories,\n onPrimaryMenuClick,\n profileAction,\n}: {\n categories: any\n onPrimaryMenuClick: (groupIndex: number, index: number) => void\n profileAction: any\n}) => {\n return (\n <div className=\"flex h-full flex-col justify-between\">\n <div className=\"tablet:px-8 laptop:px-16 p-4\">\n {categories?.map((groupItem: any, groupIndex: number) => (\n <div key={`groupCategory-${groupIndex}`} className=\"\">\n {groupItem?.map((item: any, index: number) => (\n <MenuItem\n key={item.id}\n label={item.text}\n onClick={() => onPrimaryMenuClick(groupIndex, index)}\n icon={item.components?.[0]?.icon}\n />\n ))}\n <div\n className={cn('my-2 h-px w-full bg-[#E5E5E7]', { ['hidden']: groupIndex === categories.length - 1 })}\n />\n </div>\n ))}\n </div>\n <ProfileComp profileAction={profileAction} />\n </div>\n )\n}\n\n/**\n * \u79FB\u52A8\u7AEF\u4FA7\u8FB9\u680F\u4E0B\u62C9\n * @param sidebarCategoriesMetadata \u4FA7\u8FB9\u680F\u5206\u7C7B\u5143\u6570\u636E\n * @param seriesMetadata \u4FA7\u8FB9\u680F\u7CFB\u5217\u5143\u6570\u636E\n */\nconst MobileSidebarMenu = ({\n sidebarCategoriesMetadata,\n seriesMetadata,\n}: {\n sidebarCategoriesMetadata: any\n seriesMetadata: any\n}) => {\n const {\n currentMenu,\n setCurrentMenu,\n subSubCategory,\n setSubSubCategory,\n setCurrentSeriesMetadata,\n currentSeriesMetadata,\n buildProps,\n } = useNavContext()\n const [expandedSubcategory, setExpandedSubcategory] = useState<{ index: number; open: boolean }[]>([])\n const [expandedSeriesCategories, setExpandedSeriesCategories] = useState<{ index: number; open: boolean }[]>([])\n\n useEffect(() => {\n if (sidebarCategoriesMetadata?.subcategories?.length) {\n setExpandedSubcategory(\n sidebarCategoriesMetadata?.subcategories?.map((_: any, index: number) => ({\n index,\n open: false,\n }))\n )\n }\n }, [sidebarCategoriesMetadata])\n\n useEffect(() => {\n if (subSubCategory?.subSubCategories?.length) {\n setExpandedSeriesCategories(\n subSubCategory?.subSubCategories?.map((_: any, index: number) => ({\n index,\n open: index === 0,\n }))\n )\n }\n }, [subSubCategory])\n\n const handleSubSubCategoryClick = useCallback(\n (item: any, subIndex?: number) => {\n setCurrentMenu && setCurrentMenu(HeaderNavigationMenu.Third)\n setSubSubCategory?.(item)\n const curSeriesMetadata =\n seriesMetadata?.find((seriesItem: any) =>\n subIndex !== undefined\n ? item?.subSubCategories?.[subIndex]?.label?.toLowerCase() === seriesItem.label?.toLowerCase()\n : item?.label?.toLowerCase() === seriesItem.label?.toLowerCase()\n ) || {}\n // \u901A\u8FC7categoriesMetadata\u7684subSubCategories\u7684label\u4E0Eseries\u7684label\u5339\u914D\n if (item?.collections) {\n const category = buildProps?.categories?.[item?.collections] || {}\n setCurrentSeriesMetadata?.({\n label: category?.name || item?.label,\n isCollection: true,\n banner: curSeriesMetadata?.banner,\n series: [\n {\n products: category?.products,\n },\n ],\n })\n } else {\n setCurrentSeriesMetadata?.(curSeriesMetadata)\n }\n },\n [seriesMetadata, sidebarCategoriesMetadata, setCurrentMenu, setSubSubCategory, setCurrentSeriesMetadata]\n )\n\n const defaultGuide = useMemo(() => {\n return seriesMetadata?.find((item: any) => !!item?.guide)?.guide\n }, [seriesMetadata, sidebarCategoriesMetadata])\n\n const MobileSidebarMenuComp = useMemo(() => {\n switch (currentMenu) {\n case HeaderNavigationMenu.Secondary:\n return (\n // \u4E8C\u7EA7\u83DC\u5355\n <div className=\"tablet:px-8 laptop:px-16 flex h-full flex-col justify-between tablet:justify-start tablet:gap-16 p-4\">\n <div>\n {sidebarCategoriesMetadata?.subcategories?.map((item: any, index: number) => {\n return (\n <div key={`${item.label}-${index}`}>\n <MenuItem\n label={item?.label}\n active={expandedSubcategory.find(item => item.index === index)?.open}\n onClick={() => {\n handleSubSubCategoryClick(item)\n }}\n />\n {/* {expandedSubcategory.find(item => item.index === index)?.open &&\n item.subSubCategories?.map((subItem: any, subIndex: number) => (\n <div\n key={`${index}-${subIndex}`}\n className=\"px-2 py-4\"\n onClick={() => handleSubSubCategoryClick(item, subIndex)}\n >\n <Text html={subItem.label} className=\"text-sm font-bold leading-[1.4]\" />\n </div>\n ))} */}\n </div>\n )\n })}\n </div>\n <div className=\"tablet:items-start flex flex-col items-center gap-4\">\n {sidebarCategoriesMetadata?.primary && (\n <Button\n as=\"a\"\n href={sidebarCategoriesMetadata?.primary?.url}\n variant=\"primary\"\n size=\"lg\"\n className=\"tablet:w-auto w-full text-base\"\n >\n {sidebarCategoriesMetadata?.primary?.label}\n </Button>\n )}\n {sidebarCategoriesMetadata?.secondary && (\n <Button\n as=\"a\"\n href={sidebarCategoriesMetadata?.secondary?.url}\n variant=\"link\"\n size=\"lg\"\n className=\"tablet:w-auto tablet:px-0 w-full py-0 text-base\"\n >\n {sidebarCategoriesMetadata?.secondary?.label}\n </Button>\n )}\n </div>\n </div>\n )\n case HeaderNavigationMenu.Third:\n return (\n // \u4E09\u7EA7\u83DC\u5355\n <div className=\"tablet:px-8 laptop:px-16 p-4\">\n {subSubCategory?.subSubCategories ? (\n subSubCategory?.subSubCategories?.map((subSubCategoryItem: any, index: number) => {\n const curSeriesMetadata =\n seriesMetadata?.find(\n (item: any) => item.label.toLowerCase() === subSubCategoryItem?.label?.toLowerCase()\n ) || {}\n let matchSeriesMetadata = {} as any\n if (subSubCategoryItem?.collections) {\n const category = buildProps?.categories?.[subSubCategoryItem?.collections] || {}\n matchSeriesMetadata = {\n label: category?.name || subSubCategoryItem?.label,\n isCollection: true,\n banner: curSeriesMetadata?.banner,\n series: [\n {\n products: category?.products,\n },\n ],\n }\n } else {\n matchSeriesMetadata = curSeriesMetadata\n }\n return (\n <div key={`${subSubCategoryItem.label}-${index}`}>\n {Reflect.ownKeys(subSubCategoryItem).length > 0 && (\n <SubSubCategoryItemComp\n matchSeriesMetadata={matchSeriesMetadata}\n onSubSubCategoryItemClick={() =>\n setExpandedSeriesCategories(prev => prev.map((item, i) => ({ ...item, open: i === index })))\n }\n expanded={!!expandedSeriesCategories?.find(item => item.index === index)?.open}\n />\n )}\n {expandedSeriesCategories?.find(item => item.index === index)?.open && (\n <>\n <SubSubCategoryContentComp matchSeriesMetadata={matchSeriesMetadata} />\n {matchSeriesMetadata?.primary && (\n <div className=\"text-center my-4\">\n <Button\n as=\"a\"\n href={matchSeriesMetadata?.primary?.url}\n className=\"text-base no-underline leading-[1.2]\"\n variant=\"secondary\"\n size=\"base\"\n >\n {matchSeriesMetadata?.primary?.label}\n </Button>\n </div>\n )}\n </>\n )}\n </div>\n )\n })\n ) : (\n <>\n {Reflect.ownKeys(currentSeriesMetadata).length > 0 && (\n <SubSubCategoryItemComp matchSeriesMetadata={currentSeriesMetadata} />\n )}\n <SubSubCategoryContentComp matchSeriesMetadata={currentSeriesMetadata} />\n {currentSeriesMetadata?.primary && (\n <div className=\"text-center my-4 \">\n <Button\n as=\"a\"\n href={currentSeriesMetadata?.primary?.url}\n variant=\"secondary\"\n size=\"base\"\n className=\"text-base no-underline leading-[1.2]\"\n >\n {currentSeriesMetadata?.primary?.label}\n </Button>\n </div>\n )}\n </>\n )}\n {defaultGuide && (\n <Link href={defaultGuide?.url}>\n <div className=\"mt-4\">\n <Text html={defaultGuide?.label} className=\"text-sm font-bold leading-[1.2] text-[#6D6D6F]\" />\n </div>\n </Link>\n )}\n </div>\n )\n default:\n return null\n }\n }, [\n currentMenu,\n sidebarCategoriesMetadata,\n setCurrentMenu,\n seriesMetadata,\n expandedSubcategory,\n expandedSeriesCategories,\n setSubSubCategory,\n subSubCategory,\n setCurrentSeriesMetadata,\n currentSeriesMetadata,\n ])\n\n return MobileSidebarMenuComp\n}\n\nconst SubSubCategoryItemComp = ({\n matchSeriesMetadata,\n onSubSubCategoryItemClick,\n expanded,\n}: {\n matchSeriesMetadata: any\n onSubSubCategoryItemClick?: () => void\n expanded?: boolean\n}) => {\n return (\n <div className=\"tablet:pt-0 py-4 flex items-center justify-between\" onClick={onSubSubCategoryItemClick}>\n {matchSeriesMetadata?.label && (\n <Text html={matchSeriesMetadata?.label} className=\"text-sm font-bold leading-[1.4]\" />\n )}\n {onSubSubCategoryItemClick && (\n <DownArrow\n className={cn('size-5', {\n ['rotate-180']: expanded,\n })}\n />\n )}\n </div>\n )\n}\n\nconst SubSubCategoryContentComp = ({ matchSeriesMetadata }: { matchSeriesMetadata: any }) => {\n return (\n <div className=\"flex flex-col gap-2 laptop:gap-3\">\n {!!matchSeriesMetadata?.series?.length &&\n matchSeriesMetadata?.series?.map((seriesItem: any, pIndex: number) => (\n <div key={`seriesItem-${pIndex}`}>\n {seriesItem.label && (\n <Text html={seriesItem.label} className=\"text-sm mb-2 font-bold leading-[1.4] text-[#3D3D3F]\" />\n )}\n <div className=\"laptop:grid-cols-3 laptop:gap-4 tablet:grid tablet:grid-cols-2 tablet:gap-3 flex flex-col gap-2\">\n {!!matchSeriesMetadata?.banner && matchSeriesMetadata?.isCollection && (\n <Link asChild={!matchSeriesMetadata?.banner?.href} href={matchSeriesMetadata?.banner?.href}>\n <div className=\"relative [&_img]:hover:scale-105 [&_img]:hover:transition-all [&_img]:hover:duration-300\">\n <Picture\n source={matchSeriesMetadata?.banner?.imageUrl}\n className=\"h-[114px] laptop:h-[120px]\"\n imgClassName=\"object-cover h-full\"\n />\n <div className=\"absolute bottom-0 left-0 right-0 p-4\">\n <Heading\n size={2}\n html={matchSeriesMetadata?.banner?.title || 'Buy in Guide'}\n className={cn('font-bold text-white', {\n 'text-black': matchSeriesMetadata?.banner?.theme === 'dark',\n })}\n />\n <Text\n html={matchSeriesMetadata?.banner?.desc || '20.000mAh'}\n className={cn('text-sm text-white font-bold', {\n 'text-black': matchSeriesMetadata?.banner?.theme === 'dark',\n })}\n />\n </div>\n </div>\n </Link>\n )}\n {seriesItem.products?.map((product: any, index: number) => (\n <SeriesProductItem\n key={`seriesProductItem-${pIndex}-${index}`}\n product={product}\n isCollection={matchSeriesMetadata?.isCollection}\n />\n ))}\n </div>\n </div>\n ))}\n </div>\n )\n}\n\n/**\n * \u79FB\u52A8\u7AEFsupport\u83DC\u5355\n * @param supportsMetadata support\u83DC\u5355\u5143\u6570\u636E\n */\nconst MobileSupportMenu = ({ supportsMetadata }: { supportsMetadata: any }) => {\n return (\n <div className=\"tablet:px-8 laptop:px-16 p-4\">\n {supportsMetadata?.map((supportItem: any) => (\n <MenuItem key={supportItem.id} href={supportItem.url} label={supportItem.label} onClick={() => {}} />\n ))}\n </div>\n )\n}\n\n/**\n * \u79FB\u52A8\u7AEFmulticol\u83DC\u5355\n * @param multicolMetadata multicol\u83DC\u5355\u5143\u6570\u636E\n */\nconst MobileMulticolMenu = ({ multicolMetadata }: { multicolMetadata: any }) => {\n // \u662F\u5426\u5168\u90E8\u662F\u56FE\u7247\n const allPicture = useMemo(() => {\n return !multicolMetadata?.some((item: any) => !!item.columns)\n }, [multicolMetadata])\n\n return (\n <div\n className={cn('tablet:py-4 tablet:px-8 laptop:px-16 flex flex-col gap-4 tablet:gap-6 p-4', {\n ['tablet:grid tablet:grid-cols-2 tablet:gap-3 laptop:gap-4']: allPicture,\n })}\n >\n {multicolMetadata?.map((item: any, index: number) => (\n <div key={`multicolItem-${item?.label}-${index}`}>\n <MulticolItem item={item} allPicture={allPicture} />\n </div>\n ))}\n </div>\n )\n}\n\n/**\n * \u79FB\u52A8\u7AEFprofile\u7EC4\u4EF6\n * @param profileAction profile\u83DC\u5355\u5143\u6570\u636E\n */\nconst ProfileComp = ({ profileAction }: { profileAction: any }) => {\n const [profileOpen, setProfileOpen] = useState(false)\n const { profile, event } = useNavContext()\n return (\n <div\n className={cn('tablet:px-8 laptop:px-16 bg-[#F5F5F7] px-4 py-6', {\n 'p-4': profileOpen,\n })}\n >\n <div className=\"flex items-center justify-between\" onClick={() => setProfileOpen(!profileOpen)}>\n <div className=\"flex items-center gap-[14px]\">\n <div className=\"flex size-[40px] shrink-0 items-center justify-center rounded-full bg-white\">\n <User />\n </div>\n <Text html={profile?.nick_name || profileAction?.welcome} className=\"text-base font-bold leading-[1.4]\" />\n </div>\n <DownArrow className={cn('size-5 laptop:size-4', { 'rotate-180': profileOpen })} />\n </div>\n {profile?.email && (\n <div className=\"mt-4\">\n {profileAction?.profiles?.map((item: any) => <MenuItem key={item.id} label={item?.title} href={item?.url} />)}\n </div>\n )}\n {profileOpen && !profile?.email && (\n <div className=\"mt-4\">\n <Text html={profileAction?.benefits_title} className=\"text-sm font-bold leading-[1.4]\" />\n <div className=\"mt-2 flex flex-col gap-1\">\n {profileAction?.benefits?.map((item: any) => (\n <div key={item.id} className=\"flex items-center gap-[6px]\">\n <Picture source={item.benefitIcon?.url} className=\"size-4\" alt={item.benefit} width={16} height={16} />\n <Text html={item.benefit} className=\"text-sm font-bold leading-[1.4]\" />\n </div>\n ))}\n </div>\n </div>\n )}\n <div className=\"mt-4 flex items-center gap-3\">\n <Button className=\"tablet:flex-none flex-1\" variant=\"secondary\" size=\"base\" onClick={() => event?.join?.()}>\n <Text html={profileAction?.primaryButton || 'Join Now'} className=\"text-sm font-bold leading-[1.4]\" />\n </Button>\n <Button className=\"tablet:flex-none flex-1\" variant=\"primary\" size=\"base\" onClick={() => event?.login?.()}>\n <Text html={profileAction?.secondaryButton || 'Log In'} className=\"text-sm font-bold leading-[1.4]\" />\n </Button>\n </div>\n </div>\n )\n}\n\nconst PrimaryHeader = ({ menuOpen, onMenuOpenClose, onMenuOpenClick, actions }: MobilePrimaryNavigationData) => {\n return (\n <div className=\"flex h-full items-center justify-between gap-4\">\n <Logo />\n <div className=\"desktop:gap-6 flex items-center gap-4\">\n <Actions actions={actions} />\n {menuOpen ? (\n <Close className=\"size-5\" onClick={() => onMenuOpenClose()} />\n ) : (\n <Menu className=\"size-5\" onClick={() => onMenuOpenClick()} />\n )}\n </div>\n </div>\n )\n}\n\nconst Logo = () => {\n const { payloadData, isMobile } = useNavContext()\n return (\n <div\n className=\"[&>svg]:w-full\"\n dangerouslySetInnerHTML={{\n __html: isMobile ? payloadData?.headerBar?.mobileLogo : payloadData?.headerBar?.desktopLogo,\n }}\n />\n )\n}\n\nconst Actions = forwardRef<HTMLDivElement, { actions: any; activeStatus?: boolean }>(\n ({ actions, activeStatus = false }, ref) => {\n const { event } = useNavContext()\n const [activeAction, setActiveAction] = useState<any>(null)\n\n const handleActionClick = useCallback(\n (action: any, index: number) => {\n setActiveAction(index)\n switch (action?.blockType) {\n case HeaderNavigationActionBlockType.Search:\n event?.search?.()\n break\n case HeaderNavigationActionBlockType.Cart:\n event?.cart?.()\n break\n case HeaderNavigationActionBlockType.Profile:\n event?.profile?.()\n break\n case HeaderNavigationActionBlockType.Livestream:\n event?.livestream?.()\n break\n default:\n return () => {}\n }\n },\n [event]\n )\n\n return (\n <div className=\"desktop:gap-6 flex items-center gap-4\">\n {Array.isArray(actions) &&\n actions?.map((action: any, index: number) => (\n <div\n key={action.id}\n ref={action.blockType === HeaderNavigationActionBlockType.Profile ? ref : null}\n onClick={() => handleActionClick(action, index)}\n >\n <Text\n html={action.icon}\n className={cn('cursor-pointer size-5', { 'text-brand-0': activeStatus && activeAction === index })}\n />\n </div>\n ))}\n </div>\n )\n }\n)\n\nconst SecondaryHeader = ({ title, onMenuOpenClose, onMenuBackClick }: MobileSecondaryNavigationData) => {\n return (\n <div className=\"flex h-full items-center gap-3\">\n <LeftArrow className=\"size-5\" onClick={() => onMenuBackClick()} />\n <Text html={title} className=\"flex-1 text-center text-base font-bold leading-[1.4]\" />\n <Close className=\"size-5\" onClick={() => onMenuOpenClose()} />\n </div>\n )\n}\n\nconst MenuItem = ({\n label,\n href,\n onClick,\n active,\n icon,\n}: {\n label: string\n href?: string\n onClick?: () => void\n active?: boolean\n icon?: string\n}) => {\n return (\n <div className=\"flex cursor-pointer items-center justify-between py-4\" onClick={onClick}>\n <Link href={href} asChild={!href} className=\"flex w-full items-center justify-between no-underline\">\n <div className=\"flex items-center gap-4\">\n <Text html={label} className={cn('text-sm font-bold leading-[1.4]', { underline: icon })} />\n {icon && <Text html={icon} />}\n </div>\n <RightArrow className={cn('size-5 laptop:size-4', { 'rotate-90': active })} />\n </Link>\n </div>\n )\n}\n\nexport default withLayout(HeaderNavigation)\n"],
|
|
5
|
-
"mappings": "aAwKY,OA2uBJ,YAAAA,GA3uBI,OAAAC,EAIA,QAAAC,MAJA,oBAvKZ,OAAOC,IACL,cAAAC,EACA,eAAAC,EACA,aAAAC,EACA,uBAAAC,GAEA,WAAAC,EACA,UAAAC,EACA,YAAAC,MACK,QAEP,OAAS,WAAAC,EAAS,QAAAC,EAAM,UAAAC,EAAQ,aAAAC,EAAW,QAAAC,EAAM,WAAAC,OAAe,4BAEhE,OAAS,cAAAC,OAAkB,yBAE3B,OAAS,MAAAC,EAAI,UAAAC,OAAc,yBAS3B,OAAOC,IAAe,iBAAAC,MAAqB,mBAE3C,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,wDAAwD,QAAS4N,EAC9E,SAAA3N,EAACa,EAAA,CAAK,KAAM6M,EAAM,QAAS,CAACA,EAAM,UAAU,wDAC1C,UAAA1N,EAAC,OAAI,UAAU,0BACb,UAAAD,EAACW,EAAA,CAAK,KAAM+M,EAAO,UAAWzM,EAAG,kCAAmC,CAAE,UAAW6M,CAAK,CAAC,EAAG,EACzFA,GAAQ9N,EAACW,EAAA,CAAK,KAAMmN,EAAM,GAC7B,EACA9N,EAACmC,GAAA,CAAW,UAAWlB,EAAG,uBAAwB,CAAE,YAAa4M,CAAO,CAAC,EAAG,GAC9E,EACF,EAIJ,IAAOE,GAAQ/M,GAAWwB,EAAgB",
|
|
6
|
-
"names": ["Fragment", "jsx", "jsxs", "
|
|
4
|
+
"sourcesContent": ["import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react'\n\nimport { Picture, Text, Button, Container, Link } from '../../components/index.js'\n\nimport { withLayout } from '../../shared/Styles.js'\n\nimport { cn, atobID } from '../../helpers/utils.js'\n\nimport type {\n MobilePrimaryNavigationData,\n MobileSecondaryNavigationData,\n MobileNavigationProps,\n DesktopNavigationProps,\n HeaderNavigationProps,\n} from './types.js'\nimport NavProvider, { useNavContext } from './NavProvider.js'\n\nimport { HeaderNavigationMenu, HeaderNavigationBlockType, HeaderNavigationActionBlockType } from './types.js'\n\nimport { useMediaQuery } from 'react-responsive'\nimport { debounce, throttle } from 'es-toolkit'\n\nimport { useGSAP } from '@gsap/react'\nimport { gsap } from 'gsap'\nimport type { Product, ProductVariant } from '../../cpn-components/CpnProductCard/types.js'\n\nimport { WithSidebar, WithSupports, WithMulticol, WithGroupCategory } from './withCategory.js'\n\nimport { Menu, Close, User, RightArrow, LeftArrow, DownArrow, LogoLine } from './icons/index.js'\n\nconst HeaderNavigation = forwardRef<HTMLDivElement, HeaderNavigationProps>((props, ref) => {\n const { data: { headerNavigation } = {}, buildProps, event, profile, theme = 'light' } = props\n\n const [isMobile, setIsMobile] = useState(false)\n const [headerHidden, setHeaderHidden] = useState(false)\n const [changeHeaderBackground, setChangeHeaderBackground] = useState(false)\n\n const headerRef = useRef<HTMLDivElement>(null)\n\n const mediaQuery = useMediaQuery({ query: '(max-width: 1440px)' })\n\n useEffect(() => {\n setIsMobile(mediaQuery)\n }, [mediaQuery])\n\n useImperativeHandle(ref, () => headerRef.current as HTMLDivElement)\n\n useEffect(() => {\n let upwardDistance = 0\n let lastScrollY = 0\n const showDownNav = throttle(latest => {\n const delta = lastScrollY - latest\n if (delta > 0) {\n upwardDistance += delta\n if (upwardDistance >= 300) {\n setHeaderHidden(false)\n upwardDistance = 0\n }\n } else {\n setHeaderHidden(latest > 300)\n }\n setChangeHeaderBackground(latest > 24)\n lastScrollY = latest\n }, 200)\n\n const scrollAnimate = () => {\n let scrollTop = 0\n if (document?.documentElement && document?.documentElement?.scrollTop) {\n scrollTop = document?.documentElement.scrollTop\n } else if (document?.body) {\n scrollTop = document?.body.scrollTop\n }\n showDownNav(scrollTop)\n }\n\n window.addEventListener('scroll', scrollAnimate)\n\n return () => window.removeEventListener('scroll', scrollAnimate)\n }, [])\n\n return (\n <NavProvider\n buildProps={buildProps}\n profile={profile}\n isMobile={isMobile}\n event={event}\n payloadData={headerNavigation}\n >\n <header data-ui-component-id=\"HeaderNavigation\" className=\"sticky top-0 z-50\" ref={headerRef}>\n <div\n className={cn(\n 'border-b border-b-gray-200',\n theme === 'light' ? 'text-black' : 'text-white',\n {\n ['translate-y-[-100%] transition-transform duration-500 ease-in-out']: headerHidden,\n ['!bg-white transition-all duration-500 ease-in-out']: changeHeaderBackground,\n },\n {\n ['hover:!text-black']: theme === 'dark',\n ['!text-black']: changeHeaderBackground,\n }\n )}\n >\n {!isMobile && <DesktopNavigation data={headerNavigation} />}\n {isMobile && <MobileNavigation data={headerNavigation} />}\n </div>\n </header>\n </NavProvider>\n )\n})\n\nconst DesktopNavigation = forwardRef<HTMLDivElement, DesktopNavigationProps>((props, ref) => {\n const { data } = props\n const { event } = useNavContext()\n\n const groupCategories = useMemo(() => {\n return WithGroupCategory(data?.categories) as any[][]\n }, [data])\n\n const [categoriesItem, setCategoriesItem] = useState<any>(null)\n const [navStatusArray, setNavStatusArray] = useState<{ index: number; groupIndex: number; open: boolean }[][]>([])\n const profileRef = useRef<HTMLDivElement>(null)\n const [userProfileOpen, setUserProfileOpen] = useState(false)\n const headerRef = useRef<HTMLDivElement>(null)\n const navItemRefs = useRef<HTMLDivElement[][]>(\n groupCategories.map((categories: any) => Array(categories?.length || 0).fill(null))\n )\n\n useEffect(() => {\n if (groupCategories?.length) {\n setNavStatusArray(\n groupCategories?.map((groupItem: any, groupIndex: number) => {\n return groupItem?.map((_: any, index: number) => ({ groupIndex, index, open: false }))\n })\n )\n }\n }, [groupCategories])\n\n const currentNavItem = useMemo(() => {\n let currentNavItem: { index: number; groupIndex: number; open: boolean } | null = null\n for (const groupItem of navStatusArray) {\n for (const item of groupItem) {\n if (item.open) {\n currentNavItem = item\n break\n }\n }\n if (currentNavItem) {\n break\n }\n }\n return currentNavItem\n }, [navStatusArray])\n\n useEffect(() => {\n // document.documentElement.style.overflow = currentNavItem?.open ? 'hidden' : 'auto'\n }, [currentNavItem])\n\n const handleNavItemClick = (e: any, groupIndex: number, index: number) => {\n e.stopPropagation()\n setCategoriesItem(groupCategories[groupIndex][index])\n setNavStatusArray(prev =>\n prev.map(groupItem =>\n groupItem.map(item =>\n item.groupIndex === groupIndex && item.index === index\n ? { ...item, open: !item.open }\n : { ...item, open: false }\n )\n )\n )\n }\n\n const handleNavMenuClose = () => {\n setNavStatusArray(prev => prev.map(groupItem => groupItem.map(item => ({ ...item, open: false }))))\n }\n\n const currentBlockTypeCategories = useMemo(() => {\n if (categoriesItem) return categoriesItem?.components?.[0]?.blockType\n }, [categoriesItem])\n\n const SidebarDropdownComp = WithSidebar(SidebarDropdown, categoriesItem)\n const SupportsDropdownComp = WithSupports(SupportsDropdown, {\n categoriesItem,\n currentNavItemRef: navItemRefs.current?.[currentNavItem?.groupIndex || 0]?.[currentNavItem?.index || 0],\n })\n const MulticolDropdownComp = WithMulticol(MulticolDropdown, categoriesItem)\n\n const DropdownComp = useMemo(() => {\n switch (currentBlockTypeCategories) {\n case HeaderNavigationBlockType.Sidebar:\n return <SidebarDropdownComp />\n case HeaderNavigationBlockType.Supports:\n return <SupportsDropdownComp />\n case HeaderNavigationBlockType.Multicol:\n return <MulticolDropdownComp />\n default:\n return null\n }\n }, [currentBlockTypeCategories, MulticolDropdownComp, SidebarDropdownComp, SupportsDropdownComp])\n\n const actions = useMemo(() => {\n return data?.headerBar?.actions?.filter((item: any) => item?.pcShow)\n }, [data])\n\n const profileAction = useMemo(() => {\n return actions?.find((item: any) => item?.blockType === HeaderNavigationActionBlockType.Profile)\n }, [actions])\n\n const handleProfileClick = useCallback(() => {\n setUserProfileOpen(prev => !prev)\n }, [])\n\n useEffect(() => {\n if (profileRef?.current) {\n const profileRefElement = profileRef.current as HTMLDivElement\n profileRefElement.addEventListener('click', handleProfileClick)\n\n return () => {\n profileRefElement.removeEventListener('click', handleProfileClick)\n }\n }\n }, [handleProfileClick])\n\n return (\n <Container childClassName=\"bg-white\" className=\"relative h-[96px]\">\n <div ref={headerRef} onClick={handleNavMenuClose} className=\"flex h-full flex-col justify-end gap-4\">\n <div className=\"flex items-center justify-between\">\n <Logo />\n <Actions ref={profileRef} actions={actions} />\n </div>\n <div className=\"flex justify-between\">\n {groupCategories?.map((groupItem: any, groupIndex: number) => {\n return (\n <div key={`groupCategory-${groupIndex}`} className=\"flex gap-6\">\n {groupItem?.map((item: any, index: number) => {\n return (\n <div\n key={item.id}\n ref={(el: HTMLDivElement) => {\n navItemRefs.current[groupIndex][index] = el\n }}\n className=\"hover:text-brand-0 cursor-pointer\"\n >\n <div className=\"relative\">\n <div\n className=\"flex items-center gap-1 pb-4\"\n onClick={e => handleNavItemClick(e, groupIndex, index)}\n // onMouseEnter={() => handleMouseEnter(groupIndex, index)}\n >\n <Text\n html={item.text}\n className={cn(' text-sm font-bold leading-[1.4]', {\n 'text-brand-0':\n currentNavItem?.groupIndex === groupIndex && currentNavItem?.index === index,\n })}\n />\n <DownArrow\n className={cn({\n ['text-brand-0']:\n currentNavItem?.groupIndex === groupIndex && currentNavItem?.index === index,\n })}\n />\n </div>\n <div\n className={cn(\n 'absolute bottom-0 left-0 h-[2px] w-0 bg-[#1D1D1F] transition-all duration-500',\n {\n 'w-full': currentNavItem?.groupIndex === groupIndex && currentNavItem?.index === index,\n }\n )}\n />\n </div>\n </div>\n )\n })}\n </div>\n )\n })}\n </div>\n </div>\n {currentNavItem?.open && categoriesItem && (\n <div\n className=\"absolute left-0 top-full z-[999] flex w-full flex-col bg-black/70\"\n style={{ height: `calc(100vh - ${headerRef?.current?.getBoundingClientRect()?.bottom}px)` }}\n >\n <div className=\"relative z-50\">{DropdownComp}</div>\n <div className=\"flex-1 bg-transparent\" onClick={handleNavMenuClose} />\n </div>\n )}\n {userProfileOpen && (\n <div\n className=\"absolute left-0 z-[999] flex w-full bg-black/70\"\n style={{\n height: `calc(100vh - ${profileRef?.current?.getBoundingClientRect()?.bottom}px)`,\n top: `calc(12px + ${profileRef?.current?.getBoundingClientRect()?.top}px)`,\n }}\n >\n <div\n // onMouseLeave={handleProfileMouseLeave}\n // onMouseEnter={handleProfileMouseEnter}\n className=\"absolute max-w-[272px] bg-white p-4\"\n style={{ right: `calc(100% - ${profileRef?.current?.getBoundingClientRect()?.right}px)` }}\n >\n <Text html={profileAction?.benefits_title} className=\"text-sm font-bold leading-[1.4]\" />\n <div className=\"mt-3 flex flex-col gap-1\">\n {profileAction?.benefits?.map((item: any) => (\n <div key={item.id} className=\"flex items-center gap-[6px]\">\n <Picture\n source={item.benefitIcon?.url}\n className=\"size-4\"\n alt={item.benefit}\n width={16}\n height={16}\n />\n <Text html={item.benefit} className=\"text-sm font-bold leading-[1.4]\" />\n </div>\n ))}\n </div>\n <div className=\"mt-4 flex items-center gap-2\">\n <Button variant=\"secondary\" size=\"sm\" onClick={() => event?.join?.()}>\n <Text html={profileAction?.primaryButton || 'Join Now'} className=\"text-sm font-bold leading-[1.4]\" />\n </Button>\n <Button variant=\"primary\" size=\"sm\" onClick={() => event?.login?.()}>\n <Text html={profileAction?.secondaryButton || 'Log In'} className=\"text-sm font-bold leading-[1.4]\" />\n </Button>\n </div>\n </div>\n <div className=\"flex-1 bg-transparent\" onClick={() => setUserProfileOpen(false)} />\n </div>\n )}\n </Container>\n )\n})\n\n/**\n * \u4FA7\u8FB9\u680F\u4E0B\u62C9\n * @param categoriesItem \u5206\u7C7B\u9879\n */\nconst SidebarDropdown = ({\n sidebarCategoriesMetadata,\n seriesMetadata,\n}: {\n sidebarCategoriesMetadata: any\n seriesMetadata: any\n}) => {\n const [expandedSubcategory, setExpandedSubcategory] = useState<{ index: number; open: boolean }[]>([])\n const [activeSubSubcategoryIndex, setActiveSubSubcategoryIndex] = useState(0)\n const sidebarDropdownRef = useRef<HTMLDivElement>(null)\n\n useGSAP(() => {\n gsap.fromTo(\n sidebarDropdownRef?.current,\n {\n height: 0,\n },\n {\n height: 548,\n }\n )\n }, [])\n\n useEffect(() => {\n if (sidebarCategoriesMetadata?.subcategories?.length) {\n setExpandedSubcategory(\n sidebarCategoriesMetadata?.subcategories?.map((_: any, index: number) => ({ index, open: false }))\n )\n }\n }, [sidebarCategoriesMetadata])\n\n // \u901A\u8FC7categoriesMetadata\u7684subSubCategories\u7684label\u4E0Eseries\u7684label\u5339\u914D\n const matchSeriesMetadata = useMemo(() => {\n return (\n seriesMetadata?.find(\n (item: any) =>\n sidebarCategoriesMetadata?.subcategories?.[expandedSubcategory?.find(item => item.open)?.index || 0]\n ?.subSubCategories?.[activeSubSubcategoryIndex]?.label === item.label\n ) || {}\n )\n }, [sidebarCategoriesMetadata, expandedSubcategory, activeSubSubcategoryIndex, seriesMetadata])\n\n const handleSubcategoryOpen = (index: number) => {\n setExpandedSubcategory(prev =>\n prev.map(item => (item.index === index ? { ...item, open: !item.open } : { ...item, open: false }))\n )\n }\n\n const handleSubSubcategoryOpen = (index: number) => {\n setActiveSubSubcategoryIndex(index)\n }\n\n return (\n <Container childClassName=\"lg-desktop:gap-12 flex bg-white gap-8\">\n <div\n className=\"lg-desktop:basis-[356px] flex basis-[284px] flex-col gap-4 py-4\"\n style={{\n userSelect: 'none',\n }}\n >\n <div className=\"desktop:max-h-[416px] flex flex-col overflow-y-auto\">\n {sidebarCategoriesMetadata?.subcategories?.map((subItem: any, index: number) => (\n <div key={`subcategoryItem-${index}`}>\n <div\n className=\"flex cursor-pointer items-center justify-between\"\n onClick={() => handleSubcategoryOpen(index)}\n >\n <Text html={subItem.label} className=\"p-4 text-sm font-bold leading-[1.4]\" />\n <DownArrow\n className={cn({ ['rotate-180']: expandedSubcategory.find(item => item.index === index)?.open })}\n />\n </div>\n {expandedSubcategory.find(item => item.index === index)?.open && (\n <div className=\"flex flex-col\">\n {subItem.subSubCategories?.map((subSubItem: any, subSubindex: number) => (\n <Text\n html={subSubItem.label}\n onMouseEnter={() => handleSubSubcategoryOpen(subSubindex)}\n key={`subSubItem-${index}-${subSubindex}`}\n className={cn(\n 'cursor-pointer px-6 py-4 text-sm font-bold leading-[1.4] text-[#6D6D6F] hover:bg-[#F5F5F7]'\n )}\n />\n ))}\n </div>\n )}\n </div>\n ))}\n </div>\n <div className=\"flex\">\n <div className=\"flex flex-col gap-4\">\n <Button variant=\"primary\" size=\"lg\" className=\"text-base\">\n <a href={sidebarCategoriesMetadata?.primary?.url}>{sidebarCategoriesMetadata?.primary?.label}</a>\n </Button>\n <Button variant=\"link\" size=\"lg\" className=\"justify-start py-0 text-base\">\n <a href={sidebarCategoriesMetadata?.secondary?.url}>{sidebarCategoriesMetadata?.secondary?.label}</a>\n </Button>\n </div>\n </div>\n </div>\n {\n <div className=\"flex-1\">\n {Reflect.ownKeys(matchSeriesMetadata).length > 0 && (\n <div className=\"mb-4 flex items-center justify-between\">\n <div className=\"flex items-center gap-2\">\n <Text html={matchSeriesMetadata?.label} className=\"text-2xl font-bold leading-[1.4]\" />\n <Button variant=\"link\" size=\"lg\" className=\"justify-start p-0 text-base\">\n <Link\n href={matchSeriesMetadata?.primary?.url}\n className=\"text-base font-bold leading-[1.2] no-underline\"\n >\n {matchSeriesMetadata?.primary?.label}\n </Link>\n </Button>\n </div>\n <Link href={matchSeriesMetadata?.guide?.url} className=\"text-base leading-[1.2] text-[#6D6D6F]\">\n {matchSeriesMetadata?.guide?.label}\n </Link>\n </div>\n )}\n <div className=\"flex flex-col gap-4 overflow-y-auto\" ref={sidebarDropdownRef}>\n {matchSeriesMetadata?.series?.map((seriesItem: any, seriesIndex: number) => (\n <div key={`seriesItem-${seriesIndex}`}>\n <Text html={seriesItem.label} className=\"text-sm font-bold leading-[1.4] text-[#6D6D6F]\" />\n <div className=\"mt-2 grid grid-cols-3 gap-4\">\n {seriesItem.products?.map((product: any, index: number) => (\n <SeriesProductItem key={`seriesProductItem-${index}`} product={product} />\n ))}\n </div>\n </div>\n ))}\n </div>\n </div>\n }\n </Container>\n )\n}\n\n/**\n * \u591A\u5217\u4E0B\u62C9\n * @param categoriesItem \u5206\u7C7B\u9879\n */\nconst MulticolDropdown = ({ multicolMetadata }: { multicolMetadata: any }) => {\n const multicolDropdownRef = useRef<HTMLDivElement>(null)\n\n useGSAP(() => {\n gsap.fromTo(\n multicolDropdownRef?.current,\n {\n height: 0,\n },\n {\n height: 'auto',\n }\n )\n }, [])\n\n return (\n <div ref={multicolDropdownRef}>\n <Container childClassName=\"bg-white\" className=\"h-full\">\n <div className=\"flex gap-4 py-4\">\n {multicolMetadata?.map((item: any, index: number) => (\n <div key={`multicolItem-${item?.label}-${index}`} className=\"w-1/4\">\n <MulticolItem item={item} />\n </div>\n ))}\n </div>\n </Container>\n </div>\n )\n}\n\n/**\n * supports\u4E0B\u62C9\n * @param categoriesItem \u5206\u7C7B\u9879\n * @param currentNavItemRef \u5F53\u524D\u5BFC\u822A\u9879\n */\nconst SupportsDropdown = ({\n supportsMetadata,\n currentNavItemRef,\n}: {\n supportsMetadata: any\n currentNavItemRef: HTMLDivElement\n}) => {\n const supportsDropdownRef = useRef<HTMLDivElement>(null)\n const [navItemReact, setNavItemReact] = useState<DOMRect | null>(null)\n\n useGSAP(() => {\n gsap.fromTo(\n supportsDropdownRef?.current,\n {\n height: 0,\n },\n {\n height: 'auto',\n }\n )\n }, [])\n\n const debouncedHandleResize = debounce(() => {\n if (currentNavItemRef) {\n const rect = currentNavItemRef.getBoundingClientRect()\n setNavItemReact(rect)\n }\n }, 500)\n\n useEffect(() => {\n debouncedHandleResize()\n window.addEventListener('resize', debouncedHandleResize)\n return () => {\n window.removeEventListener('resize', debouncedHandleResize)\n }\n }, [debouncedHandleResize])\n\n useEffect(() => {\n if (currentNavItemRef) {\n const rect = currentNavItemRef.getBoundingClientRect()\n setNavItemReact(rect)\n }\n }, [currentNavItemRef])\n\n return (\n <div\n className=\"absolute top-0 h-full bg-white p-4\"\n ref={supportsDropdownRef}\n style={{ right: `calc(100% - ${navItemReact?.right}px)` }}\n >\n <div>\n {supportsMetadata?.map((supportItem: any) => (\n <div key={supportItem.id} className=\"py-2\">\n <Link href={supportItem.url} className=\"text-sm font-bold leading-[1.4] no-underline\">\n {supportItem.label}\n </Link>\n </div>\n ))}\n </div>\n </div>\n )\n}\n\nconst SeriesProductItem = ({ product }: { product: any }) => {\n const { buildProps } = useNavContext()\n const productData = buildProps?.products?.find((item: Product) => item.handle === product.handle)\n const variant = productData?.variants?.find((item: ProductVariant) => item.sku === product.sku)\n\n const listingLink = useMemo(() => {\n return `/products/${productData?.handle}?variant=${atobID(variant?.id as string)}`\n }, [productData?.handle, variant?.id])\n\n return (\n <div className=\"flex shrink-0 items-center gap-4 bg-[#F5F5F7] px-4 py-3 [&_img]:hover:scale-105\">\n <div className=\"shrink-0 basis-[96px]\">\n <Picture source={`${variant?.image?.url || product?.images?.[0]?.url}}`} width={96} height={96} />\n </div>\n <div className=\"relative\">\n {product?.badge && (\n <Text\n as=\"p\"\n html={product?.badge}\n className=\"text-brand-0 mb-1 inline-block h-[24px] rounded-full border-[1.6px] border-[#00BEFA] px-[6px] text-sm font-bold !leading-[24px]\"\n />\n )}\n <Link href={listingLink} className=\"no-underline\">\n <Text\n className=\"lg-desktop:h-[44px] lg-desktop:text-base line-clamp-2 h-[40px] text-sm font-bold leading-[1.4]\"\n html={productData?.title || product?.name}\n />\n </Link>\n {product?.desc && (\n <Text\n as=\"p\"\n html={product?.desc}\n className=\"lg-desktop:text-sm mt-1 text-xs font-bold leading-[1.4] text-[#6D6D6F]\"\n />\n )}\n </div>\n </div>\n )\n}\n\n/**\n * \u591A\u5217\u4E0B\u62C9\u9879\n * @param item \u591A\u5217\u4E0B\u62C9\u9879\n */\nconst MulticolItem = ({ item }: { item: any }) => {\n return (\n <>\n {item?.columns && (\n <>\n <Text html={item.label} as=\"div\" className=\"my-2 text-sm font-bold leading-[1.4] text-[#6D6D6F]\" />\n <div className=\"mt-2 flex flex-col\">\n {item.columns?.map((columnItem: any) => (\n <div key={columnItem.label} className=\"py-2\">\n <Link href={columnItem.url} className=\"text-sm font-bold leading-[1.4] no-underline\">\n {columnItem.label}\n </Link>\n </div>\n ))}\n </div>\n </>\n )}\n {item?.imageUrl && (\n <div className=\"laptop:h-[280px] laptop:w-[404px] desktop:w-full desktop:h-auto relative h-[240px] w-[358px]\">\n <Picture source={item.imageUrl} width={404} height={280} />\n <Link href={item.url} className=\"absolute inset-0 z-10 flex flex-col justify-end p-4 no-underline\">\n <Text html={item.title} className=\"desktop:text-2xl text-xl font-bold leading-[1.2] text-white\" />\n <Text html={item.subtitle} className=\"text-sm font-bold leading-[1.4] text-white\" />\n </Link>\n </div>\n )}\n </>\n )\n}\n\n/**\n * \u79FB\u52A8\u7AEF\u5BFC\u822A\n * @param menuHeight \u83DC\u5355\u9AD8\u5EA6\n * @param data \u5BFC\u822A\u6570\u636E\n */\nconst MobileNavigation = forwardRef<HTMLDivElement, MobileNavigationProps>(({ data }, ref) => {\n const groupCategories = useMemo(() => {\n return WithGroupCategory(data?.categories)\n }, [data])\n\n const { currentMenu, setCurrentMenu, thirdNavTitle } = useNavContext()\n const [mobileMenuOpen, setMobileMenuOpen] = useState(false)\n const [menuInnerHeight, setMenuInnerHeight] = useState(0)\n const [categoriesItem, setCategoriesItem] = useState<any>(null)\n\n const mobileMenuRef = useRef<HTMLDivElement>(null)\n\n useEffect(() => {\n if (mobileMenuRef?.current && mobileMenuOpen) {\n const rect = mobileMenuRef?.current?.getBoundingClientRect()\n setMenuInnerHeight(window?.innerHeight - (rect?.bottom || 0))\n }\n }, [mobileMenuOpen])\n\n useGSAP(() => {\n gsap.fromTo(\n mobileMenuRef.current,\n {\n height: 0,\n },\n {\n height: menuInnerHeight,\n duration: 0.5,\n }\n )\n }, [menuInnerHeight])\n\n useEffect(() => {\n document.documentElement.style.overflow = mobileMenuOpen ? 'hidden' : 'auto'\n }, [mobileMenuOpen])\n\n const currentBlockTypeCategories = useMemo(() => {\n return categoriesItem?.components?.[0]?.blockType\n }, [categoriesItem])\n\n const MobileSidebarMenuComp = WithSidebar(MobileSidebarMenu, categoriesItem)\n const MobileSupportMenuComp = WithSupports(MobileSupportMenu, {\n categoriesItem,\n })\n const MobileMulticolMenuComp = WithMulticol(MobileMulticolMenu, categoriesItem)\n\n const MobileCategoriesMenuComp = useMemo(() => {\n switch (currentBlockTypeCategories) {\n case HeaderNavigationBlockType.Sidebar:\n return <MobileSidebarMenuComp />\n case HeaderNavigationBlockType.Supports:\n return <MobileSupportMenuComp />\n case HeaderNavigationBlockType.Multicol:\n return <MobileMulticolMenuComp />\n default:\n return null\n }\n }, [currentBlockTypeCategories, MobileSidebarMenuComp, MobileSupportMenuComp, MobileMulticolMenuComp])\n\n const handleSecondaryMenuClose = useCallback(() => {\n setMobileMenuOpen(false)\n setMenuInnerHeight(0)\n setCurrentMenu && setCurrentMenu(HeaderNavigationMenu.Primary)\n }, [setMobileMenuOpen, setMenuInnerHeight, setCurrentMenu])\n\n const menuActions = useMemo(() => {\n return data?.headerBar?.actions?.filter(\n (item: any) => item?.mobileShow && item?.blockType !== HeaderNavigationActionBlockType.Profile // \u79FB\u52A8\u7AEF\u4E0D\u663E\u793Aprofile\u6309\u94AE\n )\n }, [data])\n\n const profileAction = useMemo(() => {\n return (\n data?.headerBar?.actions?.find(\n (item: any) => item?.mobileShow && item?.blockType === HeaderNavigationActionBlockType.Profile\n ) || {}\n )\n }, [data])\n\n const MobileCategoriesHeaderComp = useMemo(() => {\n switch (currentMenu) {\n case HeaderNavigationMenu.Primary:\n return (\n <PrimaryHeader\n actions={menuActions}\n menuOpen={mobileMenuOpen}\n onMenuOpenClose={() => {\n setMobileMenuOpen(false)\n setMenuInnerHeight(0)\n }}\n onMenuOpenClick={() => setMobileMenuOpen(true)}\n />\n )\n case HeaderNavigationMenu.Secondary:\n return (\n <SecondaryHeader\n title={categoriesItem?.text}\n onMenuOpenClose={handleSecondaryMenuClose}\n onMenuBackClick={() => setCurrentMenu?.(HeaderNavigationMenu.Primary)}\n />\n )\n case HeaderNavigationMenu.Third:\n return (\n <SecondaryHeader\n title={thirdNavTitle}\n onMenuOpenClose={handleSecondaryMenuClose}\n onMenuBackClick={() => setCurrentMenu?.(HeaderNavigationMenu.Secondary)}\n />\n )\n default:\n return null\n }\n }, [\n mobileMenuOpen,\n currentMenu,\n setCurrentMenu,\n categoriesItem,\n menuActions,\n thirdNavTitle,\n handleSecondaryMenuClose,\n ])\n\n const handlePrimaryMenuClick = useCallback(\n (groupIndex: number, index: number) => {\n const categoriesItem = Array.isArray(groupCategories)\n ? Array.isArray(groupCategories[groupIndex])\n ? groupCategories[groupIndex][index]\n : {}\n : {}\n setCategoriesItem(categoriesItem)\n setCurrentMenu?.(HeaderNavigationMenu.Secondary)\n },\n [groupCategories, setCurrentMenu]\n )\n\n return (\n <Container childClassName=\"bg-white\" className=\"relative h-[52px]\">\n {/* \u79FB\u52A8\u7AEF\u5206\u7C7B\u83DC\u5355 */}\n {MobileCategoriesHeaderComp}\n {mobileMenuOpen && (\n <div\n ref={mobileMenuRef}\n className=\"absolute left-0 top-[calc(100%+1px)] z-[999] w-full overflow-y-auto bg-white\"\n style={{ height: menuInnerHeight }}\n >\n {currentMenu === HeaderNavigationMenu.Primary ? (\n <MobilePrimaryMenu\n categories={groupCategories}\n onPrimaryMenuClick={handlePrimaryMenuClick}\n profileAction={profileAction}\n />\n ) : (\n MobileCategoriesMenuComp\n )}\n </div>\n )}\n </Container>\n )\n})\n\n/**\n * \u79FB\u52A8\u7AEF\u4E00\u7EA7\u83DC\u5355\n * @param categories \u5206\u7C7B\n * @param onPrimaryMenuClick \u4E00\u7EA7\u83DC\u5355\u70B9\u51FB\n */\nconst MobilePrimaryMenu = ({\n categories,\n onPrimaryMenuClick,\n profileAction,\n}: {\n categories: any\n onPrimaryMenuClick: (groupIndex: number, index: number) => void\n profileAction: any\n}) => {\n return (\n <div className=\"flex h-full flex-col justify-between\">\n <div className=\"tablet:px-8 laptop:px-16 p-4\">\n {categories?.map((groupItem: any, groupIndex: number) => (\n <div key={`groupCategory-${groupIndex}`} className=\"\">\n {groupItem?.map((item: any, index: number) => (\n <MenuItem key={item.id} label={item.text} onClick={() => onPrimaryMenuClick(groupIndex, index)} />\n ))}\n <div\n className={cn('my-2 h-px w-full bg-[#E5E5E7]', { ['hidden']: groupIndex === categories.length - 1 })}\n />\n </div>\n ))}\n </div>\n <ProfileComp profileAction={profileAction} />\n </div>\n )\n}\n\n/**\n * \u79FB\u52A8\u7AEF\u4FA7\u8FB9\u680F\u4E0B\u62C9\n * @param sidebarCategoriesMetadata \u4FA7\u8FB9\u680F\u5206\u7C7B\u5143\u6570\u636E\n * @param seriesMetadata \u4FA7\u8FB9\u680F\u7CFB\u5217\u5143\u6570\u636E\n */\nconst MobileSidebarMenu = ({\n sidebarCategoriesMetadata,\n seriesMetadata,\n}: {\n sidebarCategoriesMetadata: any\n seriesMetadata: any\n}) => {\n const { currentMenu, setCurrentMenu, setThirdNavTitle, matchSeriesMetadata, setMatchSeriesMetadata } = useNavContext()\n const [expandedSubcategory, setExpandedSubcategory] = useState<{ index: number; open: boolean }[]>([])\n\n useEffect(() => {\n if (sidebarCategoriesMetadata?.subcategories?.length) {\n setExpandedSubcategory(\n sidebarCategoriesMetadata?.subcategories?.map((_: any, index: number) => ({ index, open: false }))\n )\n }\n }, [sidebarCategoriesMetadata])\n\n const MobileSidebarMenuComp = useMemo(() => {\n switch (currentMenu) {\n case HeaderNavigationMenu.Secondary:\n return (\n // \u4E8C\u7EA7\u83DC\u5355\n <div className=\"tablet:px-8 laptop:px-16 flex h-full flex-col justify-between p-4\">\n <div>\n {sidebarCategoriesMetadata?.subcategories?.map((item: any, index: number) => (\n <div key={`${item.label}-${index}`}>\n <MenuItem\n label={item?.label}\n active={expandedSubcategory.find(item => item.index === index)?.open}\n onClick={() => {\n setExpandedSubcategory(prev =>\n prev.map(item =>\n item.index === index ? { ...item, open: !item.open } : { ...item, open: false }\n )\n )\n }}\n />\n {expandedSubcategory.find(item => item.index === index)?.open &&\n item.subSubCategories?.map((subItem: any, subIndex: number) => (\n <div\n key={`${index}-${subIndex}`}\n className=\"px-2 py-4\"\n onClick={() => {\n setCurrentMenu && setCurrentMenu(HeaderNavigationMenu.Third)\n // \u901A\u8FC7categoriesMetadata\u7684subSubCategories\u7684label\u4E0Eseries\u7684label\u5339\u914D\n setMatchSeriesMetadata?.(\n seriesMetadata?.find(\n (item: any) =>\n sidebarCategoriesMetadata?.subcategories?.[index]?.subSubCategories?.[subIndex]\n ?.label === item.label\n ) || {}\n )\n setThirdNavTitle && setThirdNavTitle(subItem.label)\n }}\n >\n <Text html={subItem.label} className=\"text-sm font-bold leading-[1.4]\" />\n </div>\n ))}\n </div>\n ))}\n <Link href={matchSeriesMetadata?.guide?.url}>\n <div className=\"mt-4\">\n <Text\n html={matchSeriesMetadata?.guide?.label}\n className=\"text-sm font-bold leading-[1.2] text-[#6D6D6F]\"\n />\n </div>\n </Link>\n </div>\n <div className=\"tablet:items-start flex flex-col items-center gap-4\">\n <Button variant=\"primary\" size=\"lg\" className=\"tablet:w-auto w-full text-base\">\n <a href={sidebarCategoriesMetadata?.primary?.url}>{sidebarCategoriesMetadata?.primary?.label}</a>\n </Button>\n <Button variant=\"link\" size=\"lg\" className=\"tablet:w-auto tablet:px-0 w-full py-0 text-base\">\n <a href={sidebarCategoriesMetadata?.secondary?.url}>{sidebarCategoriesMetadata?.secondary?.label}</a>\n </Button>\n </div>\n </div>\n )\n case HeaderNavigationMenu.Third:\n return (\n // \u4E09\u7EA7\u83DC\u5355\n <div className=\"tablet:px-8 laptop:px-16 desktop:px-0 p-4\">\n {Reflect.ownKeys(matchSeriesMetadata).length > 0 && (\n <div className=\"tablet:pt-0 flex items-center gap-3 py-4\">\n <Text html={matchSeriesMetadata?.label} className=\"text-xl font-bold leading-[1.4]\" />\n <Button variant=\"link\" size=\"lg\" className=\"p-0\">\n <Link href={matchSeriesMetadata?.primary?.url} className=\"text-base leading-[1.2]\">\n {matchSeriesMetadata?.primary?.label}\n </Link>\n </Button>\n </div>\n )}\n <div className=\"flex flex-col gap-6\">\n {matchSeriesMetadata?.series?.map((seriesItem: any, pIndex: number) => (\n <div key={`seriesItem-${pIndex}`}>\n <Text html={seriesItem.label} className=\"text-sm font-bold leading-[1.4] text-[#3D3D3F]\" />\n <div className=\"laptop:grid-cols-3 laptop:gap-4 tablet:grid tablet:grid-cols-2 tablet:gap-3 mt-2 flex flex-col gap-2\">\n {seriesItem.products?.map((product: any, index: number) => (\n <SeriesProductItem key={`seriesProductItem-${pIndex}-${index}`} product={product} />\n ))}\n </div>\n </div>\n ))}\n </div>\n </div>\n )\n default:\n return null\n }\n }, [\n currentMenu,\n matchSeriesMetadata,\n sidebarCategoriesMetadata,\n setThirdNavTitle,\n setCurrentMenu,\n setMatchSeriesMetadata,\n seriesMetadata,\n expandedSubcategory,\n ])\n\n return MobileSidebarMenuComp\n}\n\n/**\n * \u79FB\u52A8\u7AEFsupport\u83DC\u5355\n * @param supportsMetadata support\u83DC\u5355\u5143\u6570\u636E\n */\nconst MobileSupportMenu = ({ supportsMetadata }: { supportsMetadata: any }) => {\n return (\n <div className=\"tablet:px-8 laptop:px-16 p-4\">\n {supportsMetadata?.map((supportItem: any) => (\n <MenuItem key={supportItem.id} href={supportItem.url} label={supportItem.label} onClick={() => {}} />\n ))}\n </div>\n )\n}\n\n/**\n * \u79FB\u52A8\u7AEFmulticol\u83DC\u5355\n * @param multicolMetadata multicol\u83DC\u5355\u5143\u6570\u636E\n */\nconst MobileMulticolMenu = ({ multicolMetadata }: { multicolMetadata: any }) => {\n return (\n <div className=\"tablet:px-8 tablet:p-4 laptop:px-16 flex flex-col gap-4 px-4\">\n {multicolMetadata?.map((item: any, index: number) => (\n <div key={`multicolItem-${item?.label}-${index}`}>\n <MulticolItem item={item} />\n </div>\n ))}\n </div>\n )\n}\n\nconst ProfileComp = ({ profileAction }: { profileAction: any }) => {\n const [profileOpen, setProfileOpen] = useState(false)\n const { profile, event } = useNavContext()\n return (\n <div className=\"tablet:px-8 laptop:px-16 bg-[#F5F5F7] px-4 py-6\">\n <div className=\"flex items-center justify-between\" onClick={() => setProfileOpen(!profileOpen)}>\n <div className=\"flex items-center gap-[14px]\">\n <div className=\"flex size-[40px] items-center justify-center rounded-full bg-white\">\n <User />\n </div>\n <Text html={profile?.nick_name || profileAction?.welcome} className=\"text-base font-bold leading-[1.4]\" />\n </div>\n <RightArrow className={cn({ 'rotate-90': profileOpen })} />\n </div>\n {profile?.email && (\n <div className=\"mt-4\">\n {profileAction?.profiles?.map((item: any) => <MenuItem key={item.id} label={item?.title} href={item?.url} />)}\n </div>\n )}\n {profileOpen && !profile?.email && (\n <div className=\"mt-4\">\n <Text html={profileAction?.benefits_title} className=\"text-sm font-bold leading-[1.4]\" />\n <div className=\"mt-3 flex flex-col gap-1\">\n {profileAction?.benefits?.map((item: any) => (\n <div key={item.id} className=\"flex items-center gap-[6px]\">\n <Picture source={item.benefitIcon?.url} className=\"size-4\" alt={item.benefit} width={16} height={16} />\n <Text html={item.benefit} className=\"text-sm font-bold leading-[1.4]\" />\n </div>\n ))}\n </div>\n </div>\n )}\n <div className=\"tablet:mt-4 mt-6 flex items-center gap-3\">\n <Button className=\"tablet:flex-none flex-1\" variant=\"secondary\" size=\"sm\" onClick={() => event?.join?.()}>\n <Text html={profileAction?.primaryButton || 'Join Now'} className=\"text-sm font-bold leading-[1.4]\" />\n </Button>\n <Button className=\"tablet:flex-none flex-1\" variant=\"primary\" size=\"sm\" onClick={() => event?.login?.()}>\n <Text html={profileAction?.secondaryButton || 'Log In'} className=\"text-sm font-bold leading-[1.4]\" />\n </Button>\n </div>\n </div>\n )\n}\n\nconst PrimaryHeader = ({ menuOpen, onMenuOpenClose, onMenuOpenClick, actions }: MobilePrimaryNavigationData) => {\n return (\n <div className=\"flex h-full items-center justify-between gap-4\">\n <Logo />\n <div className=\"desktop:gap-6 flex items-center gap-4\">\n <Actions actions={actions} />\n {menuOpen ? <Close onClick={() => onMenuOpenClose()} /> : <Menu onClick={() => onMenuOpenClick()} />}\n </div>\n </div>\n )\n}\n\nconst Logo = () => {\n const { payloadData } = useNavContext()\n return (\n <div className=\"desktop:gap-2 flex items-center gap-[6px]\">\n <div dangerouslySetInnerHTML={{ __html: payloadData?.headerBar?.logo }} />\n <LogoLine />\n <Text html={payloadData?.headerBar?.slogan} className=\"tablet:text-sm text-xs font-bold leading-[1.4]\" />\n </div>\n )\n}\n\nconst Actions = forwardRef<HTMLDivElement, { actions: any }>(({ actions }, ref) => {\n const { event } = useNavContext()\n\n const handleActionClick = useCallback(\n (action: any) => {\n switch (action?.blockType) {\n case HeaderNavigationActionBlockType.Search:\n event?.search?.()\n break\n case HeaderNavigationActionBlockType.Cart:\n event?.cart?.()\n break\n case HeaderNavigationActionBlockType.Profile:\n event?.profile?.()\n break\n case HeaderNavigationActionBlockType.Livestream:\n event?.livestream?.()\n break\n default:\n return () => {}\n }\n },\n [event]\n )\n\n return (\n <div className=\"desktop:gap-6 flex items-center gap-4\">\n {Array.isArray(actions) &&\n actions?.map((action: any) => (\n <div\n key={action.id}\n ref={action.blockType === HeaderNavigationActionBlockType.Profile ? ref : null}\n onClick={() => handleActionClick(action)}\n >\n <Text html={action.icon} className=\"hover:text-brand-0 cursor-pointer\" />\n </div>\n ))}\n </div>\n )\n})\n\nconst SecondaryHeader = ({ title, onMenuOpenClose, onMenuBackClick }: MobileSecondaryNavigationData) => {\n return (\n <div className=\"flex h-full items-center gap-3\">\n <LeftArrow onClick={() => onMenuBackClick()} />\n <Text html={title} className=\"flex-1 text-center text-base font-bold leading-[1.4]\" />\n <Close onClick={() => onMenuOpenClose()} />\n </div>\n )\n}\n\nconst MenuItem = ({\n label,\n href,\n onClick,\n active,\n}: {\n label: string\n href?: string\n onClick?: () => void\n active?: boolean\n}) => {\n return (\n <div className=\"flex cursor-pointer items-center justify-between py-4\" onClick={onClick}>\n <Link href={href} asChild={!href} className=\"flex w-full items-center justify-between no-underline\">\n <Text html={label} className=\"text-sm font-bold leading-[1.4]\" />\n <RightArrow className={cn({ 'rotate-90': active })} />\n </Link>\n </div>\n )\n}\n\nexport default withLayout(HeaderNavigation)\n"],
|
|
5
|
+
"mappings": "AAyFQ,OAyhBA,YAAAA,GA3gBgB,OAAAC,EAdhB,QAAAC,MAAA,oBAzFR,OAAgB,cAAAC,EAAY,eAAAC,EAAa,aAAAC,EAAW,uBAAAC,GAAqB,WAAAC,EAAS,UAAAC,EAAQ,YAAAC,MAAgB,QAE1G,OAAS,WAAAC,EAAS,QAAAC,EAAM,UAAAC,EAAQ,aAAAC,EAAW,QAAAC,MAAY,4BAEvD,OAAS,cAAAC,OAAkB,yBAE3B,OAAS,MAAAC,EAAI,UAAAC,OAAc,yBAS3B,OAAOC,IAAe,iBAAAC,MAAqB,mBAE3C,OAAS,wBAAAC,EAAsB,6BAAAC,EAA2B,mCAAAC,MAAuC,aAEjG,OAAS,iBAAAC,OAAqB,mBAC9B,OAAS,YAAAC,GAAU,YAAAC,OAAgB,aAEnC,OAAS,WAAAC,MA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AS,IAAM8H,EAAkBC,CAAM,EAEvC,SAAAvK,EAACU,EAAA,CAAK,KAAM6J,EAAO,KAAM,UAAU,oCAAoC,GAJlEA,EAAO,EAKd,CACD,EACL,CAEJ,CAAC,EAEKjB,GAAkB,CAAC,CAAE,MAAAkB,EAAO,gBAAAL,EAAiB,gBAAAM,CAAgB,IAE/DxK,EAAC,OAAI,UAAU,iCACb,UAAAD,EAACmC,GAAA,CAAU,QAAS,IAAMsI,EAAgB,EAAG,EAC7CzK,EAACU,EAAA,CAAK,KAAM8J,EAAO,UAAU,uDAAuD,EACpFxK,EAACgC,GAAA,CAAM,QAAS,IAAMmI,EAAgB,EAAG,GAC3C,EAIET,EAAW,CAAC,CAChB,MAAAgB,EACA,KAAAC,EACA,QAAAC,EACA,OAAAC,CACF,IAOI7K,EAAC,OAAI,UAAU,wDAAwD,QAAS4K,EAC9E,SAAA3K,EAACY,EAAA,CAAK,KAAM8J,EAAM,QAAS,CAACA,EAAM,UAAU,wDAC1C,UAAA3K,EAACU,EAAA,CAAK,KAAMgK,EAAO,UAAU,kCAAkC,EAC/D1K,EAACkC,GAAA,CAAW,UAAWnB,EAAG,CAAE,YAAa8J,CAAO,CAAC,EAAG,GACtD,EACF,EAIJ,IAAOC,GAAQhK,GAAWwB,EAAgB",
|
|
6
|
+
"names": ["Fragment", "jsx", "jsxs", "forwardRef", "useCallback", "useEffect", "useImperativeHandle", "useMemo", "useRef", "useState", "Picture", "Text", "Button", "Container", "Link", "withLayout", "cn", "atobID", "NavProvider", "useNavContext", "HeaderNavigationMenu", "HeaderNavigationBlockType", "HeaderNavigationActionBlockType", "useMediaQuery", "debounce", "throttle", "useGSAP", "gsap", "WithSidebar", "WithSupports", "WithMulticol", "WithGroupCategory", "Menu", "Close", "User", "RightArrow", "LeftArrow", "DownArrow", "LogoLine", "HeaderNavigation", "props", "ref", "headerNavigation", "buildProps", "event", "profile", "theme", "isMobile", "setIsMobile", "headerHidden", "setHeaderHidden", "changeHeaderBackground", "setChangeHeaderBackground", "headerRef", "mediaQuery", "upwardDistance", "lastScrollY", "showDownNav", "latest", "delta", "scrollAnimate", "scrollTop", "DesktopNavigation", "MobileNavigation", "data", "groupCategories", "categoriesItem", "setCategoriesItem", "navStatusArray", "setNavStatusArray", "profileRef", "userProfileOpen", "setUserProfileOpen", "navItemRefs", "categories", "groupItem", "groupIndex", "_", "index", "currentNavItem", "item", "handleNavItemClick", "e", "prev", "handleNavMenuClose", "currentBlockTypeCategories", "SidebarDropdownComp", "SidebarDropdown", "SupportsDropdownComp", "SupportsDropdown", "MulticolDropdownComp", "MulticolDropdown", "DropdownComp", "actions", "profileAction", "handleProfileClick", "profileRefElement", "Logo", "Actions", "el", "sidebarCategoriesMetadata", "seriesMetadata", "expandedSubcategory", "setExpandedSubcategory", "activeSubSubcategoryIndex", "setActiveSubSubcategoryIndex", "sidebarDropdownRef", "matchSeriesMetadata", "handleSubcategoryOpen", "handleSubSubcategoryOpen", "subItem", "subSubItem", "subSubindex", "seriesItem", "seriesIndex", "product", "SeriesProductItem", "multicolMetadata", "multicolDropdownRef", "MulticolItem", "supportsMetadata", "currentNavItemRef", "supportsDropdownRef", "navItemReact", "setNavItemReact", "debouncedHandleResize", "rect", "supportItem", "productData", "variant", "listingLink", "columnItem", "currentMenu", "setCurrentMenu", "thirdNavTitle", "mobileMenuOpen", "setMobileMenuOpen", "menuInnerHeight", "setMenuInnerHeight", "mobileMenuRef", "MobileSidebarMenuComp", "MobileSidebarMenu", "MobileSupportMenuComp", "MobileSupportMenu", "MobileMulticolMenuComp", "MobileMulticolMenu", "MobileCategoriesMenuComp", "handleSecondaryMenuClose", "menuActions", "MobileCategoriesHeaderComp", "PrimaryHeader", "SecondaryHeader", "handlePrimaryMenuClick", "MobilePrimaryMenu", "onPrimaryMenuClick", "MenuItem", "ProfileComp", "setThirdNavTitle", "setMatchSeriesMetadata", "subIndex", "pIndex", "profileOpen", "setProfileOpen", "menuOpen", "onMenuOpenClose", "onMenuOpenClick", "payloadData", "handleActionClick", "action", "title", "onMenuBackClick", "label", "href", "onClick", "active", "HeaderNavigation_default"]
|
|
7
7
|
}
|